MediaItem.LiveConfiguration.Builder


public final class MediaItem.LiveConfiguration.Builder


Builder for LiveConfiguration instances.

Summary

Public constructors

Creates a new instance with default values.

Public methods

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
@CanIgnoreReturnValue
setMaxPlaybackSpeed(float maxPlaybackSpeed)

Sets the maximum playback speed.

MediaItem.LiveConfiguration.Builder

Sets the minimum allowed live offset, in milliseconds.

MediaItem.LiveConfiguration.Builder
@CanIgnoreReturnValue
setMinPlaybackSpeed(float minPlaybackSpeed)

Sets the minimum playback speed.

MediaItem.LiveConfiguration.Builder

Sets the target live offset, in milliseconds.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Public methods

build

public MediaItem.LiveConfiguration build()

Creates a LiveConfiguration with the values from this builder.

setMaxOffsetMs

@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMaxOffsetMs(long maxOffsetMs)

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
public MediaItem.LiveConfiguration.Builder setMaxPlaybackSpeed(float maxPlaybackSpeed)

Sets the maximum playback speed.

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

setMinOffsetMs

@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMinOffsetMs(long minOffsetMs)

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
public MediaItem.LiveConfiguration.Builder setMinPlaybackSpeed(float minPlaybackSpeed)

Sets the minimum playback speed.

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

setTargetOffsetMs

@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setTargetOffsetMs(long targetOffsetMs)

Sets the target live offset, in milliseconds.

See Player#getCurrentLiveOffset().

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