Package com.castlabs.android.player.models

# Class MutableVideoTrack

java.lang.Object
com.castlabs.android.player.models.Track
com.castlabs.android.player.models.VideoTrack
com.castlabs.android.player.models.MutableVideoTrack

public class MutableVideoTrack extends VideoTrack
Subclass of `VideoTrack` which allows for `adding` and `removing` `VideoTrackQuality`.

- ## Field Summary

  ### Fields inherited from class com.castlabs.android.player.models.Track

  `LABEL_LOCALE, UNKNOWN_INDEX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MutableVideoTrack()`
  Creates a new instance of `MutableVideoTrack`.
  `MutableVideoTrack(long durationUs)`
  Creates a new instance of `MutableVideoTrack`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addQuality(VideoTrackQuality quality)`
  Add a new quality to the set of available qualities for this track
  `List<VideoTrackQuality>`
  `getQualities()`
  Returns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.
  `void`
  `removeQuality(int qualityIndex)`
  Remove the quality with the specified index
  `void`
  `removeQuality(VideoTrackQuality quality)`
  Remove the specified quality

  ### Methods inherited from class com.castlabs.android.player.models.VideoTrack

  `equals, getDurationUs, getId, getMimeType, hashCode, isOutputAllowed, setDurationUs, setId, setMimeType`

  ### 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 Details

  - ### MutableVideoTrack

    public MutableVideoTrack(long durationUs)
    Creates a new instance of `MutableVideoTrack`.
    Parameters:
      `durationUs` - the duration of the track in microseconds.

  - ### MutableVideoTrack

    public MutableVideoTrack()
    Creates a new instance of `MutableVideoTrack`.

- ## Method Details

  - ### addQuality

    public void addQuality(@NonNull VideoTrackQuality quality)
    Add a new quality to the set of available qualities for this track
    Parameters:
      `quality` - the quality

  - ### removeQuality

    public void removeQuality(int qualityIndex)
    Remove the quality with the specified index
    Parameters:
      `qualityIndex` - index of the quality to remove

  - ### removeQuality

    public void removeQuality(@NonNull VideoTrackQuality quality)
    Remove the specified quality
    Parameters:
      `quality` - the quality to remove

  - ### getQualities

    public List<VideoTrackQuality> getQualities()
    Returns an unmodifiable view on the currently registered qualities sorted in decreasing bitrate order.
    Overrides:
      `getQualities` in class `VideoTrack`
    Returns:
      The currently registered qualities