mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
405 stars 137 forks source link

Playlist fails to play next audio after first ends #225

Open Bakual opened 2 years ago

Bakual commented 2 years ago

When the first audio is finished playing, the player is supposed to play the next item in list. Instead it replays the first one, but displays the info from the second item In the browser console I get this error: image

Using next/prev works, there it plays the next item just fine. It looks like an error just when it should automatically switch to the next item in the list.

I've tested it also with the demo example (adjusted the non-working links). So it doesn't seem to be a code issue on my side.

Bakual commented 2 years ago

I think the issue is on this line: https://github.com/mediaelement/mediaelement-plugins/blob/5a854644445ffce95df2b40564e5da83c30dcedf/src/playlist/playlist.js#L84

Should be player.setSrc(player.playlist[++player.currentPlaylistItem].src);