Aide:Extension MediaWikiPlayer

De plongeplo
Aller à la navigation Aller à la recherche

Information repris tel quel sur le site :

MediawikiPlayer embeds the JW FLV Media Player into a wiki page.

The JW FLV Media Player supports the following formats:

  • FLV
  • MP4 (H264/AAC)
  • MP3
  • Youtube
  • Various streaming servers
  • Various XML playlists


Voir aussi sur cette page : Test video

Video from Youtube



Local Mp3 File

<mp3player >File:Quack.mp3</mp3player>


<mediaplayer argument=value >mediaURL</mediaplayer>

The argument may be any parameter or "flashvar" supported by the JW FLV Player. See the list of flashvars for more information regarding options of the JW FLV player.



Using arguments

<mediaplayer width='500' height='300'></mediaplayer>

Using a preview image

<nowiki><mediaplayer image=''></mediaplayer></nowiki>



Mp3 player

(simply sets default height='20')


Media uploaded to the Wiki



To install this extension:

  1. Install MediawikiPlayer in yourwikidir/extensions/MediawikiPlayer/
  2. Install the following files from the JW FLV Media Player installation (available from this site) in yourwikidir/extensions/MediawikiPlayer/
    • player.swf
    • yt.swf (required for youtube support)
    • swfobject.js
  3. Add the following to LocalSettings.php:

Configuration parameters


An array of the default settings for the player.

Default array:

$wgMWPlayerDefaultSettings = array(
              'width' => '400',
              'height' => '300',
              'allowfullscreen' => 'true',
              'backcolor' => 'eeeeee',


Directory where the media player flash and javascript files are located. Default is in the same folder as the MediawikiPlayer script. You don't


$wgMWPlayerDir =  '/w/extensions/MediawikiPlayer'; 


An array of arrays to define multiple custom configurations.

$wgMWPlayerConfig = array( 
   'MyCustomConfig' => array ( 'width' => '400',
                               'height' => '300',
                               'allowfullscreen' => 'false',
                               'backcolor' => 'cccccc',
   'AnotherConfig' => array (  'width' => '600',
                               'height' => '400',
                               'allowfullscreen' => 'true',
                               'backcolor' => '000000',

To invoke one of these configurations in Mediawiki:

<mediaplayer MWPlayerConfig="MyCustomConfig"></mediaplayer>

Change Log


  • Additional XSS security errors fixed.
  • Prevented register_globals injections. All settings must be made after the require_once call in LocalSettings.php


  • Fixed a bug when loading local files stored on the wiki


  • Fixed XSS security risk.
  • Added ability to load media directly from the wiki using File:medianame.ext shortcut
  • Added ability to store various default configurations with $wgMWPlayerConfig


  • First public release