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

NotReadableError: Could not start video source

Open JATT98 opened this issue 1 year ago • 2 comments

Create a project for Angular 11 with the following dependencies:

"@zxing/browser": "^0.1.5", 
"@zxing/library": "0.14.2", 
"@zxing/ngx-scanner": "1.7. 2", 

and setting up the scanner in a very simple way

<zxing-scanner class="col-12" 
  [enable]="true" 
  (scanSuccess)="handleQrCode($event)"> 
</zxing-scanner> 

Angular CLI: 11.2.19 Node: 16.14.2 OS: win32 x64 Angular: 11.2.14

On this device (mine) it works fine, the scanner starts and can read my codes, however, on a secondary dvice where we had to install NVM to downgrade the Node version to the one I have and after using npx ng serve, the scanner does not work and in the console we get the following error: image

I tried to copy the code from these projects where my camera is detected on the second device, however, it still doesn't work and the error is the same: https://stackblitz.com/edit/zxing-ngx-scanner?file=projects%2Fzxing-scanner-demo%2Fsrc%2Fapp%2Fapp.component.html https://stackblitz.com/edit/zxing-ngx-scanner-sw2r9h?file=projects%2Fzxing-scanner-demo%2Fsrc%2Fapp%2Fapp.component.html

JATT98 avatar Oct 25 '24 21:10 JATT98