Contact emails
Explainer
Specification
Summary
This feature adds setDefaultSinkId() to MediaDevices, which enables the top-level frame to change the default audio output device used by its subframes.
Blink component
Motivation
Sites that embed third-party content they don't fully control would like the ability to influence which device audio gets routed for their entire page in response to a user stating they have a preferred device. To enable that, this proposal allows controlling
the default audio output device for the entire page, including subframes. In embedded web experiences, the top-level frame grants iframes access to system media devices like microphones, cameras and speakers. This is typically done through the permission policy
(
https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy)
in the iframe tag. However, this access comes with two key challenges: Independent choice: Each iframe independently chooses its own media device. The top-level frame cannot directly influence or view this selection due to browser security restrictions (cross-origin
boundary). Unsynchronized changes: When the top-level frame changes its media device, the iframes remain unaware unless they communicate using methods like postMessage. This lack of automatic synchronization can lead to inconsistencies and a disjointed user
experience. We’d like to propose a new API to set the default audio output device for the current top frame and all of its sub frames.
Initial public proposal
TAG review
None
TAG review status
Pending
Risks
Interoperability and Compatibility
None
Gecko: No signal
WebKit: No signal
Web developers: No signals
Other signals: We have partners interested in the API.
WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Debuggability
None
No
It will be tested in wpt
Flag name on chrome://flags
None
Finch feature name
None
Non-finch justification
None
Requires code in //chrome?
False
Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status