r84072 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84071‎ | r84072 | r84073 >
Date:01:07, 16 March 2011
Author:dale
Status:deferred
Tags:
Comment:
fixed local transform method name that was giving missing thumbnails for videos requested over the api
Modified paths:
  • /trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php
@@ -24,7 +24,10 @@
2525 $this->textHandler = new TextHandler( $this->file );
2626 }
2727
28 - function getPosterUrl(){
 28+ /**
 29+ * Get the media transform thumbnail
 30+ */
 31+ function getUrl(){
2932 global $wgStylePath;
3033 if ( $this->isVideo && $this->thumbUrl ) {
3134 return $this->thumbUrl;
@@ -33,6 +36,7 @@
3437 return "$wgStylePath/common/images/icons/fileicon-ogg.png";
3538 }
3639
 40+
3741 function getPlayerHeight(){
3842 // Check if "video" tag output:
3943 if ( $this->isVideo ) {
@@ -84,7 +88,7 @@
8589 ),
8690 Xml::tags( 'img', array(
8791 'style' => 'width:100%;height:100%;',
88 - 'src' => $this->getPosterUrl(),
 92+ 'src' => $this->getUrl(),
8993 ),'')
9094 .
9195 // For javascript disabled browsers provide a link to the asset:
@@ -152,7 +156,7 @@
153157 $mediaAttr = array(
154158 'id' => self::PLAYER_ID_PREFIX . TimedMediaTransformOutput::$serial++,
155159 'style' => "width:{$width}px;height:{$height}px",
156 - 'poster' => $this->getPosterUrl(),
 160+ 'poster' => $this->getUrl(),
157161 'alt' => $this->file->getTitle()->getText(),
158162
159163 // 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 @@
254254 global $wgLang;
255255 $derivativeFile = self::getDerivativeFilePath( $file, $transcodeKey);
256256
257 - $thumbName = $file->thumbName( array() );
 257+ $thumbName = $file->thumbName( array() );
258258 $thumbUrl = $file->getThumbUrl( $thumbName );
259259 $thumbUrlDir = dirname( $thumbUrl );
260260

Status & tagging log