내 재생 목록을 만들고 재생하는 리터럴 JS 개체가 있습니다. HTML 페이지에는 모든 트랙이있는 목록이 있습니다. 일부 트랙을 클릭하면 모두 정상적으로 작동하지만 한 트랙을 클릭하고 트랙의 끝을 기다리면 다음 트랙이 재생되지 않습니다. 나는이 같은 onfinish 이벤트에 라인을 변경하는 경우Sound Manager 2 및 재생 목록에서 다음 노래가 자동으로 재생되지 않습니다.
playSound : function(track){
console.log("Play this song");
DG_PLAYER.TrackPlaying = track;
soundManager.destroySound('MySoundID');
DG_PLAYER.Sound = soundManager.createSound({
id:'MySoundID',
url:track.sound,
autoLoad: true,
autoPlay: true,
onload: function() { console.log('sound loaded!', this); },
onfinish: function(){
console.log('end song');
var nextSong = DG_PLAYER.getNextSong();
DG_PLAYER.playSound(nextSong);
},
onfailure : function(){console.log('some error')},
whileloading : function(){console.log('i m loading');},
whileplaying : function(){console.log('i m playing');}
});
},
: 이 내 코드의 일부이다 에서는 setTimeout (() 함수는 {DG_PLAYER.playSound (nextSong);}, 2000)가 잘 작동합니다. 어떤 사람이 나를 도울 수 있습니까?
첫 번째 노래가 끝나고 다음 노래를 재생할 때 트랙이로드되지 않습니다 (onload 이벤트의 메시지가 표시되지 않음). 감사합니다. 나쁜 영어로 유감스럽게 생각합니다. A.
OK, 설치에 "flashVersion : 9"를 추가하려고하는데 문제가 해결되었지만 Internet Explorer 8에서 실행 취소 스크립트 메시지가 나타납니다.
고마워요! 이제 모두 확실합니다. –