jellyfin-android icon indicating copy to clipboard operation
jellyfin-android copied to clipboard

Allow media playback when app loses focus

Open Darin755 opened this issue 2 years ago • 13 comments

Describe the feature you'd like

Currently when you open another app or go to your devices home screen the media stops playing. I can see how this could be useful to someone but for me its kind of annoying. I watch live TV and during the commercials I like to check emails but when I go to open my email app the playback halts. What would be nice is if playback continued so that I can multitask without interrupting playback.

Additional context

I know some may not want this behavior so it might be good to have a setting for it. Also the simplest way to implement this might be to use the Android Media controls so that playback can be controlled from the notifications menu.

Darin755 avatar Nov 12 '23 06:11 Darin755

@Darin755 Do you know if this ever worked? I am new to Jellyfin and researching on this issue. It seem there are open issues on this topic sinc 2019.

EDIT: I found #109, which suggested there are different options for the player to be used. I changed Jellyfin Settings -> Client Settings -> "Video player type" -> Integrated

Seems to work now.

baflo avatar Nov 14 '23 10:11 baflo

I don't have this issue.

Be sure that your Jellyfin app is allowed to run in the background and is not part of the battery optimizations in Android.

Strit avatar Nov 16 '23 11:11 Strit

Sadly, it doesn't work (any more?) :(

  • Jellyfin is set unrestricted in terms of battery optimization.
  • I don't think there's a special option to allow to run in background. Please correct me, if I'm wrong.
  • client video player is set to "integrated player"
  • "Allow playing videos in the background with audio-only" is turned on.

There seem to be only "video" options, but I only have this issue with audio tracks.

baflo avatar Nov 16 '23 14:11 baflo

I have a setting called "Allow background activity" under Android Settings -> Battery -> More Settings -> App Battery Management (my UI is not english, so it might be called something different) -> Jellyfin.

Strit avatar Nov 17 '23 09:11 Strit

@Darin755 Do you know if this ever worked? I am new to Jellyfin and researching on this issue. It seem there are open issues on this topic sinc 2019.

EDIT: I found #109, which suggested there are different options for the player to be used. I changed Jellyfin Settings -> Client Settings -> "Video player type" -> Integrated

Seems to work now.

Thanks! This worked on lineage os

Darin755 avatar Nov 17 '23 20:11 Darin755

I'm having this same issue with my music stopping when the app is not focused. Sometimes if I go back to the app it starts playing where it left off automatically, but other times it won't let me unpause the track and I have to close the app and reopen it. I attempted all of the above mentioned fixes and none of them worked for me. I'm using FinAmp for the time being until this issue gets fixed.

SpaceGameDev568 avatar Feb 21 '24 22:02 SpaceGameDev568

Same problem here. I tried all the suggestions above, but none help. When the app is not in focus, playback wil stop after ~10 seconds... Server version 10.8.13. Edit: only using Jellyfin in a browser (Firefox in my case) seems to improve background playback.

chielmi avatar Mar 09 '24 14:03 chielmi

For anyone having this issue, try the integrated player

Darin755 avatar Mar 09 '24 17:03 Darin755

Switching to the integrated player still only works for me if the app remains in focus. If the app remains in focus it will continue to play if the screen is off. Background playback (or example when I open a browser) stops after ~10 seconds.

chielmi avatar Mar 10 '24 10:03 chielmi

I'm having the same issue with music, which is what I mostly use Jellyfin for on my phone. v2.6.1 on Android 14 with background usage allowed.

pilot51 avatar May 01 '24 21:05 pilot51

I figured it out. Go to Settings/Apps/Jellyfin/App battery Usage. Make sure "allow background" is turned on. Then, tap "Allow background usage" and you'll get a new/hidden menu. It will say "optimized" and "unrestricted". Make sure you pick "unrestricted". That solved it for me.

slickdakine avatar Jul 30 '24 16:07 slickdakine

@slickdakine I think you're right! I've never been aware of this submenu... I changed the setting and now jellyfin indeed continues to play in the background! Thank you!

chielmi avatar Jul 30 '24 16:07 chielmi

Your welcome. I've been troubleshooting it on and off the past couple months since I had the issue. Nothing worked. Then last night I found that menu by accident. LOL!

slickdakine avatar Jul 30 '24 19:07 slickdakine