mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-25 22:18:38 +02:00
iOS , book autoplays, when opening the app after the phone is left for an extended period of time, controls in app doesn't show up #290
Reference in New Issue
Block a user
Originally created by @BionicAlice on GitHub (Sep 8, 2022).
Steps to reproduce
3.click the app icon.
Expected behaviour
Actual behaviour
Environment data
Audiobookshelf server is on docker
Audiobookshelf Version: server: 2.1.5 , IOS 0.9.58
iOS Issue
iOS Version: 16
iPhone model: Iphone XS Max
@BionicAlice commented on GitHub (Sep 8, 2022):
Should mention book is not and has not been downloaded only Direct play.
@BionicAlice commented on GitHub (Sep 8, 2022):
Just happened again. I am unsure if I paused my session or if a different app took over the sound. I then talked via viber for about 20-30 min. Did some work for about 20 min, talked on viber again for about 15 Right after that I clicked on the app icon for audiobookshelf it started auto playing what I was listening to before, without controls visible in the app. Still visible on lockscreen. Direct play as before.
@ronaldheft commented on GitHub (Sep 9, 2022):
Thanks for reporting this. I’ve seen this myself, but haven’t figured out the steps to reproduce it.
I caught some logging from the issue yesterday, that I’m planning to dig into.
@ronaldheft commented on GitHub (Sep 14, 2022):
I caught this bug and managed to pull the logs from it.
Looks like WebKit is crashing. Capacitor reloads WebKit, and during the reinitialization, triggers the playerRate to change, which causes the iOS player to resume playback. Normally this is not an issue during first startup, because the AudioPlayer is not initialized yet, but since the AudioPlayer is fully initialized and it's just WebKit that crashed, we end up with this weird state.
Now that I know the cause, I can work to resolve the issue. My end goal will be to ensure at any point WebKit is reloaded, the native player and the web player can get back in sync.