scanbot-web-sdk
Version:
Scanbot Web Document and Barcode Scanner SDK
82 lines (80 loc) • 2.26 kB
TypeScript
import type { DeepPartial } from "../utils";
import { CameraLiveScannerResolution } from "../sdk/Camera";
/**
The ideal resolution of the camera preview.
*/
export declare class Resolution {
/**
Width of the resolution.
*/
width: number;
/**
Height of the resolution.
*/
height: number;
/** @param source {@displayType `DeepPartial<Resolution>`} */
constructor(source?: DeepPartial<Resolution>);
}
/**
Determines which camera module to use on start-up.
- `FRONT`:
Use the front camera.
- `BACK`:
Use the default back camera.
*/
export type CameraModule =
/**
Use the front camera.
*/
"FRONT"
/**
Use the default back camera.
*/
| "BACK";
/** @hidden */
export declare const CameraModuleValues: ReadonlyArray<CameraModule>;
/**
Configuration of the camera settings to be used while scanning.
*/
export declare class CameraConfiguration {
/**
Determines which camera module to use on start-up.
@defaultValue "BACK";
*/
cameraModule: CameraModule;
/**
The zoom steps available to the user.
@defaultValue [1.0, 2.0, 5.0];
*/
zoomSteps: number[];
/**
The default zoom factor on start-up.
@defaultValue 1.0;
*/
defaultZoomFactor: number;
/**
Determines whether the flash is enabled on start-up.
@defaultValue false;
*/
flashEnabled: boolean;
/**
The ideal resolution for the camera preview. Actual resolution may vary depending on browser and device capabilities.
@defaultValue new Resolution({
"width": 1920,
"height": 1080
});
*/
idealPreviewResolution: Resolution;
/**
The rate of detections/recognitions per second in normal performance mode. If the number is equal or greater than the video frame rate, no frames will be skipped.
@defaultValue 20;
*/
fpsLimit: number;
/**
The size of the image from camera which would be sent to the scanner for live scanning.
@defaultValue "FULL_HD";
*/
cameraLiveScannerResolution: CameraLiveScannerResolution;
/** @param source {@displayType `DeepPartial<CameraConfiguration>`} */
constructor(source?: DeepPartial<CameraConfiguration>);
}