diff --git a/wp-includes/js/mediaelement/flashmediaelement.swf b/wp-includes/js/mediaelement/flashmediaelement.swf index 3e347aa23b..b728fe6d8f 100644 Binary files a/wp-includes/js/mediaelement/flashmediaelement.swf and b/wp-includes/js/mediaelement/flashmediaelement.swf differ diff --git a/wp-includes/js/mediaelement/mediaelement-and-player.js b/wp-includes/js/mediaelement/mediaelement-and-player.js index 3601e4caae..bb49d6094a 100644 --- a/wp-includes/js/mediaelement/mediaelement-and-player.js +++ b/wp-includes/js/mediaelement/mediaelement-and-player.js @@ -8,14 +8,14 @@ * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3 * * Copyright 2010-2012, John Dyer (http://j.hn) -* Dual licensed under the MIT or GPL Version 2 licenses. +* License: MIT * */ // Namespace var mejs = mejs || {}; // version number -mejs.version = '2.10.1'; +mejs.version = '2.11.0'; // player number (for missing, same id attr) mejs.meIndex = 0; @@ -30,13 +30,14 @@ mejs.plugins = { //,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!) ], youtube: [ - {version: null, types: ['video/youtube', 'video/x-youtube']} + {version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']} ], vimeo: [ {version: null, types: ['video/vimeo', 'video/x-vimeo']} ] }; + /* Utility methods */ @@ -85,70 +86,70 @@ mejs.Utility = { } else if(typeof fps == 'undefined') { fps = 25; } - + var hours = Math.floor(time / 3600) % 24, minutes = Math.floor(time / 60) % 60, seconds = Math.floor(time % 60), frames = Math.floor(((time % 1)*fps).toFixed(3)), - result = + result = ( (forceHours || hours > 0) ? (hours < 10 ? '0' + hours : hours) + ':' : '') + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds) + ((showFrameCount) ? ':' + (frames < 10 ? '0' + frames : frames) : ''); - + return result; }, - + timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){ if (typeof showFrameCount == 'undefined') { showFrameCount=false; } else if(typeof fps == 'undefined') { fps = 25; } - + var tc_array = hh_mm_ss_ff.split(":"), tc_hh = parseInt(tc_array[0], 10), tc_mm = parseInt(tc_array[1], 10), tc_ss = parseInt(tc_array[2], 10), tc_ff = 0, tc_in_seconds = 0; - + if (showFrameCount) { tc_ff = parseInt(tc_array[3])/fps; } - + tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff; - + return tc_in_seconds; }, - + convertSMPTEtoSeconds: function (SMPTE) { - if (typeof SMPTE != 'string') + if (typeof SMPTE != 'string') return false; SMPTE = SMPTE.replace(',', '.'); - + var secs = 0, decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0, multiplier = 1; - + SMPTE = SMPTE.split(':').reverse(); - + for (var i = 0; i < SMPTE.length; i++) { multiplier = 1; if (i > 0) { - multiplier = Math.pow(60, i); + multiplier = Math.pow(60, i); } secs += Number(SMPTE[i]) * multiplier; } return Number(secs.toFixed(decimalLen)); - }, - + }, + /* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */ removeSwf: function(id) { var obj = document.getElementById(id); - if (obj && obj.nodeName == "OBJECT") { + if (obj && /object|embed/i.test(obj.nodeName)) { if (mejs.MediaFeatures.isIE) { obj.style.display = "none"; (function(){ @@ -172,7 +173,7 @@ mejs.Utility = { } } obj.parentNode.removeChild(obj); - } + } } }; @@ -303,7 +304,7 @@ mejs.MediaFeatures = { t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit; t.isOpera = (ua.match(/opera/gi) !== null); t.hasTouch = ('ontouchstart' in window); - + // borrowed from Modernizr t.svg = !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect; @@ -312,33 +313,33 @@ mejs.MediaFeatures = { for (i=0; i or