Release status: beta
|Description||Adds a media player for mp3 files on the wiki.|
|Author(s)||Mark Clements (HappyDogtalk)|
|Latest version||1.0.0 (2016-02-11)|
|License||No license specified|
|Quarterly downloads||37 (Ranked 139th)|
|Translate the MP3MediaHandler extension if it is available at translatewiki.net|
The MP3MediaHandler extension allows any .mp3 files that have been uploaded to be playable via an in-browser audio player. It uses the HTML5
<audio> tag if supported, with a fallback to a direct file link (which the browser will either play natively, open in a local media player or prompt the user to download).
In addition, it is possible to install a Flash-based media-player as an alternative fallback, so if the browser supports Flash, but not the
<audio> tag, then it will use this before falling-back to the native browser behaviour.
There are no essential requirements, but if you want to offer Flash as a fallback then you will need to download an appropriate Flash media player. Some examples are given below but any Flash player that supports mp3 playback may be used.
- Make sure that the required software is installed before you continue!
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your
wfLoadExtension( 'MP3MediaHandler' );
- Configure as required. (see also the examples provided)
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing this extension using
If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of
wfLoadExtension( 'MP3MediaHandler' );, you need to use:
|Variable name||Default value||Description|
|$wgFlashPlayerPath||(not set)||The URL (absolute, or relative to the wiki entry-point) of the .SWF file for the Flash player. If not set, then no Flash-based fallback is provided.|
|Flash Configuration (Only relevant if |
||The name of the parameter that will be used to pass the media-file URL to the SWF.|
||An array of key => value pairs of additional Flash configuration parameters. These will be added as |
||An array of key => value pairs of additional parameters that you need to pass to the SWF file. These will be output in the FlashVars |
|$wgFlashPlayerWidth||(not set)||These two variables may be set to control the width/height of the Flash player. If either is omitted then no value will be set, so the default Flash movie size will be used.|
Just make a wikilink to the MP3 file e.g. [[File:12ToccataAndFugueInDMinor_vbr.mp3]].
Specific Flash players
This section holds example configurations for popular Flash players that support mp3 files. Please add your own example configuration for any popular players not on this list.
Note that you only need to install/configure a fall-back Flash player if you need to support older browsers that haven't implemented the
<audio> tag for .mp3 files.
All examples assume the SWF file is placed in your root wiki folder. If it is located elsewhere then you will need to update
Mini MP3 Player
- Website: http://flash-mp3-player.net/players/mini/
- Direct SWF Link: http://flash-mp3-player.net/medias/player_mp3_mini.swf
$wgFlashPlayerPath = "player_mp3_mini.swf"; $wgFlashPlayerURLParam = "mp3"; $wgFlashPlayerParams = array( 'bgcolor' => "#5a5757", ); $wgFlashPlayerHeight = "20";