---
title: "TextTrackCueList | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface TextTrackCueList

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackCueList)

interface TextTrackCueList {  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/)\>;  
    [getCueById](#getcuebyid-1)(id: string): [TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/) | null;  
    \[index: number\]: [TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/);  
}

#### Indexable

-   \[index: number\]: [TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/)
    

##### Index

### Properties[](#properties)

[length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [getCueById](#getcuebyid)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackCueList/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/)\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/)\>
    

### getCueById[](#getcuebyid)

-   getCueById(id: string): [TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/) | null[](#getcuebyid-1)
    
    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](https://developer.mozilla.org/docs/Web/API/TextTrackCueList/getCueById)
    
    #### Parameters
    
    -   id: string
    
    #### Returns [TextTrackCue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextTrackCue/) | null
