Package com.castlabs.android.player.models

## 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 duration
    `VideoTrack​(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, 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.
    `String` | `getId()` | Set the id of this track
    `String` | `getMimeType()` |
    `List<VideoTrackQuality>` | `getQualities()` | Returns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.
    `int` | `hashCode()` |
    `boolean` | `isOutputAllowed()` |
    `void` | `setDurationUs​(long durationUs)` | Set the duration of this track in microseconds
    `void` | `setId​(String id)` | Set the id associated with this track
    `void` | `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`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### 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 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, 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`