MediaElement(element)

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

Show:

Constructor

new MediaElement(element)

...
Parameters:
Name Type Description
element HTMLMediaElement
Source:

Members

(static, nullable) $interstitial :JQuery

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

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

Type:
Source:

(static) currentlyPlaying

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

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

Source:

Methods

clickHandler(event)

Click handler to open dialog and play a {MediaElement}.

Click handler to open dialog and play a {MediaElement}

Parameters:
Name Type Description
event MouseEvent
Source:

getUrl() → {string}

Construct URL to the file description page.

Construct URL to the file description page

Source:
Returns:
Type
string

keyPressHandler(event)

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

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

Parameters:
Name Type Description
event KeyBoardEvent
Source:

load()

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

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

Source:

originalIsPlaying() → {boolean}

Check if the original element is playing.

Check if the original element is playing

Source:
Returns:
Type
boolean

playInlineOrOpenDialog()

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

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

Source: