Open armin-shareid opened 1 year ago
You need to also specify the facingMode on the getUserMedia API.
const constraints = { video: { facingMode: { ideal: "environment", }, },
I have tried adding the "environment" in Webcam component as well as in getUserMedia but it is not working on some android devices (Samsung mobiles). Still its opening wide angle camera instead of Normal
<Webcam
videoConstraints ={{
height:720,
width:1280,
facingMode: { ideal: "environment"},
aspectRatio:1
}}
/>
and in
.getUserMedia({ video: { facingMode: { ideal: "environment", }, })
When I use React-Webcam on Chrome with an Android device that has multiple rear-facing cameras, such as Samsung Galaxy S10, it's always the camera with the wide angle that opens when I specify the "facingMode: environment".
Is it possible to ensure that it is always the basic rear camera that opens regardless of the device used?