Intent to Experiment: Conditional Focus

106 views
Skip to first unread message

Elad Alon

unread,
Sep 22, 2021, 8:16:59 AMSep 22
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/

Design docs


https://docs.google.com/document/d/1LHJRt-ry9hwzFTbPxKrmD0VvtEFEU6lvqsD7k6wwGKM/

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

TAG review

https://github.com/w3ctag/design-reviews/issues/679

TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

Ergonomics

N/A



Activation

Not challenging - just feature-detect: // Pre-existing functionality: let mediaStream = await navigator.mediaDevices.getDisplayMedia(); let [track] = mediaStream.getVideoTracks(); // New functionality behind feature-detection: if (!!track.focus) { track.focus(...); }



Security

See design-doc.



Goals for experimentation



Reason this experiment is being extended



Ongoing technical constraints



Debuggability

N/A



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

Supported on all Desktop platforms.



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

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/lbuqOGx07xY


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Sep 23, 2021, 8:31:04 AMSep 23
to Elad Alon, blink-dev
Might be good to move this to WICG to facilitate contributions (given support).
 


Design docs


https://docs.google.com/document/d/1LHJRt-ry9hwzFTbPxKrmD0VvtEFEU6lvqsD7k6wwGKM/

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

TAG review

https://github.com/w3ctag/design-reviews/issues/679

TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

https://github.com/WICG/proposals/issues/37#issuecomment-920673070 seems like a positive signal (even if from a single partner).
 

Ergonomics

N/A



Activation

Not challenging - just feature-detect: // Pre-existing functionality: let mediaStream = await navigator.mediaDevices.getDisplayMedia(); let [track] = mediaStream.getVideoTracks(); // New functionality behind feature-detection: if (!!track.focus) { track.focus(...); }



Security

See design-doc.



Goals for experimentation


What are the goals for the experiment?
 



Reason this experiment is being extended



Ongoing technical constraints



Debuggability

N/A



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

Supported on all Desktop platforms.



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


 
What are the timeframes for the experimentation? Do you have partners lined up?
 

Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5646614535340032

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/lbuqOGx07xY


This intent message was generated by Chrome Platform Status.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMO6jDNKs_83QYuU9NreUPqimVodVSMuigofhOdy32jVf0nLiA%40mail.gmail.com.

Elad Alon

unread,
Sep 23, 2021, 9:00:47 AMSep 23
to blink-dev, yoav...@chromium.org, blink-dev, Elad Alon
Might be good to move this to WICG to facilitate contributions (given support).

WICG issue #37 asked for this to be adopted by the WICG. (The same partner supported it there too, btw.)
 
https://github.com/WICG/proposals/issues/37#issuecomment-920673070 seems like a positive signal (even if from a single partner).

Yes. And Mozilla and Apple also seemed interested in the use-case during the WebRTC Working Group interim meeting of September 2021, although we're still discussing the specific details.
 
What are the goals for the experiment?

Validate that the proposed API solves developers' issues in a satisfactory manner.
 
What are the timeframes for the experimentation? Do you have partners lined up?

Two internal (Google), one external (Tella).

Yoav Weiss

unread,
Sep 23, 2021, 9:53:14 AMSep 23
to Elad Alon, blink-dev
What's the end milestone you're targeting? 

Elad Alon

unread,
Sep 23, 2021, 10:04:25 AMSep 23
to Yoav Weiss, blink-dev
m99, inclusive. So four milestones in total.

Yoav Weiss

unread,
Sep 23, 2021, 10:16:42 AMSep 23
to Elad Alon, blink-dev
LGTM to experiment M96-M99 inclusive

On Thu, Sep 23, 2021 at 4:04 PM Elad Alon <elad...@google.com> wrote:
m99, inclusive. So four milestones in total.

On Thu, Sep 23, 2021 at 3:53 PM Yoav Weiss <yoav...@chromium.org> wrote:


On Thu, Sep 23, 2021 at 3:00 PM Elad Alon <elad...@google.com> wrote:
Might be good to move this to WICG to facilitate contributions (given support).

WICG issue #37 asked for this to be adopted by the WICG. (The same partner supported it there too, btw.)

<WICG-hat> Ping me and we'll move it over! :) </WICG-hat>
Reply all
Reply to author
Forward
0 new messages