Bug: Unplugging a camera in capturing breaks device enumeration

Copper Contributor

Camera device may not be removed from navigator.mediaDevices.enumerateDevices() after being unplugged. We tested several PCs with Windows 10 installed.

 

I modified a sample of WebRTC a bit, which could help reproduce this issue. Here is the sample code.

 

Steps to Reproduce:

1) Open the demo in Edge (build and run the web server first).

2) Select an external camera and approve the access.
3) After capturing started, unplug the camera.

 

Expected Result:

Unplugged camera device should be removed from enumerateDevices().

 

Actual Result:

Unplugged camera device is not removed from enumerateDevices().

 

It's not reproducible always, and possibility varies with different machines.

3 Replies
Can you also get the same thing to happen in Chrome?
Okay, it sounds like this may in fact be our bug, so I'll get somebody to look into it.