ember-scanner
v0.3.7
Published
QR code and barcode scanner for Ember.
Downloads
1,259
Maintainers
Readme
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 byonDevicesFound
orundefined
for automatic selection)onScanSuccess
: Reports scan results as object after valid code was scanned. Decoded message is intext
onScanError
: In case error occurs during scanningonDevicesFound
: Reports list of available devices/cameras as objects with fieldslabel
,deviceId
onDevicesError
: In case scan for devices fails
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.