0.3.7 • Published 4 years ago

ember-scanner v0.3.7

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

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.