Track

public protocol Track : EventDispatcherProtocol

A track object.

Remark

  • Either a TextTrack or a MediaTrack.
  • A specific track type (e.g. TextTrack) will always be used.
  • The kind of the track.

    Remark

    The values for this property depend on the specific type of the track.

    Declaration

    Swift

    var kind: String { get }
  • The language of the track.

    Remark

    This is often an ISO639/2 language string.

    Example:

    "fra" for French
    

    Declaration

    Swift

    var language: String { get }

    Return Value

    The language of the track.

  • The label of the track.

    Remark

    • An empty string if there is no track.
    • When the label is an empty string, you should introduce a custom one.

    Declaration

    Swift

    var label: String { get }
  • id

    The identifier of the track.

    Remark

    This identifier can be used to destinguished between related tracks, e.g. tracks in the same list.

    Declaration

    Swift

    var id: String { get }
  • uid

    A unique identifier of the track.

    Remark

    • This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
    • This identifier is a randomly generated number.

    Declaration

    Swift

    var uid: Int { get }