Primary eng (and PM) emails
gui...@chromium.org, hu...@chromium.org
Summary
Make the following SecureContext:
MediaDevices interface
mediaDevices attribute of the Navigator interface
getUserMedia method of the Navigator interface
MediaDeviceInfo interface
Motivation
getDisplayMedia() and the getUserMedia() variants in Chrome only work on secure origins. The other important function affected by this change is enumerateDevices(), which currently works on insecure contexts, but is only useful (for its intended purpose) in combination with getUserMedia() or setSinkId(), which require secure origins. We have observed that enumerateDevices() usage has spiked recently and we suspect that it is being used to track users. The change proposed in this intent would be a first (though not the only) mitigation to address this issue.
Since M47, usage of getUserMedia() on insecure origins produces a deprecation warning (see https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/2LXKVWYkOus/gT-ZamfwAKsJ). So does usage of getDisplayMedia() on insecure origins.
Interoperability and Compatibility Risk
With regards to getUserMedia() and getDisplayMedia(), the only risk is that it will fail differently on insecure origins. Instead of a rejected promise, users will get an error due to the function not existing.
With regards to enumerateDevices(), it will start failing for domains that use it on insecure origins. However, we believe that these usages are not legitimate since the data obtained from enumerateDevices() is useful only in combination with getUserMedia() (does not work on insecure origins) or setSinkId() (SecureContext according to spec and in practice requires a secure origin to get permission to use devices).
In terms of interoperability, Edge and Firefox support calling all these APIs on insecure contexts, but Firefox has agreed to restrict these APIs to secure origins, and Edge is moving to Chromium. On Safari, getUserMedia() works only on secure origins.
Edge: No known signals
Firefox: Positive signals
Safari: Supported
Alternative implementation suggestion for web developers
The recommendation is to use these APIs only on secure origins.
Usage information from UseCounter
We have no counters for usage of enumerateDevices() on insecure origins, but general usage has spiked recently. Prior to the spike, usage was around 0.06% including secure origins, which is the only use case we are interested in supporting. For reference, the counter for getUserMedia() in secure origins is also 0.06%, which supports the idea that the spike is due to attempts to use enumerateDevices() for tracking users.
As stated above, getUserMedia() on insecure origins does not work on Chrome since M47. Nevertheless, according to our counters, insecure usage is around 0.0005%.
We have no counters for getDisplayMedia() on insecure origins, but this is a new API with relatively low usage. The counter for all origins is around 0.00012%.
Entry on the feature dashboard
https://www.chromestatus.com/feature/4924861776396288
Requesting approval to remove too?
Yes. We are requesting removal as soon as possible.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/1ab8771b-09c3-49a3-9bbc-860d9b8f0315%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2BBuZxayY0Ysexnk4YJnFXTeRSS_%3DZFq76RUmkhpvJZYP90FbA%40mail.gmail.com.
Due to the more than half a decade long process of getting WebRTC + getUserMedia everywhere most sites that want to use getUserMedia are already using existence checks like navigator.mediaDevices && 'getUserMedia' in navigator.mediaDevices (hopefully; checking for navigator.webkitGetUserMedia is worse)Not doing such a check would for example already break in Chrome on iOS due to crbug.com/752458
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADxkKi%2Bk-sQs2tNY_xJQBvaD0K8h8GPtfboTke8UPkANxAxJrw%40mail.gmail.com.