Interface MediaTrackList

List of media tracks.

interface MediaTrackList {
    length: number;
    addEventListener<TType extends keyof TrackListEventMap>(
        type: TType | readonly TType[],
        listener: EventListener<TrackListEventMap[TType]>,
    ): void;
    item(index: number): MediaTrack;
    removeEventListener<TType extends keyof TrackListEventMap>(
        type: TType | readonly TType[],
        listener: EventListener<TrackListEventMap[TType]>,
    ): void;
    readonly [index: number]: MediaTrack;
}

Hierarchy (View Summary)

Indexable

  • readonly [index: number]: MediaTrack

    Index signature to get the media track at the requested index in the list.

Properties

length: number

The number of media tracks in the list.

Methods

  • Return the media track at the requested index in the list.

    Parameters

    • index: number

      A number representing the index of a media track in the list.

    Returns MediaTrack

    The media track with index index in the list.