goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.29k stars 2.21k forks source link

MYADV-8080: Hotfix for backgrounded/suspended IOS issue #1701

Closed Serhii7374 closed 6 months ago

Serhii7374 commented 6 months ago

Verified working on IOS 14/15/16 Doesn't fix core of the issue, which is - on IOS we end up in the 'suspending' state when backgrounding an app, but the logic for resuming the context while 'suspending' is based on a 30 second timer that may or may not get hit depending on how long you have it backgrounded for. Issue/Feature Issue was that after a certain amount of time after backgrounding the app and then coming back (~10-40 secs), audio would be forever muted.

Related Issues Solution Reproduction/Testing On IOS 14/15/16, background an app using Howler for 10/20/30/40/50 seconds, and then return to that app and observe if audio is working or not.

Breaking Changes This could break instances where the state is 'running' and we should not be resuming the context because the state is not interrupted, but I haven't seen this happen yet in testing.