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

Re: [mediaqueries] Media Source Extensions and device capabilities

From: Florian Rivoal <florian@rivoal.net>
Date: Tue, 18 Nov 2014 22:50:56 +0100
Cc: Mark Watson <watsonm@netflix.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <5AEB6DED-96E7-4E5E-BA3C-6C5D553F77AF@rivoal.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On 18 Nov 2014, at 22:11, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Nov 18, 2014 at 12:54 PM, Mark Watson <watsonm@netflix.com> wrote:
>> On Tue, Nov 18, 2014 at 12:43 PM, Tab Atkins Jr. <jackalmage@gmail.com>
>> wrote:
>>> Ah, if scripting is involved, this is easier.  window.devicePixelRatio
>>> gives you the screen density on all webkit/blink/ff browsers (dunno
>>> about IE).  You can then just measure the element normally using
>>> existing JS APIs, and use those two pieces of information to figure
>>> out what source to load.
>> There are two issues with that approach:
>> (1) I'm buffering ahead of time, so really I am interested in what the
>> situation would be if the video went fullscreen
> Ah, you're worried about the case where the browser itself isn't
> full-screen, so the fullscreen video dimensions might be larger than
> the browser window?

Can’t you use window.screen.height / window.screen.width in this case?

>> (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.

Is this another use case for RFC6919’s MAY WISH TO?

“If the rendering produced by the User Agent
is known to be later downscaled by the display system
(for example, due to HDCP),
the User Agent may wish to reflect this downscaling
in the value of the resolution media feature”

 - Florian
Received on Tuesday, 18 November 2014 21:51:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC