SimpleBasePlayer.PeriodData.Builder


public final class SimpleBasePlayer.PeriodData.Builder


A builder for PeriodData objects.

Summary

Public constructors

Creates the builder.

Public methods

SimpleBasePlayer.PeriodData

Builds the PeriodData.

SimpleBasePlayer.PeriodData.Builder

Sets the AdPlaybackState.

SimpleBasePlayer.PeriodData.Builder

Sets the total duration of the period, in microseconds, or TIME_UNSET if unknown.

SimpleBasePlayer.PeriodData.Builder
@CanIgnoreReturnValue
setIsPlaceholder(boolean isPlaceholder)

Sets whether this period contains placeholder information because the real information has yet to be loaded

SimpleBasePlayer.PeriodData.Builder

Sets the unique identifier of the period within its media item.

Public constructors

Builder

public Builder(Object uid)

Creates the builder.

Parameters
Object uid

The unique identifier of the period within its media item.

Public methods

build

public SimpleBasePlayer.PeriodData build()

Builds the PeriodData.

setAdPlaybackState

@CanIgnoreReturnValue
public SimpleBasePlayer.PeriodData.Builder setAdPlaybackState(AdPlaybackState adPlaybackState)

Sets the AdPlaybackState.

Parameters
AdPlaybackState adPlaybackState

The AdPlaybackState, or NONE if there are no ads.

Returns
SimpleBasePlayer.PeriodData.Builder

This builder.

setDurationUs

@CanIgnoreReturnValue
public SimpleBasePlayer.PeriodData.Builder setDurationUs(long durationUs)

Sets the total duration of the period, in microseconds, or TIME_UNSET if unknown.

Only the last period in a media item can have an unknown duration.

Parameters
long durationUs

The total duration of the period, in microseconds, or TIME_UNSET if unknown.

Returns
SimpleBasePlayer.PeriodData.Builder

This builder.

setIsPlaceholder

@CanIgnoreReturnValue
public SimpleBasePlayer.PeriodData.Builder setIsPlaceholder(boolean isPlaceholder)

Sets whether this period contains placeholder information because the real information has yet to be loaded

Parameters
boolean isPlaceholder

Whether this period contains placeholder information because the real information has yet to be loaded.

Returns
SimpleBasePlayer.PeriodData.Builder

This builder.

setUid

@CanIgnoreReturnValue
public SimpleBasePlayer.PeriodData.Builder setUid(Object uid)

Sets the unique identifier of the period within its media item.

Parameters
Object uid

The unique identifier of the period within its media item.

Returns
SimpleBasePlayer.PeriodData.Builder

This builder.