[mediacapture-screen-share] Source pixel ratio of the video track

mhofman has just created a new issue for https://github.com/w3c/mediacapture-screen-share:

== Source pixel ratio of the video track ==
This is a follow-up to #35.

Applications that request a non-resized stream (`resizeMode = none`) on high DPI sources will receive a video stream of physical pixels. However such applications would likely need to know what the pixel ratio of the content is when processing it.

For example if the application wants to render the screen capture in a non-zoomed "100% mode" while keeping the highest fidelity on a variety of screens, it would request the capture with resizeMode none but would need to also know the content's logical dimensions to avoid visual scaling when rendering.

The problem I see is how to expose this information. The stream's width and height can be retrieved from the track settings, but there is no settings for "contentPixelRatio", and it probably wouldn't make sense as it's not directly a constrainable property.

To note, the pixel ratio can change during the life of the stream when the user drags the source from one monitor to another.
There doesn't seem to be any event when settings of the track change (especially since such intrinsic changes never trigger over an overconstrained event). In the case of the resizeMode none, the dimensions of the video track would also change, but again, that change isn't directly observable on the stream track object.

Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/89 using your GitHub account

Received on Thursday, 8 November 2018 01:10:59 UTC