jwkent / AudioWebApp

An audio web app
2 stars 2 forks source link

iOS: System playback controls fail to un-pause tracks when app is not open #124

Closed JacksonKearl closed 1 month ago

JacksonKearl commented 2 months ago
  1. Start playback
  2. Turn off phone
  3. Open lock screen, pause using the "payback widget"
  4. Now, "Play"
  5. Bug: Track does not play
JacksonKearl commented 2 months ago

Hm, this only reproduces when the app is installed as a PWA. Seems to be a bug in the iOS PWA implementation – I cannot find any mention of this online.

jwkent commented 2 months ago

I have noticed some strangeness around this topic, but I'm not sure how to address it. It appears to be at the iOS level and not much the PWA has control over.

I will leave this issue open for a few weeks if you would like to investigate a possible fix, that would be most welcome.

JacksonKearl commented 1 month ago

I wonder if it's an issue of the DOM being deallocated, and whether using the JS Web Audio API might help.

JacksonKearl commented 1 month ago

@jwkent I was able to produce a fix, though it is a bit of a hack. However it's applied only when absolutely needed, and using the application on iOS PWA without it is very cumbersome.