@Immutable public class Track extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Track.TrackSubType
The type of text track.
|
static class |
Track.TrackType
Possible media track type.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CAPTION_MIME_TYPE_CEA608
The "caption MIME-type" for CEA 608
|
static String |
CAPTION_MIME_TYPE_TTML
The "caption MIME-type" for TTML
|
static String |
CAPTION_MIME_TYPE_TTML_MP4
The "caption MIME-type" for TTML MP4
|
static String |
CAPTION_MIME_TYPE_VTT
The "caption MIME-type" for VTT
|
protected Map<String,Object> |
customData
Custom data set by the receiver application
|
protected Boolean |
isInband
Indicate track is in-band and not side-loaded track.
|
protected String |
language
Language tag as per RFC 5646 (If
subtype is
Track.TrackSubType.SUBTITLES it is mandatory) |
protected String |
name
A descriptive, human-readable name for the track.
|
protected List<String> |
roles
The role(s) of the track.
|
protected Track.TrackSubType |
subtype
For text tracks, the type of text track
|
protected String |
trackContentId
It can be the URL of the track or any other identifier that allows the
receiver to find the content (when the track is not inband or included in
the manifest).
|
protected String |
trackContentType
It represents the MIME-type of the track content.
|
protected int |
trackId
Unique identifier of the track within the context of a
MediaInformation object |
protected Track.TrackType |
type
The type of track
|
| Constructor and Description |
|---|
Track(Map<String,Object> customData,
Boolean isInband,
String language,
String name,
List<String> roles,
Track.TrackSubType subtype,
String trackContentId,
String trackContentType,
int trackId,
Track.TrackType type)
Creates a new instance using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Map<String,Object> |
getCustomData() |
Boolean |
getIsInband() |
String |
getLanguage() |
String |
getName() |
List<String> |
getRoles()
Return the role(s) of the track.
|
Track.TrackSubType |
getSubtype() |
String |
getTrackContentId() |
String |
getTrackContentType() |
int |
getTrackId() |
Track.TrackType |
getType() |
int |
hashCode() |
String |
toString() |
public static final String CAPTION_MIME_TYPE_CEA608
public static final String CAPTION_MIME_TYPE_TTML
public static final String CAPTION_MIME_TYPE_VTT
public static final String CAPTION_MIME_TYPE_TTML_MP4
@Nonnull protected final Map<String,Object> customData
@Nullable protected final Boolean isInband
@Nullable protected final String language
subtype is
Track.TrackSubType.SUBTITLES it is mandatory)@Nullable protected final String name
@Nonnull protected final List<String> roles
@Nullable protected final Track.TrackSubType subtype
@Nullable protected final String trackContentId
@Nullable protected final String trackContentType
trackContentId has
also been provided. It is not mandatory if the receiver has a way to
identify the content from the trackContentId, but recommended.
The track content type, if provided, must be consistent with the track
type.
In addition to valid regular MIME-types, the constants starting with
CAPTION_MIME_TYPE can be used.
protected final int trackId
MediaInformation object@Nonnull protected final Track.TrackType type
public Track(Map<String,Object> customData, Boolean isInband, String language, String name, List<String> roles, Track.TrackSubType subtype, String trackContentId, String trackContentType, int trackId, @Nonnull Track.TrackType type)
customData - the custom data set by the receiver application.isInband - if true the track is in-band. If false
the track is side-loaded. Relevant only for text tracks.language - the language tag as per RFC 5646 (If subtype is
"SUBTITLES" it is mandatory).name - a descriptive, human-readable name for the track. For example
"Spanish".roles - the role(s) of the track, as explained in ISO/IEC 23009-1,
labeled "DASH role scheme". See roles for more
information.subtype - the type of text track, for text tracks only.trackContentId - the content ID. It can be the URL of the track or
any other identifier that allows the receiver to find the
content (when the track is not inband or included in the
manifest). For example it can be the URL of a VTT file.trackContentType - the content type, represented by the MIME-type of
the track content. For example if the track is a VTT file it
will be 'text/vtt'. This field is needed for out of band
tracks, so it is usually provided if a trackContentId
has also been provided. It is not mandatory if the receiver
has a way to identify the content from the
trackContentId, but recommended. The track content
type, if provided, must be consistent with the track type.
In addition to valid regular MIME-types, the constants
starting with CAPTION_MIME_TYPE can be used.
trackId - the unique identifier of the track within the context of a
MediaInformation object.type - the type of track.@Nonnull public Map<String,Object> getCustomData()
@Nullable public Boolean getIsInband()
true if the track is in-band. false if the track
is side-loaded. Relevant only for text tracks.@Nullable public String getLanguage()
subtype is
"SUBTITLES" it is mandatory).@Nullable public String getName()
@Nonnull public List<String> getRoles()
@Nullable public Track.TrackSubType getSubtype()
@Nullable public String getTrackContentId()
@Nullable public String getTrackContentType()
trackContentId has also been provided. It is not
mandatory if the receiver has a way to identify the content from
the trackContentId, but recommended. The track content
type, if provided, must be consistent with the track type.
In addition to valid regular MIME-types, the constants starting
with CAPTION_MIME_TYPE can be used.
public int getTrackId()
MediaInformation object.@Nonnull public Track.TrackType getType()
Copyright © 2022. All rights reserved.