diff options
| author | Veit Olschinski <veit@olschinski.de> | 2010-04-05 10:29:41 +0000 |
|---|---|---|
| committer | Veit Olschinski <veit@olschinski.de> | 2010-04-05 10:29:41 +0000 |
| commit | 5bc7b36708d272081ffd2df5658ddf12275447dd (patch) | |
| tree | 7884d88bd634f62d94e0239c911305ac4349dba8 /modules/JWplayer | |
| parent | 5dbb23df7f03aeb32c6c5a3fa6139dd479f9c0b4 (diff) | |
| download | webtrees-5bc7b36708d272081ffd2df5658ddf12275447dd.tar.gz webtrees-5bc7b36708d272081ffd2df5658ddf12275447dd.tar.bz2 webtrees-5bc7b36708d272081ffd2df5658ddf12275447dd.zip | |
Diffstat (limited to 'modules/JWplayer')
| -rw-r--r-- | modules/JWplayer/audio.png | bin | 0 -> 5720 bytes | |||
| -rw-r--r-- | modules/JWplayer/audio_2.png | bin | 0 -> 939 bytes | |||
| -rw-r--r-- | modules/JWplayer/flvVideo.php | 65 | ||||
| -rw-r--r-- | modules/JWplayer/player.swf | bin | 0 -> 42566 bytes | |||
| -rw-r--r-- | modules/JWplayer/silverlight.js | 581 | ||||
| -rw-r--r-- | modules/JWplayer/swfobject.js | 276 | ||||
| -rw-r--r-- | modules/JWplayer/wmvVideo.php | 70 | ||||
| -rw-r--r-- | modules/JWplayer/wmvplayer.js | 799 | ||||
| -rw-r--r-- | modules/JWplayer/wmvplayer.xaml | 330 | ||||
| -rw-r--r-- | modules/JWplayer/yt.swf | bin | 0 -> 1210 bytes |
10 files changed, 2121 insertions, 0 deletions
diff --git a/modules/JWplayer/audio.png b/modules/JWplayer/audio.png Binary files differnew file mode 100644 index 0000000000..380e7def33 --- /dev/null +++ b/modules/JWplayer/audio.png diff --git a/modules/JWplayer/audio_2.png b/modules/JWplayer/audio_2.png Binary files differnew file mode 100644 index 0000000000..e479fb2ad9 --- /dev/null +++ b/modules/JWplayer/audio_2.png diff --git a/modules/JWplayer/flvVideo.php b/modules/JWplayer/flvVideo.php new file mode 100644 index 0000000000..80c2c842ff --- /dev/null +++ b/modules/JWplayer/flvVideo.php @@ -0,0 +1,65 @@ +<?php +/** + * JWplayer module for phpGedView + * + * Display flv video media Items using JW Player in PGV + * + * webtrees: Web based Family History software + * Copyright (C) 2010 webtrees development team. + * + * Derived from PhpGedView + * Copyright (C) 2007 to 2010 PGV Development Team. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @package webtrees + * @subpackage Module + * @version $Id$ + * @author Brian Holland + */ + ?> +<html xmlns="http://www.w3.org/1999/xhtml" <?php echo i18n::html_markup(); ?>> +<head> + <META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <title>JW Player for Flash</title> + <script type="text/javascript" src="modules/JWplayer/swfobject.js"></script> +</head> +<body bgcolor="#000000"> +<center> + +<?php +global $pid, $GEDCOM ; +global $flvVideo, $SERVER_URL; +$flvVideo="../../".decrypt(safe_GET('flvVideo')); +$preview=""; +?> + + <div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div> + <script type="text/javascript"> + var video = "<?php print $flvVideo; ?>"; + var preview = "<?php print $preview; ?>"; + var s1 = new SWFObject("modules/JWplayer/player.swf","ply","480","365","9","#000000"); + s1.addParam("allowfullscreen","true"); + s1.addParam("allowscriptaccess","always"); + s1.addParam("stretching","fill"); + s1.addParam("flashvars","file=" +video+ "&image=" +preview+ "&autostart=true" ); + s1.write("container"); + </script> + +</center> +</body> + +</html> diff --git a/modules/JWplayer/player.swf b/modules/JWplayer/player.swf Binary files differnew file mode 100644 index 0000000000..7a36433a8a --- /dev/null +++ b/modules/JWplayer/player.swf diff --git a/modules/JWplayer/silverlight.js b/modules/JWplayer/silverlight.js new file mode 100644 index 0000000000..8ecfa63392 --- /dev/null +++ b/modules/JWplayer/silverlight.js @@ -0,0 +1,581 @@ +/* silverlight.js - PhpGedView Author Brian Holland + * @package webtrees + * @subpackage Module + * @version $Id$ +*/ +/////////////////////////////////////////////////////////////////////////////// +// +// Silverlight.js version 2.0.30523.6 +// +// This file is provided by Microsoft as a helper file for websites that +// incorporate Silverlight Objects. This file is provided under the Microsoft +// Public License available at +// http://code.msdn.microsoft.com/silverlightjs/Project/License.aspx. +// You may not use or distribute this file or the code in this file except as +// expressly permitted under that license. +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +/////////////////////////////////////////////////////////////////////////////// + +if (!window.Silverlight) +{ + window.Silverlight = { }; +} + +////////////////////////////////////////////////////////////////// +// +// _silverlightCount: +// +// Counter of globalized event handlers +// +////////////////////////////////////////////////////////////////// +Silverlight._silverlightCount = 0; + +////////////////////////////////////////////////////////////////// +// +// fwlinkRoot: +// +// Prefix for fwlink URL's +// +////////////////////////////////////////////////////////////////// +Silverlight.fwlinkRoot='http://go2.microsoft.com/fwlink/?LinkID='; + +////////////////////////////////////////////////////////////////// +// +// onGetSilverlight: +// +// Called by Silverlight.GetSilverlight to notify the page that a user +// has requested the Silverlight installer +// +////////////////////////////////////////////////////////////////// +Silverlight.onGetSilverlight = null; + +////////////////////////////////////////////////////////////////// +// +// onSilverlightInstalled: +// +// Called by Silverlight.WaitForInstallCompletion when the page detects +// that Silverlight has been installed. The event handler is not called +// in upgrade scenarios. +// +////////////////////////////////////////////////////////////////// +Silverlight.onSilverlightInstalled = function () {window.location.reload(false);}; + +////////////////////////////////////////////////////////////////// +// +// isInstalled: +// +// Checks to see if the correct version is installed +// +////////////////////////////////////////////////////////////////// +Silverlight.isInstalled = function(version) +{ + var isVersionSupported=false; + var container = null; + + try + { + var control = null; + + try + { + control = new ActiveXObject('AgControl.AgControl'); + if ( version == null ) + { + isVersionSupported = true; + } + else if ( control.IsVersionSupported(version) ) + { + isVersionSupported = true; + } + control = null; + } + catch (e) + { + var plugin = navigator.plugins["Silverlight Plug-In"] ; + if ( plugin ) + { + if ( version === null ) + { + isVersionSupported = true; + } + else + { + var actualVer = plugin.description; + if ( actualVer === "1.0.30226.2") + actualVer = "2.0.30226.2"; + var actualVerArray =actualVer.split("."); + while ( actualVerArray.length > 3) + { + actualVerArray.pop(); + } + while ( actualVerArray.length < 4) + { + actualVerArray.push(0); + } + var reqVerArray = version.split("."); + while ( reqVerArray.length > 4) + { + reqVerArray.pop(); + } + + var requiredVersionPart ; + var actualVersionPart + var index = 0; + + + do + { + requiredVersionPart = parseInt(reqVerArray[index]); + actualVersionPart = parseInt(actualVerArray[index]); + index++; + } + while (index < reqVerArray.length && requiredVersionPart === actualVersionPart); + + if ( requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart) ) + { + isVersionSupported = true; + } + } + } + } + } + catch (e) + { + isVersionSupported = false; + } + if (container) + { + document.body.removeChild(container); + } + + return isVersionSupported; +} +////////////////////////////////////////////////////////////////// +// +// WaitForInstallCompletion: +// +// Occasionally checks for Silverlight installation status. If it +// detects that Silverlight has been installed then it calls +// Silverlight.onSilverlightInstalled();. This is only supported +// if Silverlight was not previously installed on this computer. +// +////////////////////////////////////////////////////////////////// +Silverlight.WaitForInstallCompletion = function() +{ + if ( ! Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled ) + { + try + { + navigator.plugins.refresh(); + } + catch(e) + { + } + if ( Silverlight.isInstalled(null) ) + { + Silverlight.onSilverlightInstalled(); + } + else + { + setTimeout(Silverlight.WaitForInstallCompletion, 3000); + } + } +} +////////////////////////////////////////////////////////////////// +// +// __startup: +// +// Performs startup tasks +////////////////////////////////////////////////////////////////// +Silverlight.__startup = function() +{ + Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null); + if ( !Silverlight.isBrowserRestartRequired) + { + Silverlight.WaitForInstallCompletion(); + } + if (window.removeEventListener) { + window.removeEventListener('load', Silverlight.__startup , false); + } + else { + window.detachEvent('onload', Silverlight.__startup ); + } +} + +if (window.addEventListener) +{ + window.addEventListener('load', Silverlight.__startup , false); +} +else +{ + window.attachEvent('onload', Silverlight.__startup ); +} + +/////////////////////////////////////////////////////////////////////////////// +// createObject: +// +// Inserts a Silverlight <object> tag or installation experience into the HTML +// DOM based on the current installed state of Silverlight. +// +///////////////////////////////////////////////////////////////////////////////// + +Silverlight.createObject = function(source, parentElement, id, properties, events, initParams, userContext) +{ + var slPluginHelper = new Object(); + var slProperties = properties; + var slEvents = events; + + slPluginHelper.version = slProperties.version; + slProperties.source = source; + slPluginHelper.alt = slProperties.alt; + + //rename properties to their tag property names. For bacwards compatibility + //with Silverlight.js version 1.0 + if ( initParams ) + slProperties.initParams = initParams; + if ( slProperties.isWindowless && !slProperties.windowless) + slProperties.windowless = slProperties.isWindowless; + if ( slProperties.framerate && !slProperties.maxFramerate) + slProperties.maxFramerate = slProperties.framerate; + if ( id && !slProperties.id) + slProperties.id = id; + + // remove elements which are not to be added to the instantiation tag + delete slProperties.ignoreBrowserVer; + delete slProperties.inplaceInstallPrompt; + delete slProperties.version; + delete slProperties.isWindowless; + delete slProperties.framerate; + delete slProperties.data; + delete slProperties.src; + delete slProperties.alt; + + + // detect that the correct version of Silverlight is installed, else display install + + if (Silverlight.isInstalled(slPluginHelper.version)) + { + //move unknown events to the slProperties array + for (var name in slEvents) + { + if ( slEvents[name]) + { + if ( name == "onLoad" && typeof slEvents[name] == "function" && slEvents[name].length != 1 ) + { + var onLoadHandler = slEvents[name]; + slEvents[name]=function (sender){ return onLoadHandler(document.getElementById(id), userContext, sender)}; + } + var handlerName = Silverlight.__getHandlerName(slEvents[name]); + if ( handlerName != null ) + { + slProperties[name] = handlerName; + slEvents[name] = null; + } + else + { + throw "typeof events."+name+" must be 'function' or 'string'"; + } + } + } + slPluginHTML = Silverlight.buildHTML(slProperties); + } + //The control could not be instantiated. Show the installation prompt + else + { + slPluginHTML = Silverlight.buildPromptHTML(slPluginHelper); + } + + // insert or return the HTML + if(parentElement) + { + parentElement.innerHTML = slPluginHTML; + } + else + { + return slPluginHTML; + } + +} + +/////////////////////////////////////////////////////////////////////////////// +// +// buildHTML: +// +// create HTML that instantiates the control +// +/////////////////////////////////////////////////////////////////////////////// +Silverlight.buildHTML = function( slProperties) +{ + var htmlBuilder = []; + + htmlBuilder.push('<object type=\"application/x-silverlight\" data="data:application/x-silverlight,"'); + if ( slProperties.id != null ) + { + htmlBuilder.push(' id="' + slProperties.id + '"'); + } + if ( slProperties.width != null ) + { + htmlBuilder.push(' width="' + slProperties.width+ '"'); + } + if ( slProperties.height != null ) + { + htmlBuilder.push(' height="' + slProperties.height + '"'); + } + htmlBuilder.push(' >'); + + delete slProperties.id; + delete slProperties.width; + delete slProperties.height; + + for (var name in slProperties) + { + if (slProperties[name]) + { + htmlBuilder.push('<param name="'+Silverlight.HtmlAttributeEncode(name)+'" value="'+Silverlight.HtmlAttributeEncode(slProperties[name])+'" />'); + } + } + htmlBuilder.push('<\/object>'); + return htmlBuilder.join(''); +} + + + +////////////////////////////////////////////////////////////////// +// +// createObjectEx: +// +// takes a single parameter of all createObject +// parameters enclosed in {} +// +////////////////////////////////////////////////////////////////// + +Silverlight.createObjectEx = function(params) +{ + var parameters = params; + var html = Silverlight.createObject(parameters.source, parameters.parentElement, parameters.id, parameters.properties, parameters.events, parameters.initParams, parameters.context); + if (parameters.parentElement == null) + { + return html; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// buildPromptHTML +// +// Builds the HTML to prompt the user to download and install Silverlight +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.buildPromptHTML = function(slPluginHelper) +{ + var slPluginHTML = ""; + var urlRoot = Silverlight.fwlinkRoot; + var shortVer = slPluginHelper.version ; + if ( slPluginHelper.alt ) + { + slPluginHTML = slPluginHelper.alt; + } + else + { + if (! shortVer ) + { + shortVer=""; + } + slPluginHTML = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>"; + slPluginHTML = slPluginHTML.replace('{1}', shortVer ); + slPluginHTML = slPluginHTML.replace('{2}', urlRoot + '108181'); + } + + return slPluginHTML; +} + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// getSilverlight: +// +// Navigates the browser to the appropriate Silverlight installer +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.getSilverlight = function(version) +{ + if (Silverlight.onGetSilverlight ) + { + Silverlight.onGetSilverlight(); + } + + var shortVer = ""; + var reqVerArray = String(version).split("."); + if (reqVerArray.length > 1) + { + var majorNum = parseInt(reqVerArray[0] ); + if ( isNaN(majorNum) || majorNum < 2 ) + { + shortVer = "1.0"; + } + else + { + shortVer = reqVerArray[0]+'.'+reqVerArray[1]; + } + } + + var verArg = ""; + + if (shortVer.match(/^\d+\056\d+$/) ) + { + verArg = "&v="+shortVer; + } + + Silverlight.followFWLink("114576" + verArg); +} + + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// followFWLink: +// +// Navigates to a url based on fwlinkid +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.followFWLink = function(linkid) +{ + top.location=Silverlight.fwlinkRoot+String(linkid); +} + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// HtmlAttributeEncode: +// +// Encodes special characters in input strings as charcodes +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.HtmlAttributeEncode = function( strInput ) +{ + var c; + var retVal = ''; + + if(strInput == null) + { + return null; + } + + for(var cnt = 0; cnt < strInput.length; cnt++) + { + c = strInput.charCodeAt(cnt); + + if (( ( c > 96 ) && ( c < 123 ) ) || + ( ( c > 64 ) && ( c < 91 ) ) || + ( ( c > 43 ) && ( c < 58 ) && (c!=47)) || + ( c == 95 )) + { + retVal = retVal + String.fromCharCode(c); + } + else + { + retVal = retVal + '&#' + c + ';'; + } + } + + return retVal; +} +/////////////////////////////////////////////////////////////////////////////// +// +// default_error_handler: +// +// Default error handling function +// +/////////////////////////////////////////////////////////////////////////////// + +Silverlight.default_error_handler = function (sender, args) +{ + var iErrorCode; + var errorType = args.ErrorType; + + iErrorCode = args.ErrorCode; + + var errMsg = "\nSilverlight error message \n" ; + + errMsg += "ErrorCode: "+ iErrorCode + "\n"; + + + errMsg += "ErrorType: " + errorType + " \n"; + errMsg += "Message: " + args.ErrorMessage + " \n"; + + if (errorType == "ParserError") + { + errMsg += "XamlFile: " + args.xamlFile + " \n"; + errMsg += "Line: " + args.lineNumber + " \n"; + errMsg += "Position: " + args.charPosition + " \n"; + } + else if (errorType == "RuntimeError") + { + if (args.lineNumber != 0) + { + errMsg += "Line: " + args.lineNumber + " \n"; + errMsg += "Position: " + args.charPosition + " \n"; + } + errMsg += "MethodName: " + args.methodName + " \n"; + } + alert (errMsg); +} + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// __cleanup: +// +// Releases event handler resources when the page is unloaded +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.__cleanup = function () +{ + for (var i = Silverlight._silverlightCount - 1; i >= 0; i--) { + window['__slEvent' + i] = null; + } + Silverlight._silverlightCount = 0; + if (window.removeEventListener) { + window.removeEventListener('unload', Silverlight.__cleanup , false); + } + else { + window.detachEvent('onunload', Silverlight.__cleanup ); + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////// +// +// __getHandlerName: +// +// Generates named event handlers for delegates. +// +/////////////////////////////////////////////////////////////////////////////////////////////// +Silverlight.__getHandlerName = function (handler) +{ + var handlerName = ""; + if ( typeof handler == "string") + { + handlerName = handler; + } + else if ( typeof handler == "function" ) + { + if (Silverlight._silverlightCount == 0) + { + if (window.addEventListener) + { + window.addEventListener('onunload', Silverlight.__cleanup , false); + } + else + { + window.attachEvent('onunload', Silverlight.__cleanup ); + } + } + var count = Silverlight._silverlightCount++; + handlerName = "__slEvent"+count; + + window[handlerName]=handler; + } + else + { + handlerName = null; + } + return handlerName; +}
\ No newline at end of file diff --git a/modules/JWplayer/swfobject.js b/modules/JWplayer/swfobject.js new file mode 100644 index 0000000000..08cbe896c0 --- /dev/null +++ b/modules/JWplayer/swfobject.js @@ -0,0 +1,276 @@ +/* swfobject.js - Author Brian Holland .... email webman@windmillway.f2s.com + * @package webtrees + * @subpackage Module + * @version $Id$ +*/ +/** + * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ + * + * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + */ +if(typeof deconcept=="undefined"){ + var deconcept=new Object(); +} +if(typeof deconcept.util=="undefined"){ + deconcept.util=new Object(); +} +if(typeof deconcept.SWFObjectUtil=="undefined"){ + deconcept.SWFObjectUtil=new Object(); +} +deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){ + if(!document.getElementById){ + return; + } + this.DETECT_KEY=_a?_a:"detectflash"; + this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); + this.params=new Object(); + this.variables=new Object(); + this.attributes=new Array(); + if(_1){ + this.setAttribute("swf",_1); + } + if(id){ + this.setAttribute("id",id); + } + if(w){ + this.setAttribute("width",w); + } + if(h){ + this.setAttribute("height",h); + } + if(_5){ + this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split("."))); + } + this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(); + if(!window.opera&&document.all&&this.installedVer.major>7){ + deconcept.SWFObject.doPrepUnload=true; + }if(c){ + this.addParam("bgcolor",c); + } + var q=_7?_7:"high"; + this.addParam("quality",q); + this.setAttribute("useExpressInstall",false); + this.setAttribute("doExpressInstall",false); + var _c=(_8)?_8:window.location; + this.setAttribute("xiRedirectUrl",_c); + this.setAttribute("redirectUrl",""); + if(_9){ + this.setAttribute("redirectUrl",_9); + } +}; + +deconcept.SWFObject.prototype={ + useExpressInstall:function(_d){ + this.xiSWFPath=!_d?"expressinstall.swf":_d; + this.setAttribute("useExpressInstall",true); + }, + setAttribute:function(_e,_f){ + this.attributes[_e]=_f; + }, + getAttribute:function(_10){ + return this.attributes[_10]; + }, + addParam:function(_11,_12){ + this.params[_11]=_12; + }, + getParams:function(){ + return this.params; + }, + addVariable:function(_13,_14){ + this.variables[_13]=_14; + }, + getVariable:function(_15){ + return this.variables[_15]; + }, + getVariables:function(){ + return this.variables; + }, + getVariablePairs:function(){ + var _16=new Array(); + var key; + var _18=this.getVariables(); + for(key in _18){ + _16[_16.length]=key+"="+_18[key]; + } + return _16; + }, + + getSWFHTML:function(){ + var _19=""; + if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){ + if(this.getAttribute("doExpressInstall")){ + this.addVariable("MMplayerType","PlugIn"); + this.setAttribute("swf",this.xiSWFPath); + } + _19 ="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\""; + _19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" "; + var _1a=this.getParams(); + for(var key in _1a){ + _19+=[key]+"=\""+_1a[key]+"\" "; + } + var _1c=this.getVariablePairs().join("&"); + if(_1c.length>0){ + _19+="flashvars=\""+_1c+"\""; + } + _19+="/>"; + }else{ + if(this.getAttribute("doExpressInstall")){ + this.addVariable("MMplayerType","ActiveX"); + this.setAttribute("swf",this.xiSWFPath); + } + _19 ="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">"; + _19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />"; + var _1d=this.getParams(); + for(var key in _1d){ + _19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />"; + } + var _1f=this.getVariablePairs().join("&"); + if(_1f.length>0){ + _19+="<param name=\"flashvars\" value=\""+_1f+"\" />"; + } + _19+="</object>"; + } + return _19; + }, + + write:function(_20){ + if(this.getAttribute("useExpressInstall")){ + var _21=new deconcept.PlayerVersion([6,0,65]); + if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ + this.setAttribute("doExpressInstall",true); + this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); + document.title=document.title.slice(0,47)+" - Flash Player Installation"; + this.addVariable("MMdoctitle",document.title); + } + } + if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ + var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML(); + return true; + }else{ + if(this.getAttribute("redirectUrl")!=""){ + document.location.replace(this.getAttribute("redirectUrl")); + } + } + return false; + } +}; + +deconcept.SWFObjectUtil.getPlayerVersion=function(){ + var _23=new deconcept.PlayerVersion([0,0,0]); + if(navigator.plugins&&navigator.mimeTypes.length){ + var x=navigator.plugins["Shockwave Flash"]; + if(x&&x.description){ + _23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")); + } + }else{ + if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){ + var axo=1; + var _26=3; + while(axo){ + try{ + _26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26); + _23=new deconcept.PlayerVersion([_26,0,0]); + } + catch(e){ + axo=null; + } + } + }else{ + try{ + var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); + } + catch(e){ + try{ + var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); + _23=new deconcept.PlayerVersion([6,0,21]); + axo.AllowScriptAccess="always"; + } + catch(e){ + if(_23.major==6){ + return _23; + } + } + try{ + axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); + } + catch(e){} + } + if(axo!=null){ + _23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); + } + } + } + return _23; +}; + +deconcept.PlayerVersion=function(_29){ + this.major=_29[0]!=null?parseInt(_29[0]):0; + this.minor=_29[1]!=null?parseInt(_29[1]):0; + this.rev=_29[2]!=null?parseInt(_29[2]):0; +}; + +deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ + if(this.major<fv.major){return false;} + if(this.major>fv.major){return true;} + if(this.minor<fv.minor){return false;} + if(this.minor>fv.minor){return true;} + if(this.rev<fv.rev){return false;} + return true; +}; + +deconcept.util={ + getRequestParameter:function(_2b){ + var q=document.location.search||document.location.hash; + if(_2b==null){ + return q; + } + if(q){ + var _2d=q.substring(1).split("&"); + for(var i=0;i<_2d.length;i++){ + if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){ + return _2d[i].substring((_2d[i].indexOf("=")+1)); + } + } + } + return ""; + } +}; + +deconcept.SWFObjectUtil.cleanupSWFs=function(){ + var _2f=document.getElementsByTagName("OBJECT"); + for(var i=_2f.length-1;i>=0;i--){ + _2f[i].style.display="none"; + for(var x in _2f[i]){ + if(typeof _2f[i][x]=="function"){ + _2f[i][x]=function(){}; + } + } + } +}; + +if(deconcept.SWFObject.doPrepUnload){ + if(!deconcept.unloadSet){ + deconcept.SWFObjectUtil.prepUnload=function(){ + __flash_unloadHandler=function(){}; + __flash_savedUnloadHandler=function(){}; + window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs); + }; + window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload); + deconcept.unloadSet=true; + } +} + +if(!document.getElementById&&document.all){ + document.getElementById=function(id){ + return document.all[id]; + }; +} + +var getQueryParamValue=deconcept.util.getRequestParameter; +var FlashObject=deconcept.SWFObject; +var SWFObject=deconcept.SWFObject; + + +
\ No newline at end of file diff --git a/modules/JWplayer/wmvVideo.php b/modules/JWplayer/wmvVideo.php new file mode 100644 index 0000000000..49595ed7ee --- /dev/null +++ b/modules/JWplayer/wmvVideo.php @@ -0,0 +1,70 @@ +<?php +/** + * JWplayer module for phpGedView + * + * Display wmv video media Items using JW Player in PGV + * + * webtrees: Web based Family History software + * Copyright (C) 2010 webtrees development team. + * + * Derived from PhpGedView + * Copyright (C) 2007 to 2009 PGV Development Team. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @package webtrees + * @subpackage Module + * @version $Id$ + * @author Brian Holland + */ + ?> +<html xmlns="http://www.w3.org/1999/xhtml" <?php echo i18n::html_markup(); ?>> +<head> + <META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <title>JW Player for Windows Media Videos</title> + <script type="text/javascript" src="modules/JWplayer/silverlight.js"></script> + <script type="text/javascript" src="modules/JWplayer/wmvplayer.js"></script> +</head> +<body bgcolor="#000000"> +<center> + +<?php +global $pid, $GEDCOM ; +global $wmvVideo, $SERVER_URL; +$wmvVideo=decrypt(safe_GET('wmvVideo')); +?> + +<div id="myplayer">The player will be placed here</div> + +<script type="text/javascript"> + var elm = document.getElementById("myplayer"); + var src = 'modules/JWplayer/wmvplayer.xaml'; + var cfg = { + file:'<?php echo $wmvVideo; ?>', + <?php if (preg_match("/\.mp3$/i", $wmvVideo)) { ?> + logo:'modules/JWplayer/audio.png', + <?php } ?> + autostart:'true', + overstretch:'true', + width:'480', + height:'365' + }; + var ply = new jeroenwijering.Player(elm,src,cfg); +</script> + +</center> +</body> +</html> diff --git a/modules/JWplayer/wmvplayer.js b/modules/JWplayer/wmvplayer.js new file mode 100644 index 0000000000..75fb965787 --- /dev/null +++ b/modules/JWplayer/wmvplayer.js @@ -0,0 +1,799 @@ +/* wmvplayer.js - PhpGedView Author Brian Holland + * @package webtrees + * @subpackage Module + * @version $Id$ +*/ +/**************************************************************************** +* JW WMV Player version 1.1, created with M$ Silverlight 1.0 +* +* This file contains all logic for the JW WMV Player. For a functional setup, +* the following two files are also needed: +* - silverlight.js (for instantiating the silverlight plugin) +* - wmvplayer.xaml (or another XAML skin describing the player graphics) +* +* More info: http://www.jeroenwijering.com/?item=JW_WMV_Player +****************************************************************************/ +if(typeof jeroenwijering == "undefined") { + var jeroenwijering = new Object(); + jeroenwijering.utils = new Object(); +} + + + + + + + + + + +/**************************************************************************** +* The player wrapper; loads config variables and starts MVC cycle. +****************************************************************************/ +jeroenwijering.Player = function(cnt,src,cfg) { + this.controller; + this.model; + this.view; + this.configuration = { + backgroundcolor:'FFFFFF', + windowless:'false', + file:'', + height:'260', + image:'', + backcolor:'FFFFFF', + frontcolor:'000000', + lightcolor:'000000', + screencolor:'000000', + width:'320', + logo:'', + overstretch:'false', + shownavigation:'true', + showstop:'false', + showdigits:'true', + usefullscreen:'true', + usemute:'false', + autostart:'false', + bufferlength:'3', + duration:'0', + repeat:'false', + sender:'', + start:'0', + volume:'90', + link:'', + linkfromdisplay:'false', + linktarget:'_self' + }; + for(itm in this.configuration) { + if(cfg[itm] != undefined) { + if (itm.indexOf('color') > 0) { + this.configuration[itm] = cfg[itm].substr(cfg[itm].length-6); + } else { + this.configuration[itm] = cfg[itm]; + } + } + } + Silverlight.createObjectEx({ + source:src, + parentElement:cnt, + properties:{ + width:this.configuration['width'], + height:this.configuration['height'], + version:'1.0', + inplaceInstallPrompt:true, + isWindowless:this.configuration['windowless'], + background:'#'+this.configuration['backgroundcolor'] + }, + events:{ + onLoad:this.onLoadHandler, + onError:null + }, + context:this + }); +} + +jeroenwijering.Player.prototype = { + addListener: function(typ,fcn) { + this.view.listeners.push({type:typ,func:fcn}); + }, + + getConfig: function() { + return this.configuration; + }, + + onLoadHandler: function(pid,tgt,sdr) { + tgt.configuration['sender'] = sdr; + tgt.controller = new jeroenwijering.Controller(tgt.configuration); + tgt.view = new jeroenwijering.View(tgt.configuration,tgt.controller); + tgt.model = new jeroenwijering.Model(tgt.configuration,tgt.controller,tgt.view); + tgt.controller.startMVC(tgt.view,tgt.model); + }, + + sendEvent: function(typ,prm) { + switch(typ.toUpperCase()) { + case 'LINK': + this.controller.setLink(); + break; + case 'LOAD': + this.controller.setLoad(prm); + break; + case 'MUTE': + this.controller.setMute(); + break; + case 'PLAY': + this.controller.setPlay(); + break; + case 'SCRUB': + this.controller.setScrub(prm); + break; + case 'STOP': + this.controller.setStop(); + break; + case 'VOLUME': + this.controller.setVolume(prm); + break; + } + } +} + + + + + + + + + + +/**************************************************************************** +* The controller of the player MVC triad, which processes all user input. +****************************************************************************/ +jeroenwijering.Controller = function(cfg) { + this.configuration = cfg; +} + +jeroenwijering.Controller.prototype = { + startMVC: function(vie,mdl) { + this.view = vie; + this.model = mdl; + if(this.configuration['usemute'] == 'true') { + this.view.onVolume(0); + this.view.onMute(true); + this.model.goVolume(0); + } else { + this.view.onVolume(this.configuration['volume']); + this.model.goVolume(this.configuration['volume']); + } + if(this.configuration['autostart'] == 'true') { + this.model.goStart(); + } else { + this.model.goPause(); + } + }, + + setState: function(old,stt) { + this.state = stt; + var pos = this.configuration['start']; + if(old == 'Closed' && pos > 0) { + setTimeout(jeroenwijering.utils.delegate(this,this.setScrub),200,pos); + } + }, + + setLink: function() { + if (this.configuration['linktarget'].indexOf('javascript:') == 0) { + return Function(this.configuration['linktarget']).apply(); + } else if (this.configuration['linktarget'] == '_blank') { + window.open(this.configuration['link']); + } else if (this.configuration['linktarget'] != '') { + window.location = this.configuration['link']; + } + }, + + setLoad: function(fil) { + if(this.model.state != "Closed") { + this.model.goStop(); + } + this.configuration['file'] = fil; + if(this.configuration['autostart'] == 'true') { + setTimeout(jeroenwijering.utils.delegate(this.model,this.model.goStart),100); + } + }, + + setMute: function() { + if(this.configuration['usemute'] == 'true') { + this.configuration['usemute'] = 'false'; + this.model.goVolume(this.configuration['volume']); + this.view.onMute(false); + } else { + this.configuration['usemute'] = 'true'; + this.model.goVolume(0); + this.view.onMute(true); + } + }, + + setPlay: function() { + if(this.state == 'Buffering' || this.state == 'Playing') { + if(this.configuration['duration'] == 0) { + this.model.goStop(); + } else { + this.model.goPause(); + } + } else { + this.model.goStart(); + } + }, + + setScrub: function(sec) { + if(sec < 2) { + sec = 0; + } else if (sec > this.configuration['duration']-4) { + sec = this.configuration['duration']-4; + } + if(this.state == 'Buffering' || this.state == 'Playing') { + this.model.goStart(sec); + } else { + this.model.goPause(sec); + } + }, + + setStop: function() { + this.model.goStop(); + }, + + setVolume: function(pct) { + if(pct < 0) { pct = 0; } else if(pct > 100) { pct = 100; } + this.configuration['volume'] = Math.round(pct); + this.model.goVolume(pct); + this.view.onVolume(pct); + if(this.configuration['usemute'] == 'true') { + this.configuration['usemute'] = 'false'; + this.view.onMute(false); + } + }, + + setFullscreen: function() { + var fss = !this.configuration['sender'].getHost().content.FullScreen; + this.configuration['sender'].getHost().content.FullScreen = fss; + jeroenwijering.utils.delegate(this.view,this.view.onFullscreen); + } +} + + + + + + + + + + +/**************************************************************************** +* The view of the player MVC triad, which manages the graphics. +****************************************************************************/ +jeroenwijering.View = function(cfg,ctr) { + this.configuration = cfg; + this.listeners = Array(); + this.controller = ctr; + this.fstimeout; + this.fslistener; + this.display = this.configuration['sender'].findName("PlayerDisplay"); + this.controlbar = this.configuration['sender'].findName("PlayerControls"); + this.configuration['sender'].getHost().content.onResize = + jeroenwijering.utils.delegate(this,this.resizePlayer); + this.configuration['sender'].getHost().content.onFullScreenChange = + jeroenwijering.utils.delegate(this,this.onFullscreen); + this.assignColorsClicks(); + this.resizePlayer(); +} + +jeroenwijering.View.prototype = { + onBuffer: function(pct) { + var snd = this.configuration['sender']; + if(pct == 0) { + snd.findName("BufferText").Text = null; + } else { + pct < 10 ? pct = "0"+pct: pct = ""+pct; + snd.findName("BufferText").Text = pct; + } + this.delegate('BUFFER',[pct]); + }, + + onFullscreen: function(fss) { + var snd = this.configuration['sender']; + var fst = snd.getHost().content.FullScreen; + if(fst) { + this.fstimeout = setTimeout(jeroenwijering.utils.delegate(this, + this.hideFSControls),2000); + this.fslistener = this.display.addEventListener('MouseMove', + jeroenwijering.utils.delegate(this,this.showFSControls)); + snd.findName("FullscreenSymbol").Visibility = "Collapsed"; + snd.findName("FullscreenOffSymbol").Visibility = "Visible"; + } else { + clearTimeout(this.fstimeout); + this.display.removeEventListener("MouseMove",this.fslistener); + this.controlbar.Visibility = "Visible"; + this.display.Cursor = "Hand"; + snd.findName("FullscreenSymbol").Visibility = "Visible"; + snd.findName("FullscreenOffSymbol").Visibility = "Collapsed"; + } + this.resizePlayer(); + this.delegate('FULLSCREEN'); + }, + + showFSControls: function(sdr,arg) { + var vbt = sdr.findName('PlayerControls'); + var yps = arg.GetPosition(vbt).Y; + clearTimeout(this.fstimeout); + this.controlbar.Visibility = "Visible"; + this.display.Cursor = "Hand"; + if(yps < 0) { + this.fstimeout = setTimeout(jeroenwijering.utils.delegate(this, + this.hideFSControls),2000); + } + }, + + hideFSControls: function() { + this.controlbar.Visibility = "Collapsed"; + this.display.Cursor = "None"; + }, + + onLoad: function(pct) { + var snd = this.configuration['sender']; + var max = snd.findName("TimeSlider").Width; + snd.findName("DownloadProgress").Width = Math.round(max*pct/100); + this.delegate('LOAD',[pct]); + }, + + onMute: function(mut) { + var snd = this.configuration['sender']; + this.configuration['usemute'] = ''+mut; + if(mut) { + snd.findName("VolumeHighlight").Visibility = "Collapsed"; + snd.findName("MuteSymbol").Visibility = "Visible"; + snd.findName("MuteOffSymbol").Visibility = "Collapsed"; + if(this.state == 'Playing') { + snd.findName("MuteIcon").Visibility = "Visible"; + } + } else { + snd.findName("VolumeHighlight").Visibility = "Visible"; + snd.findName("MuteSymbol").Visibility = "Collapsed"; + snd.findName("MuteOffSymbol").Visibility = "Visible"; + snd.findName("MuteIcon").Visibility = "Collapsed"; + } + this.delegate('MUTE'); + }, + + onState: function(old,stt) { + var snd = this.configuration['sender']; + this.state = stt; + if(stt == 'Buffering' || stt == 'Playing' || stt == 'Opening') { + snd.findName("PlayIcon").Visibility = "Collapsed"; + snd.findName("PlaySymbol").Visibility = "Collapsed"; + snd.findName("PlayOffSymbol").Visibility = "Visible"; + if (stt=='Playing') { + snd.findName("BufferIcon").Visibility = "Collapsed"; + snd.findName("BufferText").Visibility = "Collapsed"; + if(this.configuration['usemute'] == 'true') { + snd.findName("MuteIcon").Visibility = "Visible"; + } + } else{ + snd.findName("BufferIcon").Visibility = "Visible"; + snd.findName("BufferText").Visibility = "Visible"; + } + } else { + snd.findName("MuteIcon").Visibility = "Collapsed"; + snd.findName("BufferIcon").Visibility = "Collapsed"; + snd.findName("BufferText").Visibility = "Collapsed"; + snd.findName("PlayOffSymbol").Visibility = "Collapsed"; + snd.findName("PlaySymbol").Visibility = "Visible"; + if(this.configuration['linkfromdisplay'] == 'true') { + snd.findName("PlayIcon").Visibility = "Collapsed"; + } else { + snd.findName("PlayIcon").Visibility = "Visible"; + } + } + try { + if(!(old == 'Completed' && stt == 'Buffering') && + !(old == 'Buffering' && stt == 'Paused')) { + playerStatusChange(old.toUpperCase(),stt.toUpperCase()); + } + } catch (err) {} + this.delegate('STATE',[old,stt]); + }, + + onTime: function(elp,dur) { + var snd = this.configuration['sender']; + var snd = this.configuration['sender']; + var max = snd.findName("TimeSlider").Width; + if(dur > 0) { + var pos = Math.round(max*elp/dur); + this.configuration['duration'] = dur; + snd.findName("ElapsedText").Text = jeroenwijering.utils.timestring(elp); + snd.findName("RemainingText").Text = jeroenwijering.utils.timestring(dur-elp); + snd.findName("TimeSymbol").Visibility = "Visible"; + snd.findName("TimeSymbol")['Canvas.Left'] = pos+4; + snd.findName("TimeHighlight").Width = pos-2; + } else { + snd.findName("TimeSymbol").Visibility = "Collapsed"; + } + this.delegate('TIME',[elp,dur]); + }, + + onVolume: function(pct) { + var snd = this.configuration['sender']; + snd.findName("VolumeHighlight").Width = Math.round(pct/5); + this.delegate('VOLUME',[pct]); + }, + + assignColorsClicks: function() { + this.display.Cursor = "Hand"; + this.display.Background = "#FF"+this.configuration['screencolor']; + if(this.configuration['linkfromdisplay'] == 'false') { + this.display.addEventListener('MouseLeftButtonUp', + jeroenwijering.utils.delegate(this.controller, + this.controller.setPlay)); + } else { + this.display.addEventListener('MouseLeftButtonUp', + jeroenwijering.utils.delegate(this.controller, + this.controller.setLink)); + this.display.findName("PlayIcon").Visibility = "Collapsed"; + } + if(this.configuration['logo'] != '') { + this.display.findName('OverlayCanvas').Visibility = "Visible"; + this.display.findName('OverlayLogo').ImageSource = + this.configuration['logo']; + } + this.controlbar.findName("ControlbarBack").Fill = + "#FF"+this.configuration['backcolor']; + this.assignButton('Play',this.controller.setPlay); + this.assignButton('Stop',this.controller.setStop); + this.configuration['sender'].findName('ElapsedText').Foreground = + "#FF"+this.configuration['frontcolor']; + this.assignSlider('Time',this.changeTime); + this.configuration['sender'].findName('DownloadProgress').Fill = + "#FF"+this.configuration['frontcolor']; + this.configuration['sender'].findName('RemainingText').Foreground = + "#FF"+this.configuration['frontcolor']; + this.assignButton('Link',this.controller.setLink); + this.assignButton('Fullscreen',this.controller.setFullscreen); + this.assignButton('Mute',this.controller.setMute); + this.assignSlider('Volume',this.changeVolume); + }, + + assignButton: function(btn,act) { + var el1 = this.configuration['sender'].findName(btn+'Button'); + el1.Cursor = "Hand"; + el1.addEventListener('MouseLeftButtonUp', + jeroenwijering.utils.delegate(this.controller,act)); + el1.addEventListener('MouseEnter', + jeroenwijering.utils.delegate(this,this.rollOver)); + el1.addEventListener('MouseLeave', + jeroenwijering.utils.delegate(this,this.rollOut)); + this.configuration['sender'].findName(btn+'Symbol').Fill = + "#FF"+this.configuration['frontcolor']; + try { + this.configuration['sender'].findName(btn+'OffSymbol').Fill = + "#FF"+this.configuration['frontcolor']; + } catch(e) {} + }, + + assignSlider: function(sld,act) { + var el1 = this.configuration['sender'].findName(sld+'Button'); + el1.Cursor = "Hand"; + el1.addEventListener('MouseLeftButtonUp', + jeroenwijering.utils.delegate(this,act)); + el1.addEventListener('MouseEnter', + jeroenwijering.utils.delegate(this,this.rollOver)); + el1.addEventListener('MouseLeave', + jeroenwijering.utils.delegate(this,this.rollOut)); + this.configuration['sender'].findName(sld+'Slider').Fill = + "#FF"+this.configuration['frontcolor']; + this.configuration['sender'].findName(sld+'Highlight').Fill = + "#FF"+this.configuration['frontcolor']; + this.configuration['sender'].findName(sld+'Symbol').Fill = + "#FF"+this.configuration['frontcolor']; + }, + + delegate: function(typ,arg) { + for(var i=0; i<this.listeners.length; i++) { + if(this.listeners[i]['type'].toUpperCase() == typ) { + this.listeners[i]['func'].apply(null,arg); + } + } + }, + + rollOver: function(sdr) { + var str = sdr.Name.substr(0,sdr.Name.length-6); + this.configuration['sender'].findName(str+'Symbol').Fill = + "#FF"+this.configuration['lightcolor']; + try { + this.configuration['sender'].findName(str+'OffSymbol').Fill = + "#FF"+this.configuration['lightcolor']; + } catch(e) {} + }, + + rollOut: function(sdr) { + var str = sdr.Name.substr(0,sdr.Name.length-6); + this.configuration['sender'].findName(str+'Symbol').Fill = + "#FF"+this.configuration['frontcolor']; + try { + this.configuration['sender'].findName(str+'OffSymbol').Fill = + "#FF"+this.configuration['frontcolor']; + } catch(e) {} + }, + + changeTime: function(sdr,arg) { + var tbt = sdr.findName('TimeSlider'); + var xps = arg.GetPosition(tbt).X; + var sec = Math.floor(xps/tbt.Width*this.configuration['duration']); + this.controller.setScrub(sec); + }, + + changeVolume: function(sdr,arg) { + var vbt = sdr.findName('VolumeButton'); + var xps = arg.GetPosition(vbt).X; + this.controller.setVolume(xps*5); + }, + + resizePlayer: function() { + var wid = this.configuration['sender'].getHost().content.actualWidth; + var hei = this.configuration['sender'].getHost().content.actualHeight; + var fss = this.configuration['sender'].getHost().content.FullScreen; + if(this.configuration['shownavigation'] == 'true') { + if(fss == true) { + this.resizeDisplay(wid,hei); + this.controlbar['Canvas.Left'] = Math.round(wid/2-250); + this.resizeControlbar(500,hei-this.controlbar.Height-16); + this.controlbar.findName('ControlbarBack')['Opacity'] = 0.5; + } else { + this.resizeDisplay(wid,hei-20); + this.controlbar['Canvas.Left'] = 0; + this.resizeControlbar(wid,hei-this.controlbar.Height); + this.controlbar.findName('ControlbarBack')['Opacity'] = 1; + } + } else { + this.resizeDisplay(wid,hei); + } + }, + + resizeDisplay: function(wid,hei) { + this.stretchElement('PlayerDisplay',wid,hei); + this.stretchElement('VideoWindow',wid,hei); + this.stretchElement('PlaceholderImage',wid,hei); + this.centerElement('PlayIcon',wid,hei); + this.centerElement('MuteIcon',wid,hei); + this.centerElement('BufferIcon',wid,hei); + this.centerElement('BufferText',wid,hei); + this.display.findName('OverlayCanvas')['Canvas.Left'] = wid - + this.display.findName('OverlayCanvas').Width - 10; + this.display.Visibility = "Visible"; + }, + + resizeControlbar: function(wid,yps,alp) { + this.controlbar['Canvas.Top'] = yps; + this.stretchElement('PlayerControls',wid); + this.stretchElement('ControlbarBack',wid); + this.placeElement('PlayButton',0); + var lft = 17; + this.placeElement('VolumeButton',wid-24); + this.placeElement('MuteButton',wid-37); + var rgt = 37; + if(this.configuration['showstop'] == 'true') { + this.placeElement('StopButton',lft); + lft += 17; + } else { + this.controlbar.findName('StopButton').Visibility="Collapsed"; + } + if(this.configuration['usefullscreen'] == 'true') { + rgt += 18; + this.placeElement('FullscreenButton',wid-rgt); + } else { + this.controlbar.findName('FullscreenButton').Visibility = + "Collapsed"; + } + if(this.configuration['link'] != '') { + rgt += 18; + this.placeElement('LinkButton',wid-rgt); + } else { + this.controlbar.findName('LinkButton').Visibility="Collapsed"; + } + if(this.configuration['showdigits'] == 'true' && wid-rgt-lft> 160) { + rgt += 35; + this.controlbar.findName('RemainingButton').Visibility="Visible"; + this.controlbar.findName('ElapsedButton').Visibility="Visible"; + this.placeElement('RemainingButton',wid-rgt); + this.placeElement('ElapsedButton',lft); + lft +=35; + } else { + this.controlbar.findName('RemainingButton').Visibility = + "Collapsed"; + this.controlbar.findName('ElapsedButton').Visibility="Collapsed"; + } + this.placeElement('TimeButton',lft); + this.stretchElement('TimeButton',wid-lft-rgt); + this.stretchElement('TimeShadow',wid-lft-rgt); + this.stretchElement('TimeStroke',wid-lft-rgt); + this.stretchElement('TimeFill',wid-lft-rgt); + this.stretchElement('TimeSlider',wid-lft-rgt-10); + this.stretchElement('DownloadProgress',wid-lft-rgt-10); + var tsb = this.configuration['sender'].findName('TimeSymbol'); + this.stretchElement('TimeHighlight',tsb['Canvas.Left']-5); + this.controlbar.Visibility = "Visible"; + }, + + centerElement: function(nam,wid,hei) { + var elm = this.configuration['sender'].findName(nam); + elm['Canvas.Left'] = Math.round(wid/2 - elm.Width/2); + elm['Canvas.Top'] = Math.round(hei/2 - elm.Height/2); + }, + + stretchElement: function(nam,wid,hei) { + var elm = this.configuration['sender'].findName(nam); + elm.Width = wid; + if (hei != undefined) { elm.Height = hei; } + }, + + placeElement: function(nam,xps,yps) { + var elm = this.configuration['sender'].findName(nam); + elm['Canvas.Left'] = xps; + if(yps) { elm['Canvas.Top'] = yps; } + } +} + + + + + + + + + + +/**************************************************************************** +* The model of the player MVC triad, which stores all playback logic. +****************************************************************************/ +jeroenwijering.Model = function(cfg,ctr,vie) { + this.configuration = cfg; + this.controller = ctr; + this.view = vie; + this.video = this.configuration['sender'].findName("VideoWindow"); + this.preview = this.configuration['sender'].findName("PlaceholderImage"); + var str = { + 'true':'UniformToFill', + 'false':'Uniform', + 'fit':'Fill', + 'none':'None' + } + this.state = this.video.CurrentState; + this.timeint; + this.video.Stretch = str[this.configuration['overstretch']]; + this.preview.Stretch = str[this.configuration['overstretch']]; + this.video.BufferingTime = + jeroenwijering.utils.spanstring(this.configuration['bufferlength']); + this.video.AutoPlay = true; + this.video.AddEventListener("CurrentStateChanged", + jeroenwijering.utils.delegate(this,this.stateChanged)); + this.video.AddEventListener("MediaEnded", + jeroenwijering.utils.delegate(this,this.mediaEnded)); + this.video.AddEventListener("BufferingProgressChanged", + jeroenwijering.utils.delegate(this,this.bufferChanged)); + this.video.AddEventListener("DownloadProgressChanged", + jeroenwijering.utils.delegate(this,this.downloadChanged)); + if(this.configuration['image'] != '') { + this.preview.Source = this.configuration['image']; + } +} + +jeroenwijering.Model.prototype = { + goPause: function(sec) { + this.video.pause(); + if(!isNaN(sec)) { + this.video.Position = jeroenwijering.utils.spanstring(sec); + } + this.timeChanged(); + }, + + goStart: function(sec) { + this.video.Visibility = 'Visible'; + this.preview.Visibility = 'Collapsed'; + if(this.state == "Closed") { + this.video.Source = this.configuration['file']; + } else { + this.video.play(); + } + if(!isNaN(sec)) { + this.video.Position = jeroenwijering.utils.spanstring(sec); + } + }, + + goStop: function() { + this.video.Visibility = 'Collapsed'; + this.preview.Visibility = 'Visible'; + this.goPause(0); + this.video.Source = 'null'; + this.view.onBuffer(0); + clearInterval(this.timeint); + }, + + goVolume: function(pct) { + this.video.Volume = pct/100; + }, + + stateChanged: function() { + var stt = this.video.CurrentState; + if(stt != this.state) { + this.controller.setState(this.state,stt); + this.view.onState(this.state,stt); + this.state = stt; + this.configuration['duration'] = + Math.round(this.video.NaturalDuration.Seconds*10)/10; + if(stt != "Playing" && stt != "Buffering" && stt != "Opening") { + clearInterval(this.timeint); + } else { + this.timeint = setInterval(jeroenwijering.utils.delegate( + this,this.timeChanged),100); + } + } + }, + + mediaEnded: function() { + if(this.configuration['repeat'] == 'true') { + this.goStart(0); + } else { + this.state = 'Completed'; + this.view.onState(this.state,'Completed'); + this.video.Visibility = 'Collapsed'; + this.preview.Visibility = 'Visible'; + this.goPause(0); + } + }, + + bufferChanged: function() { + var bfr = Math.round(this.video.BufferingProgress*100); + this.view.onBuffer(bfr); + }, + + downloadChanged: function() { + var dld = Math.round(this.video.DownloadProgress*100); + this.view.onLoad(dld); + }, + + timeChanged: function() { + var pos = Math.round(this.video.Position.Seconds*10)/10; + this.view.onTime(pos,this.configuration['duration']); + } +} + + + + + + + + + + +/**************************************************************************** +* Some utility functions. +****************************************************************************/ +jeroenwijering.utils.delegate = function(obj,fcn) { + return function() { + return fcn.apply(obj,arguments); + } +} +jeroenwijering.utils.timestring = function(stp) { + var hrs = Math.floor(stp/3600); + var min = Math.floor(stp%3600/60); + var sec = Math.round(stp%60); + var str = ""; + sec > 9 ? str += sec: str +='0'+sec; + min > 9 ? str = min+":"+str: str='0'+min+":"+str; + hrs > 0 ? str = hrs+":"+str: null; + return str; +} +jeroenwijering.utils.spanstring = function(stp) { + var hrs = Math.floor(stp/3600); + var min = Math.floor(stp%3600/60); + var sec = Math.round(stp%60*10)/10; + var str = hrs+':'+min+':'+sec; + return str; +}
\ No newline at end of file diff --git a/modules/JWplayer/wmvplayer.xaml b/modules/JWplayer/wmvplayer.xaml new file mode 100644 index 0000000000..17a9dbfb9e --- /dev/null +++ b/modules/JWplayer/wmvplayer.xaml @@ -0,0 +1,330 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +JW WMV Player version 1.1, created with M$ Silverlight 1.0. + +This file contains all logic for the JW WMV Player. For a functional setup, +the following two files are also needed: +- silverlight.js (for instantiating the silverlight plugin) +- wmvplayer.js (this file contains all the scripting logic) + +More info: http://www.jeroenwijering.com/?item=JW_WMV_Player +--> + +<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="320" Height="260"> + + + + + <Canvas x:Name="PlayerDisplay" Width="480" Height="240" Background="#FF000000" Visibility="Collapsed"> + <Image x:Name="PlaceholderImage" Width="320" Height="240" /> + <MediaElement x:Name="VideoWindow" Width="320" Height="240" /> + <Canvas x:Name="PlayIcon" Width="40" Height="40" Canvas.Left="140" Canvas.Top="100"> + <Path x:Name="PlayIconBack" Width="40" Height="40" Fill="#77000000" Data="F1 M4,0 L36,0 C38,0 40,2 40,4 L40,36 C40,38 38,40 36,40 L4,40 C2,40 0,38 0,36 L0,4 C0,2 2,0 4,0 Z"/> + <Path x:Name="PlayIconFront" Width="18" Height="18" Canvas.Left="12" Canvas.Top="11" Fill="#FFFFFFFF" Data="F1 M0,0 L18,9 L0,18 L0,0 Z"/> + </Canvas> + <Canvas x:Name="MuteIcon" Width="40" Height="40" Canvas.Left="140" Canvas.Top="100" Visibility="Collapsed"> + <Path x:Name="MuteIconBack" Width="40" Height="40" Fill="#77000000" Data="F1 M4,0 L36,0 C38,0 40,2 40,4 L40,36 C40,38 38,40 36,40 L4,40 C2,40 0,38 0,36 L0,4 C0,2 2,0 4,0 Z"/> + <Path x:Name="MuteIconFront" Width="18" Height="18" Canvas.Left="13" Canvas.Top="11" Fill="#FFFFFFFF" Data="F1 M0,4 L4,4 L4,14 L0,14 L0,4 M6,4 L11,0 L11,18 L6,14 L6,4 M14,8 L18,8 L18,10 L14,10 L14,8 Z"/> + </Canvas> + <Canvas x:Name="BufferIcon" Width="32" Height="32" Canvas.Left="148" Canvas.Top="98" Visibility="Collapsed"> + <Canvas.RenderTransform> + <RotateTransform x:Name="BufferRotation" Angle="0" CenterX="16" CenterY="16" /> + </Canvas.RenderTransform> + <Canvas.Triggers> + <EventTrigger RoutedEvent="Canvas.Loaded"> + <BeginStoryboard> + <Storyboard> + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BufferRotation" Storyboard.TargetProperty="Angle" Duration="0:0:1.2" RepeatBehavior="Forever"> + <DiscreteDoubleKeyFrame Value="30" KeyTime="0:0:0.1" /> + <DiscreteDoubleKeyFrame Value="60" KeyTime="0:0:0.2" /> + <DiscreteDoubleKeyFrame Value="90" KeyTime="0:0:0.3" /> + <DiscreteDoubleKeyFrame Value="120" KeyTime="0:0:0.4" /> + <DiscreteDoubleKeyFrame Value="150" KeyTime="0:0:0.5" /> + <DiscreteDoubleKeyFrame Value="180" KeyTime="0:0:0.6" /> + <DiscreteDoubleKeyFrame Value="210" KeyTime="0:0:0.7" /> + <DiscreteDoubleKeyFrame Value="240" KeyTime="0:0:0.8" /> + <DiscreteDoubleKeyFrame Value="270" KeyTime="0:0:0.9" /> + <DiscreteDoubleKeyFrame Value="300" KeyTime="0:0:1" /> + <DiscreteDoubleKeyFrame Value="330" KeyTime="0:0:1.1" /> + <DiscreteDoubleKeyFrame Value="360" KeyTime="0:0:1.2" /> + </DoubleAnimationUsingKeyFrames> + </Storyboard> + </BeginStoryboard> + </EventTrigger> + </Canvas.Triggers> + <Path x:Name="BufferPath1" Width="2" Height="8" Canvas.Left="15" Canvas.Top="0" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M16,0 L16,0 C16.55,0 17,0.45 17,1 L17,7 C17,7.55 16.55,8 16,8 L16,8C 15.45,8 15,7.55 15,7 L15,1 C15,0.45 15.45,0 16,0 Z "/> + <Path x:Name="BufferPath2" Width="5" Height="7.2" Canvas.Left="7.5" Canvas.Top="2" Stretch="Fill" Fill="#EEFFFFFF" Data="F1 M8,2.14 L8,2.14 C8.48,1.87 9.09,2.03 9.37,2.51 L12.366,7.71 C12.64,8.18 12.48,8.80 12,9.07 L12,9.07 C11.52,9.35 10.91,9.18 10.63,8.71 L7.63,3.51 C7.36,3.03 7.52,2.42 8,2.14 Z "/> + <Path x:Name="BufferPath3" Width="7.2" Height="5" Canvas.Left="2" Canvas.Top="7.5" Stretch="Fill" Fill="#DDFFFFFF" Data="F1 M2.14,8. L2.14,8 C2.42,7.52 3.03,7.36 3.51,7.63 L8.71,10.63 C9.18,10.91 9.35,11.52 9.07,12 L9.07,12 C8.80,12.48 8.18,12.64 7.71,12.36 L2.51,9.37 C2.03,9.09 1.87,8.48 2.14,8 Z "/> + <Path x:Name="BufferPath4" Width="8" Height="2" Canvas.Left="0" Canvas.Top="15" Stretch="Fill" Fill="#BBFFFFFF" Data="F1 M0,16 L0,16 C0,15.45 0.45,15 1,15 L7,15 C7.55,15 8,15.45 8,16 L8,16 C8,16.55 7.55,17 7,17 L1,17 C0.45,17 0,16.55 0,16 Z "/> + <Path x:Name="BufferPath5" Width="7.2" Height="5" Canvas.Left="2" Canvas.Top="19.5" Stretch="Fill" Fill="#AAFFFFFF" Data="F1 M2.14,24 L2.14,24 C1.87,23.52 2.03,22.91 2.51,22.63 L7.71,19.63 C8.18,19.35 8.80,19.52 9.08,20 L9.07,20 C9.35,20.48 9.18,21.09 8.71,21.36 L3.51,24.37 C3.03,24.64 2.42,24.48 2.14,24 Z "/> + <Path x:Name="BufferPath6" Width="5" Height="7.2" Canvas.Left="7.5" Canvas.Top="22.8" Stretch="Fill" Fill="#99FFFFFF" Data="F1 M8,29.86 L8,29.86 C7.52,29.58 7.36,28.97 7.63,28.49 L10.63,23.29 C10.91,22.82 11.52,22.65 12,22.93 L12,22.93 C12.48,23.20 12.64,23.82 12.37,24.29 L9.37,29.49 C9.09,29.97 8.48,30.13 8,29.86 Z "/> + <Path x:Name="BufferPath7" Width="2" Height="8" Canvas.Left="15" Canvas.Top="24" Stretch="Fill" Fill="#77FFFFFF" Data="F1 M16,24 L16,24 C16.55,24 17,24.45 17,25 L17,31 C17,31.55 16.55,32 16,32 L16,32 C15.45,32 15,31.55 15,31 L15,25 C15,24.45 15.45,24 16,24 Z "/> + <Path x:Name="BufferPath8" Width="5" Height="7.2" Canvas.Left="19.5" Canvas.Top="22.8" Stretch="Fill" Fill="#66FFFFFF" Data="F1 M20,22.93 L20,22.93 C20.48,22.65 21.09,22.82 21.36,23.29 L24.37,28.49 C24.64,28.97 24.48,29.58 24,29.86 L24,29.86 C23.52,30.13 22.91,29.97 22.63,29.49 L19.63,24.29 C19.36,23.82 19.52,23.20 20,22.93 Z "/> + <Path x:Name="BufferPath9" Width="7.2" Height="5" Canvas.Left="22.8" Canvas.Top="19.5" Stretch="Fill" Fill="#55FFFFFF" Data="F1 M22.93,20 L22.93,20 C23.20,19.52 23.82,19.36 24.29,19.63 L29.49,22.63 C29.97,22.91 30.13,23.52 29.86,24 L29.86,24 C29.58,24.48 28.97,24.64 28.49,24.37 L23.29,21.37 C22.82,21.09 22.65,20.48 22.93,20 Z "/> + <Path x:Name="BufferPath10" Width="8" Height="2" Canvas.Left="24" Canvas.Top="15" Stretch="Fill" Fill="#33FFFFFF" Data="F1 M24,16 L24,16 C24,15.45 24.45,15 25,15 L31,15 C31.55,15 32,15.45 32,16 L32,16 C32,16.55 31.55,17 31,17 L25,17 C24.45,17 24,16.55 24,16 Z "/> + <Path x:Name="BufferPath11" Width="7.2" Height="5" Canvas.Left="22.8" Canvas.Top="7.5" Stretch="Fill" Fill="#22FFFFFF" Data="F1 M 22.93,12 L22.93,12 C22.65,11.52 22.82,10.91 23.29,10.63 L28.49,7.63 C28.97,7.36 29.58,7.52 29.86,8 L29.86,8 C30.13,8.48 29.97,9.09 29.49,9.37 L24.29,12.36 C23.82,12.64 23.20,12.48 22.93,12 Z "/> + <Path x:Name="BufferPath12" Width="5" Height="7.2" Canvas.Left="19.5" Canvas.Top="2" Stretch="Fill" Fill="#11FFFFFF" Data="F1 M 20,9.07 L20,9.07 C19.52,8.80 19.36,8.18 19.63,7.71 L22.63,2.51 C22.91,2.03 23.52,1.87 24,2.14 L24,2.14 C24.48,2.42 24.64,3.03 24.37,3.51 L21.37,8.71 C21.09,9.18 20.48,9.35 20,9.07 Z "/> + </Canvas> + <TextBlock x:Name="BufferText" Canvas.Left="158" Canvas.Top="108" FontFamily="Verdana" FontSize="9" FontWeight="Bold" Foreground="#FFFFFFFF" Width="12" Height="10"/> + <Canvas x:Name="OverlayCanvas" Width="300" Height="200" Canvas.Left="220" Canvas.Top="10" Visibility="Collapsed"> + <Canvas.Background> + <ImageBrush x:Name="OverlayLogo" AlignmentX="Right" AlignmentY="Top" Stretch="None" /> + </Canvas.Background> + </Canvas> + </Canvas> + + + + + <Canvas x:Name="PlayerControls" Width="320" Height="20" Canvas.Top="240" Visibility="Collapsed"> + <Rectangle x:Name="ControlbarBack" Width="320" Height="19" Fill="#FFFFFFFF" /> + + + <Canvas x:Name="VolumeButton" Width="24" Height="20" Canvas.Left="296"> + <Rectangle x:Name="VolumeShadow" Width="24" Height="1" Canvas.Top="19" Stretch="Fill" Fill="#55000000"/> + <Path x:Name="VolumeStroke" Width="24" Height="19" Data="F1 M 0,0 L 24,0 L 24,19 L 0,19 L 0,18 L 23,18 L 23,1 L 0,1 0,0 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="VolumeFill" Width="23" Height="17" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Canvas x:Name="VolumeMask" Width="18" Height="19" Clip="F1 M1,9 L2,9 L2,10 L1,10 L1,9 M3,8.5 L4,8.5 L4,10.5 L3,10.5 L3,8.5 M5,8 L6,8 L6,11 L5,11 L5,8 M7,7.5 L8,7.5 L8,11.5 L7,11.5 L7,7.5 M9,7 L10,7 L10,12 L9,12 L9,7 M11,6.5 L12,6.5 L12,12.5 L11,12.5 L11,6.5 M13,6 L14,6 L14,13 L13,13 L13,6 M15,5.5 L16,5.5 L16,13.5 L15,13.5 L15,5.5 M17,5 L18,5 L18,14 L17,14 L17,5 Z"> + <Rectangle x:Name="VolumeSlider" Width="18" Height="15" Canvas.Top="2" Opacity="0.3" Fill="#FF000000"/> + <Rectangle x:Name="VolumeHighlight" Width="18" Height="15" Canvas.Top="2" Fill="#FF000000"/> + <Rectangle x:Name="VolumeSymbol" Width="1" Canvas.Top="6" Height="7" Fill="#00000000"/> + </Canvas> + </Canvas> + + + <Canvas x:Name="MuteButton" Width="13" Height="20" Canvas.Left="283"> + <Rectangle x:Name="MuteShadow" Width="13" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="MuteStroke" Width="13" Height="19" Data="F 1 M 0,0 L 13,0 L 13,1 L 1,1 L 1,18 L 13,18 L 13,19 L 0,19 0,0 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="MuteFill" Width="12" Height="17" Canvas.Left="1" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Path x:Name="MuteOffSymbol" Width="5" Height="7" Canvas.Left="6" Canvas.Top="6" Fill="#FF000000" Data="F 1 M 0,2 L2,2 L 2,5 L0,5 L0,0 M3,1 L4,1 L4,0 L5,0 L5,7 L4,7 L4,6 L3,6 L3,1 Z "/> + <Path x:Name="MuteSymbol" Width="5" Height="7" Canvas.Left="6" Canvas.Top="6" Opacity="0.3" Fill="#FF000000" Data="F 1 M 0,2 L2,2 L 2,5 L0,5 L0,0 M3,1 L4,1 L4,0 L5,0 L5,7 L4,7 L4,6 L3,6 L3,1 Z "/> + </Canvas> + + + <Canvas x:Name="FullscreenButton" Width="18" Height="20" Canvas.Left="265"> + <Rectangle x:Name="FullscreenShadow" Width="18" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="FullscreenStroke" Width="18" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M0,0 L18,0 L18,1 L1,1 L1,18 L18,18 L 18,19 L0,19 L0,0 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="FullscreenFill" Width="17" Height="17" Canvas.Left="1" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Path x:Name="FullscreenSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#FF000000" Canvas.Top="5" Data="F1 M0,0 L2,0 L2,1 L1,1 L1,2 L0,2 L0,0 M0,7 L1,7 L1,8 L2,8 L2,9 L0,9 L0,7 M7,0 L9,0 L9,2 L8,2 L8,1 L7,1 L7,0 M8,7 L9,7 L9,9 L7,9 L7,8 L8,8 L8,7 M2,2 L7,2 L7,7 L2,7 L2,2 Z" /> + <Path x:Name="FullscreenOffSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#00000000" Canvas.Top="5" Visibility="Collapsed" Data="F1 M1,0 L2,0 L2,2 L0,2 L0,1 L1,1 L1,0 M0,7 L2,7 L2,9 L1,9 L1,8 L0,8 L0,7 M7,0 L8,0 L8,1 L9,1 L9,2 L7,2 L7,0 M7,7 L9,7 L9,8 L8,8 L8,9 L7,9 L7,7 M2,2 L7,2 L7,7 L2,7 L2,2 Z" /> + </Canvas> + + + <Canvas x:Name="LinkButton" Width="18" Height="20" Canvas.Left="247"> + <Rectangle x:Name="LinkShadow" Width="18" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="LinkStroke" Width="18" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M0,0 L18,0 L18,1 L1,1 L1,18 L18,18 L 18,19 L0,19 L0,0 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="LinkFill" Width="17" Height="17" Canvas.Left="1" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Path x:Name="LinkSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#FF000000" Canvas.Top="5" Data="F1 M2,0 L7,0 L7,4 L9,4 L5,9 L4,9 L0,4 L2,4 L2,0 Z" /> + </Canvas> + + + <Canvas x:Name="RemainingButton" Width="35" Height="20" Canvas.Left="207"> + <Rectangle x:Name="RemainingShadow" Width="35" Height="1" Canvas.Top="19" Fill="#55000000" /> + <Path x:Name="RemainingStroke" Width="35" Height="19" Stretch="Fill" Data="F1 M0,0 L35,0 L35,01 L0,1 L0,0 M 0,18 L35,18 L35,19 L0,19 L0,18 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="RemainingFill" Width="35" Height="17" Canvas.Left="0" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0.0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <TextBlock x:Name="RemainingText" Text="00:00" Canvas.Left="1" Canvas.Top="4" FontFamily="Verdana" FontSize="9" FontWeight="Bold" /> + </Canvas> + + + <Canvas x:Name="TimeButton" Width="133" Height="20" Canvas.Left="74" Canvas.Top="0"> + <Rectangle x:Name="TimeShadow" Width="133" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="TimeStroke" Width="133" Height="19" Stretch="Fill" Data="F1 M0,0 L168,0 L168,01 L0,1 L0,0 M0,18 L168,18 L168,19 L0,19 L0,18 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="TimeFill" Width="133" Height="17" Canvas.Top="1" Stretch="Fill" > + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Rectangle x:Name="TimeSlider" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#00000000" Opacity="0" /> + <Rectangle x:Name="DownloadProgress" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#00000000" Opacity="0.3" /> + <Rectangle x:Name="TimeHighlight" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#FF000000"/> + <Rectangle x:Name="TimeSymbol" Width="2" Height="7" Canvas.Top="6" Canvas.Left="5" Fill="#FF000000"/> + </Canvas> + + + <Canvas x:Name="ElapsedButton" Width="35" Height="20" Canvas.Left="34"> + <Rectangle x:Name="ElapsedShadow" Width="35" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="ElapsedStroke" Width="40" Height="19" Data="F1 M0,0 L35,0 L35,01 L0,1 L0,0 M 0,18 L35,18 L35,19 L0,19 L0,18 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="ElapsedFill" Width="35" Height="17" Canvas.Left="0" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0.0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <TextBlock x:Name="ElapsedText" Text="00:00" Canvas.Left="6" Canvas.Top="4" FontFamily="Verdana" FontSize="9" FontWeight="Bold" /> + </Canvas> + + + <Canvas x:Name="StopButton" Width="17" Height="20" Canvas.Left="17"> + <Rectangle x:Name="StopShadow" Width="17" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="StopStroke" Width="17" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M 0,0 L17,0 L17,19 L0,19 L0,18 L16,18 L16,1 L0,1 L0,0 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="StopFill" Width="16" Height="17" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Path x:Name="StopSymbol" Width="6" Height="7" Canvas.Left="5" Fill="#FF000000" Canvas.Top="6" Data="F1 M0,0 L6,0 L6,7 L0,7 L0,0 Z " /> + </Canvas> + + + <Canvas x:Name="PlayButton" Width="17" Height="20"> + <Rectangle x:Name="PlayShadow" Width="17" Height="1" Canvas.Top="19" Fill="#55000000"/> + <Path x:Name="PlayStroke" Width="17" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F0 M 0,0 L17,0 L17,19 L0,19 L0,0 M1,1 L16,1 L16,18 L1,18 L1,1 Z "> + <Path.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#C0000000" Offset="0"/> + <GradientStop Color="#C0FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Path.Fill> + </Path> + <Rectangle x:Name="PlayFill" Width="15" Height="17" Canvas.Left="1" Canvas.Top="1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0"> + <LinearGradientBrush.GradientStops> + <GradientStop Color="#40000000" Offset="0"/> + <GradientStop Color="#40FFFFFF" Offset="1"/> + </LinearGradientBrush.GradientStops> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + <Path x:Name="PlayOffSymbol" Width="5" Height="7" Canvas.Left="6" Fill="#FF000000" Canvas.Top="6" Visibility="Collapsed" Data="F1 M0,0 L2,0 L2,7 L0,7 L0,0 M3,0 L5,0 L5,7 L3,7 L3,0 Z " /> + <Path x:Name="PlaySymbol" Width="6" Height="7" Canvas.Left="6" Fill="#FF000000" Canvas.Top="6" Data="F1 M0,0 L1,0 L1,1 L3,1 L3,2 L5,2 L5,3 L6,3 L6,4 L5,4 L5,5 L3,5 L3,6 L1,6 L1,7 L0,7 L0,0 Z" /> + </Canvas> + + + </Canvas> + + +</Canvas>
\ No newline at end of file diff --git a/modules/JWplayer/yt.swf b/modules/JWplayer/yt.swf Binary files differnew file mode 100644 index 0000000000..5b41e4da2a --- /dev/null +++ b/modules/JWplayer/yt.swf |
