Class VideoTrack
- java.lang.Object
-
- com.castlabs.android.player.models.Track
-
- com.castlabs.android.player.models.VideoTrack
-
- Direct Known Subclasses:
MutableVideoTrack
public class VideoTrack extends Track
A video track.- Since:
- 3.0.0
-
-
Field Summary
-
Fields inherited from class com.castlabs.android.player.models.Track
LABEL_LOCALE, UNKNOWN_INDEX
-
-
Constructor Summary
Constructors Constructor Description VideoTrack()
Create a new track with an unknown durationVideoTrack(long durationUs)
Create a new track with the given duration in micro seconds
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
long
getDurationUs()
The duration in microseconds, orSdkConsts.UNKNOWN_TIME_US
if the duration is unknown, orSdkConsts.MATCH_LONGEST_US
if the duration should match the duration of the longest track whose duration is known.String
getId()
Set the id of this trackString
getMimeType()
List<VideoTrackQuality>
getQualities()
Returns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.int
hashCode()
void
setDurationUs(long durationUs)
Set the duration of this track in microsecondsvoid
setId(String id)
Set the id associated with this trackvoid
setMimeType(String mimeType)
Set the mime type accociated with this track-
Methods inherited from class com.castlabs.android.player.models.Track
addDescriptor, getDescriptors, getLocalizedLanguageName, getOriginalGroupIndex, getOriginalTrackIndex, getTrackIndex, hasTrickModeId, isTrickModeTrack, setDescriptors, setOriginalGroupIndex, setOriginalTrackIndex, setTrackIndex, setTrickModeIds
-
-
-
-
Method Detail
-
getQualities
public List<VideoTrackQuality> getQualities()
Returns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.- Returns:
- The currently registered qualities
-
getDurationUs
public long getDurationUs()
The duration in microseconds, orSdkConsts.UNKNOWN_TIME_US
if the duration is unknown, orSdkConsts.MATCH_LONGEST_US
if the duration should match the duration of the longest track whose duration is known.- Returns:
- The duration in microseconds or
SdkConsts.UNKNOWN_TIME_US
-
setDurationUs
public void setDurationUs(long durationUs)
Set the duration of this track in microseconds- Parameters:
durationUs
- the duration of this track in microseconds orSdkConsts.UNKNOWN_TIME_US
-
getMimeType
@Nullable public String getMimeType()
- Returns:
- The mime type associated with this track
-
setMimeType
public void setMimeType(@Nullable String mimeType)
Set the mime type accociated with this track- Parameters:
mimeType
- the mime type
-
getId
@Nullable public String getId()
Set the id of this track- Returns:
- The id associated with this track
-
setId
public void setId(@Nullable String id)
Set the id associated with this track- Parameters:
id
- the id
-
-