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

qr-scanner-worker wont load if there is no internet connection

Open Stevke7 opened this issue 3 years ago • 3 comments

I have an issue on my project where app has offline functionality. And when I switch off Internet connection Qr-scanner wont work. Is there a solution for this ? Thanks in advance.

qrScanner fail

Stevke7 avatar Oct 26 '22 11:10 Stevke7

The QR scanner uses a separate worker file. This file is loaded only when the QR scanner starts and is what fails to load for you. You need to include this file into your offline cached file manifest.

sisou avatar Oct 27 '22 07:10 sisou

Not sure if this is the same problem, but I cloned the repo and opened index.html in a browser, hoping it would function just like an offline version of the https://nimiq.github.io/qr-scanner/demo/ static webpage. Unfortunately the video part doesn't seem to work (in fact, the browser doesn't request webcam access at all). Is this also because it's not using an HTTPS connection?

e-t-l avatar May 30 '24 07:05 e-t-l

@e-t-l the camera only works when the page is served under localhost. It won't work when you just double click the HTML file. You need to serve the repository root directory locally with a Webserver, then open the page through it.

sisou avatar May 30 '24 10:05 sisou