-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
I'm using an Android tablet running this as a Flutter web app. I'm using Quagga like the example. The barcode.js code looks like this:
function detectBarcode(dataUrl, callback) {
Quagga.decodeSingle({
decoder: {
readers: [
"code_128_reader",
"ean_reader",
"ean_8_reader",
"code_39_reader",
"code_39_vin_reader",
"code_93_reader"
] // List of active readers
},
locate: true, // try to locate the barcode in the image
src: dataUrl // or 'data:image/jpg;base64,' + data
}, function (result) {
if (result && result.codeResult) {
console.log("result", result.codeResult.code);
callback(result.codeResult.code);
} else {
console.log("not detected");
}
});
}
After some research I thought maybe I could use the CamCodeScannerController.selectDevice() function to set it to the back camera. So I tried to use CamCodeScannerController.fetchDeviceList(), but that never completes when I call it (i.e. if I do await CamCodeScannerController.fetchDeviceList() it never gets past that line).
At this point I'm not even sure if I'm supposed to be setting the device in the Quagga code or in the CamCodeScannerController.
So to reiterate: The end goal is to get it to use the back camera instead of the front camera.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed