Index: trunk/extensions/TimedMediaHandler/handlers/WebMHandler/WebMHandler.php |
— | — | @@ -77,9 +77,9 @@ |
78 | 78 | $metadata = self::unpackMetadata( $file->getMetadata() ); |
79 | 79 | if ( !$metadata || isset( $metadata['error'] ) ) { |
80 | 80 | return false; |
81 | | - } |
| 81 | + } |
82 | 82 | // id3 gives 'V_VP8' for what we call VP8 |
83 | | - if( $metadata['audio']['dataformat'] == 'vorbis' ){ |
| 83 | + if( isset( $metadata['audio'] ) && $metadata['audio']['dataformat'] == 'vorbis' ){ |
84 | 84 | $streamTypes[] = 'Vorbis'; |
85 | 85 | } |
86 | 86 | if( $metadata['video']['dataformat'] == 'V_VP8' ){ |
Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler_body.php |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | } |
87 | 87 | function parserTransformHook( $parser, $file ) { |
88 | 88 | if ( isset( $parser->mOutput->hasTimedMediaTransform ) ) { |
89 | | - return; |
| 89 | + return ; |
90 | 90 | } |
91 | 91 | $parser->mOutput->hasTimedMediaTransform = true; |
92 | 92 | $parser->mOutput->addOutputHook( 'TimedMediaHandler' ); |
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | // Check maxSize |
198 | 198 | if (isset( $options['maxSize'] ) && intval( $options['maxSize'] ) > 0) { |
199 | 199 | // Get size transform ( if maxSize is > file, file size is used: |
200 | | - list( $width, $height ) = WebVideoTranscode::getMaxSizeTransform( $file, $options['maxSize'] ) |
| 200 | + list( $width, $height ) = WebVideoTranscode::getMaxSizeTransform( $file, $options['maxSize'] ); |
201 | 201 | $cmd.= ' -s ' . intval( $width ) . 'x' . intval( $height ); |
202 | 202 | } else if ( |
203 | 203 | (isset( $options['width'] ) && $options['width'] > 0 ) |
Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | static function register(){ |
14 | 14 | global $wgParserOutputHooks, $wgHooks, $wgJobClasses, $wgJobExplitRequestTypes, |
15 | 15 | $wgMediaHandlers, $wgResourceModules, $wgExcludeFromThumbnailPurge, |
16 | | - $wgTimedMediaHandlerFileExtensions, $wgParserOutputHooks; |
| 16 | + $wgTimedMediaHandlerFileExtensions, $wgParserOutputHooks, $wgOut; |
17 | 17 | |
18 | 18 | // Setup media Handlers: |
19 | 19 | $wgMediaHandlers['application/ogg'] = 'OggHandler'; |
— | — | @@ -42,6 +42,8 @@ |
43 | 43 | 'remoteExtPath' => 'TimedMediaHandler', |
44 | 44 | ) |
45 | 45 | ); |
| 46 | + // We should probalby move this to a parser function but not working right in |
| 47 | + $wgHooks['BeforePageDisplay'][] = 'TimedMediaHandlerHooks::pageOutputHook'; |
46 | 48 | |
47 | 49 | |
48 | 50 | // Exclude transcoded assets from normal thumbnail purging |
— | — | @@ -80,5 +82,11 @@ |
81 | 83 | define( "NS_TIMEDTEXT", $timedTextNS); |
82 | 84 | define( "NS_TIMEDTEXT_TALK", $timedTextNS +1); |
83 | 85 | } |
| 86 | + static function pageOutputHook( &$out, &$sk ){ |
| 87 | + // FIXME we should only need to add this via parser output hook |
| 88 | + $out->addModules( 'PopUpMediaTransform' ); |
| 89 | + $out->addModuleStyles( 'PopUpMediaTransform' ); |
| 90 | + return true; |
| 91 | + } |
84 | 92 | |
85 | 93 | } |
\ No newline at end of file |
Index: trunk/extensions/TimedMediaHandler/resources/PopUpThumbVideo.js |
— | — | @@ -9,8 +9,8 @@ |
10 | 10 | $(this).find('a').click( function(){ |
11 | 11 | var $video = $( unescape( $(_parent).attr('data-videopayload') ) ); |
12 | 12 | mw.addDialog({ |
13 | | - 'width' : parseInt( $video.css('width') ) + 25, |
14 | | - 'height' : parseInt( $video.css('height') ) + 45, |
| 13 | + 'width' : parseInt( $video.css('width') ) + 35, |
| 14 | + 'height' : parseInt( $video.css('height') ) + 55, |
15 | 15 | 'title' : $video.attr('data-mwtitle'), |
16 | 16 | 'content' : $video |
17 | 17 | }) |