mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 05:31:37 +08:00
Update README.md
Added example to `Quagga.init(config)`
This commit is contained in:
@@ -48,8 +48,23 @@ Basically the library exposes the following API:
|
|||||||
|
|
||||||
### Quagga.init(config)
|
### Quagga.init(config)
|
||||||
|
|
||||||
This method initializes the library for a given configuration (see below) which also includes a callback function (`readyFunc`) which is called when Quagga is ready to start. The initialization process also requests for camera access if real-time
|
This method initializes the library for a given configuration (see below) which also includes a callback function (`readyFunc`) which is called when Quagga is ready to start. The initialization process also requests for camera access if real-time detection is configured.
|
||||||
detection is configured.
|
|
||||||
|
```javascript
|
||||||
|
Quagga.init({
|
||||||
|
inputStream : {
|
||||||
|
name : "Live",
|
||||||
|
type : "LiveStream"
|
||||||
|
},
|
||||||
|
decoder : {
|
||||||
|
readers : ["code_128_reader"]
|
||||||
|
},
|
||||||
|
readyFunc : function() {
|
||||||
|
console.log("Initialization finished. Ready to start");
|
||||||
|
Quagga.start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
### Quagga.start()
|
### Quagga.start()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user