Skip Navigation

Web Developer Network Wiki

Video Player

The UNL Templates include a video player for your use.

[edit] Video in a Popup Window

To open a video within a popup window you can use the following code:

<a href="http://ucommxsrv1.unl.edu/videoplayer/?video=http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov&amp;width=640&height=500&amp;template=Popup&amp;titlegraphic=NCESR:%20Ken%20Cassman" onclick="window.open(this.href,'popper','scrollbars=yes,width=680,height=600'); return false;">View video</a>

The actual link to the video:

http://ucommxsrv1.unl.edu/videoplayer/?video=http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov&width=640&height=500&template=Popup&titlegraphic=NCESR:%20Ken%20Cassman

[edit] Parameters

  • video – Web accessible URL eg: video=http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov
  • height – Pixel height for the video frame eg: height=357 (add ~20 pixels for video controls)
  • width – Pixel width for the video frame eg: width=450
  • template – Template to output eg: template=Popup, Fixed, Document etc
  • titlegraphic – Titlegraphic text to display eg: titlegraphic=Dr.%20Ken%20Cassman

[edit] Including video on a template page

To include video on a UNL template webpage, include the media player component javascript within the <head> of the document:

<script type="text/javascript" src="/ucomm/templatedependents/templatesharedcode/scripts/components/mediaplayer/swfobject.js"></script>

Then place the following code where you would like the video to be placed:

<div id='preview' class='frame'>
    The video is loading.
    You can also <a href="http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov">download the video</a> at http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov
</div>

<script type='text/javascript'>
var s1 = new SWFObject('/ucomm/templatedependents/templatesharedcode/scripts/components/mediaplayer/player.swf','player','450','357','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20080413_energyctr_cassman.mov&image=http://www.unl.edu/ucomm/ucomm/av/video/640x480introstill.jpg&volume=100');
s1.write('preview');
</script>