demo · v137

Iframe Pause

An iframe with display: none or visibility: hidden can no longer keep its <audio> tag playing in the background. Start the looping tone inside the iframe, then hide it — playback halts. Show it again and it resumes from where it stopped.

probing…
iframe state: waiting…

the code

// Inside the iframe:
const ctx = new AudioContext();
// Start playback…

// In the parent, hiding the iframe now suspends the
// AudioContext on Chrome 137+:
document.getElementById("frame").style.display = "none";  // ctx.state → "suspended"

see also