LoadingInfo.Builder


public final class LoadingInfo.Builder


A builder for LoadingInfo instances.

Summary

Public constructors

Creates a new instance with default values.

Public methods

LoadingInfo

Returns a new LoadingInfo instance with the current builder values.

LoadingInfo.Builder
@CanIgnoreReturnValue
setLastRebufferRealtimeMs(long lastRebufferRealtimeMs)

Sets lastRebufferRealtimeMs.

LoadingInfo.Builder

Sets playbackPositionUs.

LoadingInfo.Builder

Sets playbackSpeed.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Public methods

build

public LoadingInfo build()

Returns a new LoadingInfo instance with the current builder values.

setLastRebufferRealtimeMs

@CanIgnoreReturnValue
public LoadingInfo.Builder setLastRebufferRealtimeMs(long lastRebufferRealtimeMs)

Sets lastRebufferRealtimeMs. The default is TIME_UNSET

Throws
java.lang.IllegalArgumentException

If lastRebufferRealtimeMs is not equal to TIME_UNSET and is negative.

setPlaybackPositionUs

@CanIgnoreReturnValue
public LoadingInfo.Builder setPlaybackPositionUs(long playbackPositionUs)

Sets playbackPositionUs. The default is TIME_UNSET

setPlaybackSpeed

@CanIgnoreReturnValue
public LoadingInfo.Builder setPlaybackSpeed(float playbackSpeed)

Sets playbackSpeed. The default is RATE_UNSET

Throws
java.lang.IllegalArgumentException

If playbackSpeed is not equal to RATE_UNSET and is non-positive.