Sharing Events

Sharing API calls work in conjunction with our getPlugin() method. For instance, all of our sharing instances are using the getPlugin(‘sharing’) API call to refer to this particular plugin. The following will target our sharing plugin:

.on('ready', function(event){
  sharingPlugin = jwplayer().getPlugin('sharing');
});

All sharingPlugin references below will assume that the above code is implemented on your page.


("sharing").on('open')

Listens for the opening of the plugin.

ValueDescriptionType
-No value returned-

("sharing").on('close')

Listens for the closing of the plugin.

ValueDescriptionType
-No value returned-

("sharing").on('click')

Triggered whenever somebody shares content from within the sharing plugin.

Returns an object with the following:

ValueDescriptionType
methodLabel of the sharing method that was usedString