You can encourage your viewers to share your content on social media by enabling and customizing the sharing menu in your player.
When enabled, a sharing icon is added to the control bar of your player. When your viewers click the sharing icon, they have the ability to do any of the following activities:
Share your video to the social networks you have chosen
Email a link to your video to those within their network
Copy the link to your video to creatively share with others
Copy a code block that enables your video to be embedded in web pages, like blog posts
If the player is embedded within an iframe, the social sharing URL links to the top level domain. Iframe limitations prevent the player from accessing the full URL to the page where the video is embedded.
<br /> <hr />
## Customize a basic sharing menu
If you are not a developer, do not have developer resources, or prefer a simpler implementation, you can <a href="/platform/docs/players-set-display-options-and-sharing" target="_blank">implement social sharing</a> through your JWP dashboard.
Use the following steps to enable and customize the sharing menu:
Add a `
sharing` object to your player JSON configuration.<br /><br />
Define the <a href="/players/reference/sharing-config-ref#available-built-in-social-networks" target="_blank">social media networks</a> (including email) to which your viewers can share your videos. If you do not define the `
sharing` object, the default settings will appear: `
link`.<br /><br />
(Optional) Customize the localized tooltip text for and `
aria-label` HTML attribute of the sharing button in the control bar and sharing menu options.<br /><br />This requires that the HTML <a href="https://www.w3schools.com/tags/att_global_lang.asp" target="_blank">lang</a> attribute has been defined for the page. When this attribute is defined, the player automatically translates the text of the tooltips and `
aria-label` HTML attributes into the defined language.
<br /> <hr />
## Add a custom site to the sharing menu
You can also add a custom site or behavior to the sharing menu. The following steps and code samples illustrate how this can be done:
In the `
sharing.sites` array, add an empty object.
Within the empty object, define the `
label`, and `
|**icon** `||**(Required)** URL to an icon that appears in the sharing menu<br /><br />This can be an **.svg** or **.png** file.|
|**label** `||Label for the custom site or custom behavior|