Skip to content

Commit

Permalink
Issue Swasth-Digital-Health-Foundation#575 refactor: added default ca…
Browse files Browse the repository at this point in the history
…mera option for qrcode.
  • Loading branch information
yashashkumar committed Nov 20, 2023
1 parent 0406aa5 commit db1ca94
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const Html5QrcodePlugin = (props: any) => {
try {
const config = createConfig(props);
const verbose = props.verbose === true;
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
const stream = await navigator.mediaDevices.getUserMedia({
video: {
facingMode: 'environment',
},
});
const scanner = new Html5QrcodeScanner(qrcodeRegionId, config, verbose);
scanner.render(props.qrCodeSuccessCallback, props.qrCodeErrorCallback);
setHtml5QrcodeScanner(scanner);
Expand Down

0 comments on commit db1ca94

Please sign in to comment.