Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.php |
— | — | @@ -10,6 +10,12 @@ |
11 | 11 | exit( 1 ); |
12 | 12 | } |
13 | 13 | |
| 14 | +// Set up the timed media handler dir: |
| 15 | +$timedMediaDir = dirname(__FILE__); |
| 16 | +// Include WebVideoTranscode ( prior to config so that its defined transcode keys can be used in configuration ) |
| 17 | +$wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php"; |
| 18 | + |
| 19 | + |
14 | 20 | /******************* CONFIGURATION STARTS HERE **********************/ |
15 | 21 | |
16 | 22 | /*** MwEmbed module configuration: *********************************/ |
— | — | @@ -74,18 +80,13 @@ |
75 | 81 | ); |
76 | 82 | /******************* CONFIGURATION ENDS HERE **********************/ |
77 | 83 | |
78 | | -// Set up the timed media handler dir: |
79 | | -$timedMediaDir = dirname(__FILE__); |
80 | 84 | |
81 | | -// List of extensions handled by Timed Media Handler since its refrenced in a few places. |
| 85 | + |
| 86 | +// List of extensions handled by Timed Media Handler since its referenced in a few places. |
82 | 87 | // you should not modify this variable |
83 | 88 | $tmhFileExtensions = array( 'ogg', 'ogv', 'oga', 'webm'); |
84 | 89 | |
85 | | -foreach($tmhFileExtensions as $ext ){ |
86 | | - if ( !in_array( $ext, $wgFileExtensions ) ) { |
87 | | - $wgFileExtensions[] = $ext; |
88 | | - } |
89 | | -} |
| 90 | +$wgFileExtensions = array_merge($wgFileExtensions, $tmhFileExtensions); |
90 | 91 | |
91 | 92 | // Timed Media Handler AutoLoad Classes: |
92 | 93 | $wgAutoloadClasses['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler_body.php"; |
— | — | @@ -109,7 +110,6 @@ |
110 | 111 | $wgAutoloadClasses['TextHandler'] = "$timedMediaDir/handlers/TextHandler/TextHandler.php"; |
111 | 112 | |
112 | 113 | // Transcode support |
113 | | -$wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php"; |
114 | 114 | $wgAutoloadClasses['WebVideoTranscodeJob'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscodeJob.php"; |
115 | 115 | $wgAutoloadClasses['ApiQueryVideoInfo'] = "$timedMediaDir/ApiQueryVideoInfo.php"; |
116 | 116 | |