|
|
@ -7,7 +7,7 @@ showInMenu: true
|
|
|
|
quaggaJS
|
|
|
|
quaggaJS
|
|
|
|
========
|
|
|
|
========
|
|
|
|
|
|
|
|
|
|
|
|
- [Changelog](#changelog) (2015-11-22)
|
|
|
|
- [Changelog](#changelog) (2016-02-15)
|
|
|
|
- [Installing](#installing)
|
|
|
|
- [Installing](#installing)
|
|
|
|
- [Getting Started](#gettingstarted)
|
|
|
|
- [Getting Started](#gettingstarted)
|
|
|
|
- [API](#api)
|
|
|
|
- [API](#api)
|
|
|
@ -125,11 +125,17 @@ may be the `inputStream.type` is set to `LiveStream`, but the browser does
|
|
|
|
not support this API, or simply if the user denies the permission to use the
|
|
|
|
not support this API, or simply if the user denies the permission to use the
|
|
|
|
camera.
|
|
|
|
camera.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you do not specify a target, QuaggaJS would look for an element that matches
|
|
|
|
|
|
|
|
the CSS selector `#interactive.viewport` (for backwards compatibility).
|
|
|
|
|
|
|
|
`target` can be a string (CSS selector matching one of your DOM node) or a DOM
|
|
|
|
|
|
|
|
node.
|
|
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
```javascript
|
|
|
|
Quagga.init({
|
|
|
|
Quagga.init({
|
|
|
|
inputStream : {
|
|
|
|
inputStream : {
|
|
|
|
name : "Live",
|
|
|
|
name : "Live",
|
|
|
|
type : "LiveStream"
|
|
|
|
type : "LiveStream",
|
|
|
|
|
|
|
|
target: document.querySelector('#yourElement') // Or '#yourElement' (optional)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
decoder : {
|
|
|
|
decoder : {
|
|
|
|
readers : ["code_128_reader"]
|
|
|
|
readers : ["code_128_reader"]
|
|
|
@ -362,7 +368,8 @@ options within the `decoder` are for debugging/visualization purposes only.
|
|
|
|
showPattern: false,
|
|
|
|
showPattern: false,
|
|
|
|
readers: [
|
|
|
|
readers: [
|
|
|
|
'code_128_reader'
|
|
|
|
'code_128_reader'
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
multiple: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
@ -385,6 +392,12 @@ more possible clashes, or false-positives. One should take care of the order
|
|
|
|
the readers are given, since some might return a value even though it is not
|
|
|
|
the readers are given, since some might return a value even though it is not
|
|
|
|
the correct type (EAN-13 vs. UPC-A).
|
|
|
|
the correct type (EAN-13 vs. UPC-A).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The `multiple` property tells the decoder if it should continue decoding after
|
|
|
|
|
|
|
|
finding a valid barcode. If multiple is set to `true`, the results will be
|
|
|
|
|
|
|
|
returned as an array of result objects. Each object in the array will have a
|
|
|
|
|
|
|
|
`box`, and may have a `codeResult` depending on the success of decoding the
|
|
|
|
|
|
|
|
individual box.
|
|
|
|
|
|
|
|
|
|
|
|
The remaining properties `drawBoundingBox`, `showFrequency`, `drawScanline` and
|
|
|
|
The remaining properties `drawBoundingBox`, `showFrequency`, `drawScanline` and
|
|
|
|
`showPattern` are mostly of interest during debugging and visualization.
|
|
|
|
`showPattern` are mostly of interest during debugging and visualization.
|
|
|
|
|
|
|
|
|
|
|
@ -407,6 +420,7 @@ The remaining properties `drawBoundingBox`, `showFrequency`, `drawScanline` and
|
|
|
|
showBB: false
|
|
|
|
showBB: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
|
|
|
@ -536,6 +550,10 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``.
|
|
|
|
|
|
|
|
|
|
|
|
## <a name="changelog">Changelog</a>
|
|
|
|
## <a name="changelog">Changelog</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 2016-02-15
|
|
|
|
|
|
|
|
Take a look at the release-notes ([0.9.0]
|
|
|
|
|
|
|
|
(https://github.com/serratus/quaggaJS/releases/tag/v0.9.0))
|
|
|
|
|
|
|
|
|
|
|
|
### 2015-11-22
|
|
|
|
### 2015-11-22
|
|
|
|
|
|
|
|
|
|
|
|
- Fixes
|
|
|
|
- Fixes
|
|
|
|