Re: [mediaqueries] Media Source Extensions and device capabilities

On Tuesday 2014-09-23 09:22 -0700, Mark Watson wrote:
> I am not really a CSS expert, so that is why I posted the underlying
> requirement without presuming a CSS solution.
> 
> But, naively, I would think that if we had a "device pixels" unit (dpx)
> corresponding to physical device pixels, we could construct a media query
> along the lines of "min-height: 1080dpx". This could be used to annotate a
> <source> element on an HTMLMediaElement or with window.mediaMatch() to
> obtain events as the window is moved to / from displays with HD resolution.

Are these media queries evaluated as they normally are (e.g.,
'width' being evaluated against the size of the viewport,
'device-width' against the device size), or are they evaluated
against the size of the video element?

I could certainly imagine the group being less concerned about
device pixels being used as a unit in media queries if the media
query were a (media-width) query that queried against the size of
the HTML media element and were specific to media selection, rather
than a (width) query that queries against the size of the viewport?
Or is there an infinite loop there in that the size of the media
element might be determined by the resource selection?

Then again, I probably wouldn't be against just having a separate
unit for device pixels (or, for that matter, for true lengths),
although I'm not sure I like 'dpx' as the name (looks too much like
'dpi').

(The idea of a separate media query for the size of the video is
appealing to me, at least, since it avoids the potential authoring
problem of authors querying on the size of the viewport when they
should actually be querying against a smaller area.  This whole
thing is somewhat related to the thread on "element queries" that I
believe occurred earlier, but less complex.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 14 November 2014 17:13:53 UTC