- From: Jan-Ivar Bruaroey via GitHub <noreply@w3.org>
- Date: Fri, 17 Oct 2025 21:53:00 +0000
- To: public-webrtc@w3.org
jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-main: == Clarify what "system default" means == ### Definitions Mediacapture-main uses _"system default"_ without defining it. Does it mean _OS default_ or _UA default_? The spec [says](https://w3c.github.io/mediacapture-main/#dfn-same-permission): _"[User Agents](https://w3c.github.io/mediacapture-main/#dfn-user-agent) are encouraged to default to using the user's primary or system default device for kind (when possible)."_ If it meant _UA default_ it would make that sentence circular. Modern laptops have built-in _"primary"_ camera and a microphone; Several OSes have user-configurable system defaults in their System Settings UX for microphone and speakers = _OS default_. The spec exposes changes to these OS settings to websites through `enumerateDevices()` order and the `devicechange` [event](https://w3c.github.io/mediacapture-main/#dfn-device-change-notification-steps): - _"When new media input and/or output devices are made available to the [User Agent](https://w3c.github.io/mediacapture-main/#dfn-user-agent), or any available input and/or output device becomes unavailable, or the system default for input and/or output devices of a [MediaDeviceKind](https://w3c.github.io/mediacapture-main/#dom-mediadevicekind) changed, the [User Agent](https://w3c.github.io/mediacapture-main/#dfn-user-agent) MUST [...reorder enumeration list to put new system device first and fire a `devicechange` event]"_ Websites choose whether to present a "flat list" (respond to a user's device change actions from the OS level or the website's own UX equally), eliminating the need to present "virtual default" devices to users, or leave them in. While the spec likely meant to be vague here and not outright forbid UA defaults, consider how they can hurt webcompat in the current environment if the browser doesn't absorb the underlying complexity of having both UA and OS defaults, away from websites: ### Pragmatics Chrome now implements a picker in its permission UX, like Firefox has for many years. At Mozilla we welcome this, and expected this to improve webcompat in this area. Unfortunately, it behaves differently: - Firefox relies on websites to interrogate which devices gUM returned w/`track.getSettings().deviceId`, per [example 6](https://w3c.github.io/mediacapture-main/#example-6) in the spec. - Chrome instead promotes whatever devices the user chooses in its prompt to be its new _"UA default"_ (for that page?) This introduces webcompat differences: a change in default camera, and competing defaults (UA vs OS) for microphone. [Here](https://jan-ivar.github.io/dummy/enumerate2.html) is Chromee (top) and Firefox (bottom), with System Settings on the right (showing Airpods as current OS default mic): <img width="2804" height="1772" alt="Image" src="https://github.com/user-attachments/assets/d2a50596-9cb5-4bdb-9f36-c4df38fbb191" /> Firefox (bottom) follows spec here, listing OS default devices first, independent of the ones "(chosen)" by the user through gUM. Chrome (top) in contrast shows the "(chosen)" ones first, with "Default: Airpods" listed third. No `devicechange` is fired. ### Try changing default microphone in System Settings yourself In System Settings on the right, if you click to change the default mic, you'll see Firefox and Safari update their order to match, but not Chrome. Hoping to align behavior here. Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/1058 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 17 October 2025 21:53:01 UTC