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: Tue, 18 Nov 2014 12:54:46 -0800
Message-ID: <CAEnTvdAbisDxcCFn5YY9zCzSus7NoirDYb1CHgKWoJ9rSs_-4g@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, Florian Rivoal <florian@rivoal.net>, "www-style@w3.org" <www-style@w3.org>
On Tue, Nov 18, 2014 at 12:43 PM, Tab Atkins Jr. <jackalmage@gmail.com>

> On Tue, Nov 18, 2014 at 12:20 PM, Mark Watson <watsonm@netflix.com> wrote:
> > On Tue, Nov 18, 2014 at 9:45 AM, Tab Atkins Jr. <jackalmage@gmail.com>
> > wrote:
> >> This might be something we need to solve in HTML, by adopting
> >> something analogous to srcset.  Or, if we're okay with letting CSS
> >> override <video> source selection, we can solve it with something
> >> parallel to image-set(), specialized for videos.
> >
> > I think it's clear that for the <source> / @srcset case, then giving the
> UA
> > the information is needs to make the choice is the right solution.
> >
> > For our use-case, though, we are using the Media Source Extension so it
> is
> > fundamentally the script that decides which stream is downloaded. So the
> > script needs the same information the UA would use in a declarative
> setting.
> 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
(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)


> Discounting any connection speed-based decision-making browsers might
> do, this is the same information that the browser uses to decide
> srcset stuff.
> ~TJ
Received on Tuesday, 18 November 2014 20:55:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:48 UTC