navigator.mediaDevices.enumerateDevices how to get currently connected/active devices

25 Views Asked by At

I have an external Sony camera connected to macbook. When i disconnect/detach the camera from the machine, both enumerateDevices and getUserMedia still list this camera in the list of connected devices.

Further, the "active" property of MediaStream for this camera is "true", and the stream's track is also "enabled" - which is obviously not correct since the camera is not connected anymore.

Is there there a way to find out if a webcam is actually physically connected to the machine or not.

I have a wild guess that this could be because of Sony's "Image Edge" software. But i have users reporting same issue with other cameras (camera disconnected, but app still defaulting to the disconnected device).

0

There are 0 best solutions below