Advanced search  

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]

Pages: 1 ... 6 7 8 9 [10] 11   Go Down

Author Topic: FLV Player Integration MOD  (Read 293176 times)

0 Members and 3 Guests are viewing this topic.

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #180 on: April 05, 2010, 02:47:15 am »

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
Code: [Select]
                // 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=
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #181 on: April 06, 2010, 08:52:45 pm »

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.

Code: [Select]
        // 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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15761
Re: FLV Player Integration MOD
« Reply #182 on: April 09, 2010, 10:15:20 am »

If someone knows the variables to replace in my image section of the code above I would appreciate it.  Thanks!
See here. Use
Code: [Select]
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');instead of
Code: [Select]
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #183 on: April 12, 2010, 05:29:49 am »

I tried to add the code above, but I don't get the normal Thumbnail.  Maybe I'm missing something.
I used the code:
Code: [Select]
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');Like this:
Code: [Select]
    $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
Code: [Select]
http://troopphoto.troop101.net/albums/videos/movienight2007/Beaver_BobcatWinter2007.flv
and should point at
Code: [Select]
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
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #184 on: April 12, 2010, 05:49:41 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15761
Re: FLV Player Integration MOD
« Reply #185 on: April 12, 2010, 12:34:06 pm »

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.
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #186 on: April 12, 2010, 05:08:28 pm »

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.
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: FLV Player Integration MOD
« Reply #187 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15761
Re: FLV Player Integration MOD
« Reply #188 on: April 23, 2010, 07:28:41 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
Code: [Select]
        $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
Code: [Select]
        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";
        }
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: FLV Player Integration MOD
« Reply #189 on: May 09, 2010, 09:08:05 am »

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
Logged

ubritney

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: FLV Player Integration MOD
« Reply #190 on: August 13, 2010, 09:53:55 pm »

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 ?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15761
Re: FLV Player Integration MOD
« Reply #191 on: August 13, 2010, 10:07:15 pm »

Logged

ubritney

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: FLV Player Integration MOD
« Reply #192 on: August 13, 2010, 10:08:47 pm »

Logged

ubritney

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: FLV Player Integration MOD
« Reply #193 on: August 13, 2010, 10:12:47 pm »

Code: [Select]
                // 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 )
Logged

ubritney

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: FLV Player Integration MOD
« Reply #194 on: August 14, 2010, 12:40:33 pm »

i solved skin .

but i want change logo , how ?

http://ultimatebritney.org/videoarchive/displayimage.php?pos=-3
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #195 on: October 21, 2010, 05:58:27 am »

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!
Logged

MrMatt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: FLV Player Integration MOD
« Reply #196 on: October 21, 2010, 07:09:49 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: FLV Player Integration MOD
« Reply #197 on: October 25, 2010, 09:33:57 am »

Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4710
    • Windsurf.me
Re: FLV Player Integration MOD
« Reply #198 on: October 25, 2010, 12:18:50 pm »

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
Logged
It is a mistake to think you can solve any major problems just with potatoes.

atckart

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
    • pvc kart
Re: FLV Player Integration MOD
« Reply #199 on: November 25, 2010, 05:30:39 pm »

thanks for your post
Logged
Pages: 1 ... 6 7 8 9 [10] 11   Go Up
 

Page created in 0.17 seconds with 21 queries.