ScrubbingModeParameters.Builder


public final class ScrubbingModeParameters.Builder


Builder for ScrubbingModeParameters instances.

This builder defines some defaults that may change in future releases of the library, and new properties may be added that default to enabled.

Summary

Public constructors

Creates an instance.

Public methods

ScrubbingModeParameters

Returns the built ScrubbingModeParameters.

ScrubbingModeParameters.Builder

Sets which track types should be disabled in scrubbing mode.

ScrubbingModeParameters.Builder
@CanIgnoreReturnValue
setFractionalSeekTolerance(
    @Nullable @FloatRange(from = 0, to = 1) Double toleranceBefore,
    @Nullable @FloatRange(from = 0, to = 1) Double toleranceAfter
)

Sets the fraction of the media duration to use for toleranceBeforeUs and toleranceAfterUs when scrubbing.

ScrubbingModeParameters.Builder
@CanIgnoreReturnValue
setShouldIncreaseCodecOperatingRate(
    boolean shouldIncreaseCodecOperatingRate
)

Sets whether the codec operating rate should be increased in scrubbing mode.

Public constructors

Builder

public Builder()

Creates an instance.

Public methods

build

public ScrubbingModeParameters build()

Returns the built ScrubbingModeParameters.

setDisabledTrackTypes

@CanIgnoreReturnValue
public ScrubbingModeParameters.Builder setDisabledTrackTypes(Set<@C.TrackType Integer> disabledTrackTypes)

Sets which track types should be disabled in scrubbing mode.

Defaults to TRACK_TYPE_AUDIO and TRACK_TYPE_METADATA (this may change in a future release).

See disabledTrackTypes.

Parameters
Set<@C.TrackType Integer> disabledTrackTypes

The track types to disable in scrubbing mode.

Returns
ScrubbingModeParameters.Builder

This builder for convenience.

setFractionalSeekTolerance

@CanIgnoreReturnValue
public ScrubbingModeParameters.Builder setFractionalSeekTolerance(
    @Nullable @FloatRange(from = 0, to = 1) Double toleranceBefore,
    @Nullable @FloatRange(from = 0, to = 1) Double toleranceAfter
)

Sets the fraction of the media duration to use for toleranceBeforeUs and toleranceAfterUs when scrubbing.

Pass null for both values to use the player-level seek parameters when scrubbing.

Defaults to {code null} for both values, so all seeks are exact (this may change in a future release).

See fractionalSeekToleranceBefore and fractionalSeekToleranceAfter.

Parameters
@Nullable @FloatRange(from = 0, to = 1) Double toleranceBefore

The fraction of the media duration to use for toleranceBeforeUs, or null to use the player-level seek parameters.

@Nullable @FloatRange(from = 0, to = 1) Double toleranceAfter

The fraction of the media duration to use for toleranceAfterUs, or null to use the player-level seek parameters.

Returns
ScrubbingModeParameters.Builder

This builder for convenience.

setShouldIncreaseCodecOperatingRate

@CanIgnoreReturnValue
public ScrubbingModeParameters.Builder setShouldIncreaseCodecOperatingRate(
    boolean shouldIncreaseCodecOperatingRate
)

Sets whether the codec operating rate should be increased in scrubbing mode.

Defaults to true (this may change in a future release).

See shouldIncreaseCodecOperatingRate.

Parameters
boolean shouldIncreaseCodecOperatingRate

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

Returns
ScrubbingModeParameters.Builder

This builder for convenience.