Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Embedding with HTML

Under some circumstances, you may wish to embed the JW Player without using a JavaScript library, such as SWFObject or the JW Embedder. If this is the case, you can embed the player using the OBJECT and EMBED tags.

Embed Code

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' 
    id='mediaplayer1' 
    name='mediaplayer1'
    width='480'
    height='270'>
    <param name='movie' value='player.swf'>
    <param name='allowfullscreen' value='true'>
    <param name='allowscriptaccess' value='always'>
    <param name='bgcolor' value='#000000'>
    <param name='wmode' value='opaque'>
    <param name='flashvars' value='file=/videos/bunny.mp4&image=/thumbs/bunny.jpg'>
    <embed
      id='mediaplayer1'
      name='mediaplayer2'
      src='player.swf'
      width='480'
      height='270'
      allowfullscreen='true'
      allowscriptaccess='always'
      bgcolor='#000000'
      wmode='opaque'
      flashvars='file=/videos/bunny.mp4&image=/thumbs/bunny.jpg'
    />
</object>

Setting Player Options

To set player options using this method, add them into the "flashvars" string, separated by ampersand (&) symbols. Note, you will need to duplicate the "flashvars" property in both the OBJECT and EMBED tags.

Escaping Flashvars

The values you pass into player options will sometime contain characters that must be URL escaped. You must replace the three symbols below with their escaped strings:

? -> %3F
= -> %3D
& -> %26

For example, if your video file's URL is http://example.com/video.php?id=abc&key=xyz, the encoded string would look like http://example.com/video.php%3Fid%3Dabc%26key%3Dxyz