summaryrefslogtreecommitdiff
path: root/Blog/Components/Pages/QRCodeScan.razor.js
diff options
context:
space:
mode:
Diffstat (limited to 'Blog/Components/Pages/QRCodeScan.razor.js')
-rw-r--r--Blog/Components/Pages/QRCodeScan.razor.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/Blog/Components/Pages/QRCodeScan.razor.js b/Blog/Components/Pages/QRCodeScan.razor.js
index bb80f37..2af9cee 100644
--- a/Blog/Components/Pages/QRCodeScan.razor.js
+++ b/Blog/Components/Pages/QRCodeScan.razor.js
@@ -10,7 +10,7 @@ function arraysEqual(a, b) {
10 if (a == null || b == null) return false; 10 if (a == null || b == null) return false;
11 if (a.length !== b.length) return false; 11 if (a.length !== b.length) return false;
12 12
13 for (var i = 0; i < a.length; ++i) { 13 for (let i = 0; i < a.length; ++i) {
14 if (a[i] !== b[i]) return false; 14 if (a[i] !== b[i]) return false;
15 } 15 }
16 return true; 16 return true;
@@ -46,7 +46,7 @@ export function onLoad() {
46 46
47 const initBarcodescan = (stream) => { 47 const initBarcodescan = (stream) => {
48 writeInfo("Starting scanner..."); 48 writeInfo("Starting scanner...");
49 var lastbarcodes = []; 49 let lastbarcodes = [];
50 setInterval(() => { 50 setInterval(() => {
51 barcodeDetector 51 barcodeDetector
52 .detect(stream) 52 .detect(stream)
@@ -70,7 +70,7 @@ export function onLoad() {
70 }, 1000); 70 }, 1000);
71 }; 71 };
72 72
73 var video = getById("video"); 73 const video = getById("video");
74 video.setAttribute("playsinline", ""); 74 video.setAttribute("playsinline", "");
75 video.setAttribute("autoplay", ""); 75 video.setAttribute("autoplay", "");
76 video.setAttribute("muted", ""); 76 video.setAttribute("muted", "");
@@ -78,8 +78,8 @@ export function onLoad() {
78 // video.style.height = "100%"; 78 // video.style.height = "100%";
79 79
80 /* Setting up the constraint */ 80 /* Setting up the constraint */
81 var facingMode = "environment"; // Can be 'user' or 'environment' to access back or front camera (NEAT!) 81 const facingMode = "environment"; // Can be 'user' or 'environment' to access back or front camera (NEAT!)
82 var constraints = { 82 const constraints = {
83 audio: false, 83 audio: false,
84 video: { 84 video: {
85 facingMode: facingMode, 85 facingMode: facingMode,