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.
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 proposalhttps://github.com/w3c/mediacapture-screen-share/issues/190
TAG review statusPending
Interoperability and CompatibilityGecko
: No signalWebKit
: No signalWeb developers
: No signals
Requires code in //chrome?True
Link to entry on the Chrome Platform Statushttps://www.chromestatus.com/feature/5646614535340032