# Interface: CaptureSettings

[Mobile Document Scanner API Reference](../index.md) / CaptureSettings

# Interface: CaptureSettings

Defined in: [src/settings/settings.ts:162](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L162)

The settings of the capture phase. The capture screen shows in
[ScannerSettings.container](ScannerSettings.md#container).

## Properties

### autoCapture?

> `optional` **autoCapture?**: `boolean`

Defined in: [src/settings/settings.ts:172](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L172)

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?

> `optional` **buttons?**: [`ButtonSettingsFor`](../type-aliases/ButtonSettingsFor.md)\<`"cancel"` \| `"autoCapture"` \| `"torch"` \| `"cameraSwitcher"` \| `"shutter"` \| `"loadImage"` \| `"thumbnail"`\>

Defined in: [src/settings/settings.ts:215](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L215)

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?

> `optional` **layout?**: [`CaptureLayout`](CaptureLayout.md)

Defined in: [src/settings/settings.ts:208](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L208)

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](StringSettings.md#capture). Thus a button must not have its
own `aria-label`, `aria-labelledby`, or `title`, and a button name must be a
[CaptureScreenButton](../type-aliases/CaptureScreenButton.md). Each of these cases is an error.

***

### minStableFrames?

> `optional` **minStableFrames?**: `number`

Defined in: [src/settings/settings.ts:183](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L183)

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?

> `optional` **waitForFraming?**: `boolean`

Defined in: [src/settings/settings.ts:195](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/settings/settings.ts#L195)

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`
