0

I have a VideoPlayer in a Flex 4 application. The whole application is the VideoPlayer plus some error handling (if no url was specified via flashVars, if the url does not point to a flv file etc).

How can I make the embedded SWF file dimmensions match the ones in of the video source for the VideoDisplay component, please?

Thank you.

Tetsujin no Oni
  • 7,300
  • 2
  • 29
  • 46
Francisc
  • 77,430
  • 63
  • 180
  • 276

1 Answers1

0

Do you mean you would like to change the size of the swf after it has been loaded? If that is what you mean then you need to do 2 things:

1) Find out the size of the video being played. This can be done by getting the metadata from the video file (I think it is form the netstream, onMetaData event) 2) Call a javascript function to change the size of your swf in the html DOM, because the swf can not change its own size. You can do this with ExternalInterface.

I hope this helps.

Piotr
  • 4,813
  • 7
  • 35
  • 46