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.
-
-
Method Summary
Modifier and Type Method Description abstract StringgetKind()The kind of the track. abstract StringgetId()The identifier of the track. abstract intgetUid()A unique identifier of the track. abstract StringgetLabel()The label of the track. abstract StringgetLanguage()The language of the track. -
-
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)
-
-
-
-