This repository has been archived by the owner on Apr 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOggHandler.php
93 lines (78 loc) · 3.07 KB
/
OggHandler.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
echo "This is the OggHandler extension. Please see the README file for installation instructions.\n";
exit( 1 );
}
$oggDir = dirname(__FILE__);
$wgAutoloadClasses['OggHandler'] = "$oggDir/OggHandler_body.php";
$wgAutoloadClasses['OggVideoDisplay'] = "$oggDir/OggHandler_body.php";
$wgAutoloadClasses['OggAudioDisplay'] = "$oggDir/OggHandler_body.php";
$wgAutoloadClasses['OggTransformOutput'] = "$oggDir/OggHandler_body.php";
$wgAutoloadClasses['OggHandlerPlayer'] = "$oggDir/OggHandler_body.php";
$wgMediaHandlers['application/ogg'] = 'OggHandler';
if ( !in_array( 'ogg', $wgFileExtensions ) ) {
$wgFileExtensions[] = 'ogg';
}
if ( !in_array( 'ogv', $wgFileExtensions ) ) {
$wgFileExtensions[] = 'ogv';
}
if ( !in_array( 'oga', $wgFileExtensions ) ) {
$wgFileExtensions[] = 'oga';
}
if ( !in_array( 'mp4', $wgFileExtensions ) ) {
$wgFileExtensions[] = 'mp4';
}
ini_set( 'include_path',
"$oggDir/PEAR/File_Ogg" .
PATH_SEPARATOR .
ini_get( 'include_path' ) );
// Bump this when updating OggPlayer.js to help update caches
$wgOggScriptVersion = '14';
$wgExtensionMessagesFiles['OggHandler'] = "$oggDir/OggHandler.i18n.php";
$wgExtensionMessagesFiles['OggHandlerMagic'] = "$oggDir/OggHandler.i18n.magic.php";
$wgParserOutputHooks['OggHandler'] = array( 'OggHandler', 'outputHook' );
$wgHooks['ExtractThumbParameters'][] = 'OggHandler::onExtractThumbParameters';
$wgExtensionCredits['media'][] = array(
'path' => __FILE__,
'name' => 'OggHandler',
'author' => 'Tim Starling',
'url' => 'https://www.mediawiki.org/wiki/Extension:OggHandler',
'descriptionmsg' => 'ogg-desc',
);
/******************* CONFIGURATION STARTS HERE **********************/
/**
* The names of the supported video types, as they appear in the PEAR module.
*/
$wgOggVideoTypes = array( 'Theora' );
/**
* The names of the supported audio types, as they appear in the PEAR module.
* These types will be described as audio, but only Vorbis is widely supported
* by the client-side plugins.
*/
$wgOggAudioTypes = array( 'Vorbis', 'Speex', 'FLAC' );
/**
* Location of the FFmpeg binary, or false to use oggThumb. See the notes
* about thumbnailer choices in the README file.
*/
$wgFFmpegLocation = '/usr/bin/ffmpeg';
/**
* Location of the oggThumb binary, or false to use FFmpeg. Note that only
* version 0.9 (expected release in May 2010) or later is supported. See the
* README file for more details.
*/
$wgOggThumbLocation = false;
/**
* Filename or URL path to the Cortado Java player applet.
*
* If no path is included, the path to this extension's
* directory will be used by default -- this should work
* on most local installations.
*
* You may need to include a full URL here if $wgUploadPath
* specifies a host different from where the wiki pages are
* served -- the applet .jar file must come from the same host
* as the uploaded media files or Java security rules will
* prevent the applet from loading them.
*/
$wgCortadoJarFile = "cortado-ovt-stripped-0.6.0.jar";
/******************* CONFIGURATION ENDS HERE **********************/