ScrubbingModeParameters.Builder


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 functions

ScrubbingModeParameters!

Returns the built ScrubbingModeParameters.

ScrubbingModeParameters.Builder!

Sets which track types should be disabled in scrubbing mode.

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

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

ScrubbingModeParameters.Builder!
@CanIgnoreReturnValue
setShouldIncreaseCodecOperatingRate(
    shouldIncreaseCodecOperatingRate: Boolean
)

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

Public constructors

Builder

Builder()

Creates an instance.

Public functions

build

fun build(): ScrubbingModeParameters!

Returns the built ScrubbingModeParameters.

setDisabledTrackTypes

@CanIgnoreReturnValue
fun setDisabledTrackTypes(disabledTrackTypes: (Mutable)Set<@C.TrackType Int!>!): ScrubbingModeParameters.Builder!

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
disabledTrackTypes: (Mutable)Set<@C.TrackType Int!>!

The track types to disable in scrubbing mode.

Returns
ScrubbingModeParameters.Builder!

This builder for convenience.

setFractionalSeekTolerance

@CanIgnoreReturnValue
fun setFractionalSeekTolerance(
    toleranceBefore: @FloatRange(from = 0, to = 1) Double?,
    toleranceAfter: @FloatRange(from = 0, to = 1) Double?
): ScrubbingModeParameters.Builder!

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
toleranceBefore: @FloatRange(from = 0, to = 1) Double?

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

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

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
fun setShouldIncreaseCodecOperatingRate(
    shouldIncreaseCodecOperatingRate: Boolean
): ScrubbingModeParameters.Builder!

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
shouldIncreaseCodecOperatingRate: Boolean

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

Returns
ScrubbingModeParameters.Builder!

This builder for convenience.