Skip to content

Commit 8d22296

Browse files
committed
UPDATE
1 parent 154a12c commit 8d22296

File tree

6 files changed

+52
-67
lines changed

6 files changed

+52
-67
lines changed

barcode-scanner-api-samples/scan-single-barcode/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@angular/platform-browser": "^19.2.0",
1818
"@angular/platform-browser-dynamic": "^19.2.0",
1919
"@angular/router": "^19.2.0",
20-
"@dynamsoft/dynamsoft-barcode-reader-bundle": "^10.5.1000-dev-20250418130750",
20+
"dynamsoft-barcode-reader-bundle": "10.5.3000-beta-202504231853",
2121
"rxjs": "~7.8.0",
2222
"tslib": "^2.3.0",
2323
"zone.js": "~0.15.0"
Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
import { Component } from '@angular/core';
2-
import { BarcodeScanner } from '@dynamsoft/dynamsoft-barcode-reader-bundle';
2+
import { BarcodeScanner } from 'dynamsoft-barcode-reader-bundle';
33

44
@Component({
5-
selector: 'app-root',
6-
templateUrl: './app.component.html',
7-
styleUrl: './app.component.css'
5+
selector: 'app-root',
6+
templateUrl: './app.component.html',
7+
styleUrl: './app.component.css'
88
})
99

1010
export class AppComponent {
11-
title = 'angular';
11+
title = 'angular';
1212

13-
async ngAfterViewInit(): Promise<void> {
14-
// Configuration object for initializing the BarcodeScanner instance
15-
const config = {
13+
async ngAfterViewInit(): Promise<void> {
14+
// Configuration object for initializing the BarcodeScanner instance
15+
const config = {
16+
license: "YOUR-LICENSE-KEY", // Replace with your Dynamsoft license key
17+
container: ".barcode-scanner-view", // Specify where to render the scanner UI
1618

17-
license: "YOUR-LICENSE-KEY", // Replace with your Dynamsoft license key
18-
container: ".barcode-scanner-view", // Specify where to render the scanner UI
19+
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
20+
uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
1921

20-
// Specify custom paths for the engine resources
21-
engineResourcePaths: {
22-
rootDirectory: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
23-
},
24-
25-
// Configuration for the scanner UI
26-
scannerViewConfig: {
27-
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
28-
cameraEnhancerUIPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
29-
},
30-
}
22+
// Specify custom paths for the engine resources
23+
engineResourcePaths: {
24+
rootDirectory: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
25+
},
26+
}
3127

32-
// Create an instance of the BarcodeScanner with the provided configuration
33-
const barcodeScanner = new BarcodeScanner(config);
28+
// Create an instance of the BarcodeScanner with the provided configuration
29+
const barcodeScanner = new BarcodeScanner(config);
3430

35-
// Launch the scanner; once a barcode is detected, display its text in an alert
36-
barcodeScanner.launch().then((result) => {
37-
alert(result.barcodeResults[0].text);
38-
});
39-
}
31+
// Launch the scanner; once a barcode is detected, display its text in an alert
32+
barcodeScanner.launch().then((result) => {
33+
alert(result.barcodeResults[0].text);
34+
});
35+
}
4036
}

barcode-scanner-api-samples/scan-single-barcode/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@dynamsoft/dynamsoft-barcode-reader-bundle": "^10.5.1000-dev-20250417174703",
13+
"dynamsoft-barcode-reader-bundle": "10.5.3000-beta-202504231853",
1414
"react": "^19.0.0",
1515
"react-dom": "^19.0.0"
1616
},

barcode-scanner-api-samples/scan-single-barcode/react/src/App.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect } from "react";
22
import reactLogo from "./assets/logo.svg";
3-
import { BarcodeScanner } from "@dynamsoft/dynamsoft-barcode-reader-bundle";
3+
import { BarcodeScanner } from "dynamsoft-barcode-reader-bundle";
44
import "./App.css";
55

66
function App() {
@@ -10,19 +10,14 @@ function App() {
1010
license: "YOUR-LICENSE-KEY", // Replace with your Dynamsoft license key
1111
container: ".barcode-scanner-view", // Specify where to render the scanner UI
1212

13+
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
14+
uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
15+
1316
// Specify custom paths for the engine resources
1417
engineResourcePaths: {
15-
rootDirectory:
16-
"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
17-
},
18-
19-
// Configuration for the scanner UI
20-
scannerViewConfig: {
21-
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
22-
cameraEnhancerUIPath:
23-
"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
18+
rootDirectory: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
2419
},
25-
};
20+
}
2621

2722
// Create an instance of the BarcodeScanner with the provided configuration
2823
const barcodeScanner = new BarcodeScanner(config);

barcode-scanner-api-samples/scan-single-barcode/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@dynamsoft/dynamsoft-barcode-reader-bundle": "^10.5.1000-dev-20250418130750",
12+
"dynamsoft-barcode-reader-bundle": "10.5.3000-beta-202504231853",
1313
"vue": "^3.5.13"
1414
},
1515
"devDependencies": {

barcode-scanner-api-samples/scan-single-barcode/vue/src/App.vue

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
11
<script setup lang="ts">
22
import { onMounted } from 'vue';
3-
import { BarcodeScanner } from '@dynamsoft/dynamsoft-barcode-reader-bundle';
3+
import { BarcodeScanner } from 'dynamsoft-barcode-reader-bundle';
44
import vueLogo from "./assets/vue.svg";
55
66
onMounted(() => {
7+
// Configuration object for initializing the BarcodeScanner instance
8+
const config = {
9+
license: "YOUR-LICENSE-KEY", // Replace with your Dynamsoft license key
10+
container: ".barcode-scanner-view", // Specify where to render the scanner UI
711
8-
// Configuration object for initializing the BarcodeScanner instance
9-
const config = {
10-
license: "YOUR-LICENSE-KEY", // Replace with your Dynamsoft license key
11-
container: ".barcode-scanner-view", // Specify where to render the scanner UI
12+
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
13+
uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
1214
13-
// Specify custom paths for the engine resources
14-
engineResourcePaths: {
15-
rootDirectory:
16-
"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
17-
},
15+
// Specify custom paths for the engine resources
16+
engineResourcePaths: {
17+
rootDirectory: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.3000-beta-202504231853/dist/",
18+
},
19+
}
20+
21+
// Create an instance of the BarcodeScanner with the provided configuration
22+
const barcodeScanner = new BarcodeScanner(config);
1823
19-
// Configuration for the scanner UI
20-
scannerViewConfig: {
21-
// Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
22-
cameraEnhancerUIPath:
23-
"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.5.1000-dev-20250417174703/dist/",
24-
},
25-
};
26-
27-
// Create an instance of the BarcodeScanner with the provided configuration
28-
const barcodeScanner = new BarcodeScanner(config);
29-
30-
// Launch the scanner; once a barcode is detected, display its text in an alert
31-
barcodeScanner.launch().then((result) => {
32-
alert(result.barcodeResults[0].text);
33-
});
24+
// Launch the scanner; once a barcode is detected, display its text in an alert
25+
barcodeScanner.launch().then((result) => {
26+
alert(result.barcodeResults[0].text);
27+
});
3428
})
3529
</script>
3630

0 commit comments

Comments
 (0)