Skip to main content

TextTrackCueList

The TextTrackCueList interface of the WebVTT API is an array-like object that represents a dynamically updating list of TextTrackCue objects.

MDN Reference

Indexable

[index: number]: TextTrackCue

Methods

[iterator]()

iterator: ArrayIterator<TextTrackCue>;

Returns

ArrayIterator<TextTrackCue>


getCueById()

getCueById(id): TextTrackCue | null;

The getCueById() method of the TextTrackCueList interface returns the first VTTCue in the list represented by the TextTrackCueList object whose identifier matches the value of id.

MDN Reference

Parameters

ParameterType
idstring

Returns

TextTrackCue | null

Properties

length

readonly length: number;

The length read-only property of the TextTrackCueList interface returns the number of cues in the list.

MDN Reference