Class VideoTrack
java.lang.Object
com.castlabs.android.player.models.Track
com.castlabs.android.player.models.VideoTrack
- Direct Known Subclasses:
MutableVideoTrack
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
ConstructorsConstructorDescriptionCreate a new track with an unknown durationVideoTrack
(long durationUs) Create a new track with the given duration in micro seconds -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
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.getId()
Set the id of this trackReturns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.int
hashCode()
boolean
void
setDurationUs
(long durationUs) Set the duration of this track in microsecondsvoid
Set the id associated with this trackvoid
setMimeType
(String mimeType) Set the mime type accociated with this trackMethods inherited from class com.castlabs.android.player.models.Track
addDescriptor, getDescriptors, getLocalizedLanguageName, getOriginalGroupIndex, getOriginalTrackIndex, getTrackIndex, hasTrickModeId, isTrickModeTrack, setDescriptors, setOriginalGroupIndex, setOriginalTrackIndex, setTrackIndex, setTrickModeIds
-
Constructor Details
-
VideoTrack
public VideoTrack()Create a new track with an unknown duration -
VideoTrack
public VideoTrack(long durationUs) Create a new track with the given duration in micro seconds- Parameters:
durationUs
- the track duration in micro seconds
-
-
Method Details
-
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
- Returns:
- The mime type associated with this track
-
setMimeType
Set the mime type accociated with this track- Parameters:
mimeType
- the mime type
-
getId
Set the id of this track- Returns:
- The id associated with this track
-
setId
Set the id associated with this track- Parameters:
id
- the id
-
isOutputAllowed
public boolean isOutputAllowed() -
hashCode
public int hashCode() -
equals
-