VolumeMenuButton

Button for volume popup

Constructor

new VolumeMenuButton(player, optionsopt)

Creates an instance of this class.

Parameters:
Name Type Attributes Default Description
player Player

The Player that this class should be attached to.

options Object <optional>
{}

The key/value store of player options.

Extends

Members

volumeUpdate

Methods

attachVolumeBarEvents()

Add events listeners to the created VolumeBar.

buildCSSClass() → {string}

Builds the default DOM className.

Returns:
string -

The DOM className for this object.

Overrides:

createEl() → {Element}

Create the PopupButtons DOM element.

Returns:
Element -

The element that gets created.

Inherited From:

createPopup() → {Popup}

Create the VolumeMenuButton popup

Returns:
Popup -

The popup that was created

Overrides:

handleClick(eventopt)

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

Parameters:
Name Type Attributes Description
event EventTarget~Event <optional>

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

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

handleMouseDown(eventopt)

Handle the mousedown and touchdown events on the VolumeBar

Parameters:
Name Type Attributes Description
event EventTarget~Event <optional>

The mousedown or touchdown event that caused this to run.

Listens to Events:
  • event:mousedown
  • event:touchdown

handleMouseUp(eventopt)

Handle the mouseup and touchend events on the VolumeBar

Parameters:
Name Type Attributes Description
event EventTarget~Event <optional>

The mouseup or touchend event that caused this to run.

Listens to Events:
  • event:mouseup
  • event:touchend

update()

Update the Popup that this button is attached to.

Inherited From: