THEOplayer Web SDK
    Preparing search index...

    Interface Track

    Represents a track of a media resource.


    - A specific track type (e.g. TextTrack) will always be used.

    interface Track {
        accessibility: AccessibilityRole[];
        id: string;
        kind: string;
        label: string;
        language: string;
        uid: number;
        addEventListener<TType extends keyof TrackEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<TrackEventMap[TType]>,
        ): void;
        removeEventListener<TType extends keyof TrackEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<TrackEventMap[TType]>,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    accessibility: AccessibilityRole[]

    The accessibility settings of the track.


    - For DASH: the accessibility descriptors for the corresponding AdaptationSet.
    - For HLS: the CHARACTERISTICS for the corresponding #EXT-X-MEDIA tag.

    id: string

    The identifier of the track.


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

    kind: string

    The kind of the track.


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

    label: string

    The label of the track.

    language: string

    The language of the track.

    uid: number

    A unique identifier of the track.


    - 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.

    Methods