Class DocumentScannerCameraConfiguration

Configuration of the camera behavior.

Hierarchy

  • PartiallyConstructible
    • DocumentScannerCameraConfiguration

Constructors

Properties

acceptedAngleScore: number

The minimum pitch/skew angle of the document to be accepted. The value must be between 0.0 and 1.0.

Default Value

0.75;
acceptedBrightnessThreshold: number

The minimum brightness value to accept a detected document.

Default Value

50;
acceptedSizeScore: number

The minimum size of the document in relation to the screen preview to be accepted. The value must be between 0.0 and 1.0.

Default Value

0.75;
autoCropOnManualSnap: boolean

Determines whether the document should be cropped automatically after a manual snap or not.

Default Value

true;
autoSnappingDelay: number

After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page.

Default Value

200;
autoSnappingEnabled: boolean

Determines if auto snapping is enabled or not.

Default Value

true;
autoSnappingSensitivity: number

Controls the auto snapping speed. The sensitivity must be between 0.0 and 1.0. A value of 1.0 triggers auto snapping immediately, while a value of 0.0 delays the auto snapping by 3 seconds. The default value is 0.66 (2 seconds).

Default Value

0.66;
cameraModule: CameraModule

Determines which camera module to use on start-up.

Default Value

"BACK";
flashEnabled: boolean

Determines whether the flashlight is enabled or not on start-up.

Default Value

false;
idealPreviewResolution: Resolution

The ideal resolution for the camera preview. Actual resolution may vary depending on browser and device capabilities.

Default Value

new Resolution({
"width": 1920,
"height": 1080
});
ignoreBadAspectRatio: boolean

Determines whether a landscape document will be detected when the camera is in portrait mode (and vice versa) or not. This parameter will be ignored if required aspect ratios have been explicitly defined.

Default Value

true;
requiredAspectRatios: AspectRatio[]

The required aspect ratios for the document to be accepted.

Default Value

[];

Generated using TypeDoc