Class: shaka.ui.OverflowMenu

Constructor

new OverflowMenu(parentnon-null, controlsnon-null)

Parameters:
Name Type Description
parent HTMLElement
controls shaka.ui.Controls
Extends:
Source:

Extends

Classes

Factory

Members

elementNamesToFactories_ :Map<string, !shaka.extern.IUIElement.Factory>

Type:
Source:

controlsContainer_ :HTMLElement

Type:
  • HTMLElement
Source:

isSubMenu :boolean

Type:
  • boolean
Overrides:
Implements:
Source:

isSubMenuOpened :boolean

Type:
  • boolean
Overrides:
Implements:
Source:

overflowMenu_ :HTMLElement

Type:
  • HTMLElement
Source:

overflowMenuButton_ :HTMLButtonElement

Type:
  • HTMLButtonElement
Source:

parent :HTMLElement

Type:
  • HTMLElement
Overrides:
Implements:
Source:

resizeObserver_ :ResizeObserver

Type:
  • ResizeObserver
Overrides:
Source:

resizeRafId_ :number

Type:
  • number
Overrides:
Source:

videoContainer_ :HTMLElement

Type:
  • HTMLElement
Overrides:
Source:

Methods

registerElement(name, factorynon-null, registerInContextopt)

Parameters:
Name Type Attributes Default Description
name string
factory shaka.extern.IUIElement.Factory
registerInContext boolean <optional>
true
Source:

addOverflowMenu_()

Source:

addOverflowMenuButton_()

Source:

adjustCustomStyle()

Called by the RAF-debounced resize handler. Subclasses override this to reposition their specific menu element.
Overrides:
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.
Overrides:
Source:

createChildren_()

Source:

onOverflowMenuButtonClick_()

Source: