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.
Value | Description | Type |
---|---|---|
- | No value returned | - |
("sharing").on('close')
Listens for the closing of the plugin.
Value | Description | Type |
---|---|---|
- | No value returned | - |
("sharing").on('click')
Triggered whenever somebody shares content from within the sharing plugin.
Returns an object with the following:
Value | Description | Type |
---|---|---|
method | Label of the sharing method that was used | String |