mozilla / video-bg-play

Break Page Visibility API and Fullscreen API so video plays in background
https://addons.mozilla.org/firefox/addon/video-background-play-fix/
MIT License
157 stars 19 forks source link

works for a few mins then stops consistently #39

Open WabbajackWabbajack opened 1 year ago

WabbajackWabbajack commented 1 year ago

Hi I'm on Android 13, oneUI 5.1 Samsung and only have partially working addon, it plays in the background for a few minutes and then will stop, it immediately resumes when I return focus to the firefox tab that the video is playing in, I can see the buffering circle when I come back to the tab almost as if it's refusing to buffer unless I return to the video

WabbajackWabbajack commented 1 year ago

Installed Firefox yesterday so it should be the most recent build. Regular ff not the nightly.

buttercookie42 commented 1 year ago

Does Firefox's media playback notification appear in these cases?

WabbajackWabbajack commented 1 year ago

Does Firefox's media playback notification appear in these cases?

Nope not a single notification that I've noticed, it seems to happen after exactly 5mins, tried on an older Motorolla phone with Android 10 as well and got similar behavior

buttercookie42 commented 1 year ago

With Youtube it's always a bit hard to tell because they could also simply slowly be rolling out a breaking change, but yes, in that case bug 1827583 is the more likely culprit.

buttercookie42 commented 1 year ago

Add-ons have no control over

a) Firefox throttling background tabs, or b) Android throttling background Firefox

Any issues in those areas need to be fixed in Firefox itself (and in the worst case, some issues relating to b) might not even be fixable in Firefox itself because they're under exclusive control of Android).

mxr576 commented 8 months ago

Is this a valuable input to solve the riddle?

https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/reviews/2044483/

If not, how can anybody help with using ADB?

buttercookie42 commented 8 months ago

Thanks, that's an interesting clue, although… I still can't reproduce the issue on my phone. I've tested two approximately 11 or 12 minute long videos that according to the page source definitely are "Category: Music" (and from an official artist's channel), and as long as I'm only playing back a single track, everything still worked fine.

(If I try a playlist or leave autoplay enabled, I'm hitting https://bugzilla.mozilla.org/show_bug.cgi?id=1878115, but that's a clear Firefox bug.)

Then we've had the mystery report in issue #45, where the issue supposedly happened even for single videos with definitely no autoplay/playlists involved, and where disabling battery optimisations for Firefox solved the issue, but it remains a mystery why exactly that helped.