Index: branches/js2-work/phase3/js/mwEmbed/skins/kskin/kskinConfig.js |
— | — | @@ -67,12 +67,9 @@ |
68 | 68 | 'top' : '0px' |
69 | 69 | } ); |
70 | 70 | |
71 | | - if( ctrlObj.checkOverlayControls() ){ |
72 | | - // Set to overlayheight - ( control bar height + 2 for borders ) |
73 | | - $menuOverlay.css( 'bottom', ctrlObj.getHeight() + 2 ); |
74 | | - }else{ |
75 | | - $menuOverlay.css( 'bottom', 0 ); |
76 | | - } |
| 71 | + |
| 72 | + $menuOverlay.css( 'bottom', ctrlObj.getHeight() + 2 ); |
| 73 | + |
77 | 74 | |
78 | 75 | // Setup menu offset ( if player height < getOverlayHeight ) |
79 | 76 | // This displays the menu outside of the player on small embeds |
Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | |
39 | 39 | // Default supported menu items is merged with skin menu items |
40 | 40 | supportedMenuItems: { |
| 41 | + // Player Select |
41 | 42 | 'playerSelect' : true, |
42 | 43 | |
43 | 44 | // Download the file menu |
— | — | @@ -113,7 +114,7 @@ |
114 | 115 | } else { |
115 | 116 | // Add some space to interface for the control bar ( if not overlaying controls ) |
116 | 117 | embedPlayer.$interface.css( { |
117 | | - 'height' : parseInt( embedPlayer.height ) + parseInt( this.height ) |
| 118 | + 'height' : parseInt( embedPlayer.height ) + parseInt( this.height ) +2 |
118 | 119 | } ); |
119 | 120 | // update the control bar display to "block" |
120 | 121 | $controlBar.css('display', 'block') |
— | — | @@ -158,8 +159,7 @@ |
159 | 160 | if( mw.getConfig( 'kalturaAttribution' ) ){ |
160 | 161 | this.supportedComponets[ 'kalturaAttribution' ] = true; |
161 | 162 | } |
162 | | - |
163 | | - |
| 163 | + |
164 | 164 | // Output components |
165 | 165 | for ( var component_id in this.components ) { |
166 | 166 | |
— | — | @@ -185,7 +185,6 @@ |
186 | 186 | $controlBar.append( |
187 | 187 | _this.getComponent( component_id ) |
188 | 188 | ); |
189 | | - |
190 | 189 | this.available_width -= this.components[ component_id ].w; |
191 | 190 | } else { |
192 | 191 | mw.log( 'Not enough space for control component:' + component_id ); |
— | — | @@ -241,7 +240,7 @@ |
242 | 241 | var textSize = ( $j( window ).width() / 8 ) + 20; |
243 | 242 | if( textSize < 95 ) textSize = 95; |
244 | 243 | if( textSize > 250 ) textSize = 250; |
245 | | - mw.log(' win size is: ' + $j( window ).width() + ' ts: ' + textSize ); |
| 244 | + //mw.log(' win size is: ' + $j( window ).width() + ' ts: ' + textSize ); |
246 | 245 | return { |
247 | 246 | 'font-size' : textSize + '%' |
248 | 247 | } |
— | — | @@ -281,7 +280,7 @@ |
282 | 281 | } |
283 | 282 | this.fullscreenMode = true; |
284 | 283 | |
285 | | - // Add the fullscreen black overlay: |
| 284 | + // Add the css fixed fullscreen black overlay: |
286 | 285 | $j( '<div />' ) |
287 | 286 | .addClass( 'mw-fullscreen-overlay' ) |
288 | 287 | // Set some arbitrary high z-index |
— | — | @@ -290,17 +289,14 @@ |
291 | 290 | .hide() |
292 | 291 | .fadeIn("slow"); |
293 | 292 | |
294 | | - // Set the video player margins to "auto" for centered resize |
295 | | - /*$j( embedPlayer ).css( { |
296 | | - 'margin' : 'auto' |
297 | | - } );*/ |
298 | 293 | |
| 294 | + |
299 | 295 | // Change the interface to absolute positioned: |
300 | 296 | this.windowPositionStyle = $interface.css( 'position' ); |
301 | 297 | this.windowZindex = $interface.css( 'z-index' ); |
302 | 298 | |
303 | 299 | $interface.css( { |
304 | | - 'position' : 'absolute', |
| 300 | + 'position' : 'fixed', |
305 | 301 | 'z-index' : mw.getConfig( 'fullScreenIndex' ) |
306 | 302 | } ); |
307 | 303 | |
— | — | @@ -318,8 +314,8 @@ |
319 | 315 | $interface.animate( { |
320 | 316 | 'top' : topOffset, |
321 | 317 | 'left' : leftOffset, |
322 | | - 'width' : '100%', |
323 | | - 'height' : '100%' |
| 318 | + 'width' : $j( window ).width(), |
| 319 | + 'height' : $j( window ).height() |
324 | 320 | } ) |
325 | 321 | |
326 | 322 | // Set the player height width: |
— | — | @@ -341,16 +337,15 @@ |
342 | 338 | _this.mouseMovedFlag = true; |
343 | 339 | }); |
344 | 340 | // Check every 2 seconds reset flag status: |
345 | | - function checkMovedMouse(){ |
346 | | - mw.log("checkMovedMouse::" + _this.mouseMovedFlag ); |
| 341 | + function checkMovedMouse(){ |
347 | 342 | if( _this.fullscreenMode ){ |
348 | 343 | if( _this.mouseMovedFlag ){ |
349 | 344 | _this.mouseMovedFlag = false; |
350 | 345 | _this.showControlBar(); |
351 | | - // once we move the mouse keep displayed for 5 seconds |
352 | | - setTimeout(checkMovedMouse, 5000); |
| 346 | + // Once we move the mouse keep displayed for 4 seconds |
| 347 | + setTimeout(checkMovedMouse, 4000); |
353 | 348 | }else{ |
354 | | - // Check for mouse movment every 250ms |
| 349 | + // Check for mouse movement every 250ms |
355 | 350 | _this.hideControlBar(); |
356 | 351 | setTimeout(checkMovedMouse, 250 ); |
357 | 352 | } |
— | — | @@ -358,10 +353,17 @@ |
359 | 354 | }; |
360 | 355 | checkMovedMouse(); |
361 | 356 | |
| 357 | + // Bind Scroll position update |
362 | 358 | |
363 | | - |
364 | 359 | // Bind resize resize window to resize window |
365 | 360 | $j( window ).resize( function() { |
| 361 | + // UPdate interface container: |
| 362 | + $interface.css( { |
| 363 | + 'top' : '0px', |
| 364 | + 'left' : '0px', |
| 365 | + 'width' : $j( window ).width(), |
| 366 | + 'height' : $j( window ).height() |
| 367 | + } ) |
366 | 368 | // Update player size |
367 | 369 | $j( embedPlayer ).css( _this.getFullscreenPlayerCss() ); |
368 | 370 | |
— | — | @@ -465,8 +467,13 @@ |
466 | 468 | if( _this.checkOverlayControls() ) { |
467 | 469 | // Add a special absolute overlay for hover ( to keep menu displayed |
468 | 470 | $j( embedPlayer.$interface ).hover( |
469 | | - function(){ |
470 | | - _this.showControlBar() |
| 471 | + function(){ |
| 472 | + // Show controls with a set timeout ( avoid fade in fade out on short mouse over ) |
| 473 | + setTimeout( function() { |
| 474 | + if( mouseIn ){ |
| 475 | + _this.showControlBar() |
| 476 | + } |
| 477 | + }, 250 ); |
471 | 478 | mouseIn = true; |
472 | 479 | }, |
473 | 480 | function(){ |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/nativeEmbed.js |
— | — | @@ -375,7 +375,7 @@ |
376 | 376 | * Local method for can play through |
377 | 377 | * fired when done video can play through without re-buffering |
378 | 378 | */ |
379 | | - oncanplaythrough : function() { |
| 379 | + oncanplaythrough: function() { |
380 | 380 | mw.log('f:oncanplaythrough'); |
381 | 381 | this.getPlayerElement(); |
382 | 382 | if ( ! this.paused ) |