Web-Worker now working for live-streams. Passing config to worker

This commit is contained in:
Christoph Oberhofer
2015-01-18 11:56:34 +01:00
parent 72940990d3
commit 63993dfa8c
9 changed files with 60 additions and 70 deletions
+1
View File
@@ -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 />
+6
View File
@@ -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
};
+1 -1
View File
@@ -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 : {