Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler_body.php |
— | — | @@ -183,12 +183,14 @@ |
184 | 184 | $srcWidth = $file->getWidth(); |
185 | 185 | $srcHeight = $file->getHeight(); |
186 | 186 | |
187 | | - $params['width'] = isset( $params['width'] )? $params['width'] : $srcWidth; |
188 | | - // don't upscale: |
189 | | - if( $params['width'] > $srcWidth ){ |
190 | | - $params['width'] = $srcWidth; |
| 187 | + // Audio should not be transformed by size, give it a default width and height |
| 188 | + if( $this->isAudio( $file ) ){ |
| 189 | + $srcWidth = 220; |
| 190 | + $srcHeight = 23; |
191 | 191 | } |
192 | 192 | |
| 193 | + $params['width'] = isset( $params['width'] ) ? $params['width'] : $srcWidth; |
| 194 | + |
193 | 195 | $options = array( |
194 | 196 | 'file' => $file, |
195 | 197 | 'length' => $this->getLength( $file ), |
Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php |
— | — | @@ -56,15 +56,6 @@ |
57 | 57 | return 23; |
58 | 58 | } |
59 | 59 | } |
60 | | - function getPlayerWidth(){ |
61 | | - // Check if "video" tag output: |
62 | | - if ( $this->isVideo ) { |
63 | | - return intval( $this->width ); |
64 | | - } else { |
65 | | - // Give sound files a width of 220px |
66 | | - return 220; |
67 | | - } |
68 | | - } |
69 | 60 | |
70 | 61 | function getTagName(){ |
71 | 62 | return ( $this->isVideo ) ? 'video' : 'audio'; |
— | — | @@ -101,8 +92,8 @@ |
102 | 93 | return Xml::tags( 'div' , array( |
103 | 94 | 'id' => "ogg_thumbplayer_" . TimedMediaTransformOutput::$serial++, |
104 | 95 | 'class' => 'PopUpMediaTransform', |
105 | | - 'style' => "width:" . intval( $this->getPlayerWidth() ) . "px;height:" . |
106 | | - intval( $this->getPlayerHeight() ) . "px", |
| 96 | + 'style' => "width:" . intval( $this->width ) . "px;height:" . |
| 97 | + intval( $this->height ) . "px", |
107 | 98 | 'data-videopayload' => $this->getXmlMediaTagOutput( $this->getPopupPlayerSize() ), |
108 | 99 | ), |
109 | 100 | Xml::tags( 'img', array( |
— | — | @@ -199,9 +190,9 @@ |
200 | 191 | $length = floatval( $this->length ); |
201 | 192 | $offset = floatval( $this->offset ); |
202 | 193 | |
203 | | - $width = $sizeOverride ? $sizeOverride[0] : $this->getPlayerWidth(); |
204 | | - $height = $sizeOverride ? $sizeOverride[1]: $this->getPlayerHeight(); |
205 | | - |
| 194 | + $width = $sizeOverride ? $sizeOverride[0] : $this->width; |
| 195 | + $height = $sizeOverride ? $sizeOverride[1]: $this->height; |
| 196 | + |
206 | 197 | // The poster url: |
207 | 198 | $posterUrl = $this->getUrl(); |
208 | 199 | |
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php |
— | — | @@ -93,7 +93,6 @@ |
94 | 94 | } |
95 | 95 | |
96 | 96 | // If status is oky move the file to its final destination. ( timedMediaHandler will look for it there ) |
97 | | - // @@todo we should use some status class of some sort |
98 | 97 | if( $status === true ){ |
99 | 98 | $finalDerivativeFilePath = WebVideoTranscode::getDerivativeFilePath( $file, $transcodeKey); |
100 | 99 | wfSuppressWarnings(); |