zxing-js / browser

ZXing for JS's browser layer with decoding implementations for browser.
MIT License
219 stars 43 forks source link

Add flag / option to, in addition to picking the environment facing camera, pick the 'highest' resolution one #31

Open namello-zmtp opened 4 years ago

namello-zmtp commented 4 years ago

Is your feature request related to a problem? Please describe. On android, every damn user media stream is a separate camera (s10 +) instead of a combined access one.

Describe the solution you'd like Just the ability to allow zxing to take the environment camera, with some additional constraints that also make it pick the higher resolution back facing camera.

Describe alternatives you've considered Looking for devices ourselves. Easier if browser wrapper takes care of it.

Additional context What happens is on samsung phones, the back camera it picks has bad image recognition. Manually selecting the second on the demo page works way better. On iOS it virtually merges the cameras so the back array is one, high res stream.

odahcam commented 3 years ago

There are methods where you can provide the constraints object for the library to get the media device, provide the video device directly or even provide the video stream from anywhere. Does any of there would help you?