Package com.castlabs.android.player.models

# Class Timeline.Period

java.lang.Object
com.castlabs.android.player.models.Timeline.Period

Enclosing class:
  `Timeline`

public static class Timeline.Period extends Object
A Period.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Timeline.Period.Builder`
  Builder for `Timeline.Period`s.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Period(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 Type
  Method
  Description
  `List<AudioTrack>`
  `getAudioTracks()`
  Returns the `AudioTrack`s of the Period.
  `List<HlsDateRange>`
  `getDateRanges()`
  Returns the `HlsDateRange`s of the Period.
  `List<DashDescriptor>`
  `getDescriptors()`
  Returns the `DashDescriptor`s of the Period.
  `long`
  `getDurationMs()`
  Returns the duration of the Period in milliseconds.
  `long`
  `getDurationUs()`
  Returns the duration of the Period in microseconds.
  `List<EventStream>`
  `getEventStreams()`
  Returns the `EventStream`s of the Period.
  `Object`
  `getId()`
  Returns the Period id.
  `long`
  `getPositionInWindowMs()`
  Returns the position of the Period inside its Window in milliseconds.
  `long`
  `getPositionInWindowUs()`
  Returns the position of the Period inside its Window in microseconds.
  `List<SubtitleTrack>`
  `getSubtitleTracks()`
  Returns the `SubtitleTrack`s of the Period.
  `List<VideoTrack>`
  `getVideoTracks()`
  Returns the `VideoTrack`s of the Period.
  `int`
  `getWindowIndex()`
  Returns the Window index to which this Period belongs to.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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` - VideoTracks
      `audioTracks` - AudioTracks
      `subtitleTracks` - SubtitleTracks
      `descriptors` - `DashDescriptor`s of the Period
      `eventStreams` - `EventStream`s of the Period
      `dateRanges` - `HlsDateRange`s of the Period
      `id` - the id of the Period
      `windowIndex` - the Window index to which this Period belongs to
      `durationUs` - the duration of the Period
      `positionInWindowUs` - the position of the Period inside its Window in microseconds

- ## Method Details

  - ### getId

    public Object 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

    @NonNull public List<VideoTrack> getVideoTracks()
    Returns the `VideoTrack`s of the Period.
    Returns:
      the `VideoTrack`s of the Period

  - ### getAudioTracks

    @NonNull public List<AudioTrack> getAudioTracks()
    Returns the `AudioTrack`s of the Period.
    Returns:
      the `AudioTrack`s of the Period

  - ### getSubtitleTracks

    @NonNull public List<SubtitleTrack> getSubtitleTracks()
    Returns the `SubtitleTrack`s of the Period.
    Returns:
      the `SubtitleTrack`s of the Period

  - ### getDescriptors

    @NonNull public List<DashDescriptor> getDescriptors()
    Returns the `DashDescriptor`s of the Period.
    Returns:
      the `DashDescriptor`s of the Period

  - ### getEventStreams

    @NonNull public List<EventStream> getEventStreams()
    Returns the `EventStream`s of the Period.
    Returns:
      the `EventStream`s of the Period

  - ### getDateRanges

    @NonNull public List<HlsDateRange> getDateRanges()
    Returns the `HlsDateRange`s of the Period.
    Returns:
      the `HlsDateRange`s of the Period