Expand all

MediaElement

Main entry class for elements enhanced with videojs Provides page player loading, either with click-to-load dialog or inline mode

Constructor

new MediaElement(element) #

Parameters:

Name Type Description
element HTMLMediaElement
Source:

Properties

$interstitial :JQuerystaticnullable #

There should be only 1 interstitial to indicate the dialog is loading.

Type:

Source:
There should be only 1 interstitial to indicate the dialog is loading.

currentlyPlayingstatic #

Global state to de-duplicate clicks and to make sure only 1 dialog is presented at a time.

Source:

Global state to de-duplicate clicks and to make sure only 1 dialog is presented at a time.

Methods

clickHandler(event) #

Click handler to open dialog and play a {MediaElement}

Parameters:

Name Type Description
event MouseEvent
Source:
Click handler to open dialog and play a {MediaElement}

getUrl() → {string} #

Construct URL to the file description page

Source:

Returns:

Type
string
Construct URL to the file description page

keyPressHandler(event) #

Key press handler for <a role="button"> element to open a dialog and play a {MediaElement}.

Parameters:

Name Type Description
event KeyBoardEvent
Source:

Key press handler for <a role="button"> element to open a dialog and play a {MediaElement}.

load() #

Load our customizations for the media element, loading videojs inline or upon click inside a MediaDialog

Source:

Load our customizations for the media element, loading videojs inline or upon click inside a MediaDialog

originalIsPlaying() → {boolean} #

Check if the original element is playing

Source:

Returns:

Type
boolean
Check if the original element is playing

playInlineOrOpenDialog() #

Method to load the player inline or open a dialog and play the element in the dialog.

Source:

Method to load the player inline or open a dialog and play the element in the dialog.