Class Timeline.Period.Builder
java.lang.Object
com.castlabs.android.player.models.Timeline.Period.Builder
- Enclosing class:
Timeline.Period
Builder for
Timeline.Periods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAudioTrack(AudioTrack audioTrack) Adds anAudioTrackto the Period.addDateRanges(List<HlsDateRange> dateRanges) Adds a List ofHlsDateRanges to the Period.addDescriptor(DashDescriptor descriptor) Adds aDashDescriptorto the Period.addDescriptors(Collection<? extends DashDescriptor> descriptors) Adds a Collection ofDashDescriptors to the Period.addEventStreams(Collection<? extends EventStream> eventStreams) Adds a Collection ofEventStreams to the Period.addSubtitleTrack(SubtitleTrack subtitleTrack) Adds aSubtitleTrackto the Period.addVideoTrack(VideoTrack videoTrack) Adds aVideoTrackto 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 aVideoTrackto the Period.- Parameters:
videoTrack- theVideoTrackto add- Returns:
- this Builder
-
addAudioTrack
Adds anAudioTrackto the Period.- Parameters:
audioTrack- theAudioTrackto add- Returns:
- this Builder
-
addSubtitleTrack
Adds aSubtitleTrackto the Period.- Parameters:
subtitleTrack- theSubtitleTrackto add- Returns:
- this Builder
-
addDescriptor
Adds aDashDescriptorto the Period.- Parameters:
descriptor- theDashDescriptorto 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 ofDashDescriptors to the Period.- Parameters:
descriptors- the Collection ofDashDescriptors 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 ofEventStreams to the Period.- Parameters:
eventStreams- the Collection ofEventStreams to add- Returns:
- this Builder
-
addDateRanges
Adds a List ofHlsDateRanges to the Period.- Parameters:
dateRanges- The list ofHlsDateRanges to add.- Returns:
- This Builder.
-