Once installed, the recipe provide the following markup to manage your multimedia data:
(:PLAYER_TYPE-player MEDIA_DATA OPTIONS:)
where:
PLAYER_TYPE
identifies the flash player used to handle the multimedia data. The recipe is able to handle several flash players concurrently. See sections below for further details and sample types.
MEDIA_DATA
is the multimedia content to render by itself, specified as a usual link target.
This could be either:
an Uploaded attachement: Attach:an_attached_video.flv,
an InterMap link: InterMap:something/somewhere/else.doc,
or a fully qualified external link: http://host/my/external/resource.dat.
The link target specification is handled by the Linked Resource Extras recipe. See there for syntaxic details and usage options.
OPTIONS
are all the extra parameters you may provide to the media player.
The recipe internally handles the following extra options (they are not forwarded to the media player):
[-/+]link, to provide or not a direct link to the media before or after the flash player itself.
[-/+]feed, to declare or not the media as an extra enclosure for the current page.
text="SOME_TEXT", to provide an alternate text for the media name or link.
align, width, height, quality, wmode, menu, objbgcolor, to control the general aspect and layout of the flash object.
The options array will have a number of substitutions made for convenience
Syntax "Attach:" will give you the direct attachment URL (useful for initial images, eg on a flash player)
$url will be substituted for the actual media URL (useful for initial images which are a variation of the media url)
$txt will be substituted for the link text (might be helpful...)
Install the Linked Resource Extras required scripts as described on their own recipe page.
Fetch a flash media player distribution archive and extract it into your /pub to get a /pub/FLASH_MEDIA_PLAYER_DIR directory tree available (see below for known-working ones).
The PLAYER_TYPE will be the identifier used by the markup to select the desired player and it's associated configuration data array. Therefore, the (:mp3-player ...:) and (:jw_mp3-player:) markups are respectively related to 'mp3' and 'jw_mp3' configuration data.
The 'swf' value locates the flash player itself (as a $FarmPubDirUrl relative path).
The 'flashvars' refers to an array of media player specific parameters provided to the inner flash object as a sole url encoded query string.
The 'defaults' array allows to define defaults values for all the player parameters.
You may also use the +diag option (either as a default or a markup parameter) to reveal the generated html code (useful when setting up a player config).
During the code generation, the special $FarmPubDirUrl, $url, $txt and $parms tokens are replaced respectively with the PmWiki variable value, the target media url, it's displayed name (computed from the markup specification or given by the text=... option) and the other markup parameters.
Limitations/Known bugs
The encoding scheme of the flash parameters variable prevent the use of "pmwiki-driven" attachment downloads, ie. the core configuration variable $EnableDirectDownloadmust be set to 1.
The enclosure handling implementation is very rough.
Styling hints
The player(s) object(s) are enclosed into <span class='flashmediaplayer'>...</span> sections. This setting may be altered using the $FlashMediaPlayerInfo['#block'] configuration parameter.
"Known-to-work" flash media players
The following flash media players have been made run succesfully during the recipe development (even if all their features or variants haven't been tested). Please refer to their respective site for all specific features and parameters.
User notes +1: 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.