share

The share plugin aims to provide a simple API for sharing your project.

NOTE: Sharing can behave differently on different platforms so you should use our API when you want to share.

Example

player.share.share();

Init Options

options : object

Initialization options for the share plugin.

options.projectUrl : Array.<string>
property

The project url to be shared

Default: null

options.mode : Array.<string>
property

The operating mode of the plugin - self or proxy. Self means that the player will handle the sharing. Proxy means that the player only informs about the share intention to the parent.
When calling share.share(), if mode=self it will call navigator.share() if available, or open a default modal with different social network options to share to.
If mode=proxy it will trigger a share.intent event.

Default: 'self'

Properties

player.share.version : string
propertyreadonly

The share plugin’s version string.

Example

console.log('The share plugin version is', player.share.version);

Methods

player.share.share()
method

Share the video. If mode=self it will open the native share or a modal with different social network options to share to (depends on the platform).
If mode=proxy it will trigger a share.intent event.

See: share.intent, mode
Example

player.share.share();

Events

“share.intent”
event

Triggered when calling share.share() and the mode of the plugin is proxy.

Rate this page: X
Tell us more!