Skip to content
Snippets Groups Projects
Commit 19af09c9 authored by Rhys Nute's avatar Rhys Nute
Browse files

QR updates

parent 88c1fd5c
No related branches found
No related tags found
1 merge request!27Qr codes
......@@ -4,10 +4,10 @@
<head>
<meta charset="UTF-8">
<meta name="viewpoint" content="width-device-width, initial-scale=1.0">
<link rel="stylesheet" href="qrstyle.css">
<link rel="stylesheet" href="css/qrstyle.css">
<script src="https://unpkg.com/html5-qrcode"> </script>
<script src="scripts/qr-script.js"></script>
<title>QR Code</title>
<script th:src="@{https://unpkg.com/html5-qrcode}" type="text/javascript"></script>
<script th:src="@{scripts/qr-script.js}" class="domReady"></script>
</head>
<body>
......@@ -18,6 +18,5 @@
</div>
</div>
</div>
</body>
</html>
......@@ -14,13 +14,13 @@ function domReady(fn){
}
domReady(function (){
//if QR code found
function onQRSuccess(decodeText, decodeResult){
function onScanSuccess(decodeText, decodeResult){
alert("You have collected: " + decodeText, decodeResult);
}
let htmlscanner = new Html5QrcodeScanner(
let htmlscanner = new Html5QrcodeScanner(
"qr-code-reader",
{ fps: 10, qrbos: 250}
)
htmlscanner.render(onQRSuccess);
{ fps: 20, qrbos: 250}
);
htmlscanner.render(onScanSuccess);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment