inner normalizeId(id) → {string}

Normalize an id value by trimming off a leading #

Name Type Description
id string

A string, maybe with a leading #.

string -

The string, without any leading #.

inner registerPlugin(name, plugin) → {function}

Register a Video.js plugin.

Name Type Description
name string

The name of the plugin to be registered. Must be a string and must not match an existing plugin or a method on the Player prototype.

plugin function

A sub-class of Plugin or a function for basic plugins.

function -

For advanced plugins, a factory function for that plugin. For basic plugins, a wrapper function that initializes the plugin.

inner resetFormatTime()

Resets format-time to the default implementation.

inner setFormatTime(customFn)

Replaces format-time with a custom implementation, to be used in place of the default.

Name Type Description
customFn function

A custom format-time function which will be called with the current time and guide (in seconds) as arguments. Passed fn should return a string.

inner videojs(id, optionsopt, readyopt) → {Player}

Doubles as the main function for users to create a player instance and also the main library object. The videojs function can be used to initialize or retrieve a player.

Name Type Attributes Description
id string | Element

Video element or video element ID

options Object <optional>

Optional options object for config/settings

ready Component~ReadyCallback <optional>

Optional ready callback

Player -

A player instance