W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] VIDEO tag height/width best fit

From: Biju Gm@il <bijumaillist@gmail.com>
Date: Mon, 4 Aug 2008 00:19:48 -0400
Message-ID: <4a27dd80808032119pb79b724j6ce67b42cfcff2cd@mail.gmail.com>
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.

After reading the <video> tag specification I dont see a way to
achieve this with out javascript code.

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.
Received on Sunday, 3 August 2008 21:19:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC