react-webcam icon indicating copy to clipboard operation
react-webcam copied to clipboard

Cant seem to run the example in a way that shows multiple cameras simultaneously.

Open davesargrad opened this issue 10 months ago • 1 comments

I am using the sample code. I have no problem rendering either of the 2 cameras I have attached to my laptop.

The problem is the sample seems to suggest that I should be able to see the streams simultaneously. I can't. I can only see the one that chrome seems to be configured to as the "default". I have to switch a chrome setting selecting a camera to act as the default.

The chrome setting i have to touch:

Image

The code I am using

Image

davesargrad avatar Feb 28 '25 21:02 davesargrad

We run into similar issue. Adjusting the videoConstraints parameter helps on Google Chrome:

-<Webcam audio={false} videoConstraints={{ deviceId: device.deviceId }} />
+<Webcam audio={false} videoConstraints={{ deviceId: { exact: device.deviceId } }} />

I believe this should fix the demo example too.

ondrej-stanek-ozobot avatar Nov 06 '25 23:11 ondrej-stanek-ozobot