Disable background play when picture in picture is disabled
Describe your suggested feature
When switching to home screen or another screen pause the video or add an option to disable background playing.
Other details
I disabled picture in picture mode because i want the video to stop playing when switching to a new app or home screen but even after disabling it the auido would still play in background.
Searched in settings but only found an option to pause video playing when screen is turned off.
Acknowledgements
- [x] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
- [X] I have written a short but informative title.
- [X] I will fill out all of the requested information in this form.
The only possible solution for that I'm aware of would be to pause the video when the activity gets destroyed. Negative side effect: It will also be paused when navigating to the settings, about or the community tab :/
The only possible solution for that I'm aware of would be to pause the video when the activity gets destroyed. Negative side effect: It will also be paused when navigating to the settings, about or the community tab :/
I have a suggestions (might sound dumb), can't you just add few bool values to make it possible? First one for picture in picture (ifPipEnabled bool), second for current app state (ifBackground bool).
So if PiP is enabled and app is in background proceed to show the pip player else pause video?
Well, unfortunately it's not that easy as Android has its own lifecycle ecosystem which makes it really hard to detect whether the app is active or not.
Side note: Forget what I wrote here previously, apparently I forgot about the easiest way to solve the issue when answering 😂
This feature is undesirable. I want music to play in the background, and I don't want picture-in-picture either.
I think a better approach is to use these 3 options and let the user select what works for them:
- Pause video when app is in background
- Use PiP when app is in background
- Use background playback without PiP
Ditto on @Svk1190's suggestion, but I find that background playback in LibreTube is spotty at best; usually it'll either stop loading the video or the process is killed entirely when it's playing in the background.
Well, you should always start the audio only/background mode explicitly when using the app in the background without PiP because Android's gonna kill it otherwise.
This doesn't seem good to me. Switching the app pauses the playback & there's no way to disable that.
Click on "Audio" then switch app for the audio to play in background.
It seems that no matter what the devs do it's never enough and there'll always be someone to nag and complain.
@Bnyro if you want to revert the change it's fine. I'll clone and build LT with this feature included (if this will make others stop crying)
It seems that no matter what the devs do it's never enough and there'll always be someone to nag and complain.
I don't really get their point though, when not using the background/audio only mode Android will stop the player within 5 minutes to save battery/resources, so continuing the video when PiP is disabled doesn't really make sense in my opinion.
It seems that no matter what the devs do it's never enough and there'll always be someone to nag and complain.
I don't really get their point though, when not using the background/audio only mode Android will stop the player within 5 minutes to save battery/resources, so continuing the video when PiP is disabled doesn't really make sense in my opinion.
Before you implemented this, if you had PiP disabled and switched to home or any other app, audio would continue playing in the background. Possible or not, they just want it back. (Probably they're businessmen who can't afford wasting 1-2 seconds to toggle audio only from the player)