You can encourage your viewers to share your content on social media by enabling and customizing the sharing menu in your player.


Screenshot of the sharing menu in the 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.

<br />

Use the following steps to enable and customize the sharing menu:

  1. Add a `sharing` object to your player JSON configuration.<br /><br />

  2. 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: `facebook`, `twitter`, `email`, and `link`.<br /><br />

  3. (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="" 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:

  1. In the `sharing.sites` array, add an empty object.

  2. Within the empty object, define the `icon`, `label`, and `src`.

**icon** `string`**(Required)** URL to an icon that appears in the sharing menu<br /><br />This can be an **.svg** or **.png** file.
**label** `string`Label for the custom site or custom behavior
**src** `string` | `function`URL of the custom site or JavaScript behavior to be executed when this sharing option is clicked

<br />