DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:flashplayer

FlashPlayer Plugin

Compatible with DokuWiki

2012-10-13, 2006-11-06, 2008-05-05, 2009-02-14b, 2009-12-25c, 2010-11-07a, 2011-05-25, 2012-01-25

plugin A flash player that plays various media formats (based on the work of Sam Hall).

Last updated on
2012-05-11
Provides
Syntax

This extension is marked as obsoleted. Therefore it is hidden in the Extension Manager and the extension listing. Furthermore, it is candidate for removal.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to dailymotion, dailymotion_videozap, flowplay, flowplay2, flowplayer, htvid, jukebox, video, youtube

Tagged with !obsolete, embed, flash, images, media, music, video

News

Since Sam Hall seems not to work any longer on this plugin i changed the plugin information to the current state. — Arno Welzel 19.08.2011 18:27 CET

Download link fixed to the extended version (where is Sam Hall's one?) — Stephan Hesse 25.04.2011 17:16 CET

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

Description

This is a 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.”

NB: According to the author's web site, Adobe Flash Player is still required; this is not a replacement for Flash. It appears to be more of a front-end replacement for flash rather than a full-blown media player with its own decoding and presentation logic.

Demo pages

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”) FIXME Site is Down!

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)

Paul Troost: http://www.greenbird.info/cplusplus/stereo_vision#results

University Climbing Groub http://klettern.uni-hohenheim.de/wiki/start

Acknowledgements

I have to thank Sam Hall for his work which was really helpful for me and i'm glad to continue the maintainance.

(Arno Welzel)

Original from Sam Hall:

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

Installation

Download and extract the flashplayer folder into your plugins folder.

Usage

<flashplayer width=x height=y>flashvars</flashplayer>

Replace x and y with the height and width you would like, note that the slider is 24 pixels high, so if you want to display a movie that is 240 in height you would enter height=264.

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 FIXME

The most basic flashvars string would be like:

file=http://<path>/<media filename>

Discussion

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 Player has been renamed to 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 OSX). The movies do not show up. With Safari everything seems to work… any idea?

hubionmac 18.08.2008 00:21

XHTML compatibility

Sorry, but EMBED is not a valid element in XHTML!

I extended the plugin to produce XHTML compliant output (should literally work with any browser, tested with IE, Firefox, Opera and Safari), and there are localized, customizable messages for the message in case Flash is not installed (currently only in German and English, but since there are local language files, any other language can be added).

You can download this version at http://arnowelzel.de/wiki/misc/flashplayer.

To Use in PHP 4

I think this code should be made to use in PHP 4 the only functions that need to be replaced are two stripos() which don't even have to be case-insensitive anyways.

To make it work just replace all stripos with strpos or else you'll get a blank page and unless you have reporting on, you wont know why.

Dokuwiki only supports PHP5

Fullscreen

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= "';
This doesn't seem to work for me. I tried this, but the embed-tag is always rendered without the allowfullscreen=true. What's wrong here?

OK, solved. You need to restart Apache. It doesn't matter if you move the flashplayer folder on the fly, Apache seems to catch the older PHP file.

Well, I think this is perhaps more an issue with the DokuWiki cache folder. I manually delete the folder contents, but I guess there is some kind of command to do this programmatically, isn't there? – 2009-05-03, Josef jmeile [at] hotmail [dot] com

You should be able to purge cache by putting ?purge=true at the end of the URL… See purging the cache I found it doesn't always work though, the best way is to delete the contents of the cache directory.

Wish List

hello, I want to use my DokuWiki installation in two networks -

  1. in internal network in my company. Name for internal wiki for example http://mydokuwiki/wiki.
  2. in Internet. Name for wiki in Internet http://mydokuwiki.myorganisation.com/doc.

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:07
Yeah, 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.
Just use the relative path beginning with /_media/ - e.g. if your file is :audio:testfile.mp3 then its path is /_media/audio/testfile.mp3. Maybe you have to add the root directory, if your wiki is not in / (e.h. /wiki/_media/audio/testfile.mp3).

Flashvars

See Supported flashvars

You should waste a little more time explaining how the flashvars should be given. For example, how do you give two flashvars? Do you separate them with commas, semicolons, spaces?

I just found that you have to use ampersand '&' to separate them, i.e.:

<flashplayer>file=/path/to/file.flv&showfsbutton=false</flashplayer>

Yes the ampersand is the separator. You need to read the documentation in readme.html as stated above.

video not found

Hey guys, I have problem with path for the video. I have my DokuWiki in dokuwiki directory in root.

if I write

<flashplayer width=300 height=300>file=/dokuwiki/_media/test.flv</flashplayer>

, I get an error: “Video not found: /dokuwiki/_media/test.flv”

(test.flv is located in default namespace :)

I figured that if I write

<flashplayer width=300 height=300>file=/dokuwiki/lib/exe/fetch.php?media=test.flv</flashplayer>

, it works, but I think that using PHP script for this is just useless wasting of processing time.

Any suggestions ? (I tried it on Apache running on both Windows and Linux server) Thanks, ~Jan

This is by design - there is a local .htaccess file in the “media” directory, which forbids direct access to files in it from “outside” (via browser, flash plugin etc.). Well - you can just delete this local .htaccess - but since DokuWiki does its own processing (scaling etc.) for images, you should not allow direct access to media files anyway to avoid direct linking to them from other web sites. And just fetching a media file via fetch.php is really not a big waste of processing time, as fetch.php just passes the file through.

Arno

I have tried this and I get the following error “Task Queue failed at step 5: Playlist could not be loaded due to crossdomain policy restrictions.” The file is 'file=/wiki/lib/exe/fetch.php?media=wiki:plugins:barsandtone.flv'. Everything works fine when I reference an external FLV (e.g. http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv). I also tried adding a crossdomain.xml file to my server root, but I still get the same error.

Shawn

:!::!::!:

This plugin is broken. I invested long time and tried all the methods, from giving the path like “fetch.php?media=” over “url rewriting” to localhost path. Bottom line is, Dokuwiki has no support for embedded videos, neither out of the box (like “{{:playground:sanddock_licensing_proxysetting.jpg?direct|}}”) nor with plugins. This is sad but true.

:!::!::!:

DokuWiki supports videos out of the box (see supported media formats). What kind of video were you trying to embed and which browser were you using? — Anika Henke 2015-01-21 01:27

video does not start

Hi!
First I had the same troubles as Jan did, but since I read his post I no longer got the Video not found: /dokuwiki/_media/test.flv“-error.
But I can't get my video (which is in the default namespace) to start. (But there is no crossed playicon shown).
In some cases it just seems to load (the load animation), but the video never starts.
(THe URL seems correct enough not to give that only “not found”-message?)
I am sure that I at least in the first cases have the correct URL, cause I copied it from the mediamanager.

Loading external flv's plays just fine.
And also loading files that I through FTP put within my dokuwiki-folder, but outside of the media-folder.
(Like <flashplayer width=“480” height=“380”>file=/lib/videos/test.flv</flashplayer>).

What seems to be the problem you think?
Thanks /Micke

Can I get an autostart?

Hello there!
I'm using your plugin on http://animtion-workshop.co.uk/wiki - as you can see, when you load the page it looks like a black box. Is there a way to make it autoplay, or desplay an image before you press play?

Thanks,
Mike

Yes you can, add to flashwars

&amp;autostart=true

File= path not working

Flashplayer plugin problem loading media via file=path_flashvar with mod-rewrite off on default Dokuwiki installation - SOLVED

With the default installation of Dokuwiki to www root, I couldn't even load a media file from a relative path, for example neither of these would work:

<flashplayer>file=/_media/test.mp3</flashplayer>  //works after mod-rewrite enabled in .htaccess (included in dokuwiki root)
<flashplayer>file=/lib/exe/fetch.php?media=test.mp3</flashplayer>  //never works even after mod_rewrite enabled

After enabling the mod_rewrite functionality as per Dokuwiki rewrite instructions, everything now works with the former relative path above but not the later.

Also, I figured out custom skins will work with JW Player too. I just copied my skin, simple.zip to \lib\plugins\flashplayer and used the skin=flashvar as follows:

<flashplayer>file=/_media/test.mp3&skin=/lib/plugins/flashplayer/simple.zip</flashplayer>

It was very annoying to say the least that I couldn't even load a simple .flv or .mp3 file using this flashplayer plugin (the extended version) and it took me hours to figure out that I had to enable Mod Rewrite to get the flashplayer working out of the box after discovering URL rewriting is disabled by default in Dokuwiki.

Or perhaps I was doing something wrong? Does anyone else know what the file=path is for a default installation of Dokuwiki? Again, the suggested path for when .htaccess is not used didn't work for me.

I hope this post helps someone else and thanks to everyone for all the inspirational effort that's been put into dokuwiki including great plugins like this one!

Hello, I am new to dokuwiki. I had the same or a similar problem as above (either the file was not found, or there was a problem of access restriction), I solved with an alternative solution given in : https://forum.dokuwiki.org/post/24927. I changed both .htaccess and .htaccess.dist in /usr/share/dokuwiki/ to allow access to the files and it works. However, I don't know if doing this may have any other collateral problem (e.g. security). Does any one know which is the good way of solving this problem ?

How to make it work in localhost

Hi! My doku wiki work in local, inside the Wamp server.
I tried all the possibilities proposed here, i did as suggested with the .htaccess or the mod-rewrite… i tried everything, i receive the error message : Video not found or access denied : /_media/test.flv.

the way to success it is to write the direction like this :

<flashplayer>file=http://localhost/DokuWiki/_media/test.mp3</flashplayer>

We notice here that my file is inside the _media folder that is himself in the DokuWiki folder ;)

Problem with position parameter

The readme file mentions a parameter position=“0|1|2” to be used like width or height.

<flashplayer width=x height=y position=p>flashvars</flashplayer>

This parameter has no effect on my wiki (using Angua version).

Any help ?

Adrien 2012-05-10 17:40

Please update to the latest version (2012-05-11 or newer), where positioning should work now.

Arno 2012-05-11 08:39

Problems with Controls

It plays, but pause and stop doesn't work.

<flashplayer width=400 height=300 position=1>file=http://help.versesolutions.com/dev/wiki/movies/PortalOverview.swf</flashplayer>

What can I do?

plugin/flashplayer.txt · Last modified: 2022-01-13 01:01 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki