1.1.0 • Published 6 years ago

qrscan-es6 v1.1.0

Weekly downloads
65
License
-
Repository
github
Last release
6 years ago

Table of Contents

qrcode

QR Code Scanner

This is derived from html5-qrcode and in turn from jsqrcode which is in turn derived from zxing, with numberious community contributions.

This is a port to es6 with various fixes applied from the above projects, some of my own fixes, documentation, etc.

See example.html for very rough usage.

Installing

Run npm install --save qrscan-es6

Importing

Add this to your code: import qrscan from 'qrscan'

start

Starts scanning with the camera and create a video element to show. This is asynchronous, so do await qrcode.start to capture errors. what's being captured.

Parameters

  • args Object
    • args.mount Element The DOM element to place the video in.
    • args.scannedCallback function When a QR code is scanned this callback is called with the string.
    • args.debugInfoCallback function Called with various debug info.
    • args.debugBW boolean If true, add a canvas below the video that shows the captured data after being converted to black and white.

Returns Object A token you should store. The token is used to stop capture.

stop

Stop capture. This doesn't delete any generated DOM elements.

Parameters

  • token Object The token returned by start.
1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago