cozmo / jsQR

A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
https://cozmo.github.io/jsQR/
Apache License 2.0
3.7k stars 607 forks source link

jsQR taking screenshot instead of video streaming, Unable to scan QR Code #110

Closed prsuman82 closed 5 years ago

prsuman82 commented 5 years ago

Hi, I have used the demo code. It is working fine in the demo site, but same code is not working when i imported into our application. It is only taking screenshot when i initiate the code.

Please let us know how to resolve this case

cozmo commented 5 years ago

As mentioned in the README jsQR is designed to have no webcam specific implementation details. Rather the API is designed to take in image data and output any QR codes found within. Handling reading image data from the webcam and passing it to jsQR is the responsibility of the consumer, and as such I can't provide much help here.

The demo site was meant to be a simple demo, so doesn't do any advanced image/video capture. I'm not sure exactly what you mean by "taking a screenshot" but if it's just playing one frame it's possible there's an error being thrown? I'd ensure no errors are in the console and otherwise start adding debugging statements or such to figure out what is causing the hang.

Closing this issue since it doesn't relate to a jsQR issue specifically, but feel free to comment/re-open if you disagree or have additional questions.