@lowdefy/blocks-qr

4.1.0 • Public • Published

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

  1. Simple use of QRScanner
- id: qr_scanner
  type: QRScanner

To obtain the result from the scan use:

  _state: qr_scanner

Package Sidebar

Install

npm i @lowdefy/blocks-qr

Homepage

lowdefy.com

Weekly Downloads

106

Version

4.1.0

License

Apache-2.0

Unpacked Size

21.5 kB

Total Files

7

Last publish

Collaborators

  • samtolmay
  • gervwyk