Update CodeScanner.svelte

Added preferred camera setting.
This commit is contained in:
Duarte Velez Grilo 2023-10-18 16:13:50 +01:00 committed by GitHub
parent 5e4821e6a5
commit ad3a80c629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
export let beepOnScan = false
export let beepFrequency = 2637
export let customFrequency = 1046
export let preferredCamera = "environment"
const dispatch = createEventDispatcher()
@ -20,7 +21,7 @@
let cameraEnabled
let cameraStarted = false
let html5QrCode
let cameraSetting = { facingMode: "environment" }
let cameraSetting = { facingMode: "{preferredCamera}" }
let cameraConfig = {
fps: 25,
qrbox: { width: 250, height: 250 },