Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video sometimes restarts from beginning when backgrounding #7916

Closed
5 tasks done
bobdanek opened this issue Feb 20, 2022 · 8 comments · Fixed by #8020
Closed
5 tasks done

Video sometimes restarts from beginning when backgrounding #7916

bobdanek opened this issue Feb 20, 2022 · 8 comments · Fixed by #8020
Labels
bug Issue is related to a bug

Comments

@bobdanek
Copy link

bobdanek commented Feb 20, 2022

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.22.0

Steps to reproduce the bug

This is not the only way this is triggered, but it's how I've finally figured out how to reproduce the issue, though it does take a few attempts before it happens for me

  1. Play YouTube video in the app, be somewhere far from the beginning of the video
  2. Double-tap power button to bring up the camera (GrapheneOS' camera app)
  3. Listen to the audio to confirm that it's started from the beginning - if it hasn't, goto step 1 and try again
  4. Switch back to NewPipe and observe that your place in the video has been lost and that you're back at the beginning of the video

Expected behavior

Background audio of a video I'm watching with NewPipe picks up where the video+audio left off when it goes into the background after I switch to another app, and when I return to NewPipe, the video+audio picks up where the background audio left off

Actual behavior

Occasionally, when I switch to another app while watching a video in NewPipe, the audio restarts from the beginning of the video. And when I go back to the app, the video+audio picks up where that audio left off, at or close to the start of the video.

In other words, I lose my "place" in a video sometimes when switching apps.

Screenshots/Screen recordings

n/a

Logs

n/a

Affected Android/Custom ROM version

GrapheneOS 2022021721

Affected device model

Google Pixel 5

Additional information

"Minimize on app switch" is set to "Minimize to background player"

@bobdanek bobdanek added the bug Issue is related to a bug label Feb 20, 2022
@bobdanek

This comment was marked as outdated.

@bobdanek
Copy link
Author

issue also occurs in 0.22.0. I initially reported this for version 0.21.16, but edited the app version in the report so that it doesn't look like I lied when I checked the very first box about reproducing with the latest version. :P

@ImDeadGuy
Copy link

I've been encountering this for a few versions now, and think I finally found a fix!
My NewPipe's lost video position every time I switch from fullscreen to background or pop-up for a few good months.

v22.0 RC didn't do this, but updating the release from 21.16 to 22.0 still does it.

So I cleaned the app data, and behold, issue no longer happens.
I restored exported data + settings => issue comes back.
Cleaned data again => Issue solved.
Restored exported data but NOT settings => Issue stays fixed!

So I think this may have something to do with a legacy settings incompatibility, likely stored on the device for some builds now.

Hope this helps with both solving the issue locally and maybe debugging this issue at the source.
Thanks!

@mujibulhaquetanim
Copy link

video starts playing from the beginning, when I switch to pop-up player mode or Pop up player to full screen mode. This is kinda annoying 😕

@ghost
Copy link

ghost commented Feb 23, 2022

Had this happen but thought it was just me.
Been happening for months, hope this can get resolved.

@Seedthis
Copy link

Seedthis commented Feb 24, 2022

When the debug apks for the 0.22.0 release were provided, I did the same as ImDeadGuy and indeed, importing subscriptions without importing the settings worked. However, I can still trigger the bug in one scenario :

  • fresh install, nothing imported (settings or subscriptions)
  • pop-up player enabled
  • Play any video and enable the "auto-enqueuing" feature
  • A new video will automatically get added to the playing queue
  • Switch to another app so it triggers the pop-up player
  • Video restarts from the beginning

@ImDeadGuy
Copy link

Thanks for confirming, Seedthis. This is now a 100% repro for me:

  1. Play any video with the "Auto-enqueueing" toggle off (top-right in landscape mode)
  2. Press the Popup button => Video popup starts at the current timestamp correctly.
  3. Revert (maximize) to normal player
  4. Toggle Auto-enqueueing to on
  5. Press Popup button => Video popup starts at 0:0 timestamp

Toggling Auto-enqueue back to off does not fix it in the same session.
But it does if I force close and restart newpipe.
So it'd seem the auto-enqueue feature is the key here (and I did have that option on in the settings I did not restore 🤔 )

Bonus notes: the bug also happens when toggling Auto-enqueue Off->On->Off again without using the Popup feature when On.
Also, the bug happens both ways in the Popup switch (both Maximized -> Popup and Popup -> Maximized)

@mujibulhaquetanim
Copy link

It's not solved yet in new version, if I switch back to full screen from pop up video start playing from the beginning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants