BigPlayButton

The initial play button that shows before the video has played. The hiding of the BigPlayButton get done via CSS and Player states.

Constructor

new BigPlayButton()

Extends

Methods

addChild(child, optionsopt) → {Component}

Add a child Component inside of this Button.

Parameters:
Name Type Attributes Default Description
child string | Component

The name or instance of a child to add.

options Object <optional>
{}

The key/value store of options that will get passed to children of the child.

Returns:
Component -

The Component that gets added as a child. When using a string the Component will get created by this process.

Inherited From:
Deprecated:
  • since version 5

buildCSSClass() → {string}

Builds the default DOM className.

Returns:
string -

The DOM className for this object. Always returns 'vjs-big-play-button'.

createEl(tagopt, propsopt, attributesopt) → {Element}

Create the Buttons DOM element.

Parameters:
Name Type Attributes Default Description
tag string <optional>
"button"

The element's node type. This argument is IGNORED: no matter what is passed, it will always create a button element.

props Object <optional>
{}

An object of properties that should be set on the element.

attributes Object <optional>
{}

An object of attributes that should be set on the element.

Returns:
Element -

The element that gets created.

Inherited From:

disable()

Enable the Button element so that it cannot be activated or clicked. Use this with Button#enable.

Inherited From:

enable()

Enable the Button element so that it can be activated or clicked. Use this with Button#disable.

Inherited From:

handleClick(event)

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

Parameters:
Name Type Description
event EventTarget~Event

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

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

handleKeyPress(event)

This gets called when a Button has focus and keydown is triggered via a key press.

Parameters:
Name Type Description
event EventTarget~Event

The event that caused this function to get called.

Listens to Events:
  • event:keydown
Overrides: