fix: emulator audio throwing when resuming from background ios #390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-emulator-audio-throwing-when-resuming-from-background-ios"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
High level Details
Closes: #388
This is an attempt to better handle errors of the form
Unhandled Promise Rejection: InvalidStateError: Failed to start the audio devicecoming out of resuming the audio device.Today, the audio context can get into a broken state, where it transitions from
interrupted->runningeven though it's not playing audio. Additionally, there was a simpler case where it just threw attempting to resume the audio.The goal of this pr is to address both of the issues above by suspending the context, and then resuming hoping for a teardown and reconstruction of the audio pipeline.
Appears to work better with a timeout thus far.
References: