Skip to content

NotReadableError: Could not start video source #577

@JATT98

Description

@JATT98

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions