Skip to content

Instantly share code, notes, and snippets.

@postnati
Created January 27, 2011 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save postnati/798220 to your computer and use it in GitHub Desktop.
Save postnati/798220 to your computer and use it in GitHub Desktop.
JWPlayer Code
<script type='text/javascript' src='http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN.cloudfront.net/video/swfobject.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type="text/javascript">
// see http://blog.deconcept.com/swfobject/ for documentation on SWFObject function
var so = new SWFObject('http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN.cloudfront.net/video/player.swf','mpl',"640","360",'9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
// see documentation on configuration options http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12536/configuration-options
so.addVariable('file', "http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN.cloudfront.net/video/YOUR_LOW_QUALITY_VIDEO_FILE.mp4");
so.addVariable('hd.file',"http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN.cloudfront.net/video/YOUR_HIGH_QUALITY_VIDEO_FILE.mp4");
so.addVariable('plugins','hd');
so.addVariable('skin',"http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN .cloudfront.net/video/glow.zip");
so.addVariable('dock','false');
so.addVariable('controlbar','over');
so.addVariable('controlbar.idlehide','true');
so.addVariable('bufferlength', 5);
so.addVariable('image',"http://YOUR-CLOUDFRONT-SPECIFIC-SUBDOMAIN .cloudfront.net/video/video_splash.jpg");
so.addVariable('stretching','fill');
so.write('mediaspace');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment