# HighSpeedVideoSessionConfig.Builder

Artifact: [androidx.camera:camera-video](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/video/HighSpeedVideoSessionConfig.kt+class:androidx.camera.video.HighSpeedVideoSessionConfig.Builder) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

*** ** * ** ***


```
public final class HighSpeedVideoSessionConfig.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#Builder(androidx.camera.video.VideoCapture)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/VideoCapture<@https://developer.android.com/reference/androidx/annotation/NonNull ?> videoCapture)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig` | `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#build()()` Builds a `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig` from the current configuration. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder` | `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#setAutoRotationEnabled(kotlin.Boolean)(boolean autoRotationEnabled)` Sets whether to use auto rotation. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder` | `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#setFrameRateRange(android.util.Range)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> frameRateRange)` Set the frame rate range for the camera session. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder` | `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#setPreview(androidx.camera.core.Preview)(https://developer.android.com/reference/androidx/camera/core/Preview preview)` Sets the `https://developer.android.com/reference/androidx/camera/core/Preview` use case for displaying a preview during recording. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder` | `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig.Builder#setSlowMotionEnabled(kotlin.Boolean)(boolean enabled)` Sets whether to apply slow-motion effects to the recorded video. |

## Public constructors

### Builder

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

```
public Builder(@NonNull VideoCapture<@NonNull ?> videoCapture)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/video/VideoCapture<@https://developer.android.com/reference/androidx/annotation/NonNull ?> videoCapture` | The `https://developer.android.com/reference/androidx/camera/video/VideoCapture` use case for video recording. |

## Public methods

### build

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

```
public final @NonNull HighSpeedVideoSessionConfig build()
```

Builds a `https://developer.android.com/reference/androidx/camera/video/HighSpeedVideoSessionConfig` from the current configuration.

### setAutoRotationEnabled

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public final @NonNull HighSpeedVideoSessionConfig.Builder setAutoRotationEnabled(boolean autoRotationEnabled)
```

Sets whether to use auto rotation.

When enabled, CameraX will monitor the device motion sensor and set the target rotation for VideoCapture.

### setFrameRateRange

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

```
public final @NonNull HighSpeedVideoSessionConfig.Builder setFrameRateRange(@NonNull Range<@NonNull Integer> frameRateRange)
```

Set the frame rate range for the camera session.

See `https://developer.android.com/reference/androidx/camera/core/SessionConfig#frameRateRange()` for more details.

### setPreview

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

```
public final @NonNull HighSpeedVideoSessionConfig.Builder setPreview(Preview preview)
```

Sets the `https://developer.android.com/reference/androidx/camera/core/Preview` use case for displaying a preview during recording.

### setSlowMotionEnabled

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

```
public final @NonNull HighSpeedVideoSessionConfig.Builder setSlowMotionEnabled(boolean enabled)
```

Sets whether to apply slow-motion effects to the recorded video.