TextTrack

public protocol TextTrack : Track

A TextTrack object is an element that represents a single text track that can be displayed in the player.

  • The text track in-band metadata track dispatch type of the text track that the TextTrack object represents.

    Declaration

    Swift

    var inBandMetadataTrackDispatchType: String { get }
  • The text track mode.

    • ‘disabled’: The track is disabled, meaning that is not displayed. Moreover, the track does not fire cuechange events, there are no active cues.
    • ‘hidden’: The track is hidden, meaning that is not displayed but that new cues are actively being added and maintained, cuechange events are being fired.
    • ‘showing’: The track is displaying and cues are actively being added and maintained, cuechange events are being fired

    Declaration

    Swift

    var mode: TextTrackMode { get set }
  • The text track’s list of TextTrackCue objects as a TextTrackCueList. This list includes all of the text track’s known cues.

    Declaration

    Swift

    var cues: [TextTrackCue] { get }
  • The text track’s list of active TextTrackCue objects as a TextTrackCueList. This list dynamically updates as time progresses so that it includes all cues that are currently active. Currently active cues are ones that start before the current playback position and end after it.

    Declaration

    Swift

    var activeCues: [TextTrackCue] { get }
  • The content type of the given track

    • ‘webvtt’: The track contains WebVTT (Web Video Text Tracks) content.

    Declaration

    Swift

    var type: String { get }