Loading...
 
Skip to main content

History: PluginMediaPlayer

Preview of version: 71

Plugin Media Player

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

This Wiki Plugins 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 or (since Tiki 12.2) one can use native HTML5 player.

Details

This plugin adds a simple media 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/
Native HTML5 Audio/Video player (e.g. to play .webm files) of your browser (since Tiki 12.2)

If you prefer the Flash player 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

  • Make sure you have enabled jQuery Media feature if you are not using mp3 or flv file (using the src param)
  • If the player still 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.

 Please notice that ....

If you do not use the native (HTML5) mode the mediaplayer is not responsive. So fixed width of the player even in a responsive page. You need to think about a workaround if you design for mobile aswell.
... to show a video in a different sized player e.g. 800 px width instead of default, do not use % or px ... this seems to work with pdf, but not with video
This code worked on a Tiki pre-14r trunk:

Copy to clipboard
{mediaplayer flv="http://example.com/display18", type="flv" width=800, height=600}
Status of the information: 21st Nov 2014

Syntax Examples

MP3 Examples

For files in the file gallery:

Copy to clipboard
{mediaplayer mp3="display10"} {mediaplayer mp3="tiki-download_file.php?fileId=389"}


Using actual file path:

Copy to clipboard
{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"}

 Tip

For files uploaded to the file gallery but stored on the server, the actual file path can also be used. Tiki converts file names to hash values for storage on the server - this name can be found in the database.

FLV files

Use the flv and type parameters to show flv files as shown below:

File gallery flv file:

Copy to clipboard
{mediaplayer flv="http://example.com/display10" type="flv"}


Otherwise upload the file to a directory on your server and use the direct file path. If the file has the .flv extension, then the type parameter doesn't need to be set:

Copy to clipboard
{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) 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
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. The value in the src parameter must end with a file extension

Example:

Copy to clipboard
{mediaplayer src="https://branding.tiki.org/tiki-download_wiki_attachment.php?attId=37&page=Slideshow", width=100%, height=600, type="pdf"}


would produce this PDF in the player:

Other Examples

FLV

This code:

Copy to clipboard
{mediaplayer flv="http://flv-player.net/medias/KyodaiNoGilga.flv"}


would produce:

File gallery file in a blog post

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...)

Copy to clipboard
{mediaplayer mp3="http://example.com/tiki-download_file.php?fileId=1&showstop=1&showinfo=1&showvolume=1", style="maxi"}

This also works for a pdf file in a file gallery beginning in version 10:

Copy to clipboard
{mediaplayer src="tiki-download_file.php?fileId=7&display=y" type="pdf"}

And it displays the PDF file with the ID 7.

See these pages for information that applies for all modules:

Alias

PluginMedia

History

Advanced
Information Version
Bernard Sfez / Tiki Specialist Added information about PDF display 99
Bernard Sfez / Tiki Specialist 98
Bernard Sfez / Tiki Specialist 97
Bernard Sfez / Tiki Specialist 96
Bernard Sfez / Tiki Specialist fade Plugin modified by editor. 95
Bernard Sfez / Tiki Specialist Improving documentation 94
Bernard Sfez / Tiki Specialist Improving documentation 93
drsassafras remove legacy FLV examples. 92
drsassafras 91
Marc Laporte 90
Marc Laporte A semantic alias (301 Redirect) to this page was created when page PluginAudioPLayer was deleted 89
Bernard Sfez / Tiki Specialist 88
Bernard Sfez / Tiki Specialist Adding pdf sample 87
Yves Kipondo 86
Fabio Montefuscolo 85
Marc Laporte 84
Marc Laporte 83
Torsten Fabricius 82
Torsten Fabricius 81
Philippe Cloutier improve introduction 80
olinuxx + link to the preference location 79
Marc Laporte 78
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 77
Xavier de Pedro 76
WizarDave Added alternative for displaying PDFs. PluginWebDocViewer 75
WizarDave 74
lindon Remarks Box Plugin modified by editor. 73
lindon 72
luciash d' being 🧙 71
luciash d' being 🧙 70
Daniel Gauthier Added Xavi's info about .mp4 sent by email and removed the following dead url: http://tv.tiki.org/tiki-kaltura_video.php?mixId=0_lkgtny3n 69
Torsten Fabricius 68
luciash d' being 🧙 67
luciash d' being 🧙 ah, maybe https 66
luciash d' being 🧙 65
luciash d' being 🧙 previous PDF did not work out 64
luciash d' being 🧙 63
AshkanV 62
Zac clarified requirements for PDF from File Gallery 61
lindon 60
Marc Laporte Use example.com 59
Marc Laporte 58
lindon 57
lindon Code Plugin modified by editor. 56
lindon 55
lindon 54
Marc Laporte 53
Marc Laporte 52
Marc Laporte Out of the box, flv doesn't work there. You need to use the dedicated FLV param 51
Marc Laporte Video is not there anymore. There are enough examples so people get the idea 50
  • «
  • 1 (current)
  • 2