dit staat in de bron
<script type="text/javascript">
<!--
// Media ID
var sMediaID = 0;
// Player (WM, QuickTime, FlashVideo)
var sPlayer = "FlashVideo";
// Media Section Code
var iCCS = 0;
var sDisplayImage = "";
// refresh the page with new url
function PlayThis(sURL)
{
url = "http://www.x-tremevideo.com/Homepage?mediaLocation=" + sURL;
window.location = url;
}
// Get the Movie Object
function GetMovieName(movieName)
{
if (navigator.appName.indexOf("Microsoft") != -1)
{
return window[movieName];
}
else
{
return document[movieName];
}
}
// Load new movie - Function for the FLV FIles
function loadNewMovie(sURL)
{
GetMovieName("VidPlayerFullScreen").loadNewMovie(sURL, sDisplayImage);
}
/*
Function to show hide the play button for the now playing item
*/
function nowPlayingShowHide()
{
iCurrentplayingMedia = GetCurrentMedia()+1;
for(k=1; k <= iTotalMedia; k++)
{
if(iCurrentplayingMedia == k)
document.getElementById("play"+k).style.display = "none";
else
document.getElementById("play"+k).style.display = "block";
}
}
/*---
This function is called from Video Barker, We are including a flash object to communicate with server to get the url
for the selected media. Once media url is available in flash it will make a call to the function below.
---*/
function playVid(sURL, sDisImage)
{
try
{
sMediaType = "";
urlString = sURL;
sDisplayImage = sDisImage;
sExtension = urlString.split(".");
sExtension = "."+sExtension[sExtension.length-1].toLowerCase();
document.getElementById("SelfAssignDisplay").style.display = "none";
document.getElementById("player").style.display = "block";
// check for quick time supported extensions
if( ".mov.moov.qt.mpg.mpeg.p4v.m4v.3gp".match(sExtension) != null ) {
sMediaType = "QT";
}
// check for flash video extension
if( ".flv.mp4".match(sExtension) != null ) {
sMediaType = "FLV";
}
// check for flash video extension
if( sExtension == ".wmv" ) {
sMediaType = "WM";
}
// Play media in correct player
switch(sMediaType) {
case "FLV":
FlashPlayerDisplayHandler(sURL);
break;
case "WM":
WMPlayDisplayHandler(sURL);
break;
case "QT":
QTPlayerDisplayHandler(sURL);
break;
default:
FlashPlayerDisplayHandler(sURL);
break;
}
}
catch(e){}
}
/*
* Function to play video From Media library
*/
function PlayVOD(sMediaID)
{
this.sMediaID = sMediaID;
GetMovieName("GetMediaFlashObject").getNewFileURL(""+sMediaID);
}
// return the Media ID
function getMediaLink() {
sMediaLink = "";
if ( sMediaID > 0) {
sMediaLink = "&sMediaID="+sMediaID+"&SectionCode="+iCCS;
}
else if(typeof(aVODBarkerSettings[0]) != null)
{
sMediaLink = "&sMediaID="+aVODBarkerSettings[0]+"&SectionCode="+iCCS;
}
return sMediaLink;
}
/* Function to handle EndofStream, Get and play next video if PlayAll is enabled */
function EndofStreamHandler() {
try
{
if(bAutoPlayAll == true) {
playNextVid();
}
}
catch(e){}
}
/* Enable / Disable autoplay all Vids */
function EnableAutoPlayAll(bAutoPlayAll){
// Set variable
this.bAutoPlayAll = bAutoPlayAll;
}
//-->
</script><script type="text/javascript" src="/AfcTool/jquery/jquery-1.3.2.min.js"></script>