react-native-scanbot-barcode-scanner-sdk 8.0.1-beta.1 → 9.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries.txt +3 -3
- package/RNScanbotBarcodeSDK.podspec +1 -1
- package/android/gradle.properties +1 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.kt +22 -19
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerView.kt +34 -9
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewManager.kt +5 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/models/ScanbotBarcodeScannerModels.kt +7 -0
- package/android/src/paper/com/facebook/react/viewmanagers/ScanbotBarcodeScannerViewManagerDelegate.java +3 -0
- package/android/src/paper/com/facebook/react/viewmanagers/ScanbotBarcodeScannerViewManagerInterface.java +1 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.m +4 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.mm +4 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewController+Utils.swift +1 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewController.swift +8 -1
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewManager.mm +1 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewOperators.h +1 -0
- package/ios/ScanbotBarcodeSdk.m +5 -0
- package/lib/commonjs/Barcode.js +7 -0
- package/lib/commonjs/Barcode.js.map +1 -1
- package/lib/commonjs/components/barcode-camera-view/ScanbotBarcodeCameraView.js +2 -1
- package/lib/commonjs/components/barcode-camera-view/ScanbotBarcodeCameraView.js.map +1 -1
- package/lib/commonjs/components/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -1
- package/lib/commonjs/impl/BarcodeScannerImpl.js +3 -0
- package/lib/commonjs/impl/BarcodeScannerImpl.js.map +1 -1
- package/lib/commonjs/types/base/SdkConfiguration.js +7 -0
- package/lib/commonjs/types/base/SdkConfiguration.js.map +1 -1
- package/lib/commonjs/types/core/barcode/BarcodeConfigurationTypes.js +29 -3
- package/lib/commonjs/types/core/barcode/BarcodeConfigurationTypes.js.map +1 -1
- package/lib/commonjs/types/core/barcode/BarcodeScannerTypes.js +21 -9
- package/lib/commonjs/types/core/barcode/BarcodeScannerTypes.js.map +1 -1
- package/lib/commonjs/types/core/barcode/BarcodeTypes.js +16 -1
- package/lib/commonjs/types/core/barcode/BarcodeTypes.js.map +1 -1
- package/lib/commonjs/types/core/generic_document/BarcodeDocumentModel.js +1 -1
- package/lib/commonjs/types/core/image/ImageRefTypes.js +26 -6
- package/lib/commonjs/types/core/image/ImageRefTypes.js.map +1 -1
- package/lib/commonjs/types/core/image/image.js +3 -3
- package/lib/commonjs/types/core/image/image.js.map +1 -1
- package/lib/commonjs/types/core/licensing/LicensingTypes.js +3 -1
- package/lib/commonjs/types/core/licensing/LicensingTypes.js.map +1 -1
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js +4 -0
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +1 -1
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeTextLocalization.js +36 -0
- package/lib/commonjs/types/core/ui_v2/barcode/BarcodeTextLocalization.js.map +1 -1
- package/lib/commonjs/types/core/ui_v2/common/ActionBarConfiguration.js +4 -0
- package/lib/commonjs/types/core/ui_v2/common/ActionBarConfiguration.js.map +1 -1
- package/lib/commonjs/types/core/ui_v2/common/CameraConfiguration.js +21 -2
- package/lib/commonjs/types/core/ui_v2/common/CameraConfiguration.js.map +1 -1
- package/lib/commonjs/types/core/ui_v2/common/Common.js +18 -0
- package/lib/commonjs/types/core/ui_v2/common/Common.js.map +1 -1
- package/lib/module/Barcode.js +7 -0
- package/lib/module/Barcode.js.map +1 -1
- package/lib/module/components/barcode-camera-view/ScanbotBarcodeCameraView.js +2 -1
- package/lib/module/components/barcode-camera-view/ScanbotBarcodeCameraView.js.map +1 -1
- package/lib/module/components/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -1
- package/lib/module/impl/BarcodeScannerImpl.js +3 -0
- package/lib/module/impl/BarcodeScannerImpl.js.map +1 -1
- package/lib/module/types/base/SdkConfiguration.js +7 -0
- package/lib/module/types/base/SdkConfiguration.js.map +1 -1
- package/lib/module/types/core/barcode/BarcodeConfigurationTypes.js +29 -3
- package/lib/module/types/core/barcode/BarcodeConfigurationTypes.js.map +1 -1
- package/lib/module/types/core/barcode/BarcodeScannerTypes.js +21 -9
- package/lib/module/types/core/barcode/BarcodeScannerTypes.js.map +1 -1
- package/lib/module/types/core/barcode/BarcodeTypes.js +15 -0
- package/lib/module/types/core/barcode/BarcodeTypes.js.map +1 -1
- package/lib/module/types/core/generic_document/BarcodeDocumentModel.js +1 -1
- package/lib/module/types/core/image/ImageRefTypes.js +26 -6
- package/lib/module/types/core/image/ImageRefTypes.js.map +1 -1
- package/lib/module/types/core/image/image.js +3 -3
- package/lib/module/types/core/image/image.js.map +1 -1
- package/lib/module/types/core/licensing/LicensingTypes.js +3 -1
- package/lib/module/types/core/licensing/LicensingTypes.js.map +1 -1
- package/lib/module/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js +4 -0
- package/lib/module/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.js.map +1 -1
- package/lib/module/types/core/ui_v2/barcode/BarcodeTextLocalization.js +36 -0
- package/lib/module/types/core/ui_v2/barcode/BarcodeTextLocalization.js.map +1 -1
- package/lib/module/types/core/ui_v2/common/ActionBarConfiguration.js +4 -0
- package/lib/module/types/core/ui_v2/common/ActionBarConfiguration.js.map +1 -1
- package/lib/module/types/core/ui_v2/common/CameraConfiguration.js +20 -1
- package/lib/module/types/core/ui_v2/common/CameraConfiguration.js.map +1 -1
- package/lib/module/types/core/ui_v2/common/Common.js +18 -0
- package/lib/module/types/core/ui_v2/common/Common.js.map +1 -1
- package/lib/typescript/src/Barcode.d.ts +5 -0
- package/lib/typescript/src/Barcode.d.ts.map +1 -1
- package/lib/typescript/src/Sdk.d.ts +1 -0
- package/lib/typescript/src/Sdk.d.ts.map +1 -1
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraView.d.ts.map +1 -1
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts +4 -2
- package/lib/typescript/src/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts.map +1 -1
- package/lib/typescript/src/components/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts +2 -0
- package/lib/typescript/src/components/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/types/base/SdkConfiguration.d.ts +4 -0
- package/lib/typescript/src/types/base/SdkConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/types/core/barcode/BarcodeConfigurationTypes.d.ts +20 -3
- package/lib/typescript/src/types/core/barcode/BarcodeConfigurationTypes.d.ts.map +1 -1
- package/lib/typescript/src/types/core/barcode/BarcodeScannerTypes.d.ts +15 -6
- package/lib/typescript/src/types/core/barcode/BarcodeScannerTypes.d.ts.map +1 -1
- package/lib/typescript/src/types/core/barcode/BarcodeTypes.d.ts +23 -0
- package/lib/typescript/src/types/core/barcode/BarcodeTypes.d.ts.map +1 -1
- package/lib/typescript/src/types/core/image/ImageRefTypes.d.ts +20 -6
- package/lib/typescript/src/types/core/image/ImageRefTypes.d.ts.map +1 -1
- package/lib/typescript/src/types/core/image/image.d.ts.map +1 -1
- package/lib/typescript/src/types/core/licensing/LicensingTypes.d.ts +7 -1
- package/lib/typescript/src/types/core/licensing/LicensingTypes.d.ts.map +1 -1
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeTextLocalization.d.ts +24 -0
- package/lib/typescript/src/types/core/ui_v2/barcode/BarcodeTextLocalization.d.ts.map +1 -1
- package/lib/typescript/src/types/core/ui_v2/common/ActionBarConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/types/core/ui_v2/common/CameraConfiguration.d.ts +24 -1
- package/lib/typescript/src/types/core/ui_v2/common/CameraConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/types/core/ui_v2/common/Common.d.ts +12 -0
- package/lib/typescript/src/types/core/ui_v2/common/Common.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Barcode.ts +7 -0
- package/src/components/barcode-camera-view/ScanbotBarcodeCameraView.tsx +1 -0
- package/src/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.ts +4 -2
- package/src/components/spec/ScanbotBarcodeScannerViewNativeComponent.ts +2 -0
- package/src/impl/BarcodeScannerImpl.ts +4 -0
- package/src/types/base/SdkConfiguration.ts +8 -0
- package/src/types/core/barcode/BarcodeConfigurationTypes.ts +30 -3
- package/src/types/core/barcode/BarcodeScannerTypes.ts +21 -9
- package/src/types/core/barcode/BarcodeTypes.ts +28 -0
- package/src/types/core/generic_document/BarcodeDocumentModel.ts +1 -1
- package/src/types/core/image/ImageRefTypes.ts +26 -6
- package/src/types/core/image/image.ts +15 -7
- package/src/types/core/licensing/LicensingTypes.ts +8 -1
- package/src/types/core/ui_v2/barcode/BarcodeScannerScreenConfiguration.ts +4 -0
- package/src/types/core/ui_v2/barcode/BarcodeTextLocalization.ts +36 -0
- package/src/types/core/ui_v2/common/ActionBarConfiguration.ts +4 -0
- package/src/types/core/ui_v2/common/CameraConfiguration.ts +37 -1
- package/src/types/core/ui_v2/common/Common.ts +18 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/core/ui_v2/common/Common.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,W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,MAAM,GAAE,WAAW,CAAC,UAAU,CAAM;CAWxD;AAED;;EAEE;AACF,qBAAa,WAAW;IACtB;;;;QAII;IACG,OAAO,EAAE,OAAO,CAAQ;IAC/B;;;;QAII;IACG,wBAAwB,EAAE,MAAM,CAAM;IAC7C;;;;QAII;IACG,eAAe,EAAE,MAAM,CAAe;IAC7C;;;;QAII;IACG,eAAe,EAAE,MAAM,CAAa;IAC3C;;;;QAII;IACG,qBAAqB,EAAE,MAAM,CAAa;IACjD;;;;QAII;IACG,qBAAqB,EAAE,MAAM,CAAa;IAEjD,8DAA8D;gBAC3C,MAAM,GAAE,WAAW,CAAC,WAAW,CAAM;
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/core/ui_v2/common/Common.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;EAEE;AACF,qBAAa,OAAO;IAClB;;;;QAII;IACG,cAAc,EAAE,MAAM,CAAa;IAC1C;;;;QAII;IACG,sBAAsB,EAAE,MAAM,CAAa;IAClD;;;;QAII;IACG,eAAe,EAAE,MAAM,CAAa;IAC3C;;;;QAII;IACG,eAAe,EAAE,MAAM,CAAa;IAC3C;;;;QAII;IACG,cAAc,EAAE,MAAM,CAAa;IAC1C;;;;QAII;IACG,gBAAgB,EAAE,MAAM,CAAa;IAC5C;;;;QAII;IACG,wBAAwB,EAAE,MAAM,CAAa;IACpD;;;;QAII;IACG,gBAAgB,EAAE,MAAM,CAAa;IAC5C;;;;QAII;IACG,kBAAkB,EAAE,MAAM,CAAa;IAC9C;;;;QAII;IACG,cAAc,EAAE,MAAM,CAAa;IAC1C;;;;QAII;IACG,cAAc,EAAE,MAAM,CAAa;IAC1C;;;;QAII;IACG,uBAAuB,EAAE,MAAM,CAAa;IACnD;;;;QAII;IACG,gBAAgB,EAAE,MAAM,CAAa;IAC5C;;;;QAII;IACG,iBAAiB,EAAE,MAAM,CAAe;IAC/C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
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-scanbot-barcode-scanner-sdk",
|
|
3
3
|
"title": "Scanbot Barcode Scanner SDK for React Native",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.0-rc.2",
|
|
5
5
|
"description": "Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
7
7
|
"module": "lib/module/index",
|
package/src/Barcode.ts
CHANGED
|
@@ -28,6 +28,13 @@ export const ScanbotBarcode = {
|
|
|
28
28
|
): Promise<ResultWrapper<BarcodeScannerUiResult>> {
|
|
29
29
|
return ScanbotBarcodeImpl.startScanner(configuration);
|
|
30
30
|
},
|
|
31
|
+
/**
|
|
32
|
+
* Forces the Ready-To-Use UI Barcode scanner to close if it is currently open.
|
|
33
|
+
* @returns {Promise<void>}
|
|
34
|
+
*/
|
|
35
|
+
async forceCloseScanner(): Promise<void> {
|
|
36
|
+
return ScanbotBarcodeImpl.forceCloseScanner();
|
|
37
|
+
},
|
|
31
38
|
/**
|
|
32
39
|
* Scans Barcode from a given image with the desired configuration.
|
|
33
40
|
* @param {ImageInput} params.image - The image to be used for scanning.
|
|
@@ -138,6 +138,7 @@ export const ScanbotBarcodeCameraView = forwardRef<
|
|
|
138
138
|
cameraZoomRange={props.cameraConfig?.cameraZoomRange}
|
|
139
139
|
minFocusDistanceLock={props.cameraConfig?.minFocusDistanceLock}
|
|
140
140
|
cameraModule={props.cameraConfig?.cameraModule}
|
|
141
|
+
cameraTouchToFocusEnabled={props.cameraConfig?.touchToFocusEnabled}
|
|
141
142
|
//SelectionOverlayConfig
|
|
142
143
|
overlayEnabled={props.selectionOverlayConfig?.overlayEnabled}
|
|
143
144
|
overlayPolygonColor={props.selectionOverlayConfig?.polygonColor}
|
|
@@ -74,10 +74,12 @@ export interface CameraConfig {
|
|
|
74
74
|
cameraZoomFactor?: number;
|
|
75
75
|
/** The range of valid camera zoom factors. Default value is (1.0; 12.0). */
|
|
76
76
|
cameraZoomRange?: ZoomRange;
|
|
77
|
-
/** The camera module to be used for barcode scanning */
|
|
77
|
+
/** The camera module to be used for barcode scanning. */
|
|
78
78
|
cameraModule?: CameraModule;
|
|
79
|
-
/** Lock focus distance withing the minimum possible range */
|
|
79
|
+
/** Lock focus distance withing the minimum possible range. */
|
|
80
80
|
minFocusDistanceLock?: boolean;
|
|
81
|
+
/** Determines whether touch-to-focus is enabled or not. */
|
|
82
|
+
touchToFocusEnabled?: boolean;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
/** The selection overlay configuration. */
|
|
@@ -49,6 +49,7 @@ export interface NativeFormatConfigurations {
|
|
|
49
49
|
qr?: boolean;
|
|
50
50
|
microQr?: boolean;
|
|
51
51
|
rmqr?: boolean;
|
|
52
|
+
twoDDecoderMode?: string;
|
|
52
53
|
australiaPostCustomerFormat?: string;
|
|
53
54
|
formats?: string[];
|
|
54
55
|
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: Double;
|
|
@@ -88,6 +89,7 @@ interface NativeProps extends ViewProps {
|
|
|
88
89
|
maxZoom?: WithDefault<Float, 12.0>;
|
|
89
90
|
};
|
|
90
91
|
cameraModule?: WithDefault<string, 'BACK'>;
|
|
92
|
+
cameraTouchToFocusEnabled?: WithDefault<boolean, true>;
|
|
91
93
|
hardwareButtonsEnabled?: WithDefault<boolean, true>;
|
|
92
94
|
scanningEnabled?: WithDefault<boolean, true>;
|
|
93
95
|
minFocusDistanceLock?: WithDefault<boolean, false>;
|
|
@@ -78,6 +78,10 @@ export const ScanbotBarcodeImpl = {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
+
forceCloseScanner(): Promise<void> {
|
|
82
|
+
return withSBErrorHandling(ScanbotBarcodeSDKModule.forceCloseBarcodeScanner);
|
|
83
|
+
},
|
|
84
|
+
|
|
81
85
|
scanFromImage(params: {
|
|
82
86
|
image: ImageInput;
|
|
83
87
|
configuration: BarcodeScannerConfiguration;
|
|
@@ -53,6 +53,10 @@ export class SdkConfiguration {
|
|
|
53
53
|
Default is true
|
|
54
54
|
*/
|
|
55
55
|
public allowXnnpackAcceleration: boolean = true;
|
|
56
|
+
/**
|
|
57
|
+
Optional directory as file URI for temporary on-disk storage of `ImageRef` image data. Hibernated images can later be restored as `ImageRef` instances.
|
|
58
|
+
*/
|
|
59
|
+
public hibernationDirectory: string | null = null;
|
|
56
60
|
|
|
57
61
|
/** @param source {@displayType `DeepPartial<SdkConfiguration>`} */
|
|
58
62
|
public constructor(source: DeepPartial<SdkConfiguration> = {}) {
|
|
@@ -92,6 +96,10 @@ export class SdkConfiguration {
|
|
|
92
96
|
if (source.allowXnnpackAcceleration !== undefined) {
|
|
93
97
|
this.allowXnnpackAcceleration = source.allowXnnpackAcceleration;
|
|
94
98
|
}
|
|
99
|
+
if (source.hibernationDirectory !== undefined) {
|
|
100
|
+
this.hibernationDirectory =
|
|
101
|
+
source.hibernationDirectory != null ? source.hibernationDirectory : null;
|
|
102
|
+
}
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
BarcodeFormat,
|
|
7
7
|
Gs1Handling,
|
|
8
8
|
OneDConfirmationMode,
|
|
9
|
+
TwoDDecodingMode,
|
|
9
10
|
UpcEanExtensionBehavior,
|
|
10
11
|
} from './BarcodeTypes';
|
|
11
12
|
|
|
@@ -1481,11 +1482,10 @@ export class BarcodeFormatUpcEanConfiguration {
|
|
|
1481
1482
|
public stripCheckDigits: boolean = false;
|
|
1482
1483
|
/**
|
|
1483
1484
|
If true, the scanner will try extra-hard to scan barcodes with heavy blur or that are otherwise damaged.
|
|
1484
|
-
Enabling this option may increase the number of misreads (false positives).
|
|
1485
1485
|
|
|
1486
|
-
Default is
|
|
1486
|
+
Default is true
|
|
1487
1487
|
*/
|
|
1488
|
-
public enableOneDBlurScanner: boolean =
|
|
1488
|
+
public enableOneDBlurScanner: boolean = true;
|
|
1489
1489
|
/**
|
|
1490
1490
|
If true, scan and return valid EAN-8 barcodes.
|
|
1491
1491
|
|
|
@@ -1999,6 +1999,12 @@ export class BarcodeFormatDataMatrixConfiguration {
|
|
|
1999
1999
|
Default is PARSE
|
|
2000
2000
|
*/
|
|
2001
2001
|
public gs1Handling: Gs1Handling = 'PARSE';
|
|
2002
|
+
/**
|
|
2003
|
+
Allows to select the balance between decoding speed and recall in harsh conditions such as barcodes on curved surfaces or partial occlusions.
|
|
2004
|
+
|
|
2005
|
+
Default is HIGH_EFFORT
|
|
2006
|
+
*/
|
|
2007
|
+
public twoDDecoderMode: TwoDDecodingMode = 'HIGH_EFFORT';
|
|
2002
2008
|
|
|
2003
2009
|
/** @param source {@displayType `DeepPartial<BarcodeFormatDataMatrixConfiguration>`} */
|
|
2004
2010
|
public constructor(source: DeepPartial<BarcodeFormatDataMatrixConfiguration> = {}) {
|
|
@@ -2014,6 +2020,9 @@ export class BarcodeFormatDataMatrixConfiguration {
|
|
|
2014
2020
|
if (source.gs1Handling !== undefined) {
|
|
2015
2021
|
this.gs1Handling = source.gs1Handling;
|
|
2016
2022
|
}
|
|
2023
|
+
if (source.twoDDecoderMode !== undefined) {
|
|
2024
|
+
this.twoDDecoderMode = source.twoDDecoderMode;
|
|
2025
|
+
}
|
|
2017
2026
|
}
|
|
2018
2027
|
}
|
|
2019
2028
|
|
|
@@ -2556,6 +2565,12 @@ export class BarcodeFormatCommonOneDConfiguration {
|
|
|
2556
2565
|
Default is THOROUGH
|
|
2557
2566
|
*/
|
|
2558
2567
|
public oneDConfirmationMode: OneDConfirmationMode = 'THOROUGH';
|
|
2568
|
+
/**
|
|
2569
|
+
If true, the scanner will try extra-hard to scan barcodes with heavy blur or that are otherwise damaged.
|
|
2570
|
+
|
|
2571
|
+
Default is true
|
|
2572
|
+
*/
|
|
2573
|
+
public enableOneDBlurScanner: boolean = true;
|
|
2559
2574
|
/**
|
|
2560
2575
|
List of linear (1D) barcode formats to scan.
|
|
2561
2576
|
*/
|
|
@@ -2616,6 +2631,9 @@ export class BarcodeFormatCommonOneDConfiguration {
|
|
|
2616
2631
|
if (source.oneDConfirmationMode !== undefined) {
|
|
2617
2632
|
this.oneDConfirmationMode = source.oneDConfirmationMode;
|
|
2618
2633
|
}
|
|
2634
|
+
if (source.enableOneDBlurScanner !== undefined) {
|
|
2635
|
+
this.enableOneDBlurScanner = source.enableOneDBlurScanner;
|
|
2636
|
+
}
|
|
2619
2637
|
if (source.formats !== undefined) {
|
|
2620
2638
|
this.formats = source.formats.map((it: DeepPartial<BarcodeFormat>) => {
|
|
2621
2639
|
return it;
|
|
@@ -2851,6 +2869,12 @@ export class BarcodeFormatCommonConfiguration {
|
|
|
2851
2869
|
Default is THOROUGH
|
|
2852
2870
|
*/
|
|
2853
2871
|
public oneDConfirmationMode: OneDConfirmationMode = 'THOROUGH';
|
|
2872
|
+
/**
|
|
2873
|
+
If true, the scanner will try extra-hard to scan barcodes with heavy blur or that are otherwise damaged.
|
|
2874
|
+
|
|
2875
|
+
Default is true
|
|
2876
|
+
*/
|
|
2877
|
+
public enableOneDBlurScanner: boolean = true;
|
|
2854
2878
|
/**
|
|
2855
2879
|
List of barcode formats to scan. By default, the most commonly used formats are enabled.
|
|
2856
2880
|
*/
|
|
@@ -2909,6 +2933,9 @@ export class BarcodeFormatCommonConfiguration {
|
|
|
2909
2933
|
if (source.oneDConfirmationMode !== undefined) {
|
|
2910
2934
|
this.oneDConfirmationMode = source.oneDConfirmationMode;
|
|
2911
2935
|
}
|
|
2936
|
+
if (source.enableOneDBlurScanner !== undefined) {
|
|
2937
|
+
this.enableOneDBlurScanner = source.enableOneDBlurScanner;
|
|
2938
|
+
}
|
|
2912
2939
|
if (source.formats !== undefined) {
|
|
2913
2940
|
this.formats = source.formats.map((it: DeepPartial<BarcodeFormat>) => {
|
|
2914
2941
|
return it;
|
|
@@ -435,12 +435,6 @@ export class BarcodeScannerConfiguration {
|
|
|
435
435
|
Default is false
|
|
436
436
|
*/
|
|
437
437
|
public returnBarcodeImage: boolean = false;
|
|
438
|
-
/**
|
|
439
|
-
The engine mode for barcode scanning.
|
|
440
|
-
|
|
441
|
-
Default is NEXT_GEN
|
|
442
|
-
*/
|
|
443
|
-
public engineMode: BarcodeScannerEngineMode = 'NEXT_GEN';
|
|
444
438
|
/**
|
|
445
439
|
Configuration to accumulate barcodes across multiple frames in live mode.
|
|
446
440
|
*/
|
|
@@ -453,6 +447,21 @@ export class BarcodeScannerConfiguration {
|
|
|
453
447
|
Default is false
|
|
454
448
|
*/
|
|
455
449
|
public optimizedForOverlays: boolean = false;
|
|
450
|
+
/**
|
|
451
|
+
In single-shot mode, if the combined area of detected barcodes exceeds this fraction of the input image, the scanner returns the result immediately.
|
|
452
|
+
Further scanning is skipped, even if more barcodes may be present.
|
|
453
|
+
This can be used to accelerate scanning when barcode sizes are known in advance.
|
|
454
|
+
To disable this behaviour, the value must be set to 1.0.
|
|
455
|
+
|
|
456
|
+
Default is 0.8
|
|
457
|
+
*/
|
|
458
|
+
public directAcceptanceAreaFraction: number = 0.8;
|
|
459
|
+
/**
|
|
460
|
+
The engine mode for barcode scanning.
|
|
461
|
+
|
|
462
|
+
Default is NEXT_GEN
|
|
463
|
+
*/
|
|
464
|
+
public engineMode: BarcodeScannerEngineMode = 'NEXT_GEN';
|
|
456
465
|
/**
|
|
457
466
|
Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.
|
|
458
467
|
|
|
@@ -485,15 +494,18 @@ export class BarcodeScannerConfiguration {
|
|
|
485
494
|
if (source.returnBarcodeImage !== undefined) {
|
|
486
495
|
this.returnBarcodeImage = source.returnBarcodeImage;
|
|
487
496
|
}
|
|
488
|
-
if (source.engineMode !== undefined) {
|
|
489
|
-
this.engineMode = source.engineMode;
|
|
490
|
-
}
|
|
491
497
|
if (source.accumulationConfig !== undefined) {
|
|
492
498
|
this.accumulationConfig = new BarcodeAccumulationConfiguration(source.accumulationConfig);
|
|
493
499
|
}
|
|
494
500
|
if (source.optimizedForOverlays !== undefined) {
|
|
495
501
|
this.optimizedForOverlays = source.optimizedForOverlays;
|
|
496
502
|
}
|
|
503
|
+
if (source.directAcceptanceAreaFraction !== undefined) {
|
|
504
|
+
this.directAcceptanceAreaFraction = source.directAcceptanceAreaFraction;
|
|
505
|
+
}
|
|
506
|
+
if (source.engineMode !== undefined) {
|
|
507
|
+
this.engineMode = source.engineMode;
|
|
508
|
+
}
|
|
497
509
|
if (source.processingMode !== undefined) {
|
|
498
510
|
this.processingMode = source.processingMode;
|
|
499
511
|
}
|
|
@@ -931,3 +931,31 @@ export const OneDConfirmationModeValues: ReadonlyArray<OneDConfirmationMode> = [
|
|
|
931
931
|
'MODERATE',
|
|
932
932
|
'THOROUGH',
|
|
933
933
|
] as const;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
Allows to select the decoding effort to be spent on decoding 2D barcodes.
|
|
937
|
+
Higher decoding efforts can decode barcodes that are more damaged or have a lower print quality or are printed on
|
|
938
|
+
non-ideal surfaces (e.g. curved surfaces). However, higher decoding efforts also require more processing time.
|
|
939
|
+
|
|
940
|
+
- `LOW_EFFORT`:
|
|
941
|
+
Fast decoding mode. This mode provides the fastest decoding speed, but is less likely to decode damaged or low-quality barcodes.
|
|
942
|
+
Can be used for high-frame-rate scanning where most barcodes are expected to be in good condition or on low processing power devices.
|
|
943
|
+
- `HIGH_EFFORT`:
|
|
944
|
+
High-effort decoding mode. This mode provides the highest decoding success rate for damaged or low-quality barcodes, at the cost of a slower decoding speed.
|
|
945
|
+
*/
|
|
946
|
+
export type TwoDDecodingMode =
|
|
947
|
+
/**
|
|
948
|
+
Fast decoding mode. This mode provides the fastest decoding speed, but is less likely to decode damaged or low-quality barcodes.
|
|
949
|
+
Can be used for high-frame-rate scanning where most barcodes are expected to be in good condition or on low processing power devices.
|
|
950
|
+
*/
|
|
951
|
+
| 'LOW_EFFORT'
|
|
952
|
+
/**
|
|
953
|
+
High-effort decoding mode. This mode provides the highest decoding success rate for damaged or low-quality barcodes, at the cost of a slower decoding speed.
|
|
954
|
+
*/
|
|
955
|
+
| 'HIGH_EFFORT';
|
|
956
|
+
|
|
957
|
+
/** @hidden */
|
|
958
|
+
export const TwoDDecodingModeValues: ReadonlyArray<TwoDDecodingMode> = [
|
|
959
|
+
'LOW_EFFORT',
|
|
960
|
+
'HIGH_EFFORT',
|
|
961
|
+
] as const;
|
|
@@ -415,14 +415,21 @@ Options for saving image to a path.
|
|
|
415
415
|
*/
|
|
416
416
|
export class SaveImageOptions {
|
|
417
417
|
/**
|
|
418
|
-
Quality parameter is for
|
|
419
|
-
In case
|
|
418
|
+
Quality parameter is for JPEG only and is in range 0 to 100. If -1, then the value from hibernation is used.
|
|
419
|
+
In case the ImageRef was created in lazy load-mode and originally has the same format as the requested to save,
|
|
420
420
|
then setting quality to -1 leads to simply copying from source to destination,
|
|
421
|
-
which is time efficient and prevents quality loss caused by
|
|
421
|
+
which is time efficient and prevents quality loss caused by decoding the JPEG and then re-encoding it.
|
|
422
422
|
|
|
423
423
|
Default is -1
|
|
424
424
|
*/
|
|
425
425
|
public quality: number = -1;
|
|
426
|
+
/**
|
|
427
|
+
If `true`, the encoder will spend extra time when saving JPEG files
|
|
428
|
+
to improve the compression rate. Enabling this option has no impact on quality.
|
|
429
|
+
|
|
430
|
+
Default is false
|
|
431
|
+
*/
|
|
432
|
+
public optimize: boolean = false;
|
|
426
433
|
/**
|
|
427
434
|
Encryption mode.
|
|
428
435
|
|
|
@@ -435,6 +442,9 @@ export class SaveImageOptions {
|
|
|
435
442
|
if (source.quality !== undefined) {
|
|
436
443
|
this.quality = source.quality;
|
|
437
444
|
}
|
|
445
|
+
if (source.optimize !== undefined) {
|
|
446
|
+
this.optimize = source.optimize;
|
|
447
|
+
}
|
|
438
448
|
if (source.encryptionMode !== undefined) {
|
|
439
449
|
this.encryptionMode = source.encryptionMode;
|
|
440
450
|
}
|
|
@@ -446,14 +456,21 @@ Options for encoding image.
|
|
|
446
456
|
*/
|
|
447
457
|
export class EncodeImageOptions {
|
|
448
458
|
/**
|
|
449
|
-
Quality parameter is for
|
|
450
|
-
In case
|
|
459
|
+
Quality parameter is for JPEG only and is in range 0 to 100. If -1, then the value from hibernation is used.
|
|
460
|
+
In case the ImageRef was created in lazy load-mode and originally has the same format as the requested to save,
|
|
451
461
|
then setting quality to -1 leads to simply copying from source to destination,
|
|
452
|
-
which is time efficient and prevents quality loss caused by
|
|
462
|
+
which is time efficient and prevents quality loss caused by decoding the JPEG and then re-encoding it.
|
|
453
463
|
|
|
454
464
|
Default is -1
|
|
455
465
|
*/
|
|
456
466
|
public quality: number = -1;
|
|
467
|
+
/**
|
|
468
|
+
If `true`, the encoder will spend extra time when saving JPEG files
|
|
469
|
+
to improve the compression rate. Enabling this option has no impact on quality.
|
|
470
|
+
|
|
471
|
+
Default is false
|
|
472
|
+
*/
|
|
473
|
+
public optimize: boolean = false;
|
|
457
474
|
/**
|
|
458
475
|
Image format.
|
|
459
476
|
|
|
@@ -466,6 +483,9 @@ export class EncodeImageOptions {
|
|
|
466
483
|
if (source.quality !== undefined) {
|
|
467
484
|
this.quality = source.quality;
|
|
468
485
|
}
|
|
486
|
+
if (source.optimize !== undefined) {
|
|
487
|
+
this.optimize = source.optimize;
|
|
488
|
+
}
|
|
469
489
|
if (source.format !== undefined) {
|
|
470
490
|
this.format = source.format;
|
|
471
491
|
}
|
|
@@ -128,11 +128,15 @@ export class ImageRef extends AutoReleasable {
|
|
|
128
128
|
ScanbotBarcodeSDKModule.imageRefDeserialize({ uniqueId: serializedRef.uniqueId })
|
|
129
129
|
.then((success: boolean) => {
|
|
130
130
|
if (!success) {
|
|
131
|
-
console.error(
|
|
131
|
+
console.error(
|
|
132
|
+
`Unsuccessful deserialization of ImageRef with uniqueId ${serializedRef.uniqueId}`
|
|
133
|
+
);
|
|
132
134
|
}
|
|
133
135
|
})
|
|
134
136
|
.catch((error: any) => {
|
|
135
|
-
console.error(
|
|
137
|
+
console.error(
|
|
138
|
+
`Error while deserializing ImageRef with uniqueId ${serializedRef.uniqueId}: ${error}`
|
|
139
|
+
);
|
|
136
140
|
});
|
|
137
141
|
|
|
138
142
|
return new ImageRef(serializedRef.uniqueId, undefined);
|
|
@@ -153,8 +157,8 @@ export class ImageRef extends AutoReleasable {
|
|
|
153
157
|
return null;
|
|
154
158
|
}
|
|
155
159
|
} else {
|
|
156
|
-
this.throwErrorIfUniqueIdIsMissing();
|
|
157
160
|
this.throwErrorIfReleased();
|
|
161
|
+
this.throwErrorIfUniqueIdIsMissing();
|
|
158
162
|
|
|
159
163
|
// The promise is intentionally not awaited here
|
|
160
164
|
ScanbotBarcodeSDKModule.imageRefSerialize({ uniqueId: this.uniqueId })
|
|
@@ -164,7 +168,9 @@ export class ImageRef extends AutoReleasable {
|
|
|
164
168
|
}
|
|
165
169
|
})
|
|
166
170
|
.catch((error: any) => {
|
|
167
|
-
console.error(
|
|
171
|
+
console.error(
|
|
172
|
+
`Error while serializing ImageRef with uniqueId ${this.uniqueId}: ${error}`
|
|
173
|
+
);
|
|
168
174
|
});
|
|
169
175
|
|
|
170
176
|
return { uniqueId: this.uniqueId };
|
|
@@ -290,8 +296,8 @@ export class ImageRef extends AutoReleasable {
|
|
|
290
296
|
if (this._buffer) {
|
|
291
297
|
// NO-OP, ImageRef is already converted.
|
|
292
298
|
} else {
|
|
293
|
-
this.throwErrorIfUniqueIdIsMissing();
|
|
294
299
|
this.throwErrorIfReleased();
|
|
300
|
+
this.throwErrorIfUniqueIdIsMissing();
|
|
295
301
|
|
|
296
302
|
try {
|
|
297
303
|
const imageAsBuffer = await ScanbotBarcodeSDKModule.imageRefEncodeImage({
|
|
@@ -314,13 +320,15 @@ export class ImageRef extends AutoReleasable {
|
|
|
314
320
|
public async encodeImage(options?: EncodeImageOptions): Promise<string | null> {
|
|
315
321
|
if (this._buffer) {
|
|
316
322
|
if (options) {
|
|
317
|
-
throw new InvalidImageRefError(
|
|
323
|
+
throw new InvalidImageRefError(
|
|
324
|
+
'EncodeImageOptions are not available when image is already encoded to base64'
|
|
325
|
+
);
|
|
318
326
|
}
|
|
319
327
|
|
|
320
328
|
return this._buffer;
|
|
321
329
|
} else {
|
|
322
|
-
this.throwErrorIfUniqueIdIsMissing();
|
|
323
330
|
this.throwErrorIfReleased();
|
|
331
|
+
this.throwErrorIfUniqueIdIsMissing();
|
|
324
332
|
|
|
325
333
|
try {
|
|
326
334
|
return await ScanbotBarcodeSDKModule.imageRefEncodeImage({
|
|
@@ -294,6 +294,8 @@ License features.
|
|
|
294
294
|
EHIC scanner.
|
|
295
295
|
- `DOCUMENT_CLASSIFICATION`:
|
|
296
296
|
Document classification.
|
|
297
|
+
- `DOCUMENT_QUALITY_ANALYZER_CONFIGURATOR`:
|
|
298
|
+
Document quality analyzer configurator.
|
|
297
299
|
*/
|
|
298
300
|
export type Feature =
|
|
299
301
|
/**
|
|
@@ -355,7 +357,11 @@ export type Feature =
|
|
|
355
357
|
/**
|
|
356
358
|
Document classification.
|
|
357
359
|
*/
|
|
358
|
-
| 'DOCUMENT_CLASSIFICATION'
|
|
360
|
+
| 'DOCUMENT_CLASSIFICATION'
|
|
361
|
+
/**
|
|
362
|
+
Document quality analyzer configurator.
|
|
363
|
+
*/
|
|
364
|
+
| 'DOCUMENT_QUALITY_ANALYZER_CONFIGURATOR';
|
|
359
365
|
|
|
360
366
|
/** @hidden */
|
|
361
367
|
export const FeatureValues: ReadonlyArray<Feature> = [
|
|
@@ -374,4 +380,5 @@ export const FeatureValues: ReadonlyArray<Feature> = [
|
|
|
374
380
|
'DRIVER_LICENSE_SCANNER',
|
|
375
381
|
'EHIC_SCANNER',
|
|
376
382
|
'DOCUMENT_CLASSIFICATION',
|
|
383
|
+
'DOCUMENT_QUALITY_ANALYZER_CONFIGURATOR',
|
|
377
384
|
] as const;
|
|
@@ -104,6 +104,8 @@ export class BarcodeScannerScreenConfiguration {
|
|
|
104
104
|
flashButton: new RoundButton({
|
|
105
105
|
visible: true,
|
|
106
106
|
accessibilityDescription: '?accessibilityDescriptionFlashButton',
|
|
107
|
+
accessibilityState: '?accessibilityStateFlashOffButton',
|
|
108
|
+
activeAccessibilityState: '?accessibilityStateFlashOnButton',
|
|
107
109
|
backgroundColor: '?sbColorSurfaceHigh',
|
|
108
110
|
foregroundColor: '?sbColorOnPrimary',
|
|
109
111
|
activeBackgroundColor: '?sbColorWarning',
|
|
@@ -120,6 +122,8 @@ export class BarcodeScannerScreenConfiguration {
|
|
|
120
122
|
flipCameraButton: new RoundButton({
|
|
121
123
|
visible: true,
|
|
122
124
|
accessibilityDescription: '?accessibilityDescriptionFlipCameraButton',
|
|
125
|
+
accessibilityState: '?accessibilityStateFlipCameraBackButton',
|
|
126
|
+
activeAccessibilityState: '?accessibilityStateFlipCameraFrontButton',
|
|
123
127
|
backgroundColor: '?sbColorSurfaceHigh',
|
|
124
128
|
foregroundColor: '?sbColorOnPrimary',
|
|
125
129
|
activeBackgroundColor: '?sbColorWarning',
|
|
@@ -203,6 +203,18 @@ export class BarcodeTextLocalization {
|
|
|
203
203
|
Default is "Toggle flash"
|
|
204
204
|
*/
|
|
205
205
|
public accessibilityDescriptionFlashButton: string = 'Toggle flash';
|
|
206
|
+
/**
|
|
207
|
+
Accessibility value for the flash on button.
|
|
208
|
+
|
|
209
|
+
Default is "On"
|
|
210
|
+
*/
|
|
211
|
+
public accessibilityStateFlashOnButton: string = 'On';
|
|
212
|
+
/**
|
|
213
|
+
Accessibility value for the flash off button.
|
|
214
|
+
|
|
215
|
+
Default is "Off"
|
|
216
|
+
*/
|
|
217
|
+
public accessibilityStateFlashOffButton: string = 'Off';
|
|
206
218
|
/**
|
|
207
219
|
Accessibility description for the zoom button.
|
|
208
220
|
|
|
@@ -215,6 +227,18 @@ export class BarcodeTextLocalization {
|
|
|
215
227
|
Default is "Flip camera"
|
|
216
228
|
*/
|
|
217
229
|
public accessibilityDescriptionFlipCameraButton: string = 'Flip camera';
|
|
230
|
+
/**
|
|
231
|
+
Accessibility value for the flip camera back button.
|
|
232
|
+
|
|
233
|
+
Default is "Back"
|
|
234
|
+
*/
|
|
235
|
+
public accessibilityStateFlipCameraBackButton: string = 'Back';
|
|
236
|
+
/**
|
|
237
|
+
Accessibility value for the flip camera front button.
|
|
238
|
+
|
|
239
|
+
Default is "Front"
|
|
240
|
+
*/
|
|
241
|
+
public accessibilityStateFlipCameraFrontButton: string = 'Front';
|
|
218
242
|
/**
|
|
219
243
|
The title of the camera permission dialog.
|
|
220
244
|
|
|
@@ -354,6 +378,12 @@ export class BarcodeTextLocalization {
|
|
|
354
378
|
if (source.accessibilityDescriptionFlashButton !== undefined) {
|
|
355
379
|
this.accessibilityDescriptionFlashButton = source.accessibilityDescriptionFlashButton;
|
|
356
380
|
}
|
|
381
|
+
if (source.accessibilityStateFlashOnButton !== undefined) {
|
|
382
|
+
this.accessibilityStateFlashOnButton = source.accessibilityStateFlashOnButton;
|
|
383
|
+
}
|
|
384
|
+
if (source.accessibilityStateFlashOffButton !== undefined) {
|
|
385
|
+
this.accessibilityStateFlashOffButton = source.accessibilityStateFlashOffButton;
|
|
386
|
+
}
|
|
357
387
|
if (source.accessibilityDescriptionZoomButton !== undefined) {
|
|
358
388
|
this.accessibilityDescriptionZoomButton = source.accessibilityDescriptionZoomButton;
|
|
359
389
|
}
|
|
@@ -361,6 +391,12 @@ export class BarcodeTextLocalization {
|
|
|
361
391
|
this.accessibilityDescriptionFlipCameraButton =
|
|
362
392
|
source.accessibilityDescriptionFlipCameraButton;
|
|
363
393
|
}
|
|
394
|
+
if (source.accessibilityStateFlipCameraBackButton !== undefined) {
|
|
395
|
+
this.accessibilityStateFlipCameraBackButton = source.accessibilityStateFlipCameraBackButton;
|
|
396
|
+
}
|
|
397
|
+
if (source.accessibilityStateFlipCameraFrontButton !== undefined) {
|
|
398
|
+
this.accessibilityStateFlipCameraFrontButton = source.accessibilityStateFlipCameraFrontButton;
|
|
399
|
+
}
|
|
364
400
|
if (source.cameraPermissionEnableCameraTitle !== undefined) {
|
|
365
401
|
this.cameraPermissionEnableCameraTitle = source.cameraPermissionEnableCameraTitle;
|
|
366
402
|
}
|
|
@@ -14,6 +14,8 @@ export class ActionBarConfiguration {
|
|
|
14
14
|
public flashButton: RoundButton = new RoundButton({
|
|
15
15
|
visible: true,
|
|
16
16
|
accessibilityDescription: '?accessibilityDescriptionFlashButton',
|
|
17
|
+
accessibilityState: '?accessibilityStateFlashOffButton',
|
|
18
|
+
activeAccessibilityState: '?accessibilityStateFlashOnButton',
|
|
17
19
|
backgroundColor: '?sbColorSurfaceHigh',
|
|
18
20
|
foregroundColor: '?sbColorOnPrimary',
|
|
19
21
|
activeBackgroundColor: '?sbColorWarning',
|
|
@@ -36,6 +38,8 @@ export class ActionBarConfiguration {
|
|
|
36
38
|
public flipCameraButton: RoundButton = new RoundButton({
|
|
37
39
|
visible: true,
|
|
38
40
|
accessibilityDescription: '?accessibilityDescriptionFlipCameraButton',
|
|
41
|
+
accessibilityState: '?accessibilityStateFlipCameraBackButton',
|
|
42
|
+
activeAccessibilityState: '?accessibilityStateFlipCameraFrontButton',
|
|
39
43
|
backgroundColor: '?sbColorSurfaceHigh',
|
|
40
44
|
foregroundColor: '?sbColorOnPrimary',
|
|
41
45
|
activeBackgroundColor: '?sbColorWarning',
|
|
@@ -36,6 +36,30 @@ export const CameraModuleValues: ReadonlyArray<CameraModule> = [
|
|
|
36
36
|
'BACK_WIDEST',
|
|
37
37
|
] as const;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
Tries to select the camera preview aspect ratio that best matches the given aspect ratio. If no exact match is found, it selects the closest one available. Android only.
|
|
41
|
+
|
|
42
|
+
- `RATIO_4_3`:
|
|
43
|
+
Standard preview aspect ratio used by most of the devices.
|
|
44
|
+
- `RATIO_16_9`:
|
|
45
|
+
Widescreen preview aspect ratio used by some devices.
|
|
46
|
+
*/
|
|
47
|
+
export type CameraPreviewAspectRatio =
|
|
48
|
+
/**
|
|
49
|
+
Standard preview aspect ratio used by most of the devices.
|
|
50
|
+
*/
|
|
51
|
+
| 'RATIO_4_3'
|
|
52
|
+
/**
|
|
53
|
+
Widescreen preview aspect ratio used by some devices.
|
|
54
|
+
*/
|
|
55
|
+
| 'RATIO_16_9';
|
|
56
|
+
|
|
57
|
+
/** @hidden */
|
|
58
|
+
export const CameraPreviewAspectRatioValues: ReadonlyArray<CameraPreviewAspectRatio> = [
|
|
59
|
+
'RATIO_4_3',
|
|
60
|
+
'RATIO_16_9',
|
|
61
|
+
] as const;
|
|
62
|
+
|
|
39
63
|
/**
|
|
40
64
|
Configuration of the camera settings to be used while scanning.
|
|
41
65
|
*/
|
|
@@ -69,7 +93,7 @@ export class CameraConfiguration {
|
|
|
69
93
|
*/
|
|
70
94
|
public minFocusDistanceLock: boolean = false;
|
|
71
95
|
/**
|
|
72
|
-
Determines whether touch-to-focus is enabled or not.
|
|
96
|
+
Determines whether touch-to-focus is enabled or not.
|
|
73
97
|
|
|
74
98
|
Default is false
|
|
75
99
|
*/
|
|
@@ -92,6 +116,10 @@ export class CameraConfiguration {
|
|
|
92
116
|
Default is FILL_IN
|
|
93
117
|
*/
|
|
94
118
|
public cameraPreviewMode: CameraPreviewMode = 'FILL_IN';
|
|
119
|
+
/**
|
|
120
|
+
Tries to select the camera preview aspect ratio that best matches the given aspect ratio. If no exact match is found, it selects the closest one available. Android only.
|
|
121
|
+
*/
|
|
122
|
+
public cameraPreviewAspectRatio: CameraPreviewAspectRatio | null = null;
|
|
95
123
|
/**
|
|
96
124
|
When enabled it allows zooming using camera control button (iPhone 16 series). iOS only.
|
|
97
125
|
|
|
@@ -142,6 +170,14 @@ export class CameraConfiguration {
|
|
|
142
170
|
if (source.cameraPreviewMode !== undefined) {
|
|
143
171
|
this.cameraPreviewMode = source.cameraPreviewMode;
|
|
144
172
|
}
|
|
173
|
+
if (source.cameraPreviewAspectRatio !== undefined) {
|
|
174
|
+
this.cameraPreviewAspectRatio =
|
|
175
|
+
source.cameraPreviewAspectRatio != null
|
|
176
|
+
? CameraPreviewAspectRatioValues.includes(source.cameraPreviewAspectRatio)
|
|
177
|
+
? source.cameraPreviewAspectRatio
|
|
178
|
+
: null
|
|
179
|
+
: null;
|
|
180
|
+
}
|
|
145
181
|
if (source.hardwareButtonsEnabled !== undefined) {
|
|
146
182
|
this.hardwareButtonsEnabled = source.hardwareButtonsEnabled;
|
|
147
183
|
}
|