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

{
    "visible": true,
    "method": "interaction"
}
Property Description
method string Manner in which the sharing menu has been opened

Possible Value:
  • interaction: Click, touch, keyboard
visible string Indicates viewability of the sharing menu

The value is always true.


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

Listens for the closing of the plugin

{
    "visible": false,
    "method": "interaction"
}
Property Description
method string Manner in which the sharing menu has been opened

Possible Value:
  • interaction: Click, touch, keyboard
visible string Indicates viewability of the sharing menu

The value is always false.


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

Triggers whenever somebody shares content from within the sharing plugin

{
    "method": "facebook"
}
Property Description
method string Label of the sharing method used

Possible Values:
  • email
  • facebook
  • link
  • twitter