From 3e3513f746a0a51083f8e3e2124756d1a980d1cc Mon Sep 17 00:00:00 2001 From: Marijn Besseling Date: Wed, 10 Sep 2025 21:22:27 +0200 Subject: js format --- Blog/Components/Pages/QRCodeScan.razor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Blog/Components/Pages/QRCodeScan.razor.js') 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) { if (a == null || b == null) return false; if (a.length !== b.length) return false; - for (var i = 0; i < a.length; ++i) { + for (let i = 0; i < a.length; ++i) { if (a[i] !== b[i]) return false; } return true; @@ -46,7 +46,7 @@ export function onLoad() { const initBarcodescan = (stream) => { writeInfo("Starting scanner..."); - var lastbarcodes = []; + let lastbarcodes = []; setInterval(() => { barcodeDetector .detect(stream) @@ -70,7 +70,7 @@ export function onLoad() { }, 1000); }; - var video = getById("video"); + const video = getById("video"); video.setAttribute("playsinline", ""); video.setAttribute("autoplay", ""); video.setAttribute("muted", ""); @@ -78,8 +78,8 @@ export function onLoad() { // video.style.height = "100%"; /* Setting up the constraint */ - var facingMode = "environment"; // Can be 'user' or 'environment' to access back or front camera (NEAT!) - var constraints = { + const facingMode = "environment"; // Can be 'user' or 'environment' to access back or front camera (NEAT!) + const constraints = { audio: false, video: { facingMode: facingMode, -- cgit v1.2.3