http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90625

Revision: 90625
Author:   dale
Date:     2011-06-22 23:02:53 +0000 (Wed, 22 Jun 2011)
Log Message:
-----------
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
    trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php

Modified: 
trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
===================================================================
--- 
trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
   2011-06-22 23:02:01 UTC (rev 90624)
+++ 
trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
   2011-06-22 23:02:53 UTC (rev 90625)
@@ -660,8 +660,8 @@
         */
        loadPlayerSize: function( element ) {
                // check for direct element attribute:
-               this.height = element.height ? element.height : $(element).css( 
'height' );
-               this.width = element.width ? element.width : $(element).css( 
'width' );
+               this.height = element.height ? element.height + '' : 
$(element).css( 'height' );
+               this.width = element.width ? element.width + '' : 
$(element).css( 'width' );
                // Special check for chrome 100% with re-mapping to 32px 
                // ( hopefully no one embeds video at 32x32 )
                if( this.height == '32px' || this.height =='32px' ){
@@ -693,8 +693,8 @@
 
 
                // Special case for audio
-               // Firefox sets audio height to "0px" while webkit uses 32px .. 
force
-               // zero:
+                                               
+               // Firefox sets audio height to "0px" while webkit uses 32px .. 
force zero:
                if( this.isAudio() && this.height == '32' ) {
                        this.height = 20;
                }

Modified: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php
===================================================================
--- trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php    
2011-06-22 23:02:01 UTC (rev 90624)
+++ trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php    
2011-06-22 23:02:53 UTC (rev 90625)
@@ -131,12 +131,11 @@
        function getXmlMediaTagOutput( $sizeOverride = array() ){
                // Try to get the first source src attribute ( usually this 
should be the source file )
                $mediaSources = $this->getMediaSources();
-               $firstSource = current( reset( $mediaSources ) );
+               $firstSource = current( $mediaSources );
                if( !$firstSource['src'] ){
                        // XXX media handlers don't seem to work with 
exceptions..
                        return 'Error missing media source';
                };
-
                // Build the video tag output:          
                $s = Xml::tags( $this->getTagName(), $this->getMediaAttr( 
$sizeOverride ),
        


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to