Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r151'; |
| 8 | +var mwRemoteVersion = 'r152'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | // Log the mwRemote version makes it easy to debug cache issues |
— | — | @@ -397,11 +397,11 @@ |
398 | 398 | |
399 | 399 | // If in a gallery box or filehistory we will be displaying the video larger in a lightbox |
400 | 400 | if( $j( '#' + vidId ).parents( '.gallerybox,.filehistory' ).length ){ |
401 | | - // Update the width to 420 and keep scale |
402 | 401 | pwidth = 400; |
| 402 | + // Update the width to 400 and keep scale |
403 | 403 | if( pheight != 0 ) { |
404 | | - pheight = pwidth * ( $j( '#' + vidId ).height() / $j( '#' + vidId ).width() ); |
405 | | - } |
| 404 | + pheight = pwidth * ( $j( '#' + vidId + ' img' ).height() / $j( '#' + vidId + ' img' ).width() ); |
| 405 | + } |
406 | 406 | } |
407 | 407 | |
408 | 408 | if ( src ) { |
— | — | @@ -459,10 +459,9 @@ |
460 | 460 | .addClass( 'play-btn-large' ) |
461 | 461 | .buttonHover() |
462 | 462 | .click( function(){ |
463 | | - var _this = this; |
464 | | - |
| 463 | + var _this = this; |
465 | 464 | var dialogHeight = ( pheight == 0 )? 175 : |
466 | | - ( pheight + 30 ); |
| 465 | + ( pheight + 130 ); |
467 | 466 | var buttons = {}; |
468 | 467 | buttons[ gM( 'mwe-ok' ) ] = function(){ |
469 | 468 | var embedPlayer = $j( '#mwe_' + $j( _this ).data( 'playerId' ) ).get(0); |
— | — | @@ -482,9 +481,8 @@ |
483 | 482 | }) |
484 | 483 | |
485 | 484 | // Update the embed code to use the mwEmbed player: |
486 | | - $j( '#mwe_' + vidId ).embedPlayer( function(){ |
487 | | - var embedPlayer = $j( '#mwe_' + vidId ).get(0); |
488 | | - embedPlayer.play(); |
| 485 | + $j( '#mwe_' + vidId ).embedPlayer( { 'autoplay' : true }, function(){ |
| 486 | + var embedPlayer = $j( '#mwe_' + vidId ).get(0); |
489 | 487 | // Show the control bar for two seconds (auto play is confusing without it ) |
490 | 488 | embedPlayer.controlBuilder.showControlBar(); |
491 | 489 | // hide the controls if they should they are overlayed on the video |