The current Web Audio API lacks a mechanism for the User Agent (UA) to interrupt playback for scenarios such as exclusive audio access (VoIP) or when a laptop lid is closed. To address this, we propose adding an "interrupted" state to AudioContextState. This new state would allow the UA to pause playback in these scenarios and enable web applications to respond appropriately.
Currently, there is no way for the User Agent (UA) to interrupt a Web Audio API AudioContext playback on its own - i.e., the suspension must happen in response to a user action. There are scenarios where the UA must be able to interrupt audio playback on its own: - Interrupt an AudioContext when another application requires exclusive access to audio hardware; - Audio Session API (https://w3c.github.io/audio-session/) - "media-playback-while-not-visible" permission policy (https://chromestatus.com/feature/5082950457884672)
Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/AudioContextInterruptedState/explainer.md