Extension:MultimediaPlayer
![]() | A request to archive this extension has been made on Phabricator. See task T349154 for the archival request and the rationale for the request, and to leave comments about the request. |
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. Please see the following alternatives that you may wish to install instead of this extension: |
![]() Release status: unmaintained |
|
---|---|
Implementation | Tag , Parser function |
Description | Plays a list of multimedia files |
Author(s) | Ike Hecht (tosfostalk) |
Latest version | 0.3.3 (September 2014) |
MediaWiki | 1.23+ |
PHP | 5.3+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | |
|
|
multimediacontainer |
|
Quarterly downloads | 15 (Ranked 150th) |
Translate the MultimediaPlayer extension if it is available at translatewiki.net | |
The MultimediaPlayer plays a list of multimedia files. It is intended for use with multimedia items hosted by an external service - not stored in the wiki.
It creates one player per page and allows users to load that player by choosing an item from a list. Out-of-the-box support is provided for DailyMotion, Instagram, SoundCloud, YouTube, Vimeo and Vine. Admins can also add additional sources to their LocalSettings.php. For mobile compatibility, the player acts responsively where possible.
Installation[edit]
- Download and place the file(s) in a directory called
MultimediaPlayer
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
require_once "$IP/extensions/MultimediaPlayer/MultimediaPlayer.php";
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration parameters (advanced)[edit]
- $wgMultimediaPlayerSources
- Expects an array (key=>value) where:
- key is the name of a source, to be included as the first argument to the #multimediaitem parser function
- value is the code to render that source, with $1 as a placeholder for the item's id, which is also the second argument to the #multimediaitem parser function
- For example, to include YouTube as a source:
$wgMultimediaPlayerSources = array(
'YouTube' => '<iframe width="560" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'
);
- (This is for illustration. The extension already has built-in support for YouTube.)
- $wgMultimediaPlayerKnownSources
- List of keys for the default sources that will be loaded. This is mainly here so that admins can remove sources that they do not want supported in their wiki.
- For example, to disable all known sources other than YouTube:
$wgMultimediaPlayerKnownSources = array( 'YouTube' );
Usage[edit]
Include the player[edit]
Include the player on the page by inserting <multimediacontainer />
where desired. Note that the container will take up the entire width of its parent element. So you may want to put it in a div. See the example below.
Include some items[edit]
Include items on the page by inserting {{#multimediaitem:SourceName|ItemID|LinkText}}
.
Example[edit]
After installing, you can test your installation by creating a page and inserting the following code:
<div style="max-width: 750px"><multimediacontainer /></div> * {{#multimediaitem:DailyMotion|xmzl5|DailyMotion test}} * {{#multimediaitem:Instagram|HNZIJuy-rt|Instagram test}} * {{#multimediaitem:SoundCloud|16040214|SoundCloud test}} * {{#multimediaitem:YouTube|DWef69ItVrU|YouTube test}} * {{#multimediaitem:Vimeo|8758454|Vimeo test}} * {{#multimediaitem:Vine|bjHh0zHdgZT|Vine test}}