Last updated

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

ArgumentTypeDescription
shareBooleantrue to enable the share button, false to disable it.
share_urlStringThe URL to share when the share button is clicked.
embed_codeBooleantrue to allow displaying embed_url in the share menu, false to hide it.
embed_urlStringThe 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:

  1. share:

    • Enables or disables the share button.
    • Example: gallery.args.share = true;
  2. 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";
  3. embed_code:

    • Determines whether the embed URL (embed_url) is shown in the share menu.
    • Example: gallery.args.embed_code = true;
  4. 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

  1. Custom Share Links: Use the share_url argument to point to your desired shareable URL.
  2. Embed Option: Control the visibility of the embed URL using the embed_code argument.
  3. 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.