Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

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

1 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

If you are looking to extend functionality of a third-party plugin then I would recommend contacting that plugin’s developer for assistance. If you are instead talking about one of the built-in plugins to the player, there would be no way to create a public function inside of them.

Thank you.

This question has received the maximum number of answers.