barquo
v0.0.7
Published
Library for reading and decoding barcodes
Downloads
4
Readme
Barquo
Library for decoding barcodes written in pure Typescript. Now supports only QRcode format, but work in progress. Support for Code128 coming soon.
Usage
Install
npm i -S barquo
Add html
<canvas></canvas>
<video autoplay></video>
<button type="button">Read</button>
Use scanner
import { StreamScanner, QrReader, WebCam } from 'barquo';
let canvas = document.querySelector('canvas');
let video = document.querySelector('video');
let button = document.querySelector('button');
let webcam = new WebCam(video);
let streamReader = new StreamScanner(canvas, webcam, new QrReader());
button.onclick = () => streamReader.scanStream().then(result => console.log(result));
Thanks
Thanks to cosmo's jsQR and ZXing project.