# Release Notes for Dynamsoft Barcode Reader JavaScript SDK

## 10.5.3000 (04/24/2025)

### New

- Introduced the [BarcodeScanner](https://dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/barcode-scanner.html) class
  - Offers high-level APIs that provide core functionalities
  - Includes pre-built UI for fast and seamless integration
  - Features intuitive configuration objects to simplify both algorithm and UI setup

### Improved

- Merged resource files previously required by the Barcode-Reader-Bundle, significantly reducing the overall size of the `.wasm` file

## 10.4.3100 (01/03/2025)

### New

- Added the [`ShortlineDetectionMode`](https://www.dynamsoft.com/capture-vision/docs/core/parameters/reference/barcode-reader-task-settings/short-line-detection-mode.md) and [`LineAssemblyMode`](https://www.dynamsoft.com/capture-vision/docs/core/parameters/reference/barcode-reader-task-settings/line-assembly-mode.md) parameters for more flexible and precise configuration.
- Added the [`getTemplateNames`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/settings.md#gettemplatenames) function to the `CaptureVisionRouter` class to improve accessibility and usability of templates.

### Fixed

- Fixed a bug that could cause a crash when using specific templates.
- Fixed a bug in DPM mode where the `isMirrored` value in the `BarcodeResultItem` was not correctly assigned.
- Fixed a bug where DotCode could not be decoded in certain scenarios.

## 10.4.2002 (10/24/2024)

### New

- Added support for decoding add-on codes (also known as Extension Codes) for UPC-A, UPC-E, EAN-8 and EAN-13 codes.

  <div align="center">
    <p><img src="https://www.dynamsoft.com/barcode-reader/docs/core/assets/img/add-on-barcodes.png" width="60%" alt="add-on-barcodes"></p>
  </div>

- Added new properties to the `QRCodeDetails` interface including:
  - `dataMaskPattern`
  - `codewords`

### Improved

- Improved the read rate and processing speed for the following barcode formats:
  - EAN-13
  - DotCode

### Changed

- Updated the enumeration value of `EnumBarcodeFormat.BF_ALL` to `0xFFFFFFFEFFFFFFFF`, which no longer includes non-standard barcodes.

### Fixed

- Fixed a bug that could prevent the reading of `GS1_DATABAR_EXPANDED_STACKED` barcodes.

### Changes to other support modules

#### DynamsoftCameraEnhancer

- A new preset UI template has been added, which can be used and modified as needed.

#### DynamsoftCaptureVisionRouter

- Updated error handling logic for the `capturing` and `startCapturing` methods to clearly report errors specifically related to licensing issues.
- Added a new callback function, `OnRawTextLinesReceived`, to the `IntermediateResultReceiver` interface.
- Added `EnumPresetTemplate`, an enumeration of all preset template names.

#### DynamsoftCore

- Optimized the path auto-filling mechanism, now allowing the definition of only the root path without the need to separately define the resource file locations for each submodule. Read more about [engineResourcePaths](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/core-module-class.md#engineresourcepaths).
- Added new error codes
  - -10076: The license is initialized successfully but detected invalid content in the key.
  - -30063: [Barcode Reader] No license found.
- Added a new enumeration member `IRUT_RAW_TEXT_LINES` to the `EnumIntermediateResultUnitType`.

#### DynamsoftLicense

- Introduced a new charging method, `TimeSliceCount`, which tracks usage based on time.
- Improved duplicate license handling: after successfully creating an instance, setting the same license again no longer causes an exception.
- Updated the error messages for the `initLicense` method, providing more detailed feedback if license initialization fails. Warnings are now shown if the license is initialized successfully but part of the key is invalid.

#### DynamsoftImageProcessing

- Fixed a crash caused by the use of `RegEx`.

#### DynamsoftUtility

- Fixed an issue where the method `CaptureVisionRouter.startCapturing()` would mistakenly halt the fetching process when running, resulting in unnecessary stops and restarts.

## 10.2.10 (04/03/2024)

#### New

- Updated the template system
  - Added `StringLengthRange` for [`TextDetectionMode`](https://www.dynamsoft.com/capture-vision/docs-archive/core/parameters/reference/image-parameter/text-detection-mode.md).
  - Added Argument `BarcodeFormat` for [`DPMCodeReadingModes`](https://www.dynamsoft.com/capture-vision/docs-archive/core/parameters/reference/barcode-reader-task-settings/dpm-code-reading-modes.md). Currently, you can specify "BF_DATAMATRIX"  or "BF_QR_CODE" for the parameter.
  - Added `ReferenceTaskNameArray` under [`Location.ReferenceObjectFilter`](https://www.dynamsoft.com/capture-vision/docs-archive/core/parameters/reference/target-roi-def/location.md#referenceobjectfilter) to filter the reference objects generated by the task name.
  - Added the support of the [`OutputTaskSetting`](https://www.dynamsoft.com/capture-vision/docs-archive/core/parameters/reference/output-task-setting/index.md) definition. The following sub-parameters are available in `OutputTaskSetting` object:
    - `OutputCondition`
    - `TaskResultArray`
    - `TargetROIDefName`
    - `TaskSettingNameArray`
    - `BackwardReferenceOutput`
    - `ReferenceTaskNameArray`
    - `ReferenceResultTypeArray`
    - `Operator`
  - [`Offset`](https://www.dynamsoft.com/capture-vision/docs-archive/core/parameters/reference/target-roi-def/location.md#offset) parameter is optimized.
    - Added `ReferenceObjectType` to specify whether the reference object is an atomic object or the whole image.
    - Added `ReferenceXAxis` & `ReferenceYAxis` to define the X & Y axis.
    - Modified `FirstPoint`, `SecondPoint`, `ThirdPoint` & `FourthPoint`. You can specify whether the X or Y coordinate of the point is measured by percentage.
    - Deprecated `ReferenceObjectSize` Type.
- Added the following new error codes
  - `EC_IMAGE_SIZE_NOT_MATCH`
  - `EC_IMAGE_PIXEL_FORMAT_NOT_MATCH`
  - `EC_SECTION_LEVEL_RESULT_IRREPLACEABLE`
  - `EC_AXIS_DEFINITION_INCORRECT`
  - `EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT`
  - `EC_TEXT_LINE_GROUP_REGEX_CONFLICT`
- Added [`ObservationParameters`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/intermediate-results/observation-parameters.md) interface for allowing the configuration of intermediate result observation.
- Added a new call back function [`onShortLinesUnitReceived`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/intermediate-result-receiver.md#onshortlinesunitreceived) to the `IntermediateResultReceiver` class.
- Added a new supported image pixel format, binary 8 inverted. The corresponding enumeration member is added to the [`EnumImagePixelFormat`](https://www.dynamsoft.com/capture-vision/docs-archive/core/enums/core/image-pixel-format.md).
- Update [`MultiFrameResultCrossFilter`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.md) class to allow string type for resultItemType.
- Update [`TextZonesUnit`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/intermediate-results/text-zones-unit.md) interface, now using [`TextZone`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/basic-structures/text-zone.md) interface to record text zone data.
- Update [`CandidateBarcodeZonesUnit`](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/candidate-barcode-zones-unit.md) interface, now using [`CandidateBarcodeZone`](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/candidate-barcode-zone.md) to record candidate barcode zone data instead of `Quadrilateral`.
- Update [`DeformationResistedBarcodeImageUnit`](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/deformation-resisted-barcode-image-unit.md) interface, now using [`DeformationResistedBarcode`](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/deformation-resisted-barcode.md) interface to record deformation resisted barcode data.

#### Improved

- Updated the security of the DynamsoftBarcodeReader library and other corresponding dependent libraries.

#### Fixed

- Fix the issue of camera not opening in iOS 17.4.

#### Breaking Changes

- The interface [`CapturedResult`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/captured-result.md) is migrated from `DynamsoftCore` module to `DynamsoftCaptureVisionRouter` module.
- Changed the logic of the `capturedResultItemTypes` setting of [`SimplifiedCaptureVisionSettings`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.md):
  - If the result item types don't match the specified template, the method [`updateSettings`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/settings.md#updatesettings) will return the error code `EC_PARAMETER_VALUE_INVALID` with the message "The captured result item types do not match the task configurations in the template".
  - Based on the `capturedResultItemTypes` setting, the irrelevant tasks will be removed from the template.
  - The `capturedResultItemTypes` should include at least one of the `CRIT_BAR_CODE`, `CRIT_TEXT_LINE`, `CRIT_DETECTED_QUAD`, `CRIT_NORMALIZED_IMAGE`. Otherwise, the method [`updateSettings`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/settings.md#updatesettings) will return the error code `EC_PARAMETER_VALUE_INVALID` with the message "The captured result item types should contain at least one task result type".
- Refactored the [`Contour`](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/basic-structures/contour.md) interface. Please view API reference - `Contour` interface for more information.

## 10.0.21 (02/05/2024)

#### Improved

- Introduced `dbr.bundle.js` to include packages that are required to run Dynamsoft Barcode Reader to reduce the complexity of the code.

## 10.0.20 (01/29/2024)

### Changelog

In this version, the SDK has been refactored under the `DynamsoftCaptureVision` (DCV) architecture. To learn more about the architecture, please see [Architecture of Dynamsoft Capture Vision](https://www.dynamsoft.com/capture-vision/docs/core/architecture/index.md). The following highlights the major changes: 

* The class `BarcodeReader` and `BarcodeScanner` were removed and their functionalities are now incorporated into the newly added Class `CaptureVisionRouter`.

* License-related functions are handled by class [Dynamsoft.License.LicenseManager](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/license/license-manager.md#initLicense).

* Camera-related functions are handled by [DynamsoftCameraEnhancer(DCE)](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/index.md). Please note that the following features are grouped together as enhanced features that require a license:
  * Enhanced-focus.
  * Auto-zoom.
  * Tap-to-focus.

* This version of `BarcodeReader` only accepts `DynamsoftCameraEnhancer(DCE)` version 4.0.1 and above, which has been refactored to be compliant with the [ImageSourceAdapter (ISA) interface](https://www.dynamsoft.com/capture-vision/docs/core/architecture/input.md#image-source-adapter), as a valid image source.

* Decoded barcode results are returned via the [CapturedResultReceiver (CRR) interface](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.md#captured-result-receiver).

* For the full list of API changes, please refer to the [v9 to v10 Upgrade Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/upgrade-guide/9to10.md).
