7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » black canvas with flv video problem - swfobject customization?
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 2734 Views |
-
Re: black canvas with flv video problem - swfobject customization?

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?
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 6:19pm Last edited: 3 February 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>";
} -
Re: black canvas with flv video problem - swfobject customization?

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!!
-
Re: black canvas with flv video problem - swfobject customization?

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
-
Re: black canvas with flv video problem - swfobject customization?

4 February 2010 at 2:13am
Could you send me a link?
-
Re: black canvas with flv video problem - swfobject customization?

4 February 2010 at 2:13am
Sorry, missed your last message. Yay! It's working. Rock on, dude.
I'll roll that into SVN.
-
Re: black canvas with flv video problem - swfobject customization?

4 February 2010 at 2:17am Last edited: 4 February 2010 2:18am
Actually, just to be sure, can you paste in the Player() function that ultimately worked? Thanks.
-
Re: black canvas with flv video problem - swfobject customization?

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>";
}
| 2734 Views | ||
| Go to Top | Next > |

