Another FLV Player - Page 2 Another FLV Player - Page 2
 

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

Another FLV Player

Started by rphMedia, April 18, 2007, 02:40:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jostor

I'm sorry, I wasn't using the right files. I was using the files from gwendolyn's post. When i replaced them with flvPlayer.swf and flashobject.js from your post everything worked great!

Thankyou very much for helping me! :)

jostor

Is there a way this player can buffer the video before playing it?

rphMedia

Quote from: jostor on May 30, 2007, 04:44:40 PM
Is there a way this player can buffer the video before playing it?
It already does buffer the video before playing it. If you're having problems playing the video then it's either your connection or your server's problem, not the player.

s5iztok

any idea how to setup album to get thumbnails instead "video" thumnail for *.vlf files?

http://video.agility-slo.net


MEGALOLZ

is it possible to use this mod, but with a flv player that i have built myself?

if so, what settings do i need to change within flash (flash 8).

thanks
Mike

rphMedia

Quote from: MEGALOLZ on June 05, 2007, 06:21:33 PM
is it possible to use this mod, but with a flv player that i have built myself?

if so, what settings do i need to change within flash (flash 8).

thanks
Mike
You could do it 2 ways. One is (if you want to use my code out-of-the-box) - make a variable for the path to accept flvPath as the url of the FLV.  Or you could create your own Flash Var(s).

MEGALOLZ

would you be able to walk me through it?

ive had experience with flash before, but nothing too advanced.

I'm more of a designer than a coder ;) lol

rphMedia

No, sorry. From your question, you sounded like you were ready for the answer.

It would take a lot of "walk me thru it" time to guide you and this is not the place.  Try flashkit.com, lots of help there. Though not really difficult, it is time consuming to explain/learn.


MEGALOLZ

ok cheers anyway, but i've tried flashkit before, and could never find any tutorials on how to change variables in the component inspector via an external script..
guess i'll go look again =\

Mike

p.s. i already have an fla, and its playing videos i set directly, its just changing it dynamically that i can't get working

jack5288

hi i have a "big" problem

Parse error: syntax error, unexpected $end in /www/htdocs/w0087014/coppermine/themes/water_drop/theme.php on line 184

theme.php:

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.10
  $Source$
  $Revision: 3275 $
  $Author: gaugau $
  $Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';
// Displays a picture
function theme_html_picture()
{
    global 
$CONFIG$CURRENT_PIC_DATA$CURRENT_ALBUM_DATA$USER;
    global 
$album$comment_date_fmt$template_display_media;
    global 
$lang_display_image_php$lang_picinfo;

    
$pid $CURRENT_PIC_DATA['pid'];
    
$pic_title '';

    if (!isset(
$USER['liv']) || !is_array($USER['liv'])) {
        
$USER['liv'] = array();
    }
    
// Add 1 to hit counter
    
if (!USER_IS_ADMIN && !in_array($pid$USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
        
add_hit($pid);
        if (
count($USER['liv']) > 4array_shift($USER['liv']);
        
array_push($USER['liv'], $pid);
    }

    if(
$CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      
$condition true;
    }elseif(
$CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
      
$condition true;
    }elseif(
$CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
      
$condition true;
    }else{
     
$condition false;
    }

    if (
$CURRENT_PIC_DATA['title'] != '') {
        
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
    }
    if (
$CURRENT_PIC_DATA['caption'] != '') {
        
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
    }
    if (
$CURRENT_PIC_DATA['keywords'] != '') {
        
$pic_title .= $lang_picinfo['Keywords'] . ": " $CURRENT_PIC_DATA['keywords'];
    }

    if (!
$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
        
template_extract_block($template_display_media'img_desc');
    } else {
        if (!
$CURRENT_PIC_DATA['title']) {
            
template_extract_block($template_display_media'title');
        }
        if (!
$CURRENT_PIC_DATA['caption']) {
            
template_extract_block($template_display_media'caption');
        }
    }

    
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';

    
if ($CONFIG['make_intermediate'] && $condition ) {
        
$picture_url get_pic_url($CURRENT_PIC_DATA'normal');
    } else {
        
$picture_url get_pic_url($CURRENT_PIC_DATA'fullsize');
    }

    
$image_size compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);

    
$pic_title '';
    
$mime_content cpg_get_type($CURRENT_PIC_DATA['filename']);


    if (
$mime_content['content']=='movie' || $mime_content['content']=='audio') {

        if (
$CURRENT_PIC_DATA['pwidth']==|| $CURRENT_PIC_DATA['pheight']==0) {
            
$CURRENT_PIC_DATA['pwidth']  = 320// Default width

            // Set default height; if file is a movie
            
if ($mime_content['content']=='movie') {
                
$CURRENT_PIC_DATA['pheight'] = 240// Default height
            
}
        }

        
$ctrl_offset['mov']=15;
        
$ctrl_offset['wmv']=45;
        
$ctrl_offset['swf']=0;
        
$ctrl_offset['rm']=0;
        
$ctrl_offset_default=45;
        
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
        
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
    }

    if (
$mime_content['content']=='image') {
        if (isset(
$image_size['reduced'])) {
            
$winsizeX $CURRENT_PIC_DATA['pwidth']+5;  //the +'s are the mysterious FF and IE paddings
            
$winsizeY $CURRENT_PIC_DATA['pheight']+3//the +'s are the mysterious FF and IE paddings
            
$pic_html "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            
$pic_title $lang_display_image_php['view_fs'] . "\n==============\n" $pic_title;
            
$pic_html .= "<img src=\"" $picture_url "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            
$pic_html .= "</a>\n";
        } else {
            
$pic_html "<img src=\"" $picture_url "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }
    } elseif (
$mime_content['content']=='document') {
        
$pic_thumb_url get_pic_url($CURRENT_PIC_DATA,'thumb');
        
$pic_html "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
    } else {
        
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');

        
$players['WMP'] = array('id' => 'MediaPlayer',
                                
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
                                
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
                                
'mime' => 'type="application/x-mplayer2" ',
                               );
        
$players['RMP'] = array('id' => 'RealPlayer',
                                
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
                                
'codebase' => '',
                                
'mime' => 'type="audio/x-pn-realaudio-plugin" '
                               
);
        
$players['QT']  = array('id' => 'QuickTime',
                                
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
                                
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
                                
'mime' => 'type="video/x-quicktime" '
                               
);
        
$players['SWF'] = array('id' => 'SWFlash',
                                
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
                                
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
                                
'mime' => 'type="application/x-shockwave-flash" '
                               
);
        
$players['UNK'] = array('id' => 'DefaultPlayer',
                                
'clsid' => '',
                                
'codebase' => '',
                                
'mime' => ''
                               
);

        if (isset(
$_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
            
$user_player $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
        } else {
            
$user_player $mime_content['player'];
        }

                
// 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];

if (
$mime_content['extension'] == "flv") {
$descript $CURRENT_PIC_DATA['title'];
$pic_html "<script type=\"text/javascript\" src=\"flashobject.js\"></script><div id=\"flashcontent\" style=\"width: 320px; height: 240px\"></div><script type=\"text/javascript\">var fo = new FlashObject(\"flvPlayer.swf\", \"animationName\", \"330\", \"270\", \"8\", \"#FFFFFF\");fo.addParam(\"allowScriptAccess\", \"sameDomain\");fo.addParam(\"quality\", \"high\");fo.addParam(\"FlashVars\", \"flvPath=$picture_url&flvTitle=$descript\");fo.addParam(\"wmode\", \"transparent\");fo.write(\"flashcontent\");</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=\"autostart\" value=\"$autostart\" />";
        
$pic_html .= '<embed '.$image_size['whole'].' src="'$picture_url '" AllowChangeDisplaySize="1" '.' autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        
$pic_html .= "</object><br />\n";
}
?>

Nibbler

You've copied half the function. Copy the whole thing.

tim18

Hi,

I have opened up the theme.php file and found that its really a blank canvas.
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_NAVBAR_GRAPHICS', 1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);  // Remove this if you edit this template until
                                            // you have validated it. See docs/theme.htm.

// HTML template for main menu
$template_sys_menu = <<<EOT
                <div class="topmenu">
                     {BUTTONS}
                </div>
EOT;

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='';


?>


In your opening post you mentioned something about making sure the function theme_html_picture() exists. By the look of it, i dont think it does. Am i missing something?
Thanks
Tim

Nibbler

Copy the function from the sample theme.

ba2

Hello to all!
I have some problems to install the flv player.
I have a blank theme.php (well there is just some codes)
what do I need to add between the lines :

define('THEME_IS_XHTML10_TRANSITIONAL',1);

?>

thanks

Joachim Müller

Do as Nibbler suggested just one posting above yours. In the future, read the thread you reply to thoroughly before starting your reply.

mrdummy

I tried this with 1.4.12

I copied whole function from theme.inc.php inside theme.php
Paste the code for FLV part inside function.
Copied ... ho! The JW Player package has newer swfobject.js (v1.5) and the flashobject.js seems older (v1.2.3).
Both are placed in gallery root.
FLV file type added.

When i run the gallery with modifications, i can add FLV files, but when i want play one, the screen is black.
This is tested in Firefox 2.0.0.6.
With IE 6, the player itself shows indeed up with 'Play' icon. But no clip is visible or playable.

When i check sample html file of JW Player, the settings are different.

mrdummy

Finally found the problem.
The JW Player is indeed internally changed, thus you need new setting values to play FLV files possible.

This code

fo.addParam(\"FlashVars\", \"flvPath=$picture_url&flvTitle=$descript\");


change in

fo.addVariable(\"file\",\"$picture_url\");

And you can play finally FLV files. Verified in Firefox and IE 6+
It's important to compare changes with sample HTML inside JW Player zip file. I add new codes from sample HTML file and that is the answer.
The old code in startpost doesn't work with latest zip package.
You may add more codes from sample HTML file inside $pic_html if you want, for example custom colors.

ULISS

Why the mod is doesh,t worked? What hapend? Sorry for my bad Russian-English.... :P

http://www.usiba.ru/gallery/displayimage-random-10--187.html

angel777

How to Editing Theme.php in Coppermine 1.4.13 - Security release?

In this release there isn't
// There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = etc etc


Where mod?
... at the End I crashed all themes i created i think..lol