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.69k stars 607 forks source link

use qr code scanner on http #194

Closed mokhtarsoholi closed 3 years ago

mokhtarsoholi commented 3 years ago

hi i have problem with this project this project work well on https but on http camera not allowed how can i run it on the http

DrSnuggles commented 3 years ago

Hi, this is a browser security feature and nothing this or any other lib can bypass. Go get a certificate for free is the standard answer here. If you just want to play/test a bit you can also tweak your browser: chrome://flags/#unsafely-treat-insecure-origin-as-secure

cozmo commented 3 years ago

Yep, as I've clarified in many a GitHub issue, as well as in the readme, this library is a QR code scanner, and has no logic for camera access.

getUserMedia doesn't work on http, but jsQR does. That said, if you want to feed jsQR images from a webcam you'll need to figure out how to get an SSL cert. Best of luck and sorry I can't be of more help.