ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

how to resolve barcode scanning front camera issue in android

Open prekshav opened this issue 3 years ago • 0 comments

Describe the bug It can not scan using the front camera(barcode scanner Code-128)

To Reproduce Steps to reproduce the behavior:

  1. <ion-item class="item-background-color" *ngIf="buttonClicked" appearance="fill"> <select matNativeControl matInput (change)="onDeviceSelectChange($event.target.value)"> <option value="" [selected]="!currentDevice">No Device Selected <option *ngFor="let device of availableDevices" [value]="device.deviceId" [selected]="currentDevice && device.deviceId === currentDevice.deviceId">{{device.label}}

    <zxing-scanner #scanner *ngIf="buttonClicked" (scanSuccess)="onCodeResult($event)" [torch]="torchEnabled" [(device)]="currentDevice" (camerasFound)="onCamerasFound($event)" (torchCompatible)="onTorchCompatible($event)" [formats]="allowedFormats" previewFitMode="cover" (permissionResponse)="onHasPermission($event)">

Expected behavior When selecting devices(front and back camera should be able to scan barcode). Current issue- I have finished testing with multiple phone camera but front camera is not allowed to scan.

Desktop (please complete the following information):

  • OS: [e.g. iOS] - Working
  • Browser [e.g. chrome, safari] - working
  • Version Angular 9 "@zxing/browser": "^0.1.1", "@zxing/library": "^0.17.1", "@zxing/ngx-scanner": "^3.0.0",

Smartphone (please complete the following information): Back camera working .. Need front camera scanning "@zxing/browser": "^0.1.1", "@zxing/library": "^0.17.1", "@zxing/ngx-scanner": "^3.0.0",

prekshav avatar Mar 09 '22 17:03 prekshav