Class: shaka.ui.SettingsMenu

Constructor

new SettingsMenu(parentnon-null, controlsnon-null, iconText)

Parameters:
Name Type Description
parent HTMLElement
controls shaka.ui.Controls
iconText shaka.extern.UIIcon | string
Implements:
Extends:
Source:

Extends

Members

backButton :HTMLButtonElement

Type:
  • HTMLButtonElement
Implements:
Source:

backSpan :HTMLElement

Type:
  • HTMLElement
Implements:
Source:

button :HTMLButtonElement

Type:
  • HTMLButtonElement
Implements:
Source:

currentSelection :HTMLElement

Type:
  • HTMLElement
Implements:
Source:

isMenuOpened_ :boolean

Type:
  • boolean
Source:
Type:
  • HTMLElement
Implements:
Source:
Type:
  • MutationObserver
Source:

mutationObserver_ :MutationObserver

Type:
  • MutationObserver
Source:

nameSpan :HTMLElement

Type:
  • HTMLElement
Implements:
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

addButton_(iconText)

Parameters:
Name Type Description
iconText shaka.extern.UIIcon | string
Source:

addMenu_()

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:

inOverflowMenu_()

Source:

notifyMenuClose_()

Source:

notifyMenuOpen_()

Source:

onButtonClick_()

Source:

onMenuClose()

Source:

onMenuOpen()

Source: