ember-scanner

0.3.7 • Public • Published

Build Status npm version

ember-scanner

QR code and barcode scanner for Ember based on @zxing/library. (Demo)

Installation

ember install ember-scanner

Usage

<CodeScanner
  @onScanSuccess={{fn (mut this.result)}}
/>
 
Result: {{this.result.text}}

or

<CodeScanner
  @device={{this.camera}}
  @onScanSuccess={{fn this.onScanSuccess}}
  @onScanError={{fn this.onScanError}}
  @onDevicesFound={{fn this.onCamerasFound}}
  @onDevicesError={{fn this.onCamerasError}}
/>
  • device: Id of video-device (camera) to use for scanning (use one of the devices reported by onDevicesFound or undefined for automatic selection)
  • onScanSuccess: Reports scan results as object after valid code was scanned. Decoded message is in text
  • onScanError: In case error occurs during scanning
  • onDevicesFound: Reports list of available devices/cameras as objects with fields label, deviceId
  • onDevicesError: In case scan for devices fails

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

/ember-scanner/

    Package Sidebar

    Install

    npm i ember-scanner

    Weekly Downloads

    146

    Version

    0.3.7

    License

    MIT

    Unpacked Size

    9.19 kB

    Total Files

    13

    Last publish

    Collaborators

    • ttill