FLV Player Integration MOD - Page 7 FLV Player Integration MOD - Page 7
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

FLV Player Integration MOD

Started by gwendolyn, July 24, 2006, 02:39:36 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rujikin

This is an edit on pftq's modifications on the FLV player mod here: http://forum.coppermine-gallery.net/index.php/topic,34182.msg221791.html#msg221791

This allows the width to be automatically detected and adjusted for each video instead of having a solid number.
if ($mime_content['content']=='movie' && $mime_content['mime']=='application/x-shockwave-flash') {

$flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];

if($mime_content['extension']!='flv') {
$flvcheck = fopen($flv,"r");
$flv=fgets($flvcheck);
fclose($flvcheck);
}
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"mediaplayer.swf\" ".$image_size['whole']." allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";

        }



Eclipse

Hello,

I really need this mod to work and I followed the installation instructions, then I got here:

Quote4. download the flvplayer package from http://www.jeroenwijering.com/?item=Flash_Video_Player and upload "flvplayer.swf" to gallery root

I went to that link and it sent me to jeroenwijering homepage. So I clicked on players and download the flv media player but there is not flvplayer.swf included in that zip file.

So what am I supposed to upload to my gallery root?

Joachim Müller


Eclipse

Okay,

I downloaded it. It comes with a lot of files. I'm still not sure which ones to upload.

Eclipse

Nevermind, I got it sorted out.

Eclipse

Would it be possible to add a copy&paste embed code underneath the video somewhere?

Eclipse

Also, is it possible to manual add thumbnails to individual videos?

pointystick

I added this to my site , it loads the flvplayer and you can see it loads the FLV file in the status bar but the video doesn't play it comes up with 0:00 of 0:00 , i have checked the paths and everything.
Doesn't seem to want to play the file it's loaded . Any idea's i could try?

PagaNation

I posted in this thread before: http://forum.coppermine-gallery.net/index.php/topic,43180.60.html ... probably should have posted in this one.

I followed instructions for this modification and it works just fine for the most part, however, the JW player is linked to here has a problem with an FLV that I posted... another player handles it just fine, but has no fullscreen option :( Even the JW player doesn't have a button for fullscreen that I see, only click to fullscreen which is not best for me.

I would like to use another player instead, but having difficulty getting the ones I like, working.

Two of them I have tried are: http://flvhosting.com/clients/looplayer/ and http://www.osflv.com/ ... each of these, I can get the player to load, but not able to get the $flv string recognized.

Has anyone gotten either of these, or perhaps another feature rich player to work? At the very least, a button for fullscreen would be fine. Could be that the one FLV which wouldn't play through the JW player was just converted badly and the other player just doesn't complain... so, if this is the case and there is an option on JW player for a fullscreen button, rather than the click to full, that I am not aware of, I could even settle on that ;D

Any help appreciated!

Joachim Müller

Quote from: PagaNation on July 21, 2008, 06:59:36 AM
I posted in this thread before: http://forum.coppermine-gallery.net/index.php/topic,43180.60.html ... probably should have posted in this one.
Nope. Wrong again. You should have started a thread of your own on the support board, as neither the thread you tried to hijack in your first attempt nor this thread deal with the FLV players you're refering to.

PagaNation

not attempting to hijack anything dude... just trying to get a bit of help, which is what a support forum should be about... so, you can give me more nagative karma or whatever (by the looks of it, the karma system is being seriously abused here)... just trying to get assistance... I posted in THIS thread because my question is related to the modification described in THIS thread. I'll admit that the first thread I posted in was indeed the wrong one, but this due to my being in multiple threads at the same time in an attempt to resolve the issue... Not a good start in this "support" forum and I question whether or not I'll get any help whatsoever, even posting in a new thread...

papilow

First i would like to thank everyone here for all the great help you have provided.

I am using a theme that did not have any "function theme_html_picture" section.  I have attached my original and the modified theme.php  Hopefully any one having problems will be able to look at this and follow what i did.

I have uploaded mediaplayer.swf, and swfobject.js into the root of coppermine.  and everything works great.

I used the filetype editor plugin to add the flv file type.  and everything works great.

here is the code i am using.

// There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
        }

        $player = $players[$user_player];

if ($mime_content['extension'] == "flv") {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$descript = $CURRENT_PIC_DATA['title'];
$pic_html = "<script type=\"text/javascript\" src=\"swfobject.js\"></script>
<div id=\"container\" style=\"width: 640px; height: 480px\"></div>
<script type=\"text/javascript\">
var s1 = new SWFObject(\"mediaplayer.swf\",\"mediaplayer\",\"640\",\"480\",\"7\");
s1.addParam(\"allowfullscreen\",\"true\");
s1.addVariable(\"width\",\"640\");
s1.addVariable(\"height\",\"480\");
s1.addVariable(\"bufferlenght\",\"5\");
s1.addVariable(\"file\",\"$picture_url\");
s1.addVariable(\"image\",\"$pic_thumb_url\");
s1.write(\"container\");
</script>";
} else {
        $pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        $pic_html .= "<param name=\"src\" value=\"". $picture_url . "\" /><param name=\"ShowControls\" value=\"1\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"ShowStatusBar\" value=\"1\" /><param name=\"ShowDisplay\" value=\"0\" /><param name=\"DisplaySize\" value=\"0\" /><param name=\"bufferlength\" value=\"30\" /><param name=\"autostart\" value=\"$autostart\" />";
        $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" AllowChangeDisplaySize="1" '.' autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        $pic_html .= "</object><br />\n";
    }
}


I am looking for some help adding variables to make the videos buffer the syntax i have found on the player website shows as this.  so.addParam('flashvars','&file=/upload/flash.flv&bufferlength=5');  as you can see from my code i have attempted to add the following code:

s1.addVariable(\"bufferlenght\",\"5\");

but it does not work.  Im sure someone on this forum is smarter in matters like this then i am.  Any help will be appreciated.

Novocaine

Hi,

I've gone through this thread numerous times and tried everything suggested. I see the player load on screen with the play button in the centre but no flv plays & I get this error in my flash 9 console:

An Actionscript error has occurred:


TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at com.jeroenwijering.utils::Playlister/::loaderHandler()
   at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/flash.net:URLLoader::onComplete()


I've run out of suggestions to try now. Does anyone have any clues to what's going on?

TIA
NC

PagaNation

Quote from: Novocaine on August 14, 2008, 09:25:06 PM
Hi,

I've gone through this thread numerous times and tried everything suggested. I see the player load on screen with the play button in the centre but no flv plays & I get this error in my flash 9 console:

An Actionscript error has occurred:


TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at com.jeroenwijering.utils::Playlister/::loaderHandler()
   at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/flash.net:URLLoader::onComplete()


I've run out of suggestions to try now. Does anyone have any clues to what's going on?

TIA
NC



Instructions in this blog: http://matthewhelmke.net/wordpress/2008/04/26/allowing-flash-flv-files-to-be-stored-and-embedded-in-a-coppermine-gallery Is what finally worked for me... hope this helps...

Novocaine

Hi PagaNation,

I've just tried everything it said on there and now all I get is a white screen.

Cheerz for trying though

NC

Novocaine



It worked.

I forgot to re-name flvplayer.swf back to mediaplayer.swf from a previous attempt.


Many thanx PagaNation.

NC

net

Quote$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
         if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
         $exxvars="&image=".$exxvars;

thanks for this code, exactly what i was after!

netforce

Ok how do I get the FullScreen to work in Firefox? everything works fine in IE but I cannot get the Fullscreen in Firefox.

Any help is so appreciated.

Thanks

Αndré

#138
Here is a very simple solution to use the width/height values that are inserted manually for flv files .

Search in the unmodified function theme_html_picture:
        $player = $players[$user_player];

        $pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
        $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        $pic_html .= "</object><br />\n";

and replace it with:
        $player = $players[$user_player];

        if ($mime_content['extension'] == "flv") {
            $pheight = $CURRENT_PIC_DATA['pheight'] + 20;
            $thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
            $pic_html = "<embed type=\"application/x-shockwave-flash\" width=\"{$CURRENT_PIC_DATA['pwidth']}\" height=\"$pheight\" allowfullscreen=\"true\" src=\"jw_player.swf\" flashvars=\"file=$picture_url&image=$thumb\" />";
        } else {
            $pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
            $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
            $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
            $pic_html .= "</object><br />\n";
        }


The rest has to be done as described here. Maybe you'll have to rename the .swf file from the downloaded package to "jw_player.swf" if it has another name.


(Tested with JW Player 4.3.132)

caboz1

Hi,
I did all the modifications from plugin instructions.
Unfortunately its not working. as you can see here 
http://www.caboz.com/aves/displayimage.php?album=8&pos=0
The flv files uploaded fine but i get a white square in sted the flv player
Please any help will be apreciated
thankx