jellyfin / jellyfin-android

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
1.51k stars 245 forks source link

Playing music stutters when the app is in the background #39

Open Seil0 opened 4 years ago

Seil0 commented 4 years ago

When i'm paying a song with jellyfin open in the background the song start to stutter (sounds like the song stops for a few milliseconds). As soon as i bring jellyfin to the foreground the song continues to play without any issues. Changing between background and foreground always results in this behavior.

Device: Pixel 2 OS: Android 10 (QQ3A.200805.001) Jellyfin App: 2.0.0-rc2 Jellyfin Server: 10.6.2

foss- commented 1 year ago

If the issue indeed was fixed in Android 13, the fact it is reproducible with Android 12 would be very much expected.

Another data point: ArrowOS 13.1 Jellyfin-Android 2.5.3 no repro

libook commented 1 year ago

To those who use jellyfin to listen to music: look for jellyfin music clients developed by third parties such as finamp.

JHubi1 commented 1 year ago

Hi, so I had the same problem on my Pixel 6 with Android 14. I solved it by going into the app settings of Jellyfin and disabling the battery optimization. That worked for me.

libook commented 1 year ago

Hi, so I had the same problem on my Pixel 6 with Android 14. I solved it by going into the app settings of Jellyfin and disabling the battery optimization. That worked for me.

Doesn't work for me. I am using Samsung Galaxy S21. Disabled battery optimization and added Jellyfin to the whitelist of RAM cleaner. Even locked Jellyfin from the Multi-tasking List(yes, Samsung provided this function for preventing apps be killed). None of them worked.

I have to agree that what I'm facing is what Maxr1998 said, it seems be a problem with some kind of webview.

mm1ck commented 10 months ago

Sony Xperia 1 Android 11 JF app 2.6.0

I use this to stream my music while in the car. Once connected it streams great until I close the screen, then I get a stuttery mess. Tried making the background battery unoptimised for the app with no difference.

But, If I open JF in firefox I dont have a problem even when the screen closes.

unarj commented 9 months ago

I was able to work around this issue on an S21U by changing the media player to "External" and keeping the app in memory (bring up the recent app list, tap on the Jellyfin logo at the top of the app window, and selecting "Keep Open")

MaverickPOL commented 9 months ago

On my Galaxy S21 app stop playing music when she is in background. I try to add it to "do not kill list" but Jellyfin is not on list of apps there. Maby there is some problem with permisions?

geriko2000 commented 7 months ago

Samsung S23U, latest android. Same issue

Author, please, add ability to play music in integrated player. Video works well, but music..

Korvox commented 7 months ago

Author, please, add ability to play music in integrated player. Video works well, but music..

Its inappropriate to ask volunteers writing open source software for free to do work for you, for free. There are platforms to support bounties to fix issues like this where people who don't want to do it in their free time for their own sake can instead get paid to do such work that other people want done. As with all FOSS, you gotta either do it yourself or pay someone to do it, just sideline complaining about issues just drives people away from contributing in the first place. This bug has been around for 4 years so obviously nobody has yet decided its worth their personal time to fix this, largely because its a huge architectural problem with how webview apps on Android work and would actually take a ton of effort to correct. Thank you Jellyfin team for all the hard work you do to make such a valuable service free to me.

aman207 commented 7 months ago

I've been able to mitigate these problems by using Firefox instead of the app.

JHubi1 commented 7 months ago

I mainly switched to Finamp, it works fine

geriko2000 commented 7 months ago

Author, please, add ability to play music in integrated player. Video works well, but music..

Its inappropriate to ask volunteers writing open source software for free to do work for you, for free. There are platforms to support bounties to fix issues like this where people who don't want to do it in their free time for their own sake can instead get paid to do such work that other people want done. As with all FOSS, you gotta either do it yourself or pay someone to do it, just sideline complaining about issues just drives people away from contributing in the first place. This bug has been around for 4 years so obviously nobody has yet decided its worth their personal time to fix this, largely because its a huge architectural problem with how webview apps on Android work and would actually take a ton of effort to correct. Thank you Jellyfin team for all the hard work you do to make such a valuable service free to me.

If I could pay the developers to add this, I would