-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should enumerateDevices by default return an empty list? #646
Comments
My personal thought: |
enumerateDevices already returns an empty list for third-party iframes that do not have permission to access cameras/microphones. This is not false, it just means that the page is not granted access to more information. Rejecting might have bigger backward compatibility risk since navigator.mediaDevices.enumerateDevices() never rejects currently, this might be a good experiment but I don't think we should mandate that. |
As noted by @pes10k at #690 (comment)
One solution would be to not expose devices to websites at all. Devices can be exposed to users. The user can then select devices that the website cannot "see" in the form they are now, and grant website permission to generic "audio" or "video" device. A rough concept can take several forms. Consider a When E.g., before any calls to The website only gets "audio", "audioN", "video", "videoN" in the form of a set, "videoN" becomes "video" when "video" is detached, unplugged, permissions revoked, etc. The user gets the complete device names, etc. Or, further, complete device capabilities can be behind a flag; all the site gets is "audio" or "video" device.
|
If "privacy" and "tracking" are the primary concern, then backwards compatibility for site that are expecting media devices names need to adapt, as those are secondary concerns, not the other way around. Note, if the concept outlined above requires too much "new" work, then the existing implementations of fake media devices and fake media streams can be used, that is, set all devices to Fake and if Why would a website need
|
I tried this locally. This broke several major videoconferencing websites I tested (I can provide the names offline). Basically, if no camera is detected, these websites will not ask getUserMedia and/or will not provide UI to request access. This change is therefore currently not web-compatible as is. I propose we discuss this issue at next interim. My recommendation is to not pursue this particular mitigation. The specification allows to return a list of one camera and one microphone, even though there is no such devices. This mitigation can be implemented without any spec change and is probably more web compatible. |
@youennf Like i mentioned on other thread, I know there are several related topics at play here, so if I'm putting this comment in the wrong place, my apologies; happy to move wherever is best for the WG My understanding from other issues that the current plan is to pre-permission, not return an empty list, but to instead return one entry per type of device supported. So if my device has 2 cameras, one speaker, and a dozen microphones, the pre-permission returned value from If so, what would the labels be for those returned values? And what would the device ids be? |
@pes10k I think you'll get: [
{deviceId: "", grouId: "uuid1", kind: "audioinput", label: ""},
{deviceId: "", grouId: "uuid2", kind: "videoinput", label: ""},
{deviceId: "", grouId: "uuid3", kind: "audiooutput", label: ""}
] On the other hand with the in-chrome device selection proposal and
Why would an application call |
@q-alex-zhao Thank you! That output sounds good to me (setting aside the distinct issues i've raised regarding using uuids). Terrific!
You all and others in the group could say better than me, but i believe the former is just meant to be a (semi?) temporary bridget to the latter, no? |
WebRTC WG consensus at the interim is to keep current approach. |
Presented consensus is to continue returning booleans for cam/mic for web compat. Clarify UAs can mitigate by faking camera/mic presence. |
That would prevent all enumerateDevices fingerprinting for pages without camera/microphone permission.
The text was updated successfully, but these errors were encountered: