Skip to content

Commit 13d559f

Browse files
committedOct 10, 2024
patch for engineResourcePath for es6 and requirejs
1 parent 8ac4f87 commit 13d559f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
 

‎hello-world/es6.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ <h1>Hello World for ES6 (Decode via Camera)</h1>
3636
* LICENSE ALERT - THE END
3737
*/
3838

39-
CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
39+
CoreModule.engineResourcePaths = {
40+
std: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@1.4.10/dist/",
41+
dip: "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@2.4.20/dist/",
42+
core: "https://cdn.jsdelivr.net/npm/dynamsoft-core@3.4.20/dist/",
43+
license: "https://cdn.jsdelivr.net/npm/dynamsoft-license@3.4.20/dist/",
44+
cvr: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.4.20/dist/",
45+
dbr: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.4.20/dist/",
46+
dce: "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.1.0/dist/",
47+
};
4048

4149
// Optional. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding.
4250
CoreModule.loadWasm(["DBR"]);

‎hello-world/requirejs.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,15 @@ <h1>Hello World for RequireJS (Decode via Camera)</h1>
3939
* LICENSE ALERT - THE END
4040
*/
4141

42-
CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
42+
CoreModule.engineResourcePaths = {
43+
std: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@1.4.10/dist/",
44+
dip: "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@2.4.20/dist/",
45+
core: "https://cdn.jsdelivr.net/npm/dynamsoft-core@3.4.20/dist/",
46+
license: "https://cdn.jsdelivr.net/npm/dynamsoft-license@3.4.20/dist/",
47+
cvr: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.4.20/dist/",
48+
dbr: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.4.20/dist/",
49+
dce: "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.1.0/dist/",
50+
};
4351

4452
// Optional. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding.
4553
CoreModule.loadWasm(["DBR"]);

0 commit comments

Comments
 (0)