Extension:FLVPlayer
From MediaWiki.org
|
FLVPlayer Release status: unknown |
|
|---|---|
| Implementation | Tag |
| Description | This extension allows the display of flv movies within a wiki using the FlowPlayer FLV movie player. |
| Author(s) | Christopher Ottley |
| Version | 1.0 |
| Download | FLVPlayer code v1.00 (latest) |
The FLVPlayer extension allows the display of flv movies within a wiki using the FlowPlayer FLV movie player.
Contents |
[edit] Syntax
[edit] Base Syntax
<flvplayer width="320" height="240">filename.flv</flvplayer>
[edit] Attribute Reference
The following attribues are a subset of the configurable flashvars that is used by FlowPlayer.
- width=px or % (Specify the width of the movie when displayed)
- height=px or a% (Specify the height of the movie when displayed)
- loop=true/false (Loop the movie, default:true)
- autoplay=true/false (Automatically start playing the movie, default:false)
- hidecontrols=true/false (Hide the controls of FlowPlayer, default:false)
[edit] Examples
<flvplayer width="400" height="400" autoplay="true" hidecontrols="true">filename.flv</flvplayer> This starts playing the movie as soon as it is available for streaming and does not show any FlowPlayer controls to the user.
<flvplayer width="400" height="400" loop="true">filename.flv</flvplayer> This automatically sets the movie in looping mode as soon as it starts playing.
[edit] Installation
- Download the latest version of the code
- Copy the code into a file named FLVPlayer.php
- Save the file in the extensions/flvplayer directory of your mediawiki folder
- Add the line
include('extensions/flvplayer/FLVPlayer.php');to the end of your LocalSettings.php file (The name of your file is case sensitive!) - Download the latest Flowplayer file from sourceforge.net (not newer than 1.8)
- Extract FlowPlayer.swf from the zip file and place it in the extensions/flvplayer directory of your mediawiki folder
Now you can use the extension with <flvplayer>...</flvplayer> in the wiki.
[edit] Frequently Asked Questions
[edit] I can't upload Flash movie (*.flv) files!
If you cannot upload anything, then first enable uploads. Find the line #$wgDisableUploads = false; in LocalSettings.php and uncomment it.
Notice : Line became $wgEnableUploads = false;. Must be set to 'true'. (v1.9.3)
By default, Mediawiki still blocks many files from being uploaded for security reasons. Add this line your LocalSettings.php file, which will allow the upload of FLV files:
$wgFileExtensions[] = 'flv';
See also Help:Images and other uploads: You may also need to remove the desired extension from the filetype blacklist in /includes/DefaultSettings.php.
There may also be an issue with the Mime Type Filter. If you still cannot upload flv files, try adding $wgVerifyMimeType= false; in LocalSettings.php.
As an alternative, you can modify the script to allow you to link to outside flv files:
/* Generate final code */ function render() { $isUrl = ( strstr($this->file,'http://') == $this->file ); if($isUrl){ $this->url = $this->file; }else{ $this->url = $this->getViewPath($this->file); } $this->code = '<object type="application/x-shockwave-flash" data="' . $this->flowplayerpath . '" width="' . $this->width . '" height="' . $this->height . '" id="FlowPlayer"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' . $this->flowplayerpath . '" /><param name="quality" value="high" /><param name="scale" value="noScale" /><param name="wmode" value="transparent" /><param name="flashvars" value="videoFile=' . $this->url . '&baseURL=http://' . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $this->flashvars . '" /></object>'; return $this->code; }
Now you should be able to write:
<flvplayer width="400" height="400" loop="true">http://path.to.server/filename.flv</flvplayer>

