mirror of
https://github.com/yugasun/qrcode-decoder.git
synced 2026-08-12 20:27:56 +08:00
fix: support customize camera size
This commit is contained in:
+7
-1
@@ -31,7 +31,13 @@
|
||||
throw new Error('Canvas and getUserMedia are required');
|
||||
}
|
||||
|
||||
let code = await qr.decodeFromCamera(video);
|
||||
let code = await qr.decodeFromCamera(video,
|
||||
// you can customize your camera size like below
|
||||
// {
|
||||
// width: 400,
|
||||
// height: 400,
|
||||
// }
|
||||
);
|
||||
console.log('code', code);
|
||||
result.innerText = 'Result: ' + code.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user