plyr icon indicating copy to clipboard operation
plyr copied to clipboard

[Question] Why "ended" event does not fire if autoplay is ON.

Open benderillo opened this issue 1 year ago • 1 comments

This is not a bug or feature request but a clarification question on a statement on the Plyr documentation page.

On the main page of this repo it says:

Event Description
ended Sent when playback completes. Note: This does not fire if autoplay is true.

And I observe this behaviour in Safari on Mac and in any browser on apple mobile devices (iPhone and iPad). I get it somehow related to the fact they don't allow autoplay but I don't understand how 'ended' is related to it and why I can't find it mentioned on MDN (https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event)

Could someone please shed some light?

Context I have a player with a list of videos (HLS) on a side and when user marks autoplay setting, it should play videos in the list sequentially. But because of this annoying behaviour, I have no visibility (in my code) when playback is finished so I can load next video.

benderillo avatar Feb 03 '23 00:02 benderillo

I’m also wondering the same thing. It’s very common to want to autoplay a playlist.

binaryfire avatar Oct 11 '23 08:10 binaryfire