Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php |
— | — | @@ -204,9 +204,12 @@ |
205 | 205 | $posterUrl = $apiUrl; |
206 | 206 | } |
207 | 207 | } |
208 | | - $mediaAttr = array( |
| 208 | + $mediaAttr = array( |
209 | 209 | 'id' => self::PLAYER_ID_PREFIX . TimedMediaTransformOutput::$serial++, |
210 | 210 | 'style' => "width:{$width}px;height:{$height}px", |
| 211 | + // also set direct width height attributes for IE html elements to retain properties: |
| 212 | + 'width' => $width, |
| 213 | + 'height' => $height, |
211 | 214 | // Get the correct size: |
212 | 215 | 'poster' => $posterUrl, |
213 | 216 | 'alt' => $this->file->getTitle()->getText(), |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js |
— | — | @@ -601,6 +601,7 @@ |
602 | 602 | |
603 | 603 | // Set the player size attributes based loaded video element: |
604 | 604 | this.loadPlayerSize( element ); |
| 605 | + |
605 | 606 | // Set the plugin id |
606 | 607 | this.pid = 'pid_' + this.id; |
607 | 608 | |
— | — | @@ -658,8 +659,9 @@ |
659 | 660 | * element Source element to grab size from |
660 | 661 | */ |
661 | 662 | loadPlayerSize: function( element ) { |
662 | | - this.height = $(element).css( 'height' ); |
663 | | - this.width = $(element).css( 'width' ); |
| 663 | + // check for direct element attribute: |
| 664 | + this.height = element.height ? element.height : $(element).css( 'height' ); |
| 665 | + this.width = element.width ? element.width : $(element).css( 'width' ); |
664 | 666 | // Special check for chrome 100% with re-mapping to 32px |
665 | 667 | // ( hopefully no one embeds video at 32x32 ) |
666 | 668 | if( this.height == '32px' || this.height =='32px' ){ |