-
-
Method Summary
Modifier and Type Method Description abstract String
getKind()
The kind of the text track. abstract String
getInBandMetadataTrackDispatchType()
The dispatch-type of the in-band metadata track of the given text track. abstract TextTrackMode
getMode()
The mode of the text track. abstract void
setMode(TextTrackMode mode)
Sets the text track mode. abstract TextTrackReadyState
getReadyState()
The ready state of the text track. abstract TextTrackType
getType()
The content type of the text track. abstract TextTrackCueList
getCues()
The list of TextTrackCues of the track. abstract TextTrackCueList
getActiveCues()
The list of active TextTrackCues of the track. abstract String
getSource()
The source of the text track. abstract boolean
isForced()
Indicates whether the track contains Forced Narrative cues. -
Methods inherited from class com.theoplayer.android.api.player.track.Track
getId, getLabel, getLanguage, getUid
-
Methods inherited from class com.theoplayer.android.api.event.EventDispatcher
addEventListener, removeEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getKind
abstract String getKind()
The kind of the text track.
Example:
- 'subtitles': The track contains subtitles.
- 'captions': The track contains closed captions, a translation of the dialogue and sound effects.
- 'descriptions': The track contains descriptions, a textual description of the video.
- 'chapters': The track contains chapter titles.
- 'metadata': The track contains metadata. This track will not serve display purposes.
-
getInBandMetadataTrackDispatchType
@Nullable() abstract String getInBandMetadataTrackDispatchType()
The dispatch-type of the in-band metadata track of the given text track. (Nullable)
-
getMode
@NonNull() abstract TextTrackMode getMode()
The mode of the text track.
-
setMode
abstract void setMode(TextTrackMode mode)
Sets the text track mode.
- Parameters:
mode
- The new TextTrackMode to be set.
-
getReadyState
@NonNull() abstract TextTrackReadyState getReadyState()
The ready state of the text track.
-
getType
@NonNull() abstract TextTrackType getType()
The content type of the text track.
-
getCues
@Nullable() abstract TextTrackCueList getCues()
The list of TextTrackCues of the track.
- When the getMode is DISABLED, this property is null.
-
getActiveCues
@Nullable() abstract TextTrackCueList getActiveCues()
The list of active TextTrackCues of the track.
- A cue is active if the current playback position falls within the time bounds of the cue.
- This list dynamically updates based on the current playback position.
- When the getMode is DISABLED, this property is null.
-
isForced
abstract boolean isForced()
Indicates whether the track contains Forced Narrative cues. This may only be true for subtitle tracks where:
- For DASH: the corresponding AdaptationSet contains a child Role with its value attribute equal to `'forced_subtitle'`.
- For HLS: the corresponding #EXT-X-MEDIA tag contains the attributes TYPE=SUBTITLES and FORCED=YES (not supported yet).
-
-
-
-