## TextTrackList

The current list of TextTrack for a media file.

## Constructor

#### new TextTrackList(tracksopt)
`tracks/text-track-list.js`, `line 15`

  Create an instance of this class.

  ##### Parameters:

  Name | Type | Attributes | Default | Description
  --- | --- | --- | --- | ---
  `tracks` | Array.<TextTrack> | <optional> | [] | A list of `TextTrack` to instantiate the list with.

  See:

    - Spec

### Extends

- TrackList

### Members

#### length :number
`tracks/track-list.js`, `line 42`

  The current number of `Track`s in the this Trackist.

  Inherited From:
    - TrackList#length

### Methods

#### addTrack(track)
`tracks/text-track-list.js`, `line 54`

  Add a TextTrack to the `TextTrackList`

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `track` | TextTrack | The text track to add to the list.

  ##### Fires:

  - TrackList#event:addtrack
  Overrides:
    - TrackList#addTrack

#### removeTrack(rtrack)
`tracks/track-list.js`, `line 108`

  Remove a Track from the `TrackList`

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `rtrack` | Track | The audio, video, or text track to remove from the list.

  ##### Fires:

  - TrackList#event:removetrack
  Inherited From:
    - TrackList#removeTrack

### Events

#### addtrack
`tracks/track-list.js`, `line 85`

  Triggered when a track is added to a track list.

  ##### Type:

  - EventTarget~Event

  ##### Listeners of This Event:

  - ChaptersButton#update

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `track` | Track | A reference to track that was added.

  Inherited From:
    - TrackList#event:addtrack

#### change
`tracks/track-list.js`, `line 166`

  Triggered when a different track is selected/enabled.

  ##### Type:

  - EventTarget~Event

  ##### Listeners of This Event:

  - CaptionSettingsMenuItem#handleTracksChange
  - ChaptersButton#update
  - DescriptionsButton#handleTracksChange
  - SubsCapsMenuItem#handleTracksChange
  - TextTrackMenuItem#handleTracksChange
  Inherited From:
    - TrackList#event:change

#### removetrack
`tracks/track-list.js`, `line 128`

  Triggered when a track is removed from track list.

  ##### Type:

  - EventTarget~Event

  ##### Listeners of This Event:

  - ChaptersButton#update

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `track` | Track | A reference to track that was removed.

  Inherited From:
    - TrackList#event:removetrack