W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [mediaqueries] Media Source Extensions and device capabilities

From: Mark Watson <watsonm@netflix.com>
Date: Wed, 19 Nov 2014 09:38:57 -0800
Message-ID: <CAEnTvdCio=N_goAbOs41OPsAXnVmShN-4aSeV=K+cGap6Bwxfw@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On Wed, Nov 19, 2014 at 12:26 AM, Florian Rivoal <florian@rivoal.net> wrote:

> >> (2) There are scenarios where video gets downscaled, most notably when
>> >> output over HDMI (due to HDCP, yes, I know), and in these scenarios I
>> am
>> >> interested in the actual output resolution (after downscaling)
>> >
>> > Hm, that's much weirder.  I don't know how easy/possible it is to
>> > acquire that information in browser-land.  I assume it probably is,
>> > but shrug.
>> I would tend to say it is the User Agent’s job to dynamically reflect
>> this kind of thing into the resolution media query, but I don’t have a
>> particularly high faith that browser vendors will bother.
> ​There are certainly browser vendors who are implementing this kind of
> downscaling and I believe have an interest in exposing it in a standard
> fashion.
> Can you explain in more detail how it they could "dynamically reflect this
> kind of thing into the resolution media query” ?
> resolution, like other media queries, is supposed to reflect the
> environment, and to change if the environment changes. So if you started
> with a high resolution, and all of a sudden you’re on a low one (due to
> downscaling or whatever), resolution should be updated.
> I think the problem is that the resolution restriction is specific to the
> video element output: what I need to know is the resolution (in the X x Y
> pixels sense) of the video element output, if it was fullscreen.
> Do you mean that HDCP will downscale only one area of the screen, as
> opposed to the whole screen, or that it will respond to the presence of
> video by downscaling the whole screen, but wouldn’t do the downscaling if
> there was no video element?

​The downscaling isn't done by HDCP, but because of HDCP (or, rather, the
lack of it). The output of the video decoder would be downscaled before
compositing with whatever else is on the screen.​

> If the presence of the downscaling can depend on the content you show and
> how you show it, media queries is the wrong tool for the job.
> @media (fullscreen-video-res < 2dppx) { video { display: none } } /*now
> the screen flickers, as running the video drops the resolution, which stops
> the video, which increases the resolution, which starts the video… */
Yes, good point.​

> On top of that, given that what you want is to directly ask for x and y,
> rather than have your content be adjusted for you if you cross certain
> thresholds, it really seems to me that a JS API would be a more
> straightforward solution to your problem.
> While I don’t think it would be impossible to solve your use case with new
> media queries, the constrains we need to deal with to make sure that these
> queries make sense for more than your specific use case will bring quite a
> bit of baguage that I don’t think will be of much interest to you.

​I'll take that feedback back to the html-media WG. Thanks.


>  - Florian
Received on Wednesday, 19 November 2014 17:39:25 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:45 UTC