Video()
Initialize an instance of the current class using the new keyword along with this constructor.
Methods
-
register(videoPlugin)
-
Registers a new video plugin. The format of the video plugin is validated, and the video plugin is only registered if it defines the required functions and properties.
Parameters:
Name Type Description videoPluginobject The video plugin object to be registered. -
unregister(name)
-
Unregisters a video plugin.
Parameters:
Name Type Description namestring The name of the video plugin to unregister, traditionally represented by videoPlugin.name. -
validate(videoPlugin) → {boolean}
-
Validates the format of a video plugin and checks if it is already registered.
The video plugin must define the following functions:
create()
name (string)encodings (array)features (array)technology (string)
Parameters:
Name Type Description videoPluginobject The video plugin object. Returns:
trueif the video plugin meets the template requirements,falseotherwise.- Type
- boolean