1分钟,把握用H5听音乐的逆天技能
<div style="color: black; text-align: left; margin-bottom: 10px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1分钟技能GET:<span style="color: black;">每日</span><span style="color: black;">供给</span>一项实用技能</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d10000e8e27ba8291f~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=ECU6ueWv4cLuEbW36dGDW%2FEBnls%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">不管你是QQ音乐<span style="color: black;">热情</span>用户、网易音乐<span style="color: black;">兴趣</span>者还是虾米音乐的粉丝,只要你符合以下两个特征,这篇<span style="color: black;">文案</span><span style="color: black;">便是</span>为你准备的:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(1)<span style="color: black;">期盼</span>有逼格地分享自己<span style="color: black;">爱好</span>的音乐;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)愿意多学一门实用又好玩的互联网技艺。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">首要</span>,音乐交互的实现需要<span style="color: black;">运用</span>H5页面制作工具iH5——请在电脑端打开网站www.ih5.cn,点击右下角的“新建案例”<span style="color: black;">起始</span>制作。</strong>H5音乐的交互之旅就此启程!</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">【1】添加音频</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/6d00000e6518075ae33~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=ut14KUSP6Rqv%2Bd%2Fn36PBVMjAU1I%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如上图,点击“音频”图标,就能<span style="color: black;">经过</span>上传或添加外链为H5页面加音乐。音乐的上传自不必多说,国内大部分H5页面制作工具都能实现,但<span style="color: black;">她们</span>都<span style="color: black;">需求</span>单个音频<span style="color: black;">体积</span>在5M之内。<span style="color: black;">怎样</span>破除这个魔咒?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">别浪费了iH5自定义音乐地址的功能,直接用外链!</strong>外链相当于存储音乐的<span style="color: black;">位置</span>,<span style="color: black;">亦</span>能用来下载音乐,<span style="color: black;">因此呢</span>只需要把它填在“资源位置”就行。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d10000e5d42bbe9144~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=JfVyL82JfVDAavdNN1GFVTpMpCw%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">还好音乐盈利空间<span style="color: black;">无</span>视频<span style="color: black;">那样</span>大,其实获取QQ、网易、阿里、百度音乐的外链,<strong style="color: blue;">你在网上随便一搜(<span style="color: black;">例如</span>百度“虾米音乐外链”),都有公开的<span style="color: black;">办法</span>。</strong>当然这算是一个“灰色地带”,<span style="color: black;">位置</span>大<span style="color: black;">大都是</span>第三方网站自己解析出来的。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">原理是换掉这些外链里的ID。<span style="color: black;">例如</span>虾米音乐外链是</p>http://link.hhtjim.com/xiami/1769962750.mp3,你把“.mp3”前面那串数字换成歌曲ID就行。而虾米的歌曲ID是点击歌曲名进入内容页,页面网址里“song/”后面那串数字。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)音频的<span style="color: black;">掌控</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6ce0009069f88511c3a~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=ICvjERkQSEUiUzSOR%2FR2nmETLik%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">近期比较迷80年代的欧陆舞曲,顺便用三首迪斯科舞曲做个简易版播单。<strong style="color: blue;">如上图,<span style="color: black;">重点</span><span style="color: black;">经过</span>设计一个替换音乐外链的事件来实现。</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">iH5<span style="color: black;">准许</span>对音频做6种<span style="color: black;">掌控</span>:(1)设置属性(2)继续播放(3)从头播放(4)暂停(5)下载(6)从某个时刻<span style="color: black;">起始</span>播放。其中,设置属性就能用来修改音频外链。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d00000e956bb4cedb0~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=a30i%2FbvenLqVe9KiUgg35nEg6D4%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">例如</span>上面设计第二首歌的播放,只需要设<span style="color: black;">选定</span>击按钮时,<strong style="color: blue;">音频的资源位置变成对应的外链,</strong><strong style="color: blue;">再加个让音乐从头播放的事件就行。</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(3)<span style="color: black;">移植</span>现成歌单</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">咦,你是懒癌<span style="color: black;">病人</span>?那最后这个大招最适合你了,不仅快效果还好,<strong style="color: blue;">直接嵌入音乐网站现成的播放器和歌单吧。</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d10000e87d95c0744c~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=R16iSv%2FVq%2BKjsNp6jW%2FCs2m1X4Q%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如上图,网易在歌单页面里有一个“生成外链播放器”的按钮。<strong style="color: blue;">点进去是iframe和flash两种播放器插件,你需要做的是复制出前者的HTML代码。</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d000031608dcaa5a5d~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=eMmtogImCWCkx1cLs82L4GBsaT4%3D" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">倘若</span>用后面的flash播放器,<span style="color: black;">无</span>越狱的苹果用户估计会听不了。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/6d00003377d7696f127~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729508442&x-signature=pGvZoIE0t8imSuaBeC%2BNfG7%2BzyQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如图,新建一个富文本,激活HTML代码编辑模式,把这串代码粘贴进去就OK了。当然,需要<span style="color: black;">重视</span>的是,<strong style="color: blue;">播放器的宽(width)和高(height)需要<span style="color: black;">经过</span>修改代码进行设置。</strong>最后点击预览,你就会<span style="color: black;">发掘</span>页面<span style="color: black;">已然</span>“<span style="color: black;">移植</span>”了网易的MP3播放器。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">但这种播放器有一点缺陷,<span style="color: black;">不可</span><span style="color: black;">经过</span>触摸页面滑动歌单,还需要点击右侧那个细细的滑块,<span style="color: black;">才可</span><span style="color: black;">掌控</span>歌曲列表的位置。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">虾米<span style="color: black;">亦</span><span style="color: black;">供给</span>外嵌入播放器,但取它的代码比较隐晦,得在歌曲页面下方“设置”那个按钮选“生成虾米播播”才行——<span style="color: black;">况且</span>它的播放器比较丑,不<span style="color: black;">意见</span><span style="color: black;">运用</span>。</p>
</div>
回顾历史,我们感慨万千;放眼未来,我们信心百倍。
页:
[1]