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
  • 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

      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, or SdkConsts.UNKNOWN_TIME_US if the duration is unknown, or SdkConsts.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 or SdkConsts.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
    • isOutputAllowed

      public boolean isOutputAllowed()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Track
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Track