[Bug]: Iphone web app stutters then stops playing after a minute #1774

Closed
opened 2026-04-24 23:57:56 +02:00 by adam · 11 comments
Owner

Originally created by @twiclo on GitHub (Feb 27, 2024).

Filing this bug here rather than the app repo because I'm using the PWA added to the home screen rather than the app installed through the app store. Let me know if I need to move it.

Describe the issue

When playing a book then sleeping the phone audio will play for about a minute before stuttering then it will stop playing audio. When you unlock the phone the media isn't paused but the time progression isn't moving either. Hitting pause then play again resumes playback

Steps to reproduce the issue

  1. Go to audiobookshelf instance on iphon
  2. Click share > Add to home screen
  3. Open new icon on home screen
  4. Play book
  5. Sleep phone

Audiobookshelf version

v2.7.2

How are you running audiobookshelf?

Debian/PPA

Originally created by @twiclo on GitHub (Feb 27, 2024). Filing this bug here rather than the app repo because I'm using the PWA added to the home screen rather than the app installed through the app store. Let me know if I need to move it. ### Describe the issue When playing a book then sleeping the phone audio will play for about a minute before stuttering then it will stop playing audio. When you unlock the phone the media isn't paused but the time progression isn't moving either. Hitting pause then play again resumes playback ### Steps to reproduce the issue 1. Go to audiobookshelf instance on iphon 2. Click share > Add to home screen 3. Open new icon on home screen 4. Play book 5. Sleep phone ### Audiobookshelf version v2.7.2 ### How are you running audiobookshelf? Debian/PPA
adam added the bug label 2026-04-24 23:57:56 +02:00
adam closed this issue 2026-04-24 23:57:56 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 27, 2024):

What iOS version?

@advplyr commented on GitHub (Feb 27, 2024): What iOS version?
Author
Owner

@twiclo commented on GitHub (Feb 27, 2024):

17.3.1

@twiclo commented on GitHub (Feb 27, 2024): 17.3.1
Author
Owner

@advplyr commented on GitHub (Feb 27, 2024):

I'm not aware of anything we can do about this. This is not the case for me but I'm also not able to reproduce the other PWA issue reported #2655

It is just a basic HTML audio element and the PWA manifest has no settings for background audio that I'm aware of

@advplyr commented on GitHub (Feb 27, 2024): I'm not aware of anything we can do about this. This is not the case for me but I'm also not able to reproduce the other PWA issue reported #2655 It is just a basic HTML audio element and the PWA manifest has no settings for background audio that I'm aware of
Author
Owner

@twiclo commented on GitHub (Feb 28, 2024):

I just tried removing the bookmark and re-adding it and the issue persists. The icon did update when I did that though so that's nice. I can also confirm that it happens regardless of if the screen is slept or not.

@twiclo commented on GitHub (Feb 28, 2024): I just tried removing the bookmark and re-adding it and the issue persists. The icon did update when I did that though so that's nice. I can also confirm that it happens regardless of if the screen is slept or not.
Author
Owner

@advplyr commented on GitHub (Feb 28, 2024):

Now I'm confused about your original issue. Is your issue having to do with bookmarks?

What do you mean the icon updated? Which icon are you referring to?

I'm not sure what you mean with it happening regardless of it being asleep or not. Are you meaning just putting it in the background?

@advplyr commented on GitHub (Feb 28, 2024): Now I'm confused about your original issue. Is your issue having to do with bookmarks? What do you mean the icon updated? Which icon are you referring to? I'm not sure what you mean with it happening regardless of it being asleep or not. Are you meaning just putting it in the background?
Author
Owner

@twiclo commented on GitHub (Feb 28, 2024):

Is your issue having to do with bookmarks?

When you hit share > add to homescreen ios calls that a bookmark. If you were to hit delete on the home screen icon it says "Are you sure you want to delete this bookmark?".

What do you mean the icon updated? Which icon are you referring to?

Originally when I added the bookmark/pwa to the home screen it was an low res icon with a white border. Maybe the favicon. Not sure. When I deleted the "bookmark" and re-added it to my homescreen the icon looked more like a real app

Are you meaning just putting it in the background?

When I first opened the issue I thought the screen had to be off for the issue to arise but I tested it again without sleeping the phone and it still broke. You can play a file and leave the phone on and focused on the web app and it will still break. When I get a chance I'll steal the phone again and test if this happens just in safari when it's not launched through the home screen as a "bookmark"

Sorry for the confusion

EDIT - It also breaks when played through safari and not through the home screen bookmark/pwa thing

@twiclo commented on GitHub (Feb 28, 2024): >Is your issue having to do with bookmarks? When you hit share > add to homescreen ios calls that a bookmark. If you were to hit delete on the home screen icon it says "Are you sure you want to delete this bookmark?". > What do you mean the icon updated? Which icon are you referring to? Originally when I added the bookmark/pwa to the home screen it was an low res icon with a white border. Maybe the favicon. Not sure. When I deleted the "bookmark" and re-added it to my homescreen the icon looked more like a real app > Are you meaning just putting it in the background? When I first opened the issue I thought the screen had to be off for the issue to arise but I tested it again without sleeping the phone and it still broke. You can play a file and leave the phone on and focused on the web app and it will still break. When I get a chance I'll steal the phone again and test if this happens just in safari when it's not launched through the home screen as a "bookmark" Sorry for the confusion EDIT - It also breaks when played through safari and not through the home screen bookmark/pwa thing
Author
Owner

@twiclo commented on GitHub (Feb 28, 2024):

I just tested it with another book and am unable to reproduce it. The book I'm having an issue with is one big .m4b file. 207.61MB. The one that doesn't break is also one .m4b. It's 103MB. Let me know what I other info I can get you

@twiclo commented on GitHub (Feb 28, 2024): I just tested it with another book and am unable to reproduce it. The book I'm having an issue with is one big .m4b file. 207.61MB. The one that doesn't break is also one .m4b. It's 103MB. Let me know what I other info I can get you
Author
Owner

@advplyr commented on GitHub (Feb 28, 2024):

I see. Most likely the book that is breaking has to be transcoded because it can't be direct played. This is common if the audio file is not encoded properly. You can tell if the audiobook is being transcoded if you look at the server logs.

@advplyr commented on GitHub (Feb 28, 2024): I see. Most likely the book that is breaking has to be transcoded because it can't be direct played. This is common if the audio file is not encoded properly. You can tell if the audiobook is being transcoded if you look at the server logs.
Author
Owner

@twiclo commented on GitHub (Feb 28, 2024):

What do I need to look for in the logs to see that? Is there some ffmpeg command that tells me the encoding type? What type is preferable?

@twiclo commented on GitHub (Feb 28, 2024): What do I need to look for in the logs to see that? Is there some ffmpeg command that tells me the encoding type? What type is preferable?
Author
Owner

@advplyr commented on GitHub (Feb 28, 2024):

Yeah any ffmpeg log that shows up when you press play is transcoding to HLS. Otherwise we just serve the file directly and ffmpeg is not necessary

@advplyr commented on GitHub (Feb 28, 2024): Yeah any ffmpeg log that shows up when you press play is transcoding to HLS. Otherwise we just serve the file directly and ffmpeg is not necessary
Author
Owner

@advplyr commented on GitHub (May 20, 2024):

Is this issue still specific to that one m4b or have you found others?

@advplyr commented on GitHub (May 20, 2024): Is this issue still specific to that one m4b or have you found others?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1774