Permalink
Browse files

v0.2 - Support for Joomla 1.6 added (untested)

  • Loading branch information...
1 parent 6782412 commit d66cefab6609c9d0c0095eb05c3d22b6d7dfa95c @emirpprime committed Oct 13, 2011
View
2 Joomla 1.5/language/en-GB.plg_content_pb_mediael.ini
@@ -2,7 +2,7 @@
# License GNU/GPL http://www.gnu.org/copyleft/gpl.html
# pb_mediael.xml
-PLUGIN DESC=<h1>pb:MediaEl 0.1 [Plugin]</h1><strong>Based on Media Element.JS 2.2.3 (<a href="http://mediaelementjs.com" title="Homepage of Media Element.JS" target="_blank">http://mediaelementjs.com</a>)</strong><p><strong>Description:</strong><br />Content Plugin which provides a HTML5 Video Player for Joomla! 1.5.</p><p><strong>Syntax:</strong><br />Place the following code in an article: <pre wrap="wrap">{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://video-js.zencoder.com/oceans-clip.mp4] video_webm=[http://video-js.zencoder.com/oceans-clip.webm] video_ogg=[http://video-js.zencoder.com/oceans-clip.ogg] flash=[http://video-js.zencoder.com/oceans-clip.mp4] image=[http://video-js.zencoder.com/oceans-clip.png] image_visibility=[true]}</pre></p><p>These are all parameters. Minimum required is media, width, height and a source file.</p>
+PLUGIN DESC=<h1>pb:MediaEl 0.2 [Plugin]</h1><strong>Based on Media Element.JS 2.2.3 (<a href="http://mediaelementjs.com" title="Homepage of Media Element.JS" target="_blank">http://mediaelementjs.com</a>)</strong><p><strong>Description:</strong><br />Content Plugin which provides a HTML5 Video Player for Joomla! 1.5.</p><p><strong>Syntax:</strong><br />Place the following code in an article: <pre wrap="wrap">{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://video-js.zencoder.com/oceans-clip.mp4] video_webm=[http://video-js.zencoder.com/oceans-clip.webm] video_ogg=[http://video-js.zencoder.com/oceans-clip.ogg] flash=[http://video-js.zencoder.com/oceans-clip.mp4] image=[http://video-js.zencoder.com/oceans-clip.png] image_visibility=[true]}</pre></p><p>These are all parameters. Minimum required is media, width, height and a source file.</p>
# Video
DEFAULT AUDIO PARAMETER=<strong>Audio Parameter</strong>
View
2 Joomla 1.5/pb_mediael.xml
@@ -7,7 +7,7 @@
<license>GNU/GPL http://www.gnu.org/copyleft/gpl.html</license>
<authorEmail>pb@mrc-lmb.cam.ac.uk</authorEmail>
<authorUrl>www2.mrc-lmb.cam.ac.uk</authorUrl>
- <version>0.1</version>
+ <version>0.2</version>
<description>PLUGIN DESC</description>
<files>
<filename plugin="pb_mediael">pb_mediael.php</filename>
View
46 Joomla 1.6/pb_mediael/language/en-GB/en-GB.plg_content_pb_mediael.ini
@@ -0,0 +1,46 @@
+; Copyright (C) 2011 Phil Banks
+; License GNU/GPL http://www.gnu.org/copyleft/gpl.html
+
+; pb_mediael.xml
+PLG_PB_MEDIAEL="Content - pb:MediaEl"
+PLG_PB_MEDIAEL_XML_DESCRIPTION="<h1>pb:MediaEl 0.2 [Plugin]</h1><strong>Based on Media Element.JS 2.2.3 (<a href="_QQ_"http://mediaelementjs.com"_QQ_" title="Homepage of Media Element.JS"_QQ_" target="_QQ_"_blank"_QQ_">http://mediaelementjs.com</a>)</strong><p><strong>Description:</strong><br />Content Plugin which provides a HTML5 Video Player for Joomla! 1.6.</p><p><strong>Syntax:</strong><br />Place the following code in an article: <pre wrap="_QQ_"wrap"_QQ_">{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://myvideo.mp4] video_webm=[http://myvideo.webm] video_ogg=[http://myvideo.ogg] flash=[http://myvideo.mp4] image=[http://myvideo.png] image_visibility=[true]}</pre></p><p>These are all parameters. Minimum required is media, width, height and a source file.</p>"
+
+; Audio
+LABEL_AUDIO_MP3="Audio [mp3]"
+
+DESC_AUDIO_MP3="Default audio [mp3]. Leave blank for no default Audio."
+
+; Video
+LABEL_VIDEO_MP4="Video [mp4]"
+LABEL_VIDEO_WEBM="Video [webm]"
+LABEL_VIDEO_OGG="Video [ogg]"
+LABEL_FLASH="Flash Fallback [mp4]"
+LABEL_IMAGE="Poster Image"
+LABEL_IMAGE_VISIBILITY="Image visible"
+
+DESC_VIDEO MP4="Default video [mp4]. Leave blank for no default Video."
+DESC_VIDEO WEBM="Default video [webm]. Leave blank for no default Video."
+DESC_VIDEO OGG="Default video [ogg]. Leave blank for no default Video."
+DESC_FLASH="If video cannot display in HTML5, here you can set a default fallback video for flash. Leave blank for no default flash video."
+DESC_IMAGE="Default poster image. Types: gif, jpg, png."
+DESC_IMAGE VISIBILITY="Hide/display the poster image."
+
+; Player
+LABEL_MEDIA="Media Type"
+LABEL_WIDTH="Width"
+LABEL_HEIGHT="Height"
+LABEL_AUTOPLAY="Autoplay"
+LABEL_PRELOAD="Preload"
+LABEL_LOOP="Loop"
+LABEL_DEFAULT_VOLUME="Default Volume"
+LABEL_WMODE="WMode"
+
+DESC_MEDIA="Media type - video or audio."
+DESC_WIDTH="Width."
+DESC_HEIGHT="Height."
+DESC_SKIN="Choose skin."
+DESC_AUTOPLAY="Autoplay the video."
+DESC_PRELOAD="Preload the video."
+DESC_LOOP="Loops the video. Actually it works only in HTML."
+DESC_DEFAULT_VOLUME="Will be overridden by local volume if available."
+DESC_WMODE="Here you can choose the wmode for flash player (e.g. opaque, to place elements above flash)."
View
BIN Joomla 1.6/pb_mediael/media/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Joomla 1.6/pb_mediael/media/bigplay.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Joomla 1.6/pb_mediael/media/controls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Joomla 1.6/pb_mediael/media/flashmediaelement.swf
Binary file not shown.
View
8,936 Joomla 1.6/pb_mediael/media/jquery.js
8,936 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN Joomla 1.6/pb_mediael/media/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
121 Joomla 1.6/pb_mediael/media/mediaelement-and-player.min.js
@@ -0,0 +1,121 @@
+/*!
+* MediaElement.js
+* HTML5 <video> and <audio> shim and player
+* http://mediaelementjs.com/
+*
+* Creates a JavaScript object that mimics HTML5 MediaElement API
+* for browsers that don't understand HTML5 or can't play the provided codec
+* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
+*
+* Copyright 2010-2011, John Dyer (http://j.hn)
+* Dual licensed under the MIT or GPL Version 2 licenses.
+*
+*/var mejs=mejs||{};mejs.version="2.2.3";mejs.meIndex=0;mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg"]}]};
+mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script");b<f.length;b++){g=f[b].src;for(c=0;c<a.length;c++){e=a[c];if(g.indexOf(e)>-1){d=g.substring(0,
+g.indexOf(e));break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,g=Math.floor(a/60)%60,f=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(g<10?"0"+g:g)+":"+(f<10?"0"+f:f)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;a=a.split(":");b=parseInt(a[0]);var e=parseInt(a[1]),
+g=parseInt(a[2]),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f}};
+mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],g;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
+!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(g=new ActiveXObject(c))e=d(g)}catch(f){}return e}};
+mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
+mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,g,f){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[g]+=f;e[g]-=f};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
+mejs.MediaFeatures={init:function(){var a=mejs.PluginDetector.nav,b=mejs.PluginDetector.ua.toLowerCase(),c,d=["source","track","audio","video"];this.isiPad=b.match(/ipad/i)!==null;this.isiOS=(this.isiPhone=b.match(/iphone/i)!==null)||this.isiPad;this.isAndroid=b.match(/android/i)!==null;this.isBustedAndroid=b.match(/android 2\.[12]/)!==null;this.isIE=a.appName.toLowerCase().indexOf("microsoft")!=-1;this.isChrome=b.match(/chrome/gi)!==null;this.isFirefox=b.match(/firefox/gi)!==null;for(a=0;a<d.length;a++)c=
+document.createElement(d[a]);this.supportsMediaTag=typeof c.canPlayType!=="undefined"||this.isBustedAndroid;this.hasSemiNativeFullScreen=typeof c.webkitEnterFullscreen!=="undefined";this.hasTrueNativeFullScreen=typeof c.webkitRequestFullScreen!=="undefined";if(this.isChrome)this.hasTrueNativeFullScreen=this.hasSemiNativeFullScreen=false;if(this.hasSemiNativeFullScreen&&b.match(/mac os x 10_5/i))this.hasSemiNativeFullScreen=this.hasNativeFullScreen=false}};mejs.MediaFeatures.init();
+mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type))this.src=c.src}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
+mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={}};
+mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginApi.loadMedia();this.paused=false}},pause:function(){if(this.pluginApi!=null){this.pluginApi.pauseMedia();this.paused=
+true}},stop:function(){if(this.pluginApi!=null){this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return true}return false},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=
+a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));this.src=mejs.Utility.absolutizeUrl(a)}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){this.pluginApi.setMuted(a);this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=
+a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen(a)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},
+dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}}};
+mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,
+c)},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];a.ended=false;a.paused=true;b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}};
+mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",enablePluginSmoothing:false,silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,timerRate:250,startVolume:0.8,success:function(){},error:function(){}};
+mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
+mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),g=e=="audio"||e=="video",f=d.getAttribute("src");e=d.getAttribute("poster");var j=d.getAttribute("autoplay"),h=d.getAttribute("preload"),l=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];if(g)isVideo=d.tagName.toLowerCase()=="video";else f=d.getAttribute("href");f=f=="undefined"||f==""||f===null?null:f;e=typeof e=="undefined"||e===null?"":e;
+h=typeof h=="undefined"||h===null||h==="false"?"none":h;j=!(typeof j=="undefined"||j===null||j==="false");l=!(typeof l=="undefined"||l===null||l==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,g,f);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},true)}return this.updateNative(k,c,j,h)}else if(k.method!=="")return this.createPlugin(k,c,e,j,h,
+l);else this.createErrorMessage(k,c,e)},videoRegExp:/(mp4|m4v|ogg|ogv|webm|flv|wmv|mpeg)/gi,determinePlayback:function(a,b,c,d,e){var g=[],f,j,h={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},l,k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")g.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)g.push({type:b.type[f],url:e});else if(e!==null){j=this.formatType(e,a.getAttribute("type"));g.push({type:j,url:e})}else for(f=0;f<a.childNodes.length;f++){j=
+a.childNodes[f];if(j.nodeType==1&&j.tagName.toLowerCase()=="source"){e=j.getAttribute("src");j=this.formatType(e,j.getAttribute("type"));g.push({type:j,url:e})}}if(g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)h.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="native")){if(!d){f=document.createElement(h.isVideo?"video":"audio");a.parentNode.insertBefore(f,
+a);a.style.display="none";h.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,"")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){h.method="native";h.url=g[f].url;break}if(h.method==="native"){if(h.url!==null)a.src=h.url;return h}}if(b.mode==="auto"||b.mode==="shim")for(f=0;f<g.length;f++){j=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];l=mejs.plugins[e];for(c=0;c<l.length;c++){k=l[c];if(mejs.PluginDetector.hasPluginVersion(e,
+k.version))for(d=0;d<k.types.length;d++)if(j==k.types[d]){h.method=e;h.url=g[f].url;return h}}}}if(h.method==="")h.url=g[0].url;return h},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.substring(a.lastIndexOf(".")+1);return(this.videoRegExp.test(a)?"video":"audio")+"/"+a},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=
+d.width+"px";e.style.height=d.height+"px"}catch(g){}e.innerHTML=c!==""?'<a href="'+a.url+'"><img src="'+c+'" /></a>':'<a href="'+a.url+'"><span>Download File</span></a>';d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,g){c=a.htmlMediaElement;var f=1,j=1,h="me_"+a.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(h,a.method,a.url),k=document.createElement("div"),m;for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()==
+"p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){f=b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);j=mejs.Utility.encodeUrl(j)}else if(b.enablePluginDebug){f=320;j=240}l.success=b.success;mejs.MediaPluginBridge.registerPluginElement(h,l,c);k.className="me-plugin";
+c.parentNode.insertBefore(k,c);d=["id="+h,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"height="+j];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");g&&d.push("controls=true");switch(a.method){case "silverlight":k.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+
+h+'" name="'+h+'" width="'+f+'" height="'+j+'"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+
+h+'" width="'+f+'" height="'+j+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML='<embed id="'+h+'" name="'+h+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+
+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+f+'" height="'+j+'"></embed>'}c.style.display="none";return l},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};window.mejs=mejs;window.MediaElement=mejs.MediaElement;
+
+/*!
+ * MediaElementPlayer
+ * http://mediaelementjs.com/
+ *
+ * Creates a controller bar for HTML5 <video> add <audio> tags
+ * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
+ *
+ * Copyright 2010-2011, John Dyer (http://j.hn/)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
+(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true};mejs.mepIndex=0;mejs.MediaElementPlayer=
+function(a,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,c);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;this.options=f.extend({},mejs.MepDefaults,c);this.init();return this};mejs.MediaElementPlayer.prototype={init:function(){var a=this,c=mejs.MediaFeatures,b=f.extend(true,{},a.options,{success:function(e,h){a.meReady(e,h)},error:function(e){a.handleError(e)}}),
+d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(c.isiPad&&a.options.iPadUseNativeControls||c.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls","controls");a.$media.removeAttr("poster");if(c.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(c.isAndroid&&a.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.id="mep_"+mejs.mepIndex++;a.container=
+f('<div id="'+a.id+'" class="mejs-container"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);if(c.isiPad||c.isiPhone){c=a.$media.clone();a.container.find(".mejs-mediaelement").append(c);a.$media.remove();a.$node=a.$media=c;a.node=a.media=c[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");
+a.layers=a.container.find(".mejs-layers");if(a.isVideo){a.width=a.options.videoWidth>0?a.options.videoWidth:a.$media[0].getAttribute("width")!==null?a.$media.attr("width"):a.options.defaultVideoWidth;a.height=a.options.videoHeight>0?a.options.videoHeight:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):a.options.defaultVideoHeight}else{a.width=a.options.audioWidth;a.height=a.options.audioHeight}a.setPlayerSize(a.width,a.height);b.pluginWidth=a.height;b.pluginHeight=a.width}mejs.MediaElement(a.$media[0],
+b)},controlsAreVisible:true,showControls:function(a){var c=this;a=typeof a=="undefined"||a;if(!c.controlsAreVisible){if(a){c.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true});c.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true})}else{c.controls.css("visibility","visible").css("display","block");c.container.find(".mejs-control").css("visibility","visible").css("display","block");
+c.controlsAreVisible=true}c.setControlsSize()}},hideControls:function(a){var c=this;a=typeof a=="undefined"||a;if(c.controlsAreVisible)if(a){c.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");c.controlsAreVisible=false});c.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{c.controls.css("visibility","hidden").css("display","block");c.container.find(".mejs-control").css("visibility",
+"hidden").css("display","block");c.controlsAreVisible=false}},controlsTimer:null,startControlsTimer:function(a){var c=this;a=typeof a!="undefined"?a:500;c.killControlsTimer("start");c.controlsTimer=setTimeout(function(){c.hideControls();c.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);
+this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a,c){var b=this,d=mejs.MediaFeatures,e=c.getAttribute("autoplay");e=!(typeof e=="undefined"||e===null||e==="false");var h;if(!b.created){b.created=true;b.media=a;b.domNode=c;if(!(d.isAndroid&&b.options.AndroidUseNativeControls)&&!(d.isiPad&&b.options.iPadUseNativeControls)&&!(d.isiPhone&&b.options.iPhoneUseNativeControls)){b.buildposter(b,b.controls,b.layers,b.media);b.buildoverlays(b,
+b.controls,b.layers,b.media);b.findTracks();for(h in b.options.features){d=b.options.features[h];if(b["build"+d])try{b["build"+d](b,b.controls,b.layers,b.media)}catch(j){}}b.container.trigger("controlsready");b.setPlayerSize(b.width,b.height);b.setControlsSize();if(b.isVideo){b.media.pluginType=="native"?b.$media.click(function(){a.paused?a.play():a.pause()}):f(b.media.pluginElement).click(function(){a.paused?a.play():a.pause()});b.container.bind("mouseenter mouseover",function(){if(b.controlsEnabled)if(!b.options.alwaysShowControls){b.killControlsTimer("enter");
+b.showControls();b.startControlsTimer(2500)}}).bind("mousemove",function(){if(b.controlsEnabled){b.controlsAreVisible||b.showControls();b.startControlsTimer(2500)}}).bind("mouseleave",function(){b.controlsEnabled&&!b.media.paused&&!b.options.alwaysShowControls&&b.startControlsTimer(1E3)});e&&!b.options.alwaysShowControls&&b.hideControls();b.options.enableAutosize&&b.media.addEventListener("loadedmetadata",function(i){if(b.options.videoHeight<=0&&b.domNode.getAttribute("height")===null&&!isNaN(i.target.videoHeight)){b.setPlayerSize(i.target.videoWidth,
+i.target.videoHeight);b.setControlsSize();b.media.setVideoSize(i.target.videoWidth,i.target.videoHeight)}},false)}b.media.addEventListener("ended",function(){b.media.setCurrentTime(0);b.media.pause();b.setProgressRail&&b.setProgressRail();b.setCurrentRail&&b.setCurrentRail();if(b.options.loop)b.media.play();else!b.options.alwaysShowControls&&b.controlsEnabled&&b.showControls()},true);b.media.addEventListener("loadedmetadata",function(){b.updateDuration&&b.updateDuration();b.updateCurrent&&b.updateCurrent();
+b.setPlayerSize(b.width,b.height);b.setControlsSize()},true);setTimeout(function(){b.setPlayerSize(b.width,b.height);b.setControlsSize()},50);f(window).resize(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||b.setPlayerSize(b.width,b.height);b.setControlsSize()})}if(e&&a.pluginType=="native"){a.load();a.play()}b.options.success&&b.options.success(b.media,b.domNode,b)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(){if(this.height.toString().indexOf("%")>
+0){var a=this.media.nativeHeight&&this.media.nativeHeight>0?this.media.nativeHeight:this.options.defaultVideoHeight,c=this.media.nativeWidth&&this.media.nativeWidth>0?this.media.nativeWidth:this.options.defaultVideoWidth,b=this.container.parent().width();a=parseInt(b*a/c,10);this.container.width(b).height(a);this.$media.width("100%").height("100%");this.container.find("object embed").width("100%").height("100%");this.media.setVideoSize&&this.media.setVideoSize(b,a);this.layers.children(".mejs-layer").width("100%").height("100%")}else{this.container.width(this.width).height(this.height);
+this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,c=0,b=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");others=b.siblings();others.each(function(){if(f(this).css("position")!="absolute")a+=f(this).outerWidth(true)});c=this.controls.width()-a-(b.outerWidth(true)-b.outerWidth(false));b.width(c);d.width(c-(d.outerWidth(true)-d.width()));
+this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,c,b,d){var e=f('<div class="mejs-poster mejs-layer"><img /></div>').appendTo(b);c=a.$media.attr("poster");b=e.find("img").width(a.width).height(a.height);if(a.options.poster!="")b.attr("src",a.options.poster);else c!==""&&c!=null?b.attr("src",c):e.remove();d.addEventListener("play",function(){e.hide()},false)},buildoverlays:function(a,c,b,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(b),
+h=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(b),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(b).click(function(){d.paused?d.play():d.pause()});if(mejs.MediaFeatures.isiOS||mejs.MediaFeatures.isAndroid){j.remove();e.remove()}d.addEventListener("play",function(){j.hide();h.hide()},false);d.addEventListener("pause",function(){j.show()},false);d.addEventListener("loadeddata",
+function(){e.show()},false);d.addEventListener("canplay",function(){e.hide()},false);d.addEventListener("error",function(){e.hide();h.show();h.find("mejs-overlay-error").html("Error loading this resource")},false)}},findTracks:function(){var a=this,c=a.$media.find("track");a.tracks=[];c.each(function(){a.tracks.push({srclang:f(this).attr("srclang").toLowerCase(),src:f(this).attr("src"),kind:f(this).attr("kind"),entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+
+a;this.setPlayerSize();this.setControlsSize()},play:function(){this.media.play()},pause:function(){this.media.pause()},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)}};if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=
+function(a){return this.each(function(){new mejs.MediaElementPlayer(this,a)})};window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
+(function(f){f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,c,b,d){var e=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="Play/Pause"></button></div>').appendTo(c).click(function(h){h.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},
+false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
+(function(f){f.extend(MediaElementPlayer.prototype,{buildstop:function(a,c,b,d){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="Stop"></button></div>').appendTo(c).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);c.find(".mejs-time-current").width("0px");c.find(".mejs-time-handle").css("left","0px");c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));
+b.find(".mejs-poster").show()}})}})})(mejs.$);
+(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,c,b,d){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c);var e=c.find(".mejs-time-total");b=c.find(".mejs-time-loaded");var h=c.find(".mejs-time-current"),
+j=c.find(".mejs-time-handle"),i=c.find(".mejs-time-float"),k=c.find(".mejs-time-float-current"),n=function(g){g=g.pageX;var m=e.offset(),q=e.outerWidth(),o=0;o=0;if(g>m.left&&g<=q+m.left&&d.duration){o=(g-m.left)/q;o=o<=0.02?0:o*d.duration;l&&d.setCurrentTime(o);i.css("left",g-m.left);k.html(mejs.Utility.secondsToTimeCode(o))}},l=false,r=false;e.bind("mousedown",function(g){if(g.which===1){l=true;n(g);return false}});c.find(".mejs-time-rail").bind("mouseenter",function(){r=true}).bind("mouseleave",
+function(){r=false});f(document).bind("mouseup",function(){l=false}).bind("mousemove",function(g){if(l||r)n(g)});d.addEventListener("progress",function(g){a.setProgressRail(g);a.setCurrentRail(g)},false);d.addEventListener("timeupdate",function(g){a.setProgressRail(g);a.setCurrentRail(g)},false);this.loaded=b;this.total=e;this.current=h;this.handle=j},setProgressRail:function(a){var c=a!=undefined?a.target:this.media,b=null;if(c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration)b=c.buffered.end(0)/
+c.duration;else if(c&&c.bytesTotal!=undefined&&c.bytesTotal>0&&c.bufferedBytes!=undefined)b=c.bufferedBytes/c.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)b=a.loaded/a.total;if(b!==null){b=Math.min(1,Math.max(0,b));this.loaded&&this.total&&this.loaded.width(this.total.width()*b)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,c=a-this.handle.outerWidth(true)/
+2;this.current.width(a);this.handle.css("left",c)}}})})(mejs.$);
+(function(f){f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,c,b,d){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(c);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,c,b,d){if(c.children().last().find(".mejs-currenttime").length>0)f(' <span> | </span> <span class="mejs-duration">'+
+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span>").appendTo(c.find(".mejs-time"));else{c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(c)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",function(){a.updateDuration()},
+false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
+(function(f){f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,c,b,d){var e=f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+this.id+'" title="Mute/Unmute"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(c),h=e.find(".mejs-volume-slider"),j=e.find(".mejs-volume-total"),i=e.find(".mejs-volume-current"),k=e.find(".mejs-volume-handle"),
+n=function(g){if(h.is(":visible")){var m=j.height(),q=j.position();g=m-m*g;k.css("top",q.top+g-k.height()/2);i.height(m-g);i.css("top",q.top+g)}else{h.show();n(g);h.hide()}},l=function(g){var m=j.height(),q=j.offset(),o=parseInt(j.css("top").replace(/px/,""),10);g=g.pageY-q.top;var p=(m-g)/m;if(q.top!=0){p=Math.max(0,p);p=Math.min(p,1);if(g<0)g=0;else if(g>m)g=m;k.css("top",g-k.height()/2+o);i.height(m-g);i.css("top",g+o);if(p==0){d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{d.setMuted(false);
+e.removeClass("mejs-unmute").addClass("mejs-mute")}p=Math.max(0,p);p=Math.min(p,1);d.setVolume(p)}},r=false;e.hover(function(){h.show()},function(){h.hide()});h.bind("mousedown",function(g){l(g);r=true;return false});f(document).bind("mouseup",function(){r=false}).bind("mousemove",function(g){r&&l(g)});e.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(g){if(!r)if(d.muted){n(0);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{n(g.target.volume);
+e.removeClass("mejs-unmute").addClass("mejs-mute")}},true);n(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{forcePluginFullScreen:false,newWindowUrl:""});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,c){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;mejs.MediaFeatures.hasTrueNativeFullScreen&&a.container.bind("webkitfullscreenchange",function(){document.webkitIsFullScreen?a.setControlsSize():a.exitFullScreen()});var b=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+
+this.id+'" title="Fullscreen"></button></div>').appendTo(c).click(function(){(mejs.MediaFeatures.hasTrueNativeFullScreen?document.webkitIsFullScreen:a.isFullScreen)?a.exitFullScreen():a.enterFullScreen()});a.fullscreenBtn=b;f(document).bind("keydown",function(d){a.isFullScreen&&d.keyCode==27&&a.exitFullScreen()})}},enterFullScreen:function(){var a=this;if(mejs.MediaFeatures.hasTrueNativeFullScreen)a.container[0].webkitRequestFullScreen();else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();
+return}if(a.isInIframe&&a.options.newWindowUrl!==""){a.pause();window.open(a.options.newWindowUrl,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}else if(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.forcePluginFullScreen))a.media.setFullscreen(true);else{docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();
+normalWidth=a.container.width();a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");setTimeout(function(){a.container.css({width:"100%",height:"100%"})},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find("object embed").width("100%").height("100%");a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");
+a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen&&document.webkitCancelFullScreen();document.documentElement.style.overflow=docStyleOverflow;this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight).css("z-index",1);if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);
+else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",translations:[],translationSelector:false,googleApiKey:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,c,b,d){if(a.isVideo)if(a.tracks.length!=0){var e,h="";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(b).hide();a.captions=f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position"><span class="mejs-captions-text"></span></div></div>').prependTo(b).hide();
+a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="Captions/Subtitles"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">None</label></li></ul></div></div>').appendTo(c).hover(function(){f(this).find(".mejs-captions-selector").css("visibility",
+"visible")},function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",
+function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;if(a.tracks.length>0&&a.options.translations.length>0)for(e=0;e<a.options.translations.length;e++)a.tracks.push({srclang:a.options.translations[e].toLowerCase(),src:null,kind:"subtitles",entries:[],isLoaded:false,
+isTranslation:true});for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].isTranslation);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility","visible");a.chapters.fadeIn(200)}},function(){a.hasChapters&&!d.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility",
+"hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden");if(a.options.translationSelector){for(e in mejs.language.codes)h+='<option value="'+e+'">'+mejs.language.codes[e]+"</option>";a.container.find(".mejs-captions-selector ul").before(f('<select class="mejs-captions-translations"><option value="">--Add Translation--</option>'+h+"</select>"));a.container.find(".mejs-captions-translations").change(function(){lang=f(this).val();if(lang!=
+""){a.tracks.push({srclang:lang,src:null,entries:[],isLoaded:false,isTranslation:true});if(!a.isLoadingTrack){a.trackToLoad--;a.addTrackButton(lang,true);a.options.startLanguage=lang;a.loadNextTrack()}}})}}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var c=this,b=c.tracks[a],d=function(){b.isLoaded=true;c.enableTrackButton(b.srclang);c.loadNextTrack()};
+b.isTranslation?mejs.TrackFormatParser.translateTrackText(c.tracks[0].entries,c.tracks[0].srclang,b.srclang,c.options.googleApiKey,function(e){b.entries=e;d()}):f.ajax({url:b.src,success:function(e){b.entries=mejs.TrackFormatParser.parse(e);d();b.kind=="chapters"&&c.media.duration>0&&c.drawChapters(b)},error:function(){c.loadNextTrack()}})},enableTrackButton:function(a){this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(mejs.language.codes[a]||a);this.options.startLanguage==
+a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,c){var b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+(c?" (translating)":" (loading)")+"</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+
+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,c=this.selectedTrack;if(c!=null&&c.isLoaded)for(a=0;a<c.entries.times.length;a++)if(this.media.currentTime>=c.entries.times[a].start&&this.media.currentTime<=c.entries.times[a].stop){this.captionsText.html(c.entries.text[a]);this.captions.show();return}this.captions.hide()}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind==
+"chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var c=this,b,d,e=d=0;c.chapters.empty();for(b=0;b<a.entries.times.length;b++){d=a.entries.times[b].stop-a.entries.times[b].start;d=Math.floor(d/c.media.duration*100);if(d+e>100||b==a.entries.times.length-1&&d+e<100)d=100-e;c.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[b].start+'" style="left: '+e.toString()+"%;width: "+d.toString()+'%;"><div class="mejs-chapter-block'+
+(b==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[b]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[b].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[b].stop)+"</span></div></div>"));e+=d}c.chapters.find("div.mejs-chapter").click(function(){c.media.setCurrentTime(parseFloat(f(this).attr("rel")));c.media.paused&&c.media.play()});c.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",
+ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",
+fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,split2:function(a,c){return a.split(c)},parse:function(a){var c=0;a=this.split2(a,
+/\r?\n/);for(var b={text:[],times:[]},d,e;c<a.length;c++)if(this.pattern_identifier.exec(a[c])){c++;if((d=this.pattern_timecode.exec(a[c]))&&c<a.length){c++;e=a[c];for(c++;a[c]!==""&&c<a.length;){e=e+"\n"+a[c];c++}b.text.push(e);b.times.push({start:mejs.Utility.timeCodeToSeconds(d[1]),stop:mejs.Utility.timeCodeToSeconds(d[3]),settings:d[5]})}}return b},translateTrackText:function(a,c,b,d,e){var h={text:[],times:[]},j,i;this.translateText(a.text.join(" <a></a>"),c,b,d,function(k){j=k.split("<a></a>");
+for(i=0;i<a.text.length;i++){h.text[i]=j[i];h.times[i]={start:a.times[i].start,stop:a.times[i].stop,settings:a.times[i].settings}}e(h)})},translateText:function(a,c,b,d,e){for(var h,j=[],i,k="",n=function(){if(j.length>0){i=j.shift();mejs.TrackFormatParser.translateChunk(i,c,b,d,function(l){if(l!="undefined")k+=l;n()})}else e(k)};a.length>0;)if(a.length>1E3){h=a.lastIndexOf(".",1E3);j.push(a.substring(0,h));a=a.substring(h+1)}else{j.push(a);a=""}n()},translateChunk:function(a,c,b,d,e){a={q:a,langpair:c+
+"|"+b,v:"1.0"};if(d!==""&&d!==null)a.key=d;f.ajax({url:"https://ajax.googleapis.com/ajax/services/language/translate",data:a,type:"GET",dataType:"jsonp",success:function(h){e(h.responseData.translatedText)},error:function(){e(null)}})}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,c){var b=[],d="",e;for(e=0;e<a.length;e++){d+=a.substring(e,e+1);if(c.test(d)){b.push(d.replace(c,""));d=""}}b.push(d);return b}})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,contextMenuItems=[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen"},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?"Unmute":"Mute"},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return"Download Video"},click:function(a){window.location.href=a.media.currentSrc}}]);
+f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(c){c.preventDefault();a.renderContextMenu(c.clientX-1,c.clientY-1);return false});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=
+setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,c){for(var b=this,d="",e=b.options.contextMenuItems,h=0,j=e.length;h<j;h++)if(e[h].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var i=e[h].render(b);if(i!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+h+'" id="element-'+
+Math.random()*1E6+'">'+i+"</div>"}b.contextMenu.empty().append(f(d)).css({top:c,left:a}).show();b.contextMenu.find(".mejs-contextmenu-item").each(function(){var k=f(this),n=parseInt(k.data("itemindex"),10),l=b.options.contextMenuItems[n];typeof l.show!="undefined"&&l.show(k,b);k.click(function(){typeof l.click!="undefined"&&l.click(b);b.contextMenu.hide()})});setTimeout(function(){b.killControlsTimer("rev3")},100)}})})(mejs.$);
+
View
622 Joomla 1.6/pb_mediael/media/mediaelementplayer.css
@@ -0,0 +1,622 @@
+.mejs-container {
+ position: relative;
+ background: #000;
+ font-family: Helvetica, Arial;
+}
+
+.mejs-embed, .mejs-embed body {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ background: #000;
+}
+
+.mejs-container-fullscreen {
+ position: fixed;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ overflow: hidden;
+ z-index: 1000;
+}
+.mejs-container-fullscreen .mejs-mediaelement,
+.mejs-container-fullscreen video {
+ width: 100%;
+ height: 100%;
+}
+
+/* Start: LAYERS */
+.mejs-background {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.mejs-mediaelement {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+.mejs-poster {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.mejs-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.mejs-overlay-play {
+ cursor: pointer;
+}
+.mejs-overlay-button {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 100px;
+ height: 100px;
+ margin: -50px 0 0 -50px;
+ background: url(bigplay.png) top left no-repeat;
+}
+.mejs-overlay:hover .mejs-overlay-button{
+ background-position: 0 -100px ;
+}
+.mejs-overlay-loading {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 80px;
+ height: 80px;
+ margin: -40px 0 0 -40px;
+ background: #333;
+ background: url(background.png);
+ background: rgba(0, 0, 0, 0.9);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
+ background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
+ background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
+}
+.mejs-overlay-loading span {
+ display:block;
+ width: 80px;
+ height: 80px;
+ background: transparent url(loading.gif) center center no-repeat;
+}
+
+/* End: LAYERS */
+
+/* Start: CONTROL BAR */
+.mejs-container .mejs-controls {
+ position: absolute;
+ background: none;
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ bottom: 0;
+ left: 0;
+ background: url(background.png);
+ background: rgba(0, 0, 0, 0.7);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
+ background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
+ background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
+ height: 30px;
+ width: 100%;
+}
+.mejs-container .mejs-controls div {
+ list-style-type: none;
+ background-image: none;
+ display: block;
+ float: left;
+ margin: 0;
+ padding: 0;
+ width: 26px;
+ height: 26px;
+ font-size: 11px;
+ line-height: 11px;
+ background: 0;
+ font-family: Helvetica, Arial;
+ border: 0;
+}
+
+.mejs-controls .mejs-button button {
+ cursor: pointer;
+ display: block;
+ font-size: 0px;
+ line-height: 0;
+ text-decoration: none;
+ margin: 7px 5px;
+ padding: 0;
+ position: absolute;
+ height: 16px;
+ width: 16px;
+ border: 0;
+ background: transparent url(controls.png) 0 0 no-repeat;
+}
+
+/* :focus for accessibility */
+.mejs-controls .mejs-button button:focus {
+ outline: solid 1px yellow;
+}
+
+/* End: CONTROL BAR */
+
+/* Start: Time (current / duration) */
+.mejs-container .mejs-controls .mejs-time {
+ color: #fff;
+ display: block;
+ height: 17px;
+ width: auto;
+ padding: 8px 3px 0 3px ;
+ overflow: hidden;
+ text-align: center;
+ padding: auto 4px;
+}
+.mejs-container .mejs-controls .mejs-time span {
+ font-size: 11px;
+ color: #fff;
+ line-height: 12px;
+ display: block;
+ float: left;
+ margin: 1px 2px 0 0;
+ width: auto;
+}
+/* End: Time (current / duration) */
+
+
+/* Start: Play/pause */
+.mejs-controls .mejs-play button {
+ background-position:0 0;
+}
+.mejs-controls .mejs-pause button {
+ background-position:0 -16px;
+}
+/* End: Play/pause */
+
+
+/* Stop */
+.mejs-controls .mejs-stop button {
+ background-position: -112px 0;
+}
+/* End: Play/pause */
+
+/* Start: Progress bar */
+.mejs-controls div.mejs-time-rail {
+ width: 200px;
+ padding-top: 5px;
+}
+.mejs-controls .mejs-time-rail span {
+ display: block;
+ position: absolute;
+ width: 180px;
+ height: 10px;
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
+ cursor: pointer;
+}
+.mejs-controls .mejs-time-rail .mejs-time-total {
+ margin: 5px;
+ background: #333;
+ background: rgba(50,50,50,0.8);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
+ background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
+ background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#1E1E1E,endColorstr=#3C3C3C);
+}
+.mejs-controls .mejs-time-rail .mejs-time-loaded {
+ background: #3caac8;
+ background: rgba(60,170,200,0.8);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(44,124,145,0.8)), to(rgba(78,183,212,0.8)));
+ background: -moz-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
+ background: linear-gradient(rgba(44,124,145,0.8), rgba(78,183,212,0.8));
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#2C7C91,endColorstr=#4EB7D4);
+ width: 0;
+}
+.mejs-controls .mejs-time-rail .mejs-time-current {
+ width: 0;
+ background: #fff;
+ background: rgba(255,255,255,0.8);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
+ background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#FFFFFF,endColorstr=#C8C8C8);
+}
+
+.mejs-controls .mejs-time-rail .mejs-time-handle {
+ display: none;
+ position: absolute;
+ margin: 0;
+ width: 10px;
+ background: #fff;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ cursor: pointer;
+ border: solid 2px #333;
+ top: -2px;
+ text-align: center;
+}
+
+.mejs-controls .mejs-time-rail .mejs-time-float {
+ visibility: hidden;
+ position: absolute;
+ display: block;
+ background: #eee;
+ width: 36px;
+ height: 17px;
+ border: solid 1px #333;
+ top: -26px;
+ margin-left: -18px;
+ text-align: center;
+ color: #111;
+}
+.mejs-controls .mejs-time-rail:hover .mejs-time-float {
+ visibility: visible;
+}
+.mejs-controls .mejs-time-rail .mejs-time-float-current {
+ margin: 2px;
+ width: 30px;
+ display: block;
+ text-align: center;
+ left: 0;
+}
+.mejs-controls .mejs-time-rail .mejs-time-float-corner {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ line-height: 0;
+ border: solid 5px #eee;
+ border-color: #eee transparent transparent transparent;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ top: 15px;
+ left: 13px;
+
+}
+
+
+
+
+/*
+.mejs-controls .mejs-time-rail:hover .mejs-time-handle {
+ visibility:visible;
+}
+*/
+/* End: Progress bar */
+
+/* Start: Fullscreen */
+.mejs-controls .mejs-fullscreen-button button {
+ background-position:-32px 0;
+}
+.mejs-controls .mejs-unfullscreen button {
+ background-position:-32px -16px;
+}
+/* End: Fullscreen */
+
+
+/* Start: Mute/Volume */
+.mejs-controls .mejs-volume-button {
+}
+
+.mejs-controls .mejs-mute button {
+ background-position:-16px -16px;
+}
+
+.mejs-controls .mejs-unmute button {
+ background-position:-16px 0;
+}
+
+.mejs-controls .mejs-volume-button {
+ position: relative;
+}
+
+.mejs-controls .mejs-volume-button .mejs-volume-slider {
+ display: none;
+ height: 115px;
+ width: 25px;
+ background: url(background.png);
+ background: rgba(50, 50, 50, 0.7);
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ top: -115px;
+ left: 0;
+ z-index: 1;
+ position: absolute;
+ margin: 0;
+}
+.mejs-controls .mejs-volume-button:hover {
+ -webkit-border-radius: 0 0 4px 4px ;
+ -moz-border-radius: 0 0 4px 4px ;
+ border-radius: 0 0 4px 4px ;
+}
+/*
+.mejs-controls .mejs-volume-button:hover .mejs-volume-slider {
+ display: block;
+}
+*/
+
+.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total {
+ position: absolute;
+ left: 11px;
+ top: 8px;
+ width: 2px;
+ height: 100px;
+ background: #ddd;
+ background: rgba(255, 255, 255, 0.5);
+ margin: 0;
+}
+
+.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current {
+ position: absolute;
+ left: 11px;
+ top: 8px;
+ width: 2px;
+ height: 100px;
+ background: #ddd;
+ background: rgba(255, 255, 255, 0.9);
+ margin: 0;
+}
+
+.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle {
+ position: absolute;
+ left: 4px;
+ top: -3px;
+ width: 16px;
+ height: 6px;
+ background: #ddd;
+ background: rgba(255, 255, 255, 0.9);
+ cursor: N-resize;
+ -webkit-border-radius: 1px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ margin: 0;
+}
+
+/* End: Mute/Volume */
+
+
+
+
+/* Start: TRACK (Captions and Chapters) */
+.mejs-controls .mejs-captions-button {
+ position: relative;
+}
+
+.mejs-controls .mejs-captions-button button {
+ background-position:-48px 0;
+}
+.mejs-controls .mejs-captions-button .mejs-captions-selector {
+ visibility: hidden;
+ position: absolute;
+ bottom: 26px;
+ right: -10px;
+ width: 130px;
+ height: 100px;
+ background: url(background.png);
+ background: rgba(50,50,50,0.7);
+ border: solid 1px transparent;
+ padding: 10px;
+ overflow: hidden;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+/*
+.mejs-controls .mejs-captions-button:hover .mejs-captions-selector {
+ visibility: visible;
+}
+*/
+
+.mejs-controls .mejs-captions-button .mejs-captions-selector ul {
+ margin: 0;
+ padding: 0;
+ display: block;
+ list-style-type: none !important;
+ overflow: hidden;
+}
+.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{
+ margin: 0 0 6px 0;
+ padding: 0;
+ list-style-type: none !important;
+ display:block;
+ color: #fff;
+ overflow: hidden;
+}
+.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{
+ clear: both;
+ float: left;
+ margin: 3px 3px 0px 5px;
+}
+.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{
+ width: 100px;
+ float: left;
+ padding: 4px 0 0 0;
+ line-height: 15px;
+ font-family: helvetica, arial;
+ font-size: 10px;
+}
+
+.mejs-controls .mejs-captions-button .mejs-captions-translations {
+ font-size: 10px;
+ margin: 0 0 5px 0;
+}
+
+
+.mejs-chapters {
+ position: absolute;
+ top: 0;
+ left: 0;
+ -xborder-right: solid 1px #fff;
+ width: 10000px;
+}
+.mejs-chapters .mejs-chapter {
+ position: absolute;
+ float: left;
+ background: #222;
+ background: rgba(0, 0, 0, 0.7);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
+ background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
+ background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232,endColorstr=#000000);
+ overflow: hidden;
+ border: 0;
+}
+.mejs-chapters .mejs-chapter .mejs-chapter-block {
+ font-size: 11px;
+ color: #fff;
+ padding: 5px;
+ display: block;
+ border-right: solid 1px #333;
+ border-bottom: solid 1px #333;
+ cursor: pointer;
+}
+.mejs-chapters .mejs-chapter .mejs-chapter-block-last {
+ border-right: none;
+}
+
+.mejs-chapters .mejs-chapter .mejs-chapter-block:hover {
+ /*background: #333;*/
+ background: #666;
+ background: rgba(102,102,102, 0.7);
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(102,102,102,0.7)), to(rgba(50,50,50,0.6)));
+ background: -moz-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666,endColorstr=#323232);
+}
+.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{
+ font-size: 12px;
+ font-weight: bold;
+ display: block;
+ white-space:nowrap;
+ text-overflow: ellipsis;
+ margin: 0 0 3px 0;
+ line-height: 12px;
+}
+.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{
+ font-size: 12px;
+ line-height: 12px;
+ margin: 3px 0 4px 0;
+ display: block;
+ white-space:nowrap;
+ text-overflow: ellipsis;
+}
+
+
+.mejs-captions-layer {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ text-align:center;
+ /*font-weight: bold;*/
+ line-height: 22px;
+ font-size: 12px;
+ color: #fff;
+}
+.mejs-captions-layer a {
+ color: #fff;
+ text-decoration: underline;
+}
+.mejs-captions-layer[lang=ar] {
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.mejs-captions-position {
+ position: absolute;
+ width: 100%;
+ bottom: 15px;
+ left: 0;
+}
+
+.mejs-captions-position-hover {
+ bottom: 45px;
+}
+
+.mejs-captions-text {
+ padding: 3px 5px;
+ background: url(background.png);
+ background: rgba(20, 20, 20, 0.8);
+
+}
+/* End: TRACK (Captions and Chapters) */
+
+
+
+.mejs-clear {
+ clear: both;
+}
+
+/* Start: ERROR */
+.me-cannotplay {
+}
+.me-cannotplay a {
+ color: #fff;
+ font-weight: bold;
+}
+.me-cannotplay span {
+ padding: 15px;
+ display: block;
+}
+/* End: ERROR */
+
+
+/* Start: Loop */
+.mejs-controls .mejs-loop-off button{
+ background-position: -64px -16px;
+}
+.mejs-controls .mejs-loop-on button {
+ background-position: -64px 0;
+}
+/* End: Loop */
+
+/* Start: backlight */
+.mejs-controls .mejs-backlight-off button{
+ background-position: -80px -16px;
+}
+.mejs-controls .mejs-backlight-on button {
+ background-position: -80px 0;
+}
+/* End: backlight */
+
+
+/* Start: picture controls */
+.mejs-controls .mejs-picturecontrols-button{
+ background-position: -96px 0;
+}
+/* End: picture controls */
+
+
+/* context menu */
+.mejs-contextmenu {
+ position: absolute;
+ width: 150px;
+ padding: 10px;
+ border-radius: 4px;
+ top: 0;
+ left: 0;
+ background: #fff;
+ border: solid 1px #999;
+ z-index: 1001; /* make sure it shows on fullscreen */
+}
+.mejs-contextmenu .mejs-contextmenu-separator {
+ height: 1px;
+ font-size: 0;
+ margin: 5px 6px;
+ background: #333;
+}
+
+.mejs-contextmenu .mejs-contextmenu-item {
+ font-family: Helvetica, Arial;
+ font-size: 12px;
+ padding: 4px 6px;
+ cursor: pointer;
+ color: #333;
+}
+.mejs-contextmenu .mejs-contextmenu-item:hover {
+ background: #2C7C91;
+ color: #fff;
+}
View
1 Joomla 1.6/pb_mediael/media/mediaelementplayer.min.css
@@ -0,0 +1 @@
+.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.png) top left no-repeat;}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,left top,left bottom,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) center center no-repeat;}.mejs-container .mejs-controls{position:absolute;background:none;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,left top,left bottom,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;background:0;font-family:Helvetica,Arial;border:0;}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.png) 0 0 no-repeat;}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;padding:auto 4px;}.mejs-container .mejs-controls .mejs-time span{font-size:11px;color:#fff;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,left top,left bottom,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#1E1E1E,endColorstr=#3C3C3C);}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,left top,left bottom,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#2C7C91,endColorstr=#4EB7D4);width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,left top,left bottom,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#FFFFFF,endColorstr=#C8C8C8);}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{visibility:hidden;position:absolute;display:block;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail:hover .mejs-time-float{visibility:visible;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,left top,left bottom,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,left top,left bottom,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.mejs-clear{clear:both;}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}
View
BIN Joomla 1.6/pb_mediael/media/silverlightmediaelement.xap
Binary file not shown.
View
260 Joomla 1.6/pb_mediael/pb_mediael.php
@@ -0,0 +1,260 @@
+<?php
+/**
+* @Copyright Copyright (C) 2011 Phil Banks
+* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
+**/
+
+defined( '_JEXEC' ) or die( 'Restricted access' );
+
+jimport('joomla.plugin.plugin');
+
+class plgContentBo_VideoJS extends JPlugin {
+
+ public function onContentPrepare($context, &$article, &$params, $limitstart) {
+
+ $app = JFactory::getApplication();
+
+ $pluginParams = $this->params;
+
+ if (!isset($GLOBALS['plg_pb_mediael'])) {
+ $GLOBALS['plg_pb_mediael'] = 1;
+ }
+
+ $hits = preg_match_all('#{pb_mediael\s*(.*?)}#s', $article->text, $matches);
+
+ if (!empty($hits)) {
+ $document =& JFactory::getDocument();
+
+ // Check if mediaelsentials script is loaded
+ $scripts = array_keys($document->_scripts);
+ $foundJqueryScripts = false;
+ for ($i = 0; $i<count($scripts); $i++) {
+ if (stripos($scripts[$i], 'jquery') !== false) {
+ $foundJqueryScripts = true;
+ }
+ }
+ if (!$foundJqueryScripts) {
+ $document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js');
+ }
+ $foundMediaelScripts = false;
+ for ($i = 0; $i<count($scripts); $i++) {
+ if (stripos($scripts[$i], 'mediaelement-and-player.min.js') !== false) {
+ $foundMediaelScripts = true;
+ }
+ }
+ if (!$foundMediaelScripts) {
+ $document->addScript(JURI::base().'plugins/content/pb_mediael/mediaelement-and-player.min.js');
+ }
+ $foundMediaelJScripts = false;
+ for ($i = 0; $i<count($scripts); $i++) {
+ if (stripos($scripts[$i], 'mediaelementplayer') !== false) {
+ $foundMediaeljsScripts = true;
+ }
+ }
+ if (!$foundMediaelJScripts) {
+
+
+ for ($i=$GLOBALS['plg_pb_mediael']; $i<$GLOBALS['plg_pb_mediael']+$hits; $i++) {
+ $document->addScriptDeclaration('
+ var $j = jQuery.noConflict();
+ $j(document).ready(function() {
+ //$j(".PbMediaEl").hide();
+ $j("video,audio").mediaelementplayer({
+ startVolume: '.$pluginParams->get('defaultVolume', '0.85').',
+ enableAutosize: true,
+ });
+ });
+ ');
+
+
+ for ($j=0; $j<$hits; $j++) {
+ $videoParams = $matches[1][$j];
+ $videoParamsList = contentPbMediaEl_getParams($videoParams, $pluginParams);
+ $html = contentPbMediaEl_createHTML($i+$j, $pluginParams, $videoParamsList);
+ $pattern = str_replace('[', '\[', $matches[0][$j]);
+ $pattern = str_replace(']', '\]', $pattern);
+ $pattern = str_replace('/', '\/', $pattern);
+ $row->text = preg_replace('/'.$pattern.'/', $html, $row->text, 1);
+ }
+ }
+
+ }
+
+
+ // Count instances
+ $GLOBALS['plg_pb_mediael'] += $hits;
+
+ // Check if mediaelsentials stylesheets are loaded
+ $styleSheets = array_keys($document->_styleSheets);
+
+ $foundmediaelStyles = false;
+ for ($i = 0; $i<count($styleSheets); $i++) {
+ if (stripos($styleSheets[$i], 'mediaelementplayer.min.css') !== false) {
+ $foundmediaelStyles = true;
+ }
+ }
+ if (!$foundmediaelStyles) {
+ $document->addStyleSheet(JURI::base().'plugins/content/pb_mediael/mediaelementplayer.min.css');
+ }
+
+ } else {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ protected function contentPbMediaEl_getParams($videoParams, $pluginParams) {
+
+ $videoParamsList['media'] = $pluginParams->get('media');
+ $videoParamsList['width'] = $pluginParams->get('width');
+ $videoParamsList['height'] = $pluginParams->get('height');
+ $videoParamsList['autoplay'] = $pluginParams->get('autoplay');
+ $videoParamsList['preload'] = $pluginParams->get('preload');
+ $videoParamsList['loop'] = $pluginParams->get('loop');
+ $videoParamsList['audio_mp3'] = $pluginParams->get('audio_mp3');
+ $videoParamsList['video_mp4'] = $pluginParams->get('video_mp4');
+ $videoParamsList['video_webm'] = $pluginParams->get('video_webm');
+ $videoParamsList['video_ogg'] = $pluginParams->get('video_ogg');
+ $videoParamsList['image'] = $pluginParams->get('image');
+ $videoParamsList['image_visibility'] = $pluginParams->get('image_visibility');
+ $videoParamsList['flash'] = $pluginParams->get('flash');
+
+ $items = explode(' ', $videoParams);
+
+ foreach ($items as $item) {
+ if ($item != '') {
+ $item = explode('=', $item);
+ $name = $item[0];
+ $value = strtr($item[1], array('['=>'', ']'=>''));
+ $videoParamsList[$name] = $value;
+ }
+ }
+
+ return $videoParamsList;
+ }
+
+ protected function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) {
+
+ $media = $videoParamsList['media'];
+ $width = $videoParamsList['width'];
+ $height = $videoParamsList['height'];
+ $autoplay = $videoParamsList['autoplay'];
+ $preload = $videoParamsList['preload'];
+ $loop = $videoParamsList['loop'];
+ $audio_mp3 = $videoParamsList['audio_mp3'];
+ $video_mp4 = $videoParamsList['video_mp4'];
+ $video_webm = $videoParamsList['video_webm'];
+ $video_ogg = $videoParamsList['video_ogg'];
+ $flash = $videoParamsList['flash'];
+ $image = $videoParamsList['image'];
+ $image_visibility = $videoParamsList['image_visibility'];
+ $wmode = $pluginParams->get('wmode', 'default');
+ $uri_flash = '';
+ $uri_image = '';
+
+ // Add URI for local flash video
+ if (stripos($flash, 'http://') === false) {
+ $uri_flash = JURI::base();
+ }
+
+ // Add URI for local flash image
+ if (stripos($image, 'http://') === false) {
+ $uri_image = JURI::base();
+ }
+
+ // Preload works for both HTML and Flash
+ if ($preload == "true" || $preload == "1") {
+ $preload_html = ' preload="auto"';
+ $preload_flash = '"autoBuffering":true';
+ } else {
+ $preload_html = ' preload="none"';
+ $preload_flash = '"autoBuffering":false';
+ }
+
+ // Autoplay works for both HTML and Flash
+ if ($autoplay == "true" || $autoplay == "1") {
+ $autoplay_html = ' autoplay="autoplay"';
+ $autoplay_flash = '"autoPlay":true';
+ } else {
+ $autoplay_html = '';
+ $autoplay_flash = '"autoPlay":false';
+ }
+
+ // Actually loop works only for HTML
+ if ($loop == "true" || $loop == "1") {
+ $loop_html = ' loop="loop"';
+ } else {
+ $loop_html = '';
+ }
+
+ // Poster image
+ if ($image_visibility == "true" || $image_visibility == "1") {
+ $poster_html = ' poster="'.$image;
+ } else {
+ $poster_html = '';
+ }
+
+ // HTML output
+ $html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'">';
+
+ if ($audio_mp3 != "") {
+ $html .= '<source src="'.$audio_mp3.'" type=\'audio/mp3\' />';
+ }
+
+ if ($video_mp4 != "") {
+ $html .= '<source src="'.$video_mp4.'" type="video/mp4; codecs=\'avc1.42E01E, mp4a.40.2\'" />';
+ }
+
+ if ($video_webm != "") {
+ $html .= '<source src="'.$video_webm.'" type=\'video/webm; codecs="vp8, vorbis"\' />';
+ }
+
+ if ($video_ogg != "") {
+ $html .= '<source src="'.$video_ogg.'" type=\'video/ogg; codecs="theora, vorbis"\' />';
+ }
+
+ if ($flash != "") {
+ $html .= '<object width="'.$width.'" height="'.$height.'" type="application/x-shockwave-flash" data="'.JURI::base().'plugins/content/pb_mediael/flashmediaelement.swf">
+ <param name="movie" value="'.JURI::base().'plugins/content/pb_mediael/flashmediaelement.swf" />';
+ if ($wmode != 'default') {
+ $html .= '<param name="wmode" value="'.$wmode.'" />';
+ }
+
+ $html .= '<param name="flashvars" value="controls=true&poster='.$uri_image.$image.'&file='.$uri_flash.$flash.'" />';
+
+ if ($image_visibility == "true" || $image_visibility == "1") {
+ $html .= '<img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="Poster Image" title="No video playback capabilities." />';
+ }
+
+ $html .= '</object>';
+ }
+
+ $html .='<p class="PbMediaEl"><strong>If you cannot see the media above - download here: </strong>';
+
+ if ($audio_mp3 != "") {
+ $html .= '<a href="'.$audio_mp3.'">MP3</a> ';
+ }
+
+ if ($video_mp4 != "") {
+ $html .= '<a href="'.$video_mp4.'">MP4</a> ';
+ }
+
+ if ($video_webm != "") {
+ $html .= '<a href="'.$video_webm.'">WebM</a> ';
+ }
+
+ if ($video_ogg != "") {
+ $html .= '<a href="'.$video_ogg.'">Ogg</a><br>';
+ }
+
+ $html .= '</p>
+ </div>';
+
+ $html .= '</'.$media.'>';
+
+
+ return $html;
+
+}
View
63 Joomla 1.6/pb_mediael/pb_mediael.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<extension version="1.6" type="plugin" method="upgrade" group="content">
+ <name>Content - pb:MediaEl</name>
+ <author>Phil Banks</author>
+ <creationDate>October 2011</creationDate>
+ <copyright>(C) 2011 Phil Banks. All rights reserved.</copyright>
+ <license>GNU/GPL http://www.gnu.org/copyleft/gpl.html</license>
+ <authorEmail>pb@mrc-lmb.cam.ac.uk</authorEmail>
+ <authorUrl>www2.mrc-lmb.cam.ac.uk</authorUrl>
+ <version>0.2</version>
+ <description>PLUGIN DESC</description>
+ <files>
+ <folder>media</folder>
+ <folder>language</folder>
+ <filename plugin="pb_mediael">pb_mediael.php</filename>
+ </files>
+ <languages>
+ <language tag="en-GB">language/en-GB.plg_content_pb_mediael.ini</language>
+ </languages>
+ <config>
+ <fields name="params">
+ <fieldset name="basic">
+ <field name="media" type="list" default="video" label="LABEL MEDIA" description="DESC MEDIA">
+ <option value="video">video</option>
+ <option value="audio">audio</option>
+ </field>
+ <field name="@spacer" type="spacer" default="DEFAULT AUDIO PARAMETER" label="" description="" />
+ <field name="audio_mp3" type="text" default="" label="LABEL AUDIO MP3" description="DESC AUDIO MP3" size="40" />
+ <field name="@spacer" type="spacer" default="DEFAULT VIDEO PARAMETER" label="" description="" />
+ <field name="video_mp4" type="text" default="" label="LABEL VIDEO MP4" description="DESC VIDEO MP4" size="40" />
+ <field name="video_webm" type="text" default="" label="LABEL VIDEO WEBM" description="DESC VIDEO WEBM" size="40" />
+ <field name="video_ogg" type="text" default="" label="LABEL VIDEO OGG" description="DESC VIDEO OGG" size="40" />
+ <field name="flash" type="text" default="" label="LABEL FLASH" description="DESC FLASH" size="40" />
+ <field name="image" type="text" default="" label="LABEL IMAGE" description="DESC IMAGE" size="40" />
+ <field name="image_visibility" type="radio" default="1" label="LABEL IMAGE VISIBILITY" description="DESC IMAGE VISIBILITY">
+ <option value="0">off</option>
+ <option value="1">on</option>
+ </field>
+ <field name="@spacer" type="spacer" default="DEFAULT PLAYER PARAMETER" label="" description="" />
+ <field name="width" type="text" default="640" label="LABEL WIDTH" description="DESC WIDTH" size="3" />
+ <field name="height" type="text" default="480" label="LABEL HEIGHT" description="DESC HEIGHT" size="3" />
+ <field name="autoplay" type="radio" default="0" label="LABEL AUTOPLAY" description="DESC AUTOPLAY">
+ <option value="0">off</option>
+ <option value="1">on</option>
+ </field>
+ <field name="preload" type="radio" default="1" label="LABEL PRELOAD" description="DESC PRELOAD">
+ <option value="0">off</option>
+ <option value="1">on</option>
+ </field>
+ <field name="loop" type="radio" default="0" label="LABEL LOOP" description="DESC LOOP">
+ <option value="0">off</option>
+ <option value="1">on</option>
+ </field>
+ <field name="defaultVolume" type="text" default="0.85" label="LABEL DEFAULT VOLUME" description="DESC DEFAULT VOLUME" size="3" />
+ <field name="wmode" type="list" default="default" label="LABEL WMODE" description="DESC WMODE">
+ <option value="default">default</option>
+ <option value="opaque">opaque</option>
+ <option value="transparent">transparent</option>
+ </field>
+ </fieldset>
+ </fields>
+ </config>
+</extension>
View
13 README.markdown
@@ -39,6 +39,15 @@ If you don't want to encode multiple versions of a movie, MP4 can be played in a
Coming Next
-----------
-- Joomla 1.6 version.
- Clean up and check code.
-- Try to improve flexibilty.
+- Try to improve flexibilty.
+
+Changelog
+---------
+0.2 (2011-10-13)
+
+- Added support for Joomla v1.6 (untested)
+
+0.1 (2011-10-13)
+
+- First Release

0 comments on commit d66cefa

Please sign in to comment.