FLV Player Integration MOD - Page 10 FLV Player Integration MOD - Page 10
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.

MrMatt

Thanks a lot for this, I have posted it on my site and for the most part it works wonderfully.  Although when I set the autoplay to true, it doesn't play automatically.

http://troopphoto.troop101.net/index.php?cat=52
                // There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
        }

        if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    $pic_html  = "<object type=\"application/x-shockwave-flash\" width=\"580\" height=\"475\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=true\" allowfullscreen=\"true\" allowscriptaccess=\"always\" >";
    $pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=true\" />";
    $pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
            $pic_html .= "</object><br />\n";

        } else {

        $player = $players[$user_player];

        $pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$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";

}


I was wondering if I had a setting wrong?  Thanks.

Also I noticed that there is an embed option for the player.  Can this be integrated?  I'm not sure how to write php code efficiently yet.  Thanks again!
Source: http://www.longtailvideo.com/addons/plugins/49/get-examples.html?addon=49&vid=46&q=

MrMatt

I changed my code to the embed tag, which seems to work as well as the Object tab.  When I got everything in the embed code I managed to get the autoplay to work.


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

        if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    $pic_html  = "<embed src=\"swfplayer101.swf\" width=\"580\" height=\"475\" bgcolor=\"000000\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"file=$flv&image=images/trooplogosm.png&autostart=true\"></embed><br />\n";


        }


I would like to get the image to automatically choose the normal_filename.jpg image in the folder, but I don't know what to do here so for now it's the site logo.

I got the embed tag to work, but it ended up not being what I wanted and I've ditched that idea for now.  But that has nothing to do with this topic, so I will most likely make another topic for that.

If someone knows the variables to replace in my image section of the code above I would appreciate it.  Thanks!

Αndré

Quote from: MrMatt on April 06, 2010, 08:52:45 PM
If someone knows the variables to replace in my image section of the code above I would appreciate it.  Thanks!
See here. Use
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
instead of
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');

MrMatt

I tried to add the code above, but I don't get the normal Thumbnail.  Maybe I'm missing something.
I used the code:
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
Like this:
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
    $pic_html  = "<embed src=\"http://troopphoto.troop101.net/swfplayer101.swf\" width=\"580\" height=\"475\" bgcolor=\"000000\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"file=http://troopphoto.troop101.net/$flv&image=http://troopphoto.troop101.net/$thumb&autostart=true\"></embed><br />


But where the normal photo file should be It points at
http://troopphoto.troop101.net/albums/videos/movienight2007/Beaver_BobcatWinter2007.flv

and should point at
http://troopphoto.troop101.net/albums/videos/movienight2007/normal_Beaver_BobcatWinter2007.jpg

should I just modify the image files to be Beaver_BobcatWinter2007.flv.jpg and use that?  or is there a way to detect the normal image file.

Thanks again!

-Matt

MrMatt

Edit to last post, if I have it say thumb instead of normal it works fine.  Is it because I added the normal_ file after I added the Videos?  How do I correct this.

Αndré

If you access an flv file, the 'normal' file will be the flv file. If you want to use an already existing picture, modify your code accordingly. I'm not sure what you try to accomplish.

MrMatt

OK.  I am using this mod.  I wanted to have the normal_photo shown on the SWF player before users press play. 

I have the code there but wasn't sure how to link to the picture file, but as you just told me the flv is the normal file, so I can just change a few things around to make it work for me. 

Thanks for the help. 

I will rename my normal_videophoto.jpg to videophoto.flv.jpg and then add the .jpg in the code and that should work.  I don't want to use the thumbnail image because I set the size of those to be really small.  Thanks again for all the help.

andy_cul

i have a Displaying videos from Youtube in Coppermine without fopen & Youtube dev API ID mod on my gallery now im having problem in integrating this mod. please help thanks

Αndré

Quote from: andy_cul on April 23, 2010, 01:32:14 AM
i have a Displaying videos from Youtube in Coppermine without fopen & Youtube dev API ID mod on my gallery now im having problem in integrating this mod. please help thanks


Find
        $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 with
        if ($mime_content['extension'] == "youtube") {
            // get content of .youtube file
            $youtube_file_content = file_get_contents($picture_url);
            // remove apostrophes and quotes
            $youtube_file_content = str_replace("'", "", $youtube_file_content);
            $youtube_file_content = str_replace("\"", "", $youtube_file_content);
            // get youtube video id
            $youtube_file_content = str_replace("http://www.youtube.com/watch?v=", "", $youtube_file_content);
            $youtube_file_content = explode("&", $youtube_file_content);
            $youtube_video_id = $youtube_file_content[0];
            // check if video id is valid
            if (strlen($youtube_video_id) == "11") {
                $youtube_check_result = preg_match("/[A-Za-z0-9_-]{11}/", $youtube_video_id, $youtube_video_id_valid);
            }
            // embed video or print error message
            if ($youtube_check_result == "1" ) {
                $pic_html = "<embed type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"640\" height=\"385\" src=\"http://www.youtube.com/v/{$youtube_video_id_valid[0]}&hl=de&fs=1\" />";
            } else {
                $pic_html = "Error: no valid youtube video id";
            }
        }
        elseif ($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";
        }

andy_cul

i just moved to another host and made a fresh install of cpg 1.4 with this mod but somehow i cant upload flv's anymore its already set on addfiletypes the size of the video is below 1mb.

Warning ADULT content!
http://jorpetz.com/gallery

debug mode enabled

user:test
pass:test

ubritney

I want FLV Player change skin , how change skin ?

I don't know, that how video player change skin .

My test video : http://ultimatebritney.org/videoarchive/displayimage.php?pos=-3

I want same skin video : http://meganfoxdaily.net/mfox-tv/displayimage.php?pos=-53

Please teach me , how change skin video ?

Αndré



ubritney

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

        if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    $pic_html  = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
    $pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=false\" />";
    $pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
            $pic_html .= "</object><br />\n";

        } else {

        $player = $players[$user_player];

        $pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$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";

}
    }


Where i change add code ( skin )

ubritney


MrMatt

I just upgraded to 1.5.8, and the gallery won't work with the code as is.  Since I am not an avid php coder, does anyone know what to change to get this to work with 1.5.8?

Right now FLV videos don't play at all in my gallery.  Any help is appreciated.  Thanks!

MrMatt

In response to my last Post, I found that there is a plugin that is available for 1.5.x.

http://forum.coppermine-gallery.net/index.php/topic,62704.0.html is the topic, in this forum that discusses it.

Joachim Müller


phill104

Additionally, you could also search the plugins for 1.5.x as a couple of them provide this functionality - http://forum.coppermine-gallery.net/index.php/board,91.0.html
It is a mistake to think you can solve any major problems just with potatoes.

atckart