SubsCapsMenuItem()

SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles in the SubsCapsMenu.

Extends

Methods

createEl(typeopt, propsopt, attrsopt) → {Element}

Create the `MenuItem's DOM element

Parameters:
Name Type Attributes Default Description
type string <optional>
li

Element's node type, not actually used, always set to li.

props Object <optional>
{}

An object of properties that should be set on the element

attrs Object <optional>
{}

An object of attributes that should be set on the element

Returns:
Element -

The element that gets created.

Overrides:

handleClick(event)

This gets called when an TextTrackMenuItem is "clicked". See ClickableComponent for more detailed information on what a click can be.

Parameters:
Name Type Description
event EventTarget~Event

The keydown, tap, or click event that caused this function to be called.

Listens to Events:
  • event:tap
  • event:click
Inherited From:

handleKeyDown(event)

Ignore keys which are used by the menu, but pass any other ones up. See ClickableComponent#handleKeyDown 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:

handleTracksChange(event)

Handle text track list change

Parameters:
Name Type Description
event EventTarget~Event

The change event that caused this function to be called.

Listens to Events:
Inherited From:

selected(selected)

Set the state for this menu item as selected or not.

Parameters:
Name Type Description
selected boolean

if the menu item is selected or not

Inherited From: