Constructor and Description |
---|
WebvttSubtitle(List<com.google.android.exoplayer.text.webvtt.WebvttCue> cues) |
Modifier and Type | Method and Description |
---|---|
List<Cue> |
getCues(long timeUs)
Retrieve the subtitle cues that should be displayed at a given time.
|
long |
getEventTime(int index)
Gets the event time at a specified index.
|
int |
getEventTimeCount()
Gets the number of event times, where events are defined as points in time at which the cues
returned by
Subtitle.getCues(long) changes. |
long |
getLastEventTime()
Convenience method for obtaining the last event time.
|
int |
getNextEventTimeIndex(long timeUs)
Gets the index of the first event that occurs after a given time (exclusive).
|
public WebvttSubtitle(List<com.google.android.exoplayer.text.webvtt.WebvttCue> cues)
cues
- A list of the cues in this subtitle.public int getNextEventTimeIndex(long timeUs)
Subtitle
getNextEventTimeIndex
in interface Subtitle
timeUs
- The time in microseconds.public int getEventTimeCount()
Subtitle
Subtitle.getCues(long)
changes.getEventTimeCount
in interface Subtitle
public long getEventTime(int index)
Subtitle
getEventTime
in interface Subtitle
index
- The index of the event time to obtain.public long getLastEventTime()
Subtitle
getLastEventTime
in interface Subtitle
getEventTimeCount() == 0
.