Mobile Document Scanner API Reference / CaptureSettings
Interface: CaptureSettings
Defined in: src/settings/settings.ts:162
The settings of the capture phase. The capture screen shows in ScannerSettings.container.
Properties
autoCapture?
optionalautoCapture?:boolean
Defined in: src/settings/settings.ts:172
Whether auto-capture is on when a session starts. The viewfinder outlines the document either way. While auto-capture is on, the document scanner takes a page when the document holds still. While it is off, the user presses the shutter. The user can turn auto-capture on and off with the toggle in the header. The choice holds for the rest of the session.
Default Value
true
buttons?
optionalbuttons?:ButtonSettingsFor<"cancel"|"autoCapture"|"torch"|"cameraSwitcher"|"shutter"|"loadImage"|"thumbnail">
Defined in: src/settings/settings.ts:215
The settings of each button: whether the screen hides it, and a handler that runs before its default action. When auto-capture takes a page, nobody presses the shutter, so the handler of the shutter does not run.
layout?
optionallayout?:CaptureLayout
Defined in: src/settings/settings.ts:208
The areas of the capture screen to fill with other content, or to leave out. An area left unset keeps its built-in content. An element with a data-mds-icon attribute gets the icon it names. An element with a data-mds-button attribute, such as data-mds-button="shutter", works like the built-in button of that name. A button may appear any number of times, or not at all. Each copy gets its label and tooltip from strings.capture. Thus a button must not have its own aria-label, aria-labelledby, or title, and a button name must be a CaptureScreenButton. Each of these cases is an error.
minStableFrames?
optionalminStableFrames?:number
Defined in: src/settings/settings.ts:183
How many frames in a row must agree on where the document is before auto-capture takes the page. A higher count gives a steadier page, but a slower capture.
Default Value
2
waitForFraming?
optionalwaitForFraming?:boolean
Defined in: src/settings/settings.ts:195
Whether auto-capture waits until the document is framed well. A document is framed well when it fills much of the view of the camera, and no side of the view cuts it off. While auto-capture waits, a hint over the viewfinder tells the user to move closer or farther away. The shutter takes a page however the document is framed. A minor release can improve how the document scanner judges the framing.
Default Value
true