Class Timeline.Window.Builder
java.lang.Object
com.castlabs.android.player.models.Timeline.Window.Builder
- Enclosing class:
Timeline.Window
Builder for
Timeline.Windows.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPeriod(Timeline.Period period) Adds aTimeline.Periodto the Window.config(PlayerConfig tag) Sets thePlayerConfigof the Window.durationUs(long durationUs) Sets the duration of the Window in microseconds.dynamic(boolean dynamic) Sets whether this is a dynamic (live) Window or not.get()Builds theTimeline.Window.positionInFirstPeriodUs(long positionInFirstPeriodUs) Sets the position of the Window relative to its first Period in microseconds.startTimeMs(long windowStartTimeMs) Sets the start time of the Window in milliseconds.
-
Constructor Details
-
Builder
public Builder()Creates a new Builder.
-
-
Method Details
-
durationUs
Sets the duration of the Window in microseconds.- Parameters:
durationUs- the duration in microseconds- Returns:
- this Builder
-
dynamic
Sets whether this is a dynamic (live) Window or not.- Parameters:
dynamic- true if dynamic, false otherwise- Returns:
- this Builder
-
positionInFirstPeriodUs
Sets the position of the Window relative to its first Period in microseconds.- Parameters:
positionInFirstPeriodUs- the position in microseconds- Returns:
- this Builder
-
startTimeMs
Sets the start time of the Window in milliseconds.- Parameters:
windowStartTimeMs- The start time in milliseconds.- Returns:
- This Builder.
-
get
Builds theTimeline.Window.- Returns:
- the
Timeline.Window
-
addPeriod
Adds aTimeline.Periodto the Window.- Parameters:
period- theTimeline.Periodto add
-
config
Sets thePlayerConfigof the Window.- Parameters:
tag- ThePlayerConfig.- Returns:
- This Builder.
-