Created attachment 461254 [details] A screencap demonstrating the bug If you have a MediaSession from and add-to-homescreen PWA that has been backgrounded and paused for 5sec, you cannot resume the audio. Steps to reproduce: 1. In iOS Safari, navigate to https://readtomyshoe.mrosenberg.pub 2. Click Share -> Add to Home Screen -> Add 3. Open the ReadToMyShoe app 4. Click the "+" button next to any article to add it to your queue (this might take a second because it has to download a few megabytes of audio) 5. Click the play button next to the article in the queue 6. Navigate away from the app, e.g., by going to home 7. From the Notification Center, pause playback 8. Wait 5 seconds, then click play The audio should fail to resume. Retrying play-pause does not help. I've attached a screencap of the bug. OS: iOS 15.6
<rdar://problem/97694963>
I have experienced similar issues including the similar case of the disappearing MediaSession controls (https://bugs.webkit.org/show_bug.cgi?id=243256) It's difficult to debug this, but the MediaSession widget reliability appears to improve when I remove other progressive web apps from my device. The "connection" to the source audio doesn't seem as flaky. The widget can still disappear after a while, but resumption feels more stable. It almost feels like when multiple PWAs are installed, the MediaSession widget tries to connect to the first installed PWA. If that PWA is not the one that triggered the MediaSession the connection will be lost, and it'll disappear or resumption will be broken.