
Public call on a plugin
Hi,
Is there a way to create a public function inside a JWPlayer plugin ?
A thing like this:
var jwplugin = function (player, config, div) {
this.test = function() {
console.log(this)
};
};
This not work, test function is not callable with:
player.plugins.jwplugin.test()
The only thing I manage to do is :
var jwplugin = function (player, config, div) {
player.test = function() {
console.log(this)
};
};
But the test method is global at all the player instance and other plugins.
Thanks