CuesWithTimingSubtitle


@UnstableApi
class CuesWithTimingSubtitle : Subtitle


A Subtitle backed by a list of CuesWithTiming instances.

Summary

Public constructors

CuesWithTimingSubtitle(
    cuesWithTimingList: (Mutable)List<CuesWithTiming!>!
)

Public functions

ImmutableList<Cue!>!
getCues(timeUs: Long)

Retrieve the cues that should be displayed at a given time.

Long
getEventTime(index: Int)

Returns the event time at a specified index.

Int

Returns the number of event times, where events are defined as points in time at which the cues returned by getCues changes.

Int

Returns the index of the first event that occurs after a given time (exclusive).

Public constructors

CuesWithTimingSubtitle

CuesWithTimingSubtitle(
    cuesWithTimingList: (Mutable)List<CuesWithTiming!>!
)

Public functions

getCues

fun getCues(timeUs: Long): ImmutableList<Cue!>!

Retrieve the cues that should be displayed at a given time.

Parameters
timeUs: Long

The time in microseconds.

Returns
ImmutableList<Cue!>!

A list of cues that should be displayed, possibly empty.

getEventTime

fun getEventTime(index: Int): Long

Returns the event time at a specified index.

Parameters
index: Int

The index of the event time to obtain.

Returns
Long

The event time in microseconds.

getEventTimeCount

fun getEventTimeCount(): Int

Returns the number of event times, where events are defined as points in time at which the cues returned by getCues changes.

Returns
Int

The number of event times.

getNextEventTimeIndex

fun getNextEventTimeIndex(timeUs: Long): Int

Returns the index of the first event that occurs after a given time (exclusive).

Parameters
timeUs: Long

The time in microseconds.

Returns
Int

The index of the next event, or INDEX_UNSET if there are no events after the specified time.