http://www.mediawiki.org/wiki/Special:Code/MediaWiki/81422
Revision: 81422 Author: dale Date: 2011-02-02 21:54:52 +0000 (Wed, 02 Feb 2011) Log Message: ----------- sync with kaltura updates for mobile device orientation checks while in fullscreen Modified Paths: -------------- branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js Modified: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js =================================================================== --- branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js 2011-02-02 21:37:37 UTC (rev 81421) +++ branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js 2011-02-02 21:54:52 UTC (rev 81422) @@ -239,7 +239,7 @@ // Display the overlay ad _this.display( 'overlay' , function(){ - lastPlayEndTime = _this.embedPlayer.currentTime + lastPlayEndTime = _this.embedPlayer.currentTime; _this.adOverlaysEnabled = true; }, adDuration); } @@ -306,7 +306,7 @@ } displayTarget.currentlyDisplayed = false; displayTarget.doneCallback(); - } + }; // Setup local pointer to displayDoneCallback displayTarget.doneCallback = displayDoneCallback; @@ -349,7 +349,7 @@ return false; } return true; - }) + }); } // Play the source then run the callback @@ -433,7 +433,7 @@ .html( nonLinearConf.html ) .fadeIn('fast') .append( - // Add a absolute positioned close button: + // Add a absolute positioned close button: $('<span />') .css({ 'top' : 0, Modified: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js =================================================================== --- branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js 2011-02-02 21:37:37 UTC (rev 81421) +++ branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js 2011-02-02 21:54:52 UTC (rev 81422) @@ -10,6 +10,9 @@ return this.init( iframe , playerProxy ); } mw.IFramePlayerApiClient.prototype = { + // flag to register if the iframe is in fullscreen mode + inFullScreenMode: null, + 'exportedMethods': [ 'play', 'pause' @@ -59,9 +62,17 @@ 'width' : $( _this.iframe ).width(), 'height' : $( _this.iframe ).height(), 'position' : null - } - - var doFullscreen = function(){ + }; + + // Bind orientation change to resize player ( if fullscreen ) + $j(window).bind( 'orientationchange', function(e){ + if( _this.inFullScreenMode ){ + doFullscreen(); + } + }); + + var doFullscreen = function(){ + _this.inFullScreenMode = true; // Make the iframe fullscreen $( _this.iframe ).css({ 'z-index': mw.getConfig( 'EmbedPlayer.fullScreenZIndex' ) + 1, @@ -82,6 +93,7 @@ } ); } var restoreWindowMode = function(){ + _this.inFullScreenMode = false; $( _this.iframe ).css( orgSize ); // restore any parent absolute pos: $(parentsAbsoluteList).each( function() { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs