Skip to content

istvank/qr-reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<qr-reader> Web Component

A QR Code Reader Web Component. A custom event makes it easy to get notified about new reads.

This repository was forked from https://github.com/educastellano/qr-reader. It is using the jsqrcode lib.

Feel free to send me any issues or pull requests!

Demo

Check our the Demo.

Compatibility

This is a highly experimental piece of software. To the best of my knowledge the QR reader only works on recent Chrome browsers (Desktop and Mobile on Android) and was tested with Chrome >= 48.0.

Usage

As simple as that:

<link rel="import" href="qr-reader.html">

<qr-reader autostart></qr-reader>

<script>
	var qrReader = document.querySelector('qr-reader');

	qrReader.addEventListener("qr-code-read", function(e) {
		alert(e.detail);
	});
</script>

Instead of defining the autostart attribute feel free to call qrReader.startScan() whenever your application is ready to scan.

License

MIT License

About

Web Component for reading QR codes

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.7%
  • HTML 1.3%