Changeset 337256
- Timestamp:
- 01/25/2011 10:06:27 PM (15 years ago)
- Location:
- media-element-html5-video-and-audio-player/trunk
- Files:
-
- 10 edited
-
mediaelement-js-wp.php (modified) (6 diffs)
-
mediaelement/bigplay.png (modified) (previous)
-
mediaelement/controls.png (modified) (previous)
-
mediaelement/flashmediaelement.swf (modified) (previous)
-
mediaelement/mediaelement-and-player.js (modified) (18 diffs)
-
mediaelement/mediaelement-and-player.min.js (modified) (4 diffs)
-
mediaelement/mediaelementplayer.css (modified) (1 diff)
-
mediaelement/mediaelementplayer.min.css (modified) (1 diff)
-
mediaelement/silverlightmediaelement.xap (modified) (previous)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-element-html5-video-and-audio-player/trunk/mediaelement-js-wp.php
r332519 r337256 2 2 /** 3 3 * @package MediaElementJS 4 * @version 2.0. 44 * @version 2.0.5 5 5 */ 6 6 /* … … 9 9 Description: A video and audio plugin for WordPress built on MediaElement HTML5 video and audio player library. Embeds video or audio in your post or page using HTML5 with Flash or Silverlight fallback support for non-HTML5 browsers. Video support: MP4, Ogg, WebM, WMV. Audio support: MP3, WMA, WAV 10 10 Author: John Dyer 11 Version: 2.0. 411 Version: 2.0.5 12 12 Author URI: http://johndyer.me/ 13 13 License: GPLv3, MIT … … 137 137 138 138 echo <<<_end_ 139 <link rel="stylesheet" href="{$dir}mediaelementplayer.min.css" type="text/css" media="screen" charset="utf-8"/>139 <link rel="stylesheet" href="{$dir}mediaelementplayer.min.css" type="text/css" /> 140 140 <script src="{$dir}mediaelement-and-player.min.js" type="text/javascript"></script> 141 141 _end_; … … 199 199 200 200 if ($src) { 201 $src_attribute = 'src="'. $src.'"';202 $flash_src = $src;201 $src_attribute = 'src="'.htmlspecialchars($src).'"'; 202 $flash_src = htmlspecialchars($src); 203 203 } 204 204 205 205 if ($mp4) { 206 $mp4_source = '<source src="'. $mp4.'" type="'.$tagName.'/mp4" />';207 $flash_src = $mp4;206 $mp4_source = '<source src="'.htmlspecialchars($mp4).'" type="'.$tagName.'/mp4" />'; 207 $flash_src = htmlspecialchars($mp4); 208 208 } 209 209 210 210 if ($mp3) { 211 $mp3_source = '<source src="'. $mp3.'" type="'.$tagName.'/mp3" />';212 $flash_src = $mp3;211 $mp3_source = '<source src="'.htmlspecialchars($mp3).'" type="'.$tagName.'/mp3" />'; 212 $flash_src = htmlspecialchars($mp3); 213 213 } 214 214 215 215 if ($webm) { 216 $webm_source = '<source src="'. $webm.'" type="'.$tagName.'/webm" />';216 $webm_source = '<source src="'.htmlspecialchars($webm).'" type="'.$tagName.'/webm" />'; 217 217 } 218 218 219 219 if ($ogg) { 220 $ogg_source = '<source src="'. $ogg.'" type="'.$tagName.'/ogg" />';220 $ogg_source = '<source src="'.htmlspecialchars($ogg).'" type="'.$tagName.'/ogg" />'; 221 221 } 222 222 223 223 if ($flv) { 224 $flv_source = '<source src="'. $flv.'" type="'.$tagName.'/flv" />';224 $flv_source = '<source src="'.htmlspecialchars($flv).'" type="'.$tagName.'/flv" />'; 225 225 } 226 226 227 227 if ($wmv) { 228 $wmv_source = '<source src="'. $wmv.'" type="'.$tagName.'/wmv" />';228 $wmv_source = '<source src="'.htmlspecialchars($wmv).'" type="'.$tagName.'/wmv" />'; 229 229 } 230 230 … … 234 234 } 235 235 236 if ($width ) {236 if ($width && $tagName == 'video') { 237 237 $width_attribute = 'width="'.$width.'"'; 238 238 } 239 239 240 if ($height ) {240 if ($height && $tagName == 'video') { 241 241 $height_attribute = 'height="'.$height.'"'; 242 242 } 243 243 244 244 if ($poster) { 245 $poster_attribute = 'poster="'. $poster.'"';245 $poster_attribute = 'poster="'.htmlspecialchars($poster).'"'; 246 246 } 247 247 … … 283 283 <object width="320" height="240" type="application/x-shockwave-flash" data="{$dir}flashmediaelement.swf"> 284 284 <param name="movie" value="{$dir}flashmediaelement.swf" /> 285 <param name="flashvars" value="controls=true& file={$flash_src}" />285 <param name="flashvars" value="controls=true&file={$flash_src}" /> 286 286 </object> 287 287 </{$tagName}> -
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelement-and-player.js
r332519 r337256 16 16 17 17 // version number 18 mejs.version = '2.0. 4';18 mejs.version = '2.0.5'; 19 19 20 20 // player number (for missing, same id attr) … … 240 240 this.volume = volume; 241 241 }, 242 243 // for parity with the plugin versions 244 stop: function () { 245 this.pause(); 246 }, 242 247 243 248 // This can be a url string … … 319 324 } 320 325 }, 326 stop: function () { 327 if (this.pluginApi != null) { 328 this.pluginApi.stopMedia(); 329 this.paused = true; 330 } 331 }, 321 332 canPlayType: function(type) { 322 333 var i, … … 552 563 autoplay = htmlMediaElement.getAttribute('autoplay'), 553 564 preload = htmlMediaElement.getAttribute('preload'), 565 controls = htmlMediaElement.getAttribute('controls'), 554 566 prop; 555 567 … … 563 575 preload = (typeof preload == 'undefined' || preload === null || preload === 'false') ? 'none' : preload; 564 576 autoplay = !(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false'); 577 controls = !(typeof controls == 'undefined' || controls === null || controls === 'false'); 565 578 566 579 // test for HTML5 and plugin capabilities … … 572 585 } else if (playback.method !== '') { 573 586 // create plugin to mimic HTMLMediaElement 574 this.createPlugin( htmlMediaElement, options, isVideo, playback.method, (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) .replace('&','%26') : '', poster, autoplay, preload);587 this.createPlugin( htmlMediaElement, options, isVideo, playback.method, (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '', poster, autoplay, preload, controls); 575 588 } else { 576 589 // boo, no HTML5, no Flash, no Silverlight. … … 706 719 }, 707 720 708 createPlugin:function(htmlMediaElement, options, isVideo, pluginType, mediaUrl, poster, autoplay, preload ) {721 createPlugin:function(htmlMediaElement, options, isVideo, pluginType, mediaUrl, poster, autoplay, preload, controls) { 709 722 710 723 var width = 1, … … 748 761 initVars = [ 749 762 'id=' + pluginid, 750 'poster=' + poster,751 763 'isvideo=' + ((isVideo) ? "true" : "false"), 752 764 'autoplay=' + ((autoplay) ? "true" : "false"), … … 769 781 initVars.push('smoothing=true'); 770 782 } 783 if (controls) { 784 initVars.push('controls=true'); // shows controls in the plugin if desired 785 } 771 786 772 787 switch (pluginType) { … … 792 807 'id="' + pluginid + '" width="' + width + '" height="' + height + '">' + 793 808 '<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' + 794 '<param name="flashvars" value="' + initVars.join('& ') + '" />' +809 '<param name="flashvars" value="' + initVars.join('&') + '" />' + 795 810 '<param name="quality" value="high" />' + 796 811 '<param name="bgcolor" value="#000000" />' + … … 912 927 913 928 t.$media = $($media); 929 930 // check for existing player 931 if (t.$media[0].player) { 932 return t.$media[0].player; 933 } else { 934 t.$media[0].player = t; 935 } 936 914 937 t.options = $.extend({},mejs.MepDefaults,o); 915 938 t.isVideo = (t.$media[0].tagName.toLowerCase() == 'video'); 939 916 940 917 941 if (mf.isiPad || mf.isiPhone) { … … 930 954 // don't do the rest 931 955 return; 932 } else if (mf.isAndroid && t.isVideo) { 933 934 // Android fails when there are multiple types 935 // <video> 936 // <source src="file.mp4" type="video/mp4" /> 937 // <source src="file.webm" type="video/webm" /> 938 // </video> 939 if (t.$media.find('source').length > 0) { 940 // find an mp4 and make it the root element source 941 t.$media[0].src = t.$media.find('source[src$="mp4"]').attr('src'); 942 } 943 944 // attach a click event to the video and hope Android can play it 945 t.$media.click(function() { 946 t.$media[0].play(); 947 }); 948 949 return; 956 } else if (mf.isAndroid) { 957 958 if (t.isVideo) { 959 // Android fails when there are multiple types 960 // <video> 961 // <source src="file.mp4" type="video/mp4" /> 962 // <source src="file.webm" type="video/webm" /> 963 // </video> 964 if (t.$media.find('source').length > 0) { 965 // find an mp4 and make it the root element source 966 t.$media[0].src = t.$media.find('source[src$="mp4"]').attr('src'); 967 } 968 969 // attach a click event to the video and hope Android can play it 970 t.$media.click(function() { 971 t.$media[0].play(); 972 }); 973 974 return; 975 } else { 976 // audio? 977 // 2.1 = no support 978 // 2.2 = Flash support 979 // 2.3 = Native HTML5 980 } 950 981 951 982 } else { … … 1020 1051 feature; 1021 1052 1053 // make sure it can't create itself again if a plugin reloads 1054 if (this.created) 1055 return; 1056 else 1057 this.created = true; 1058 1022 1059 t.media = media; 1023 1060 t.domNode = domNode; … … 1104 1141 handleError: function(e) { 1105 1142 // Tell user that the file cannot be played 1143 if (this.options.error) { 1144 this.options.error(e); 1145 } 1106 1146 }, 1107 1147 … … 1243 1283 jQuery.fn.mediaelementplayer = function (options) { 1244 1284 return this.each(function () { 1245 returnnew mejs.MediaElementPlayer($(this), options);1285 new mejs.MediaElementPlayer($(this), options); 1246 1286 }); 1247 1287 }; … … 1311 1351 timefloatcurrent = controls.find('.mejs-time-float-current'), 1312 1352 setProgress = function(e) { 1353 if (!e) { 1354 return; 1355 } 1356 1313 1357 var 1314 1358 target = e.target, 1315 1359 percent = null; 1316 1360 1361 // newest HTML5 spec has buffered array (FF4, Webkit) 1362 if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) { 1363 // TODO: account for a real array with multiple values (only Firefox 4 has this so far) 1364 percent = target.buffered.end(0) / target.duration; 1365 } 1317 1366 // Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end() 1318 1367 // to be anything other than 0. If the byte count is available we use this instead. 1319 1368 // Browsers that support the else if do not seem to have the bufferedBytes value and 1320 // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8. 1321 if (target && target.bytesTotal != undefined && target.bytesTotal > 0 && target.bufferedBytes != undefined) {1369 // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8. 1370 else if (target && target.bytesTotal != undefined && target.bytesTotal > 0 && target.bufferedBytes != undefined) { 1322 1371 percent = target.bufferedBytes / target.bytesTotal; 1323 1372 } 1324 // need to account for a real array with multiple values (only Firefox 4 has this so far) 1325 else if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) { 1326 percent = target.buffered.end(0) / target.duration; 1327 } 1328 1373 // Firefox 3 with an Ogg file seems to go this way 1374 else if (e.lengthComputable && e.total != 0) { 1375 percent = e.loaded/e.total; 1376 } 1377 1378 // finally update the progress bar 1329 1379 if (percent !== null) { 1380 percent = Math.min(1, Math.max(0, percent)); 1330 1381 // update loaded bar 1331 1382 loaded.width(total.width() * percent); … … 1358 1409 if (x > offset.left && x <= width + offset.left && media.duration) { 1359 1410 percentage = ((x - offset.left) / width); 1360 newTime = percentage * media.duration;1411 newTime = (percentage <= 0.02) ? 0 : percentage * media.duration; 1361 1412 1362 1413 // seek to where the mouse is … … 1558 1609 1559 1610 // set initial volume 1560 //player.options.startVolume = Math.min(Math.max(0,player.options.startVolume),1); 1611 //player.options.startVolume = Math.min(Math.max(0,player.options.startVolume),1); 1612 positionVolumeHandle(player.options.startVolume); 1561 1613 media.setVolume(player.options.startVolume); 1562 1614 } -
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelement-and-player.min.js
r332519 r337256 11 11 * Dual licensed under the MIT or GPL Version 2 licenses. 12 12 * 13 */var mejs=mejs||{};mejs.version="2.0. 4";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"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","audio/flv","audio/mp3","audio/m4a"]}]};13 */var mejs=mejs||{};mejs.version="2.0.5";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"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","audio/flv","audio/mp3","audio/m4a"]}]}; 14 14 mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.split("&").join("&").split("<").join("<").split('"').join(""")},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="",f,g=document.getElementsByTagName("script");b<g.length;b++){f=g[b].src;for(c=0;c<a.length;c++){e=a[c];if(f.indexOf(e)>-1){d=f.substring(0, 15 15 f.indexOf(e));break}}if(d!=="")break}return d},secondsToTimeCode:function(a){a=Math.round(a);var b=Math.floor(a/60);b=b>=10?b:"0"+b;a=Math.floor(a%60);a=a>=10?a:"0"+a;return b+":"+a}}; … … 20 20 if(mejs.PluginDetector.ua.match(/Android 2\.[12]/)!==null)HTMLMediaElement.canPlayType=function(a){return a.match(/video\/(mp4|m4v)/gi)!==null?"probably":""}; 21 21 mejs.MediaFeatures={init:function(){var a=mejs.PluginDetector.nav,b=mejs.PluginDetector.ua,c,d=["source","track","audio","video"];this.isiPad=b.match(/iPad/i)!==null;this.isiPhone=b.match(/iPhone/i)!==null;this.isAndroid=b.match(/Android/i)!==null;this.isIE=a.appName.indexOf("Microsoft")!=-1;this.isChrome=b.match(/Chrome/gi)!==null;for(a=0;a<d.length;a++)c=document.createElement(d[a]);this.hasNativeFullScreen=typeof c.webkitEnterFullScreen!=="undefined";if(this.isChrome)this.hasNativeFullScreen=false}}; 22 mejs.MediaFeatures.init();mejs.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<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={}}; 23 mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,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}},canPlayType:function(a){var b, 24 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)}}}}, 25 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!= 26 null&&this.pluginApi.setFullscreen(a)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},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)}}}; 22 mejs.MediaFeatures.init();mejs.HtmlMediaElement={pluginType:"native",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){if(typeof a=="string")this.src=a;else{var b,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}}; 23 mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={}}; 24 mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,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!= 25 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)); 26 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, 27 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)},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)}}}; 27 28 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.success&&b.success(b,c)},fireEvent:function(a, 28 29 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)}}; 29 30 mejs.MediaElementDefaults={enablePluginDebug:false,plugins:["flash","silverlight"],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,success:function(){},error:function(){}}; 30 31 mejs.MediaElement=function(a,b){mejs.HtmlMediaElementShim.create(a,b)}; 31 mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase()=="video",f=typeof d.canPlayType!="undefined",g={method:"",url:""}, i=d.getAttribute("poster"),h=d.getAttribute("autoplay"),j=d.getAttribute("preload"),k;for(k in b)c[k]=b[k];i=typeof i=="undefined"||i===null?"":i;j=typeof j=="undefined"||j===null||j==="false"?"none":j;h=!(typeof h=="undefined"||h===null||h==="false");g=this.determinePlayback(d,32 c,e,f);if(g.method=="native")this.updateNative(d,c,h,j,g);else g.method!==""?this.createPlugin(d,c,e,g.method,g.url!==null?mejs.Utility.absolutizeUrl(g.url).replace("&","%26"):"",i,h,j):this.createErrorMessage(d,c,g.url!==null?mejs.Utility.absolutizeUrl(g.url):"",i)},determinePlayback:function(a,b,c,d){var e=[],f,g,i,h={method:"",url:""};f=a.getAttribute("src");var j,k;if(typeof b.type!="undefined"&&b.type!=="")e.push({type:b.type,url:null});else if(f!="undefined"&&f!==null){i=a.getAttribute("src");33 g=this.checkType(i,a.getAttribute("type"),c);e.push({type:g,url:i})}else for(f=0;f<a.childNodes.length;f++){g=a.childNodes[f];if(g.nodeType==1&&g.tagName.toLowerCase()=="source"){i=g.getAttribute("src");g=this.checkType(i,g.getAttribute("type"),c);e.push({type:g,url:i})}}if(d)for(f=0;f<e.length;f++)if(a.canPlayType(e[f].type).replace(/no/,"")!==""){h.method="native";h.url=e[f].url;return h}for(f=0;f<e.length;f++){g=e[f].type;for(a=0;a<b.plugins.length;a++){i=b.plugins[a];j=mejs.plugins[i];for(c=0;c< 34 j.length;c++){k=j[c];if(mejs.PluginDetector.hasPluginVersion(i,k.version))for(d=0;d<k.types.length;d++)if(g==k.types[d]){h.method=i;h.url=e[f].url;return h}}}}if(h.method==="")h.url=e[0].url;return h},checkType:function(a,b,c){if(a&&!b){a=a.substring(a.lastIndexOf(".")+1);return(c?"video":"audio")+"/"+a}else return b},createErrorMessage:function(a,b,c,d){var e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=a.width+"px";e.style.height=a.height+"px"}catch(f){}e.innerHTML=35 d!==""?'<a href="'+c+'"><img src="'+d+'" /></a>':'<a href="'+c+'"><span>Download File</span></a>';a.parentNode.insertBefore(e,a);a.style.display="none";b.error(a)},createPlugin:function(a,b,c,d,e,f,g,i){var h=1,j=1,k="me_"+d+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(k,d,e),m=document.createElement("div"),l;for(l=a.parentNode;l!==null&&l.tagName.toLowerCase()!="body";){if(l.parentNode.tagName.toLowerCase()=="p"){l.parentNode.parentNode.insertBefore(l,l.parentNode);break}l=l.parentNode}if(c){h= 36 b .videoWidth>0?b.videoWidth:a.getAttribute("width")!==null?a.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:a.getAttribute("height")!==null?a.getAttribute("height"):b.defaultVideoHeight}else if(b.enablePluginDebug){h=320;j=240}n.success=b.success;mejs.MediaPluginBridge.registerPluginElement(k,n,a);m.className="me-plugin";a.parentNode.insertBefore(m,a);c=["id="+k,"poster="+f,"isvideo="+(c?"true":"false"),"autoplay="+(g?"true":"false"),"preload="+i,"width="+h,"timerrate="+37 b.timerRate,"height="+j];if(e!==null)d=="flash"?c.push("file="+mejs.Utility.encodeUrl(e)):c.push("file="+e);b.enablePluginDebug&&c.push("debug=true");b.enablePluginSmoothing&&c.push("smoothing=true");switch(d){case "silverlight":m.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+k+'" name="'+k+'" width="'+h+'" height="'+j+'"><param name="initParams" value="'+c.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="'+38 b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){d=document.createElement("div"); m.appendChild(d);d.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+k+'" width="'+h+'" height="'+j+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+c.join("&")+'" /><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 m.innerHTML=39 '<embed id="'+ k+'" name="'+k+'" 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+"?"+c.join("&")+'" width="'+h+'" height="'+j+'"></embed>'}a.style.display="none"},updateNative:function(a,b,c,d,e){for(var f in mejs.HtmlMediaElement)a[f]=mejs.HtmlMediaElement[f];if(mejs.MediaFeatures.isChrome&&d==32 mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase()=="video",f=typeof d.canPlayType!="undefined",g={method:"",url:""},h=d.getAttribute("poster"),j=d.getAttribute("autoplay"),k=d.getAttribute("preload"),i=d.getAttribute("controls"),m;for(m in b)c[m]=b[m];h=typeof h=="undefined"||h===null?"":h;k=typeof k=="undefined"||k===null||k==="false"?"none":k;j=!(typeof j=="undefined"||j===null||j==="false"); 33 i=!(typeof i=="undefined"||i===null||i==="false");g=this.determinePlayback(d,c,e,f);if(g.method=="native")this.updateNative(d,c,j,k,g);else g.method!==""?this.createPlugin(d,c,e,g.method,g.url!==null?mejs.Utility.absolutizeUrl(g.url):"",h,j,k,i):this.createErrorMessage(d,c,g.url!==null?mejs.Utility.absolutizeUrl(g.url):"",h)},determinePlayback:function(a,b,c,d){var e=[],f,g,h,j={method:"",url:""};f=a.getAttribute("src");var k,i;if(typeof b.type!="undefined"&&b.type!=="")e.push({type:b.type,url:null}); 34 else if(f!="undefined"&&f!==null){h=a.getAttribute("src");g=this.checkType(h,a.getAttribute("type"),c);e.push({type:g,url:h})}else for(f=0;f<a.childNodes.length;f++){g=a.childNodes[f];if(g.nodeType==1&&g.tagName.toLowerCase()=="source"){h=g.getAttribute("src");g=this.checkType(h,g.getAttribute("type"),c);e.push({type:g,url:h})}}if(d)for(f=0;f<e.length;f++)if(a.canPlayType(e[f].type).replace(/no/,"")!==""){j.method="native";j.url=e[f].url;return j}for(f=0;f<e.length;f++){g=e[f].type;for(a=0;a<b.plugins.length;a++){h= 35 b.plugins[a];k=mejs.plugins[h];for(c=0;c<k.length;c++){i=k[c];if(mejs.PluginDetector.hasPluginVersion(h,i.version))for(d=0;d<i.types.length;d++)if(g==i.types[d]){j.method=h;j.url=e[f].url;return j}}}}if(j.method==="")j.url=e[0].url;return j},checkType:function(a,b,c){if(a&&!b){a=a.substring(a.lastIndexOf(".")+1);return(c?"video":"audio")+"/"+a}else return b},createErrorMessage:function(a,b,c,d){var e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=a.width+"px";e.style.height= 36 a.height+"px"}catch(f){}e.innerHTML=d!==""?'<a href="'+c+'"><img src="'+d+'" /></a>':'<a href="'+c+'"><span>Download File</span></a>';a.parentNode.insertBefore(e,a);a.style.display="none";b.error(a)},createPlugin:function(a,b,c,d,e,f,g,h,j){var k=f=1,i="me_"+d+"_"+mejs.meIndex++,m=new mejs.PluginMediaElement(i,d,e),n=document.createElement("div"),l;for(l=a.parentNode;l!==null&&l.tagName.toLowerCase()!="body";){if(l.parentNode.tagName.toLowerCase()=="p"){l.parentNode.parentNode.insertBefore(l,l.parentNode); 37 break}l=l.parentNode}if(c){f=b.videoWidth>0?b.videoWidth:a.getAttribute("width")!==null?a.getAttribute("width"):b.defaultVideoWidth;k=b.videoHeight>0?b.videoHeight:a.getAttribute("height")!==null?a.getAttribute("height"):b.defaultVideoHeight}else if(b.enablePluginDebug){f=320;k=240}m.success=b.success;mejs.MediaPluginBridge.registerPluginElement(i,m,a);n.className="me-plugin";a.parentNode.insertBefore(n,a);c=["id="+i,"isvideo="+(c?"true":"false"),"autoplay="+(g?"true":"false"),"preload="+h,"width="+ 38 f,"timerrate="+b.timerRate,"height="+k];if(e!==null)d=="flash"?c.push("file="+mejs.Utility.encodeUrl(e)):c.push("file="+e);b.enablePluginDebug&&c.push("debug=true");b.enablePluginSmoothing&&c.push("smoothing=true");j&&c.push("controls=true");switch(d){case "silverlight":n.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+i+'" name="'+i+'" width="'+f+'" height="'+k+'"><param name="initParams" value="'+c.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="'+ 39 b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){d=document.createElement("div");n.appendChild(d);d.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+i+'" width="'+f+'" height="'+k+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+c.join("&")+'" /><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 n.innerHTML= 40 '<embed id="'+i+'" name="'+i+'" 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+"?"+c.join("&")+'" width="'+f+'" height="'+k+'"></embed>'}a.style.display="none"},updateNative:function(a,b,c,d,e){for(var f in mejs.HtmlMediaElement)a[f]=mejs.HtmlMediaElement[f];if(mejs.MediaFeatures.isChrome&&d== 40 41 "none"&&c!==""){a.src="";a.load();a.canceledPreload=true;a.addEventListener("play",function(){if(a.canceledPreload){a.src=e.url;a.load();a.play();a.canceledPreload=false}},false)}b.success(a,a)}};window.mejs=mejs;window.MediaElement=mejs.MediaElement; 41 42 … … 50 51 * Dual licensed under the MIT or GPL Version 2 licenses. 51 52 * 52 */(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:true,features:["playpause","current","progress","duration","tracks","volume","fullscreen"]};mejs.mepIndex=0;mejs.MediaElementPlayer=function(a,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,c);var b=this,d=mejs.MediaFeatures;b.$media=f(a); b.options=f.extend({},mejs.MepDefaults,53 c);b.isVideo=b.$media[0].tagName.toLowerCase()=="video";if(d.isiPad||d.isiPhone){b.$media.attr("controls","controls");b.$media.removeAttr("poster");if(d.isiPad&&b.$media[0].getAttribute("autoplay")!==null){b.$media[0].load();b.$media[0].play()}}else if(d.isAndroid&&b.isVideo){if(b.$media.find("source").length>0)b.$media[0].src=b.$media.find('source[src$="mp4"]').attr("src");b.$media.click(function(){b.$media[0].play()})}else{b.$media.removeAttr("controls");b.init();return b}};mejs.MediaElementPlayer.prototype= 54 {init:function(){var a=this,c=f.extend(true,{},a.options,{success:function(b,d){a.meReady(b,d)},error:function(b){a.handleError(b)}});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);a.container.find(".mejs-mediaelement").append(a.$media);a.controls= 55 a.cont ainer.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);c.pluginWidth=a.height;56 c.pluginHeight=a.width;mejs.MediaElement(a.$media[0],c)},meReady:function(a,c){var b=this,d,e;b.media=a;b.domNode=c;b.buildposter(b,b.controls,b.layers,b.media);b.buildoverlay(b,b.controls,b.layers,b.media);b.findTracks();for(d in b.options.features){e=b.options.features[d];if(b["build"+e])try{b["build"+e](b,b.controls,b.layers,b.media)}catch(h){}}b.setPlayerSize(b.width,b.height);b.setControlsSize();if(b.isVideo){b.container.bind("mouseenter",function(){b.controls.css("visibility","visible");b.controls.stop(true,57 true).fadeIn(200)}).bind("mouseleave",function(){b.media.paused||b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});b.options.enableAutosize&&b.media.addEventListener("loadedmetadata",function(i){if(b.options.videoHeight<=0&&b.$media[0].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)}},58 false)}b.media.addEventListener("ended",function(){b.media.setCurrentTime(0);b.media.pause();b.options.loop?b.media.play():b.controls.css("visibility","visible")},true);setTimeout(function(){b.setControlsSize();b.setPlayerSize(b.width,b.height)},50);b.options.success&&b.options.success(b.media,b.domNode)},handleError:function(){},setPlayerSize:function(a,c){this.width=parseInt(a,10);this.height=parseInt(c,10);this.container.width(this.width).height(this.height);this.layers.children("div.mejs-layer").width(this.width).height(this.height)}, 59 setControlsSize:function(){var a=0,c=0,b=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");b.siblings().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()))},buildposter:function(a,c,b,d){var e=f('<div class="mejs-poster mejs-layer"><img /></div>').appendTo(b);c=a.$media.attr("poster");if(a.options.poster!="")e.find("img").attr("src", 60 a.options.poster);else c!==""&&c!=null?e.find("img").attr("src",c):e.hide();d.addEventListener("play",function(){e.hide()},false)},buildoverlay:function(a,c,b,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-button"></div></div>').appendTo(b).click(function(){d.paused?d.play():d.pause()});d.addEventListener("play",function(){e.hide()},false);d.addEventListener("pause",function(){e.show()},false)}},findTracks:function(){var a=this,c=a.$media.find("track");a.tracks= 61 [];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},62 set Volume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)}};jQuery.fn.mediaelementplayer=function(a){return this.each(function(){returnnew mejs.MediaElementPlayer(f(this),a)})};window.MediaElementPlayer=mejs.MediaElementPlayer})(jQuery);53 */(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:true,features:["playpause","current","progress","duration","tracks","volume","fullscreen"]};mejs.mepIndex=0;mejs.MediaElementPlayer=function(a,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,c);var b=this,d=mejs.MediaFeatures;b.$media=f(a);if(b.$media[0].player)return b.$media[0].player; 54 else b.$media[0].player=b;b.options=f.extend({},mejs.MepDefaults,c);b.isVideo=b.$media[0].tagName.toLowerCase()=="video";if(d.isiPad||d.isiPhone){b.$media.attr("controls","controls");b.$media.removeAttr("poster");if(d.isiPad&&b.$media[0].getAttribute("autoplay")!==null){b.$media[0].load();b.$media[0].play()}}else{if(d.isAndroid){if(b.isVideo){if(b.$media.find("source").length>0)b.$media[0].src=b.$media.find('source[src$="mp4"]').attr("src");b.$media.click(function(){b.$media[0].play()});return}}else b.$media.removeAttr("controls"); 55 b.init();return b}};mejs.MediaElementPlayer.prototype={init:function(){var a=this,c=f.extend(true,{},a.options,{success:function(b,d){a.meReady(b,d)},error:function(b){a.handleError(b)}});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);a.container.find(".mejs-mediaelement").append(a.$media); 56 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);c.pluginWidth= 57 a.height;c.pluginHeight=a.width;mejs.MediaElement(a.$media[0],c)},meReady:function(a,c){var b=this,d,e;if(!this.created){this.created=true;b.media=a;b.domNode=c;b.buildposter(b,b.controls,b.layers,b.media);b.buildoverlay(b,b.controls,b.layers,b.media);b.findTracks();for(d in b.options.features){e=b.options.features[d];if(b["build"+e])try{b["build"+e](b,b.controls,b.layers,b.media)}catch(g){}}b.setPlayerSize(b.width,b.height);b.setControlsSize();if(b.isVideo){b.container.bind("mouseenter",function(){b.controls.css("visibility", 58 "visible");b.controls.stop(true,true).fadeIn(200)}).bind("mouseleave",function(){b.media.paused||b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});b.options.enableAutosize&&b.media.addEventListener("loadedmetadata",function(h){if(b.options.videoHeight<=0&&b.$media[0].getAttribute("height")===null&&!isNaN(h.target.videoHeight)){b.setPlayerSize(h.target.videoWidth,h.target.videoHeight);b.setControlsSize();b.media.setVideoSize(h.target.videoWidth, 59 h.target.videoHeight)}},false)}b.media.addEventListener("ended",function(){b.media.setCurrentTime(0);b.media.pause();b.options.loop?b.media.play():b.controls.css("visibility","visible")},true);setTimeout(function(){b.setControlsSize();b.setPlayerSize(b.width,b.height)},50);b.options.success&&b.options.success(b.media,b.domNode)}},handleError:function(a){this.options.error&&this.options.error(a)},setPlayerSize:function(a,c){this.width=parseInt(a,10);this.height=parseInt(c,10);this.container.width(this.width).height(this.height); 60 this.layers.children("div.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");b.siblings().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()))},buildposter:function(a,c,b,d){var e=f('<div class="mejs-poster mejs-layer"><img /></div>').appendTo(b); 61 c=a.$media.attr("poster");if(a.options.poster!="")e.find("img").attr("src",a.options.poster);else c!==""&&c!=null?e.find("img").attr("src",c):e.hide();d.addEventListener("play",function(){e.hide()},false)},buildoverlay:function(a,c,b,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-button"></div></div>').appendTo(b).click(function(){d.paused?d.play():d.pause()});d.addEventListener("play",function(){e.hide()},false);d.addEventListener("pause",function(){e.show()}, 62 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)}, 63 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)}};jQuery.fn.mediaelementplayer=function(a){return this.each(function(){new mejs.MediaElementPlayer(f(this),a)})};window.MediaElementPlayer=mejs.MediaElementPlayer})(jQuery); 63 64 (function(f){MediaElementPlayer.prototype.buildplaypause=function(a,c,b,d){var e=f('<div class="mejs-button mejs-playpause-button mejs-play"><span></span></div>').appendTo(c).click(function(){d.paused?d.play():d.pause()});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")}, 64 65 false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})(jQuery); 65 (function(f){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"), h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"),66 k=c.find(".mejs-time-handle"), m=c.find(".mejs-time-float"),p=c.find(".mejs-time-float-current"),l=function(g){g=g.target;var o=null;if(g&&g.bytesTotal!=undefined&&g.bytesTotal>0&&g.bufferedBytes!=undefined)o=g.bufferedBytes/g.bytesTotal;else if(g&&g.buffered&&g.buffered.length>0&&g.buffered.end&&g.duration)o=g.buffered.end(0)/g.duration;o!==null&&h.width(e.width()*o)},j=function(g){g=g.pageX;var o=e.offset(),s=e.outerWidth(),r=0;r=0;if(g>o.left&&g<=s+o.left&&d.duration){r=(g-o.left)/s;r=r*d.duration;67 q &&d.setCurrentTime(r);m.css("left",g-o.left);p.html(mejs.Utility.secondsToTimeCode(r))}},q=false,n=false;e.bind("mousedown",function(g){q=true;j(g);return false});c.find(".mejs-time-rail").bind("mouseenter",function(){n=true}).bind("mouseleave",function(){n=false});f(document).bind("mouseup",function(){q=false}).bind("mousemove",function(g){if(q||n)j(g)});d.addEventListener("progress",function(g){l(g)},false);d.addEventListener("timeupdate",function(g){l(g);if(d.currentTime&&d.duration){g=e.width()*68 d.currentTime/d.duration;var o=g-k.outerWidth(true)/2;i.width(g);k.css("left",o)}},false)}})(jQuery);66 (function(f){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"),g=c.find(".mejs-time-loaded"),h=c.find(".mejs-time-current"), 67 k=c.find(".mejs-time-handle"),n=c.find(".mejs-time-float"),p=c.find(".mejs-time-float-current"),m=function(i){if(i){var l=i.target,q=null;if(l&&l.buffered&&l.buffered.length>0&&l.buffered.end&&l.duration)q=l.buffered.end(0)/l.duration;else if(l&&l.bytesTotal!=undefined&&l.bytesTotal>0&&l.bufferedBytes!=undefined)q=l.bufferedBytes/l.bytesTotal;else if(i.lengthComputable&&i.total!=0)q=i.loaded/i.total;if(q!==null){q=Math.min(1,Math.max(0,q));g.width(e.width()*q)}}},j=function(i){i=i.pageX;var l=e.offset(), 68 q=e.outerWidth(),s=0;s=0;if(i>l.left&&i<=q+l.left&&d.duration){s=(i-l.left)/q;s=s<=0.02?0:s*d.duration;r&&d.setCurrentTime(s);n.css("left",i-l.left);p.html(mejs.Utility.secondsToTimeCode(s))}},r=false,o=false;e.bind("mousedown",function(i){r=true;j(i);return false});c.find(".mejs-time-rail").bind("mouseenter",function(){o=true}).bind("mouseleave",function(){o=false});f(document).bind("mouseup",function(){r=false}).bind("mousemove",function(i){if(r||o)j(i)});d.addEventListener("progress",function(i){m(i)}, 69 false);d.addEventListener("timeupdate",function(i){m(i);if(d.currentTime&&d.duration){i=e.width()*d.currentTime/d.duration;var l=i-k.outerWidth(true)/2;h.width(i);k.css("left",l)}},false)}})(jQuery); 69 70 (function(f){MediaElementPlayer.prototype.buildcurrent=function(a,c,b,d){f('<div class="mejs-time"><span class="mejs-currenttime">00:00</span></div>').appendTo(c);d.addEventListener("timeupdate",function(){d.currentTime&&c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(d.currentTime))},false)};MediaElementPlayer.prototype.buildduration=function(a,c,b,d){c.children().last().find(".mejs-currenttime").length>0?f(' <span> | </span> <span class="mejs-duration">00:00</span>').appendTo(c.find(".mejs-time")): 70 71 f('<div class="mejs-time"><span class="mejs-duration">00:00</span></div>').appendTo(c);d.addEventListener("timeupdate",function(){d.duration&&c.find(".mejs-duration").html(mejs.Utility.secondsToTimeCode(d.duration))},false)}})(jQuery); 71 (function(f){MediaElementPlayer.prototype.buildvolume=function(a,c,b,d){var e=f('<div class="mejs-button mejs-volume-button mejs-mute"><span></span><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);c=e.find(".mejs-volume-slider");var h=e.find(".mejs-volume-total"),i=e.find(".mejs-volume-current"),k=e.find(".mejs-volume-handle"),m=function(j){j=h.height()-h.height()*j;k.css("top",72 j-k.height()/2); i.height(h.height()-j+parseInt(h.css("top").replace(/px/,""),10));i.css("top",j)},p=function(j){var q=h.height(),n=h.offset(),g=parseInt(h.css("top").replace(/px/,""),10);j=j.pageY-n.top;n=(q-j)/q;if(j<0)j=0;else if(j>q)j=q;k.css("top",j-k.height()/2+g);i.height(q-j);i.css("top",j+g);if(n==0){d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute")}n=Math.max(0,n);n=Math.min(n,1);d.setVolume(n)},l=73 false;c.bind("mousedown",function(j){p(j); l=true;return false});f(document).bind("mouseup",function(){l=false}).bind("mousemove",function(j){l&&p(j)});e.find("span").click(function(){if(d.muted){d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute");m(1)}else{d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute");m(0)}});d.addEventListener("volumechange",function(j){l||m(j.target.volume)},true);d.setVolume(a.options.startVolume)}})(jQuery);74 (function(f){MediaElementPlayer.prototype.buildfullscreen=function(a,c,b,d){if(a.isVideo){var e=false, h=0,i=0,k=a.container,m=f('<div class="mejs-button mejs-fullscreen-button"><span></span></div>').appendTo(c).click(function(){p(!e)}),p=function(l){switch(d.pluginType){case "flash":case "silverlight":d.setFullscreen(l);break;case "native":if(mejs.MediaFeatures.hasNativeFullScreen)l?d.webkitEnterFullScreen():d.webkitExitFullScreen();else{if(l){h=a.$media.height();i=a.$media.width();k.addClass("mejs-container-fullscreen").width("100%").height("100%").css("z-index",75 1E3);a.$media.width("100%").height("100%");b.children("div").width("100%").height("100%"); m.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen")}else{k.removeClass("mejs-container-fullscreen").width(i).height(h).css("z-index",1);a.$media.width(i).height(h);b.children("div").width(i).height(h);m.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen")}a.setControlsSize()}}e=l};f(document).bind("keydown",function(l){e&&l.keyCode==27&&p(false)})}}})(jQuery);76 (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",translations:[],translationSelector:false,googleApiKey:""});f.extend(MediaElementPlayer.prototype,{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");72 (function(f){MediaElementPlayer.prototype.buildvolume=function(a,c,b,d){var e=f('<div class="mejs-button mejs-volume-button mejs-mute"><span></span><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);c=e.find(".mejs-volume-slider");var g=e.find(".mejs-volume-total"),h=e.find(".mejs-volume-current"),k=e.find(".mejs-volume-handle"),n=function(j){j=g.height()-g.height()*j;k.css("top", 73 j-k.height()/2);h.height(g.height()-j+parseInt(g.css("top").replace(/px/,""),10));h.css("top",j)},p=function(j){var r=g.height(),o=g.offset(),i=parseInt(g.css("top").replace(/px/,""),10);j=j.pageY-o.top;o=(r-j)/r;if(j<0)j=0;else if(j>r)j=r;k.css("top",j-k.height()/2+i);h.height(r-j);h.css("top",j+i);if(o==0){d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute")}o=Math.max(0,o);o=Math.min(o,1);d.setVolume(o)},m= 74 false;c.bind("mousedown",function(j){p(j);m=true;return false});f(document).bind("mouseup",function(){m=false}).bind("mousemove",function(j){m&&p(j)});e.find("span").click(function(){if(d.muted){d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute");n(1)}else{d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute");n(0)}});d.addEventListener("volumechange",function(j){m||n(j.target.volume)},true);n(a.options.startVolume);d.setVolume(a.options.startVolume)}})(jQuery); 75 (function(f){MediaElementPlayer.prototype.buildfullscreen=function(a,c,b,d){if(a.isVideo){var e=false,g=0,h=0,k=a.container,n=f('<div class="mejs-button mejs-fullscreen-button"><span></span></div>').appendTo(c).click(function(){p(!e)}),p=function(m){switch(d.pluginType){case "flash":case "silverlight":d.setFullscreen(m);break;case "native":if(mejs.MediaFeatures.hasNativeFullScreen)m?d.webkitEnterFullScreen():d.webkitExitFullScreen();else{if(m){g=a.$media.height();h=a.$media.width();k.addClass("mejs-container-fullscreen").width("100%").height("100%").css("z-index", 76 1E3);a.$media.width("100%").height("100%");b.children("div").width("100%").height("100%");n.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen")}else{k.removeClass("mejs-container-fullscreen").width(h).height(g).css("z-index",1);a.$media.width(h).height(g);b.children("div").width(h).height(g);n.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen")}a.setControlsSize()}}e=m};f(document).bind("keydown",function(m){e&&m.keyCode==27&&p(false)})}}})(jQuery); 77 (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",translations:[],translationSelector:false,googleApiKey:""});f.extend(MediaElementPlayer.prototype,{buildtracks:function(a,c,b,d){if(a.isVideo)if(a.tracks.length!=0){var e,g="";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"); 77 78 a.captionsButton=f('<div class="mejs-button mejs-captions-button"><span></span><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).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]; 78 a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.container.bind("mouseenter",function(){var i=a.container.find(".mejs-captions-position");i.css("bottom",parseInt(i.css("bottom").replace(/px/,""),10)+a.controls.height()+"px")}).bind("mouseleave",function(){d.paused||a.container.find(".mejs-captions-position").css("bottom","")});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(),79 a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.container.bind("mouseenter",function(){var h=a.container.find(".mejs-captions-position");h.css("bottom",parseInt(h.css("bottom").replace(/px/,""),10)+a.controls.height()+"px")}).bind("mouseleave",function(){d.paused||a.container.find(".mejs-captions-position").css("bottom","")});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(), 79 80 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(){a.chapters.css("visibility","visible");a.chapters.fadeIn(200)},function(){d.paused||a.chapters.fadeOut(200,function(){f(this).css("visibility", 80 "hidden");f(this).css("display","block")})});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});81 "hidden");f(this).css("display","block")})});if(a.options.translationSelector){for(e in mejs.language.codes)g+='<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>'+g+"</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}); 81 82 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.SrtParser.translateSrt(c.tracks[0].entries,c.tracks[0].srclang, 82 83 b.srclang,c.options.googleApiKey,function(e){b.entries=e;d()}):f.ajax({url:b.src,success:function(e){b.entries=mejs.SrtParser.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+"]").attr("disabled","").siblings("label").html(mejs.language.codes[a]||a);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a, … … 87 88 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", 88 89 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.SrtParser={pattern_identifier:/^[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})?)(.*)$/,timecodeToSeconds:function(a){a=a.split(":");return a[0]*60*60+a[1]*60+parseFloat(a[2].replace(",","."))},split2:function(a, 89 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:this.timecodeToSeconds(d[1]),stop:this.timecodeToSeconds(d[3]),settings:d[5]})}}return b},translateSrt:function(a,c,b,d,e){var h={text:[],times:[]},i,k;this.translateText(a.text.join(" <a></a>"),90 c,b,d,function( m){i=m.split("<a></a>");for(k=0;k<a.text.length;k++){h.text[k]=i[k];h.times[k]={start:a.times[k].start,stop:a.times[k].stop,settings:a.times[k].settings}}e(h)})},translateText:function(a,c,b,d,e){for(var h,i=[],k,m="",p=function(){if(i.length>0){k=i.shift();mejs.SrtParser.translateChunk(k,c,b,d,function(l){if(l!="undefined")m+=l;p()})}else e(m)};a.length>0;)if(a.length>1E3){h=a.lastIndexOf(".",1E3);i.push(a.substring(0,h));a=a.substring(h+1)}else{i.push(a);a=""}p()},translateChunk:function(a,91 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.SrtParser.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}})(jQuery);90 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:this.timecodeToSeconds(d[1]),stop:this.timecodeToSeconds(d[3]),settings:d[5]})}}return b},translateSrt:function(a,c,b,d,e){var g={text:[],times:[]},h,k;this.translateText(a.text.join(" <a></a>"), 91 c,b,d,function(n){h=n.split("<a></a>");for(k=0;k<a.text.length;k++){g.text[k]=h[k];g.times[k]={start:a.times[k].start,stop:a.times[k].stop,settings:a.times[k].settings}}e(g)})},translateText:function(a,c,b,d,e){for(var g,h=[],k,n="",p=function(){if(h.length>0){k=h.shift();mejs.SrtParser.translateChunk(k,c,b,d,function(m){if(m!="undefined")n+=m;p()})}else e(n)};a.length>0;)if(a.length>1E3){g=a.lastIndexOf(".",1E3);h.push(a.substring(0,g));a=a.substring(g+1)}else{h.push(a);a=""}p()},translateChunk:function(a, 92 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(g){e(g.responseData.translatedText)},error:function(){e(null)}})}};if("x\n\ny".split(/\n/gi).length!=3)mejs.SrtParser.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}})(jQuery); 92 93 -
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelementplayer.css
r324625 r337256 184 184 border: solid 1px #333; 185 185 top: -26px; 186 margin-left: -1 4px;186 margin-left: -18px; 187 187 text-align: center; 188 188 color: #111; -
media-element-html5-video-and-audio-player/trunk/mediaelement/mediaelementplayer.min.css
r324625 r337256 1 .mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;}.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;}.mejs-poster{position:absolute;top:0;left:0;}.mejs-overlay{position:absolute;top:0;left:0;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-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);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;font-family:Helvetica,Arial;}.mejs-controls .mejs-button span{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;height:16px;width:16px;background:transparent url(controls.png) 0 0 no-repeat;}.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 span{background-position:0 0;}.mejs-controls .mejs-pause span{background-position:0 -16px;}.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,.8);}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);}.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:-1 4px;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;}.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 span{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen span{background-position:-32px -16px;}.mejs-controls .mejs-mute span{background-position:-16px -16px;}.mejs-controls .mejs-unmute span{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(0,0,0,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;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button span{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:25px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(0,0,0,0.8);border:solid 1px #fff;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 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:url(background.png);background:rgba(0,0,0,0.8);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #999;border-bottom:solid 1px #999;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#333;}.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;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(0,0,0,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 span{background-position:-64px -16px;}.mejs-controls .mejs-loop-on span{background-position:-64px 0;}.mejs-controls .mejs-backlight-off span{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on span{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}1 .mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;}.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;}.mejs-poster{position:absolute;top:0;left:0;}.mejs-overlay{position:absolute;top:0;left:0;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-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);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;font-family:Helvetica,Arial;}.mejs-controls .mejs-button span{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;height:16px;width:16px;background:transparent url(controls.png) 0 0 no-repeat;}.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 span{background-position:0 0;}.mejs-controls .mejs-pause span{background-position:0 -16px;}.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,.8);}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);}.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;}.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 span{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen span{background-position:-32px -16px;}.mejs-controls .mejs-mute span{background-position:-16px -16px;}.mejs-controls .mejs-unmute span{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(0,0,0,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;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button span{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:25px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(0,0,0,0.8);border:solid 1px #fff;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 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:url(background.png);background:rgba(0,0,0,0.8);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #999;border-bottom:solid 1px #999;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#333;}.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;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(0,0,0,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 span{background-position:-64px -16px;}.mejs-controls .mejs-loop-on span{background-position:-64px 0;}.mejs-controls .mejs-backlight-off span{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on span{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;} -
media-element-html5-video-and-audio-player/trunk/readme.txt
r332519 r337256 5 5 Requires at least: 2.8 6 6 Tested up to: 3.0.4 7 Stable tag: 2.0. 47 Stable tag: 2.0.5 8 8 9 9 MediaElement.js is an HTML5 video and audio player with Flash fallback and captions. Supports IE, Firefox, Opera, Safari, Chrome and iPhone, iPad, Android. … … 140 140 141 141 == Changelog == 142 143 = 2.0.5 = 144 * Lots of minor changes to JS code 145 * better IE6 support 142 146 143 147 = 2.0.4 =
Note: See TracChangeset
for help on using the changeset viewer.