r90625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90624‎ | r90625 | r90626 >
Date:23:02, 22 June 2011
Author:dale
Status:deferred
Tags:
Comment:
make attributes into string property to match css based attribute
fix to grab the current src for download link output
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php
@@ -131,12 +131,11 @@
132132 function getXmlMediaTagOutput( $sizeOverride = array() ){
133133 // Try to get the first source src attribute ( usually this should be the source file )
134134 $mediaSources = $this->getMediaSources();
135 - $firstSource = current( reset( $mediaSources ) );
 135+ $firstSource = current( $mediaSources );
136136 if( !$firstSource['src'] ){
137137 // XXX media handlers don't seem to work with exceptions..
138138 return 'Error missing media source';
139139 };
140 -
141140 // Build the video tag output:
142141 $s = Xml::tags( $this->getTagName(), $this->getMediaAttr( $sizeOverride ),
143142
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -660,8 +660,8 @@
661661 */
662662 loadPlayerSize: function( element ) {
663663 // 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+ this.height = element.height ? element.height + '' : $(element).css( 'height' );
 665+ this.width = element.width ? element.width + '' : $(element).css( 'width' );
666666 // Special check for chrome 100% with re-mapping to 32px
667667 // ( hopefully no one embeds video at 32x32 )
668668 if( this.height == '32px' || this.height =='32px' ){
@@ -693,8 +693,8 @@
694694
695695
696696 // Special case for audio
697 - // Firefox sets audio height to "0px" while webkit uses 32px .. force
698 - // zero:
 697+
 698+ // Firefox sets audio height to "0px" while webkit uses 32px .. force zero:
699699 if( this.isAudio() && this.height == '32' ) {
700700 this.height = 20;
701701 }

Status & tagging log