Hi, regarding my last post - I have managed to find a way to check for individual preview images as below. This is a hacked version of Julian's new flash player filter and the original mediaplugin. The reason for hacking them together was to still be able to indicate image size within a flv link but still have the great attributes of Julian's filter.
The resultant hack now checks for a preview image with the same name and location as the flv file and uses that instead of the default one if it exists. The hack seems a bit convoluted tho - within the if file_exists statement it would only check for $CFG->
dataroot string and then use a $CFG->wwwroot string!? I am not sure how efficient this is so if anyone can make it more sucinct please let me know. Heres the hack...
function mediaplugin_flv_callback($link) {
global $CFG;
static $count = 0;
$count++;
$id = 'filter_flv_'.time().$count; //we need something unique because it might be stored in text cache
$controlbar = $CFG->mediaplugin_flvplayer_controlbar;
$autostart = $CFG->mediaplugin_flvplayer_autostart;
$width = empty($link[3]) ? '480' : $link[3];
$height = empty($link[4]) ? '360' : $link[4];
$image_default = $CFG->filter_flvplayer_image;
$flv_url = addslashes_js($link[1]);
$image_string = $flv_url;
$new_image_string = substr($image_string,37,-3);
$flv_image_string = $new_image_string.'jpg';
$previewImage = $CFG->dataroot.$flv_image_string;
$flv_image_string = $CFG->wwwroot.'/file.php/'.$flv_image_string;
if (file_exists($previewImage)){
$image = $flv_image_string;
}else{
$image = $CFG->wwwroot.'/filter/flvplayer/images/'.$image_default.'.jpg';
}
return $link[0].
'<span class="mediaplugin mediaplugin_flv" id="'.$id.'"></span>
<embed
src="'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf"
width="'.$width.'"
height="'.$height.'"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file='.$flv_url.'&controlbar='.$controlbar.'&autostart='.$autostart.'&image='.$image.'"
/>';
Kindest Regards Daran