Changeset 58

Show
Ignore:
Timestamp:
02/28/07 03:03:01 (2 years ago)
Author:
timhawes
Message:

mediagallery v0.2 - bug fixes, added http pseudo-streaming, added ability to insert and handle .flv video to blog/forum posts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mediagallery/READ_ME.TXT

    r54 r58  
    88Read the insructions CAREFULLY to be sure this plugin works for you. 
    99 
    10 Installation 
     10Installation (BASED ON ELGG 0.7) 
    1111------------------------------------------------------------------------------------------------------ 
    12121. Download this package, uncompress it. 
     
    15154. Uncompress it, then copy the mediaplayer.swf file into your elgg/mod/mediagallery directory. 
    16165. Edit the css file to match your site's style (optional) 
    17 6. Recommended (but not required) - add the following line of code after line 30 of your elgg/lib/filelib.php file... 
     17 
     18Optional Aditional Configuration (recommended) 
     19------------------------------------------------------------------------------------------------------ 
     201. add the following line of code after line 30 of your elgg/lib/filelib.php file... 
    1821   'flv'  => array ('type'=>'video/x-flv', 'icon'=>'video.gif'), 
     222. add the following block of code to units/files/files_links_make.php, right after line 27. 
     23   It will enable handling of inserted .flv files to blog/forum posts 
    1924 
     25                                        case "video/x-flv": 
     26                        $filetitle = urlencode(stripslashes($file->title)); 
     27                        $run_result .= " 
     28                                                <embed src=\"" . $CFG->wwwroot . "mod/mediagallery/mediaplayer.swf\" width=\"480\" height=\"380\" allowfullscreen=\"true\" 
     29                                                type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  
     30                                                flashvars=\"file=" . $CFG->wwwroot . "mod/mediagallery/stream.flv.php?ident=" . $file->ident . "&enablejs=true&overstretch=false&displayheight=360\" />"; 
     31                                        break; 
    2032 
    2133Use 
     
    30424. The Flash Media player should appear in that folder now as the default handler/player for the files. 
    31435. Click on a file name to play it. You can use the "full screen" button to go to true full screen (required Flash 9) 
     44 
     456. To use .flv in a blog/forum post (assuming you have completed the optional configuration above), just select a .flv from the 
     46   embed drop list and click add. This will insert code like this -> {{file:61}} into your posting text. When the posting is viewed, the 
     47   .flv will be played back via the plugin 
     48 
    3249 
    3350To create .flv video you can check out the following options: 
     
    4461 
    4562 
     63 
     64 
    4665History 
    4766------------------------------------------------------------------------------------------------------ 
     67v0.2 - Feb 28, 2007 
     68Fix to better handle non-playable files 
     69Added php-pseudo streaming - buffer 5 sec of video then starts playing. Also provides bandwith throttling. 
     70Added handler to embed .flv files into blog/forum posts (yeah!) 
     71 
    4872v0.1 - Feb 25, 2007 
    4973Basic functionality as a folder handler 
     
    5276To Do/Road Map 
    5377------------------------------------------------------------------------------------------------------ 
    54 1. Add pseudo-streaming of .flv files. See these sites... 
    55    -http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two 
    56    -http://www.actkid.com/2005/11/03/stream-flv-with-php/ 
    57    -http://www.jeroenwijering.com/?thread=streaming_FLV_with_PHP 
    58 2. Add Flash Media Player as a handler for embeding flv and mp3 in blog/forum posts 
     78-none at this time 
  • mediagallery/lib.php

    r57 r58  
    2525        <script type="text/javascript" src="{$CFG->wwwroot}mod/mediagallery/ufo.js"></script> 
    2626<script> 
    27         var FO = {movie:"{$CFG->wwwroot}mod/mediagallery/mediaplayer.swf",id:"mediaplayer",name:"mediaplayer",width:"520",height:"460",majorversion:"8",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file={$CFG->wwwroot}mod/mediagallery/get_playlist.php?ident={$folder->ident}&enablejs=true&overstretch=false&displayheight=260" }; 
     27        var FO = {movie:"{$CFG->wwwroot}mod/mediagallery/mediaplayer.swf",id:"mediaplayer",name:"mediaplayer",width:"480",height:"560",majorversion:"8",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file={$CFG->wwwroot}mod/mediagallery/get_playlist.php?ident={$folder->ident}&enablejs=true&overstretch=false&displayheight=360" }; 
    2828        UFO.create(FO, "player"); 
    2929</script>