Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

Extending custom module from custom module via plugin manager

$
0
0

If you need to extend the behviour of a plugin, or override it you need to do it in the following way:

mw.PluginManager.add('myExtendedModule', mw.PluginManager.getClass("otherModule").extend({
    //you can override any method of the otherModule you are extending in here
    //or add your own logic, like event listeners and call the otherModule methods directly
}));

You need to remember not to include the otherModule in the available modules in your player and set only the myExtendedModule as enabled, otherwise both plugins will be initiated in your player, and it will probably yield unwanted results.


Viewing all articles
Browse latest Browse all 7410