diff --git a/README.md b/README.md
index 3e0a568f..ec2811c8 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,10 @@ The following table is a list of supported browsers based on the above requireme
| Browser Name | Version |
| :----------: | :--------------: |
-| Chrome | v78+1 |
-| Firefox | v68+1 |
-| Edge | v79+ |
-| Safari | v14.5+ |
-
-1 Devices running iOS need to be on iOS 14.5+ for camera video streaming to work in Chrome, Firefox or other apps using webviews.
+| Chrome | v88+ |
+| Firefox | v89+ |
+| Edge | v88+ |
+| Safari | v15+ |
Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK.
@@ -78,36 +76,17 @@ If you need a web server for standalone or scenario samples (for example, to ser
The repository includes two main sample directories:
-- **`frameworks/`** - Framework-specific examples demonstrating how to integrate Dynamsoft Barcode Reader into common web and hybrid frameworks. Each framework folder contains one or more runnable sub-examples (such as `scan-using-foundational-api` and/or `scan-using-rtu-api`) showing practical integration patterns.
+- **`frameworks/`** - Framework-specific examples demonstrating how to integrate Dynamsoft Barcode Reader into common web and hybrid frameworks.
- **`scenarios/`** - Focused scenario samples that show common real-world uses of Dynamsoft Barcode Reader.
---
-## Choosing an API
-
-The SDK provides two approaches for integrating barcode scanning capabilities:
-
-### Ready-To-Use (RTU) API — BarcodeScanner
-
-The RTU API offers the quickest path to a working barcode scanner (**Recommended for most users**):
-
-- **One-line integration** – Launch a full scanner with a single API call
-- **Built-in UI** – Pre-designed viewfinder and scan region highlighting
-- **Simple configuration** – Customize behavior through intuitive config objects
-
-### Foundational APIs
-
-If you are looking for a fully customizable barcode decoding library with complete control over the scanning process and UI, you are welcome to use the Foundational APIs.
-
----
-
## Documentation
-For the developer guide and full API reference of Dynamsoft Barcode Reader JavaScript library, please check out the [documentation](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/?ver=11.2.4000&utm_source=sampleReadme).
+For the developer guide and full API reference of Dynamsoft Barcode Reader JavaScript library, please check out the [documentation](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/?ver=11.4.2000&utm_source=sampleReadme).
-- [Barcode Scanner API Docs](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html?utm_source=sampleReadme)
-- [Foundational API Docs](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html?utm_source=sampleReadme)
+- [API Docs](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html?utm_source=sampleReadme)
---
@@ -125,11 +104,6 @@ If you have any questions, feel free to [contact Dynamsoft support](https://www.
- [scan-a-single-barcode.html](./scan-a-single-barcode.html) — Demonstrates single-barcode scanning: stops and returns as soon as the first barcode is detected.
- [read-an-image.html](./read-an-image.html) — Demonstrates how to decode and read barcodes from uploaded image files.
-### Hello-world
-
-- [hello-world.html](./hello-world.html) — The simplest example to get started with single barcode scanning.
-- [read-an-image.html](./read-an-image.html) — Demonstrates how to decode and read barcodes from uploaded image files.
-
### Frameworks
- [angular/](./frameworks/angular/) — Angular examples.
diff --git a/frameworks/README.md b/frameworks/README.md
index c7812e62..8638768e 100644
--- a/frameworks/README.md
+++ b/frameworks/README.md
@@ -1,6 +1,6 @@
# Frameworks samples
-This directory contains framework-specific examples demonstrating how to integrate the Dynamsoft Barcode Reader (JavaScript edition) into common web and hybrid frameworks. Each framework folder contains one or more runnable sub-examples (for example, scan-using-foundational-api and/or scan-using-rtu-api) showing practical integration patterns.
+This directory contains framework-specific examples demonstrating how to integrate the Dynamsoft Barcode Reader (JavaScript edition) into common web and hybrid frameworks.
## Sample list
@@ -23,7 +23,7 @@ This directory contains framework-specific examples demonstrating how to integra
1. Browse into a framework subfolder and choose a subexample, e.g.:
```cmd
- cd react/scan-using-rtu-api
+ cd react
```
1. Follow the subexample README for exact steps. Typical commands:
```cmd
diff --git a/frameworks/angular/scan-using-foundational-api/.editorconfig b/frameworks/angular/.editorconfig
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/.editorconfig
rename to frameworks/angular/.editorconfig
diff --git a/frameworks/angular/scan-using-foundational-api/.gitignore b/frameworks/angular/.gitignore
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/.gitignore
rename to frameworks/angular/.gitignore
diff --git a/frameworks/angular/README.md b/frameworks/angular/README.md
index 97e5d706..0bf17895 100644
--- a/frameworks/angular/README.md
+++ b/frameworks/angular/README.md
@@ -1,23 +1,422 @@
-# Angular samples
+# Hello World Sample for Angular
-This directory contains Angular-based examples demonstrating how to use the Dynamsoft Barcode Reader (JavaScript edition) in Angular projects.
+[Angular](https://angular.dev/) is one of the most popular and mature JavaScript frameworks. Follow this guide to learn how to implement [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) (hereafter called "the library") into an Angular application. Note that in this sample, `TypeScript` is used.
-**Included examples**
+In this guide, we will be using [`dynamsoft-barcode-reader-bundle 11.4.2000`](https://www.npmjs.com/package/dynamsoft-barcode-reader-bundle/v/11.4.2000).
-- scan-using-foundational-api/ — Example using the foundational API.
-- scan-using-rtu-api/ — Example using the RTU API.
+> Note:
+>
+> If you're looking to integrate DBR-JS into a framework that we don't yet have a sample, don't worry! We have a [comprehensive guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/use-in-framework.html) that provides detailed instruction and best practices for a seamless integration into any frameworks!
+>
+> Additionally, we're here to help! Please don't hesitate to [contact us](#Support) for any support or questions you might have.
-## Quick start
+## Official sample
-1. Change to a subexample directory, e.g.:
+* Hello World in Angular - Source Code
- ```bash
- cd scan-using-foundational-api
- ```
+## Preparation
+Make sure you have [node](https://nodejs.org/) and [Angular CLI](https://cli.angular.io/) installed.
-2. Follow the subexample README for exact steps (typically: npm install && npm run start or ng serve).
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.7.
-## Notes
+## Quick Start
-- Run examples via the framework dev server. Opening files directly may break module loading or camera access.
-- See the repository root README.md for general usage and license information.
\ No newline at end of file
+1. Install project dependencies
+
+```cmd
+npm install
+```
+
+2. Build and serve the Angular app
+
+```cmd
+ng serve
+```
+
+Then open `https://localhost:4200/` to view the sample app.
+
+## Creating the sample project
+
+In this section, we will be creating an Angular application utilizing the Dynamsoft Barcode Reader bundle sdk.
+
+We'll be exploring how you could create a page that not only enables barcode scanning via a webcam or a built-in camera, but also decode barcodes from local images.
+
+By the end of this guide, you'll have a good understanding of the SDK and be ready to discover more ways to use it!
+
+### Create an [Angular](https://angular.dev) Application bootstrapped with [Angular CLI](https://cli.angular.io/)
+```cmd
+ng new my-app
+```
+
+On installation, you will be prompted to configure your project.\
+You can customize these options according to your preferences.\
+Below is the configuration used for this sample.
+
+```
+? Which stylesheet format would you like to use? CSS
+? Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
+```
+
+### **CD** to the root directory of the application and install necessary libraries
+
+```cmd
+cd my-app
+npm install dynamsoft-barcode-reader-bundle@11.4.2000 -E
+```
+
+## Start to implement
+
+### Add file "dynamsoft.config.ts" at the root of the app to configure libraries
+
+```typescript
+/* /dynamsoft.config.ts */
+import { CoreModule } from 'dynamsoft-core';
+import { LicenseManager } from 'dynamsoft-license';
+import 'dynamsoft-barcode-reader';
+
+// Configures the paths where the .wasm files and other necessary resources for modules are located.
+CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
+
+/** LICENSE ALERT - README
+ * To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
+ */
+
+LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', true);
+
+/**
+ * You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.
+ * Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
+ * For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html?ver=11.4.2000&cVer=true#specify-the-license&utm_source=samples or contact support@dynamsoft.com.
+ * LICENSE ALERT - THE END
+ */
+
+// Optional. Preload .wasm file for reading barcodes. It will save time on the initial decoding by skipping the resource loading.
+CoreModule.loadWasm();
+```
+
+> Note:
+>
+> * `initLicense()` specify a license key to use the library. You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=sample&product=dbr&package=js to get your own trial license good for 30 days.
+> * `engineResourcePaths` tells the library where to get the necessary resources at runtime.
+
+### Generate and edit the `video-capture` component
+
+* Generate the `video-capture`. The `video-capture` component helps decode barcodes via camera.
+
+```cmd
+ng generate component video-capture
+```
+
+* In `video-capture.component.html`, add code to setup the component's HTML
+
+```html
+
+
+
+Results:
+
{{resultText}}
+```
+
+* In `video-capture.component.ts`, add code for initializing and destroying some instances. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
+
+```ts
+/* /src/app/video-capture/video-capture.component.ts */
+import { Component, ElementRef, ViewChild } from '@angular/core';
+import '../dynamsoft.config';
+import { CameraEnhancer, CameraView } from 'dynamsoft-camera-enhancer';
+import { CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
+import { MultiFrameResultCrossFilter } from 'dynamsoft-utility';
+
+const componentDestroyedErrorMsg = 'VideoCapture Component Destroyed';
+
+@Component({
+ selector: 'app-video-capture',
+ templateUrl: './video-capture.component.html',
+ styleUrls: ['./video-capture.component.css'],
+ standalone: true,
+})
+export class VideoCaptureComponent {
+ @ViewChild('cameraViewContainer') cameraViewContainer?: ElementRef;
+ resultText = "";
+
+ resolveInit?: () => void;
+ pInit: Promise = new Promise((r) => {
+ this.resolveInit = r;
+ });
+ isDestroyed = false;
+
+ cvRouter?: CaptureVisionRouter;
+ cameraEnhancer?: CameraEnhancer;
+
+ async ngAfterViewInit(): Promise {
+ try {
+ // Create a `CameraEnhancer` instance for camera control and a `CameraView` instance for UI control.
+ const cameraView = await CameraView.createInstance();
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ } // Check if component is destroyed after every async
+ this.cameraEnhancer = await CameraEnhancer.createInstance(cameraView);
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ }
+
+ // Get default UI and append it to DOM.
+ this.cameraViewContainer!.nativeElement.append(cameraView.getUIElement());
+
+ // Create a `CaptureVisionRouter` instance and set `CameraEnhancer` instance as its image source.
+ this.cvRouter = await CaptureVisionRouter.createInstance();
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ }
+ this.cvRouter.setInput(this.cameraEnhancer);
+
+ // Define a callback for results.
+ this.cvRouter.addResultReceiver({
+ onDecodedBarcodesReceived: (result) => {
+ if (!result.barcodeResultItems.length) return;
+
+ this.resultText = '';
+ console.log(result);
+ for (let item of result.barcodeResultItems) {
+ this.resultText += `${item.formatString}: ${item.text}\n\n`;
+ }
+ },
+ });
+
+ // Filter out unchecked and duplicate results.
+ const filter = new MultiFrameResultCrossFilter();
+ // Filter out unchecked barcodes.
+ filter.enableResultCrossVerification('barcode', true);
+ // Filter out duplicate barcodes within 3 seconds.
+ filter.enableResultDeduplication('barcode', true);
+ await this.cvRouter.addResultFilter(filter);
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ }
+
+ // Open camera and start scanning single barcode.
+ await this.cameraEnhancer.open();
+ cameraView.setScanLaserVisible(true);
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ }
+ await this.cvRouter.startCapturing('ReadSingleBarcode');
+ if (this.isDestroyed) {
+ throw Error(componentDestroyedErrorMsg);
+ }
+ } catch (ex: any) {
+ if ((ex as Error)?.message === componentDestroyedErrorMsg) {
+ console.log(componentDestroyedErrorMsg);
+ } else {
+ let errMsg = ex.message || ex;
+ console.error(ex);
+ alert(errMsg);
+ }
+ }
+
+ // Resolve pInit promise once initialization is complete.
+ this.resolveInit!();
+ }
+
+ // dispose cvRouter when it's no longer needed
+ async ngOnDestroy() {
+ this.isDestroyed = true;
+ try {
+ // Wait for the pInit to complete before disposing resources.
+ await this.pInit;
+ this.cvRouter?.dispose();
+ this.cameraEnhancer?.dispose();
+ } catch (_) {}
+ }
+}
+```
+> Note:
+>
+> If you're looking to customize the UI, the UI customization feature are provided by the auxiliary SDK "Dynamsoft Camera Enhancer". For more details, refer to our [User Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html#customizing-the-ui)
+
+
+### Generate and edit the `image-capture` component
+
+* Generate the `image-capture`. The `image-capture` component helps decode barcodes in an image.
+
+```cmd
+ng generate component image-capture
+```
+
+* In `image-capture.component.html`, add code to setup the component's HTML
+
+```html
+
+
+
+
+
+
{{resultText}}
+
+```
+
+* In `image-capture.component.ts`, add code for initializing and destroying some instances. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
+
+```ts
+/* /src/app/image-capture/image-capture.component.ts */
+import { Component, ViewChild, ElementRef } from '@angular/core';
+import '../dynamsoft.config';
+import { EnumCapturedResultItemType } from 'dynamsoft-core';
+import type { BarcodeResultItem } from 'dynamsoft-barcode-reader';
+import { CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
+
+@Component({
+ selector: 'app-image-capture',
+ templateUrl: './image-capture.component.html',
+ styleUrls: ['./image-capture.component.css'],
+ standalone: true,
+})
+export class ImageCaptureComponent {
+ resultText = "";
+
+ pCvRouter?: Promise;
+ isDestroyed = false;
+
+ captureImage = async (e: Event) => {
+ let files = [...((e.target! as HTMLInputElement).files as any as File[])];
+ (e.target! as HTMLInputElement).value = ''; // reset input
+ this.resultText = '';
+ try {
+ // ensure cvRouter is created only once
+ const cvRouter = await (this.pCvRouter =
+ this.pCvRouter || CaptureVisionRouter.createInstance());
+ if (this.isDestroyed) return;
+
+ for (let file of files) {
+ // Decode selected image with 'ReadBarcodes_ReadRateFirst' template.
+ const result = await cvRouter.capture(file, 'ReadBarcodes_ReadRateFirst');
+ console.log(result);
+ if (this.isDestroyed) return;
+
+ // Print file name if there's multiple files
+ if (files.length > 1) {
+ this.resultText += `\n${file.name}:\n`;
+ }
+ for (let _item of result.items) {
+ if (_item.type !== EnumCapturedResultItemType.CRIT_BARCODE) {
+ continue; // check if captured result item is a barcode
+ }
+ let item = _item as BarcodeResultItem;
+ this.resultText += item.text + '\n'; // output the decoded barcode text
+ }
+ // If no items are found, display that no barcode was detected
+ if (!result.items.length)
+ this.resultText +=
+ 'No barcode found\n';
+ }
+ } catch (ex: any) {
+ let errMsg = ex.message || ex;
+ console.error(ex);
+ alert(errMsg);
+ }
+ };
+
+ // dispose cvRouter when it's no longer needed
+ async ngOnDestroy() {
+ this.isDestroyed = true;
+ if (this.pCvRouter) {
+ try {
+ (await this.pCvRouter).dispose();
+ } catch (_) {}
+ }
+ }
+}
+```
+
+### Add the `video-capture` and `image-capture` component to the `app` component
+
+* On the `app` component, we will edit the component so that it offers buttons to switch components between `video-capture` and `image-capture`.
+
+* In `app.component.html`, add the following code.
+
+```html
+
+
+
+
Hello World for Angular
+
+
+
+
+
+ @if (mode === 'video') {
+
+ } @else {
+
+ }
+
+```
+
+* In `app.component.ts`, add the following code. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
+
+```ts
+/* /src/app/app.component.ts */
+import { Component } from '@angular/core';
+import { NgStyle } from '@angular/common';
+
+import { ImageCaptureComponent } from './image-capture/image-capture.component';
+import { VideoCaptureComponent } from './video-capture/video-capture.component';
+
+@Component({
+ selector: 'app-root',
+ standalone: true,
+ templateUrl: './app.component.html',
+ styleUrl: './app.component.css',
+ imports: [NgStyle, ImageCaptureComponent, VideoCaptureComponent],
+})
+export class AppComponent {
+ title = 'dbrjs-angular-sample';
+
+ mode: string = 'video';
+
+ switchMode(value: string) {
+ this.mode = value;
+ }
+}
+```
+
+* Try running the project.
+
+```cmd
+ng serve
+```
+
+If you followed all the steps correctly, you will have a working page that turns one of the cameras hooked to or built in your computer or mobile device into a barcode scanner. Also, if you want to decode a local image, just click the `Decode Image` button and select the image you want to decode. Once barcodes are found, the results will show in a dialog.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
+
+## Further help - Angular
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
+
+## Support
+
+If you have any questions, feel free to [contact Dynamsoft Support](https://www.dynamsoft.com/company/contact?utm_source=sampleReadme).
diff --git a/frameworks/angular/scan-using-foundational-api/angular.json b/frameworks/angular/angular.json
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/angular.json
rename to frameworks/angular/angular.json
diff --git a/frameworks/angular/scan-using-foundational-api/package.json b/frameworks/angular/package.json
similarity index 56%
rename from frameworks/angular/scan-using-foundational-api/package.json
rename to frameworks/angular/package.json
index 5a5a398d..a9333437 100644
--- a/frameworks/angular/scan-using-foundational-api/package.json
+++ b/frameworks/angular/package.json
@@ -10,23 +10,23 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "19.2.19",
- "@angular/common": "19.2.19",
- "@angular/compiler": "19.2.19",
- "@angular/core": "19.2.19",
- "@angular/forms": "19.2.19",
- "@angular/platform-browser": "19.2.19",
- "@angular/platform-browser-dynamic": "19.2.19",
- "@angular/router": "19.2.19",
- "dynamsoft-barcode-reader-bundle": "11.2.4000",
+ "@angular/animations": "19.2.20",
+ "@angular/common": "19.2.20",
+ "@angular/compiler": "19.2.20",
+ "@angular/core": "19.2.20",
+ "@angular/forms": "19.2.20",
+ "@angular/platform-browser": "19.2.20",
+ "@angular/platform-browser-dynamic": "19.2.20",
+ "@angular/router": "19.2.20",
+ "dynamsoft-barcode-reader-bundle": "11.4.2000",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
- "@angular-devkit/build-angular": "19.2.19",
- "@angular/cli": "19.2.19",
- "@angular/compiler-cli": "19.2.19",
+ "@angular-devkit/build-angular": "19.2.20",
+ "@angular/cli": "19.2.20",
+ "@angular/compiler-cli": "19.2.20",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
diff --git a/frameworks/angular/scan-using-foundational-api/README.md b/frameworks/angular/scan-using-foundational-api/README.md
deleted file mode 100644
index 7a922945..00000000
--- a/frameworks/angular/scan-using-foundational-api/README.md
+++ /dev/null
@@ -1,422 +0,0 @@
-# Hello World Sample for Angular
-
-[Angular](https://angular.dev/) is one of the most popular and mature JavaScript frameworks. Follow this guide to learn how to implement [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) (hereafter called "the library") into an Angular application. Note that in this sample, `TypeScript` is used.
-
-In this guide, we will be using [`dynamsoft-barcode-reader-bundle 11.2.4000`](https://www.npmjs.com/package/dynamsoft-barcode-reader-bundle/v/11.2.4000).
-
-> Note:
->
-> If you’re looking to integrate DBR-JS into a framework that we don't yet have a sample, don't worry! We have a [comprehensive guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/use-in-framework.html) that provides detailed instruction and best practices for a seamless integration into any frameworks!
->
-> Additionally, we're here to help! Please don't hesitate to [contact us](#Support) for any support or questions you might have.
-
-## Official sample
-
-* Hello World in Angular - Source Code
-
-## Preparation
-Make sure you have [node](https://nodejs.org/) and [Angular CLI](https://cli.angular.io/) installed.
-
-This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.7.
-
-## Quick Start
-
-1. Install project dependencies
-
-```cmd
-npm install
-```
-
-2. Build and serve the Angular app
-
-```cmd
-ng serve
-```
-
-Then open `https://localhost:4200/` to view the sample app.
-
-## Creating the sample project
-
-In this section, we will be creating an Angular application utilizing the Dynamsoft Barcode Reader bundle sdk.
-
-We'll be exploring how you could create a page that not only enables barcode scanning via a webcam or a built-in camera, but also decode barcodes from local images.
-
-By the end of this guide, you'll have a good understanding of the SDK and be ready to discover more ways to use it!
-
-### Create an [Angular](https://angular.dev) Application bootstrapped with [Angular CLI](https://cli.angular.io/)
-```cmd
-ng new my-app
-```
-
-On installation, you will be prompted to configure your project.\
-You can customize these options according to your preferences.\
-Below is the configuration used for this sample.
-
-```
-? Which stylesheet format would you like to use? CSS
-? Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
-```
-
-### **CD** to the root directory of the application and install necessary libraries
-
-```cmd
-cd my-app
-npm install dynamsoft-barcode-reader-bundle@11.2.4000 -E
-```
-
-## Start to implement
-
-### Add file "dynamsoft.config.ts" at the root of the app to configure libraries
-
-```typescript
-/* /dynamsoft.config.ts */
-import { CoreModule } from 'dynamsoft-core';
-import { LicenseManager } from 'dynamsoft-license';
-import 'dynamsoft-barcode-reader';
-
-// Configures the paths where the .wasm files and other necessary resources for modules are located.
-CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdelivr.net/npm/";
-
-/** LICENSE ALERT - README
- * To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
- */
-
-LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', true);
-
-/**
- * You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.
- * Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
- * For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html?ver=11.2.4000&cVer=true#specify-the-license&utm_source=samples or contact support@dynamsoft.com.
- * LICENSE ALERT - THE END
- */
-
-// Optional. Preload .wasm file for reading barcodes. It will save time on the initial decoding by skipping the resource loading.
-CoreModule.loadWasm();
-```
-
-> Note:
->
-> * `initLicense()` specify a license key to use the library. You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=sample&product=dbr&package=js to get your own trial license good for 30 days.
-> * `engineResourcePaths` tells the library where to get the necessary resources at runtime.
-
-### Generate and edit the `video-capture` component
-
-* Generate the `video-capture`. The `video-capture` component helps decode barcodes via camera.
-
-```cmd
-ng generate component video-capture
-```
-
-* In `video-capture.component.html`, add code to setup the component's HTML
-
-```html
-
-
-
-Results:
-
{{resultText}}
-```
-
-* In `video-capture.component.ts`, add code for initializing and destroying some instances. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
-
-```ts
-/* /src/app/video-capture/video-capture.component.ts */
-import { Component, ElementRef, ViewChild } from '@angular/core';
-import '../dynamsoft.config';
-import { CameraEnhancer, CameraView } from 'dynamsoft-camera-enhancer';
-import { CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
-import { MultiFrameResultCrossFilter } from 'dynamsoft-utility';
-
-const componentDestroyedErrorMsg = 'VideoCapture Component Destroyed';
-
-@Component({
- selector: 'app-video-capture',
- templateUrl: './video-capture.component.html',
- styleUrls: ['./video-capture.component.css'],
- standalone: true,
-})
-export class VideoCaptureComponent {
- @ViewChild('cameraViewContainer') cameraViewContainer?: ElementRef;
- resultText = "";
-
- resolveInit?: () => void;
- pInit: Promise = new Promise((r) => {
- this.resolveInit = r;
- });
- isDestroyed = false;
-
- cvRouter?: CaptureVisionRouter;
- cameraEnhancer?: CameraEnhancer;
-
- async ngAfterViewInit(): Promise {
- try {
- // Create a `CameraEnhancer` instance for camera control and a `CameraView` instance for UI control.
- const cameraView = await CameraView.createInstance();
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- } // Check if component is destroyed after every async
- this.cameraEnhancer = await CameraEnhancer.createInstance(cameraView);
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- }
-
- // Get default UI and append it to DOM.
- this.cameraViewContainer!.nativeElement.append(cameraView.getUIElement());
-
- // Create a `CaptureVisionRouter` instance and set `CameraEnhancer` instance as its image source.
- this.cvRouter = await CaptureVisionRouter.createInstance();
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- }
- this.cvRouter.setInput(this.cameraEnhancer);
-
- // Define a callback for results.
- this.cvRouter.addResultReceiver({
- onDecodedBarcodesReceived: (result) => {
- if (!result.barcodeResultItems.length) return;
-
- this.resultText = '';
- console.log(result);
- for (let item of result.barcodeResultItems) {
- this.resultText += `${item.formatString}: ${item.text}\n\n`;
- }
- },
- });
-
- // Filter out unchecked and duplicate results.
- const filter = new MultiFrameResultCrossFilter();
- // Filter out unchecked barcodes.
- filter.enableResultCrossVerification('barcode', true);
- // Filter out duplicate barcodes within 3 seconds.
- filter.enableResultDeduplication('barcode', true);
- await this.cvRouter.addResultFilter(filter);
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- }
-
- // Open camera and start scanning single barcode.
- await this.cameraEnhancer.open();
- cameraView.setScanLaserVisible(true);
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- }
- await this.cvRouter.startCapturing('ReadSingleBarcode');
- if (this.isDestroyed) {
- throw Error(componentDestroyedErrorMsg);
- }
- } catch (ex: any) {
- if ((ex as Error)?.message === componentDestroyedErrorMsg) {
- console.log(componentDestroyedErrorMsg);
- } else {
- let errMsg = ex.message || ex;
- console.error(ex);
- alert(errMsg);
- }
- }
-
- // Resolve pInit promise once initialization is complete.
- this.resolveInit!();
- }
-
- // dispose cvRouter when it's no longer needed
- async ngOnDestroy() {
- this.isDestroyed = true;
- try {
- // Wait for the pInit to complete before disposing resources.
- await this.pInit;
- this.cvRouter?.dispose();
- this.cameraEnhancer?.dispose();
- } catch (_) {}
- }
-}
-```
-> Note:
->
-> If you're looking to customize the UI, the UI customization feature are provided by the auxiliary SDK "Dynamsoft Camera Enhancer". For more details, refer to our [User Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html#customizing-the-ui)
-
-
-### Generate and edit the `image-capture` component
-
-* Generate the `image-capture`. The `image-capture` component helps decode barcodes in an image.
-
-```cmd
-ng generate component image-capture
-```
-
-* In `image-capture.component.html`, add code to setup the component's HTML
-
-```html
-
-
-
-
-
-
{{resultText}}
-
-```
-
-* In `image-capture.component.ts`, add code for initializing and destroying some instances. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
-
-```ts
-/* /src/app/image-capture/image-capture.component.ts */
-import { Component, ViewChild, ElementRef } from '@angular/core';
-import '../dynamsoft.config';
-import { EnumCapturedResultItemType } from 'dynamsoft-core';
-import type { BarcodeResultItem } from 'dynamsoft-barcode-reader';
-import { CaptureVisionRouter } from 'dynamsoft-capture-vision-router';
-
-@Component({
- selector: 'app-image-capture',
- templateUrl: './image-capture.component.html',
- styleUrls: ['./image-capture.component.css'],
- standalone: true,
-})
-export class ImageCaptureComponent {
- resultText = "";
-
- pCvRouter?: Promise;
- isDestroyed = false;
-
- captureImage = async (e: Event) => {
- let files = [...((e.target! as HTMLInputElement).files as any as File[])];
- (e.target! as HTMLInputElement).value = ''; // reset input
- this.resultText = '';
- try {
- // ensure cvRouter is created only once
- const cvRouter = await (this.pCvRouter =
- this.pCvRouter || CaptureVisionRouter.createInstance());
- if (this.isDestroyed) return;
-
- for (let file of files) {
- // Decode selected image with 'ReadBarcodes_ReadRateFirst' template.
- const result = await cvRouter.capture(file, 'ReadBarcodes_ReadRateFirst');
- console.log(result);
- if (this.isDestroyed) return;
-
- // Print file name if there's multiple files
- if (files.length > 1) {
- this.resultText += `\n${file.name}:\n`;
- }
- for (let _item of result.items) {
- if (_item.type !== EnumCapturedResultItemType.CRIT_BARCODE) {
- continue; // check if captured result item is a barcode
- }
- let item = _item as BarcodeResultItem;
- this.resultText += item.text + '\n'; // output the decoded barcode text
- }
- // If no items are found, display that no barcode was detected
- if (!result.items.length)
- this.resultText +=
- 'No barcode found\n';
- }
- } catch (ex: any) {
- let errMsg = ex.message || ex;
- console.error(ex);
- alert(errMsg);
- }
- };
-
- // dispose cvRouter when it's no longer needed
- async ngOnDestroy() {
- this.isDestroyed = true;
- if (this.pCvRouter) {
- try {
- (await this.pCvRouter).dispose();
- } catch (_) {}
- }
- }
-}
-```
-
-### Add the `video-capture` and `image-capture` component to the `app` component
-
-* On the `app` component, we will edit the component so that it offers buttons to switch components between `video-capture` and `image-capture`.
-
-* In `app.component.html`, add the following code.
-
-```html
-
-
-
-
Hello World for Angular
-
-
-
-
-
- @if (mode === 'video') {
-
- } @else {
-
- }
-
-```
-
-* In `app.component.ts`, add the following code. For our stylesheet (CSS) specification, please refer to our [source code](#Official-Sample).
-
-```ts
-/* /src/app/app.component.ts */
-import { Component } from '@angular/core';
-import { NgStyle } from '@angular/common';
-
-import { ImageCaptureComponent } from './image-capture/image-capture.component';
-import { VideoCaptureComponent } from './video-capture/video-capture.component';
-
-@Component({
- selector: 'app-root',
- standalone: true,
- templateUrl: './app.component.html',
- styleUrl: './app.component.css',
- imports: [NgStyle, ImageCaptureComponent, VideoCaptureComponent],
-})
-export class AppComponent {
- title = 'dbrjs-angular-sample';
-
- mode: string = 'video';
-
- switchMode(value: string) {
- this.mode = value;
- }
-}
-```
-
-* Try running the project.
-
-```cmd
-ng serve
-```
-
-If you followed all the steps correctly, you will have a working page that turns one of the cameras hooked to or built in your computer or mobile device into a barcode scanner. Also, if you want to decode a local image, just click the `Decode Image` button and select the image you want to decode. Once barcodes are found, the results will show in a dialog.
-
-## Code scaffolding
-
-Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
-
-## Build
-
-Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
-
-## Running unit tests
-
-Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
-
-## Running end-to-end tests
-
-Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
-
-## Further help - Angular
-
-To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
-
-## Support
-
-If you have any questions, feel free to [contact Dynamsoft Support](https://www.dynamsoft.com/company/contact?utm_source=sampleReadme).
diff --git a/frameworks/angular/scan-using-rtu-api/.editorconfig b/frameworks/angular/scan-using-rtu-api/.editorconfig
deleted file mode 100644
index f166060d..00000000
--- a/frameworks/angular/scan-using-rtu-api/.editorconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-# Editor configuration, see https://editorconfig.org
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[*.ts]
-quote_type = single
-ij_typescript_use_double_quotes = false
-
-[*.md]
-max_line_length = off
-trim_trailing_whitespace = false
diff --git a/frameworks/angular/scan-using-rtu-api/.gitignore b/frameworks/angular/scan-using-rtu-api/.gitignore
deleted file mode 100644
index cc7b1413..00000000
--- a/frameworks/angular/scan-using-rtu-api/.gitignore
+++ /dev/null
@@ -1,42 +0,0 @@
-# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
-
-# Compiled output
-/dist
-/tmp
-/out-tsc
-/bazel-out
-
-# Node
-/node_modules
-npm-debug.log
-yarn-error.log
-
-# IDEs and editors
-.idea/
-.project
-.classpath
-.c9/
-*.launch
-.settings/
-*.sublime-workspace
-
-# Visual Studio Code
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-.history/*
-
-# Miscellaneous
-/.angular/cache
-.sass-cache/
-/connect.lock
-/coverage
-/libpeerconnection.log
-testem.log
-/typings
-
-# System files
-.DS_Store
-Thumbs.db
diff --git a/frameworks/angular/scan-using-rtu-api/README.md b/frameworks/angular/scan-using-rtu-api/README.md
deleted file mode 100644
index 2e7d55c7..00000000
--- a/frameworks/angular/scan-using-rtu-api/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# 📦 Scan Single Barcode - Angular
-
-This sample shows how to integrate the `BarcodeScanner` from the [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) in an **Angular** project for scanning a single barcode from live video.
-
-## ✨ Features
-
-- Easy integration with pre-built UI
-- BarcodeScanner initialized in Angular component
-- Scans one barcode at a time from video
-
-## 🚀 Quick Start
-
-### 1. Install Dependencies
-
-```bash
-npm install
-```
-
-### 2. Run the App
-
-```bash
-npm run start
-```
-
-Then open your browser at http://localhost:4200 to view the sample app.
-
-## 📌 Customization
-
-Please check the official [documentation](https://dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/barcode-scanner-customization.html).
-
-## 📄 Support
-
-If you have any questions, feel free to [contact Dynamsoft Support](https://www.dynamsoft.com/company/contact?utm_source=sampleReadme).
diff --git a/frameworks/angular/scan-using-rtu-api/angular.json b/frameworks/angular/scan-using-rtu-api/angular.json
deleted file mode 100644
index 60a82d23..00000000
--- a/frameworks/angular/scan-using-rtu-api/angular.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
- "version": 1,
- "newProjectRoot": "projects",
- "projects": {
- "angular": {
- "projectType": "application",
- "schematics": {},
- "root": "",
- "sourceRoot": "src",
- "prefix": "app",
- "architect": {
- "build": {
- "builder": "@angular-devkit/build-angular:application",
- "options": {
- "outputPath": "dist/angular",
- "index": "src/index.html",
- "browser": "src/main.ts",
- "polyfills": [
- "zone.js"
- ],
- "tsConfig": "tsconfig.app.json",
- "assets": [
- {
- "glob": "**/*",
- "input": "public"
- }
- ],
- "styles": [
- "src/styles.css"
- ],
- "scripts": [],
- "baseHref": "./"
- },
- "configurations": {
- "production": {
- "budgets": [
- {
- "type": "initial",
- "maximumWarning": "1000kb",
- "maximumError": "1MB"
- },
- {
- "type": "anyComponentStyle",
- "maximumWarning": "4kB",
- "maximumError": "8kB"
- }
- ],
- "outputHashing": "all"
- },
- "development": {
- "optimization": false,
- "extractLicenses": false,
- "sourceMap": true
- }
- },
- "defaultConfiguration": "production"
- },
- "serve": {
- "builder": "@angular-devkit/build-angular:dev-server",
- "configurations": {
- "production": {
- "buildTarget": "angular:build:production"
- },
- "development": {
- "buildTarget": "angular:build:development"
- }
- },
- "defaultConfiguration": "development"
- },
- "extract-i18n": {
- "builder": "@angular-devkit/build-angular:extract-i18n"
- },
- "test": {
- "builder": "@angular-devkit/build-angular:karma",
- "options": {
- "polyfills": [
- "zone.js",
- "zone.js/testing"
- ],
- "tsConfig": "tsconfig.spec.json",
- "assets": [
- {
- "glob": "**/*",
- "input": "public"
- }
- ],
- "styles": [
- "src/styles.css"
- ],
- "scripts": []
- }
- }
- }
- }
- },
- "cli": {
- "analytics": false
- }
-}
diff --git a/frameworks/angular/scan-using-rtu-api/package.json b/frameworks/angular/scan-using-rtu-api/package.json
deleted file mode 100644
index 63ed4f23..00000000
--- a/frameworks/angular/scan-using-rtu-api/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "angular",
- "version": "0.0.0",
- "scripts": {
- "ng": "ng",
- "start": "ng serve",
- "build": "ng build",
- "watch": "ng build --watch --configuration development"
- },
- "private": true,
- "dependencies": {
- "@angular/common": "19.2.18",
- "@angular/compiler": "19.2.18",
- "@angular/core": "19.2.18",
- "@angular/forms": "19.2.18",
- "@angular/platform-browser": "19.2.18",
- "@angular/platform-browser-dynamic": "19.2.18",
- "@angular/router": "19.2.18",
- "dynamsoft-barcode-reader-bundle": "11.2.4000",
- "rxjs": "~7.8.0",
- "tslib": "^2.3.0",
- "zone.js": "~0.15.0"
- },
- "devDependencies": {
- "@angular-devkit/build-angular": "19.2.8",
- "@angular/cli": "19.2.8",
- "@angular/compiler-cli": "19.2.18",
- "@types/jasmine": "~5.1.0",
- "jasmine-core": "~5.6.0",
- "karma": "~6.4.0",
- "karma-chrome-launcher": "~3.2.0",
- "karma-coverage": "~2.2.0",
- "karma-jasmine": "~5.1.0",
- "karma-jasmine-html-reporter": "~2.1.0",
- "typescript": "~5.7.2"
- }
-}
diff --git a/frameworks/angular/scan-using-rtu-api/src/app/app.component.css b/frameworks/angular/scan-using-rtu-api/src/app/app.component.css
deleted file mode 100644
index 517d4fd3..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/app/app.component.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.barcode-scanner-hello-world-page {
- width: 100%;
- height: 100%;
-}
-
-.barcode-scanner-title {
- height: 90px;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 20px 0;
-}
-
-.barcode-scanner-title .barcode-scanner-title-logo {
- width: 40px;
- height: 40px;
- margin-left: 10px;
-}
-
-.barcode-scanner-view {
- width: 100%;
- height: calc(100% - 90px);
-}
diff --git a/frameworks/angular/scan-using-rtu-api/src/app/app.component.html b/frameworks/angular/scan-using-rtu-api/src/app/app.component.html
deleted file mode 100644
index 1e505568..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/app/app.component.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
Hello World for Angular
-
-
-
-
diff --git a/frameworks/angular/scan-using-rtu-api/src/app/app.component.ts b/frameworks/angular/scan-using-rtu-api/src/app/app.component.ts
deleted file mode 100644
index 81a700ed..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/app/app.component.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Component, ElementRef, ViewChild } from '@angular/core';
-import { BarcodeScanner, BarcodeScannerConfig, EnumScanMode } from 'dynamsoft-barcode-reader-bundle';
-
-@Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrl: './app.component.css'
-})
-
-export class AppComponent {
- title = 'angular';
- barcodeScanner: BarcodeScanner | null = null;
-
- @ViewChild('barcodeScannerViewRef') barcodeScannerViewRef!: ElementRef;
-
- async ngAfterViewInit(): Promise {
- // Configuration object for initializing the BarcodeScanner instance
- const config: BarcodeScannerConfig = {
- license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", // Replace with your Dynamsoft license key
-
- // Specify where to render the scanner UI
- // If container is not specified, the UI will take up the full screen
- container: this.barcodeScannerViewRef.nativeElement,
-
- // Specify the path for the definition file "barcode-scanner.ui.xml" for the scanner view.
- uiPath: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.2.4000/dist/ui/barcode-scanner.ui.xml",
-
- /*
- scanMode controls the scanning behavior:
- - SM_MULTI_UNIQUE: Continuously scans and collects each unique barcode.
- - SM_SINGLE: Stops scanning after the first barcode is detected.
- */
- scanMode: EnumScanMode.SM_MULTI_UNIQUE,
-
- // showUploadImageButton: true,
- // scannerViewConfig: {
- // showFlashButton: true,
- // cameraSwitchControl: "toggleFrontBack",
- // },
-
- // Specify custom paths for the engine resources
- engineResourcePaths: {
- rootDirectory: "https://cdn.jsdelivr.net/npm/",
- },
-
- // The watermark can be removed via showPoweredByDynamsoft configuration option.
- // showPoweredByDynamsoft: false,
- }
-
- // Create an instance of the BarcodeScanner with the provided configuration
- this.barcodeScanner = new BarcodeScanner(config);
-
- // Launch the scanner; once a barcode is detected, display its text in an alert
- let result = await this.barcodeScanner.launch();
- if (result.barcodeResults.length) {
- alert(result.barcodeResults[0].text);
- }
- }
- async ngOnDestroy(): Promise {
- // Dispose of the barcode scanner when the component unmounts
- this.barcodeScanner?.dispose();
- }
-}
diff --git a/frameworks/angular/scan-using-rtu-api/src/app/app.config.ts b/frameworks/angular/scan-using-rtu-api/src/app/app.config.ts
deleted file mode 100644
index a1e7d6f8..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/app/app.config.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
-import { provideRouter } from '@angular/router';
-
-import { routes } from './app.routes';
-
-export const appConfig: ApplicationConfig = {
- providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
-};
diff --git a/frameworks/angular/scan-using-rtu-api/src/app/app.routes.ts b/frameworks/angular/scan-using-rtu-api/src/app/app.routes.ts
deleted file mode 100644
index dc39edb5..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/app/app.routes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Routes } from '@angular/router';
-
-export const routes: Routes = [];
diff --git a/frameworks/angular/scan-using-rtu-api/src/index.html b/frameworks/angular/scan-using-rtu-api/src/index.html
deleted file mode 100644
index bae20c6b..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Dynamsoft Barcode Reader Sample - Hello World (Decode via Camera)
-
-
-
-
-
-
-
diff --git a/frameworks/angular/scan-using-rtu-api/src/main.ts b/frameworks/angular/scan-using-rtu-api/src/main.ts
deleted file mode 100644
index 35b00f34..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/main.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app/app.config';
-import { AppComponent } from './app/app.component';
-
-bootstrapApplication(AppComponent, appConfig)
- .catch((err) => console.error(err));
diff --git a/frameworks/angular/scan-using-rtu-api/src/styles.css b/frameworks/angular/scan-using-rtu-api/src/styles.css
deleted file mode 100644
index a0583309..00000000
--- a/frameworks/angular/scan-using-rtu-api/src/styles.css
+++ /dev/null
@@ -1,16 +0,0 @@
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
-}
-
-html,
-body {
- width: 100%;
- height: 100%;
-}
-
-#root {
- width: 100%;
- height: 100%;
-}
diff --git a/frameworks/angular/scan-using-rtu-api/tsconfig.app.json b/frameworks/angular/scan-using-rtu-api/tsconfig.app.json
deleted file mode 100644
index 3775b37e..00000000
--- a/frameworks/angular/scan-using-rtu-api/tsconfig.app.json
+++ /dev/null
@@ -1,15 +0,0 @@
-/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
-/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "./out-tsc/app",
- "types": []
- },
- "files": [
- "src/main.ts"
- ],
- "include": [
- "src/**/*.d.ts"
- ]
-}
diff --git a/frameworks/angular/scan-using-rtu-api/tsconfig.json b/frameworks/angular/scan-using-rtu-api/tsconfig.json
deleted file mode 100644
index 5525117c..00000000
--- a/frameworks/angular/scan-using-rtu-api/tsconfig.json
+++ /dev/null
@@ -1,27 +0,0 @@
-/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
-/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
-{
- "compileOnSave": false,
- "compilerOptions": {
- "outDir": "./dist/out-tsc",
- "strict": true,
- "noImplicitOverride": true,
- "noPropertyAccessFromIndexSignature": true,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true,
- "skipLibCheck": true,
- "isolatedModules": true,
- "esModuleInterop": true,
- "experimentalDecorators": true,
- "moduleResolution": "bundler",
- "importHelpers": true,
- "target": "ES2022",
- "module": "ES2022"
- },
- "angularCompilerOptions": {
- "enableI18nLegacyMessageIdFormat": false,
- "strictInjectionParameters": true,
- "strictInputAccessModifiers": true,
- "strictTemplates": true
- }
-}
diff --git a/frameworks/angular/scan-using-rtu-api/tsconfig.spec.json b/frameworks/angular/scan-using-rtu-api/tsconfig.spec.json
deleted file mode 100644
index 5fb748d9..00000000
--- a/frameworks/angular/scan-using-rtu-api/tsconfig.spec.json
+++ /dev/null
@@ -1,15 +0,0 @@
-/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
-/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "./out-tsc/spec",
- "types": [
- "jasmine"
- ]
- },
- "include": [
- "src/**/*.spec.ts",
- "src/**/*.d.ts"
- ]
-}
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/app.component.css b/frameworks/angular/src/app/app.component.css
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/app.component.css
rename to frameworks/angular/src/app/app.component.css
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/app.component.html b/frameworks/angular/src/app/app.component.html
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/app.component.html
rename to frameworks/angular/src/app/app.component.html
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/app.component.ts b/frameworks/angular/src/app/app.component.ts
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/app.component.ts
rename to frameworks/angular/src/app/app.component.ts
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/dynamsoft.config.ts b/frameworks/angular/src/app/dynamsoft.config.ts
similarity index 92%
rename from frameworks/angular/scan-using-foundational-api/src/app/dynamsoft.config.ts
rename to frameworks/angular/src/app/dynamsoft.config.ts
index e4246de0..dec0617b 100644
--- a/frameworks/angular/scan-using-foundational-api/src/app/dynamsoft.config.ts
+++ b/frameworks/angular/src/app/dynamsoft.config.ts
@@ -7,12 +7,12 @@ CoreModule.engineResourcePaths.rootDirectory = 'https://cdn.jsdelivr.net/npm/';
* To use the library, you need to first specify a license key using the API "initLicense()" as shown below.
*/
-LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', { executeNow: true });
+LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9');
/**
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=samples&product=dbr&package=js to get your own trial license good for 30 days.
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
- * For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html?ver=11.2.4000&cVer=true#specify-the-license&utm_source=samples or contact support@dynamsoft.com.
+ * For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html?ver=11.4.2000&cVer=true#specify-the-license&utm_source=samples or contact support@dynamsoft.com.
* LICENSE ALERT - THE END
*/
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.css b/frameworks/angular/src/app/image-capture/image-capture.component.css
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.css
rename to frameworks/angular/src/app/image-capture/image-capture.component.css
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.html b/frameworks/angular/src/app/image-capture/image-capture.component.html
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.html
rename to frameworks/angular/src/app/image-capture/image-capture.component.html
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.ts b/frameworks/angular/src/app/image-capture/image-capture.component.ts
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/image-capture/image-capture.component.ts
rename to frameworks/angular/src/app/image-capture/image-capture.component.ts
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.css b/frameworks/angular/src/app/video-capture/video-capture.component.css
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.css
rename to frameworks/angular/src/app/video-capture/video-capture.component.css
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.html b/frameworks/angular/src/app/video-capture/video-capture.component.html
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.html
rename to frameworks/angular/src/app/video-capture/video-capture.component.html
diff --git a/frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.ts b/frameworks/angular/src/app/video-capture/video-capture.component.ts
similarity index 98%
rename from frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.ts
rename to frameworks/angular/src/app/video-capture/video-capture.component.ts
index 26690ed3..7ac4f50e 100644
--- a/frameworks/angular/scan-using-foundational-api/src/app/video-capture/video-capture.component.ts
+++ b/frameworks/angular/src/app/video-capture/video-capture.component.ts
@@ -48,7 +48,7 @@ export class VideoCaptureComponent {
this.cvRouter.setInput(this.cameraEnhancer);
// Define a callback for results.
- this.cvRouter.addResultReceiver({
+ await this.cvRouter.addResultReceiver({
onDecodedBarcodesReceived: (result) => {
if (!result.barcodeResultItems.length) return;
console.log(result);
diff --git a/frameworks/angular/scan-using-foundational-api/src/assets/.gitkeep b/frameworks/angular/src/assets/.gitkeep
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/assets/.gitkeep
rename to frameworks/angular/src/assets/.gitkeep
diff --git a/frameworks/angular/scan-using-foundational-api/src/favicon.ico b/frameworks/angular/src/favicon.ico
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/favicon.ico
rename to frameworks/angular/src/favicon.ico
diff --git a/frameworks/angular/scan-using-foundational-api/src/index.html b/frameworks/angular/src/index.html
similarity index 82%
rename from frameworks/angular/scan-using-foundational-api/src/index.html
rename to frameworks/angular/src/index.html
index bce6b22f..4e212223 100644
--- a/frameworks/angular/scan-using-foundational-api/src/index.html
+++ b/frameworks/angular/src/index.html
@@ -11,7 +11,6 @@
content="Dynamsoft Barcode Reader in an Angular Application, helps read barcodes from camera or images."
/>
-
diff --git a/frameworks/angular/scan-using-foundational-api/src/main.ts b/frameworks/angular/src/main.ts
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/main.ts
rename to frameworks/angular/src/main.ts
diff --git a/frameworks/angular/scan-using-foundational-api/src/styles.css b/frameworks/angular/src/styles.css
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/src/styles.css
rename to frameworks/angular/src/styles.css
diff --git a/frameworks/angular/scan-using-foundational-api/tsconfig.app.json b/frameworks/angular/tsconfig.app.json
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/tsconfig.app.json
rename to frameworks/angular/tsconfig.app.json
diff --git a/frameworks/angular/scan-using-foundational-api/tsconfig.json b/frameworks/angular/tsconfig.json
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/tsconfig.json
rename to frameworks/angular/tsconfig.json
diff --git a/frameworks/angular/scan-using-foundational-api/tsconfig.spec.json b/frameworks/angular/tsconfig.spec.json
similarity index 100%
rename from frameworks/angular/scan-using-foundational-api/tsconfig.spec.json
rename to frameworks/angular/tsconfig.spec.json
diff --git a/frameworks/blazor/scan-using-foundational-api/.gitignore b/frameworks/blazor/.gitignore
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/.gitignore
rename to frameworks/blazor/.gitignore
diff --git a/frameworks/blazor/README.md b/frameworks/blazor/README.md
index f2dc0dec..e49456e1 100644
--- a/frameworks/blazor/README.md
+++ b/frameworks/blazor/README.md
@@ -1,23 +1,372 @@
-# Blazor samples
+# Hello World Sample for Blazor
-This directory contains Blazor examples demonstrating how to integrate the Dynamsoft Barcode Reader (JavaScript edition) into Blazor apps.
+[Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) is a framework for building interactive client-side web apps with .NET and C#. Follow this guide to learn how to implement [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) (hereafter called "the library") into a Blazor application using [JavaScript Interlop](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions).
-**Included examples**
+In this guide, we will be using [`dynamsoft-barcode-reader-bundle 11.4.2000`](https://www.npmjs.com/package/dynamsoft-barcode-reader-bundle/v/11.4.2000). We also used .NET 8.0 (version 8.0.8) to develop this sample. To ensure the sample app runs properly, please refer to this guide to update your .NET installation - https://learn.microsoft.com/en-us/dotnet/core/install/upgrade.
-- scan-using-foundational-api/ — Blazor example with JS interop for video/image decoding.
-- scan-using-rtu-api/ — RTU API demo for Blazor.
+> Note:
+>
+> If you're looking to integrate DBR-JS into a framework that we don't yet have a sample, don't worry! We have a [comprehensive guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/use-in-framework.html) that provides detailed instruction and best practices for a seamless integration into any frameworks!
+>
+> Additionally, we're here to help! Please don't hesitate to [contact us](#Support) for any support or questions you might have.
-## Quick start
+## Official Sample
-1. Change to a subexample directory, e.g.:
+* Hello World in Blazor - Source Code
- ```bash
- cd scan-using-foundational-api
- ```
+## Preparation
-2. Follow the subexample README for exact steps (may require dotnet/SDK commands or npm for static assets).
+This sample was developed using Visual Studio 2022. For a more in-depth guide on creating a Blazor web application with Visual Studio 2022, please follow Microsoft's tutorial on [Building your first web app with ASP.NET Core using Blazor](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/intro).
-## Notes
+## Quick Start
-- Some examples use JS interop; run the app via dotnet or the provided launch configuration.
-- See the repository root README.md for general usage and license information.
\ No newline at end of file
+1. **Open the application** in Visual Studio 2022 by clicking the `Open a Project or Solution` button, and choosing on the `BlazorApp.csproj` file.
+
+2. **Run the application** by clicking the `Start Debugging` button (a green arrow) in the Debug Toolbar.
+
+3. A window should open to view the sample application
+
+> Note:
+>
+> This sample uses the packages `Microsoft.AspNetCore.Components.WebAssembly` v8.0.8 and `Microsoft.AspNetCore.Components.WebAssembly.DevServer` v8.0.8 which require .NET v8.0.8.
+> Refer to the `BlazorApp.csproj` file to change the versions as needed.
+
+## Creating the sample project
+
+In this section, we will be creating a Blazor application utilizing the Dynamsoft Barcode Reader bundle sdk.
+
+We'll be exploring how you could create a page that not only enables barcode scanning via a webcam or a built-in camera, but also decode barcodes from local images.
+
+By the end of this guide, you'll have a good understanding of the SDK and be ready to discover more ways to use it!
+
+### Initialize project
+
+Please follow the guide created by Microsoft on [Building your first web app with ASP.NET Code using Blazor](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/intro).
+
+This tutorial will guide you through downloading Visual Studio, and set up needed to create a Blazor Web Application.
+
+**IMPORTANT**: When creating a new project, please select **"Blazor WebAssembly Standalone App"** instead of "Blazor Web App".
+
+## Start to implement
+
+### Create a `DecodeVideo.razor` component under the `Pages\` folder
+
+In `Pages\DecodeVideo.razor`, we will modify the component to enable barcode decoding via camera. This page will be accessible at the `/video` URL.
+
+```razor
+@page "/video"
+@inject IJSRuntime JS
+
+Dynamsoft Barcode Reader Hello World - Blazor
+
+
Decode Video
+
+
+
Results:
+
+
+
+@code {
+ // reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
+ private string mode = "stop";
+ private string videoDecodeBtn = "Decode Video";
+
+ private async Task ToggleVideoTask()
+ {
+ await JS.InvokeVoidAsync("loadDecodeVideoModule");
+
+ if (mode == "videoDecode")
+ {
+ await StopDecodeVideoTask();
+ }
+ else if (mode == "stop")
+ {
+ await DecodeVideoTask();
+
+ }
+ }
+
+ private async Task DecodeVideoTask()
+ {
+ mode = "videoDecode";
+ videoDecodeBtn = "Stop Decode";
+ await JS.InvokeAsync("startVideoDecode");
+ }
+
+ private async Task StopDecodeVideoTask()
+ {
+ mode = "stop";
+ videoDecodeBtn = "Decode Video";
+ await JS.InvokeAsync("stopVideoDecode");
+ }
+}
+```
+
+> Note:
+>
+> We can significantly improve the initial load speed and performance when we dynamically import Dynamsoft's Barcode Scanning component on-demand. In the sample code above, we dynamically imported the decode video module through the line `await JS.InvokeVoidAsync("loadDecodeVideoModule");`.
+
+### Create a `wwwroot\decodeVideo.js` file
+
+In `wwwroot\decodeVideo.js`, we will instantiate `cvRouter` and `cameraEnhancer` to start decoding barcodes through the camera.
+
+Additionally, we'll include a function to clean up `cvRouter` and `cameraEnhancer` when they are no longer needed.
+
+These functions will be called by the Blazor components through JavaScript Interop.
+
+Reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
+
+```javascript
+// Create JS function "startVideoDecode"
+window.startVideoDecode = async () => {
+ const cameraViewContainer = document.getElementById("camera-view-container");
+ const resultsContainer = document.getElementById("results");
+
+ try {
+ // Create a `CameraEnhancer` instance for camera control and a `CameraView` instance for UI control.
+ const cameraView = await Dynamsoft.DCE.CameraView.createInstance();
+ cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
+ // Get default UI and append it to DOM.
+ cameraViewContainer.style.display = "block"
+ cameraViewContainer.append(cameraView.getUIElement());
+
+ // Create a `CaptureVisionRouter` instance and set `CameraEnhancer` instance as its image source.
+ cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
+ cvRouter.setInput(cameraEnhancer);
+
+ // Define a callback for results.
+ cvRouter.addResultReceiver({
+ onDecodedBarcodesReceived: (result) => {
+ if (!result.barcodeResultItems.length) return;
+
+ resultsContainer.textContent = "";
+ for (let item of result.barcodeResultItems) {
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
+ }
+ },
+ });
+
+ // Filter out unchecked and duplicate results.
+ const filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
+ // Filter out unchecked barcodes.
+ filter.enableResultCrossVerification("barcode", true);
+ // Filter out duplicate barcodes within 3 seconds.
+ filter.enableResultDeduplication("barcode", true);
+ await cvRouter.addResultFilter(filter);
+
+ // Open camera and start scanning single barcode.
+ await cameraEnhancer.open();
+
+ cameraView.setScanLaserVisible(true);
+ await cvRouter.startCapturing("ReadSingleBarcode");
+ } catch (ex) {
+ let errMsg = ex.message || ex;
+ console.error(ex);
+ }
+}
+
+// Create JS function "stopVideoDecode"
+window.stopVideoDecode = async () => {
+ const cameraViewContainer = document.getElementById("camera-view-container");
+ const resultsContainer = document.getElementById("results");
+
+ try {
+ if (!cvRouter?.disposed) {
+ await cvRouter?.dispose();
+ }
+ if (!cameraEnhancer?.disposed) {
+ await cameraEnhancer?.dispose();
+ }
+
+ // Reset components
+ cameraViewContainer.style.display = "none";
+ cameraViewContainer.innerHTML = "";
+ resultsContainer.textContent = "";
+ } catch (ex) {
+ let errMsg = ex.message || ex;
+ console.error(ex);
+ }
+}
+```
+
+### Create a `Pages\DecodeImage.razor` component
+
+In `Pages\DecodeImage.razor`, we will modify the component to enable barcode decoding through an image. This page will be accessible at the `/image` URL.
+
+```razor
+@page "/image"
+@inject IJSRuntime JS
+
+Dynamsoft Barcode Reader Hello World - Blazor
+
+
Decode Image
+
+
Results:
+
+
+@code {
+ // reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
+
+private async Task DecodeImageTask()
+ {
+ // Dynamically load decode image module
+ await JS.InvokeVoidAsync("loadDecodeImageModule");
+ await JS.InvokeAsync("startImageDecode");
+ }
+
+ public void Dispose()
+ {
+ JS.InvokeAsync("cleanUpImageDecode");
+ }
+}
+```
+
+> Note:
+>
+> We can significantly improve the initial load speed and performance when we dynamically import Dynamsoft's Barcode Scanning component on-demand. In the sample code above, we dynamically imported the decode image module through the line `await JS.InvokeVoidAsync("loadDecodeImageModule");`.
+
+### Create a `wwwroot\decodeImage.js` file
+
+In `wwwroot\decodeImage.js`, we will instantiate `cvRouter` to decode barcodes in images.
+
+These functions will be called by the Blazor components through JavaScript Interop.
+
+Reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
+
+```javascript
+// Create JS function "startImageDecode"
+window.startImageDecode = async () => {
+ const inputElement = document.getElementById("inputElement");
+ const resultsContainer = document.getElementById("results");
+ resultsContainer.innerText = ""; // Reset results container
+
+ const { files } = inputElement;
+
+ try {
+ for (let file of files) {
+ cvRouter = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
+ // Decode selected image with 'ReadBarcodes_SpeedFirst' template.
+ const result = await cvRouter.capture(file, "ReadBarcodes_SpeedFirst");
+ if (files.length > 1) {
+ resultsContainer.innerText += `\nFile: ${file.name}\n`;
+ }
+ for (let item of result.items) {
+ if (item.type !== Dynamsoft.Core.EnumCapturedResultItemType.CRIT_BARCODE) {
+ continue;
+ }
+ resultsContainer.innerText += item.text + "\n";
+ console.log(item.text);
+ }
+ if (!result.items.length) resultsContainer.innerText += "No barcode found\n";
+ }
+ } catch (ex) {
+ let errMsg = ex.message || ex;
+ console.error(ex);
+ alert(errMsg);
+ } finally {
+ inputElement.value = "";
+ await cvRouter?.dispose();
+ }
+};
+```
+
+### Modify the `wwwroot\index.html` file
+
+Inside the `wwwroot\index.html` file, we will initialize the license and necessary modules for Dynamsoft Barcode Reader and create functions to dynamically load the video and image modules.
+
+```html
+
+
+...
+
+
+ ...
+
+
+
+
+
+
+```
+
+> Note:
+>
+> * `initLicense()` specify a license key to use the library. You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=sample&product=dbr&package=js to get your own trial license good for 30 days.
+
+
+### Modify the `Layout\NavMenu.razor` and `Layout\NavMenu.razor.css` file
+
+To make sure the `Decode Video` and `Decode Image` pages are accessible from the sidebar, add the following code block to `Layout\NavMenu.razor`.
+
+```html
+...
+
+
+ Decode Video
+
+
+
+
+ Decode Image
+
+
+...
+```
+
+We'll also add the following CSS code to include the icons for `Decode Video` and `Decode Image` in the `Layout\NavMenu.razor.css` file.
+
+```css
+.bi-video-fill-nav-menu {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-camera-video-fill' viewBox='0 0 16 16'%3E%3Cpath d='M0 5a2 2 0 0 1 2-2h7.5a2 2 0 0 1 1.983 1.738l3.11-1.382A1 1 0 0 1 16 4.269v7.462a1 1 0 0 1-1.406.913l-3.111-1.382A2 2 0 0 1 9.5 13H2a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
+}
+
+.bi-image-fill-nav-menu {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-camera-fill' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 2A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2zm13 1a.5.5 0 0 1 .5.5v6l-3.775-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12v.54L1 12.5v-9a.5.5 0 0 1 .5-.5z'/%3E%3C/svg%3E");
+}
+```
+
+## Run the application
+
+We can run the application by clicking the `Start Debugging` button (a green arrow) in the Debug Toolbar.
+
+If you followed all the steps correctly, you will have a working page that turns one of the cameras hooked to or built in your computer or mobile device into a barcode scanner. Also, if you want to decode a local image, just click the `Decode Image` button and select the image you want to decode.
+
+## Support
+
+If you have any questions, feel free to [contact Dynamsoft support](https://www.dynamsoft.com/company/contact?utm_source=sampleReadme).
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/App.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/App.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/App.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/App.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/BlazorApp.csproj b/frameworks/blazor/hello-world-blazor/BlazorApp/BlazorApp.csproj
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/BlazorApp.csproj
rename to frameworks/blazor/hello-world-blazor/BlazorApp/BlazorApp.csproj
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/MainLayout.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/MainLayout.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/MainLayout.razor.css b/frameworks/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor.css
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/MainLayout.razor.css
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor.css
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/NavMenu.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/NavMenu.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/NavMenu.razor.css b/frameworks/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor.css
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Layout/NavMenu.razor.css
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor.css
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/DecodeImage.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/Pages/DecodeImage.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/DecodeImage.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Pages/DecodeImage.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/DecodeVideo.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/Pages/DecodeVideo.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/DecodeVideo.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Pages/DecodeVideo.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/Home.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/Pages/Home.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Pages/Home.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Pages/Home.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Program.cs b/frameworks/blazor/hello-world-blazor/BlazorApp/Program.cs
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Program.cs
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Program.cs
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Properties/launchSettings.json b/frameworks/blazor/hello-world-blazor/BlazorApp/Properties/launchSettings.json
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/Properties/launchSettings.json
rename to frameworks/blazor/hello-world-blazor/BlazorApp/Properties/launchSettings.json
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/_Imports.razor b/frameworks/blazor/hello-world-blazor/BlazorApp/_Imports.razor
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/_Imports.razor
rename to frameworks/blazor/hello-world-blazor/BlazorApp/_Imports.razor
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/app.css b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/app.css
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/app.css
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/app.css
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css.map b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css.map
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css.map
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/css/bootstrap/bootstrap.min.css.map
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/decodeImage.js b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/decodeImage.js
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/decodeImage.js
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/decodeImage.js
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js
similarity index 98%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js
index b0b380fc..d50df083 100644
--- a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js
+++ b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/decodeVideo.js
@@ -19,7 +19,7 @@ window.startVideoDecode = async () => {
cvRouter.setInput(cameraEnhancer);
// Define a callback for results.
- cvRouter.addResultReceiver({
+ await cvRouter.addResultReceiver({
onDecodedBarcodesReceived: (result) => {
if (!result.barcodeResultItems.length) return;
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/favicon.png b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/favicon.png
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/favicon.png
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/favicon.png
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/icon-192.png b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/icon-192.png
similarity index 100%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/icon-192.png
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/icon-192.png
diff --git a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/index.html b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/index.html
similarity index 95%
rename from frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/index.html
rename to frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/index.html
index fd4d7ef1..701cc861 100644
--- a/frameworks/blazor/scan-using-foundational-api/hello-world-blazor/BlazorApp/wwwroot/index.html
+++ b/frameworks/blazor/hello-world-blazor/BlazorApp/wwwroot/index.html
@@ -28,7 +28,7 @@