Open adrienjoly opened 6 years ago
Reproduced bug on /test/sample.html:
Expected behaviour: the two videos should keep being played in sequence. (looping)
Observed behaviour: after the end of the video that was currently playing, the next video does not start playing until we switch back to the corresponding page/tab.
Calling playVideo()
programmatically instead of relying on Youtube's autoplay
parameter does not fix this issue, unfortunately... (cf https://github.com/adrienjoly/playemjs/pull/16)
If anybody want to dig into this player :
https://github.com/CookPete/react-player/blob/master/src/players/YouTube.js
They managed to make it work.
They still have a few problems with reading tracks from different providers but it's a start.
Thanks for sharing this, @SkinyMonkey!
Can you tell us more about the problems you've had with other providers?
PlayemJS is a web/js component to play a sequence of tracks from Youtube, Soundcloud, Bandcamp and several other streaming sources. It's the core of openwhyd.org's music web app.
Problem
Found evidence that Google Chrome prevented videos from starting to play when their tab was in the background:
Source: https://github.com/openwhyd/openwhyd/issues/88#issuecomment-341401701
Note: this issue does not apply when Playemjs is running in an Electron app. (cf https://github.com/openwhyd/openwhyd-electron)
Howto
In order to solve this issue, you are invited to fork this GitHub repository, makes changes to it, and then create a Pull Request so we can merge your changes back to this repository.
First, you may want to read about:
README.md
I will be happy to assist you at any stage, if you want to try to solve this issue! If you have any question, just leave a comment below. Beginners are also welcome! 🤗