Re: [mediacapture-screen-share] Conditional Focus (When Display-Capture Starts) (#190)

@jan-ivar and @youennf, I'd love to carry on from where we stopped at the end of the WebRTC WG Interim meeting yesterday.

@youennf
IIUC, your main concern was around the 1s hard-limit, but I think that you later mentioned this was due to a misunderstanding? Could you PTAL at my [proposed spec](https://eladalon1983.github.io/conditional-focus/index.html) and let me know what you think? Please see this part:
> 3. If focus() was not called on MT, raise an InvalidStateError. Otherwise, proceed.
> 4. If this call to focus() happens more than one second after the start of the capture, the user agent SHOULD have already made its own decision. The user agent SHOULD silently ignore this call focus().

Please note that the intention here is that if focus() is **not** called by the time MT terminates, then the browser **immediately** switches focus - **without** a 1s delay. The 1s delay is a backup in case MT takes an inordinately long time to finish.

@jan-ivar
1. IIUC, your concerns where over subclassing MediaStreamTrack vs. expsosing an API as `navigaotr.mediaDevices.focus`. Could you please elaborate on why you think one is superior to the other?
2. I believe you also suggested scheduling a task to close the focus-window-of-opportunity. My concern here is that tasks are more likely than microtasks to experience long delays, and the hard-limit of 1s would be encountered more often than we'd want. (I think we'd want it as a security restriction that's hardly ever encountered by a non-malicious app.) Could you please elaborate your thoughts on this topic?

Please let me know if I've forgotten any other open issues.

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


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

Received on Tuesday, 21 September 2021 11:25:01 UTC