Step 1: Download the Installation ZipInstalling the JW Player onto your page is a simple two-step process. If you haven't already, download the installation ZIP, which contains everything you need to get started. Step 2: Upload Player Files to WebsiteTransfer the player.swf, yt.swf and swfobject.js file from the ZIP to your website. Make sure that you've also uploaded all the necessary videos, songs and/or images to your site. Step 3: Embed Player Code into HTMLEmbed the player in your HTML page with the lines of code below. Note: If you place the files in different directories, make sure to set the references in this code accordingly. <p id='preview'>The player will show in this paragraph</p>
<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=video.flv');
s1.write('preview');
</script>
Notice the flashvars parameter above can contain a list of variables for configuring the player to use different Plugins or Skins. To quickly set up FlashVars, use the setup wizard. Simply choose an example, select the variables you want to use and paste the code onto your page. It's that easy. ![]() JW Player: FlashvarsHere’s a list of all configuration options (flashvars) the player accepts. Options are entered in the embed code to set how the player looks and functions. EncodingFirst, a note on encoding. You must URL encode the three glyphs ? = & inside flashvars, because of the way these flashvars are loaded into the player (as a querystring). The urlencoded values for these symbols are listed here:
If, for example, your file flashvar is at the location getplaylist.php?id=123&type=flv, you must encode the option to getplaylist.php%3Fid%3D123%26type%3Dflv. The player will automatically URLdecode every option it receives. Playlist propertiesTo load a playlist, only a single option is required:
The following flashvars can be set instead of playlistfile. They are used to create a playlist with a single item. They set various properties of the media item to load (e.g. the source file or preview image or title). Those properties are:
In addition to the built-in providers listed above, it is possible to load custom providers into the JW Player, e.g. for specific CDN support. Custom providers are packed in a separate SWF file, much like a plugin. A number of custom providers are available from our AddOns repository. Third party developers interested in building a custom provider should check out our MediaProvider SDK. Note: Technically, any playlist item property is also available as an option. In practice though, the properties author, date, description, link, tags and title are not used anywhere if a single media file is loaded. LayoutThese flashvars control the look and layout of the player.
Our AddOns Library contains a list of available skins. BehaviorThese flashvars control the playback behavior of the player.
LogoUnlicensed copies of the JW Player contain a small watermark that pops up when the player is buffering. In licensed copies of the player, this watermark is empty by default. It is possible to place your own watermark in the player using the following options:
Note: Once again, the logo options can only be used for licensed players! ColorsThese options are available when either using no skin or when using skins built with the older SWF skinning model (these skins have the extension .swf). These color options will be deprecated once SWF skinning support is dropped in a future release.
The four color flashvars must be entered using hexadecimal values, as is common for web colors (e.g. FFCC00 for bright yellow). Config XMLAll of the above flashvars can also be listed in an XML file and then fed to the player with a single flashvars:
<config> <image>files/bunny.jpg</image> <repeat>true</repeat> <volume>40</volume> <playlist>right</playlist> <playlist.size>150</playlist.size> <controlbar>over</controlbar> </config> Options set in the embed code will overwrite those in the config XML. Note: Due to the crossdomain restrictions of Flash, you cannot load a config XML from one domain in a player on another domain. This issue can be circumvented by placing a crossdomain.xml file on the server that hosts your XML. ![]() Install the JW Player for Flash v5 |