Re: [mediaqueries] Media Source Extensions and device capabilities

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?

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

~TJ

Received on Tuesday, 18 November 2014 21:12:30 UTC