hi uc,
first of all my gratitude for this cool module. Solved me a lot of my problems, and i'm way beyond of beeing aware of all the possibilities given with this as i'm dealing with it only since a few days.
now to my problem:
i'm handling FLV's with your module wich works amazingly troublefree well. as there's no ffmpeg support on the webserver the site is hosted i've tried to deal with amanually uploaded jpeg 2 use as a videothumbnail. furthermore the presence of a thumbnail seems 2 be implicit 4 the VideoPopup function 2 work.
so i've added an image field to my fieldset and changed the getThumbnail function in your FLV.php to this:
public function getThumbnail()
{
if($thumbnailID = intval(DataObject::get_one("StartVideo", "AttachmentID = {intval($this->ID)}")->ThumbNailID))
{
$img = DataObject::get_by_id("Image", $thumbnailID);
return $img;
} else {
if($img = DataObject::get_one("Image","Title = 'flv_thumb_{$this->ID}'")) {
if(Director::fileExists($img->Filename))
return $img;
return false;
}
return false;
}
}
this works fine (as long as on thumnail image is uploaded)
the only thing i cant get to work, is the CroppedImage thing in the VideoPopup function:
...
return $this->customise(array(
'PopupWidth' => $popup_width,
'PopupHeight' => $popup_height,
'Title' => $this->Title,
'Link' => $this->FLVLink(),
'Thumbnail' => $this->VideoThumbnail()//->CroppedImage($thumb_width, $thumb_height)
))->renderWith(array('FLVpopup'));
...
as long as i comment out the cropping, all works perfect, if i do cropping NO images are rendered or displayed at all. and i don't have a clue why! as i haven't ffmpeg installed (yet) on my localhost, i've got no chance to compare db entry of the rendered image to the uploaded one. though i think there should'nt be any?!
hope u can help on this strange issue!
thanx :-)
btw, the problem with 4 arguments not workin with videopopup you mentioned in your youtube vid i solved this way:
public function VideoPopup($sizeString)
{
$sizeData = explode(' ', $sizeString);
if(isset($sizeData[0], $sizeData[1])){
$thumb_width = intval($sizeData[0]);
$thumb_height = intval($sizeData[1]);
} else {
$thumb_width = self::$default_thumbnail_width;
$thumb_height = self::$default_thumbnail_height;
}
if(isset($sizeData[2], $sizeData[3])){
$popup_width = intval($sizeData[2]);
$popup_height = intval($sizeData[3]);
} else {
$popup_width = self::$default_popup_width;
$popup_height = self::$default_popup_height;
}
...
i send the 4 attributes as ONE string, delimited by a "blank". maybe the code could be shortened or more elegant, but it works and i'm not too familiar with php.