[whatwg] VIDEO tag height/width best fit

On Mon, 4 Aug 2008, Biju Gm at il wrote:
>
> I apologize if I did not understood
> http://www.whatwg.org/specs/web-apps/current-work/#video
> 
> I see a situation where we want to specify the height and width of the 
> BOX in which a video need to be displayed. And while writing HTML code 
> we dont know the height/width of the video. But when playing we want the 
> video to be displayed with maximum size which can fit in the BOX without 
> loosing the aspect ratio.

It's automatically like this.

# Video content should be rendered inside the element's playback area such 
# that the video content is shown centered in the playback area at the 
# largest possible size that fits completely within it, with the video 
# content's adjusted aspect ratio being preserved.
 -- http://www.whatwg.org/specs/web-apps/current-work/#video

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 4 August 2008 03:58:45 UTC