[Show/Hide Right Column]

Add a media player to a page
Print
Tags: plugin

Plugin Media Player

Introduced in Tiki3

This Wiki Plugin can be used in wiki pages or any other wiki-syntax enabled feature to play a FLV or MP3 file. It calls on a flash based open source media player to play .mp3 or .flv files.

Details

This plugin adds a simple MP3 or FLV player in a page. The player is not required (it is called from the web if it is not available locally).

The players used can be one of the following: http://flash-mp3-player.net (the default mp3 player) http://flv-player.net (the default flv player)

Alternate players: http://code.google.com/p/mp3player http://code.google.com/p/flvplayer/

You can download the player itself (an .swf file) from http://flash-mp3-player.net or http://flv-player.net or http://code.google.com/p/mp3player or [http://code.google.com/p/flvplayer/]]. If you do, you will need to edit the plugin and change the default source in the plugin code or add it as a "where" parameter in that instance of the plugin.

Troubleshooting

  • If the player doesn't appear, you probably got one of the plugin parameters wrong.
  • If the player appears but won't play, you probably got the wrong URL to the file.

Syntax Example

{MEDIAPLAYER(mp3="http://usuaris.tinet.org/mikell/EntrevistaRadio4.mp3")/}
{MEDIAPLAYER(mp3="http://usuaris.tinet.org/mikell/EntrevistaRadio4.mp3", style="mini")/}
{MEDIAPLAYER(mp3="/test.mp3", loop="1")/}
{MEDIAPLAYER(mp3="tiki-download_file.php?fileId=389")/}
{MEDIAPLAYER(flv="http://flv-player.net/medias/KyodaiNoGilga.flv")/}

Plugin Parameters

Besides the parameters described at http://flash-mp3-player.net and http://flv-player.net you can use the following Tiki parameters:

Param Values Defaults Req ? Explanation Since
mp3 link y (if no flv and src) link to the MP3 file
flv link y (if no mp3 and src) link to a FLV file
src link y (if no flv or mp3) link to aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3pg,flv, mp3, swf,asx, asf, avi, wma, wmv,ra, ram, rm, rpm, rv, smi, smil, xaml, html, pdf (see jquery media for a complete list >=6.0
style string normal n mini or normal or maxi or multi style
where (for MP3) url http://flash-mp3-player.net/medias/ n URL to SWF file of the player (ended with /)
where (for FLV) url http://flv-player.net/medias/ n URL to SWF file of the player (ended with /)
wmode string transparent n window mode of the Flash object 5.x

Flash MP3 Player Parameters:

Name Description
autoplay 1 to auto-play
bgcolor The background color
bgcolor1 The first color of the background gradient
bgcolor2 The second color of the background gradient
buttoncolor The color of the buttons
buttonovercolor Hover color of buttons
byteslimit If it is an MP3 streaming, the stream will restart at the bytes limit, to prevent overload.
loadingcolor The color of loading bar
loop 1 to loop
mp3 The URL of the MP3 file to be played
showinfo 1 to show the INFO button
showstop 1 to show the STOP button
skin The URL of the JPEG file (not progressive) to load
slidercolor1 The first color of the bar gradient
slidercolor2 The second color of the bar gradient
sliderovercolor Hover color of the bar
textcolor The text color
volume The initial volume, between 0 and 200.

Playing files from a file gallery.

If you upload an mp3 file to a file gallery you can play it using this player only if the files are not stored in the database. Check Admin>File Galleries to see where your podcast? gallery files are going. The name of the file in question is always randomized by tiki to some long string of letters and digits e.g. 997ef6a0e7297964ef3827c9a5e9cfea.mp3

Right click and copy the location shown in file galleries to use this in the wiki plugin.

Depending on your configuration, it may not be possible to use files from the file gallery simply by using

{MEDIAPLAYER(mp3="tiki-download_file.php?fileId=389")/}

An example for a successful use of the maxi Mediaplayer in a blog post looks like this (only caveat is to have access rights for the relevant user group by setting tiki_p_download_files to yes - sometimes, a restart of the browser seems to be necessary to make those rights work...)

{MEDIAPLAYER(mp3="http://your.uri.here.com/tiki-download_file.php?fileId=1&showstop=1&showinfo=1&showvolume=1", style="maxi")/}
Todo: embed the flash to have a better browser comaptibility


Contributors to this page: sylvie4333 points  , tobi_h143 points  , mlpvolt1895 points  , luciash d' being1589 points  and lindon2331 points  .
Page last modified on Tuesday 24 August, 2010 18:11:29 UTC by sylvie4333 points .

Find by Page Name

Exact match

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki documentation and should correspond to development keywords (bug reports and feature requests):