Open ToKruAmApp opened 3 months ago
I think this is true for the majority of the configurable options. The scanBarcode()
method implementation uses options
to setup an object param = {...}
which is a similar object but with some default values applied. Here's a snippet:
const param = {
facingMode: options.cameraDirection === 1 ? 'environment' : 'user',
hasScannerButton: false,
scanButton: options.scanButton === undefined ? false : options.scanButton,
...
}
It looks like the only places param
's fields are used are:
Html5QrcodeConfig
when calling window.OSBarcodeWebScanner.start(...)
window.OSBarcodeWebScanner.start(...)
No other options have an effect on the execution of the method.
Calling the scanBarcode method with a hint to specify the type of barcode to be scanned doesn't seem to work. Calling
scanBarcode({ hint: 1 })
for example should only allow AZTEC codes but somehow QR codes still get detected.