Extension:Flash Video

This extension helps you display a list of video files, with navigation by cue points. It was originally created for lectures.

See also FLVPlayer.



Syntax
The Flash Video extension use the tag to add a List of Video-Files that should be displayed in the Wiki. The flv-Files are external files. If the Video Files contain Cue Points, those are displayed and offered for navigation.

You need to install create wiki-video-player.swf to use this, so you need the commercial software Flash!

Sample
the flv-Tag takes several attributes and contains one line for each flv-file:

 first.flv|First things first second.flv|Second to none third.flv|Third time's a charm


 * Use the base attribute if all your flv-files are contained in one folder
 * the title attribute will be displayed bottom left on the player
 * each line inside the flv-tag consists of:
 * the URL or filename of the flv-files
 * the title of the movie (will be displayed top left in the player)
 * the title of the movie (will be displayed top left in the player)

Installation
You need to drop flv.php into your extensions-folder, and place  inside LocalSettings.php.

You also need to create wiki-video-player.swf from the [fla]-file. Change the URL of the Skin to fit your installation! Place the wiki-video-player.swf into your extension folder. The swf will try to load another swf that contains the skin of the video player. You can set the URL of this swf in the Parameters of the Video Player.

When you copy the followin Code: remove any whitespace before the EOM; on line 60. The E really needs to be the first character on this line.

The Code in flv.php:

setHook( "flv", "RenderFlv" ); } function RenderFlv( $input, $argv ) { global $wgServer, $wgScriptPath; //  // movie1|label1 // movie2|label2 //      // these values will be passed to the swf-file as parameters: // ...wiki-video-player.swf?base=...&title=...&movies=movie1|movie2&labels=label1|label2 $output = ""; $title = isset($argv['title']) ? $argv['title'] : 'Video'; $param = "title=". urlencode($title); if( isset($argv['base']) ) { $param .= "&base=". urlencode( $argv['base'] ); }     $width  = 550; $height = 280; $movies = array; $labels = array; foreach( explode("\n", $input) as $line ) { list($m,$l) = explode("|", $line); if ( strpos($m, ".flv") == strlen($m)-4 ) { array_push($movies, urlencode($m)); array_push($labels, urlencode($l)); }     }      $param .= "&movies=". join("|", $movies); $param .= "&labels=". join("|", $labels); $url = $wgServer. $wgScriptPath. "/extensions/wiki-video-player.swf"; $id = "wiki-video-player"; $output .=<<       EOM; $output = str_replace("\n", "", $output); return $output; }

?>