Class: AudioTrackList

AudioTrackList

The current list of AudioTrack for a media file.


new AudioTrackList( [tracks])

Create an instance of this class.

Parameters:
Name Type Argument Default Description
tracks Array.<AudioTrack> <optional>
[]

A list of AudioTrack to instantiate the list with.

Source:
tracks/audio-track-list.js
See:

Extends

Methods


addTrack(track)

Add an AudioTrack to the AudioTrackList.

Parameters:
Name Type Description
track AudioTrack

The AudioTrack to add to the list

Source:
tracks/audio-track-list.js
Fires:
  • Track#event:addtrack

removeTrack(track)

Remove an AudioTrack from the AudioTrackList.

Parameters:
Name Type Description
track AudioTrack

The AudioTrack to remove from the list

Source:
tracks/audio-track-list.js
Fires:
  • Track#event:removetrack

Events


addtrack

Triggered when a track is added to a track list.

Type: EventTarget~Event
Properties:
Name Type Description
track Track

A reference to track that was added.

Inherited From:
Source:
tracks/track-list.js

change

Triggered when a different track is selected/enabled.

Type: EventTarget~Event
Inherited From:
Source:
tracks/track-list.js
Listeners of This Event:

removetrack

Triggered when a track is removed from track list.

Type: EventTarget~Event
Properties:
Name Type Description
track Track

A reference to track that was removed.

Inherited From:
Source:
tracks/track-list.js