MediaItem.LiveConfiguration.Builder


class MediaItem.LiveConfiguration.Builder


Builder for LiveConfiguration instances.

Summary

Public constructors

Creates a new instance with default values.

Public functions

MediaItem.LiveConfiguration!

Creates a LiveConfiguration with the values from this builder.

MediaItem.LiveConfiguration.Builder!

Sets the maximum allowed live offset, in milliseconds.

MediaItem.LiveConfiguration.Builder!

Sets the maximum playback speed.

MediaItem.LiveConfiguration.Builder!

Sets the minimum allowed live offset, in milliseconds.

MediaItem.LiveConfiguration.Builder!

Sets the minimum playback speed.

MediaItem.LiveConfiguration.Builder!

Sets the target live offset, in milliseconds.

Public constructors

Builder

Builder()

Creates a new instance with default values.

Public functions

build

fun build(): MediaItem.LiveConfiguration!

Creates a LiveConfiguration with the values from this builder.

setMaxOffsetMs

@CanIgnoreReturnValue
fun setMaxOffsetMs(maxOffsetMs: Long): MediaItem.LiveConfiguration.Builder!

Sets the maximum allowed live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to TIME_UNSET, indicating the media-defined default will be used.

setMaxPlaybackSpeed

@CanIgnoreReturnValue
fun setMaxPlaybackSpeed(maxPlaybackSpeed: Float): MediaItem.LiveConfiguration.Builder!

Sets the maximum playback speed.

Defaults to RATE_UNSET, indicating the media-defined default will be used.

setMinOffsetMs

@CanIgnoreReturnValue
fun setMinOffsetMs(minOffsetMs: Long): MediaItem.LiveConfiguration.Builder!

Sets the minimum allowed live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to TIME_UNSET, indicating the media-defined default will be used.

setMinPlaybackSpeed

@CanIgnoreReturnValue
fun setMinPlaybackSpeed(minPlaybackSpeed: Float): MediaItem.LiveConfiguration.Builder!

Sets the minimum playback speed.

Defaults to RATE_UNSET, indicating the media-defined default will be used.

setTargetOffsetMs

@CanIgnoreReturnValue
fun setTargetOffsetMs(targetOffsetMs: Long): MediaItem.LiveConfiguration.Builder!

Sets the target live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to TIME_UNSET, indicating the media-defined default will be used.