Skip to content

Fork of code-kotis/qr-code-scanner, modified to be easily consumed as an npm module.

License

Notifications You must be signed in to change notification settings

mpcarolin/qr-code-scanner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Reader

A library for scanning QR codes on the web using a web worker.

Most of this code is taken directly from code-kotis/qr-code-scanner. I have only made minor modifications to it, mainly to make it more easily consumed as a library.

Usage

import { QRReader } from 'qr-reader'

const element = document.getElementById('video') // could also be an <img> element. If you're using react, you can use refs for this

// initialize the qr reader and web worker
const reader = new QRReader(element)

// scan the element
reader.scan(result => {
  doSomethingWithQRText(result)
})

// terminate the web worker
reader.terminate()

Contributions

If you find a bug, please file an issue. PR's are most welcome ;)

MIT Licensed

About

Fork of code-kotis/qr-code-scanner, modified to be easily consumed as an npm module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%