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

Playback stops when toggling battery saver #6189

Open
3 tasks done
flexagoon opened this issue Jun 28, 2024 · 10 comments
Open
3 tasks done

Playback stops when toggling battery saver #6189

flexagoon opened this issue Jun 28, 2024 · 10 comments
Labels
bug Something isn't working priority: low

Comments

@flexagoon
Copy link

Steps to reproduce

  1. Play any video
  2. While the video is playing, turn on the battery saving mode on your phone (or off if it's already on)

Expected behavior

The video should play without any interruptions

Actual behavior

The app fully reloads and video playback pauses

LibreTube version

0.23.2

Android version

Android 14

Other details

This is especially annoying since Android automatically pauses power saving mode when you connect the phone to a charger, so whenever I plug my phone in or out the app restarts.

Also, this is not related to automatic switching of light/dark mode, it happens even when the app is set to always be in light mode.

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@flexagoon flexagoon added the bug Something isn't working label Jun 28, 2024
@flexagoon
Copy link
Author

Related:

flutter/flutter#25626 (comment)

The fix Flutter used is to add uiMode to android:configChanges

Looking at the documentation for uiMode, it seems like it mostly indicates light/dark mode of the system. So the app restarts are due to the phone switching between light and dark mode, even if LibreTube itself is locked to a specific theme.

I guess the fix for LibreTube is to add uiMode to configChanges and handle the theme change appropriately within the app. If it isn't possible to change the theme without restarting the app for some reason, the change should at least be ignored if the app is set to always be in light mode.

@alejandro-alzate
Copy link

alejandro-alzate commented Jun 30, 2024

This also happens with bluetooth events, battery saving (same), and dark mode toggle.
I'll take a video and send it since with my keyboard i can pull the ui reload consistenly.
Edit: Also the app doesn't even need to be on the foreground
PS: I was passing by the repo to report 2 minor bugs that i have no clue how to trigger.
Bonus PSA: I forgot that my keyboard was connected and i was having a though time with the osk, having a comfy goddamm keyboard besides me.

@alejandro-alzate
Copy link

alejandro-alzate commented Jun 30, 2024

"Interface reload" (As you guys refer to it) showcase on my device being triggered by powering on and off my og samsung BT Keyboard: https://www.youtube.com/watch?v=FB109YiEpQ0

Now in that video was shown also a minor bug of a video duped on my watch feed, I AM CLUELESS of how to trigger it but it doesn't bother me and is not a groundbreaking bug.

coming up on breaking sht with alejandro* sometimes the phone lags hard (i mean is an og exynos) Chrashing libretube, the temp meter overlay (thermal monitor) and the live wallpaper
(i think i saw a video of how the linux kills random programs when it runs out of memory, that is kinda related) since also the system ui chrashes and so on.
The holy grail of IT engineering of just rebooting fixes the issue coming back to the recent task i have a lot of libretube instances, as just u was finishing that sentence the osk (on screen keyboard) closed out of the blue. now aligning my train of thoughts again, the dupes never are seen before the reboot but again i am completely clueless of how i trigger it here's the video for that if you guys wanna look it's just the aftermath after the reboot since i don't think that recording would be stable to do so in the lagged state but i'll try next time: https://www.youtube.com/watch?v=sChKPf8IBmM

I'm heading out change my bio to reflect that I'm a accidental efficient app tester since I'm consistenly breking software even if is not my intention.
Bye have a good one!

@Bnyro
Copy link
Member

Bnyro commented Jul 23, 2024

I don't think that's really easy to handle, most apps I've tested have similar behaviors and are being restarted whenever you change the theme mode.

I don't get why it restarts when a bluetooth keyboard is connected / disconnected as per your screen recording (did not test that myself), that shouldn't happen usually because the UI wouldn't need to be rerendered when a keyboard is connected ...

@alejandro-alzate
Copy link

I don't get why it restarts when a bluetooth keyboard is connected / disconnected as per your screen recording

My best guess is that the key listeners trigger that, now why is it that on full screen can't it be controlled like YT on the browser yet on not full screen does?

@Bnyro
Copy link
Member

Bnyro commented Jul 23, 2024

You're referring to LibreTube's keyboard shortcuts?

@alejandro-alzate
Copy link

You're referring to LibreTube's keyboard shortcuts?

I think so.
If is that i can use the arrow keys to seek on the video.

@Bnyro
Copy link
Member

Bnyro commented Jul 23, 2024

Idk, it should work as expected in any case.

@alejandro-alzate
Copy link

Idk, it should work as expected in any case.

Even on fullscreen?
There you go another bug; in my case does not work.
I'll attach a video.

@alejandro-alzate
Copy link

alejandro-alzate commented Jul 23, 2024

Here you go bud: https://www.youtube.com/watch?v=MOcKPRtpaNg
Now funnily enough yesterday i bought a otg cable for other things but I might also screw around to find out if it is consistent with usb keyboards as well and if they reload the ui and such...
If you want to tell me anything to try with Go ahead I'm wide open to suggestions.
Quick update: No otg device triggers it; I tested a mouse, a keyboard and a gamepad. which no one device triggered this bug

Another edit: A sony PS4 headset did trigger this bug, but ONLY when unplugged which throws over the window my theories of why it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: low
Projects
None yet
Development

No branches or pull requests

3 participants