v141 · webrtc

echoCancellationMode for getUserMedia()

Extends echoCancellation behavior of MediaTrackConstraints dictionary - former true/false - by values "all" and "remote-only". Allows the clients to modify echo cancellation behavior applied to audio tracks received from microphones, controlling how much of the user system playout (all, or only audio received from PeerConnections) is removed from the microp

concepts

  1. Echo Cancellation Mode

    echoCancellationMode lets sites pick remote-only, all, or none. Useful when you know the playback path (e.g. headphones) doesn't actually echo, freeing the AEC budget.

  2. Music Lesson

    The W3C explainer's canonical use case. Student sings to a local backing track on a video call with a teacher — remote-only AEC keeps the music audible to the teacher while still suppressing call echo.

  3. Accessibility & Privacy

    Screen-reader speech, system notifications, calendar alerts — the things you never want leaking from your mic to the call. The "all" mode is the privacy-critical hard cut. Four scenarios mapped to the recommended mode and the actual getSettings() read-back.

  4. Echo Mode Comparator

    Three capture buttons — Browser AEC, System AEC, Disabled — each using a different echoCancellationMode value. Shows the actual track settings from getSettings(), an audio frequency visualizer, and latency notes. A use-case callout explains why music apps need disabled or system while video calls want browser.

why it shipped

In some scenarios the only acceptable echo cancellation option is removing all user system playou​t from the microphone, to ensure no privacy-sensitive playout (screen readers, system notifications, etc.) is captured.

references