react-webcam
react-webcam copied to clipboard
Cant seem to run the example in a way that shows multiple cameras simultaneously.
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:
The code I am using
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.