Open minheinkhantatwork opened 1 year ago
👋 Thanks for opening your first issue here! 👋
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
I have the same issue. Did you get anywhere? heck! It even freezes youtube. I am using videojs inside a webview and pressing the home button means you can't play any video on any app for more than 2-3 seconds, including the videojs video.
Ok I did some digging and found this https://github.com/video-dev/hls.js/issues/5306 I tried using different HLS libraries, none of them solved the issue. If your video keeps playing in the background and you leave the app or the browser you are playing the video in, it will cause this issue.
Since I am using webview in my app I traced the back button behaviour and paused, removed source and destroyed the video player before leaving the app. That seemed to solve the issue. However there are several ways an app can be sent to background in android tvs like pressing the assistant button and asking for another app, home button, settings button etc.
Also remember that once this bug starts, you can't stop it. the video will keep playing in the background(?) and won't stop until you soft reset the device. It's stupid and google doesn't seem to be fixing it. https://bugs.chromium.org/p/chromium/issues/detail?id=1432833
Description
While I am live streaming and quit the browser using the HOME key and play a video on any other native app on android, the video is being pause constantly in 2 to 5 seconds period. It happens only with video-js tag and hls streaming. I tested using video tag with hls streaming and video-js tag with mp4. They didn't cause the pause.
Reduced test case
https://codepen.io/minhienkhant-atwork/pen/OJaKeMG
Steps to reproduce
Errors
No response
What version of Video.js are you using?
v8.3.0
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
Chrome 115
What OS(es) and version(s) does this occur with?
Android 9