videojs / videojs-youtube

YouTube playback technology for Video.js
1.12k stars 549 forks source link

Doesn't trigger end / ended event #548

Closed DanielRuf closed 4 years ago

DanielRuf commented 4 years ago

https://codepen.io/DanielRuf/pen/xxbaPWw

See https://github.com/videojs/videojs-youtube/issues/261

gkatsev commented 4 years ago

I'm seeing ended trigger properly for when the video ended.

DanielRuf commented 4 years ago

But the play button is not reset at the end (shows pause icon).

gkatsev commented 4 years ago

Oh, looks like the issue is that the codepen uses Video.js 5 which doesn't do that. It is updated properly if using latest video.js: https://codepen.io/gkatsev/pen/BayOGdm

DanielRuf commented 4 years ago

We can not update to a newer version as it is part of a vendor file of a big client website.

Is there a simple solution to fix this?

chrisjeon commented 4 years ago

Has anyone figured this out yet?

gkatsev commented 4 years ago

Unfortunately, the latest youtube tech may not support Video.js 5. As mentioned in my previous comment using a newer Video.js with the youtube tech works fine. If Video.js 5 is required we'd be happy to merge a fix assuming it's a reasonable change.