Redirect Notice

Redirect Notice

The page you requested has been relocated to Player Docs.

akamai.amp.TrackList

The resource object interface.

Extends

Methods

add

add(track)

Add a track to the track list

Parameters
Name Type Description
track akamai.amp.Track

The track

addEventListener

addEventListener(typenon-null, funcnon-null)

Adds a listener for a given event type.

Parameters
Name Type Description
type string

A string representing the event's type.

func function

A function to call when the event is triggered.

Inherited From:

addListener

addListener()

Alias of addEventListener

Inherited From:

clear

clear()

Remove all tracks from the track list

destroy

destroy()

Destroys the EventDispatcher

Inherited From:

dispatch

dispatch(type, detailopt)

Dispathes and event, triggering all event listener of the event's type.

Parameters
Name Type Attributes Description
type string

The event to type.

detail Object <optional>

Object representing event specific details.

Inherited From:

dispatchEvent

dispatchEvent(eventnon-null)

Dispathes and event, triggering all event listener of the event's type.

Parameters
Name Type Description
event Event

The event to dispatch.

Inherited From:

emit

emit()

Alias of dispatch

Inherited From:

getTrackById

getTrackById(id) → {akamai.amp.Track}

Retrieve a track with a given id.

Parameters
Name Type Description
id string

The id

Returns
akamai.amp.Track

track The track

off

off()

Alias of removeEventListener

Inherited From:

on

on()

Alias of addEventListener

Inherited From:

once

once(typenon-null, funcnon-null)

Adds a listener for a given event type that is called once, then removed.

Parameters
Name Type Description
type string

A string representing the event's type.

func function

A function to call when the event is triggered.

Inherited From:

remove

remove(track)

Remove a track from the track list

Parameters
Name Type Description
track akamai.amp.Track

The module's key

removeEventListener

removeEventListener(typenon-null, funcnon-null) → (nullable) {function}

Removes a listener for a given event type.

Parameters
Name Type Description
type string

A string representing the event's type.

func function

A function to call when the event is triggered.

Inherited From:
Returns
function

the handler that was removed if any

removeListener

removeListener()

Alias of removeEventListener

Inherited From: