Fullscreen
[Show/Hide Right Column]

Plugin Media Player

Introduced in Tiki3, and extended in Tiki6 with JQuery#Media

This Wiki Plugin can be used in wiki pages or any other wiki-syntax enabled feature to play a FLV or MP3 file, or any other type of media file since Tiki6, like MP4, SWF, AVI, WMV, RAM, MOV, MPEG, PDF, ... It calls on a flash based open source media player to play them.

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 (at lib/wiki-plugins/wikiplugin_mediaplayer.php) 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, 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) ur<x>l http://flash-mp3-player.net/medias/ n URL to SWF file of the player (ended with /)
where (for FLV) ur<x>l 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
mp3 The URL of the MP3 file to be played
autoplay 1 to auto-play
loop 1 to loop
volume The initial volume, between 0 and 200.
skin The URL of the JPEG file (not progressive) to load
showstop 1 to show the STOP button
showinfo 1 to show the INFO button
loadingcolor The color of loading bar
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
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
bgcolor The background color
byteslimit If it is an MP3 streaming, the stream will restart at the bytes limit, to prevent overload.


Example with the src param (jQuery Media)

It has been enhanced in Tiki6 with jQuery#Media, so that more media formats are supported once you use the param "url" in the plugin helper ("src" in the code), including pdf among others.

Example:

{MEDIAPLAYER(src="http://www.gnu.org/philosophy/fsfs/rms-essays.pdf", width=100%, height=600)}{MEDIAPLAYER}


would produce:



{MEDIAPLAYER(flv="http://flv-player.net/medias/KyodaiNoGilga.flv")/}

would produce:



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 compatibility

Limitation with jQuery media. This library need to have the src parameter ended with a file extension
See these pages for information that applies for all modules:


Contributors to this page: lindon5653 points  , Marc Laporte8178 points  , Daniel Gauthier1207 points  , sylvie7160 points  , xavi64690 points  , luciash d' being2153 points  , tobi_h144 points  and mlpvolt4266 points  .
Page last modified on Wednesday 25 January, 2012 02:48:03 UTC by lindon5653 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki