Flashplayer for DokuWiki

Note: Since HTML5 you can embed videos without Flash and Flash itself will go extinct in the medium term (as of August 2017). This page was kept for archive purposes. The plugin described here may get updated accordingly but so far there no plans yet for this.

While searching for a possibility to embed Flash videos (FLV) in DokuWiki pages, I found http://www.dokuwiki.org/plugin:flashplayer. With this plugin it is possible, to embed Flash videos using the command <flashplayer>.

However, this plugin had a problem: It generated an EMBED element in the HTML output, which is not conform to XHTML. Visitors do also not see, why a video is not played, in case neither Flash is installed nor JavaScript is activated.

A better approach ist using OBJECT elements, which comply to the standard.

Finally I extended the plugin by Sam Hall according to these requirements. It is suitable for DokuWiki 2008-05-05 or later and was tested with Internet Explorer 6, 7 and 8, Firefox 3.5 (Windows and Linux) and Webkit (Safari, Chrome)

Installation

Download Flash Video Player 2012-05-11 (112 KB)

After the download copy the extracted directory flashplayer to the directory /lib/plugins of DokuWiki.

Use

To embed a video use the following syntax:

<flashplayer width=Breite height=Höhe>Player-Parameter</flashplayer>

The player parameters are given as in an URL:

file=myvideo.flv
file=myvideo.flv&duration=26
file=myvideo.flv&image=myvideo.jpg
file=myvideo.flv&image=myvideo.jpg&duration=26

See http://arnowelzel.de/dw/demo_flashplayer as an example for the practical use.

Hint how to specify the file (parameter “file”)

When you upload video files as media in DokuWiki, you can not access them directly, but only via DokuWiki. You can use two variants for the “file” parameter:

  1. If the file .htaccess is not used: /lib/exe/fetch.php?media=Filename.flv
  2. With active .htaccess file: /_media/Filename.flv

Maybe the path has be to extended, if the Wiki installation is not in the root directory – e.g. /wiki/lib/exe/fetch.php?media=Filename.flv, if the Wiki is accessed using http://servername/wiki/.

Version history

2012-05-11: Bug fix for the handling of the “position” parameter.

2011-12-23: new version with JW FLV Player 5.8.2011

2011-08-14: new version with JW FLV Player 5.7.1896

2011-04-20: Version information fixed and modified according the recommendations for current DokuWiki versions.

2010-10-24: new version with JW FLV Player 5.3.1397

2010-05-15: new version with JW FLV Player 5.1.897

2010-02-26a: OBJECT-Element changed, so it works also with Webkit (Chrome, Safari).

2010-02-26: removed SWFObject – therefore no more problems with JavaScript.

2009-12-25: new version with JW FLV Player 5.0.753.

2009-06-14: added “position” parameter.

2009-01-17: new version with JW FLV Player 4.3.

2008-10-12: including the SWFObject scripts is not neccessary any longer! If your version is older, please update!