|
|
|
@ -360,6 +360,7 @@ function workerInterface(factory) {
|
|
|
|
|
var imageWrapper;
|
|
|
|
|
|
|
|
|
|
self.onmessage = function(e) {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
if (e.data.cmd === 'init') {
|
|
|
|
|
var config = e.data.config;
|
|
|
|
|
config.numOfWorkers = 0;
|
|
|
|
@ -375,6 +376,7 @@ function workerInterface(factory) {
|
|
|
|
|
} else if (e.data.cmd === 'setReaders') {
|
|
|
|
|
Quagga.setReaders(e.data.readers);
|
|
|
|
|
}
|
|
|
|
|
}, Quagga.getConfig().scanDelay || 0);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function onProcessed(result) {
|
|
|
|
@ -516,5 +518,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
ImageWrapper: ImageWrapper,
|
|
|
|
|
ImageDebug: ImageDebug,
|
|
|
|
|
ResultCollector: ResultCollector
|
|
|
|
|
ResultCollector: ResultCollector,
|
|
|
|
|
getConfig: function getConfig() {
|
|
|
|
|
return _config;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|