SoundCloud SC.Widget.Events.FINISH不再触发HTML5小部件

时间:2017-11-20 01:10:56

标签: javascript html5 soundcloud

我最近注意到SC.Widget.Events.FINISH事件不再在播放列表的HTML5小部件API中触发。以下代码之前工作正常,但现在歌曲结束时不再执行该功能:

http://jsbin.com/vujedofada/edit?html,css,js,console,output

$(function() {
    var iframe = document.querySelector('iframe');
    widget = SC.Widget(iframe);        
    widget.bind(SC.Widget.Events.READY, function() {
        console.log("Ready");
        widget.bind(SC.Widget.Events.PLAY, function() {
            //Get info for song playing
            widget.getCurrentSound(function(currentSound) {
                console.log(currentSound.id + " " + currentSound.title + " " + currentSound.artwork_url);
                sid = currentSound.id
                stitle = currentSound.title
                sartlo = currentSound.artwork_url
                display_artwork()
            });
        });         
        widget.bind(SC.Widget.Events.FINISH, function() {        
            console.log("Finish");
            play_next_shuffled_song();
        });
        widget.getSounds(function(sounds) {
            create_shuffled_indexes(sounds.length);
            play_next_shuffled_song();
        });               
    });
});

READY和PLAY事件似乎正在运行,FINISH适用于具有单个音轨的小部件,而不是播放列表。

来自SoundCloud的某人是否可以确认这是否是一个已知错误以及什么时候会被纠正?