Interface Track

  • All Implemented Interfaces:
    com.theoplayer.android.api.event.EventDispatcher

    
    public interface Track
     implements EventDispatcher<E>
                        

    Represents a track of a media resource.

    • A specific track type (e.g. TextTrack) will always be used.
    • 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
    • Method Summary

      Modifier and Type Method Description
      abstract String getKind() The kind of the track.
      abstract String getId() The identifier of the track.
      abstract int getUid() A unique identifier of the track.
      abstract String getLabel() The label of the track.
      abstract String getLanguage() The language of the track.
      • 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
    • Constructor Detail

    • Method Detail

      • getKind

        @Nullable() abstract String getKind()

        The kind of the track.

        • The values for this property depend on the specific type of the track.
        Returns:

        The kind of the track. (Nullable)

      • getId

        @Nullable() abstract String getId()

        The identifier of the track.

        • This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.
        Returns:

        The identifier of the track. (Nullable)

      • getUid

         abstract int getUid()

        A unique identifier of the track.

        • This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
        • This identifier is a randomly generated number.
        Returns:

        The unique identifier of the track.

      • getLabel

        @Nullable() abstract String getLabel()

        The label of the track.

        • An empty string if there is no track label.
        • When the label is an empty string, you should introduce a custom one.
        Returns:

        The track label. (Nullable)

      • getLanguage

        @Nullable() abstract String getLanguage()

        The language of the track.

        • This is often an ISO639/2 language string.

        Example:

        • "fra" for French.
        Returns:

        The language of the track. (Nullable)