0.0.1 • Published 4 years ago

scan_qr v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Installing Note: Chrome requires HTTPS when using the WebRTC API. Any pages using this library should be served over HTTPS.

NPM npm i scan_qr or yarn add scan_qr

Example

let scanner = new Qrscan.Scanner({ video: document.getElementById('preview') }); scanner.addListener('scan', function (content) { //Code Logic here .... console.log(content); }); Qrscan.Camera.getCameras() .then(function (cameras) { if (cameras.length > 0) { scanner.start(cameras0); } else { console.error('No cameras found.'); } }) .catch(function (e) { console.error(e); });