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
146 stars 19 forks source link

Playlists stopped working #32

Open github-monkey opened 2 years ago

github-monkey commented 2 years ago

For a few weeks now, the add-on has not worked for YouTube, when Firefox is in the background or the screen is off completely.

I have reset Firefox (clear data from Android's app settings) and reinstalled the add-on but the issue continues. Autoplay is on.

Samsung Galaxy Note 10+ Android 12 Firefox 105.2.0

buttercookie42 commented 2 years ago

Unfortunately I can't reproduce this issue. Either it's some Youtube change that's only slowly being rolled out and only to some users for now, or else it might be due to the particular combination of Firefox version, Android version and/or particular phone model.

How exactly does the problem manifest itself? Does playback stop immediately after Firefox goes into the background or the screen turns off, or is there some delay?

github-monkey commented 2 years ago

Playback continues until the end of the video but then does not continue to whatever is supposed to play next, according to autoplay or a playlist. If I forward to the end of the video and the "up next" screen pops up, counting down to the video to be played, even if the countdown is underway, if I then switch to another app or turn off the screen the next video does not start playback.

Up until recently, the next video (of a playlist or selected by YouTube with autoplay) would play without issues, with the add-on installed.

On Mon, Oct 10, 2022, 23:00 buttercookie42 @.***> wrote:

Unfortunately I can't reproduce this issue. Either it's some Youtube change that's only slowly being rolled out and only to some users for now, or else it might be due to the particular combination of Firefox version, Android version and/or particular phone model.

How exactly does the problem manifest itself? Does playback stop immediately after Firefox goes into the background or the screen turns off, or is there some delay?

— Reply to this email directly, view it on GitHub https://github.com/mozilla/video-bg-play/issues/32#issuecomment-1273814880, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJKUHSN4BG22XU6JTF3EKLWCR7VRANCNFSM6AAAAAARBVHIGM . You are receiving this because you authored the thread.Message ID: @.***>

github-monkey commented 2 years ago

Am I misremembering? Does the add-on not facilitate background automatic playback of whatever video is up next? I seem to recall playlists and autoplay in general just working in the background until a few weeks ago.

buttercookie42 commented 2 years ago

All the addon can do is to (hopefully successfully [1]) try prevent Youtube from learning that the tab has been backgrounded, but it can't influence whatever Firefox and Android are up to. If Firefox is possibly too aggressive in backgrounding a tab once the video/audio stops playing at the end of a track and/or Android is subsequently too aggressive in throttling or killing background processes, I can't do anything about it.

[1] I just gave it another try with a playlist and for me it's still working fine – while there is a noticeable pause between tracks while in background, playback of the next track always eventually resumes.

github-monkey commented 2 years ago

Thanks for clarifications and checking.

I checked with my Samsung Android 9 tablet, which runs One UI 1.1 and the background playlists work, though it took literally about a minute. My Samsung Android 12 phone with One UI 4.1 does not work.

On Fri, Oct 21, 2022, 16:00 buttercookie42 @.***> wrote:

All the addon can do is to (hopefully successfully [1]) try prevent Youtube from learning that the tab has been backgrounded, but it can't influence whatever Firefox and Android are up to. If Firefox is possibly too aggressive in backgrounding a tab once the video/audio stops playing at the end of a track and/or Android is subsequently too aggressive in throttling or killing background processes, I can't do anything about it.

[1] I just gave it another try with a playlist and for me it's still working fine – while there is a noticeable pause between tracks while in background, playback of the next track always eventually resumes.

— Reply to this email directly, view it on GitHub https://github.com/mozilla/video-bg-play/issues/32#issuecomment-1287008564, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJKUHW2UZ7KF4MJ4NC7U73WEKOXNANCNFSM6AAAAAARBVHIGM . You are receiving this because you authored the thread.Message ID: @.***>

gambon2010 commented 1 year ago

I have the same issue with my LG v35 (android 10) and on a Motorola g52 (android 12 I think). I have the issue on Firefox and Firefox nightly On my LG I added Firefox to the battery exception list, so in theory android shouldn't throttle the app, so I guess it might be coming from firefox

buttercookie42 commented 1 year ago

I've opened an issue for you under https://github.com/mozilla-mobile/fenix/issues/28311, but if there are any follow-up questions there or anything like that you'll have to get involved yourselves.

buttercookie42 commented 1 year ago

Firefox issue now tracked by bug 1812957.

n0proxy commented 1 month ago

I'm also having this exact issue as a first-time installer of this extension. Youtube videos will continue to play until finished (when in the background), but SOMETIMES will not transition to the next video in the playlist. I tried a bunch of different tests like being in another firefox tab vs having another app open vs having my screen off, trying different playlists I had never loaded on my phone before vs repeats, first song of a playlist vs one in the middle... and couldn't repro it, even though I literally had it happen twice yesterday at random points.