W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] Video proposals

From: Nicholas Shanks <contact@nickshanks.com>
Date: Fri, 16 Mar 2007 11:05:05 +0000
Message-ID: <0B37CEC9-34A4-4CB9-BBC5-B9C8AD87D9E0@nickshanks.com>
Discussion on aspect ratio:

>>> You may want to consider aspect ratio too:  ratio="preserve" being
>>> default, ratio="1.333" could indicate 4:3 or get tricky and accept
>>> "16:9" for precision reasons.
>>
>> Wouldn't we simply always want to use the authored size?
> Do videos encode what size they are best displayed in?  I hate
> entering height and width for images.

The reason I requested this is because:

1) If you specify both a width and a height, video content that  
doesn't match that gets distorted.
2) If you want an element to have a fixed width, but variable height  
dependant on the aspect of the video, or fixed height and variable  
width, yet still have a non-zero initial value for the variable  
parameter (so that the <video> element occupies some screen area),  
you cannot achieve this without distorting the final image by setting  
both width and height.
3) Thinking about it more, the ratio should be explicitly advisory  
and only valid until the downloaded video can provide it's own width  
and height.

I envisage:

<video src="foo" width="386px" aspect="59:54"></video>
<p>Some content below the video</p>

Then, when the video is finally downloaded and it's inherent  
dimensions (and thus aspect ratio) are known, re-layout can occur if  
the aspect values don't match, but more importantly can be avoided if  
they do.

The width given is an integer number of CSS pixels, by providing an  
aspect ratio, the UA can calculate the resultant height in device  
pixels without the user having to provide a height and associated  
rounding errors (or plain mistakes). The example above has an  
irrational height.

4) Only two of {width, height, aspect} can be specified on any video  
element.

- Nicholas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070316/23bf84f2/attachment.bin>
Received on Friday, 16 March 2007 04:05:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC