Sharing
New to our sharing plugin in 7.2, is the inclusion of a fully-functional API. This works in conjunction with our new 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:
var sharingPlugin = playerInstance.getPlugin('sharing');
All sharingPlugin references below will assume that the above code is implemented on your page.
Setters
sharingPlugin.open() - Opens the sharing plugin. This will also pause content if it is triggered during playback.
sharingPlugin.close() - Closes the sharing plugin if it is opened. This will resume playback if the sharing overlay was triggered during content.
Events
sharingPlugin.on('open') - Listens for the opening of the plugin.
sharingPlugin.on('close') - Listens for the closing of the plugin.
sharingPlugin.on('click') - Triggered whenever somebody shares content from within the sharing plugin.
Returns: Label of the sharing method that was used. (method: facebook | method: link | method: embed)
Partager