Skip to content

xr0master/qrScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor QR Code Scanner

QR Code Scanner for Meteor

This package uses the getUserMedia stream API to record webcam or front-facing mobile cameras, constantly scanning frames to read and decode QR codes. The entire package is client-side only.

By default, qr-scanner will use the 'environment facing' camera (the main camera for smartphones) and falls back to 'face facing'.

qr-scanner is made possible by jsqrcode.

Quickstart

Install with Meteor.

meteor add commerse:[email protected]

How use

Add to HTML

{{> qrScanner}}

Initialisation

Meteor.qrScanner.init(options);

Enable QR Code scanner

Meteor.qrScanner.scan();

Disable QR Code scanner

Meteor.qrScanner.stop();

Example

if (Meteor.isClient) {
	Meteor.startup(function() {
		Meteor.qrScanner.init({
			"width": 1280,
			"height": 720,
			"done": function(result) {
				console.log(result);
			},
			"fail": function(error) {
				console.error(error);
			}
		});
		document.getElementById('scan').addEventListener('click', function() {
			Meteor.qrScanner.scan();
		});
	});
}

About

Meteor QR Code Scanner without dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published