I am trying navigator.MediaDevices.getUserMedia() webrtc to switch the device camera during the call. This functionality is working fine on the desktop browser but on mozil
Webcam.set({
width: 490,
height: 450,
image_format: 'jpeg',
jpeg_quality: 90,
constraints: {
facingMode: {
exact: 'environment'
}
}
});
This code is working for all browsers.
constraints: {facingMode: { exact: 'environment' }}
Above line is responsible to open rear camera, set constraints : null to open front camera. you can also adjust this code by implementing "switch camera" button method