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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

black canvas with flv video problem - swfobject customization?


Go to End


20 Posts   4676 Views

Avatar
mattman

Community Member, 18 Posts

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

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.

Avatar
mattman

Community Member, 18 Posts

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...

Avatar
mattman

Community Member, 18 Posts

3 February 2010 at 10:27am

Posted my response before your additional reply - will try your suggestion out and let you know THANKS!!

Avatar
mattman

Community Member, 18 Posts

3 February 2010 at 10:34am

I just get the 'loading........'

Avatar
UncleCheese

Forum Moderator, 4102 Posts

3 February 2010 at 10:55am

JS errors?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

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'})",

Go to Top