When you use a page with react-player in it, YouTube videos will not autoplay when the window does not have focus. While I'm certain YouTube has good intentions here, my application requires YouTube videos to play automatically regardless of whether the window is focused or not. Here are a few things I've tried but don't seem to work:
- Run
.playVideo() after the onReady event of the YouTube player fires
- Constantly run
window.focus() in the hope that they have a listener there (nope)