demo · v141
Embedded Video Loop
A tutorial-recording app embeds a YouTube clip in the page being captured. Without restrictOwnAudio, the captured stream gets a feedback loop — the page's own video audio plays through the speakers, loops back as system audio in the capture, plays again, loops again. With restrictOwnAudio: true, the platform excludes this tab's own audio from the capture stream.
restrictOwnAudio: true is a hint — getSettings() tells you whether the platform honoured it.
embedded clip (the would-be feedback source — unmute to feel the difference under capture)
before capture without restrictOwnAudio
The captured stream includes everything the OS plays — including this very page's video element. Result: feedback loop on playback.
after capture with restrictOwnAudio
The page's own audio is excluded from the captured stream — clean recording even with the embed playing.
the call
const stream = await navigator.mediaDevices.getDisplayMedia({
video: { displaySurface: "monitor" },
audio: { restrictOwnAudio: true }, // ← new in 141
systemAudio: "include",
});
const settings = stream.getAudioTracks()[0]?.getSettings();
// settings.restrictOwnAudio === true if the platform honoured the hint
why this angle
The explainer's primary use case is tutorial recording (Loom, Tella, ScreenPal) and "recording your own browser tab". Any time the page being recorded plays audio of its own — embedded video tutorial, in-app sound effects, music apps demonstrating playback — the boolean systemAudio capture loops it back. restrictOwnAudio is the surgical answer: capture system audio for the helpful bits (other apps, background music if any) but strip out the page that's hosting the capture session.