Back to Exoplayer

SimpleBasePlayer.PeriodData.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.Builder.html

latest4.9 KB
Original Source

Package com.google.android.exoplayer2

Class SimpleBasePlayer.PeriodData.Builder


public static final classSimpleBasePlayer.PeriodData.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for SimpleBasePlayer.PeriodData objects.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder​(Object uid) | Creates the builder. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | SimpleBasePlayer.PeriodData | build() | Builds the SimpleBasePlayer.PeriodData. | | SimpleBasePlayer.PeriodData.Builder | setAdPlaybackState​(AdPlaybackState adPlaybackState) | Sets the AdPlaybackState. | | SimpleBasePlayer.PeriodData.Builder | setDurationUs​(long durationUs) | Sets the total duration of the period, in microseconds, or C.TIME_UNSET if unknown. | | SimpleBasePlayer.PeriodData.Builder | setIsPlaceholder​(boolean isPlaceholder) | Sets whether this period contains placeholder information because the real information has yet to be loaded | | SimpleBasePlayer.PeriodData.Builder | setUid​(Object uid) | Sets the unique identifier of the period within its media item. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder​([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")uid)

Creates the builder. Parameters:uid - The unique identifier of the period within its media item.

Method Detail

- 

setUid

@CanIgnoreReturnValue
public[SimpleBasePlayer.PeriodData.Builder](SimpleBasePlayer.PeriodData.Builder.html "class in com.google.android.exoplayer2")setUid​([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")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.

- 

setDurationUs

@CanIgnoreReturnValue
public[SimpleBasePlayer.PeriodData.Builder](SimpleBasePlayer.PeriodData.Builder.html "class in com.google.android.exoplayer2")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.

- 

setAdPlaybackState

@CanIgnoreReturnValue
public[SimpleBasePlayer.PeriodData.Builder](SimpleBasePlayer.PeriodData.Builder.html "class in com.google.android.exoplayer2")setAdPlaybackState​([AdPlaybackState](source/ads/AdPlaybackState.html "class in com.google.android.exoplayer2.source.ads")adPlaybackState)

Sets the AdPlaybackState. Parameters:adPlaybackState - The AdPlaybackState, or AdPlaybackState.NONE if there are no ads.Returns:This builder.

- 

setIsPlaceholder

@CanIgnoreReturnValue
public[SimpleBasePlayer.PeriodData.Builder](SimpleBasePlayer.PeriodData.Builder.html "class in com.google.android.exoplayer2")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.

- 

build

public[SimpleBasePlayer.PeriodData](SimpleBasePlayer.PeriodData.html "class in com.google.android.exoplayer2")build()

Builds the SimpleBasePlayer.PeriodData.