decodeFromVideoDevice return previous scanned result when no barcode is being scanned
mageshk98 opened this issue · comments
Describe the bug
decodeFromVideoDevice
method returns the previously scanned barcode result and it never stops until I reset the scanner.
Code Reference
It's not the full code, hope this sufficient.
const [codeReader, setReader] = useState(
new BrowserMultiFormatReader(null, 2000)
);
async function startScanning() {
codeReader.decodeFromVideoDevice(undefined, "videoElement", (res, err) => {
if (res) {
const rawText = res.getText();
//handling res
}
if (err && !(err instanceof NotFoundException)) {
console.error(err);
}
});
}
Expected behavior
decodeFromVideoDevice callback should return currently scanned barcode result only not the previous one.
Desktop (please complete the following information):
- OS: iOS 12.3.1
- Browser chrome
- Version 106.0.5249.119 (Official Build) (x86_64)