Constructor
new TextTrackButton(player, optionsopt)
Creates an instance of this class.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
player |
Player | The |
||
options |
Object |
<optional> |
{} | The key/value store of player options. |
Extends
Methods
-
buildCSSClass() → {string}
-
Builds the default DOM
className
.Returns:
string -The DOM
className
for this object.- Inherited From:
-
createEl() → {Element}
-
Create the
MenuButtons
s DOM element.Returns:
Element -The element that gets created.
- Inherited From:
-
createItems(itemsopt) → {Array.<TextTrackMenuItem>}
-
Create a menu item for each text track
Parameters:
Name Type Attributes Default Description items
Array.<TextTrackMenuItem> <optional>
[] Existing array of items to use during creation
- Overrides:
-
createMenu() → {Menu}
-
Create the menu and add all items to it.
- Inherited From:
-
disable() → {MenuButton}
-
Disable the
MenuButton
. Don't allow it to be clicked.- Inherited From:
-
enable() → {MenuButton}
-
Enable the
MenuButton
. Allow it to be clicked.- Inherited From:
-
handleClick(event)
-
Handle a click on a
MenuButton
. See ClickableComponent#handleClick for instances where this is called.Parameters:
Name Type Description event
EventTarget~Event The
keydown
,tap
, orclick
event that caused this function to be called.Listens to Events:
- event:tap
- event:click
- Inherited From:
-
handleKeyPress(event)
-
Handle tab, escape, down arrow, and up arrow keys for
MenuButton
. See ClickableComponent#handleKeyPress for instances where this is called.Parameters:
Name Type Description event
EventTarget~Event The
keydown
event that caused this function to be called.Listens to Events:
- event:keydown
- Inherited From:
-
handleSubmenuKeyPress(event)
-
Handle a
keydown
event on a sub-menu. The listener for this is added in the constructor.Parameters:
Name Type Description event
EventTarget~Event Key press event
Listens to Events:
- event:keydown
- Inherited From:
-
pressButton()
-
Put the current
MenuButton
into a pressed state.- Inherited From:
-
unpressButton()
-
Take the current
MenuButton
out of a pressed state.- Inherited From:
-
update()
-
Update the menu based on the current state of its items.
- Inherited From: