This options block controls a settings submenu with social sharing options: copy embed code, copy video link and share video to social networks.
If you are not a developer, do not have developer resources, or prefer a simpler implementation, you can set up social sharing from your JWP dashboard.
Setting an empty "sharing":{} options block will enable the social sharing menu and icon in the control bar. Without the nested config options, it will show the page URL link with default sharing sites, but no embed code.
When a viewer uses this sharing feature, the whole page where the video is embedded is shared. This feature does not share specific playlist items within a playlist.
jwplayer("myElement").setup({
"file": "http://example.com/myVideo.mp4",
"sharing": {
"sites": ["reddit", "facebook", "twitter"]
}
});
Property | Description |
---|---|
code string | Embed code to display in the embed code field
If no code is set, the field is not shown. |
heading < 8.6.0 string | Short, instructive text to display at the top of the sharing screen
Default: Share Video
WARNING: Starting with JWP 8.6.0, use intl.{lang}.sharing.heading .
|
link string | If defined, when the video is shared from the player, the recipient will be referred to this URL
Default: URL of the current page NOTE: link can be defined per playlistitem
|
sites array | Allows for the customization of social icons
Default: ["facebook", "twitter", "email"]
|
Available Built-In Social Networks
Social Network | Configuration Value | Social Network | Configuration Value | |
---|---|---|---|---|
"facebook" | Tumblr | "tumblr" | ||
"twitter" | "linkedin" | |||
"pinterest" | "reddit" | |||
"email" |