Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qrscan-es6

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrscan-es6

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Table of Contents

  • qrcode
  • start
  • stop

qrcode

QR Code Scanner

This is derived from html5-qrcode and in turn from jsqrcode which is in turn derived from zxing, with numberious community contributions.

This is a port to es6 with various fixes applied from the above projects, some of my own fixes, documentation, etc.

See example.html for very rough usage.

Installing

Run npm install --save qrscan-es6

Importing

Add this to your code: import qrscan from 'qrscan'

start

Starts scanning with the camera and create a video element to show. This is asynchronous, so do await qrcode.start to capture errors. what's being captured.

Parameters

  • args Object
    • args.mount Element The DOM element to place the video in.
    • args.scannedCallback function When a QR code is scanned this callback is called with the string.
    • args.debugInfoCallback function Called with various debug info.
    • args.debugBW boolean If true, add a canvas below the video that shows the captured data after being converted to black and white.

Returns Object A token you should store. The token is used to stop capture.

stop

Stop capture. This doesn't delete any generated DOM elements.

Parameters

  • token Object The token returned by start.

FAQs

Package last updated on 05 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc