How to Add a Share Button to Your Video
Cincopa allows you to easily add a share button to your video player, enabling viewers to share your content via a custom URL or embed code. This feature enhances content distribution and visibility.
For more information, refer to the Cincopa Events Documentation.
Share Button Configuration Options
Overview of Arguments
Argument | Type | Description |
---|---|---|
share | Boolean | true to enable the share button, false to disable it. |
share_url | String | The URL to share when the share button is clicked. |
embed_code | Boolean | true to allow displaying embed_url in the share menu, false to hide it. |
embed_url | String | The URL to embed the video. |
How to Enable the Share Button
To enable the share button in your video player, you need to set the share
argument to true
and configure the associated options like share_url
, embed_code
, and embed_url
.
Example:
<script type="text/javascript">
var cincopa = cincopa || {};
cincopa.registeredFunctions = cincopa.registeredFunctions || [];
cincopa.registeredFunctions.push({
func: function (name, data, gallery) {
gallery.args.share = true; // Enable the share button
gallery.args.share_url = "https://www.cincopa.com/video-hosting"; // URL to share
gallery.args.embed_code = true; // Allow embed URL in the share menu
gallery.args.embed_url = "https://www.cincopa.com/video-hosting"; // Embed URL
}, filter: "runtime.on-args"
});
</script>
Explanation of the Arguments:
share
:- Enables or disables the share button.
- Example:
gallery.args.share = true;
share_url
:- Specifies the URL that will be shared when the button is clicked.
- Example:
gallery.args.share_url = "https://www.cincopa.com/video-hosting";
embed_code
:- Determines whether the embed URL (
embed_url
) is shown in the share menu. - Example:
gallery.args.embed_code = true;
- Determines whether the embed URL (
embed_url
:- Defines the embed URL that users can copy from the share menu.
- Example:
gallery.args.embed_url = "https://www.cincopa.com/video-hosting";
Key Notes
- Custom Share Links: Use the
share_url
argument to point to your desired shareable URL. - Embed Option: Control the visibility of the embed URL using the
embed_code
argument. - Content Distribution: These features make it easy for viewers to share your content, increasing its reach.
For further assistance, feel free to check out our Cincopa Help Center.