Interface TextTrack
-
-
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.
- Returns:
The kind of the text track. (Nullable)
-
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.
- Returns:
The TextTrackMode. (NonNull)
-
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.
- Returns:
The TextTrackReadyState. (NonNull)
-
getType
@NonNull() abstract TextTrackType getType()
The content type of the text track.
- Returns:
The TextTrackType. (NonNull)
-
getCues
@Nullable() abstract TextTrackCueList getCues()
The list of TextTrackCues of the track.
- Returns:
The TextTrackCueList. (Nullable)
-
getActiveCues
@Nullable() abstract TextTrackCueList getActiveCues()
The list of active TextTrackCues of the track.
- Returns:
The active TextTrackCueList. (Nullable)
-
getSource
@Nullable() abstract String getSource()
The source of the text track.
- Returns:
The text track's source. (Nullable)
-
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).
- Returns:
Whether the text track is forced.
-
-
-
-