Package com.google.android.exoplayer2
Class SimpleBasePlayer.PeriodData.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.SimpleBasePlayer.PeriodData.Builder
-
- Enclosing class:
- SimpleBasePlayer.PeriodData
public static final class SimpleBasePlayer.PeriodData.Builder extends Object
A builder forSimpleBasePlayer.PeriodDataobjects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleBasePlayer.PeriodDatabuild()Builds theSimpleBasePlayer.PeriodData.SimpleBasePlayer.PeriodData.BuildersetAdPlaybackState(AdPlaybackState adPlaybackState)Sets theAdPlaybackState.SimpleBasePlayer.PeriodData.BuildersetDurationUs(long durationUs)Sets the total duration of the period, in microseconds, orC.TIME_UNSETif unknown.SimpleBasePlayer.PeriodData.BuildersetIsPlaceholder(boolean isPlaceholder)Sets whether this period contains placeholder information because the real information has yet to be loadedSimpleBasePlayer.PeriodData.BuildersetUid(Object uid)Sets the unique identifier of the period within its media item.
-
-
-
Constructor Detail
-
Builder
public Builder(Object uid)
Creates the builder.- Parameters:
uid- The unique identifier of the period within its media item.
-
-
Method Detail
-
setUid
@CanIgnoreReturnValue public SimpleBasePlayer.PeriodData.Builder setUid(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.
-
setDurationUs
@CanIgnoreReturnValue public SimpleBasePlayer.PeriodData.Builder setDurationUs(long durationUs)
Sets the total duration of the period, in microseconds, orC.TIME_UNSETif unknown.Only the last period in a media item can have an unknown duration.
- Parameters:
durationUs- The total duration of the period, in microseconds, orC.TIME_UNSETif unknown.- Returns:
- This builder.
-
setAdPlaybackState
@CanIgnoreReturnValue public SimpleBasePlayer.PeriodData.Builder setAdPlaybackState(AdPlaybackState adPlaybackState)
Sets theAdPlaybackState.- Parameters:
adPlaybackState- TheAdPlaybackState, orAdPlaybackState.NONEif there are no ads.- Returns:
- 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:
isPlaceholder- Whether this period contains placeholder information because the real information has yet to be loaded.- Returns:
- This builder.
-
build
public SimpleBasePlayer.PeriodData build()
Builds theSimpleBasePlayer.PeriodData.
-
-