Social sharing controls that let you share the content to all the popular social networks or directly email people

Methods

Sharing(di)

Item Value
Scope Constructor
Returns Sharing

Parameters

Parameter Description
Object di DI object

Instantiates the sharing plugin.


addService(service, handler)

Item Value
Scope public
Returns Sharing

Parameters

Parameter Description
String service A name for the service
Function handler A function that handles the service integration

Adds support for a new service. The handler is required to fire a shared event


Properties

services

Item Value
Scope private
Returns Object

supported services

{
    "facebook": function(){},
    "twitter": function(){},
    "google": function(){},
    "linkedin": function(){},
    "email": function(){}
}

Events

sharingPluginInitialised

Fired on plugin being initialised


sharingPluginReady

Fired on plugin being ready to interact with


shared

fired when shared to a service

{
    service: 'facebook'
}

Listeners

share

Parameters

Parameter Description
String platform The service you want to share on

Will share the video to the specified service along with a default message. Valid services can be fetched from sharing.services

{
    service: 'facebook'
}