serratus/quaggaJS

Decoder not changing

Opened this issue · 6 comments

I tried using codabar_reader but it reset to code_128.
https://imgur.com/CxdYb8B

Even with hardcode the state to codabar it still use code_123
https://imgur.com/oCoEAVy

Could you maybe paste your whole config object?

state: {
            inputStream: {
				type : "LiveStream",
				target: document.querySelector('#target'),
                constraints: {
                    width: 480,
                    height: 640,
                    facingMode: "environment",
				},
            },
            locator: {
                patchSize: "medium",
                halfSample: true
            },
            numOfWorkers: 2,
            frequency: 10,
            decoder: {
                readers : ["code_128_reader", "codabar_reader"]
            },
			locate: true,
			multiple: false,
		},

looks like code_128_reader is there . . ?

If I remove code128 I still get code128 and not codabar

This will still use code128:

state: {
            inputStream: {
				type : "LiveStream",
				target: document.querySelector('#target'),
                constraints: {
                    width: 480,
                    height: 640,
                    facingMode: "environment",
				},
            },
            locator: {
                patchSize: "medium",
                halfSample: true
            },
            numOfWorkers: 2,
            frequency: 10,
            decoder: {
                readers : ["codabar_reader"]
            },
			locate: true,
			multiple: false,
		},

I really don't have any idea on that -- it clearly works for the demonstration, and lots of people's applications, since we're all using it on different types of barcodes. :-S

I modified the live_w_locator. Removing code adding my own and because of this I probably created a lot of bugs.

here is the full code: https://jsfiddle.net/m2cf01a6/