/* * Media Element * HTML5 and Shim * http://mediaelementjs.com/ * * Creates a JavaScript object that mimics HTML5 media object * for browsers that don't understand HTML5 or can't play the provided codec * Can also play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3 * * Copyright 2010, John Dyer * Dual licensed under the MIT or GPL Version 2 licenses. * * Version: 1.1.2 */ var html5=html5||{};html5.meIndex=0;html5.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/mp4","audio/m4a","audio/mp3"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","audio/flv","audio/mp3","audio/m4a","audio/mp3"]}]};html5.PluginDetector={hasPluginVersion:function(c,a){var b=this.plugins[c];a[1]=a[1]||0;a[2]=a[2]||0;return(b[0]>a[0]||(b[0]==a[0]&&b[1]>a[1])||(b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]))?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(d,c,e,a,b){this.plugins[d]=this.detectPlugin(c,e,a,b)},detectPlugin:function(h,b,c,l){var j=[0,0,0],k,f,a;if(typeof(this.nav.plugins)!="undefined"&&typeof this.nav.plugins[h]=="object"){k=this.nav.plugins[h].description;if(k&&!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){j=k.replace(h,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(f=0;fx';return b.firstChild.href},getScriptPath:function(b){var f=0,e,g="",d="",c,a=document.getElementsByTagName("script");for(;f-1){g=c.substring(0,c.indexOf(d));break}}if(g!==""){break}}return g},secondsToTimeCode:function(b){b=Math.round(b);var a=Math.floor(b/60);a=(a>=10)?a:"0"+a;b=Math.floor(b%60);b=(b>=10)?b:"0"+b;return a+":"+b}};html5.HtmlMediaElement={pluginType:"native",setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},setSrc:function(a){if(typeof a=="string"){this.src=a}else{var b,c;for(b=0;b':'Download File';c.parentNode.insertBefore(a,c);c.style.display="none";b.error(c)},createPlugin:function(i,m,b,f,h,j,g){var d=1,k=1,e="me_"+f+"_"+(html5.meIndex++),l=new html5.PluginMediaElement(e,f),c=document.createElement("div"),a;if(b){d=(m.videoWidth>0)?m.videoWidth:(i.getAttribute("width")!==null)?i.getAttribute("width"):m.defaultVideoWidth;k=(m.videoHeight>0)?m.videoHeight:(i.getAttribute("height")!==null)?i.getAttribute("height"):m.defaultVideoHeight}else{if(m.enablePluginDebug){d=320;k=240}}l.success=m.success;html5.MediaPluginBridge.registerPluginElement(e,l,i);c.className="me-plugin";i.parentNode.insertBefore(c,i);a=["id="+e,"poster="+j,"isvideo="+b.toString(),"autoplay="+g,"width="+d,"timerrate="+m.timerRate,"height="+k];if(h!==null){a.push("file="+h)}if(m.enablePluginDebug){a.push("debug=true")}switch(f){case"silverlight":c.innerHTML='';break;case"flash":if(html5.MediaFeatures.isIE){c.outerHTML=''}else{c.innerHTML=''}break}i.style.display="none"},updateNative:function(c,b){for(var a in html5.HtmlMediaElement){c[a]=html5.HtmlMediaElement[a]}b.success(c,c)}};window.html5=html5;window.MediaElement=html5.MediaElement;