Package com.castlabs.android.player.models

# Class Timeline.Window

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

Enclosing class:
  `Timeline`

public static class Timeline.Window extends Object
A Window.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PlayerConfig`
  `getConfig()`
  Returns the `PlayerConfig` of the Window.
  `long`
  `getDefaultPositionUs()`
  The default position relative to the start of the window at which to begin playback, in microseconds.
  `long`
  `getDurationUs()`
  Returns the Window duration in microseconds.
  `List<Timeline.Period>`
  `getPeriods()`
  Returns the List of `Timeline.Period`s in the Window.
  `long`
  `getPositionInFirstPeriodUs()`
  Returns the position of the Window relative to its first Period in microseconds.
  `long`
  `getWindowStartTimeMs()`
  Returns the start time of the Window in milliseconds.
  `boolean`
  `isDynamic()`
  Returns whether this is a dynamic (live) Window or not.

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

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

- ## Method Details

  - ### getDurationUs

    public long getDurationUs()
    Returns the Window duration in microseconds.
    Returns:
      the Window duration in microseconds

  - ### isDynamic

    public boolean isDynamic()
    Returns whether this is a dynamic (live) Window or not.
    Returns:
      whether this is a dynamic (live) Window or not

  - ### getPositionInFirstPeriodUs

    public long getPositionInFirstPeriodUs()
    Returns the position of the Window relative to its first Period in microseconds.
    Returns:
      the position of the Window relative to its first Period in microseconds

  - ### getDefaultPositionUs

    public long getDefaultPositionUs()
    The default position relative to the start of the window at which to begin playback, in microseconds. May be `C.TIME_UNSET` if and only if the window was populated with a non-zero default position projection, and if the specified projection cannot be performed whilst remaining within the bounds of the window.
    Returns:
      the default position relative to the start of the Window in microseconds

  - ### getWindowStartTimeMs

    public long getWindowStartTimeMs()
    Returns the start time of the Window in milliseconds.
    Returns:
      the start time of the Window in milliseconds

  - ### getConfig

    @NonNull public PlayerConfig getConfig()
    Returns the `PlayerConfig` of the Window.
    Returns:
      the `PlayerConfig` of the Window

  - ### getPeriods

    @NonNull public List<Timeline.Period> getPeriods()
    Returns the List of `Timeline.Period`s in the Window.
    Returns:
      the List of `Timeline.Period`s in the Window