Having a bit of trouble developing a web app that can capture images from the browser's back camera. The challenge lies in identifying which camera is the main one in a multi-camera setup.
The issue we're running into is that each manufacturer uses different naming conventions, and the order of cameras in the list doesn't necessarily indicate which one is the main camera with the highest resolution (i.e., not wide-angle, telephoto, periscope, etc.).
For example, when using this website: , on my device, the main camera could be labeled as either "camera 2 2" or "camera 2 0": https://i.stack.imgur.com/xg20U.png
Is there a way to programmatically locate the main camera using JavaScript? Or perhaps retrieve camera characteristics to dynamically select the correct one?