-
Notifications
You must be signed in to change notification settings - Fork 62
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
Polling enumerateDevices potentially being a fingerprint. #403
Comments
So I think this can be closed if we find a satisfactory solution to #402, and we specify that the devicechange event is always fired before enumerateDevices() returns new information, right? |
They do seem dependent, but I would leave this open until we have it covered. |
@alvestrand Not sure how long |
@jan-ivar on Chrome Linux, powerful machine with 1 camera -- around 5 ms. |
I don't think we should time-fuzz |
To facilitate the discussion, let's summarize how enumerateDevices() works based on current text.
It seems possible to mitigate the perf overhead if apps repeatedly polling enumerateDevices(). It won't give any different results anyway unless the deviechange event has been fired. One issue as @jan-ivar pointed out is that the [[storedDeviceList]] could be out of sync when a page didn't get deviechange event. The question is whether that is a reasonable compromise. Meanwhile, if issue #414 is resolved with a "MAY", the issue here can potentially be further mitigated in implementations. |
#414 is a misunderstanding IMHO (it is a MUST). |
I raise this separately from #402 (comment) where @foolip discovered this, as the problem is separate, and we may wish to solve one or the other or both (if possible).
This is the same problem as with the devicechange event, except not remedied by #333.
Polling enumerateDevices is also quite expensive, so we want to discourage people from polling it. One way to do that would be to remove any advantage over the devicechange event.
One way to solve this might be to put the same limitations on enumerateDevices as on the event (as I suggest in #402 (comment)), though at the risk of people not trusting enumerateDevices. We could go one step further and have getUserMedia adhere to the old list of devices as well, that way all behavior is in sync so to speak, although such an illusion would shatter quickly once a USB device is removed, and getUserMedia fails with NotFoundError, even though enumerateDevices insists there is a device on the system.
The text was updated successfully, but these errors were encountered: