qrscan-es6
v1.1.0
Published
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Readme
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
argsObjectargs.mountElement The DOM element to place the video in.args.scannedCallbackfunction When a QR code is scanned this callback is called with the string.args.debugInfoCallbackfunction Called with various debug info.args.debugBWboolean 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
tokenObject The token returned bystart.
