diff --git a/README.md b/README.md
index 43ed0b124..4f4e793dc 100644
--- a/README.md
+++ b/README.md
@@ -93,9 +93,10 @@ You can use this as a standalone library if you wish, or just stick with the ful
* Possible issues with < IE8 centering resolved
* Full set of controls under Silverlight ([Birol2010](https://github.com/Birol2010/))
* YouTube fix [raknam]
-* Source Chooser plugin [markomarkovic]
* shim now has a .tagName property, and other DOM-like methods [tantalic]
-* Poster display fix when HTML5, Flash, and Silverlight are all missing [bruha]
+* Poster display fix when HTML5, Flash, and Silverlight are all missing [bruha]
+* Source Chooser plugin [markomarkovic]
+* Fix for flash audio mute [lbernau]
*2.6.5 (2012/02/01)*
diff --git a/build/controls.png b/build/controls.png
index a4f866316..7cce224e9 100644
Binary files a/build/controls.png and b/build/controls.png differ
diff --git a/build/mediaelement-and-player.js b/build/mediaelement-and-player.js
index 0d52135c9..8dfa9d3a6 100644
--- a/build/mediaelement-and-player.js
+++ b/build/mediaelement-and-player.js
@@ -15,7 +15,7 @@
var mejs = mejs || {};
// version number
-mejs.version = '2.6.5';
+mejs.version = '2.7.0';
// player number (for missing, same id attr)
mejs.meIndex = 0;
@@ -438,6 +438,7 @@ mejs.PluginMediaElement.prototype = {
seeking: false,
duration: 0,
error: null,
+ tagName: '',
// HTML5 get/set properties, but only set (updated by event handlers)
muted: false,
@@ -652,6 +653,24 @@ mejs.PluginMediaElement.prototype = {
},
// end: fake events
+ // fake DOM attribute methods
+ attributes: {},
+ hasAttribute: function(name){
+ return (name in this.attributes);
+ },
+ removeAttribute: function(name){
+ delete this.attributes[name];
+ },
+ getAttribute: function(name){
+ if (this.hasAttribute(name)) {
+ return this.attributes[name];
+ }
+ return '';
+ },
+ setAttribute: function(name, value){
+ this.attributes[name] = value;
+ },
+
remove: function() {
mejs.Utility.removeSwf(this.pluginElement.id);
}
@@ -1023,7 +1042,7 @@ mejs.HtmlMediaElementShim = {
} catch (e) {}
errorContainer.innerHTML = (poster !== '') ?
- '' :
+ '' :
'Download File';
htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
@@ -1044,6 +1063,17 @@ mejs.HtmlMediaElementShim = {
node,
initVars;
+ // copy tagName from html media element
+ pluginMediaElement.tagName = htmlMediaElement.tagName
+
+ // copy attributes from html media element to plugin media element
+ for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
+ var attribute = htmlMediaElement.attributes[i];
+ if (attribute.specified == true) {
+ pluginMediaElement.setAttribute(attribute.name, attribute.value);
+ }
+ }
+
// check for placement inside a
tag (sometimes WYSIWYG editors do this)
node = htmlMediaElement.parentNode;
while (node !== null && node.tagName.toLowerCase() != 'body') {
@@ -1363,6 +1393,7 @@ mejs.YouTubeApi = {
iFrameReady: function() {
+ this.isLoaded = true;
this.isIframeLoaded = true;
while (this.iframeQueue.length > 0) {
@@ -1543,9 +1574,9 @@ if (typeof jQuery != 'undefined') {
alwaysShowControls: false,
// force iPad's native controls
iPadUseNativeControls: false,
- // force iPad's native controls
+ // force iPhone's native controls
iPhoneUseNativeControls: false,
- // force iPad's native controls
+ // force Android's native controls
AndroidUseNativeControls: false,
// features to show
features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
@@ -2197,8 +2228,14 @@ if (typeof jQuery != 'undefined') {
setPlayerSize: function(width,height) {
var t = this;
-
- // testing for 100% code
+
+ if (typeof width != 'undefined')
+ t.width = width;
+
+ if (typeof height != 'undefined')
+ t.height = height;
+
+ // detect 100% mode
if (t.height.toString().indexOf('%') > 0) {
// do we have the native dimensions yet?
@@ -2474,7 +2511,7 @@ if (typeof jQuery != 'undefined') {
},
changeSkin: function(className) {
this.container[0].className = 'mejs-container ' + className;
- this.setPlayerSize();
+ this.setPlayerSize(this.width, this.height);
this.setControlsSize();
},
play: function() {
@@ -2868,18 +2905,36 @@ if (typeof jQuery != 'undefined') {
$.extend(mejs.MepDefaults, {
muteText: 'Mute Toggle',
- hideVolumeOnTouchDevices: true
+ hideVolumeOnTouchDevices: true,
+
+ audioVolume: 'horizontal',
+ videoVolume: 'vertical'
});
$.extend(MediaElementPlayer.prototype, {
buildvolume: function(player, controls, layers, media) {
-
+
// Android and iOS don't support volume controls
if (mejs.MediaFeatures.hasTouch && this.options.hideVolumeOnTouchDevices)
return;
var t = this,
- mute =
+ mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
+ mute = (mode == 'horizontal') ?
+
+ // horizontal version
+ $('
'+
+ ''+
+ '
' +
+ ''+ // outer background
+ '
'+ // line background
+ '
'+ // current volume
+ '
'+ // handle
+ '
'
+ )
+ .appendTo(controls) :
+
+ // vertical version
$('')
- .appendTo(controls),
- volumeSlider = mute.find('.mejs-volume-slider'),
- volumeTotal = mute.find('.mejs-volume-total'),
- volumeCurrent = mute.find('.mejs-volume-current'),
- volumeHandle = mute.find('.mejs-volume-handle'),
+ .appendTo(controls),
+ volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
+ volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
+ volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
+ volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
positionVolumeHandle = function(volume) {
@@ -2902,75 +2957,104 @@ if (typeof jQuery != 'undefined') {
volumeSlider.hide()
return;
}
-
- var
+
+ // correct to 0-1
+ volume = Math.max(0,volume);
+ volume = Math.min(volume,1);
- // height of the full size volume slider background
- totalHeight = volumeTotal.height(),
+ // ajust mute button style
+ if (volume == 0) {
+ mute.removeClass('mejs-mute').addClass('mejs-unmute');
+ } else {
+ mute.removeClass('mejs-unmute').addClass('mejs-mute');
+ }
+
+ // position slider
+ if (mode == 'vertical') {
+ var
- // top/left of full size volume slider background
- totalPosition = volumeTotal.position(),
+ // height of the full size volume slider background
+ totalHeight = volumeTotal.height(),
+
+ // top/left of full size volume slider background
+ totalPosition = volumeTotal.position(),
+
+ // the new top position based on the current volume
+ // 70% volume on 100px height == top:30px
+ newTop = totalHeight - (totalHeight * volume);
+
+ // handle
+ volumeHandle.css('top', totalPosition.top + newTop - (volumeHandle.height() / 2));
+
+ // show the current visibility
+ volumeCurrent.height(totalHeight - newTop );
+ volumeCurrent.css('top', totalPosition.top + newTop);
+ } else {
+ var
- // the new top position based on the current volume
- // 70% volume on 100px height == top:30px
- newTop = totalHeight - (totalHeight * volume);
-
- // handle
- volumeHandle.css('top', totalPosition.top + newTop - (volumeHandle.height() / 2));
-
- // show the current visibility
- volumeCurrent.height(totalHeight - newTop );
- volumeCurrent.css('top', totalPosition.top + newTop);
+ // height of the full size volume slider background
+ totalWidth = volumeTotal.width(),
+
+ // top/left of full size volume slider background
+ totalPosition = volumeTotal.position(),
+
+ // the new left position based on the current volume
+ newLeft = totalWidth * volume;
+
+ // handle
+ volumeHandle.css('left', totalPosition.left + newLeft - (volumeHandle.width() / 2));
+
+ // rezize the current part of the volume bar
+ volumeCurrent.width( newLeft );
+ }
},
handleVolumeMove = function(e) {
- var
- railHeight = volumeTotal.height(),
- totalOffset = volumeTotal.offset(),
- totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10),
- newY = e.pageY - totalOffset.top,
- volume = (railHeight - newY) / railHeight
-
- // the controls just hide themselves (usually when mouse moves too far up)
- if (totalOffset.top == 0 || totalOffset.left == 0)
- return;
+
+ var volume = null,
+ totalOffset = volumeTotal.offset();
+
+ // calculate the new volume based on the moust position
+ if (mode == 'vertical') {
+
+ var
+ railHeight = volumeTotal.height(),
+ totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10),
+ newY = e.pageY - totalOffset.top;
+
+ volume = (railHeight - newY) / railHeight;
+
+ // the controls just hide themselves (usually when mouse moves too far up)
+ if (totalOffset.top == 0 || totalOffset.left == 0)
+ return;
- // 0-1
+ } else {
+ var
+ railWidth = volumeTotal.width(),
+ newX = e.pageX - totalOffset.left;
+
+ volume = newX / railWidth;
+ }
+
+ // ensure the volume isn't outside 0-1
volume = Math.max(0,volume);
- volume = Math.min(volume,1);
-
- // TODO: handle vertical and horizontal CSS
- // only allow it to move within the rail
- if (newY < 0)
- newY = 0;
- else if (newY > railHeight)
- newY = railHeight;
-
- // move the handle to match the mouse
- volumeHandle.css('top', newY - (volumeHandle.height() / 2) + totalTop );
-
- // show the current visibility
- volumeCurrent.height(railHeight-newY);
- volumeCurrent.css('top',newY+totalTop);
-
- // set mute status
+ volume = Math.min(volume,1);
+
+ // position the slider and handle
+ positionVolumeHandle(volume);
+
+ // set the media object (this will trigger the volumechanged event)
if (volume == 0) {
media.setMuted(true);
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
} else {
media.setMuted(false);
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
}
-
- volume = Math.max(0,volume);
- volume = Math.min(volume,1);
-
- // set the volume
- media.setVolume(volume);
+ media.setVolume(volume);
},
mouseIsDown = false,
mouseIsOver = false;
// SLIDER
+
mute
.hover(function() {
volumeSlider.show();
@@ -2978,7 +3062,7 @@ if (typeof jQuery != 'undefined') {
}, function() {
mouseIsOver = false;
- if (!mouseIsDown) {
+ if (!mouseIsDown && mode == 'vertical') {
volumeSlider.hide();
}
});
@@ -2998,7 +3082,7 @@ if (typeof jQuery != 'undefined') {
.bind('mouseup', function (e) {
mouseIsDown = false;
- if (!mouseIsOver) {
+ if (!mouseIsOver && mode == 'vertical') {
volumeSlider.hide();
}
})
@@ -3011,9 +3095,7 @@ if (typeof jQuery != 'undefined') {
// MUTE button
mute.find('button').click(function() {
-
media.setMuted( !media.muted );
-
});
// listen for volume change events from other sources
diff --git a/build/mediaelement-and-player.min.js b/build/mediaelement-and-player.min.js
index e830f38e1..dd632310b 100644
--- a/build/mediaelement-and-player.min.js
+++ b/build/mediaelement-and-player.min.js
@@ -10,7 +10,7 @@
* Copyright 2010-2012, John Dyer (http://j.hn)
* Dual licensed under the MIT or GPL Version 2 licenses.
*
-*/var mejs=mejs||{};mejs.version="2.6.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","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"]}],youtube:[{version:null,types:["video/youtube"]}],vimeo:[{version:null,types:["video/vimeo"]}]};
+*/var mejs=mejs||{};mejs.version="2.7.0";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"]}],youtube:[{version:null,types:["video/youtube"]}],vimeo:[{version:null,types:["video/vimeo"]}]};
mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='x';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script"),j=f.length,h=a.length;b
-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],
10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")if(mejs.MediaFeatures.isIE){b.style.display="none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
@@ -24,12 +24,13 @@ a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(
else a.hasMozNativeFullScreen&&f.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=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;b0&&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;f0)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(/(mp4|m4v|ogg|ogv|webm|flv|wmv|mpeg|mov)/gi.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!==
-""?'':'Download File';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";k.id=h+"_container";a.isVideo?c.parentNode.insertBefore(k,
-c):document.body.insertBefore(k,document.body.childNodes[0]);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");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
-'';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");
-k.appendChild(a);a.outerHTML=''}else k.innerHTML=
+""?'':'Download File';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;l.tagName=c.tagName;for(m=0;m0?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";k.id=h+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);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");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML='';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML=''}else k.innerHTML=
'';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:l,pluginId:h,videoId:b,
height:j,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":console.log("vimeoid");l.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML=''}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}};
mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="http://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
-c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,
-c="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=
+c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
+a;var b,c="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=
''},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,
c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,
c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
@@ -81,42 +82,44 @@ a.options["default"+c+"Height"];a.setPlayerSize(a.width,a.height);b.pluginWidth=
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 g;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.buildkeyboard(b,b.controls,b.layers,b.media);b.buildoverlays(b,b.controls,b.layers,b.media);b.findTracks();for(g in b.options.features){d=b.options.features[g];if(b["build"+d])try{b["build"+d](b,b.controls,b.layers,b.media)}catch(k){}}b.container.trigger("controlsready");b.setPlayerSize(b.width,b.height);b.setControlsSize();if(b.isVideo){if(mejs.MediaFeatures.hasTouch)b.$media.bind("touchstart",function(){if(b.controlsAreVisible)b.hideControls(false);
else b.controlsEnabled&&b.showControls(false)});else{(b.media.pluginType=="native"?b.$media: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.options.alwaysShowControls||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)}a.addEventListener("play",
-function(){for(var i=0,m=mejs.players.length;i0){var a=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,c=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:
-this.options.defaultVideoHeight,b=this.container.parent().width();a=parseInt(b*c/a,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){b=f(window).width();a=f(window).height()}this.container.width(b).height(a);this.$media.width("100%").height("100%");this.container.find("object, embed, iframe").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);
+a.pluginType=="native"){a.load();a.play()}if(b.options.success)typeof b.options.success=="string"?window[b.options.success](b.media,b.domNode,b):b.options.success(b.media,b.domNode,b)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,c){if(typeof a!="undefined")this.width=a;if(typeof c!="undefined")this.height=c;if(this.height.toString().indexOf("%")>0){var b=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,
+d=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,e=this.container.parent().width();b=parseInt(e*d/b,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();b=f(window).height()}this.container.width(e).height(b);this.$media.width("100%").height("100%");this.container.find("object, embed, iframe").width("100%").height("100%");this.media.setVideoSize&&this.media.setVideoSize(e,b);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();if(this.options&&!this.options.autosizeProgress)c=parseInt(b.css("width"));if(c===0||!c){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('').appendTo(b);c=a.$media.attr("poster");if(a.options.poster!=="")c=a.options.poster;c!==""&&c!=null?this.setPoster(c):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var c=this.container.find(".mejs-poster"),
b=c.find("img");if(b.length==0)b=f('').appendTo(c);b.attr("src",a)},buildoverlays:function(a,c,b,d){if(a.isVideo){var e=f('').hide().appendTo(b),g=f('').hide().appendTo(b),k=f('').appendTo(b).click(function(){d.paused?
d.play():d.pause()});d.addEventListener("play",function(){k.hide();e.hide();g.hide()},false);d.addEventListener("playing",function(){k.hide();e.hide();g.hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||k.show()},false);d.addEventListener("waiting",function(){e.show()},false);d.addEventListener("loadeddata",function(){e.show()},false);d.addEventListener("canplay",function(){e.hide()},false);d.addEventListener("error",function(){e.hide();g.show();g.find("mejs-overlay-error").html("Error loading this resource")},
-false)}},buildkeyboard:function(a,c,b,d){f(document).keydown(function(e){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g').appendTo(c).click(function(g){g.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(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,c,b,d){f('").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('00:00
').appendTo(c);var e=c.find(".mejs-time-total");b=c.find(".mejs-time-loaded");var g=c.find(".mejs-time-current"),
-k=c.find(".mejs-time-handle"),i=c.find(".mejs-time-float"),m=c.find(".mejs-time-float-current"),l=function(j){j=j.pageX;var h=e.offset(),n=e.outerWidth(),p=0;p=0;var s=j-h.left;if(j>h.left&&j<=n+h.left&&d.duration){p=(j-h.left)/n;p=p<=0.02?0:p*d.duration;o&&d.setCurrentTime(p);if(!mejs.MediaFeatures.hasTouch){i.css("left",s);m.html(mejs.Utility.secondsToTimeCode(p));i.show()}}},o=false,q=false;e.bind("mousedown",function(j){if(j.which===1){o=true;l(j);return false}});c.find(".mejs-time-total").bind("mouseenter",
-function(){q=true;mejs.MediaFeatures.hasTouch||i.show()}).bind("mouseleave",function(){q=false;i.hide()});f(document).bind("mouseup",function(){o=false;i.hide()}).bind("mousemove",function(j){if(o||q)l(j)});d.addEventListener("progress",function(j){a.setProgressRail(j);a.setCurrentRail(j)},false);d.addEventListener("timeupdate",function(j){a.setProgressRail(j);a.setCurrentRail(j)},false);this.loaded=b;this.total=e;this.current=g;this.handle=k},setProgressRail:function(a){var c=a!=undefined?a.target:
+k=c.find(".mejs-time-handle"),h=c.find(".mejs-time-float"),o=c.find(".mejs-time-float-current"),n=function(l){l=l.pageX;var m=e.offset(),i=e.outerWidth(),j=0;j=0;var q=l-m.left;if(l>m.left&&l<=i+m.left&&d.duration){j=(l-m.left)/i;j=j<=0.02?0:j*d.duration;p&&d.setCurrentTime(j);if(!mejs.MediaFeatures.hasTouch){h.css("left",q);o.html(mejs.Utility.secondsToTimeCode(j));h.show()}}},p=false,r=false;e.bind("mousedown",function(l){if(l.which===1){p=true;n(l);return false}});c.find(".mejs-time-total").bind("mouseenter",
+function(){r=true;mejs.MediaFeatures.hasTouch||h.show()}).bind("mouseleave",function(){r=false;h.hide()});f(document).bind("mouseup",function(){p=false;h.hide()}).bind("mousemove",function(l){if(p||r)n(l)});d.addEventListener("progress",function(l){a.setProgressRail(l);a.setCurrentRail(l)},false);d.addEventListener("timeupdate",function(l){a.setProgressRail(l);a.setCurrentRail(l)},false);this.loaded=b;this.total=e;this.current=g;this.handle=k},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(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,c,b,d){f(''+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
").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(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(c.find(".mejs-time"));else{c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
f(''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
").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(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,c,b,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=f('').appendTo(c),
-g=e.find(".mejs-volume-slider"),k=e.find(".mejs-volume-total"),i=e.find(".mejs-volume-current"),m=e.find(".mejs-volume-handle"),l=function(h){if(g.is(":visible")){var n=k.height(),p=k.position();h=n-n*h;m.css("top",p.top+h-m.height()/2);i.height(n-h);i.css("top",p.top+h)}else{g.show();l(h);g.hide()}},o=function(h){var n=k.height(),p=k.offset(),s=parseInt(k.css("top").replace(/px/,""),10);h=h.pageY-p.top;var r=(n-h)/n;if(!(p.top==0||p.left==0)){r=Math.max(0,r);r=Math.min(r,1);if(h<0)h=0;else if(h>
-n)h=n;m.css("top",h-m.height()/2+s);i.height(n-h);i.css("top",h+s);if(r==0){d.setMuted(true);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute")}r=Math.max(0,r);r=Math.min(r,1);d.setVolume(r)}},q=false,j=false;e.hover(function(){g.show();j=true},function(){j=false;q||g.hide()});g.bind("mouseover",function(){j=true}).bind("mousedown",function(h){o(h);q=true;return false});f(document).bind("mouseup",function(){q=false;j||g.hide()}).bind("mousemove",
-function(h){q&&o(h)});e.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!q)if(d.muted){l(0);e.removeClass("mejs-mute").addClass("mejs-unmute")}else{l(d.volume);e.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){l(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,c,b,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=this.isVideo?this.options.videoVolume:this.options.audioVolume,g=e=="horizontal"?f('').appendTo(c):f('').appendTo(c),
+k=this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),h=this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),o=this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),n=this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),p=function(i){if(k.is(":visible")){i=Math.max(0,i);i=Math.min(i,1);i==0?g.removeClass("mejs-mute").addClass("mejs-unmute"):g.removeClass("mejs-unmute").addClass("mejs-mute");if(e=="vertical"){var j=
+h.height(),q=h.position();i=j-j*i;n.css("top",q.top+i-n.height()/2);o.height(j-i);o.css("top",q.top+i)}else{j=h.width();q=h.position();i=j*i;n.css("left",q.left+i-n.width()/2);o.width(i)}}else{k.show();p(i);k.hide()}},r=function(i){var j=null,q=h.offset();if(e=="vertical"){j=h.height();parseInt(h.css("top").replace(/px/,""),10);j=(j-(i.pageY-q.top))/j;if(q.top==0||q.left==0)return}else{j=h.width();j=(i.pageX-q.left)/j}j=Math.max(0,j);j=Math.min(j,1);p(j);j==0?d.setMuted(true):d.setMuted(false);d.setVolume(j)},
+l=false,m=false;g.hover(function(){k.show();m=true},function(){m=false;!l&&e=="vertical"&&k.hide()});k.bind("mouseover",function(){m=true}).bind("mousedown",function(i){r(i);l=true;return false});f(document).bind("mouseup",function(){l=false;!m&&e=="vertical"&&k.hide()}).bind("mousemove",function(i){l&&r(i)});g.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!l)if(d.muted){p(0);g.removeClass("mejs-mute").addClass("mejs-unmute")}else{p(d.volume);
+g.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){p(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:"Fullscreen"});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,c,b,d){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;mejs.MediaFeatures.hasTrueNativeFullScreen&&a.container.bind(mejs.MediaFeatures.fullScreenEventName,function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=
true;a.setControlsSize()}else{a.isNativeFullScreen=false;a.exitFullScreen()}});var e=this,g=f('').appendTo(c);if(e.media.pluginType==="native"||!e.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});
-else{var k=null;if(document.documentElement.style.pointerEvents===""&&!mejs.MediaFeatures.isOpera){var i=false,m=function(){if(i){l.hide();o.hide();q.hide();g.css("pointer-events","");e.controls.css("pointer-events","");i=false}},l=f('').appendTo(e.container).mouseover(m),o=f('').appendTo(e.container).mouseover(m),q=f('').appendTo(e.container).mouseover(m),j=function(){var h={position:"absolute",
-top:0,left:0};l.css(h);o.css(h);q.css(h);l.width(e.container.width()).height(e.container.height()-e.controls.height());h=g.offset().left-e.container.offset().left;fullScreenBtnWidth=g.outerWidth(true);o.width(h).height(e.controls.height()).css({top:e.container.height()-e.controls.height()});q.width(e.container.width()-h-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:h+fullScreenBtnWidth})};f(document).resize(function(){j()});g.mouseover(function(){if(!e.isFullScreen){var h=
-g.offset(),n=a.container.offset();d.positionFullscreenButton(h.left-n.left,h.top-n.top,false);g.css("pointer-events","none");e.controls.css("pointer-events","none");l.show();q.show();o.show();j();i=true}});d.addEventListener("fullscreenchange",function(){m()})}else g.mouseover(function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),n=a.container.offset();d.positionFullscreenButton(h.left-n.left,h.top-n.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},
-1500)})}a.fullscreenBtn=g;f(document).bind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||e.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();
+else{var k=null;if(document.documentElement.style.pointerEvents===""&&!mejs.MediaFeatures.isOpera){var h=false,o=function(){if(h){n.hide();p.hide();r.hide();g.css("pointer-events","");e.controls.css("pointer-events","");h=false}},n=f('').appendTo(e.container).mouseover(o),p=f('').appendTo(e.container).mouseover(o),r=f('').appendTo(e.container).mouseover(o),l=function(){var m={position:"absolute",
+top:0,left:0};n.css(m);p.css(m);r.css(m);n.width(e.container.width()).height(e.container.height()-e.controls.height());m=g.offset().left-e.container.offset().left;fullScreenBtnWidth=g.outerWidth(true);p.width(m).height(e.controls.height()).css({top:e.container.height()-e.controls.height()});r.width(e.container.width()-m-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:m+fullScreenBtnWidth})};f(document).resize(function(){l()});g.mouseover(function(){if(!e.isFullScreen){var m=
+g.offset(),i=a.container.offset();d.positionFullscreenButton(m.left-i.left,m.top-i.top,false);g.css("pointer-events","none");e.controls.css("pointer-events","none");n.show();r.show();p.show();l();h=true}});d.addEventListener("fullscreenchange",function(){o()})}else g.mouseover(function(){if(k!==null){clearTimeout(k);delete k}var m=g.offset(),i=a.container.offset();d.positionFullscreenButton(m.left-i.left,m.top-i.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},
+1500)})}a.fullscreenBtn=g;f(document).bind("keydown",function(m){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||e.isFullScreen)&&m.keyCode==27)a.exitFullScreen()})}},enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();
if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function b(){if(a.isNativeFullScreen)f(window).width()!==screen.width?a.exitFullScreen():setTimeout(b,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var c=a.options.newWindowCallback(this);if(c!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();
window.open(c,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(c,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.pluginType===
"native")a.$media.width("100%").height("100%");else{a.container.find("object, embed, iframe").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{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&
@@ -139,6 +142,6 @@ function(a,c){var b=[],d="",e;for(e=0;e