Intent to Prototype: Conditional Focus

104 views
Skip to first unread message

Elad Alon

unread,
Sep 22, 2021, 7:42:15 AM9/22/21
to blink-dev

Contact emails

elad...@chromium.org

Explainer

https://github.com/eladalon1983/conditional-focus/blob/main/README.md

Specification

https://eladalon1983.github.io/conditional-focus/

Summary

Extend the getDisplayMedia APIs to ensure that tab-capture and window-capture return a new subclass of MediaStreamTrack called FocusableMediaStreamTrack. This new subclass exposes the focus() method. This new method allows Web-applications, when capture starts, to decide whether the captured tab/window should be immediately focused, or whether the capturing tab+window should remain the focused one.


Blink component

Blink

Motivation

Consider a video-conferencing Web-application capturing another tab/window. When the capture is initiated, the active tab and window are those in which the VC application is running. Should the browser activate the captured tab/window instead? It depends. Let’s examine the hypothetical example of a video-conferencing application called VC3000. * If the captured source is an interactive page like a text editor, VC3000 believes it best to switch focus immediately, allowing the user to control it directly. * If the captured application is a remote-controllable application (using Capture Handle to establish the connection), then VC3000 believes it best to retain focus, because it can expose user-controls in itself and allow the user to interact with the captured tab without ever leaving VC3000. For example, if capturing a presentation, VC3000 might expose previous/next-slide controls. The application wants to control whether focus moves to the captured application when the capture starts. The user also benefits from this decision’s delegation, so long as it can be done safely.


Initial public proposal

https://github.com/w3c/mediacapture-screen-share/issues/190

TAG review

TBD

TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals


Debuggability

N/A

Is this feature fully tested by web-platform-tests?

No

Flag name

ConditionalFocus

Requires code in //chrome?

True

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1215480

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1214483

Estimated milestones

m96



Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5646614535340032
Reply all
Reply to author
Forward
0 new messages