mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Adds global setting to enable or disable webcam support for barcode scanning
This commit is contained in:
@ -70,7 +70,7 @@ function onBarcodeScanClicked(e) {
|
||||
}
|
||||
|
||||
function onCameraAvailable(hasCamera, options) {
|
||||
if ( hasCamera == true ) {
|
||||
if (hasCamera && global_settings.BARCODE_WEBCAM_SUPPORT) {
|
||||
// Camera is only acccessible if page is served over secure connection
|
||||
if ( window.isSecureContext == true ) {
|
||||
qrScanner = new QrScanner(document.getElementById('barcode_scan_video'), (result) => {
|
||||
|
Reference in New Issue
Block a user