Re: [mediacapture-output] The first "audiooutput" `MediaDeviceInfo` returned from `enumerateDevices()` is not the default device when the default device is not exposed (#133)

System default = OS default. Firefox has a [bug](https://bugzil.la/1879204) where it doesn't update enumerateDevices when the OS default changes. We hope to fix this soon. Sorry for any confusion.

> There is no mandated permission model.

[setSinkId](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-setsinkid) says: _"If sinkId ... does not match any audio output device identified by the result that would be provided by [enumerateDevices](https://www.w3.org/TR/mediacapture-streams/#dom-mediadevices-enumeratedevices)(), reject p ..."_.

enumerateDevices's [exposure decision algorithm for devices other than camera and microphone](https://w3c.github.io/mediacapture-output/#dfn-explicitlygrantedaudiooutputdevices) says:

 4. If deviceInfo.[deviceId](https://www.w3.org/TR/mediacapture-streams/#dom-mediadeviceinfo-deviceid) is in [[[explicitlyGrantedAudioOutputDevices]]](https://w3c.github.io/mediacapture-output/#dfn-explicitlygrantedaudiooutputdevices), return true.
 5. If deviceInfo.[groupId](https://www.w3.org/TR/mediacapture-streams/#dom-mediadeviceinfo-groupid) is the same as the [groupId](https://www.w3.org/TR/mediacapture-streams/#def-mediadeviceinfo-groupId) of any microphone in microphoneList, return true.
 6. return false.

IOW, only deviceIds exposed in enumerateDevices() are valid inputs, and the only way to expose them there is through selectAudioOutput() or getUserMedia({audio: true}) for speakers with a microphone groupId.

I don't see any allowance for different behavior here.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/133#issuecomment-2311036902 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 26 August 2024 20:33:21 UTC