We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e31fa73 commit 6029fbbCopy full SHA for 6029fbb
1 file changed
hello-world/read-an-image.html
@@ -42,13 +42,15 @@ <h1>Hello World (Read an Image)</h1>
42
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
43
Dynamsoft.Core.CoreModule.loadWasm(["DBR"]);
44
45
- let pRouter;
46
const divResultContainer = document.querySelector(
47
"#div-result-container"
48
);
+
49
+ const pRouter = Dynamsoft.CVR.CaptureVisionRouter.createInstance();
50
51
document.querySelector("input").onchange = async () => {
52
try{
- const router = await (pRouter || pRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance());
53
+ const router = await pRouter;
54
// Decode selected image with 'ReadBarcodes_SpeedFirst' template.
55
const result = await router.capture(
56
this.files[0],
0 commit comments