[whatwg] VIDEO tag height/width best fit
philipj at opera.com
Sun Aug 3 22:35:52 PDT 2008
Video is automatically scaled to fit inside its "box" while maintaining
the correct aspect ratio.
On Mon, 2008-08-04 at 00:19 -0400, Biju Gm at il wrote:
> I apologize if I did not understood
> 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.
> After reading the <video> tag specification I dont see a way to
> We should have one more attribute to tell how to "fit" the image/video
> == "fit" attribute values ===
> * center - if it is small keep at center
> * stretch - stretch/skew height and width to fit
> * stretch-height - stretch/skew height only to fit,
> adjust width to maintain aspect ratio.
> * stretch-width - stretch/skew width only to fit,
> adjust height to maintain aspect ratio.
> * stretch-best - stretch/skew height or width to maximum
> so that other will fit in
> and maintain aspect ratio.
> May be we can also have a "tile" option
> This problem also exist for <img> tag.
More information about the whatwg