Home Reference Source
public class | source

RecordToggle

Extends:

Button → RecordToggle

Button to toggle between start and stop recording.

Method Summary

Public Methods
public

Builds the default DOM className.

public

Disable the RecordToggle element so that it cannot be activated or clicked.

public

enable()

Enable the RecordToggle element so that it can be activated or clicked.

public

handleClick(event: EventTarget~Event)

This gets called when the button is clicked.

public

onStart(event: EventTarget~Event)

Add the vjs-icon-record-stop class to the element so it can change appearance.

public

onStop(event: EventTarget~Event)

Add the vjs-icon-record-start class to the element so it can change appearance.

public

show()

Show the RecordToggle element if it is hidden by removing the 'vjs-hidden' class name from it.

Public Methods

public buildCSSClass(): string source

Builds the default DOM className.

Return:

string

The DOM className for this object.

public disable() source

Disable the RecordToggle element so that it cannot be activated or clicked.

public enable() source

Enable the RecordToggle element so that it can be activated or clicked.

public handleClick(event: EventTarget~Event) source

This gets called when the button is clicked.

Params:

NameTypeAttributeDescription
event EventTarget~Event

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

Listen:

*

tap

*

click

public onStart(event: EventTarget~Event) source

Add the vjs-icon-record-stop class to the element so it can change appearance.

Params:

NameTypeAttributeDescription
event EventTarget~Event
  • optional

The event that caused this function to run.

Listen:

*

Player#startRecord

public onStop(event: EventTarget~Event) source

Add the vjs-icon-record-start class to the element so it can change appearance.

Params:

NameTypeAttributeDescription
event EventTarget~Event
  • optional

The event that caused this function to run.

Listen:

*

Player#stopRecord

public show() source

Show the RecordToggle element if it is hidden by removing the 'vjs-hidden' class name from it.