mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Web-Worker now working for live-streams. Passing config to worker
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
It works best if your camera has built-in auto-focus.
|
||||
</p>
|
||||
<div class="controls">
|
||||
<button class="stop">Stop</button>
|
||||
<fieldset class="reader-group">
|
||||
<label>Code128</label>
|
||||
<input type="radio" name="reader" value="code_128" checked />
|
||||
|
||||
@@ -20,9 +20,15 @@ $(function() {
|
||||
e.preventDefault();
|
||||
Quagga.setReaders([e.target.value + "_reader"]);
|
||||
});
|
||||
|
||||
$(".controls").on("click", "button.stop", function(e) {
|
||||
e.preventDefault();
|
||||
Quagga.stop();
|
||||
});
|
||||
},
|
||||
detachListeners : function() {
|
||||
$(".controls .reader-group").off("change", "input");
|
||||
$(".controls").off("click", "button.stop");
|
||||
},
|
||||
lastResult : null
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ $(function() {
|
||||
Quagga.init({
|
||||
inputStream: { name: "Test",
|
||||
type: "ImageStream",
|
||||
src: "/test/fixtures/" + App.config.reader + "/",
|
||||
src: "../test/fixtures/" + App.config.reader + "/",
|
||||
length: App.config.length
|
||||
},
|
||||
decoder : {
|
||||
|
||||
Reference in New Issue
Block a user