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?


Go to End
Reply

20 Posts   3359 Views

Avatar
mattman

3 February 2010 at 9:51am Community Member, 18 Posts

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

3 February 2010 at 10:23am 4085 Posts

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

3 February 2010 at 10:26am 4085 Posts

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

3 February 2010 at 10:26am Community Member, 18 Posts

WOW - thanks for replying so fast! Can I ask where to place this flashvar in the code?

Thanks again...

Avatar
mattman

3 February 2010 at 10:27am Community Member, 18 Posts

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

Avatar
mattman

3 February 2010 at 10:34am Community Member, 18 Posts

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

Avatar
UncleCheese

3 February 2010 at 10:55am 4085 Posts

JS errors?

Avatar
UncleCheese

3 February 2010 at 11:00am 4085 Posts

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