Constructor
Parameters:
- Extends:
- Source:
Extends
Members
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
backSpan :HTMLElement
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
currentSelection :HTMLElement
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
True when the element is a child of a shaka.ui.MenuGroup.
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
mutationObserver_ :MutationObserver
Type:
- Overrides:
- Source:
nameSpan :HTMLElement
Type:
- Overrides:
- Implements:
- Source:
parent :HTMLElement
Type:
- Overrides:
- Implements:
- Source:
Type:
- Overrides:
- Implements:
- Source:
resizeObserver_ :ResizeObserver
Type:
- Overrides:
- Source:
resizeRafId_ :number
Type:
- Overrides:
- Source:
Type:
- Overrides:
- Implements:
- Source:
videoContainer_ :HTMLElement
Type:
- Overrides:
- Source:
Methods
isStyleAvailable(player, controls) → {boolean}
Whether the subtitle style can be changed. The style can be set before
the text is enabled, so it is available as soon as there is any text
track. The preview shows an example subtitle even while the text is
hidden.
Parameters:
- Source:
Returns:
-
Type
-
boolean
Parameters:
- Overrides:
- Source:
Shared positioning algorithm used by both OverflowMenu and SettingsMenu.
Computes:
- maxHeight so the menu does not overflow the video container vertically.
- left/right offset so the menu stays within the controls bar
horizontally, aligned with the button that opened it.
Parameters:
| Name |
Type |
Description |
menuElement |
HTMLElement
|
The floating menu div to position. |
buttonElement |
HTMLElement
|
The button that triggered the menu. |
controlsContainer |
HTMLElement
|
The bottom controls bar used as the horizontal reference. |
- Overrides:
- Source:
Notifies the elements that share this submenu's container, so they hide
or show their buttons. Other menu levels are not affected.
Parameters:
| Name |
Type |
Description |
type |
string
|
|
- Overrides:
- Source:
Moves the focus into the menu after it is opened.
- Overrides:
- Source:
getCurrentValueLabel() → {string}
- Source:
Returns:
-
Type
-
string
getItems() → {Array<T>}
- Source:
Returns:
-
Type
-
Array<T>
getLabelForItem(item) → {string}
Parameters:
| Name |
Type |
Description |
item |
T
|
|
- Source:
Returns:
-
Type
-
string
getSwatchColorForItem(item) → {string}
Returns the CSS color of the swatch shown next to the item, or null to
not show a swatch.
Parameters:
| Name |
Type |
Description |
item |
T
|
|
- Source:
Returns:
-
Type
-
string
onItemSelected(item)
Parameters:
| Name |
Type |
Description |
item |
T
|
|
- Source:
Clears and rebuilds the menu items, then refreshes the selection indicator.
Call from the subclass constructor and from updateLocalizedStrings() when
item labels are localized strings.
- Source:
Whether a click inside a submenu closes it and returns to its parent.
By default any click does, since it usually chooses an item.
Parameters:
| Name |
Type |
Description |
event |
Event
|
|
- Overrides:
- Source:
Returns:
-
Type
-
boolean
updateCurrentSelection_()
- Source: