Constructor
new MenuBase(parentnon-null, controlsnon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
parent |
HTMLElement | |
controls |
shaka.ui.Controls |
- Extends:
- Source:
Extends
Members
isSubMenu :boolean
Type:
- boolean
- Overrides:
- Implements:
- Source:
isSubMenuOpened :boolean
Type:
- boolean
- Overrides:
- Implements:
- Source:
parent :HTMLElement
Type:
- HTMLElement
- Overrides:
- Implements:
- Source:
Methods
adjustCustomStyle()
Called by the RAF-debounced resize handler.
Subclasses override this to reposition their specific menu element.
- Source:
adjustMenuStyle(menuElementnon-null, buttonElementnon-null, controlsContainernon-null)
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. |
- Source: