- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Sat, 24 Aug 2024 00:03:20 +0000
- To: public-webrtc-logs@w3.org
The proposal in https://github.com/w3c/mediacapture-output/issues/133#issuecomment-1271122304 is a neutered entry _instead of_ the physical _"device that would not otherwise be exposed"_, and only when it is the OS default. E.g. if the user selectAudioOutputs their AirPods AND they're the current OS default (which is common after they put them on in macOS), then no other entry is added to enumerateDevices: ```js {label: "AirPods", deviceId: "234", ...} ``` If they then go to macOS's System Settings→Sounds and change the OS default to "MacBook Pro Speakers", you'll see: ```js {label: "System default audio output device", deviceId: "", ...} {label: "AirPods", deviceId: "234", ...} ``` If they then selectAudioOutput their MacBook Pro Speakers, you'll see: ```js {label: "MacBook Pro Speakers", deviceId: "123", ...} {label: "AirPods", deviceId: "234", ...} ``` @karlt is that right? This solves finding the default device in the spec: ```js const defSpkr = await mediaDevices.enumerateDevices() .find(d => d.kind == “audio-output”); ``` > Chromium's solution is to use "default" as device ID. Unfortunately, this poses a competing model for finding the default device: ```js const defSpkr = await mediaDevices.enumerateDevices(). .find(d => d.kind == “audio-output” && d.deviceId == "default"); ``` > There is little difference between using "default", "" or any other constant string. `setSinkId("")` is special and unsets the sinkId. What would adding a second special value accomplish? -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/133#issuecomment-2307940368 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 24 August 2024 00:03:21 UTC