Jump to content

Emby won't play audio when screen is locked


RedBaron164
 Share

Recommended Posts

I'm running the Emby app on a Pixel XL running Android 8. If I have a music queue or playlist going it will play usually two songs and stop playing due to the screen locking. If I unlock the screen it will usually resume playing. It has the same behavior if I'm using bluetooth speakers or the headphone jack. Is there anyway to fix this so music will continue to play with the screen locked?

 

*Edit - I re-produced the issue yesterday and pulled logs off my phone and attached them here.

a4f1fa71-7334-44b7-ba5a-5f114648671c.log

Edited by RedBaron164
Link to comment
Share on other sites

  • 1 month later...

 

hi @wedgekc, we're looking into this, thanks. I know you said it happens even with the screen on, but i'm going to lock this and refer you here:

https://emby.media/c...creen-turns-off

 

because it is all connected. So please monitor that topic for updates. Thanks !

 

I did a quick search on the okhttp client and the error and the okhttp client seems to be the problem and it has been a problem for a while.  Is this the same issue that causes streaming to stop when switching networks (wifi to 4g)?

Link to comment
Share on other sites

We're looking into it, thanks. And no, I don't think it's related to okhttp as the audio player doesn't utilize that.

  • Like 1
Link to comment
Share on other sites

Unfortunately, the new app/player does not resolve the issue for me.  The stream still dies after a song or two.  The new player is transcoding my mp3s, too.

Link to comment
Share on other sites

  • 4 weeks later...
  • 7 months later...

I encountered this same problem on my Pixel XL running Android 9.  I happen to use a Sennheiser Momentum 2.0 Bluetooth headset, but the problem also occurs using the speakers and headphone jack, same as OP.  The only unusual thing is how this problem started after seemingly no change on my part.  I stream music from the app daily, until one day it wouldn't autoplay with the phone locked.

 

These things did not resolve the problem:

  • Restarted the app and rebooted (many times)
  • Uninstalled the app and reinstalled the latest stable version
  • Switched to the beta version
  • Gave the app permission to access storage
  • Enabled Unrestricted data usage  in Android's app settings menu
  • Turned off Battery Optimization in Android's app settings menu
  • Unpaired the headset and paired it back again
  • Turned on Smartlock to keep the phone unlocked while paired to my headset

This did resolve the problem:

  • Disable the Android lock screen entirely by removing my PIN

I consider this an acceptable work-around and the issue is resolved.

Link to comment
Share on other sites

Since one or two weeks, same issue here, can't remove the Pin (having some client certificates for WiFi). But it seems to happen also when the app is running in the background (just happen when I was writing the message here).

Link to comment
Share on other sites

So I was able to reproduce one bug... I don't know if it is linked to this issue:

Launch the emby app, play an album, and press back icon (in the Android navigation) until seeing the Android main screen, the music will stop, but you will still have an unresponsive "emby banner" in the notification bar: you can tap on anything like play, next, previous, or if you tap the banner it doesn't show the emby app.

 

Android ver:8.0.0

Model:lg v30+

Link to comment
Share on other sites

  • 2 weeks later...

I have the same problem since my phone update to Android 8.0.0, as long as the screen is not locked it plays music without issue, even if the Emby app is not on the screen but as soon as the screen locks it will play another one or two songs at most before it stops.

 

I then have to unlock the screen and open the app for it to start again, very frustrating when trying to listen to music in my car through an AUX connection (not bluetooth).

 

Before the Android 8.0.0 update it was working fine though.

 

I have tried the Always on Screen setting but that didn't work, can't seem to find any options on the phone to stop it going to sleep or to allow Emby to keep running in the background while the phone is asleep.

Edited by Joe Farmer
Link to comment
Share on other sites

Just to add; after the initial report of this issue, the problem was fixed in an Embryo release a few months ago (even on Android 8) before now returning as an issue.

 

I'm afraid I can't be more specific on dates as I didn't keep a track of when it started working as expected and when it broke again... In fact my only notification that it was broken was the resurrection of this thread

 

Sent from my LM-G710 using Tapatalk

Link to comment
Share on other sites

Just to add; after the initial report of this issue, the problem was fixed in an Embryo release a few months ago (even on Android 8) before now returning as an issue.

 

I'm afraid I can't be more specific on dates as I didn't keep a track of when it started working as expected and when it broke again... In fact my only notification that it was broken was the resurrection of this thread

 

Sent from my LM-G710 using Tapatalk

 

For me it definitely started after the Android 8.0.0 update a couple of weeks ago. Before that I had no problems with the Emby app on the Play Store which was only installed a few months ago.

Link to comment
Share on other sites

I have the same problem since update to android 8.0.0 / Samsung Experience-Version 9.0 on Galaxy S9+

 

Always changes and problems in main and very important features. It is really frustrating. I think it's not the fault of emby, Android seems to change security settings. but emby neets to react fast. 

Others players don't stop. It is not a new thing, that emby is very sensitive playing the next song since I use it. Hope that this will be solved soon (also in connection with gapless playing...)

Link to comment
Share on other sites

darkassassin07

I have the same problem on android 7.1.1

App 3.0.16

 

If emby is not the active app with the screen unlocked, playback pauses after a song or two.

Link to comment
Share on other sites

We are looking into it, thanks guys.

 

Hi Luke,

 

Not sure if this helps but I found when you go into App Permissions for the Emby app there is only one permission you can turn on/off which is Storage but setting that doesn't solve the problem.

 

What I did notice however is if you tap All Permissions it shows a number of permissions you can't turn on/off and one of those is 'Prevent phone from sleeping' which I assume is the problem in that the app does not prevent the phone from sleeping which stops playback. Hence why it takes a song or two, depending on the length of the song, for it to stop playing after the screen locks.

 

5bad6eabc3f83_Screenshot_20180928094602_

Edited by Joe Farmer
Link to comment
Share on other sites

Hallscottd@gmail.com

Started happening with me sometime in the past week. Note 9, Android 8.1.0, Emby for Android client Mobile 3.0.16, Server version 3.5.3.0, bluetooth speaker.  It was working fine last time I used it, a little over a week ago.  Now runs about 5-7 minutes then stops after completing the track.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...