Skip to content

Commit fdcea08

Browse files
CaptureVision instead of BarcodeScanner
* update browser compatibility versions in README.md * PWA caching strategy; iOS pwa fault tolerance; * cache cros script * rep clone before used * Update license information link in read-an-image.html * Refactor README and HTML titles for clarity and consistency across barcode scanning samples * CaptureVision instead of BarcodeScanner * Enhance README with additional configuration details for CaptureVisionRouter --------- Co-authored-by: Keillion <keillionv@gmail.com>
1 parent 054fdcb commit fdcea08

9 files changed

Lines changed: 13 additions & 14 deletions

File tree

frameworks/capacitor/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# 📦 Scan Single Barcode - Capacitor
22

3-
This sample demonstrates how to use the `BarcodeScanner` API from the [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) in a **Capacitor** app to scan a single barcode using the camera.
3+
This sample demonstrates how to use the foundational API from the [Dynamsoft Barcode Reader JavaScript SDK](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) in a **Capacitor** app to scan a single barcode using the camera.
44

55
We use typescript and rollup inside capacitor for demonstration. You can use any framework you like, or even vanilla javascript.
66

77
## ✨ Features
88

99
- Easy integration with pre-built UI
10-
- Renders barcodeScanner inside a Capacitor container
10+
- Renders barcode reader inside a Capacitor container
1111
- Scans one barcode at a time from video
1212

1313
## 🚀 Quick Start

read-an-image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>Hello World (Read an Image)</h1>
2727
*
2828
* 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.
2929
* 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.
30-
* For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/barcode-scanner.html#license&utm_source=samples or contact support@dynamsoft.com.
30+
* For more information, see https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html#license&utm_source=samples or contact support@dynamsoft.com.
3131
* LICENSE ALERT - THE END
3232
*/
3333
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");

scenarios/batch-inventory/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ A lightweight demo for batch scanning and simple inventory collection. The sampl
1717

1818
## 🔧 How it works
1919

20-
- The page creates a BarcodeScanner instance configured for multi-unique capture (SM_MULTI_UNIQUE or equivalent) so duplicate barcodes within the same session are ignored.
2120
- Scanned values are accumulated in-memory and analyzed to produce session metrics (counts, distribution, duration).
2221
- Users can stop a session to view the summary, or restart scanning to begin a new session.
2322

scenarios/batch-inventory/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Batch Inventory with BarcodeScanner</title>
7+
<title>Batch Inventory</title>
88
<link rel="stylesheet" href="./index.css">
99
<!-- Include Dynamsoft Barcode Reader Bundle via CDN -->
1010
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>

scenarios/cart-builder/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ A lightweight demo that simulates a shopping experience: scan a barcode and add
99

1010
## ✨ Features
1111

12-
- Live camera decoding (1D / 2D) using Dynamsoft BarcodeScanner API
12+
- Live camera decoding (1D / 2D) using Dynamsoft Capture Vision API
1313
- Floating, draggable scanner window attached to the page
1414
- Sessioned scans: each unique scan appends a product to the simulated cart
1515
- Demo product list (20 dummy products) and simple cart UI with name and price
1616

1717
## 🔧 How it works
1818

19-
- The page loads the Dynamsoft Barcode Reader bundle and creates a BarcodeScanner instance configured with:
20-
- SM_MULTI_UNIQUE scan mode (to prefer unique entries)
21-
- a duplicateForgetTime to avoid rapid duplicate captures
19+
- The page loads the Dynamsoft Barcode Reader bundle and creates a `CaptureVisionRouter` instance configured with:
20+
- a result deduplication filter enabled to avoid rapid duplicate captures
21+
- a cross verification filter enabled to provide more reliable results
2222
- a scanner UI mounted into a floating container
2323
- When a unique barcode is detected, the sample maps the scan to a random demo product, appends it to the in‑memory cart, and refreshes the cart display.
2424
- The floating scanner can be dragged around the viewport and is hidden when not in use.
@@ -41,4 +41,4 @@ Opening HTML files directly may not work as expected. Instead, run a local devel
4141

4242
- This is a front‑end prototype intended for demo and UX testing only.
4343
- Replace the license key with a valid Dynamsoft license for production/testing beyond the included trial behavior.
44-
- See the repository root `README.md` for running instructions, trial licenses and API documentation links.
44+
- See the repository root `README.md` for running instructions, trial licenses and API documentation links.

scenarios/pick-one-to-fill/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Pick One To Fill with BarcodeScanner</title>
7+
<title>Pick One To Fill</title>
88
<link rel="stylesheet" href="./index.css">
99
<!-- Include Dynamsoft Barcode Reader Bundle via CDN -->
1010
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>

scenarios/scan-1D-Industrial/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A focused demo for decoding industrial-strength 1D barcodes (high-density, damag
1515

1616
## 🔧 How it works
1717

18-
- The page initializes a BarcodeScanner instance with settings optimized for industrial 1D symbols (longer decode windows, direction tolerance, damage-tolerance options).
18+
- The page initializes a `CaptureVisionRouter` instance with settings optimized for industrial 1D symbols (longer decode windows, direction tolerance, damage-tolerance options).
1919
- Decoder parameters are loaded from `ReadOneDIndustrial.json` so you can tweak thresholds, expected symbologies, and scan regions without changing application code.
2020
- The UI accepts live camera input and shows decoded results.
2121

scenarios/scan-and-search/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Scan & Search with BarcodeScanner</title>
7+
<title>Scan & Search</title>
88
<link rel="stylesheet" href="./index.css">
99
<!-- Include Dynamsoft Barcode Reader Bundle via CDN -->
1010
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2001/dist/dbr.bundle.js"></script>

scenarios/scan-dpm-codes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A focused demo for decoding **Direct Part Mark (DPM)** barcodes from camera vide
1616

1717
## 🔧 How it works
1818

19-
- The demo initializes a `BarcodeScanner` instance and loads `ReadDPM.json` via `templateFilePath`, activating DPM-optimized localization and decoding parameters.
19+
- The demo initializes a `CaptureVisionRouter` instance and loads `ReadDPM.json` via `templateFilePath`, activating DPM-optimized localization and decoding parameters.
2020
- A centered scan region is set via `cameraEnhancer.setScanRegion()` to reduce noise from surrounding surfaces.
2121
- Decoded results are surfaced through the standard `launch()` callback; configuration can be tuned via `ReadDPM.json` without changing application code.
2222

0 commit comments

Comments
 (0)