[whatwg] Video proposals

Nicholas Shanks wrote:
> 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.
I think the idea of having an attribute for the aspect ratio of a video 
is a great idea, especially given the fact that web sites today should 
be as fluid / liquid as possible since there is a need to cater for a 
range of different screen sizes.
So this gets my vote FWIW.

Dean Edridge

Received on Friday, 16 March 2007 18:55:51 UTC