diff --git a/index.md b/index.md index 849e87e..f89d1d0 100644 --- a/index.md +++ b/index.md @@ -7,7 +7,7 @@ showInMenu: true quaggaJS ======== -- [Changelog](#changelog) (2015-11-22) +- [Changelog](#changelog) (2016-02-15) - [Installing](#installing) - [Getting Started](#gettingstarted) - [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 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 Quagga.init({ inputStream : { name : "Live", - type : "LiveStream" + type : "LiveStream", + target: document.querySelector('#yourElement') // Or '#yourElement' (optional) }, decoder : { readers : ["code_128_reader"] @@ -362,7 +368,8 @@ options within the `decoder` are for debugging/visualization purposes only. showPattern: false, readers: [ '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 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 `showPattern` are mostly of interest during debugging and visualization. @@ -407,6 +420,7 @@ The remaining properties `drawBoundingBox`, `showFrequency`, `drawScanline` and showBB: false } } +``` ## Examples @@ -536,6 +550,10 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``. ## Changelog +### 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 - Fixes