UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

110 lines (96 loc) 2.98 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/common/CameraConfiguration.yaml import { PartiallyConstructible } from '../../utils/utils'; /** Determines which camera module to use on start-up. - `FRONT`: Use the front camera. - `BACK`: Use the default back camera. - `BACK_WIDEST`: Use the back camera with the widest available angle. iOS only. */ export const CameraModuleValues = ['FRONT', 'BACK', 'BACK_WIDEST']; /** Configuration of the camera settings to be used while scanning. */ export class CameraConfiguration extends PartiallyConstructible { /** Determines which camera module to use on start-up. Default is BACK */ cameraModule = 'BACK'; /** The zoom steps available to the user. */ zoomSteps = [1.0, 2.0, 5.0]; /** The default zoom factor on start-up. Default is 1.0 */ defaultZoomFactor = 1.0; /** Determines whether the flash is enabled on start-up. Default is false */ flashEnabled = false; /** Determines whether to lock the focus at the minimum possible distance (device-specific). Default is false */ minFocusDistanceLock = false; /** Determines whether touch-to-focus is enabled or not. Android only. Default is false */ touchToFocusEnabled = false; /** Determines whether pinch-to-zoom is enabled or not. Default is true */ pinchToZoomEnabled = true; /** Determines which mode to use when orientation should be locked to landscape or portrait. Default is NONE */ orientationLockMode = 'NONE'; /** Determines which camera preview mode to use. Default is FILL_IN */ cameraPreviewMode = 'FILL_IN'; /** @param source {@displayType `DeepPartial<CameraConfiguration>`} */ constructor(source = {}) { super(); if (source.cameraModule !== undefined) { this.cameraModule = source.cameraModule; } if (source.zoomSteps !== undefined) { this.zoomSteps = source.zoomSteps.map(it => { return it; }); } if (source.defaultZoomFactor !== undefined) { this.defaultZoomFactor = source.defaultZoomFactor; } if (source.flashEnabled !== undefined) { this.flashEnabled = source.flashEnabled; } if (source.minFocusDistanceLock !== undefined) { this.minFocusDistanceLock = source.minFocusDistanceLock; } if (source.touchToFocusEnabled !== undefined) { this.touchToFocusEnabled = source.touchToFocusEnabled; } if (source.pinchToZoomEnabled !== undefined) { this.pinchToZoomEnabled = source.pinchToZoomEnabled; } if (source.orientationLockMode !== undefined) { this.orientationLockMode = source.orientationLockMode; } if (source.cameraPreviewMode !== undefined) { this.cameraPreviewMode = source.cameraPreviewMode; } } } //# sourceMappingURL=CameraConfiguration.js.map