Open FynniX opened 3 years ago
First, remove any readers you're not using, they could cause false results to be returned.
Second, I'd guess it's possibly related to the camera device. High quality cameras that autofocus and are not wide-angle are most desireable. Unfortunately, there doesn't seem to be a way to control autofocus via getUserMedia() presently, nor any obvious way to detect wide-angle vs non. I've resorted to allowing the user to select which camera device is best and storing that selection, then using the deviceId constraint to select that every time.
What sort of hardware are you trying to use it with?
Quagga.init({ inputStream: { name: "Live", type: "LiveStream", target: document.querySelector('#scanner-container'), constraints: { width: 480, height: 320, facingMode: "environment" }, }, decoder: { readers: [ "code_128_reader", "ean_reader", "ean_8_reader", "code_39_reader", "code_39_vin_reader", "codabar_reader", "upc_reader", "upc_e_reader", "i2of5_reader" ], debug: { showCanvas: true, showPatches: true, showFoundPatches: true, showSkeleton: true, showLabels: true, showPatchLabels: true, showRemainingPatchLabels: true, boxFromPatches: { showTransformed: true, showTransformedBox: true, showBB: true } } }, }, function (err) { if (err) { console.log(err); return }
The code_128_reader doesnt work. I tested it with a barcode from a https://barcode.tec-it.com/de and with real ones. Any ideas?