联系官方销售客服
1835022288
028-61286886
以下代码为网上找的播放器,我把它集成到页面,安装手机和网页可以正常切换播放,苹果不能点文字切换播放,可能因为点文字,想把点文字改成点一个图标,请问怎么改。
<div class="bottom"> <div class="bottom-left"> <img src="{dr_avatar($uid)}" alt=""> </div> <div class="bottom-middle"> <span class="name">名称:{$title}</span> <span class="singer">目录:{$index.title}</span> <audio id="audio" src="http://music.163.com/song/media/outer/url?id=3985834.mp3" controls></audio></div> </div> </div> <script> var url = document.getElementsByClassName('url') var li = document.querySelectorAll('.song') var audio = document.getElementById('audio') var pict = document.getElementsByTagName('img') var span1 = document.querySelector('.name') var span2 = document.querySelector('.singer') for (let i = 0; i < li.length; i++) { li[i].addEventListener('click', function(e) { console.log(e.path[1].children[2].outerText) audio.src = e.path[1].children[2].outerText audio.play(); pict[1].src = arr[i].songPic span1[xss_clean] = arr[i].name span2[xss_clean] = arr[i].singer }) }
应该就是标红那段,有大哥吗?如果有愿意的帮个忙,我集成下来可以分享出来