Extension:AudioPlayer2

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
AudioPlayer2

Release status: stable

Implementation Tag
Description Provides embedded audio playback using WordPress Audio Player Standalone.
Author(s) Ulrich Christensen (UChristensentalk)
Latest version 1.1 (2012-07-05)
MediaWiki 1.19.x and up (at least)
License GNU General Public License 2.0 or later
Download https://github.com/ubcudvikler/AudioPlayer2
Example http://www.horsensleksikon.dk/
Parameters

$wgAudioPlayerPluginPath, $wgAudioPlayer2Settings

Hooks used
ParserFirstCallInit

ParserAfterTidy
OutputPageParserOutput

Translate the AudioPlayer2 extension if possible

Check usage and version matrix; code metrics

The AudioPlayer2 extension lets you embed MP3 audio files on your wiki via WordPress Audio Player Standalone.

Installation[edit | edit source]

  • Download and extract the files in a directory called AudioPlayer2 in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/AudioPlayer2/AudioPlayer2.php" );
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit | edit source]

$wgAudioPlayerPluginPath
Set the path to WordPress Audio Player Standalone files which must be installed separately for this extension to work.
$wgAudioPlayer2Settings['width']
If set, specifies the width of the Flash player when opened. (default width: 380)

Example:

   $wgAudioPlayer2Settings['width'] = 380;
$wgAudioPlayer2Settings['tags']
If set, specifies the list of tags that this extension should handle, otherwise "player" is used. This setting is for interoperability and easy drop-in replacement.

Example:

   $wgAudioPlayer2Settings['tags'] = array('player','audioplayer');
$wgAudioPlayer2Settings['colours']
If set, specifies the colours of the different parts of the player. See here for reference of which elements can be changed.

Example:

   $wgAudioPlayer2Settings['colours']['leftbg'] = '00F80F';

Usage[edit | edit source]

The <player> (or whichever you choose) tag can be used to embed MP3 audio content into wiki pages:

   <player>test.mp3</player>

Tag Attributes[edit | edit source]

The following attributes can be used in <player> tags:

title
sets/overwrites the title of the file being played. If not specified, ID3 data if available is used.
artist
set/overwrites the artist name for the file being played. If not specified, ID3 data if available is used.
   <player title="Title">test.mp3</player>
   
   <player artist="Artist" title="Title">test.mp3</player>