Class Timeline.Period
java.lang.Object
com.castlabs.android.player.models.Timeline.Period
- Enclosing class:
Timeline
A Period.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPeriod(List<VideoTrack> videoTracks, List<AudioTrack> audioTracks, List<SubtitleTrack> subtitleTracks, List<DashDescriptor> descriptors, List<EventStream> eventStreams, List<HlsDateRange> dateRanges, Object id, int windowIndex, long durationUs, long positionInWindowUs) Creates a new Period. -
Method Summary
Modifier and TypeMethodDescriptionReturns theAudioTracks of the Period.Returns theHlsDateRanges of the Period.Returns theDashDescriptors of the Period.longReturns the duration of the Period in milliseconds.longReturns the duration of the Period in microseconds.Returns theEventStreams of the Period.getId()Returns the Period id.longReturns the position of the Period inside its Window in milliseconds.longReturns the position of the Period inside its Window in microseconds.Returns theSubtitleTracks of the Period.Returns theVideoTracks of the Period.intReturns the Window index to which this Period belongs to.
-
Constructor Details
-
Period
public Period(@NonNull List<VideoTrack> videoTracks, @NonNull List<AudioTrack> audioTracks, @NonNull List<SubtitleTrack> subtitleTracks, @NonNull List<DashDescriptor> descriptors, @NonNull List<EventStream> eventStreams, @NonNull List<HlsDateRange> dateRanges, @Nullable Object id, int windowIndex, long durationUs, long positionInWindowUs) Creates a new Period.- Parameters:
videoTracks- VideoTracksaudioTracks- AudioTrackssubtitleTracks- SubtitleTracksdescriptors-DashDescriptors of the PeriodeventStreams-EventStreams of the PerioddateRanges-HlsDateRanges of the Periodid- the id of the PeriodwindowIndex- the Window index to which this Period belongs todurationUs- the duration of the PeriodpositionInWindowUs- the position of the Period inside its Window in microseconds
-
-
Method Details
-
getId
Returns the Period id.- Returns:
- the Period id
-
getWindowIndex
public int getWindowIndex()Returns the Window index to which this Period belongs to.- Returns:
- the Window index to which this Period belongs to
-
getDurationUs
public long getDurationUs()Returns the duration of the Period in microseconds.- Returns:
- the duration of the Period in microseconds
-
getDurationMs
public long getDurationMs()Returns the duration of the Period in milliseconds.- Returns:
- the duration of the Period in milliseconds
-
getPositionInWindowMs
public long getPositionInWindowMs()Returns the position of the Period inside its Window in milliseconds.- Returns:
- the position of the Period inside its Window in milliseconds
-
getPositionInWindowUs
public long getPositionInWindowUs()Returns the position of the Period inside its Window in microseconds.- Returns:
- the position of the Period inside its Window in microseconds
-
getVideoTracks
Returns theVideoTracks of the Period.- Returns:
- the
VideoTracks of the Period
-
getAudioTracks
Returns theAudioTracks of the Period.- Returns:
- the
AudioTracks of the Period
-
getSubtitleTracks
Returns theSubtitleTracks of the Period.- Returns:
- the
SubtitleTracks of the Period
-
getDescriptors
Returns theDashDescriptors of the Period.- Returns:
- the
DashDescriptors of the Period
-
getEventStreams
Returns theEventStreams of the Period.- Returns:
- the
EventStreams of the Period
-
getDateRanges
Returns theHlsDateRanges of the Period.- Returns:
- the
HlsDateRanges of the Period
-