Class Timeline.Period.Builder
java.lang.Object
com.castlabs.android.player.models.Timeline.Period.Builder
- Enclosing class:
Timeline.Period
Builder for
Timeline.Period
s.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAudioTrack
(AudioTrack audioTrack) Adds anAudioTrack
to the Period.addDateRanges
(List<HlsDateRange> dateRanges) Adds a List ofHlsDateRange
s to the Period.addDescriptor
(DashDescriptor descriptor) Adds aDashDescriptor
to the Period.addDescriptors
(Collection<? extends DashDescriptor> descriptors) Adds a Collection ofDashDescriptor
s to the Period.addEventStreams
(Collection<? extends EventStream> eventStreams) Adds a Collection ofEventStream
s to the Period.addSubtitleTrack
(SubtitleTrack subtitleTrack) Adds aSubtitleTrack
to the Period.addVideoTrack
(VideoTrack videoTrack) Adds aVideoTrack
to the Period.durationUs
(long durationUs) Sets the duration of the Period in microseconds.get()
Builds theTimeline.Period
.Sets the id of the Period.positionInWindowUs
(long positionInWindowUs) Sets the position of the Period inside its Window in microseconds.windowIndex
(int windowIndex) Sets the Window index to which this Period belongs to.
-
Constructor Details
-
Builder
public Builder()Creates a new Builder.
-
-
Method Details
-
addVideoTrack
Adds aVideoTrack
to the Period.- Parameters:
videoTrack
- theVideoTrack
to add- Returns:
- this Builder
-
addAudioTrack
Adds anAudioTrack
to the Period.- Parameters:
audioTrack
- theAudioTrack
to add- Returns:
- this Builder
-
addSubtitleTrack
Adds aSubtitleTrack
to the Period.- Parameters:
subtitleTrack
- theSubtitleTrack
to add- Returns:
- this Builder
-
addDescriptor
Adds aDashDescriptor
to the Period.- Parameters:
descriptor
- theDashDescriptor
to add- Returns:
- this Builder
-
id
Sets the id of the Period.- Parameters:
id
- the id of the Period- Returns:
- this Builder
-
get
Builds theTimeline.Period
.- Returns:
- the
Timeline.Period
-
windowIndex
Sets the Window index to which this Period belongs to.- Parameters:
windowIndex
- the Window index- Returns:
- this Builder
-
addDescriptors
Adds a Collection ofDashDescriptor
s to the Period.- Parameters:
descriptors
- the Collection ofDashDescriptor
s to add- Returns:
- this Builder
-
durationUs
Sets the duration of the Period in microseconds.- Parameters:
durationUs
- the duration in microseconds- Returns:
- this Builder
-
positionInWindowUs
Sets the position of the Period inside its Window in microseconds.- Parameters:
positionInWindowUs
- the position in microseconds- Returns:
- this Builder
-
addEventStreams
Adds a Collection ofEventStream
s to the Period.- Parameters:
eventStreams
- the Collection ofEventStream
s to add- Returns:
- this Builder
-
addDateRanges
Adds a List ofHlsDateRange
s to the Period.- Parameters:
dateRanges
- The list ofHlsDateRange
s to add.- Returns:
- This Builder.
-