Skip to content

Commit

Permalink
chore: update dcv bundle to 2.4.2000 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixindynamsoft authored Oct 10, 2024
1 parent e2e3c37 commit 36436ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Request a Trial License

The key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" used in this solution (found in the js/init.js file) is a test license valid for 24 hours for any newly authorized browser. If you wish to test the SDK further, you can request a 30-day free trial license through the <a href="https://www.dynamsoft.com/customer/license/trialLicense?product=mrz&utm_source=docs&package=js" target="_blank">Request a Trial License</a> link.
The key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" used in this solution (found in the js/init.js file) is a test license valid for 24 hours for any newly authorized browser. If you wish to test the SDK further, you can request a 30-day free trial license through the <a href="https://www.dynamsoft.com/customer/license/trialLicense?product=mrz&utm_source=samples&package=js" target="_blank">Request a Trial License</a> link.

## Project Structure

Expand Down
2 changes: 1 addition & 1 deletion VINScanner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="keywords" content="vin, scan vin, read vin, ocr, barcode, camera, capture vision" />
<title>VIN Scanner</title>
<link rel="stylesheet" href="./css/index.css" />
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.2.3000/dist/dcv.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.4.2000/dist/dcv.bundle.min.js"></script>
</head>
<body>
<div class="home-page">
Expand Down
6 changes: 0 additions & 6 deletions VINScanner/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMD
* LICENSE ALERT - THE END
*/

// Dynamsoft Image Processing and Label Recognizer resource path optimized for VIN Scanning
Dynamsoft.Core.CoreModule.engineResourcePaths.dip =
"https://cdn.jsdelivr.net/npm/[email protected]/dist";
Dynamsoft.Core.CoreModule.engineResourcePaths.dlr =
"https://cdn.jsdelivr.net/npm/[email protected]/dist/";

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

Expand Down
12 changes: 4 additions & 8 deletions VINScanner/minimum-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 id="scan-title"></h3>
Results:
<div id="result-image-container"></div>
<div id="results"></div>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.2.3000/dist/dcv.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.4.2000/dist/dcv.bundle.min.js"></script>
<script>
/** LICENSE ALERT - README
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
Expand All @@ -38,21 +38,17 @@ <h3 id="scan-title"></h3>
* LICENSE ALERT - THE END
*/

// Dynamsoft Image Processing and Label Recognizer resource path optimized for VIN Scanning
Dynamsoft.Core.CoreModule.engineResourcePaths.dip =
"https://cdn.jsdelivr.net/npm/[email protected]/dist";
Dynamsoft.Core.CoreModule.engineResourcePaths.dlr =
"https://cdn.jsdelivr.net/npm/[email protected]/dist/";

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

let cameraView, cameraEnhancer, cvRouter; // Global variables for easy debugging
const init = async () => {
// [Optional] - Create custom UI for CameraView
// Ref: https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html#customize-the-ui
cameraView = await Dynamsoft.DCE.CameraView.createInstance(document.getElementById("camera-view-container"));
cameraView = await Dynamsoft.DCE.CameraView.createInstance();
cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView); // Create a `CameraEnhancer` instance for camera control and a `CameraView` instance for UI control.
document.getElementById("camera-view-container").append(cameraView.getUIElement());

cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); // Create a `CaptureVisionRouter` instance and set `CameraEnhancer` instance as its image source.

cameraView.setVideoFit("cover");
Expand Down

0 comments on commit 36436ec

Please sign in to comment.