(Go Back) Choose State To Move From
" != typeof console && "undefined" != typeof console.log && (console.log("QuaggaJS " + d.VERSION + " initialisation on " + window.location.href), d.initialized && console.log("QuaggaJS has already been initialized at this page. Only one QuaggaJS instance can be initialized at a time."))
}, d.initialized = !1, d.onDetected = function() {}, d.onProcessed = function() {}, d.onAccessDenied = function() {}, d.State = {
STOPPED: "stopped",
STARTING: "starting",
STARTED: "started",
PAUSED: "paused",
STOPPING: "stopping",
FAILED: "failed"
}, d.CameraAccess = {
BACK: "back",
FRONT: "front"
}, d.CameraSelection = {
AUTO: "auto",
MANUAL: "manual"
}, d.ResultCollector = function(a) {
var b = this;
b.resultQueue = [], b.consumers = [], b._onProcessed = function(a) {
b.resultQueue.push(a)
}, b.attachBackend = function(a) {
a.onProcessed = b._onProcessed
}, b.addResultConsumer = function(a) {
b.consumers.push(a)
}, b.process = function(a) {
if (b.resultQueue.length > 0) {
var c = b.resultQueue.shift();
b.consumers.forEach(function(b) {
b(c)
})
}
a && requestAnimationFrame(function() {
b.process(a)
})
}, b.reset = function() {
b.resultQueue = []
}, b.getResult = function() {
return b.resultQueue.shift()
}, b.getResults = function() {
return b.resultQueue.splice(0)
}, b.attachBackend(a)
}, d.DEFAULT_CONFIG = {
inputStream: {
type: "LiveStream",
constraints: {
width: {
min: 640
},
height: {
min: 480
},
aspectRatio: {
min: 1,
max: 100
},
facingMode: "environment"
},
target: null,
area: {
top: "0%",
right: "0%",
left: "0%",
bottom: "0%"
},
singleChannel: !1
},
numOfWorkers: 4,
frequency: 10,
decoder: {
readers: ["code_128_reader"]
},
locate: !0,
locator: {
halfSample: !0,
patchSize: "medium",
debug: {
showCanvas: !1,
showPatches: !1,
showFoundPatches: !1,
showSkeleton: !1,
showLabels: !1,
showPatchLabels: !1,
showRemainingPatchLabels: !1,
boxFromPatches: {
showTransformed: !1,
showTransformedBox: !1,
showBB: !1
}
}
},
src: null,
srcElement: null,
numOfWorkers: 4,
frequency: 10,
debug: {
drawBoundingBox: !1,
showFrequency: !1,
drawScanline: !0,
showPattern: !1,
showCanvas: !1,
showPatches: !1,
showFoundPatches: !1,
showSkeleton: !0,
showLabels: !1,
showPatchLabels: !1,
showRemainingPatchLabels: !1,
boxFromPatches: {
showTransformed: !1,
showTransformedBox: !1,
showBB: !1
}
}
}, d._inputStream = null, d._inputStreamAttributes = {
width: 640,
height: 480,
facing: "environment",
deviceId: null
}, d._state = d.State.STOPPED, d.initialized = !1, d.running = !1, d._activeWorkers = [], d._eventHandlers = {}, d._inputStream = null, d._framegrabber = null, d._stopped = !0, d._srcElement = null, d._cameraAccess = null, d._cameraStream = null, d._videoElement = null, d._canvasElement = null, d._overlayContext = null, d._config = null, d._decoderWorker = null, d._inputImageWrapper = null, d._inputImage = null, d._reader = null, d._legacyCanvas = null, d._legacyContext = null, d._fileInputElement = null, d._cameraAccess = null, d._fileReader = null, d._inputStream = null, d._stopped = !0, d._srcElement = null, d._cameraStream = null, d._videoElement = null, d._canvasElement = null, d._overlayContext = null, d._config = null, d._decoderWorker = null, d._inputImageWrapper = null, d._inputImage = null, d._reader = null, d._legacyCanvas = null, d._legacyContext = null, d._fileInputElement = null, d._cameraAccess = null, d._fileReader = null, d._resultCollector = null, d._onUIThread = function(a) {
var b = Array.prototype.slice.call(arguments, 1);
"function" == typeof a && setTimeout(function() {
a.apply(null, b)
}, 0)
}, d._onWorkerThread = function(a) {
var b = Array.prototype.slice.call(arguments, 1);
"function" == typeof a && a.apply(null, b)
}, d._onProcessed = function(a) {
d._onUIThread(d.onProcessed, a)
}, d._onDetected = function(a) {
d._onUIThread(d.onDetected, a)
}, d._onAccessDenied = function(a) {
d._onUIThread(d.onAccessDenied, a)
}, d._onNotSupported = function() {
console.log("QuaggaJS: " + arguments[0])
}, d._onFatalError = function() {
console.log("QuaggaJS: " + arguments[0])
}, d._onProcessed = function(a) {
d._onUIThread(d.onProcessed, a)
}, d._onDetected = function(a) {
d._onUIThread(d.onDetected, a)
}, d._onAccessDenied = function(a) {
d._onUIThread(d.onAccessDenied, a)
}, d._onNotSupported = function() {
console.log("QuaggaJS: " + arguments[0])
}, d._onFatalError = function() {
console.log("QuaggaJS: " + arguments[0])
}, d.onProcessed = function() {}, d.onDetected = function() {}, d.onAccessDenied = function() {}, d.onNotSupported = function() {}, d.onFatalError = function() {}, d.initialized = !1, d._eventHandlers = {
init: [],
processed: [],
started: [],
stopped: [],
inputStreamStarted: [],
inputStreamStopped: [],
accessDenied: [],
notSupported: [],
fatalError: []
}, d.on = function(a, b) {
d._eventHandlers[a] && d._eventHandlers[a].push(b)
}, d.trigger = function(a, b) {
d._eventHandlers[a] && d._eventHandlers[a].forEach(function(a) {
a(b)
})
}, d.off = function(a, b) {
d._eventHandlers[a] && (b ? d._eventHandlers[a].splice(d._eventHandlers[a].indexOf(b), 1) : d._eventHandlers[a] = [])
}, d.offAll = function() {
d._eventHandlers = {
init: [],
processed: [],
started: [],
stopped: [],
inputStreamStarted: [],
inputStreamStopped: [],
accessDenied: [],
notSupported: [],
fatalError: []
}
}, d.onProcessed = function() {}, d.onDetected = function() {}, d.onAccessDenied = function() {}, d.onNotSupported = function() {}, d.onFatalError = function() {}, d.initialized = !1, d._eventHandlers = {
init: [],
processed: [],
started: [],
stopped: [],
inputStreamStarted: [],
inputStreamStopped: [],
accessDenied: [],
notSupported: [],
fatalError: []
}, d.on = function(a, b) {
d._eventHandlers[a] && d._eventHandlers[a].push(b)
}, d.trigger = function(a, b) {
d._eventHandlers[a] && d._eventHandlers[a].forEach(function(a) {
a(b)
})
}, d.off = function(a, b) {
d._eventHandlers[a] && (b ? d._eventHandlers[a].splice(d._eventHandlers[a].indexOf(b), 1) : d._eventHandlers[a] = [])
}, d.offAll = function() {
d._eventHandlers = {
init: [],
processed: [],
started: [],
stopped: [],
inputStreamStarted: [],
inputStreamStopped: [],
accessDenied: [],
notSupported: [],
fatalError: []
}
}, d.CameraAccess = {
BACK: "back",
FRONT: "front"
}, d.CameraSelection = {
AUTO: "auto",
MANUAL: "manual"
}, d._accessByUI