You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

getClip().width and getClip().height always returns 320 & 240 Created Aug 31, 2009

This thread is solved

Views: 2859     Replies: 3     Last reply Aug 7, 2011  
You must login first before you can use this feature

nettpar

Posts: 2

Registered:
Aug 31, 2009

getClip().width and getClip().height always returns 320 & 240

Posted: Aug 31, 2009

Hopefully this is a simple one. I am trying to get the clip dimensions with the following which is triggered from an onPause event:


 height = $f('player').getClip().height + 26;
 width = $f('player').getClip().width; 

My config is:


HTML:
<a href="flowplayer-700.flv" style="display:block;width:426px;height:300px;float:left; margin-left:10px" id="player"> </a>

JS:
flowplayer("player", "flowplayer-3.1.2.swf", {
  clip:  { 
    autoPlay: true, 
    autoBuffering: true,
    scale: 'fit',
  }
});

When the clip starts playing the first pause event triggers the function containing the getClip.width() and getClip.height() calls. The first event always gives 320 & 240 respectively. Subsequent pauses return the correct dimensions.

I am getting this information and passing it to FFMPEG to generate and include an video still in the page. You can see the behaviour here:

http://code.nettpar.org.uk/flowplayer/index.php

Does anyone have any suggestions or ideas of what's happening here?

Thanks

gmccomb

Posts: 746

Registered:
Apr 9, 2009

» getClip().width and getClip().height always returns 320 & 240

Posted: Sep 1, 2009

Reply to: getClip().width and getClip().height always returns 320 & 240, from nettpar
What happens when you explicitly give the index to the clip - getClip(0) ?

Also, flvtool2 or something similar may be more efficient. You have to run FFmpeg twice anyway (once to get the dimensions and add +26, then once to get the screen cap).

nettpar

Posts: 2

Registered:
Aug 31, 2009

» » getClip().width and getClip().height always returns 320 & 240

Posted: Sep 1, 2009

Reply to: » getClip().width and getClip().height always returns 320 & 240, from gmccomb
Thanks for the suggestion. I get the same issue though.

I am only calling FFmpeg once, passing in the time and dimensions. Is there something else you think I should be doing?

I have a look a flvtool2.

Thanks again.