Go
Not registered? Sign up!

AddOns

Using Plugins ( Return to Help Index )

Implementing a Plugin on your site involves a simple addition to your existing JW Player HTML code. That's easy, and we'll discuss it in a moment. If you're looking for help with implementing a skin, click here.

If it's a Module you're interested in, you're going to have to get that information at each Module's site (linked to from each Module page).

Implementing a Plugin

Plugins are hosted on LongTail Video's servers so you don't need to download them to your own server. All you have to do to implement a plugin is include a reference to it in your player HTML code -- that's it! The JW Player 4.1 and above are all designed to load plugins from LongTail, so as long as you have a recent player and the right configuration in your HTML code you'll get the plugins you want.

For example, let's say you wanted to get the Viral plugin running on your site. First, you'd acquire the necessary plugin variable by clicking 'Get This' for the plugin in the AddOns section of the LongTail site (in this case, it's viral-1 ). Second, you'd add a reference to this plugin to your HTML code. Depending on how you embed your player -- SWFObject or standard Embed -- your code will look like one of the following:

SWFObject

var so = new SWFObject('http://www.yoursite.com/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('file', '/upload/flash.flv');
so.addVariable('plugins', 'viral-1');
so.write('player');

SWFObject (alternate form)

var so = new SWFObject('http://www.yoursite.com/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars', 'file=/upload/flash.flv&plugins=viral-1');
so.write('player');

Embed Code

<embed
src="http://www.yoursite.com/player.swf"
width="470"
height="320"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=/upload/flash.flv&plugins=viral-1
"
/>


If you have more than one plugin, then just separate their variable names with commas.

SWFObject

so.addVariable('plugins', 'firstplugin,secondplugin,viral-1');

SWFObject (alternate form)

so.addParam('flashvars', 'plugins=firstplugin,secondplugin,viral-1');

Embed Code

flashvars="file=/upload/flash.flv&plugins=firstplugin,secondplugin,viral-1"



Implementing Variables for a Specific Plugin

Now that you've successfully configured your player to load the plugin you may need to perform some additional configuration specific to the plugin. Again, let's use the Viral plugin as an example.

The Viral plugin allows for several additional configuration settings. For example, you can you set a flashvar to control the appearance of a callout that when clicked provides embed, link and recommendation functions. If you set viral.callout=mouse , then the callout appears when the user mouses over the video area (default). If you set viral.callout=always

SWFObject

so.addParam('flashvars','&file=/upload/flash.flv&plugins=viral-1
&viral.callout=always');

Embed Code

flashvars="file=/upload/flash.flv&plugins=viral-1&viral.callout=always"


For general help with the Embed/SWFObject player code itself, visit JW's Embed Wizard.


If you have any questions, feel free to contact us, or head over to the Support Forum.