Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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:qr-scanner@1.0.0

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

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages