@lowdefy/blocks-qr
v4.4.0
Published
Lowdefy qr blocks.
Downloads
223
Readme
Lowdefy QR Blocks
This is a Lowdefy blocks wrapper for the HTML5 QR code & barcode reader.
See the HTML5 QR code docs for the scanner config.
When a code is scanned by the QR scanner, the value of the block is set to the decoded result from the scan. The value is an object, which has the following fields:
decodedText: string;
result: QrcodeResult;
Properties
fps: number
: Expected framerate of QR code scanning.qrbox: number | {width: number, height: number}
: The dimensions for the QR scanning area. If not set, the entire area of the video stream will be used by the scanner.aspectRatio: float
: The aspect ratio for the video.disableFlip: boolean
: Disable the ability to scan QR codes that have been flipped.formatsToSupport: List of Html5QrcodeSupportedFormats
: Limit the code formats that can be scanned. See Html5QrcodeSupportedFormats.inactiveByDefault: boolean
: Determines whether or not the scanner is started when it is mounted.style: cssObject
: A style object applied to the scanner element.
Events
onScan
: Trigger onScan actions when a qr code is scanned.
Methods
start
: Start the QR scanner.stop
: Stop the QR scanner.
Examples
- Simple use of QRScanner
- id: qr_scanner
type: QRScanner
To obtain the result from the scan use:
_state: qr_scanner