Package 

Interface TextTrack

  • All Implemented Interfaces:
    com.theoplayer.android.api.event.EventDispatcher , com.theoplayer.android.api.player.track.Track

    
    public interface TextTrack
     implements Track
                        

    Represents a text track of a media resource.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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.
      • 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).