qrreader
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

QRReader

3rd party dependency: jsqr (https://github.com/cozmo/jsQR), size: 254Kb.

Usage

 
// import
import QRReader from 'QRReader';
 
// init
const qrCodeReader = new QRReader();
const videoElement = document.getElementById('video');
 
// start Capture
start() {
  qrCodeReader.startCapture(videoElement)
    .then(console.log)
    .catch(console.log);
}
 
// cancel Capture
onCancelClick() {
  qrCodeReader.stopCapture();
}

Package Sidebar

Install

npm i qrreader

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

12.9 kB

Total Files

9

Last publish

Collaborators

  • alexbabichev