Class: DescriptionsButton

DescriptionsButton

The button component for toggling and selecting descriptions


new DescriptionsButton(player [, options] [, ready])

Creates an instance of this class.

Parameters:
Name Type Argument Description
player Player

The Player that this class should be attached to.

options Object <optional>

The key/value store of player options.

ready Component~ReadyCallback <optional>

The function to call when this component is ready.

Source:
control-bar/text-track-controls/descriptions-button.js

Extends

Methods


buildCSSClass()

Builds the default DOM className.

Source:
control-bar/text-track-controls/descriptions-button.js
Returns:

The DOM className for this object.

Type
string

createItems( [items])

Create a menu item for each text track

Parameters:
Name Type Argument Default Description
items Array.<TextTrackMenuItem> <optional>
[]

Existing array of items to use during creation

Inherited From:
Source:
control-bar/text-track-controls/text-track-button.js
Returns:

Array of menu items that were created

Type
Array.<TextTrackMenuItem>

handleTracksChange(event)

Handle text track change

Parameters:
Name Type Description
event EventTarget~Event

The event that caused this function to run

Source:
control-bar/text-track-controls/descriptions-button.js
Listens to Events: