Skip to content

Commit 8f3b895

Browse files
committed
preload dbr.wasm
1 parent 732b5c2 commit 8f3b895

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

hello-world/es6.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ <h1>Hello World for ES6 (Decode via Camera)</h1>
6666
* LICENSE ALERT - THE END
6767
*/
6868

69+
Dynamsoft.Core.CoreModule.loadWasm(["DBR"]);
70+
6971
CoreModule.engineResourcePaths = {
7072
std: "https://cdn.jsdelivr.net/npm/[email protected]/dist/",
7173
dip: "https://cdn.jsdelivr.net/npm/[email protected]/dist/",

hello-world/hello-world.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ <h1>Hello World (Decode via Camera)</h1>
3737
}
3838
</script>
3939
<script>
40+
Object.assign(Dynamsoft.Core.CoreModule.engineResourcePaths, {
41+
std: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/',
42+
dip: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/',
43+
});
4044
/** LICENSE ALERT - README
4145
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
4246
*/
@@ -52,6 +56,8 @@ <h1>Hello World (Decode via Camera)</h1>
5256
* LICENSE ALERT - THE END
5357
*/
5458

59+
Dynamsoft.Core.CoreModule.loadWasm(["DBR"]);
60+
5561
(async () => {
5662
try {
5763
// Create a `CameraEnhancer` instance for camera control and a `CameraView` instance for UI control.

hello-world/requirejs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ <h1>Hello World for RequireJS (Decode via Camera)</h1>
7777
* LICENSE ALERT - THE END
7878
*/
7979

80+
Dynamsoft.Core.CoreModule.loadWasm(["DBR"]);
81+
8082
CoreModule.engineResourcePaths = {
8183
std: "https://cdn.jsdelivr.net/npm/[email protected]/dist/",
8284
dip: "https://cdn.jsdelivr.net/npm/[email protected]/dist/",

0 commit comments

Comments
 (0)