# 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
public final class ScrubbingModeParameters
```

<br />

*** ** * ** ***

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

## Summary

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

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

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

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters.Builder` | `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters#buildUpon()()` Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters.Builder` initialized with the values from this instance. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters#hashCode()()` |

## Constants

### DEFAULT

```
public static final ScrubbingModeParameters DEFAULT
```

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

## Public fields

### allowSkippingKeyFrameReset

```
public final boolean allowSkippingKeyFrameReset
```

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

Defaults to `true`.

### allowSkippingMediaCodecFlush

```
public final boolean allowSkippingMediaCodecFlush
```

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

Defaults to `true`.

### disabledTrackTypes

```
public final ImmutableSet<@C.TrackType Integer> disabledTrackTypes
```

Which track types will be disabled in scrubbing mode.

### fractionalSeekToleranceAfter

```
public final @Nullable @FloatRange(from = 0, to = 1) Double fractionalSeekToleranceAfter
```

The fraction of the media duration to use for `https://developer.android.com/reference/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/androidx/media3/exoplayer/ExoPlayer#getSeekParameters()` non-scrubbing seek parameters} are used.

### fractionalSeekToleranceBefore

```
public final @Nullable @FloatRange(from = 0, to = 1) Double fractionalSeekToleranceBefore
```

The fraction of the media duration to use for `https://developer.android.com/reference/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/androidx/media3/exoplayer/ExoPlayer#getSeekParameters()` non-scrubbing seek parameters} are used.

### isMediaCodecFlushEnabled

```
public final boolean isMediaCodecFlushEnabled
```

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

### shouldEnableDynamicScheduling

```
public final boolean shouldEnableDynamicScheduling
```

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

### shouldIncreaseCodecOperatingRate

```
public final boolean shouldIncreaseCodecOperatingRate
```

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

```
public final boolean useDecodeOnlyFlag
```

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.

## Public methods

### buildUpon

```
public ScrubbingModeParameters.Builder buildUpon()
```

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

### equals

```
public boolean equals(@Nullable Object o)
```

### hashCode

```
public int hashCode()
```