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
-
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.
-
Music Lesson
The W3C explainer's canonical use case. Student sings to a local backing track on a video call with a teacher —
remote-onlyAEC keeps the music audible to the teacher while still suppressing call echo. -
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 actualgetSettings()read-back. -
Echo Mode Comparator
Three capture buttons — Browser AEC, System AEC, Disabled — each using a different
echoCancellationModevalue. Shows the actual track settings fromgetSettings(), an audio frequency visualizer, and latency notes. A use-case callout explains why music apps needdisabledorsystemwhile video calls wantbrowser.
why it shipped
In some scenarios the only acceptable echo cancellation option is removing all user system playout from the microphone, to ensure no privacy-sensitive playout (screen readers, system notifications, etc.) is captured.