我正在使用 jplayer 在网页上播放音频,当页面加载时,检查器和播放器加载正常,但绑定功能不起作用。如果我稍后从控制台调用它,那么它工作正常。
$(document).ready(function(){
myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",
{ mp3: flatplaylist[0] },
{ supplied: "mp3", }
);
$("#jplayer_inspector").jPlayerInspector({jPlayer:$("#jquery_jplayer_1")});
//does not work from here, but will work if I put this in the console.
$(myCirclePlayer.audio).bind('ended',function (){ playNextFile(); });
});