Différences entre les versions de « Aide:Extension MediaWikiPlayer »
m  | 
				|||
| (2 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
[[catégorie:Aide]]  | [[catégorie:Aide]]  | ||
 Information repris tel quel sur le site : http://wiki.swiftlytilting.com/MediawikiPlayer  | |||
'''MediawikiPlayer''' embeds the [http://www.longtailvideo.com/players/jw-flv-player/ JW FLV Media Player] into a wiki page.  | '''MediawikiPlayer''' embeds the [http://www.longtailvideo.com/players/jw-flv-player/ JW FLV Media Player] into a wiki page.  | ||
| Ligne 10 : | Ligne 13 : | ||
* Various XML playlists  | * Various XML playlists  | ||
==   | == Exemples ==  | ||
Voir aussi sur cette page : [[Test video]]  | |||
<br>  | |||
=== Video from Youtube ===  | === Video from Youtube ===  | ||
<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>  | <mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>  | ||
| Ligne 43 : | Ligne 47 : | ||
=== Media uploaded to the Wiki ===  | === Media uploaded to the Wiki ===  | ||
  <mediaplayer>File:UploadedMediafile.flv</mediaplayer>  |   <mediaplayer>File:UploadedMediafile.flv</mediaplayer>  | ||
==Installation==  | ==Installation==  | ||
Version actuelle datée du 2 mai 2017 à 20:20
Information repris tel quel sur le site : http://wiki.swiftlytilting.com/MediawikiPlayer
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
 
Exemples
Voir aussi sur cette page : Test video
Video from Youtube
<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>
<videopointer>2</videopointer>
Local Mp3 File
<mp3player >File:Quack.mp3</mp3player>
Usage
<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.
Simple
<mediaplayer>http://www.yourdomain.com/mediafile.flv</mediaplayer>
Using arguments
<mediaplayer width='500' height='300'>http://www.yourdomain.com/mediafile.flv</mediaplayer>
Using a preview image
<nowiki><mediaplayer image='http://domain.com/image.jpg'>http://www.yourdomain.com/mediafile.flv</mediaplayer></nowiki>
Youtube
<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>
Mp3 player
(simply sets default height='20')
<mp3player>http://www.yourdomain.com/mediafile.mp3</mp3player>
Media uploaded to the Wiki
<mediaplayer>File:UploadedMediafile.flv</mediaplayer>
Installation
To install this extension:
- Install MediawikiPlayer in yourwikidir/extensions/MediawikiPlayer/
 - 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
 
 - Add the following to LocalSettings.php:
 
require_once("$IP/extensions/MediawikiPlayer/MediawikiPlayer.php");
Configuration parameters
$wgMWPlayerDefaultSettings
An array of the default settings for the player.
Default array:
$wgMWPlayerDefaultSettings = array(
              'width' => '400',
              'height' => '300',
              'allowfullscreen' => 'true',
              'backcolor' => 'eeeeee',
              );
$wgMWPlayerDir
Directory where the media player flash and javascript files are located. Default is in the same folder as the MediawikiPlayer script. You don't
Default:
$wgMWPlayerDir = '/w/extensions/MediawikiPlayer';
$wgMWPlayerConfig
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">http://www.yourdomain.com/mediafile.flv</mediaplayer>
Change Log
v.0.2.2
- Additional XSS security errors fixed.
 - Prevented register_globals injections. All settings must be made after the require_once call in LocalSettings.php
 
v.0.2.1
- Fixed a bug when loading local files stored on the wiki
 
v.0.2.0
- 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
 
v.0.1.0
- First public release