akamai.amp.Captioning

The Captioning API.

Constructor

Captioning

new Captioning()
Tutorials:

Members

currentRenderer

:akamai.amp.CaptionRenderer

The currently selected caption render.

hidden

:boolean

The hidden flag indicating whether of not the captions are currently displayed.

renderer

:akamai.amp.CaptionRenderer

The render engine used to display caption text.

track

:akamai.amp.Track

The currently selected caption track.

tracks

(readonly) :Array.<akamai.amp.Track>

The list of text tracks.

Methods

changeSettings

changeSettings(object)

Sets a caption Settings Object (styles)

Parameters
Name Type Description
object Object

The caption settings object.

selectTrackByIndex

selectTrackByIndex(index) → {akamai.amp.Track}

Selects a caption track by its index in the getTracks array.

Parameters
Name Type Description
index number

The index to select

Returns
akamai.amp.Track

The selected caption track.

selectTrackByLanguage

selectTrackByLanguage(lang) → {akamai.amp.Track}

Selects a caption track by it's language property.

Parameters
Name Type Description
lang string

The language to select

Returns
akamai.amp.Track

The selected caption track.