flashplayer plugin by Sam Hall
A flash player that plays various media formats.
Last updated on 2008-01-23. Provides Syntax.
Compatible with DokuWiki 2006-11-06.
Similar to dailymotion, flowplay, flowplay2, google_video, video, youtube, youtubev2.
| Download | flashplayer.zip |
|---|---|
| Extended version by Arno Welzel using SWFObjects | http://arnowelzel.de/wiki/misc/flashplayer Update: New version 2008-10-12, which does not need any scripts manually to be added in the template and is valid XHTML and XHTML-Strict! |
(link fixed)
I've also updated the code to resolve most of the issues listed in the discussions section to date. So it should be compatible with PHP 4 now. Cheers, — Sam Hall 23.01.2008 15:21
This is a damn cool player that play various media formats. It simplifies embedding audio and movie files into your wiki pages.
See Flash Media Player for full details about what you can do with this player.
“The Flash Media player supports playback of a single media file of any format the Adobe Flash Player can handle (MP3,FLV,SWF,JPG,PNG or GIF). It also supports RSS/XSPF/ATOM playlist (with mixed mediatypes), a wide range of flashvars (settings) for tweaking both behavior and appearance and an extensive, documented javascript/actionscript API.”
You got this plugin up and running? You have got a demo page? Put a link here!
Tanja Schmidt (vocalist): http://tanjaschmidt.de (used for playing mp3-files)
Ed Bradburn (musician): http://www.tunemason.org (simple MP3 melodies; search for “Audio”)
York University: https://wiki.cse.yorku.ca/dept/tdb/wiki:plugins:flashplayer
Arno Welzel: http://arnowelzel.de/wiki/reviews/sandisk_cruzermicro8gb (extended version by myself, XHTML conform)
I better thank Dave Kliczbor since I pretty much copy and pasted this page from his FlowPlay plugin, which is a similar plugin. Thanks mate! Now I'm going to steal some of your words to save some time… (No problem, Sam! I've got an almost unlimited supply of words, I can afford to share some
–Dave)
This plugin is merely a wrapper for the excellent Flash Media Player by Jeroen Wijering. I just wrote the glue to dokuwiki and bundled it with Flash Media Player.
This is my first plugin, and so you will probably recognise the skeleton as being pretty much the same as what was used in the one at the end of the syntax tutorial. So thanks to Christopher Smith for that sample code.
Download flashplayer.zip and extract the flashplayer folder into your plugins folder.
<flashplayer width=x height=y>flashvars</flashplayer>
Replace x and y with the height and width you would like, note that the slider is 20 pixels high, so if you want to display a movie that is 240 in height you would enter height=260.
Replace flashvars with the variables defined in the documentation for the player. This can be found at:
<YOUR DOKUWIKI ROOT>/lib/plugins/flashplayer/flash_media_player/readme/readme.html
The most basic flashvars string would be like:
file=http://<path>/<media filename>
Hello,
nice plugin, but it does not work with rewrite out of the box. You have to change line 67 in syntax.php and add '.DOKU_BASE.' as suffix to the .swf-path.
67: $renderer->doc .= '<embed src= "'.DOKU_BASE.'lib/plugins/flashplayer/flash_media_player/mediaplayer.swf" quality="high" width="'.$width.'" height="'.$height.'" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "';
Otherwise the player will not show up in the page.
— schneidexe 09.05.2007 22:17
Hi! very cool plugin. Doesn't work for php<5 unless you add:
if (!function_exists(“stripos”)) {
function stripos($str,$needle) {
return strpos(strtolower($str),strtolower($needle));
}
}
to syntax.php
Thanks for the input, I've now updated the the code to resolve these issues. — Sam Hall 23.01.2008 15:21
Hello, Since version 3.9 Flash Video Playe had renamed to JW FLV Player. To simplify the upgrade, just copy the new flvplayer.swf (it's all we need because we use embed) to plugin dir and modify line 67 to reflect the change.
Hi, I have problems using your Plugin with firefox 3 (mac os x). The movies do not show up. With Safari everything seems to work… any idea?
— hubionmac 18.08.2008 00:21
Sorry, but EMBED is not a valid element in XHTML!
I extended the plugin to use SWFObjects to load the player via JavaScript (should literally work with any browser, tested with IE, FireFox, Opera), so the document is still valid XHMTL (tested with W3C and Validome) and there are localized, customizable messages for the message in case Flash is not installed or JavaScript is not activated (currently only in german and english, but since there are local language files, any other language is easy to add).
You can download this version at http://arnowelzel.de/wiki/misc/flashplayer.
I think this code should be made to use in PHP 4 the only functions that need to be replaced are two stripos() which dont even have to be case-insensetive anyways.
To make it work just replace all stripos with strpos or else you'll get a blamk page and unless you have reporting on, you wont know why.
Where can I download the plugin ? The provided link is not working…
— mg 05.09.2008 21:53
Fixed. — Sam Hall 08.09.2008 11:37
If the fullscreen button is not working, open syntax.php and add allowfullscreen=true at line 68 :
$renderer->doc .= '<embed src= "'.DOKU_BASE.'lib/plugins/flashplayer/flash_media_player/player.swf" quality="high" width="'.$width.'" height="'.$height.'" allowScriptAccess="always" wmode="transparent" allowfullscreen=true type="application/x-shockwave-flash" flashvars= "';
hello, I want to use my dokuwiki installation in two networks -
For usual media files in wiki with syntax
{{playground:1.jpg}}
I haven't problem - they properly displayed in both (internal and Internet) cases. But for flash with this cool flashplayer I have problem - only in one of wiki they displayed properly.
How I can customize this plugin for relative path (I don't want to use name of webserver in path in <flashplayer> brackets, I want that name of webserver will be placed automatically )
I'm really beginner in PHP.
thanks in advance. Sorry, if bad english — Bushroot 2007-09-08 06:47
Playing internal Files too. Like <flashplayer>file=:audio:testfile.mp3</flashplayer> — Markus Bergholz 2008/07/30 10:07Yeah, I second that. The ability to play internal files would be really nice. Maybe it does this already, but I haven't been able figure it out the syntax.
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported