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.
        Returns:

        The kind of the text track. (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.