var QUICKTIME_PLAYER = 13; var FLASH_PLAYER = 12; var WINDOWSMEDIA_PLAYER = 11; var FLASH_PLAYER_SLIDE_SHOW = 16; var FLASH_PLAYER_PLAYLIST = 18; var FLASH_PLAYER_AUDIO = 14; var FLASH_PLAYER_AUDIO_PLAYLIST = 141; var silverlightPlayerObjectTag = ''; var showBuyDRMPlayerInstallButton = false; var showSLCaptions = false; var Player = null; function onPlayerReady(player) { Player = player; if(Player != null && showSLCaptions) Player.ShowCaptions(true); } function onPlayerInstalled() { $('#installPlayerDiv').hide(); } if (!height) height = 480; if (playerType == QUICKTIME_PLAYER) { if (QTNEXT.length > 0) { height = 310; QTNEXT = QTNEXT.replace(/320/g, width); QTNEXT = QTNEXT.replace(/240/g, height); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(QTNEXT); document.write(''); } else { if (isAudio) { height = 15; document.write(''); } if (isMAC && isMAC == 'true') { document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(''); } else { if (width > 0) { mediaSrc = mediaSrc.replace('rtsp', 'http'); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else { document.write(''); } } } } else if (playerType == FLASH_PLAYER) { var hasReqestedVersion = DetectFlashVer(9, 0, 0); if (hasReqestedVersion) { if (isAudio) { document.write(''); height = 20; document.write('
Learn360
'); document.write(''); } else { var alternateContent = '
'; alternateContent += '







This content requires the Adobe Flash Player version 9.
'; alternateContent += 'Get Flash

'; document.write(alternateContent); } } else if (playerType == WINDOWSMEDIA_PLAYER) { if (isAudio) { height = 62; document.write(''); } //add a srting variable to contain most common tags for SL player. //Use this string variable to construct object tags for streaming and download. showBuyDRMPlayerInstallButton = true; var silverlightPlayerObjectTagBegin = '' ; silverlightPlayerObjectTag = '' + '' + '' + ''+ '' + '' + 'TTAF1-DFXP'+ ''+silverlightCloseCaptionFile+''+ //'http://localhost/clientbin/1_4157_en.xml'+ ''; } endObjectTag += '' + '" />' ; //if silverlight is not installed and if video is silverlight drm enabled //then show the image //else //try to play the file in windows media player. windowsMediaObject += '' + '' + '' + '' + '' ; if (closeCaptionFile != null) { windowsMediaObject += ''; } windowsMediaObject += ' '; if(isSilverlightDRMEnabled == 'True') { silverlightInstallImage = '' + 'Get Microsoft Silverlight '; document.writeln(silverlightPlayerObjectTagBegin + silverlightPlayerObjectTag + authXML + endObjectTag + silverlightInstallImage + ''); } else { if(Silverlight.isInstalled()) windowsMediaObject = ''; document.writeln(silverlightPlayerObjectTagBegin + silverlightPlayerObjectTag + authXML + endObjectTag +''+ windowsMediaObject + ''); } //document.writeln(windowsMediaObject); // document.write(''); // document.write(''); // document.write(''); // document.write(''); // document.write(''); // if (closeCaptionFile != null) { // document.write(''); // } // document.write('') // document.write('') } else if (playerType == FLASH_PLAYER_PLAYLIST) { var hasReqestedVersion = DetectFlashVer(9, 0, 0); if (hasReqestedVersion) { var newHeight = height; mediaSrc = mediaSrc.substring(0, mediaSrc.indexOf('.xml') + 4); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } else { var alternateContent = '
'; alternateContent += '







This content requires the Adobe Flash Player version 9.
'; alternateContent += 'Get Flash

'; document.write(alternateContent); } } if (typeof (mediaFileName) != "undefined" && typeof (mediaFilePathProtocol) != "undefined") { document.write(''); } function insertFlashPlayer(mediaFileName, mediaFilePathWithoutName, mediaFilePathProtocol) { var so = new SWFObject("swf/jwplayer.swf", "smhPlayer", "354", "290", "9.0.28", "#000000"); var flashvars = "&plugins=captions&captions.file=" + closeCaptionFile; if (mediaFilePathProtocol == 'rtmp') { if (mediaFilePathWithoutName.length > 1) { so.addParam("streamer", mediaFilePathWithoutName.substring(0, mediaFilePathWithoutName.length - 1)); flashvars += "&streamer=" + mediaFilePathWithoutName.substring(0, mediaFilePathWithoutName.length - 1); } so.addParam("file", mediaFileName.replace("&", "%26")); flashvars += "&file=" + mediaFileName.replace("&", "%26"); } else if (mediaFilePathProtocol == 'http') { var mediaSrc = mediaFilePathWithoutName + mediaFileName; so.addParam("file", mediaSrc.replace("&", "%26")); flashvars += "&file=" + mediaSrc.replace("&", "%26"); } so.addParam("allowfullscreen", "true"); flashvars += "&allowfullscreen=true"; so.addParam("autostart", "true"); flashvars += "&autostart=true"; so.addParam("flashvars", flashvars); so.write("player"); } function showSilverlightInstallButton() { //if silverlight is installed hide the full screen and launch player buttons. else show. if(Silverlight.isInstalled()) { //alert("hi"); $('#'+fullScreenClientID).hide(); $('#'+launchPlayerClientID).hide(); $('#captions').hide(); //alert('show BuyDRM player Install button ='+showBuyDRMPlayerInstallButton); var silverlightInstallButtonTag = ''+ ''+ ''+ ''+ ''+ ' '+ ''+ ' '+ ''; //$('#installPlayerDiv').replaceWith('
'+silverlightInstallButtonTag+'
'); $('#installPlayerDiv').append(silverlightInstallButtonTag); //document.write(silverlightInstallButtonTag); silverlightInstallButtonTag = ''; } } function downloadLicense(containerdiv) { if(playerType == WINDOWSMEDIA_PLAYER && isSilverlightDRMEnabled == 'True') { var beginTag = '' ; var silverlightDownloadPlayerObjectTag = '' + '' + '' + ''+ '' + '' + ''; $('#'+containerdiv).append(beginTag + silverlightDownloadPlayerObjectTag + authXMLForDownload + endObjectTag); $('#'+containerdiv).load(); //alert($('#'+containerdiv).html()); } }