I got an android phone with 2 cameras, It has different resolutions at FRONT CAM and different resolutions at BACK CAM. I need to force the phone of using the BACK CAM which I achieve successfuly! The issue is, everytime I run the code, It get's only the resolutions available of FRONT CAM, and strangely access BACK CAM with the resolution got form FRONT CAM!
const hdConstraints = {
video: {
//Mobile device function
width: { min: 3260 }, //3264 is the width of FRONT CAM
facingMode: { exact: "environment" }
//PC device function
// width: { min: 1280 },
// facingMode: { exact: "user" }
}
}
The dimension width: { min: 3260 }
is from front cam, if I put any of BACK CAM resolutions into the width property, it just don't recognize it at all!
I could not find any code to force the width
of watching at BACK CAM's resolutions!