I've just posted a new plugin that adds a "media gallery" folder type to your my_files areas. Lets you display the folders contents (.flv video, .swf, .mp3, jpg/gif/png) via the Flash Media Player.
./tim
Keywords: .flv, flash video, media player
I've just posted a new plugin that adds a "media gallery" folder type to your my_files areas. Lets you display the folders contents (.flv video, .swf, .mp3, jpg/gif/png) via the Flash Media Player.
./tim
Keywords: .flv, flash video, media player
Posted by Tim Hawes @ Plugins
Site supported by Curverider Ltd - powered by the awesome Elgg
Comments
Thank you for your great plugin.
I use it on my site:
Really good work, i see forward for the new implimentations.
Amos
There is a demo here now:
http://www.commun-it.org/community/timh/files/12
Graham - I should have mentioned that this is based on code that is only part of elgg 0.7. Sorry about that.
Hi Tim,
I am running 0.7 and a 0.7 RC2. Same error in both Function mediaplayer_pagesetup doesn't exist!
I read your instructions- maybe I installed the media player incorrectly as there was a typo in your instructions "elgg/mod/mediaplyer directory." and I have tried all variants.
My bad
Make sure the folder in your mod directory is named "mediagallery" (not mediaplayer, like the instructions say). I'll fix this and repost, but you should just be able to rename the folder to mediagallery and all will be right
./tim
I've just posted the updated version (fixed instructions)
Also, I managed to get the http streaming going. FLV files are now "streamed" to the player which should make large or high quality files playback better.
If you end up using this plugin on an public site, please let me know as I would like to see it in action somehwere other than my instance...
./tim
running here. . .
http://doggybloggy.com/blogdog/files/8
Excellent plugin! Thanks!
I've just committed v0.2 to the SVN (download here http://elgg.org/mod/plugins/)
A few bug fixes, but 2 big enhancements:
-http pseudo streaming (works great)
-an optional patch that will let you insert .flv video into a blog/forum post and have it play back (very cool, if I do say so myself)
Demos are here:http://www.commun-it.org/community/timh/weblog/
and here:http://www.commun-it.org/community/timh/files/12
Thanks Tim this much better but I am running 0.7 and still keep getting this message displayed at the top of the screen
Function mediaplayer_pagesetup doesn't exist!
Functionality isn't affected at all. Any ideas?
I can't assist with Graeme's error, as I mine is working perfectly. I would just mention to less technical folks out there, that you should follow the readme in the download to copy/paste the code to add to files_link_make.php rather than copy/pasting from the text on the plugin download page. The formatting of the text on the download page will result in errors, but the text in the readme should copy/paste without error. I also changed the screen dimensions to replicate 4:3 aspect ratio as on YouTube (i.e., 425 width and 350 height) rather than what is included in the instructions for files_link_make.php.
Thanks so much. This is going to be great.
One question: Is it possible in future versions to get flash to play other media types, like .wmv, .ram, .avi, and .mov? I don't know, but it would be nice for users who are not technical enough to convert media types to .flv. I'm thinking that there would have to be a backend system that converts various media types to .flv. . perhaps on the fly like YouTube does. . . i.e., automatically without human intervention. . . Yes, probably a ridiculous request.
Graeme,
I believe that pagesetup is no longer required for the latest versions of Elgg.
However, if you are getting a nagging message because you have some older software in your installation, you can easily make it go away by going to mod/mediaplayer/lib.php
and typing the lines:
function mediaplayer_pagesetup() {
}
Thank you Kevin.
I have 2 installs - one upgraded since 0.4 and I also have a vanilla 0.7 for testing and same error appeared on both. This fixes it but I don't know why.
Graeme,
Regarding the error - still sounds like the folder is named wrong. Can you post a URL where you 0.7 install with mediagallery plugin is so I can have a look? I'd like to track this bug down if I can
./tim
Flash can't handle other video types (yet anyway), so only flv video is supported for now. It can do mp3 though, so switching the current mp3 handler to using this one is trivial:
In units/files/files_links_make.php (after line 21) change to this:
$filetitle = urlencode(stripslashes($file->title));
$run_result .= "
<embed src=\"" . $CFG->wwwroot . "mod/mediagallery/mediaplayer.swf\" width=\"480\" height=\"80\" allowfullscreen=\"true\"
type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=" . $filepath . "&enablejs=true&overstretch=false&displayheight=60&showeq=true\" />";