public final class

SimpleBasePlayer.PeriodData.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.SimpleBasePlayer.PeriodData.Builder

Overview

A builder for SimpleBasePlayer.PeriodData objects.

Summary

Constructors
publicBuilder(java.lang.Object uid)

Creates the builder.

Methods
public SimpleBasePlayer.PeriodDatabuild()

Builds the SimpleBasePlayer.PeriodData.

public SimpleBasePlayer.PeriodData.BuildersetAdPlaybackState(AdPlaybackState adPlaybackState)

Sets the AdPlaybackState.

public SimpleBasePlayer.PeriodData.BuildersetDurationUs(long durationUs)

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

public SimpleBasePlayer.PeriodData.BuildersetIsPlaceholder(boolean isPlaceholder)

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

public SimpleBasePlayer.PeriodData.BuildersetUid(java.lang.Object uid)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.Object uid)

Creates the builder.

Parameters:

uid: The unique identifier of the period within its media item.

Methods

public SimpleBasePlayer.PeriodData.Builder setUid(java.lang.Object uid)

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

Parameters:

uid: The unique identifier of the period within its media item.

Returns:

This builder.

public SimpleBasePlayer.PeriodData.Builder setDurationUs(long durationUs)

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

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

Parameters:

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

Returns:

This builder.

public SimpleBasePlayer.PeriodData.Builder setAdPlaybackState(AdPlaybackState adPlaybackState)

Sets the AdPlaybackState.

Parameters:

adPlaybackState: The AdPlaybackState, or AdPlaybackState.NONE if there are no ads.

Returns:

This builder.

public SimpleBasePlayer.PeriodData.Builder setIsPlaceholder(boolean isPlaceholder)

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

Parameters:

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

Returns:

This builder.

Builds the SimpleBasePlayer.PeriodData.