PSA: Changes to enumerateDevices() in Chrome 86

Skip to first unread message

Jul 8, 2020, 9:49:57 AM7/8/20
to discuss-webrtc
Starting with Chrome 86, enumerateDevices() will expose device info only if a previous getUserMedia() call has successfully completed.
Prior to Chrome 86, enumerateDevices() exposed devices if the domain had permission to access devices (e.g., from a previous browsing session), even if no previous getUserMedia() call had been performed.
This change aligns Chrome with the Media Capture and Streams spec and with the other major browsers.

Guido Urdaneta

Jul 29, 2020, 3:51:41 AM7/29/20
to discuss-webrtc
This change is now enabled in the latest Chrome Canary (86.0.4216.0).

Dag-Inge Aas

Jul 29, 2020, 6:33:19 AM7/29/20
Just tested this on Confrere and Whereby in Canary.

This change breaks (unsurprisingly) showing a primer if the gUM permissions have never been granted (See examples at the bottom).

It breaks because services have so far been forced to check for the presence of labels in enumerateDevices to know if a primer is needed to explain the permission prompt to users in most browsers. This is quite a common UX so I suspect more services are affected by this also. 

I see that support for "camera" and "microphone" in the Permission API has been rolled out in Chrome (unsure of version), so to fix this, you can change your code to use the Permission API where available:

navigator.permissions.query({name:'camera'}).then(function(result) {
  if (result.state === 'granted') {
  } else if (result.state === 'prompt') {

See also



You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Dag-Inge Aas
CTO Confrere

Jul 31, 2020, 6:27:24 AM7/31/20
to discuss-webrtc

We have decided to postpone this change, since we have had reports that it breaks at least one currently supported use case without a reasonable workaround. 
The case is a web site that requests permission using getUserMedia(), the user grants permission, but gUM() fails due to another reason (e.g., NotReadableError because the default device could not be opened).
In this case (e.g., a default device that fails), it becomes difficult, if not impossible, to proceed using any other device using Chrome's permission model. More details at
Therefore, enumerateDevices() in Chrome 86 will continue to have the same behavior as in 85. 

Philipp Hancke

Aug 25, 2021, 5:50:38 AM8/25/21
please note (since I've just seen this on stackoverflow and not for the first time) that file:/// behaves a bit weird and will continue to restrict enumerateDevices after getUserMedia.
Don't use file:/// for anything important ;-)

Reply all
Reply to author
0 new messages