r81422 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81421‎ | r81422 | r81423 >
Date:21:54, 2 February 2011
Author:dale
Status:deferred
Tags:
Comment:
sync with kaltura updates for mobile device orientation checks while in fullscreen
Modified paths:
  • /branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js (modified) (history)
  • /branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js
@@ -239,7 +239,7 @@
240240
241241 // Display the overlay ad
242242 _this.display( 'overlay' , function(){
243 - lastPlayEndTime = _this.embedPlayer.currentTime
 243+ lastPlayEndTime = _this.embedPlayer.currentTime;
244244 _this.adOverlaysEnabled = true;
245245 }, adDuration);
246246 }
@@ -306,7 +306,7 @@
307307 }
308308 displayTarget.currentlyDisplayed = false;
309309 displayTarget.doneCallback();
310 - }
 310+ };
311311 // Setup local pointer to displayDoneCallback
312312 displayTarget.doneCallback = displayDoneCallback;
313313
@@ -349,7 +349,7 @@
350350 return false;
351351 }
352352 return true;
353 - })
 353+ });
354354 }
355355
356356 // Play the source then run the callback
@@ -433,7 +433,7 @@
434434 .html( nonLinearConf.html )
435435 .fadeIn('fast')
436436 .append(
437 - // Add a absolute positioned close button:
 437+ // Add a absolute positioned close button:
438438 $('<span />')
439439 .css({
440440 'top' : 0,
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js
@@ -10,6 +10,9 @@
1111 return this.init( iframe , playerProxy );
1212 }
1313 mw.IFramePlayerApiClient.prototype = {
 14+ // flag to register if the iframe is in fullscreen mode
 15+ inFullScreenMode: null,
 16+
1417 'exportedMethods': [
1518 'play',
1619 'pause'
@@ -59,9 +62,17 @@
6063 'width' : $( _this.iframe ).width(),
6164 'height' : $( _this.iframe ).height(),
6265 'position' : null
63 - }
64 -
65 - var doFullscreen = function(){
 66+ };
 67+
 68+ // Bind orientation change to resize player ( if fullscreen )
 69+ $j(window).bind( 'orientationchange', function(e){
 70+ if( _this.inFullScreenMode ){
 71+ doFullscreen();
 72+ }
 73+ });
 74+
 75+ var doFullscreen = function(){
 76+ _this.inFullScreenMode = true;
6677 // Make the iframe fullscreen
6778 $( _this.iframe ).css({
6879 'z-index': mw.getConfig( 'EmbedPlayer.fullScreenZIndex' ) + 1,
@@ -82,6 +93,7 @@
8394 } );
8495 }
8596 var restoreWindowMode = function(){
 97+ _this.inFullScreenMode = false;
8698 $( _this.iframe ).css( orgSize );
8799 // restore any parent absolute pos:
88100 $(parentsAbsoluteList).each( function() {

Status & tagging log