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();
- Table of Contents
- Init Options
- Properties
- versionpro
- Methods
- Events
Init Options
options : object
Initialization options for the share plugin.
- options :
object- .projectUrl :
Array.<string> - .mode :
Array.<string>
- .projectUrl :
options.projectUrl : Array.<string>
The project url to be shared
Default: null
options.mode : Array.<string>
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
The share plugin’s version string.
Example
console.log('The share plugin version is', player.share.version);
Methods
player.share.share()
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”
Triggered when calling share.share() and the mode of the plugin is proxy.