-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Playing music stutters when the app is in the background #39
Comments
Yeah, that's an issue with playing media in WebView. I couldn't reproduce it on my device, but it's definitely a thing. Long-term, we want to switch to a media player integrated into the OS. |
This exact issue started happening to me after my phone upgraded to Android 11 today. It was working flawlessly before when I was on Android 10. Device: OnePlus 8 Pro (IN2025) |
Same issue here with a Amazon Fire HD 10 tablet. Strange thing as a side note: as soon as I connect a bluetooth speaker to the tablet, no dropouts/stuttering sound happens. On other Android devices (MIUI 12) no issue at all. |
I have the same issues with Nokia 6.2. I have tested to disable the battery optimization but no help there. |
For now, the suggestion is to use another Jellyfin client that isn't in a web view. At some point music playback will be handled natively at which point these issues should disappear. I suggest either Gelli or Yatse for music playback. |
+1 for Gelli. The comment I made here applies to this issue as well, that's why I marked it as |
-1 for Gelli. It has track sorting issues and author has no time to fix it |
that and it keeps causing my whole Jellyfin server to crash: seems to happen when I'm driving which suggests if there's an unstable connection it just screws everything up. Might go back to emby for music for now until there's a usable android client. |
I have yet to see any issue reported for server crashes due to Gelli, so of course the problem isn't fixed yet. That being said, I only know of one other instance in two years of a client crashing the server (Kodi) and it was quickly resolved. Not only that, but obviously a client should never be able to crash the server, so if you opened an issue on the main repository with logs (it wouldn't be a Gelli issue because the server should never crash from clients) I'm sure it would be high priority. |
I'll see if I can reproduce it, the server didn't completely crash though, it was looping through some error and nothing could connect to it, but forgot what the error was. But I'll check this out tomorrow. |
Same issue pixel 3a Android 11 |
Just want to mention that Yatse doesn't support Jellyfin (audio)books, so yatse is not a good workaround for the stutter/crash problem if you want to listen to audiobooks. It doesn't attempt to look at "Book" media library type. |
Same problem here with OnePlus Nord and Android 11. |
Another music client has shown up recently called Finamp on Android and iOS. As usual, I would suggest Gelli, Yatse, or Finamp for anyone experiencing this issue on mobile. If anyone can think of another mobile app for Jellyfin I will add it to this list. |
Same here, Android 11 on Pixel 5. |
The standard web client seems (at first attempt) to be OK (I'm using Firefox) for those who don't want to pay or sideload. |
I did some more digging, and it seems to be an issue in chromium, which powers the Android WebView. We can possibly work around this if I understand some of the comments correctly, but I need to investigate further first. Still, the best solution would eventually be a fully native music player app. |
Same issue here on Android 11 but with Bromite Webview |
Can confirm that the issue is also present on my OP6. Jellyfin 2.3.2 installed from Google play store. My current workaround is opening a browser tab (Brave, chromium based) and let that play the music. |
I have this issue as well Also confirmed that playing music directly from firefox from my server works perfectly. I really hope this issue gets fixed soon, I love Jellyfin and don't want to go back to Emby :( |
Having the same issue. When the app is in the foreground and screen is on, music is clear. Anything else and it stutters. iPhone client seems to not have the same issue as far as I can tell. Like @dbarenholz above, opening a browser tab seems to work fine too. Happy to try out config changes and report back if anyone has suggestions. |
#222 (comment) says
I love FinAmp but it is not a full solution to this problem, as I can't get audio books into it. When I add my Audiobook library to FinAmp it won't show any albums. Artists do show for that Library but when selecting an artist it says And what is that fully native client being mentioned in the quote? |
Experiencing the same on Sony Xperia 1II . Using Gelli fixes the issue, but would still rather just use the Jellyfin app |
Hi, |
Yeah I use Gelli and Finamp to listen to music on Jellfin. They both work great with no issues. Plus they support playback reporting |
Does it support Android Auto? |
Felt pretty weird for me because it didn't occur on my ancient Nexus 5 running Lineage 16 or on my a bit less ancient SGS8 with /e/OS Android 9, but now I finally bought a shiny new current gen Fairphone 4 (/e/OS 1.2-r Android 11) with way more horsepower and it stutters like mad. |
I found a workaround a few months and forgot to write it here. Press play from the jellyfin app (to play the music you want) then pause the music. You then open the jellyfin app info (where you can choose to uninstall/force stop/select notifications/select permissions....) Note: I use Jellyfin 2.4.4 on Android 8.1.0/Oxygen 5.1.9 (OnePlus 6) and I don't know if the app info menu exists in later android versions. |
Issue has appeared for me after upgrade to Android 12 on Galaxy A11 with app version 2.4.4 |
VIDEO in the background works fine without stutters (Settings->Client Settings, set "Video player type" to integrated and enable "Background audio"). Jellyfin should use ExoPlayer for music too. |
Same issue here, with LineageOS 18.1 platina on a Xiaomi Mi 8 Lite with Jellyfin 2.4.4 |
Same issue on Chromecast google tv |
Interestingly I now have a Pixel 5 with Android 13 and the stutter disappeared which is good. But it will only play one track at a time, if you try and play an album it stops after one song. |
Jellyfin-Android 2.4.4 Can confirm, no more stutters when playing music in background on PixelOS 13. Seems this was resolved in Android 13. Can others confirm as well? |
LineageOS 19 / Android 12 is working fine |
Xperia 1II / Android 12 / Jellyfin 2.4.4, still experiencing the issue. This is with battery optimization off. |
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: |
To those who use jellyfin to listen to music: look for jellyfin music clients developed by third parties such as finamp. |
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 have to agree that what I'm facing is what Maxr1998 said, it seems be a problem with some kind of webview. |
Sony Xperia 1 I use this to stream my music while in the car. But, If I open JF in firefox I dont have a problem even when the screen closes. |
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") |
On my Galaxy S21 app stop playing music when she is in background. |
Samsung S23U, latest android. Same issue 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. |
I've been able to mitigate these problems by using Firefox instead of the app. |
I mainly switched to Finamp, it works fine |
If I could pay the developers to add this, I would |
目前测试jellyfin 10.10.1版本已经解决此问题,在安卓客户端后台播放音乐没有出现卡顿了,终于能愉快听歌了! |
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
The text was updated successfully, but these errors were encountered: