I don't know
This commit is contained in:
@@ -121,7 +121,7 @@ var errorCallback = function(error: any) {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
function handle_start_qr_scanning() {
|
async function handle_start_qr_scanning() {
|
||||||
console.log('*** handle_start_qr_scanning() ***');
|
console.log('*** handle_start_qr_scanning() ***');
|
||||||
|
|
||||||
if (user_media_status == 'denied') {
|
if (user_media_status == 'denied') {
|
||||||
@@ -150,33 +150,37 @@ function handle_start_qr_scanning() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (html5_qr_code.getState() == Html5QrcodeScannerState.NOT_STARTED) {
|
if (html5_qr_code.getState() == Html5QrcodeScannerState.NOT_STARTED) {
|
||||||
// // console.log('Scanner is not started');
|
// console.log('Scanner is not started');
|
||||||
// } else {
|
|
||||||
// console.log('Scanner is already started');
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
html5_qr_code.start({ facingMode: qr_facing_mode }, qr_scan_cfg, handle_qr_scan_success, handle_qr_scan_error)
|
return await html5_qr_code.start({ facingMode: qr_facing_mode }, qr_scan_cfg, handle_qr_scan_success, handle_qr_scan_error)
|
||||||
.then((ignore: any) => {
|
.then((ignore: any) => {
|
||||||
console.log('Scanning has started');
|
console.log('Scanning has started');
|
||||||
scanning_status = 'scanning';
|
scanning_status = 'scanning';
|
||||||
|
|
||||||
// let subject = 'QR Scanning Started';
|
// let subject = 'QR Scanning Started';
|
||||||
// let message = ignore;
|
// let message = ignore;
|
||||||
// send_init_confirm_email(subject, message);
|
// send_init_confirm_email(subject, message);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log('There was an error while trying to start the QR scanner');
|
console.log('There was an error while trying to start the QR scanner');
|
||||||
scanning_status = 'start_error';
|
scanning_status = 'start_error';
|
||||||
|
|
||||||
|
let subject = 'QR Scanning Start Error';
|
||||||
|
let message = err;
|
||||||
|
send_init_confirm_email(subject, message);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log('Scanner is already started');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let subject = 'QR Scanning Start Error';
|
|
||||||
let message = err;
|
|
||||||
send_init_confirm_email(subject, message);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user