/**
 * Media Player for adding video (FLV) and audio (MP3) to UCMS web pages
 * Author: Paul Edwards
 */

/*
 * Media Player variables
 */
 
// The URL of the mediaplayer SWF file.
var player = "http://www.education2.bham.ac.uk/webapps/mediaplayer/mediaplayer.swf"
// The ID of the mediaplayer object once embedded in the page
var playerID = "ply";
// The width of the mediaplayer
var playerWidth = "550";
// The height of the mediaplayer (include additional 20 pixels for player controls)
var playerHeight = "330";
// The minimum Adobe Flash Player version required to display/play the video
var flashVersion = "9";

/* 
 * Media File variables
 */
 
 var mediaFile =  "http://www.education2.bham.ac.uk/media/bbs/av/bbs_sept_09.flv";
 var mediaImage = "http://www.education2.bham.ac.uk/media/bbs/images/bbs_sept_09.jpg";

/* 
 * Add the mediaplayer to the page
 */
 
// Create the mediaplayer object for the web page
var myPlayer = new SWFObject(player, playerID, playerWidth, playerHeight, flashVersion);
myPlayer.addParam("allowfullscreen","true");
myPlayer.addParam("allowscriptaccess","always");
myPlayer.addParam("flashvars","file=" + mediaFile + "&image="+ mediaImage);
// Embed the mediaplayer object in the page 
myPlayer.write("mp6");

/*
 * Add the following HTML to your UCMS web page:
 */
 
/*
<div id="mp1">
    <p>Sorry, the media player cannot be displayed by your web browser.</p>
    <p>Please install Adobe Flash Player: <a href="http://www.adobe.com/products/flashplayer/">http://www.adobe.com/products/flashplayer/</a></p>
</div>
<script type="text/javascript" src="http://www.education2.bham.ac.uk/webapps/swfobject.js"></script>
<script type="text/javascript" src="http://www.education2.bham.ac.uk/media/#This JavaScript file#"></script>
*/
