Class Timeline.RemotableTimeline

    • Method Detail

      • getWindowCount

        public int getWindowCount()
        Description copied from class: Timeline
        Returns the number of windows in the timeline.
        Specified by:
        getWindowCount in class Timeline
      • getWindow

        public Timeline.Window getWindow​(int windowIndex,
                                         Timeline.Window window,
                                         long defaultPositionProjectionUs)
        Description copied from class: Timeline
        Populates a Timeline.Window with data for the window at the specified index.
        Specified by:
        getWindow in class Timeline
        Parameters:
        windowIndex - The index of the window.
        window - The Timeline.Window to populate. Must not be null.
        defaultPositionProjectionUs - A duration into the future that the populated window's default start position should be projected.
        Returns:
        The populated Timeline.Window, for convenience.
      • getNextWindowIndex

        public int getNextWindowIndex​(int windowIndex,
                                      @RepeatMode
                                      @com.google.android.exoplayer2.Player.RepeatMode int repeatMode,
                                      boolean shuffleModeEnabled)
        Description copied from class: Timeline
        Returns the index of the window after the window at index windowIndex depending on the repeatMode and whether shuffling is enabled.
        Overrides:
        getNextWindowIndex in class Timeline
        Parameters:
        windowIndex - Index of a window in the timeline.
        repeatMode - A repeat mode.
        shuffleModeEnabled - Whether shuffling is enabled.
        Returns:
        The index of the next window, or C.INDEX_UNSET if this is the last window.
      • getPreviousWindowIndex

        public int getPreviousWindowIndex​(int windowIndex,
                                          @RepeatMode
                                          @com.google.android.exoplayer2.Player.RepeatMode int repeatMode,
                                          boolean shuffleModeEnabled)
        Description copied from class: Timeline
        Returns the index of the window before the window at index windowIndex depending on the repeatMode and whether shuffling is enabled.
        Overrides:
        getPreviousWindowIndex in class Timeline
        Parameters:
        windowIndex - Index of a window in the timeline.
        repeatMode - A repeat mode.
        shuffleModeEnabled - Whether shuffling is enabled.
        Returns:
        The index of the previous window, or C.INDEX_UNSET if this is the first window.
      • getLastWindowIndex

        public int getLastWindowIndex​(boolean shuffleModeEnabled)
        Description copied from class: Timeline
        Returns the index of the last window in the playback order depending on whether shuffling is enabled.
        Overrides:
        getLastWindowIndex in class Timeline
        Parameters:
        shuffleModeEnabled - Whether shuffling is enabled.
        Returns:
        The index of the last window in the playback order, or C.INDEX_UNSET if the timeline is empty.
      • getFirstWindowIndex

        public int getFirstWindowIndex​(boolean shuffleModeEnabled)
        Description copied from class: Timeline
        Returns the index of the first window in the playback order depending on whether shuffling is enabled.
        Overrides:
        getFirstWindowIndex in class Timeline
        Parameters:
        shuffleModeEnabled - Whether shuffling is enabled.
        Returns:
        The index of the first window in the playback order, or C.INDEX_UNSET if the timeline is empty.
      • getPeriodCount

        public int getPeriodCount()
        Description copied from class: Timeline
        Returns the number of periods in the timeline.
        Specified by:
        getPeriodCount in class Timeline
      • getIndexOfPeriod

        public int getIndexOfPeriod​(Object uid)
        Description copied from class: Timeline
        Returns the index of the period identified by its unique Timeline.Period.uid, or C.INDEX_UNSET if the period is not in the timeline.
        Specified by:
        getIndexOfPeriod in class Timeline
        Parameters:
        uid - A unique identifier for a period.
        Returns:
        The index of the period, or C.INDEX_UNSET if the period was not found.
      • getUidOfPeriod

        public Object getUidOfPeriod​(int periodIndex)
        Description copied from class: Timeline
        Returns the unique id of the period identified by its index in the timeline.
        Specified by:
        getUidOfPeriod in class Timeline
        Parameters:
        periodIndex - The index of the period.
        Returns:
        The unique id of the period.