Re: [mediacapture-screen-share] A CaptureController object for getDisplayMedia() (#230)

Let's see if we can nail down the controller pattern first. Folks who have spoken up seem in agreement that:
- Any controller is associated 1 ←→ 1 synchronously in getDisplayMedia, and cannot be re-associated
- Without a controller, any focusing is [implementation defined](https://infra.spec.whatwg.org/#implementation-defined) with a note to recommend web compat behavior (focus)
- Controller is dead if getDisplayMedia rejects or once capture dies (e.g. UA halts or all tracks have been stopped)

Great! Maybe we can nail down this one next, since it seems unrelated to timing:
- Presence of the controller suppresses the automatic bring-to-front with focus that happens today.

This removes [implementation defined](https://infra.spec.whatwg.org/#implementation-defined) layer-violating behavior which is bad for tests, web developers, users, and [screen recording](https://github.com/w3c/mediacapture-screen-share/issues/190#issuecomment-914086949):

> > > It might make sense to allow UA to override the page asking not to focus.
> >
> > I think this would defeat use cases such as screen recording.  ...
>
> For screen recording applications, isn't it the case that they will always want one or the other, irrespective of the selected surface, something like: ... Do not focus at getDisplayMediaTime."

Yes, and allowing user agents to override a page not wanting focus would defeat that, wouldn't it?

I think a user agent override here would require a strong end-user benefiting reason. Regarding "mis-selection":

> > I also agree that previews are the solution to mis-selection.
>
> This is not sufficient. ...

I should have said: I don't think focus is the solution to mis-selection. It's the solution to VC presentation, and comes with its own risks like clickjacking. Mitigating one risk with another seems like an unnecessary bargain and a poor strategy.

Do we agree that supporting screen recording by letting users pick a displaySurface that isn't brought to front, is a requirement? If we don't have our requirements down, it's probably premature to discuss API.

I do agree with the [assessment](https://github.com/w3c/mediacapture-screen-share/issues/230#issuecomment-1233847327) that "not focusing increases the risk of mis-selection" and that UA's should "limit this risk", but I think user agents need to solve this without focus in https://github.com/w3c/mediacapture-screen-share/issues/211.


-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/230#issuecomment-1235786690 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 2 September 2022 18:19:04 UTC