TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
30.22k stars 2.98k forks source link

Videos pause every 5s if another stream open in browser app #10707

Open BHydden opened 6 months ago

BHydden commented 6 months ago

Checklist

Affected version

0.26.1

Steps to reproduce the bug

  1. Open and pause an audio stream in browser
  2. Open NewPipe and play any video
  3. See that video pauses every 5 seconds
  4. Closing and restarting app unable to fix issue
  5. Closing the audio stream entirely allows NewPipe to function normally

Expected behavior

Videos should not pause unless requested. Foreground app should not be interrupted by paused background processes.

Actual behavior

Videos (any) pause every 5 seconds.

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

Android 14 GrapheneOS UQ1A.231205.015.2023121200

Affected device model

Google Pixel 6

Additional information

No response

BHydden commented 6 months ago

Bug seems to have gone away after a full device restart, will leave issue open in case anyone else has the issue.

BHydden commented 6 months ago

Still happens sometimes. Unsure what causes it. Haven't found a guaranteed trigger but once it starts it doesn't stop without force close app or device restart.

opusforlife2 commented 6 months ago

Try on a non-Graphene device.

RalfHerzog commented 6 months ago

I have the same issue after starting a live-stream in browser app (but can be any other app as well). Even after stop playing the stream, it buffers data every 5 seconds and thus using my audio (for whatever reason) so that any newpipe video is paused. After a phone-restart the browser and stream is closed and not causing any further interruptions. For me, it is reproducible and maybe the same reason for you

MDP43140 commented 6 months ago

I have the same issue after starting a live-stream in browser app (but can be any other app as well)

Maybe the issue is more specific to GrapheneOS itself, if you experienced the same thing on another app, try to ask on GrapheneOS forum

github-actions[bot] commented 6 months ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

BHydden commented 5 months ago

I have the same issue after starting a live-stream in browser app (but can be any other app as well). Even after stop playing the stream, it buffers data every 5 seconds and thus using my audio (for whatever reason) so that any newpipe video is paused. After a phone-restart the browser and stream is closed and not causing any further interruptions. For me, it is reproducible and maybe the same reason for you

After further testing I think this is right. Newpipe seems to only and reliably pause every 5s or so if there is a paused stream in the background of another app, for me that is usually an audio stream in the browser. If I close the stream Newpipe works normally again, but it should probably be able to fully take control of the foreground regardless of what's in the background.

opusforlife2 commented 5 months ago

Reopening because someone might figure out a workaround.

But just to state this outright, the straightforward solution of insistently keeping, or trying to regain, audio focus will likely backfire when the interruptions are from a more important source, like incoming calls, or user-initiated playback on another app.

opusforlife2 commented 5 months ago

@BHydden Please update the issue description so that it contains the new info.

BHydden commented 5 months ago

Reopening because someone might figure out a workaround.

But just to state this outright, the straightforward solution of insistently keeping, or trying to regain, audio focus will likely backfire when the interruptions are from a more important source, like incoming calls, or user-initiated playback on another app.

I didn't consider the browser claiming authority. I guess it makes sense but I feel there should be a way to keep paused streams from interrupting foreground services šŸ¤” but if it can't I understand.