Class Timeline

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

public class Timeline extends Object
Timeline object.

Composed of Timeline.Windows and Timeline.Periods.

  • Field Details

    • EMPTY

      public static final Timeline EMPTY
  • Method Details

    • getPeriodCount

      public int getPeriodCount()
      Returns the number of Period in the Timeline
      Returns:
      the number of Period
    • getWindowCount

      public int getWindowCount()
      Returns the number of Window in the Timeline
      Returns:
      the number of Window
    • getPeriod

      @Nullable public Timeline.Period getPeriod(int index)
      Returns the requested Period
      Parameters:
      index - the index of the Period to return
      Returns:
      the Period, or null if out of bounds
    • getWindow

      @Nullable public Timeline.Window getWindow(int index)
      Returns the requested Window
      Parameters:
      index - the index of the Window to return
      Returns:
      the Window, or null if out of bounds
    • getPeriods

      @NonNull public List<Timeline.Period> getPeriods()
      Returns the List of Timeline.Periods
      Returns:
      the List of Timeline.Periods
    • getWindows

      @NonNull public List<Timeline.Window> getWindows()
      Returns the List of Timeline.Periods
      Returns:
      the List of Timeline.Periods
    • isEmpty

      public boolean isEmpty()
      Returns:
      whether the Timeline is empty.