I'm using react-zxing to scan barcodes on a web page.
I have two options for scanning the barcode,
- Use zxing library to scan barcode and
- Manually enter the barcode.
question:
- If I switch to "Manual Input Mode" and then switch back to "Scan Mode", the scan view disappears.
- If I switch to "Manual Input Mode" the camera does not turn off. (On my laptop, there is a camera light that lights up if the camera is in use)
Real-time code
You can see the live code: https://codesandbox.io/s/suspicious-jerry-1jr2xx?file=/src/App.js
Try to add paused in the options of
useZxing
. The camera will stop whenmanualInput
istrue
.