rasmuslos / ShelfPlayer

Native Audiobookshelf player for iOS & iPadOS
Other
146 stars 15 forks source link

Playback stops when exiting app or locking phone #79

Closed kylegrieder closed 2 months ago

kylegrieder commented 2 months ago

App Version: 2.3.5 (202) Source of App: Purchased on iOS App Store Description: After getting logged into my audiobookshelf instance and starting playback of a book, if I navigate to another app or to my home screen, playback pauses. Same thing happens if I remain in the app and lock my phone. As soon as I return to the app, playback resumes. I had assumed that background playback was supported, like any other audio app. Is this a bug, or does the app not actually offer background playback at this time?

rasmuslos commented 2 months ago

It should. Did you terminate and reopen the app?

kylegrieder commented 2 months ago

Wow. I feel like a complete idiot. Not sure how I didn't think of this - I likely got stuck in an echo chamber in my head. Terminating the app and reopening it did indeed fix the issue. Thanks for the swift response!

rasmuslos commented 2 months ago

Great! My guess is that this is an iOS issue, because the AudioPlayer should update the audio session each time you start a new item, so there isn't really anything I can do about this.

kylegrieder commented 2 months ago

No worries. My phone has been having some weird issues lately. Apps taking forever to startup, or completely crashing. I even had springboard crash recently. Hardware reset usually fixes it, and I really don't want to have to do a full erase. Anyway, thanks again. Enjoying the app so far!

mchainey97 commented 2 months ago

Are you sure this isn't a bug with the application? It just happened to me for a second time over the last week. I use other audio apps, a mix a 1st party (Apple Music) and 3rd party (PocketCast, Audible) and I never had that issue with those.

rasmuslos commented 2 months ago

It may help to set the audio category more often, but I can't think of any reasons other than that. I will include this fix in the next release (2.3.6), maybe it will work.