ZXing QR-code scanner to automatically choose the camera based on distance from objective

Discussão em 'Angular' iniciado por Lorenzo Bertolaccini, Fevereiro 6, 2025.

  1. HTML:

    <zxing-scanner
    [device]="selectedDevice"
    (scanSuccess)="onQrCodeScanComplete($event)"
    style="width: 100%; max-height: 50vh;">
    </zxing-scanner>


    I have this zxing scanner in my component for an angular project. I need it to automatically choose the proper camera based on how distant you are from the objective. This is because some people that have, for example, an iPhone 15 Pro have issues with the scanner not choosing the camera which focuses on really close distances. is there a way to constantly automatically choose the right camera (and not just at the beginning, just like the default camera app does, so adjust it while the camera is open) and store it in the selectedDevice variable?

    Continue reading...

Compartilhe esta Página