[mediacapture-main] Should enumeration of microphones and cameras depend on device-kind-specific exposure checks? (#898)

karlt has just created a new issue for https://github.com/w3c/mediacapture-main:

== Should enumeration of microphones and cameras depend on device-kind-specific exposure checks? ==
https://github.com/w3c/mediacapture-main/pull/773 split "device information can be exposed" into "camera information can be exposed" and "microphone information can be exposed" and applied the new checks before initializing device-specific information when [creating a device info object](https://w3c.github.io/mediacapture-main/#creating-a-device-info-object).

`enumerateDevices()` still [uses](https://w3c.github.io/mediacapture-main/#ref-for-device-information-can-be-exposed-1) the weaker combined "device information can be exposed" check to determine whether or not to truncate both `microphoneList` and `cameraList` to their first items.

The effect is that, when only camera (not microphone) information can be exposed, for example, the set of device info objects produced by `enumerateDevices()` includes a list of (potentially several) identical mostly uninitialized audioinput device info objects, one for each microphone.

Such a list of unitialized device info objects contains information about the number of devices of that kind, but exposure of this information based on permission for another device kind is unexpected (to me at least).

Proposal: Use "camera information can be exposed" and "microphone information can be exposed" checks separately to determine whether to truncate each of `microphoneList` and `cameraList`.

[Consensus](https://github.com/w3c/mediacapture-main/issues/645) was to ["limit enumerateDevices to the type of devices being shared" "we will align with what Chromium implements which is more privacy sensitive"](https://www.w3.org/2020/10/20-webrtc-minutes.html#t04).

[Experiments](https://jan-ivar.github.io/dummy/enumerate.html) with Chrome 103 indicate that Chrome is using separate camera and microphone permissions for decisions of truncation of `microphoneList` and `cameraList`.


Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/898 using your GitHub account


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

Received on Thursday, 11 August 2022 22:14:29 UTC