Jump to:

7939 Posts in 1543 Topics by 946 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, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 3299 Views
  • mattman
    Avatar
    Community Member
    18 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

    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>";
    }

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

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

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

    Could you send me a link?

  • UncleCheese
    Avatar
    4085 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

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

    I'll roll that into SVN.

  • UncleCheese
    Avatar
    4085 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

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

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: black canvas with flv video problem - swfobject customization? Link to this post

    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>";
    }

    3299 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.