Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php |
— | — | @@ -24,7 +24,10 @@ |
25 | 25 | $this->textHandler = new TextHandler( $this->file ); |
26 | 26 | } |
27 | 27 | |
28 | | - function getPosterUrl(){ |
| 28 | + /** |
| 29 | + * Get the media transform thumbnail |
| 30 | + */ |
| 31 | + function getUrl(){ |
29 | 32 | global $wgStylePath; |
30 | 33 | if ( $this->isVideo && $this->thumbUrl ) { |
31 | 34 | return $this->thumbUrl; |
— | — | @@ -33,6 +36,7 @@ |
34 | 37 | return "$wgStylePath/common/images/icons/fileicon-ogg.png"; |
35 | 38 | } |
36 | 39 | |
| 40 | + |
37 | 41 | function getPlayerHeight(){ |
38 | 42 | // Check if "video" tag output: |
39 | 43 | if ( $this->isVideo ) { |
— | — | @@ -84,7 +88,7 @@ |
85 | 89 | ), |
86 | 90 | Xml::tags( 'img', array( |
87 | 91 | 'style' => 'width:100%;height:100%;', |
88 | | - 'src' => $this->getPosterUrl(), |
| 92 | + 'src' => $this->getUrl(), |
89 | 93 | ),'') |
90 | 94 | . |
91 | 95 | // For javascript disabled browsers provide a link to the asset: |
— | — | @@ -152,7 +156,7 @@ |
153 | 157 | $mediaAttr = array( |
154 | 158 | 'id' => self::PLAYER_ID_PREFIX . TimedMediaTransformOutput::$serial++, |
155 | 159 | 'style' => "width:{$width}px;height:{$height}px", |
156 | | - 'poster' => $this->getPosterUrl(), |
| 160 | + 'poster' => $this->getUrl(), |
157 | 161 | 'alt' => $this->file->getTitle()->getText(), |
158 | 162 | |
159 | 163 | // Note we set controls to true ( for no-js players ) when mwEmbed rewrites the interface |
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php |
— | — | @@ -253,7 +253,7 @@ |
254 | 254 | global $wgLang; |
255 | 255 | $derivativeFile = self::getDerivativeFilePath( $file, $transcodeKey); |
256 | 256 | |
257 | | - $thumbName = $file->thumbName( array() ); |
| 257 | + $thumbName = $file->thumbName( array() ); |
258 | 258 | $thumbUrl = $file->getThumbUrl( $thumbName ); |
259 | 259 | $thumbUrlDir = dirname( $thumbUrl ); |
260 | 260 | |