我正在使用Angular框架开发一个webApp。我已将QuaggaJs条形码扫描仪用于我的模块之一。它在android chrome浏览器和webApp上都很好用。和iOS Safari浏览器。但是,当通过iOS Safari webApp打开它时,它崩溃并给出以下错误。
[Error] ERROR – Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'k.inputStream.type')
我希望有人知道这里的解决方法。
这是我的配置对象
{
numOfWorkers: 4,
locate: true,
inputStream: {
name: "Live",
type: "LiveStream",
target: this.barcode.nativeElement,
constraints: {
width: 640,
height: 480,
aspectRatio: { min: 1, max: 100 },
facingMode: "environment"
},
area: { // defines rectangle of the detection/localization area
top: "25%", // top offset
right: "0%", // right offset
left: "0%", // left offset
bottom: "25%" // bottom offset
},
singleChannel: false // true: only the red color-channel is read
},
frequency: 10,
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: {
drawBoundingBox: false,
showFrequency: false,
drawScanline: false,
showPattern: false
},
multiple: false
},
locator: {
halfSample: true,
patchSize: "medium", // x-small, small, medium, large, x-large
debug: {
showCanvas: false,
showPatches: false,
showFoundPatches: false,
showSkeleton: false,
showLabels: false,
showPatchLabels: false,
showRemainingPatchLabels: false,
boxFromPatches: {
showTransformed: false,
showTransformedBox: false,
showBB: false
}
}
},
debug: false,
}