mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 08:23:35 +00:00
updated modal and full scan camera
This commit is contained in:
1 parent
204fc46c48
commit
1b285ff53f
2 files changed
+26
-10
No files matched your search
@@ -111,7 +111,7 @@ export function useQRCode(): UseQRCodeReturn {
|
||||
|
||||
// Use the rear camera by default, or first available
|
||||
const cameraId = devices.length > 1
|
||||
? devices.find(d => d.label.toLowerCase().includes('back') || d.label.toLowerCase().includes('rear') || d.label.toLowerCase().includes('environment'))?.id || devices[0].id
|
||||
? devices.find(d => d.label.toLowerCase().includes('back') || d.label.toLowerCase().includes('rear'))?.id || devices[0].id
|
||||
: devices[0].id;
|
||||
|
||||
// Initialize scanner
|
||||
@@ -122,8 +122,7 @@ export function useQRCode(): UseQRCodeReturn {
|
||||
await scanner.start(
|
||||
cameraId,
|
||||
{
|
||||
fps: 10,
|
||||
qrbox: { width: 250, height: 250 },
|
||||
fps: 10
|
||||
},
|
||||
(decodedText) => {
|
||||
const result = classifyQRCode(decodedText);
|
||||
|
||||
Reference in new issue
Block a user