this.mediaEvent('ended' ,callback);
function callback(){
switch(self.playType){
case 1:
if(self.currentIndex == self.countTotal-1){
return false;
}else{
self.currentIndex++;
}
break;
case 2:
self.currentIndex = Math.floor(Math.random()*self.countTotal);
break;
case 4:
self.currentIndex++;
console.log("self.currentIndex==",self.currentIndex);
self.currentIndex = (self.currentIndex > self.countTotal-1) ? 0 : self.currentIndex;
break;
}
self.startPlay();
}
结果第一首播放接受确实只触发了一次ended事件,第二次播放接受触发两次,第三次播放结束触发了4次。导致一直在列表的1、2两首轮播,完全不顾及第三首的感受。。
有人也遇到过这个问题么?
另外,oschina提问的这个编辑器控件在chrome下好像有问题,落焦点了无光标,输入后需要点下下面缩放编辑器窗口才可以显示出来,而且反应很慢,其他人有这个问题么??