FLVPlayer

Summary: Embedding of Flash video (.flv) files into wiki pages the easy way.
Version: 2011-02-20
Prerequisites: pmwiki-2.1.x
Status: initial release
Maintainer: HaraldC?
Categories: Media Flash Video
Users: (view / edit)
Discussion: FLVPlayer-Talk

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.

Questions answered by this recipe

How can Flash video (*.flv) files easily be embedded into wiki pages?

Description

By installing this recipe, any link ending in .flv will automatically be converted to HTML code for an embedded Flash video.
To show the video, a slightly modified version of the FLV Player from Chicken Wing Software is used (included).

This recipe is based on the swf.php script from the Flash recipe.

Installation

Download the FLVPlayer.zipΔ package, unpack it to the cookbook/ directory so that the flv.php file and the flvplayer/ directory are placed in the cookbook/ directory.
Add the following line into config.php:

include_once("$FarmD/cookbook/flv.php");

Usage

In your wiki page use

%width="XXXpx" height="YYYpx"%Attach:my_video.flv

To center the Flash object use

%center%%width=XXXpx height=YYYpx%Attach:my_video.flv.

Upload your .flv file so that it will be found by the link in your wiki page.

If you want a start image shown in the player, put it in the same directory as your .flv file and name it with the full filename of that .flv file including the .flv extension plus a .png extension (e.g. .flv file: my_video.flv; start image file: my_video.flv.png ).

The %width=% and %height=% WikiStyles attributes are important and have to be set.
It is advisable to specify the width and the height according to the proportions of the video in the .flv file. Otherwise you may see the video distorted.

Configuration

The configuration parameters for the FLV player are located together with the player itself (file "player_flv_maxi.swf") in the file "player_flv_maxi.xml" in the cookbook/flvplayer/ directory. That file can be edited with any appropriate text editor.

For the meaning of the parameters see the FLV Player (Maxi version) documentation.

There is also a generator where one can configure a player online and then obtain the corresponding xml content.
Please do not use that content directly, but just apply (only) those parameters to the cookbook/flvplayer/player_flv_maxi.xml that are already present in the latter one.

Notes

If a start image is created and located as explained above it is shown in the player until the "Play" button is pushed (or one clicks into the player) and the .flv file starts loading. During the beginning of the file loading, the player shows a blank window.

Change log / Release notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

  • 2011-02-20 - initial release

Comments

See discussion at FLVPlayer-Talk

For problems in combination with PmWikis variable $EnableDirectDownload = 0; you'll find a workaround at the discussion-page FLVPlayer-Talk.

User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.