- 1 :
/**
- 2 :
* @file plugins.js
- 3 :
* @module plugins
- 4 :
*/
- 5 :
import Player from './player.js';
- 6 :
- 7 :
/**
- 8 :
* The method for registering a video.js plugin. {@link videojs:videojs.registerPlugin].
- 9 :
*
- 10 :
* @param {string} name
- 11 :
* The name of the plugin that is being registered
- 12 :
*
- 13 :
* @param {plugins:PluginFn} init
- 14 :
* The function that gets run when a `Player` initializes.
- 15 :
*/
- 16 :
const plugin = function(name, init) {
- 17 :
Player.prototype[name] = init;
- 18 :
};
- 19 :
- 20 :
export default plugin;