Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | |
241 | 241 | // Display the overlay ad |
242 | 242 | _this.display( 'overlay' , function(){ |
243 | | - lastPlayEndTime = _this.embedPlayer.currentTime |
| 243 | + lastPlayEndTime = _this.embedPlayer.currentTime; |
244 | 244 | _this.adOverlaysEnabled = true; |
245 | 245 | }, adDuration); |
246 | 246 | } |
— | — | @@ -306,7 +306,7 @@ |
307 | 307 | } |
308 | 308 | displayTarget.currentlyDisplayed = false; |
309 | 309 | displayTarget.doneCallback(); |
310 | | - } |
| 310 | + }; |
311 | 311 | // Setup local pointer to displayDoneCallback |
312 | 312 | displayTarget.doneCallback = displayDoneCallback; |
313 | 313 | |
— | — | @@ -349,7 +349,7 @@ |
350 | 350 | return false; |
351 | 351 | } |
352 | 352 | return true; |
353 | | - }) |
| 353 | + }); |
354 | 354 | } |
355 | 355 | |
356 | 356 | // Play the source then run the callback |
— | — | @@ -433,7 +433,7 @@ |
434 | 434 | .html( nonLinearConf.html ) |
435 | 435 | .fadeIn('fast') |
436 | 436 | .append( |
437 | | - // Add a absolute positioned close button: |
| 437 | + // Add a absolute positioned close button: |
438 | 438 | $('<span />') |
439 | 439 | .css({ |
440 | 440 | 'top' : 0, |
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/EmbedPlayer/iframeApi/mw.IFramePlayerApiClient.js |
— | — | @@ -10,6 +10,9 @@ |
11 | 11 | return this.init( iframe , playerProxy ); |
12 | 12 | } |
13 | 13 | mw.IFramePlayerApiClient.prototype = { |
| 14 | + // flag to register if the iframe is in fullscreen mode |
| 15 | + inFullScreenMode: null, |
| 16 | + |
14 | 17 | 'exportedMethods': [ |
15 | 18 | 'play', |
16 | 19 | 'pause' |
— | — | @@ -59,9 +62,17 @@ |
60 | 63 | 'width' : $( _this.iframe ).width(), |
61 | 64 | 'height' : $( _this.iframe ).height(), |
62 | 65 | '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; |
66 | 77 | // Make the iframe fullscreen |
67 | 78 | $( _this.iframe ).css({ |
68 | 79 | 'z-index': mw.getConfig( 'EmbedPlayer.fullScreenZIndex' ) + 1, |
— | — | @@ -82,6 +93,7 @@ |
83 | 94 | } ); |
84 | 95 | } |
85 | 96 | var restoreWindowMode = function(){ |
| 97 | + _this.inFullScreenMode = false; |
86 | 98 | $( _this.iframe ).css( orgSize ); |
87 | 99 | // restore any parent absolute pos: |
88 | 100 | $(parentsAbsoluteList).each( function() { |