This guide gives a brief overview of the Viral Plugin for the JW Player and its related features.
Viral, a video distribution plugin, supports three main functions: embed, link, and recommendations. It unobtrusively allows the user to share the video they are watching and see recommended videos from the publisher.
An ever growing trend on the Internet is the concept of Viral Marketing or Viral Advertising. Essentially, the Viral plugin allows users to distribute your content on any page throughout the Internet, while still attributing the content to your site. This helps to give you exposure you mignt not otherwise get and will help to drive traffic to your site.
Setup varies slightly depending on whether you have the Viral version of the JW Player or the standard version of the JW Player. The Viral JW Player simplifies the setup somewhat by incorporating the Viral plugin. If you are using the default Viral behavior you need only perform a standard player embed. If you are using the Standard JW Player, you will need to specify that the Viral plugin be used. In either case, the default behavior of the plugin will be suitable for your needs.
Notice in this case you must specify the Viral plugin be used.
The Viral plugin is fairly intuitive to use and has two primary methods for sharing videos. These options are presented across three tabs which are as follows:
The Share tab allows you to send an email with a link to the video to somebody you know. It also provides the link that will be sent so that you copy and paste it to wherever you might need it. Note that the link provided can be customized using the viral.link flashvar if you have any special requirements.
The Embed tab provides embed code for use on another site. This allows you to embed a JW Player just about anywhere on the internet and it will link to and play the original video. Much like the link, the embed code can be customized for special needs using the viral.embed flashvar.
The Info tab is not for direct sharing but instead provides useful metadata about the video being watched. This metadata is set either through the relevant JW Player flashvars or in an XML playlist file.
Perhaps one of Viral's most powerful features is the ability to provide a set of recommendations to the user. These recommendations consist of a series of additional videos that are potentially related to the current video being watched. The video recommendations can be set by pointing the viral.recommendations flashvar to an mRSS formatted XML file.
While the default behavior of the plugin makes it easy for your users to share your videos, there are numerous configuration options available to allow you to better tailor it to your needs. The available flashvars are detailed below, with descriptions of what they affect and their possible values.
| Variable | Description | Default |
| viral.onpause | This flashvar is used to specify whether or not if the Viral options appear on pause. | True |
| viral.oncomplete | This flashvar is used to specify whether or not if the Viral options appear when the playback completes. | True |
| viral.allowmenu | Variable to control the menu button in the control bar. | True |
| viral.functions | This flashvar is used to specify which of the Viral options to include in the options panel. One or more individual options can be specified in a comma-delimited list. | All |
| viral.recommendations | This flashvar is used to specify a URL to an XML file with mRSS-formatted recommendations. | undefined |
| viral.link | This flashvar is used to specify the URL to be displayed to the user in the link field. This URL should reference the current page being viewed. | page url |
| viral.email_subject | This flashvar is used to specify the text to show in the subject line of the email sent from this plugin. | 'Check out this video!' |
| viral.email_footer | This flashvar is used to specify the text to show in the footer of the email sent from this plugin. | www.longtailvideo.com |
| viral.embed | This flashvar is used to specify the embed code to be displayed to the user in the embed field. This code should reference the current page being viewed. Note: The embed code needs to be escaped and, due to technical limitations, cannot be re-embedded. | Auto-generated embed code |
| viral.matchplayercolors | This flashvar is used to specify if the plugin should match the colors used by the regular player. This will override the fgcolor and bgcolor flashvars if set to true. | True |
| viral.fgcolor | Foreground color of the plugin. | 0xFFFFFF |
| viral.bgcolor | Background color of the plugin. | 0x333333 |