video.js
Methods
-
inner deregisterPlugin(name)
-
Deregister a Video.js plugin.
Parameters:
Name Type Description namestring The name of the plugin to be deregistered. Must be a string and must match an existing plugin or a method on the
Playerprototype. -
inner normalizeId(id) → {string}
-
Normalize an
idvalue by trimming off a leading#Parameters:
Name Type Description idstring A string, maybe with a leading
#.Returns:
string -The string, without any leading
#. -
inner registerPlugin(name, plugin) → {function}
-
Register a Video.js plugin.
Parameters:
Name Type Description namestring The name of the plugin to be registered. Must be a string and must not match an existing plugin or a method on the
Playerprototype.pluginfunction A sub-class of
Pluginor a function for basic plugins.Returns:
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.
Parameters:
Name Type Description customFnfunction 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
videojsfunction can be used to initialize or retrieve a player.Parameters:
Name Type Attributes Description idstring | Element Video element or video element ID
optionsObject <optional>
Optional options object for config/settings
readyComponent~ReadyCallback <optional>
Optional ready callback