-
- All Implemented Interfaces:
-
com.theoplayer.android.api.event.EventDispatcher
public interface TextTrackCue implements EventDispatcher<TextTrackCueEvent>
Represents a cue of a text track.
- Depending on the TextTrack's type, a cue might have different properties.
-
-
Method Summary
Modifier and Type Method Description abstract String
getId()
The identifier of the cue. abstract long
getUid()
A unique identifier of the text track cue. abstract double
getStartTime()
abstract double
getEndTime()
abstract JSONObject
getContent()
The content of the cue, it depends on the TextTrack's getType. -
-
Method Detail
-
getUid
abstract long getUid()
A unique identifier of the text track cue.
- This identifier is unique across text track cues of a THEOplayer instance and can be used to distinguish between cues.
- This identifier is a randomly generated number.
-
getStartTime
abstract double getStartTime()
-
getEndTime
abstract double getEndTime()
-
getContent
@Nullable() abstract JSONObject getContent()
The content of the cue, it depends on the TextTrack's getType.
- 'emsg': Content is a Uint8Array representing the binary message data from the 'emsg' box.
- 'eventstream': Content is the value of the 'messageData' attribute which was specified in the manifest.
- 'ttml': Content is an intermediate TTML document’s body element. This is a view of a TTML document where all nodes in the document are active during the cue’s startTime and endTime. As a result, all begin, dur and end properties have been removed. TTML Styles, Regions and Metadata are stored in cue.styles, cue.regions, cue.metadata respectively. Combining those properties with the given content should suffice to render a TTML cue.
- 'webvtt': Content is the cue text in raw unparsed form.
- Null when the type is unknown.
-
-
-
-