[https://zxing-js.github.io/library/examples/multi-camera/]
surface
chrome
The Google browser console keeps outputting throw new NotFoundException()ï¼›
This situation causes memory to rise, so why must it throw an error message?
You can leave the error message to the user
This is due to a console.log in decodeRow()
a quick workaround is to free console continuously with
codeReader.decodeFromVideoDevice(null, 'webcam-preview', (result, err) => {
if (result) { /* do stuff */}
if (err) {
if (err instanceof ZXing.NotFoundException) {
console.clear()
}
/** treat others err here.... */
}
}
This isn't really the solution to the problem. As stated in issue #367 the RSSExpandedReader isn't quite ready yet. I am guessing you have the same issue I did, that hints were overwritten, and was solved here https://github.com/zxing-js/library/issues/367#issuecomment-723476412. Alternatively you can instead set hints to not include RSS Expanded format using the comment above. The documentation should be updated to reflect this. Lastly this seems as if it is a duplicate of #367, I suggest closing this issue and looking there :)
@Swiftwork Yes you are right. As you suggested, I use this code with only the supported formats as described, and all is working well
const formats = [
ZXing.BarcodeFormat.AZTEC,
ZXing.BarcodeFormat.CODABAR,
ZXing.BarcodeFormat.CODE_39,
ZXing.BarcodeFormat.CODE_128,
ZXing.BarcodeFormat.EAN_8,
ZXing.BarcodeFormat.EAN_13,
ZXing.BarcodeFormat.ITF,
ZXing.BarcodeFormat.PDF_417,
ZXing.BarcodeFormat.QR_CODE
]
const hints = new Map()
hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats)
codeReader = new ZXing.BrowserMultiFormatReader(hints)
So I think also this issue could be closed