In theory there shouldn’t be a problem using that library, but in practice I had significant trouble and was never able to get it to work. First, it appears their instructions are overly simplistic and make several assumptions about the user environment. It also appears they have hard coded paths in their library that are required to be fulfilled. Even changing these, I was not able to get more than a black screen for the video and it did not do QR detection. No errors were logged when I got this far, so without spending a lot more time I’m not sure what the issue would be.
qrScanner.hype.zip (26.4 KB)
Note you must export as “index” for this to work at all; I had to change the
WORKER_PATH variable in
qr-scanner.min.js to have this instead of their invalid path.
The easier route might be to use their code in an iframe instead of the context of a Hype document and communicate back to a Hype document via
postMessage, but even then it seems you’d need to do modifications to get this to work right.