mozilla / popcorn-js

The HTML5 Media Framework. (Unmaintained. See https://github.com/menismu/popcorn-js for activity)
MIT License
2.14k stars 632 forks source link

Issue with pause event on Youtube HTML player #458

Open syl22-00 opened 9 years ago

syl22-00 commented 9 years ago

It seems that, starting very recently, there is an issue with the HTML Youtube player that does not fire the pause event on Chrome. So after calling player.pauseVideo();, it is waiting indefinitely for the pause event in order to call onFirstPause (addYouTubeEvent( "pause", onFirstPause );).

This is not happening on Firefox, where the pause event is fired and dispatched correctly.

For now, I hacked by changing addYouTubeEvent( "pause", onFirstPause ); into a timeout after the call to player.pauseVideo(); to call onFirstPause.

Will make a pull request if that works for a while... and if Google does not fix the issue soon.

syl22-00 commented 9 years ago

Workaround was submitted in pull request #460

syl22-00 commented 9 years ago

This can be tested easily for instance with the YouTube demo, which is currently also broken on the website because the compiled popcorn it uses does not include other recent updates for youtube broken API.

syl22-00 commented 9 years ago

This seems to have been fixed on Youtube's side, the youtube demo now works well again.