mediaelement-plugins
mediaelement-plugins copied to clipboard
Playlist plugin fails at the end of playlist run
As we see in this except, at the end, the playlist still tries to load an items OUT of bounds, which is undefined, so the mediaelement player makes errors ; it should be "< player.listItems.length - 1".
player.endedCallback = function () {
if (player.currentPlaylistItem < player.listItems.length) {
player.setSrc(player.playlist[++player.currentPlaylistItem]);
player.load();
setTimeout(function () {
player.play();
}, 200);
}
};