Kaltura AddThis Player Plugin

AddThis (http://www.addthis.com ) is a facility to share content (including video players) in popular social networks such as Facebook, twitter, google plus and more.

The Kaltura AddThis plugin provides two important capabilities to the Kaltura dynamic player:

  1. The ability to share a video to social networks
  2. The ability to have the link sent to social networks point at a dynamic programmable landing page for the video – creating a starting point from which visitors can continue to explore the site. 

This plugin is available for the flash player only.

Intended Audience

This document is intended for Kaltura Project management team.

Demo page

The plugin can be previewed here: http://projects.kaltura.com/eitan/landing/lp1.php?entryId=1_elwxyx1c

Installation instructions

To install the “dynamic landing page” code.

  1. Create a new player.
  2. Remove all share buttons but the one on the controller.
  3. Add the following configuration in the additional parameters area. 'Paste your plug-in line here:'
    {syntaxhighlighter brush: php;fontsize: 100; first-line: 1; }addThis.plugin=true&addThis.relativeTo=PlayerHolder&addThis.position=firstChild&addThis.path=/content/uiconf/kaltura/kdp3/kdp3.5.50/plugins/addThisPlugin3.swf&addThis.includeInLayout=false&addThis.url={shareSnippet.directLink}&addThis.title={mediaProxy.entry.name}&addThis.description={mediaProxy.entry.description}&addThis.useFacebookOGTags=true&addThis.via=YOUR_PARTNER_NAME&shareSnippet.plugin=true&shareSnippet.path=/content/uiconf/ps/kaltura/kdp/v3.5.50/plugins/shareSnippetPlugin1.swf&shareSnippet.relativeTo=PlayerHolder&shareSnippet.position=lastChild&shareSnippet.uuid={mediaProxy.entry.id}&shareSnippet.width=100%&shareSnippet.height=100%&shareBtnControllerScreen.kClick=sendNotification('showAdvancedShare')&shareSnippet.showEmbed=false{/syntaxhighlighter}
  4. Hit 'go'. The above string should be parsed to many key-values items
  5. Save the player and Keep its ID of the player handy.
  6. In the attached php you need to replace some strings with your matching strings. For convenience I marked all replaceable strings with ~ so you can search them in the text. The strings to be added are the partner ID, AdminSecret and the UIConfID for this player.
  7. Upload the page to your servers. Please note that this page contains in its php part your admin secret so make sure you keep the page secured (avoid spreading copies of it). 

    Do Not Test it on localhost because Facebook cannot crawl your local host, and therefore this page must be public.
  8. Go back to the studio and edit your player. Use the “additional parameters” UI to add parameters to the plugin:
    1. Change the landing page url to the path of the page from #3 with this postfix ?entryId= . E.g. if your page is located in www.domain.com/folder/landing.php the landingPagePrefix will be www.domain.com/folder/landing.php?entryId=

      In our demo: 

      Key:
      shareSnippet.landingPagePrefix
      value:
      http://projects.kaltura.com/eitan/ps2core1/landing.html?uid=

    2. Add the following items manually:
      Key:
      shareSnippet.customSnippetBefore
      value:
      %3Cscript src='http://projects.kaltura/embed.js?uid=
      Key:
      shareSnippet.customSnippetAfter
      value:
      script%2F%3E
  9. Test:
    1. Make sure that you have PHP client library in your testing environment.
    2. Go to this URL and add an entryId you grabbed from your KMC. The URL should look like www.domain.com/folder/landing.php?entryId=1_wjik3s23
    3. After the player loads – Click Share.
    4. Click Facebook.
    5. Click Share.
    6. Check your Facebook wall (and remove the video after testing).

Configuration of Specific Social Networks

This section provides high level configuration instructions for the underlying AddThis plugin.

  1. The social networks included in the AddThis plugin are configured via the “networksToShow” parameter in the UIConf. The current setting is “facebook, twitter, linkedin, wordpress”. Additional networks can be selected from the following link: http://www.addthis.com/services/all.
    It's recommended to use Firefox to easily identify the network variables.  Hover over the social site and note the end of the URL in the lower left corner of your browser. 
    For example, hovering over “amazon” produces the url: http://www.addthis.com/services/detail/amazonwishlist. The value “amazonwishlist” is the variable that should be added to the “networksToShow” attribute. To produce a visible icon, right-click on the icon next to the site name and save it.  You will need to import this image to the skin.fla file.
  2. For more information on how to control the networks plugin – see the detailed documentation here: LINK (also contains a sample configuration for ABC)
  3. For a sample of a specific configuration (TMZ) - LINK

 


 
In This Article