Interface TrackList<TTrack>

List of tracks.

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

Type Parameters

Hierarchy (View Summary)

Indexable

  • readonly [index: number]: TTrack

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

Properties

length: number

The number of tracks in the list.

Methods

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

    Parameters

    • index: number

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

    Returns TTrack

    The track with index index in the list.