[whatwg] Change request: rules for pixel ratio
ian at hixie.ch
Thu Jun 12 02:18:46 PDT 2008
On Tue, 10 Jun 2008, Philip Jägenstedt wrote:
Incidentally, you may prefer this version of the spec:
It has a style sheet optimised for this specification instead of using the
W3C style sheet. (It's otherwise identical.)
> The pixelratio attribute allows the author to specify the pixel ratio of
> anamorphic media resources that do not self-describe their pixel ratio.
> [...] The default value, if the attribute is omitted or cannot be
> parsed, is 1.0.
> This seems more than strange. Should this be taken to mean that the
> pixelratio attribute is defaulted to 1.0 even for ï»¿media resources that
>DO NOT self-describe their pixel ratio?
Yes, but that doesn't mean what you think it means. (I've clarified this
in the spec.)
The only way the default is used is in deciding what number to return for
pixelRatio in the DOM when the content attribute is missing. If the
content attribute is omitted, then the user agent doesn't adjust the
intrinsic width of the video at all; the intrinsic dimensions and the
intrinsic pixel ratio of the video are honoured.
> It is also worth noting that when the pixel ratio is < 1.0 it will make
> more sense for the user agent to adjust the height than the width if no
> width/height attributes have been set. This could be pointed out in the
> rendering section eventually.
I've allowed this explicitly now.
On Tue, 10 Jun 2008, Ralph Giles wrote:
> Does this mean the implementation must retrieve the self-described pixel
> aspect ratio from the stream and supply it as part of the DOM?
On Tue, 10 Jun 2008, Charles wrote:
> Offhand, I can't think of any use cases where it'd be useful to expose
> pixel aspect ratio.
On Wed, 11 Jun 2008, Philip Jägenstedt wrote:
> Exposing pixel ratio as readonly float videoPixelRatio in
> HTMLVideoElement might be a good idea. If the media resource doesn't
> self-describe its pixel ratio (many formats don't) it should be assumed
> to be 1.0. I'm not convinced it is necessary as content authors who want
> to be very explicit will probably set the pixelratio manually. Still, it
> is trivial to expose and might make life easier for those who want this
> information for low-level control of the video element size via the DOM.
I don't see a good reason to expose it, so I haven't added a way to do
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg