Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Kapsiak committed Oct 17, 2024
1 parent 7bd4619 commit 93a916a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/routes/BarcodeScanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
async function getDevices() {
await navigator.mediaDevices.getUserMedia({video: true, audio: false});
let devices = await code_reader.listVideoInputDevices();
devices.sort((a,b) => b.label.includes("Back"));
no_cameras = devices.length === 0;
return devices;
}
Expand Down Expand Up @@ -103,16 +104,6 @@
}
onMount(() => {
promise = getDevices();
promise.then((vals) => {
all_devices = vals;
// if(vals.length>0){
// selected_device_id = vals[0].deviceId;
// }
onSelectDevice();
});
});
</script>

Expand Down

0 comments on commit 93a916a

Please sign in to comment.