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.