# ScrubbingModeParameters

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/ScrubbingModeParameters.java+class:androidx.media3.exoplayer.ScrubbingModeParameters)

*** ** * ** ***


```
@UnstableApi
class ScrubbingModeParameters
```

<br />

*** ** * ** ***

Parameters to control the behavior of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters` instances. |

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#DEFAULT()` An instance which defines sensible default values for many scrubbing use-cases. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters.Builder!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#buildUpon()()` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters.Builder` initialized with the values from this instance. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#allowSkippingKeyFrameReset()` Whether to avoid resetting to a keyframe during a forward seek within the same GoP. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#allowSkippingMediaCodecFlush()` Whether flushing the decoder is avoided where possible in scrubbing mode. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableSet.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#disabledTrackTypes()` Which track types will be disabled in scrubbing mode. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0, to = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#fractionalSeekToleranceAfter()` The fraction of the media duration to use for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/SeekParameters#toleranceAfterUs()` when scrubbing. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0, to = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#fractionalSeekToleranceBefore()` The fraction of the media duration to use for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/SeekParameters#toleranceBeforeUs()` when scrubbing. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#isMediaCodecFlushEnabled()` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#allowSkippingMediaCodecFlush()` instead (but note that it's value is inverted). <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#shouldEnableDynamicScheduling()` Whether to enable ExoPlayer's `https://developer.android.com/reference/kotlin/androidx/media3/common/Flags#FLAG_DYNAMIC_SCHEDULING()` in scrubbing mode. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#shouldIncreaseCodecOperatingRate()` Whether the codec operating rate should be increased in scrubbing mode. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#useDecodeOnlyFlag()` Whether to use `https://developer.android.com/reference/android/media/MediaCodec.html#BUFFER_FLAG_DECODE_ONLY` in scrubbing mode. |

## Constants

### DEFAULT

```
const val DEFAULT: ScrubbingModeParameters!
```

An instance which defines sensible default values for many scrubbing use-cases.

## Public functions

### buildUpon

```
fun buildUpon(): ScrubbingModeParameters.Builder!
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters.Builder` initialized with the values from this instance.

### equals

```
fun equals(o: Any?): Boolean
```

### hashCode

```
fun hashCode(): Int
```

## Public properties

### allowSkippingKeyFrameReset

```
val allowSkippingKeyFrameReset: Boolean
```

Whether to avoid resetting to a keyframe during a forward seek within the same GoP.

Defaults to `true`.

### allowSkippingMediaCodecFlush

```
val allowSkippingMediaCodecFlush: Boolean
```

Whether flushing the decoder is avoided where possible in scrubbing mode.

Defaults to `true`.

### disabledTrackTypes

```
val disabledTrackTypes: ImmutableSet<Int!>!
```

Which track types will be disabled in scrubbing mode.

### fractionalSeekToleranceAfter

```
val fractionalSeekToleranceAfter: @FloatRange(from = 0, to = 1) Double?
```

The fraction of the media duration to use for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/SeekParameters#toleranceAfterUs()` when scrubbing.

If this is `null` or the media duration is not known then the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer#getSeekParameters()` non-scrubbing seek parameters} are used.

### fractionalSeekToleranceBefore

```
val fractionalSeekToleranceBefore: @FloatRange(from = 0, to = 1) Double?
```

The fraction of the media duration to use for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/SeekParameters#toleranceBeforeUs()` when scrubbing.

If this is `null` or the media duration is not known then the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer#getSeekParameters()` non-scrubbing seek parameters} are used.

### isMediaCodecFlushEnabled

```
val isMediaCodecFlushEnabled: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ScrubbingModeParameters#allowSkippingMediaCodecFlush()` instead (but note that it's value is inverted).

### shouldEnableDynamicScheduling

```
val shouldEnableDynamicScheduling: Boolean
```

Whether to enable ExoPlayer's `https://developer.android.com/reference/kotlin/androidx/media3/common/Flags#FLAG_DYNAMIC_SCHEDULING()` in scrubbing mode.

### shouldIncreaseCodecOperatingRate

```
val shouldIncreaseCodecOperatingRate: Boolean
```

Whether the codec operating rate should be increased in scrubbing mode.

If using `https://developer.android.com/reference/android/media/MediaCodec.html` for video decoding, `https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE` will be set to an increased value in scrubbing mode.

### useDecodeOnlyFlag

```
val useDecodeOnlyFlag: Boolean
```

Whether to use `https://developer.android.com/reference/android/media/MediaCodec.html#BUFFER_FLAG_DECODE_ONLY` in scrubbing mode.

This only has an effect on API 34+ when playback is using `https://developer.android.com/reference/android/media/MediaCodec.html` for decoding.