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

3 February 2010 at 9:51am
Hi Uncle Cheese
I have got your wonderful flv video player working with all the thumbnail etc options working great - thankyou! However I cannot figure out (after 2 days of trying!) how to get a video to load with a frame showing an image (refer http://www.longtailvideo.com/support/jw-player-setup-wizard?example=211) rather than just a black canvas. Any help will be most appreciated as I am pulling my hair out. Having a blank video on the homepage will not cut it! Thanks in anticipation.
Regards
Matt
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:23am
There's a flashvar called "image".. I think it just takes a URL to the thumbnail you want to use.
I might just add that into the SVN now that I'm thinking of it.
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:26am
Change your FLV.php Player() function to this:
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) : "";
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>";
}And let me know the result.
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:26am
WOW - thanks for replying so fast! Can I ask where to place this flashvar in the code?
Thanks again...
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:27am
Posted my response before your additional reply - will try your suggestion out and let you know THANKS!!
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:34am
I just get the 'loading........'
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 10:55am
JS errors?
-
Re: black canvas with flv video problem - swfobject customization?

3 February 2010 at 11:00am
Oh, duh..
I forgot the quotes.. Change line 251 to:
"swfobject.embedSWF('%s','player-%s','%d','%d','9.0.0','expressInstall.swf',{file : '%s',image : '%s'},{allowscriptaccess : 'true', allowfullscreen : '%s'})",
| 2733 Views | ||
| Go to Top | Next > |

