new PlaybackRateMenuItem(player [, options])
Creates an instance of this class.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
player |
Player | The |
|
options |
Object |
<optional> |
The key/value store of player options. |
- Source:
- control-bar/playback-rate-menu/playback-rate-menu-item.js
Extends
Methods
-
createEl( [type] [, props] [, attrs])
-
Create the `MenuItem's DOM element
Parameters:
Name Type Argument Default Description typestring <optional>
li Element's node type, not actually used, always set to
li.propsObject <optional>
{} An object of properties that should be set on the element
attrsObject <optional>
{} An object of attributes that should be set on the element
- Inherited From:
- Source:
- menu/menu-item.js
Returns:
The element that gets created.
- Type
- Element
-
handleClick( [event])
-
This gets called when an
PlaybackRateMenuItemis "clicked". See ClickableComponent for more detailed information on what a click can be.Parameters:
Name Type Argument Description eventEventTarget~Event <optional>
The
keydown,tap, orclickevent that caused this function to be called.- Overrides:
- Source:
- control-bar/playback-rate-menu/playback-rate-menu-item.js
Listens to Events:
- event:tap
- event:click
-
selected(selected)
-
Set the state for this menu item as selected or not.
Parameters:
Name Type Description selectedboolean if the menu item is selected or not
- Inherited From:
- Source:
- menu/menu-item.js
-
update( [event])
-
Update the PlaybackRateMenuItem when the playbackrate changes.
Parameters:
Name Type Argument Description eventEventTarget~Event <optional>
The
ratechangeevent that caused this function to run.- Source:
- control-bar/playback-rate-menu/playback-rate-menu-item.js
Listens to Events:
- Player#event:ratechange