Skip to content

Commit 57167d1

Browse files
committed
Simplify BarcodeScanner guide with minimal code examples and clearer structure
- Streamline Quick Start examples to show one-liner patterns - Separate "Building a Multi-Barcode Scanner Step by Step" section - Move installation options to appendix (CDN, npm/yarn, Self-Hosting) - Clarify unique barcode definition (format + text, 3-second window) - Update API reference with consistent descriptions for duplicateForgetTime and onUniqueBarcodeScanned
1 parent e4ef691 commit 57167d1

2 files changed

Lines changed: 109 additions & 168 deletions

File tree

programming/javascript/api-reference/barcode-scanner.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ interface BarcodeScannerConfig {
150150
| `engineResourcePaths`(optional) | `EngineResourcePaths` | `N/A` | Paths to engine resources like WASM or workers. See [EngineResourcePaths](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/core-module-class.html?product=dbr&lang=javascript#engineresourcepaths) for details. |
151151
| `uiPath` (optional) | `string` | `N/A` | Path to the custom UI (`.xml` template file) for the ScannerView.|
152152
| `barcodeFormats`(optional) | `EnumBarcodeFormat` \| `Array<EnumBarcodeFormat>` | `N/A` | [EnumBarcodeFormat](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr) or an array of `EnumBarcodeFormat` specifying the formats to recognize. |
153-
| `duplicateForgetTime`(optional) | `number` | `3000` | Time interval in milliseconds before duplicate barcodes can be reported again. |
153+
| `duplicateForgetTime`(optional) | `number` | `3000` | Time in milliseconds before a barcode (same format + text) can trigger `onUniqueBarcodeScanned` again. |
154154
| `showPoweredByDynamsoft`(optional) | `boolean` | `true` | Whether to show the "powered by" message. |
155155
| `autoStartCapturing`(optional) | `boolean` | `true` | Whether to start capturing directly after opening the camera. |
156156
| `container`(optional) | `HTMLElement` \| `string` | `N/A` | A container element or selector for rendering the scanner and/or result view. |
157157
| `showResultView`(optional) | `boolean` | `true` | Whether to display a result view in SM_MULTI_UNIQUE mode. |
158158
| `showUploadImageButton`(optional) | `boolean` | `false` | Determines the visibility of the "uploadImage" button that allows the user to upload an image for decoding. |
159159
| `scannerViewConfig`(optional) | `ScannerViewConfig` | see [ScannerViewConfig](#scannerviewconfig) | Configuration for the scanner view. |
160160
| `resultViewConfig`(optional) | `ResultViewConfig` | see [ResultViewConfig](#resultviewconfig) | Configuration for the result view (only valid in SM_MULTI_UNIQUE). |
161-
| `onUniqueBarcodeScanned` | `N/A` | `N/A` | A callback triggered when a unique barcode is scanned (only valid in SM_MULTI_UNIQUE). |
161+
| `onUniqueBarcodeScanned` | `N/A` | `N/A` | A callback triggered when a unique barcode (by format + text) is scanned. Only valid in SM_MULTI_UNIQUE mode. |
162162
| `onInitPrepare` | `N/A` | `N/A` | A callback function that is triggered before the scanner components are initialized. |
163163
| `onInitReady` | `N/A` | `N/A` | Called when the scanner components have been successfully initialized and are ready. |
164164
| `onCameraOpen` | `N/A` | `N/A` | Called when the camera is successfully opened for the first time or after each camera switch. |

0 commit comments

Comments
 (0)