History: PluginMediaPlayer
Source of version: 89
Copy to clipboard
! Plugin Media Player ''Introduced in ((Tiki3)), and extended in ((Tiki6)) with [JQuery#Media]'' Use this ((wiki plugin)) to play a media file, like MP3, MP4, SWF, FLV, AVI, WMV, RAM, MOV, [http://tv.tiki.org/MP4|MPEG], PDF, ... To play them, this plugin uses an open source media player based on Flash or a native HTML5 player. !!Parameters Besides the parameters described at [http://flash-mp3-player.net|http://flash-mp3-player.net|box] and [http://flv-player.net|http://flv-player.net|box] you can use the following Tiki parameters: ''(Found it at [tiki-admin.php?page=textarea&cookietab=2&highlight=wikiplugin_mediaplayer].)'' {pluginmanager plugin="mediaplayer"} {REMARKSBOX(type="tip" title="Note" close="n")} If you are having difficulty setting the width, try setting with just the number, without 'px' or '%'. {REMARKSBOX} Flash MP3 Player Parameters: {FANCYTABLE(head="__Name__|__Description__" headaligns="center|center" headvaligns="middle|middle" colwidths="|80%" colaligns="right|justify" colvaligns="|middle")} 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. {FANCYTABLE} !!! 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. !! Examples !!! MP3 Examples ''For files in the file gallery:'' {CODE(colors="tiki")} {mediaplayer mp3="display10"} {mediaplayer mp3="tiki-download_file.php?fileId=389"} {CODE} ''Using actual file path:'' {CODE(colors="tiki")}{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"} {CODE} {REMARKSBOX(title=Tips type=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.'' And if the mp3 player does not show up in your tiki site, try disabling the "GZip output" feature (feature_obzip) in the Control Panels > Performance ( -+tiki-admin.php?page=performance+- ). {REMARKSBOX} !!! FLV files Use the -+flv+- and -+type+- parameters to show flv files as shown below: File gallery flv file: {CODE(colors="tiki")} {mediaplayer flv="http://example.com/display10" type="flv"} {CODE} 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: {CODE(colors="tiki")} {mediaplayer flv="http://flv-player.net/medias/KyodaiNoGilga.flv"} {CODE} !!! 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 ''This code:'' {CODE(colors="tiki")}{mediaplayer src="https://branding.tiki.org/tiki-download_wiki_attachment.php?attId=37&page=Slideshow" width="100%" height="600" type="pdf"} {CODE} ''Would produce this PDF in the player:'' {mediaplayer src="https://branding.tiki.org/tiki-download_wiki_attachment.php?attId=37&page=Slideshow", width=100%, height=600, type="pdf"} __Alternatives__ to display PDFs. ((Wiki Plugin)) ((PluginWebDocViewer)) is similar. *If you run into problems with one, it's nice to have a second option to try. !!! FLV ''This code:'' {CODE(colors="tiki")}{mediaplayer flv="http://flv-player.net/medias/KyodaiNoGilga.flv"}{CODE} ''Would produce:'' {mediaplayer flv="http://flv-player.net/medias/KyodaiNoGilga.flv"} !!! WebM (VP8 codec) ''This code:'' {CODE(colors="tiki")}{mediaplayer src="tiki-download_file.php?fileId=465&display=y" type="webm"}{CODE} ''Would produce something like:'' {mediaplayer src="https://seeds4c.org/tiki-download_file.php?fileId=465&display=y" type="webm"} ^ __WebM__: an open web media project The WebM Project is dedicated to developing a high-quality, open video format for the web that's freely available to everyone. https://www.webmproject.org ^ !!! 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...) {CODE(colors="tiki")} {mediaplayer mp3="http://example.com/tiki-download_file.php?fileId=1&showstop=1&showinfo=1&showvolume=1" style="maxi"} {CODE} !!! PDF file in a file gallery This also works for a pdf file in a file gallery beginning in version 10: {CODE(colors="tiki")} {mediaplayer src="display1134" type="pdf"} {CODE} ''Would produce something like:'' {mediaplayer src="display1134" type="pdf"} And it displays the PDF file with the ID 7. You will need ((ViewerJS)) Starting in ((Tiki19)), you can get ((PDF.js viewer)) via ((Packages)) * An alternative is to use ((PluginWebDocViewer)) to display PDFs. (May display better on some smart phones and tablets.) {include page="PDF related pages"} !!! MP4 Using native player {CODE(colors="tiki")} {mediaplayer type="video/mp4" style="native" width="640px" src="https://doc.tiki.org/tiki-download_wiki_attachment.php?attId=81" } {CODE} {mediaplayer type="video/mp4" style="native" width="640px" src="https://doc.tiki.org/tiki-download_wiki_attachment.php?attId=81" } -=Related regarding media in general=- ((PluginBlipTV)) ((PluginVimeo)) ((PluginWatershed)) ((PluginYouTube)) 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 [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/lib/wiki-plugins/wikiplugin_mediaplayer.php?view=markup|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. -=Aliases=- (alias(PluginMedia)) ~tc~ (alias(PluginAudioPLayer)) ~/tc~