Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

black canvas with flv video problem - swfobject customization?


Reply


20 Posts   3571 Views

Avatar
mattman

Community Member, 18 Posts

3 February 2010 at 11:52am

Alas, no luck so far...it is working as regular but there is no preview image.....I'm sorry I am out of my depth and cannot make suggestions here......hopefully we can get it to work?

Avatar
UncleCheese

Forum Moderator, 4096 Posts

3 February 2010 at 6:19pm

Edited: 03/02/2010 6:20pm

Man, I'm just not with it today. Would help if I used the URL of the image and not the object itself.

public function Player($width = null, $height = null)
{
if($width === null) $width = self::$video_width;
if($height === null) $height = self::$video_height;
$image = ($thumb = $this->VideoThumbnail()) ? $thumb->CroppedImage($width,$height)->URL : "";
self::$player_count++;
Requirements::javascript('dataobject_manager/code/flv/swfobject.js');
Requirements::customScript(sprintf(
"swfobject.embedSWF('%s','player-%s','%d','%d','9.0.0','expressInstall.swf',{file : '%s',image : %s},{allowscriptaccess : 'true', allowfullscreen : '%s'})",
$this->SWFLink(),
self::$player_count,
$width,
$height,
$this->FLVLink(),
$image,
$this->AllowFullScreen()
)
);
return "<div id='player-".self::$player_count."'>Loading...</div>";
}

Avatar
mattman

Community Member, 18 Posts

3 February 2010 at 6:40pm

Hi there UncleCheese... I have reinstalled DataObject_Manager from SVN and placed the new code in FLV.php and am getting the "Loading......" again - almost there I hope!!

Avatar
mattman

Community Member, 18 Posts

3 February 2010 at 6:53pm

Uncle Cheese - we got it!!!!!!!!!!!!!!!!!! I pasted the earlier revised line 251 code into your latest function and it works great. THANKS A MILLION - the local non-profit sustainability organization I am helping - will really benefit from all the hard work you have done developing these features and helping silverstripe newbies like me implement quality multimedia solutions. THANKS AGAIN UNCLE CHEESE

Avatar
UncleCheese

Forum Moderator, 4096 Posts

4 February 2010 at 2:13am

Could you send me a link?

Avatar
UncleCheese

Forum Moderator, 4096 Posts

4 February 2010 at 2:13am

Sorry, missed your last message. Yay! It's working. Rock on, dude.

I'll roll that into SVN.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

4 February 2010 at 2:17am

Edited: 04/02/2010 2:18am

Actually, just to be sure, can you paste in the Player() function that ultimately worked? Thanks.

Avatar
mattman

Community Member, 18 Posts

4 February 2010 at 5:21am

public function Player($width = null, $height = null)
{
if($width === null) $width = self::$video_width;
if($height === null) $height = self::$video_height;
$image = ($thumb = $this->VideoThumbnail()) ? $thumb->CroppedImage($width,$height)->URL : "";
self::$player_count++;
Requirements::javascript('dataobject_manager/code/flv/swfobject.js');
Requirements::customScript(sprintf(
"swfobject.embedSWF('%s','player-%s','%d','%d','9.0.0','expressInstall.swf',{file : '%s',image : '%s'},{allowscriptaccess : 'true', allowfullscreen : '%s'})",
$this->SWFLink(),
self::$player_count,
$width,
$height,
$this->FLVLink(),
$image,
$this->AllowFullScreen()
)
);
return "<div id='player-".self::$player_count."'>Loading...</div>";
}