![](https://secure.gravatar.com/avatar/cb73cb28c4497c4c0b5eb1624906af54?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
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