mirror of
https://github.com/yugasun/qrcode-decoder.git
synced 2026-08-13 04:31:36 +08:00
Updates
This commit is contained in:
+7
-1
@@ -31,7 +31,13 @@
|
|||||||
throw new Error('Canvas and getUserMedia are required');
|
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);
|
console.log('code', code);
|
||||||
result.innerText = 'Result: ' + code.data;
|
result.innerText = 'Result: ' + code.data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user