mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 05:31:37 +08:00
Explain target option for livestream
This commit is contained in:
@@ -120,11 +120,15 @@ 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"]
|
||||
|
||||
Reference in New Issue
Block a user