Re: [mediacapture-main] Move enumerateDevices behind permission (#612)

enumerateDevices has a "device-info" permission (https://w3c.github.io/permissions/#dom-permissionname-device-info). This permission is granted when getUserMedia is granted. This permission controls exposure of device labels currently, not exposure of devices.

Safari goes a bit further by obfuscating most information about devices if 'device-info' is not granted: it obfuscates most devices. This is probably somehow similar to what Mozilla is experimenting and @guido is mentioning (empty device IDs).

Another approach would be to prompt in case enumerateDevices is called and "device-info" permission is not granted. This seems harder to deploy given how enumerateDevices is used currently. The prompt user message might be also more difficult to understand than the getUserMedia message.

The additional use case to consider is for a webpage to monitor whether there is any camera/microphone at all, and update its UI accordingly.
A website can get this information through getUserMedia which seems more appropriate than enumerateDevices from a privacy perspective. ondevicechange is currently also available for that purpose.

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/612#issuecomment-524770472 using your GitHub account

Received on Monday, 26 August 2019 08:28:00 UTC