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.64k stars 602 forks source link

Not working on local network #167

Closed martijnhiemstra closed 4 years ago

martijnhiemstra commented 4 years ago

I am having a huge issue with getting this to work on my computer. I have tried everything. I can confirm that the camera works when I visit the online demo website however once I run it on my computer locally it doesn't work. No camera image. I have tried chrome and Firefox and both don't work. I have tried locally and over my internal network. It doesnt work. On a tablet and phone. The only place it works is over the Internet. What is going on??

cozmo commented 4 years ago

I'm not sure - this library is a QR code scanner, and has no logic for camera access. That said a quick google returns this https://stackoverflow.com/a/43736486, which makes it seem like maybe getUserMedia doesn't work when you're on http?

If you can confirm this is an issue with jsQR - aka not related to the webcam access, but rather to the call of this library, then feel free to clarify in the issue, however if you're just having trouble getting getUserMedia to work I'm unfortunately not going to be able to help much.

Perhaps get your webcam capturing to work and then add jsQR and see if you can isolate the issue from there?

Closing this issue until it's clear it's an issue with jsQR not the webcam capture.