1 http://www.jeroenwijering.com/?item=Flash_Media_Player
\r
3 This plugin relies on the Flash Media Player from http://www.jeroenwijering.com/
\r
4 but due to licensing issues some of the required files can't be included in this
\r
5 package. Read the licensing info here http://www.jeroenwijering.com/?item=Flash_Media_Player
\r
6 before deciding to use this code...
\r
8 Read the insructions CAREFULLY to be sure this plugin works for you.
\r
10 Installation (BASED ON ELGG 0.7)
\r
11 ------------------------------------------------------------------------------------------------------
\r
12 1. Download this package, uncompress it.
\r
13 2. FTP the "mediagallery" folder into your elgg/mod directory
\r
14 3. Download the flash media player package from http://www.jeroenwijering.com/?item=Flash_Media_Player
\r
15 4. Uncompress it, then copy the mediaplayer.swf file into your elgg/mod/mediagallery directory.
\r
16 5. Edit the css file to match your site's style (optional)
\r
18 Optional Aditional Configuration (recommended)
\r
19 ------------------------------------------------------------------------------------------------------
\r
20 1. add the following line of code after line 30 of your elgg/lib/filelib.php file...
\r
21 'flv' => array ('type'=>'video/x-flv', 'icon'=>'video.gif'),
\r
22 2. add the following block of code to units/files/files_links_make.php, right after line 27.
\r
23 It will enable handling of inserted .flv files to blog/forum posts
\r
26 $filetitle = urlencode(stripslashes($file->title));
\r
28 <embed src=\"" . $CFG->wwwroot . "mod/mediagallery/mediaplayer.swf\" width=\"480\" height=\"380\" allowfullscreen=\"true\"
\r
29 type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
\r
30 flashvars=\"file=" . $filepath . "&enablejs=true&autoplay=true&overstretch=false&displayheight=360\" />";
\r
33 3. To use FlashMediaPlayer the default handler for inline .mp3 files in blog posts as well, delete the case "audio/mp3" block of code
\r
34 in units/files/files_links_make.php and replace it with:
\r
37 $filetitle = urlencode(stripslashes($file->title));
\r
39 <embed src=\"" . $CFG->wwwroot . "mod/mediagallery/mediaplayer.swf\" width=\"480\" height=\"80\" allowfullscreen=\"true\"
\r
40 type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
\r
41 flashvars=\"file=" . $filepath . "&enablejs=true&autostart=true&overstretch=false&displayheight=60&showeq=true\" />";
\r
45 ------------------------------------------------------------------------------------------------------
\r
46 1. Login to your elgg instance and go to your "my files" tab
\r
47 2. Create a new folder. From the folder type drop-down, choose "media gallery"
\r
48 3. Once the folder is created, upload any of the following file types into the folder
\r
50 .SWF (Flash animation)
\r
51 .MP3 (mpeg layer 3 audio)
\r
52 .JPG, .PNG, .GIF (common image formats)
\r
53 4. The Flash Media player should appear in that folder now as the default handler/player for the files.
\r
54 5. Click on a file name to play it. You can use the "full screen" button to go to true full screen (requires Flash 9.028 player)
\r
56 6. To use .flv in a blog/forum post (assuming you have completed the optional configuration above), just select a .flv from the
\r
57 embed drop list and click add. This will insert code like this -> {{file:61}} into your posting text. When the posting is viewed, the
\r
58 .flv will be played back via the plugin
\r
61 To create .flv video you can check out the following options:
\r
64 http://www.mediacollege.com/flash/video/tutorial/convert-flv.html
\r
65 Adobe Premiere Elements Version 3.0
\r
67 Open Source or Free:
\r
68 http://www.rivavx.com/index.php?encoder&L=3
\r
69 http://ffmpeg.mplayerhq.hu/
\r
70 Online converter: http://www.zamzar.com
\r
72 (use google - there are lots more out there...)
\r
78 ------------------------------------------------------------------------------------------------------
\r
80 Updated to support for FlashMediaPlayer v3.6
\r
81 Added (optional) handling of inline mp3 playback
\r
82 Dropped php-pseudo streaming (casued too many issues - like locking up the UI)
\r
85 Fix to better handle non-playable files
\r
86 Added php-pseudo streaming - buffer 5 sec of video then starts playing. Also provides bandwith throttling.
\r
87 Added handler to embed .flv files into blog/forum posts (yeah!)
\r
90 Basic functionality as a folder handler
\r
94 ------------------------------------------------------------------------------------------------------
\r