Open Bug 1740020 Opened 3 years ago Updated 3 years ago

We need a window-sharing test with pixel testing

Categories

(Core :: WebRTC: Audio/Video, task, P3)

task

Tracking

()

People

(Reporter: bwc, Unassigned)

Details

We need a test-case that would have detected bug 1738946. We will need to find some way to select the appropriate window for the test. We might be able to spawn a window with sufficiently "weird" dimensions to make it selectable with constraints, but I am not sure if that will work. Selecting by window id (by setting this) does not appear to work; that constraint is ignored.

By design, the web-facing getDisplayMedia "MUST NOT use constraints to limit ... choice". There's always a prompt, so instead, width/height constraints are applied to what the user picks, to downscale it.

This means that, unlike for camera, there's no code for selecting display surfaces using constraints on properties like width/height.

The exceptions:

  1. With media.navigator.permission.disabled, getDisplayMedia returns the entire desktop without prompt. Used extensively in tests.
  2. With media.getusermedia.browser.enabled (tab capture) we added a non-standard browserWindow constraint for Firefox Hello to pass in a gecko window id. But it only works for tab capture.

If it's useful for testing purposes, we might be able to extend the latter browserWindow constraint to let you pick Firefox windows, assuming your tests can produce the necessary gecko window id from them.

You need to log in before you can comment on or make changes to this bug.