demo · v136

AudioContext interrupted

Press play to start a 220 Hz sine, then trigger a real or simulated interruption. Watch the state machine transition through running → interrupted → running.

Probing…
no context

A real interruption fires when the OS takes audio focus — a VoIP call, exclusive audio mode, lid close. Browsers without 136 do not emit this state at all.

state event log

the code

const ac = new AudioContext();

ac.addEventListener("statechange", () => {
  console.log(ac.state);
  // running | suspended | interrupted | closed
});

if (ac.state === "interrupted") {
  // Show a "tap to resume" affordance.
}

see also