This extension provides a media handler for the Ogg, WebM, mp4 container format.
This is a fork of the TimedMediaHandler extension, designed for use on Weird Gloop wikis, with the following changes:
- Removed VideoJS player and using raw
<audio>and<video>HTML tags instead - No embedding videos in iframes/modals/popovers
- Removed support for TimedText and closed captioning
- Removed
ogv.jscompatibility shim - Added
autoplayparameter for files: when enabled, autoplays and mutes media - Added
nocontrolsparameter for files: when enabled, shows no controls - Video transcoding is disabled by default (change
$wgEnabledTranscodeSetto enable) - Video elements have the
playsinlineattribute by default, for autoplay compatibility on iOS Safari
On our wikis, especially the RuneScape Wiki, we don't really have a need for custom player UIs that are
supplied with TimedMediaHandler by default. Both mwembed and VideoJS players are unnecessary fluff for us, compared to
letting the browser determine how to display the video by simply outputting <audio> and <video> tags.
Similarly, most of the media files on our wikis are either music (which only consists of instruments derived from MIDI), or sound effects. Therefore, we have no use in closed caption support (for now).
First, ensure that you have installed ffmpeg and Composer.
After you installed this extension, add the following to the end of your
LocalSettings.php to enable it:
wfLoadExtension( 'TimedMediaHandler' );
// Change the following line as appropriate
$wgFFmpegLocation = '/usr/bin/ffmpeg';
Then, run the following:
- Run the
maintenance/update.phpupdate script - Install Composer dependencies using
composer install --no-devinside of theextensions/TimedMediaHandlerdirectory.
For the most part, the configuration is the same as the original TimedMediaHandler, but with the following changes:
$wgTmhEnableMp4Uploadsis removed and mp4 files are supported by default in$wgTmhFileExtensions.$wgEnableIframeEmbedwas removed, as it is not used.$wgTimedTextNSand$wgTimedTextForeignNamespaceswas removed, as captions support has been dropped for now.