Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
How to get rid of the delay when opening the camera?
1. Invoke loadWasm in advance
Dynamsoft.DBR.BarcodeReader.loadWasm();
2. Pre-open the camera in advance
Run the following code before calling createInstance
.
navigator.mediaDevices.getUserMedia({video: true}).then(mediaStream=>{
mediaStream.getTracks().forEach((track) => {
track.stop();
});
}, err=>{});
3. Skip Camera inspection(use default camera)
scanner.ifSkipCameraInspection = true;