1

Is it possible to resize a silverlight/flash video player on the fly? I would like to create a video where I can drag the bottom left corner to resize the player (maintaining aspect ratio) or at least eliminate the possibility of doing so I could move on to other methods.

Thanks in advance...

EDIT: // forgot to mention Sorry forgot to mention, this would also mean that the actual video itself resizing right?

1
  • Sorry forgot to mention, this would also mean that the actual video itself resizing right? Commented Mar 12, 2009 at 16:02

5 Answers 5

6

Silverlight: Absolutely. Just set the the Stretch property to Uniform and then alter either the Width or Height as you resize.

6

Flash: Yes, you can alter the size of a flash object through JavaScript. Using a YUI, jQuery, or a Mootools JavaScript library, this should not be too difficult to prototype.

Here is a posts which explains how to resize flash from within your flash code.

Proportional resizing - here is an example of that as well using jQuery.

I'm not sure if the same is true for Silverlight browser objects, although I'd be surprised if you couldn't do the same.

1

This is a CSS solution for resizing videos on the fly.

The video can even resize itself according to the user settings if it is styled using EMs. This demo shows how a video resize itself according to the width of the user agent.

0

Here is an example of the silverlight scaling. This photo retouching and restoration site has a couple of silverlight controls that scale with browser resizing. There is quite a nice photo gallery that shows the photos before and after the retouch.

0

JWPlayer

As of version 5.3 they added a resize() method to the javascript API which allows you to resize a player - and all the control bar etc. will resize correctly too.

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference

resize(width, height) Resizes the player to the specified dimensions.

width:Number: the new overall width of the player.

height:Number: the new overall height of the player. Note: If a controlbar or playlist is displayed next to the video, the actual video is of course smaller than the overall player.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.