laikedou / LMusic

基于原生JavaScript的播放器 暂时只是兼容pc端 ie9以上 火狐 谷歌 opera浏览器 safri浏览器
8 stars 6 forks source link

不是你写的代码吧? #1

Open wangbingxu opened 7 years ago

wangbingxu commented 7 years ago

demo.html的页面样式就不说了,列表循环模式下的下一首按钮的方法也有问题: if(type === 'prev'){ index = ((idx<=len-1)&&(idx>0))?(idx-1):(len-1); }else if(type === 'next' || type ==='ended'){ //index = (idx >= len-1) ? 0 : (idx-1);//这种是三元运算符 index = (idx >= len-1) ? 0 : (idx+1);//这种是三元运算符 } ` 自己看着改吧。。

laikedou commented 7 years ago

这个是基于一个叫做smusic的开源代码来改的 里面也有大部分代码是我写的 我的博客就用的这个播放器 http://laijiadayuan.com/blog/

laikedou commented 7 years ago

看代码最好还是看仔细了 代码里面注释有基于开源项目改的