MediaTrack

public protocol MediaTrack : Track

A MediaTrack is an element that represents a single video or audio track that can be played by the player.

  • Indicates whether the track is enabled.

    Remark

    Options are:
    • true: The track will be enabled. If another track was currently enabled, that track will be disabled and the player will switch to this track.
    • false: The track will be disabled. Given that only one track can be active, this means no audio/video will be played.

    Declaration

    Swift

    var enabled: Bool { get set }
  • Returns the bandwidth of the media track’s current active quality.

    Remark

    The value of this property changes when the media track’s active quality changes.

    Declaration

    Swift

    @available(*, deprecated, message: "This property is deprecated, use `activeQuality` instead. To access the bandwidth value, use the `bandwidth` property of `activeQuality`.")
    var activeQualityBandwidth: Int { get }
  • The active quality of the media track, i.e. the quality that is currently being played.

    Declaration

    Swift

    var activeQuality: Quality? { get }
  • The qualities of the media track.

    Declaration

    Swift

    var qualities: QualityList { get }