W3C home > Mailing lists > Public > public-media-capture@w3.org > December 2015

Re: Screen sharing and device pixel ratio

From: Harald Alvestrand <harald@alvestrand.no>
Date: Tue, 15 Dec 2015 15:50:15 +0100
To: public-media-capture@w3.org
Message-ID: <567028A7.40805@alvestrand.no>
On 12/15/2015 02:07 AM, Mathieu Hofman wrote:
> ________________________________________
> From: Martin Thomson [martin.thomson@gmail.com]
> Sent: Monday, December 14, 2015 12:39 PM
> To: Harald Alvestrand
> Cc: public-media-capture@w3.org
> Subject: Re: Screen sharing and device pixel ratio
> On 14 December 2015 at 20:58, Harald Alvestrand <harald@alvestrand.no> wrote:
>> I see logical pixels as a hack that was introduced in order to avoid
>> having to retrofit applications that made unwise assumptions about the
>> relationship of pixels to screen size; I'd prefer that we not perpetuate
>> the lunacy that they cause.
> Unfortunately, it's not that simple.
> [MH] And unfortunately, that ship has sailed a long time ago. All OSes expose some kind of logical screen size and scaling ratio. The Web Platform accepted this reality and partially exposes that through Window.devicePixelRatio.
That's a scaling factor between an unit of distance (the "CSS pixel")
and a "device pixel". It's used for positioning.
I agree that the lunacy of using distance metric units called "pixels"
is well-established :-)

>  I'm not asking that we extend those concepts to video streams, on the contrary, I agree with Cullen that we should keep video pixels simple squares. However we have to acknowledge the source of the stream might have a different representation, and offer API surface for the app to decide what to do in those cases.
> In an application-sharing case, there are potentially different
> windows with different pixel density.
If they come from multiple screens, yes. Do we have a W3C model of
multiple screens being served from the same browser context yet?

>   Compositing those into a single
> track will result in windows with different sizes.

I like the idea of specifying a scaling factor as part of the process of
starting a screen capture.
I just think we should stop there.
> Also, it's not clear what the scale-down factor needs to be.  An
> application doesn't know the pixel density of a given window.  Again,
> if multiple windows are shared, the size discrepancy could be jarring.
> [MH] And the density might actually change dynamically when a window is dragged between 2 monitors that have different pixel densities.
The size will also change when the captured window is resized, of course.
Received on Tuesday, 15 December 2015 14:50:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 15 December 2015 14:50:59 UTC