Intent to Experiment: Conditional Focus

268 views
Skip to first unread message

Elad Alon

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

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 AM9/23/21
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 AM9/23/21
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 AM9/23/21
to Elad Alon, blink-dev
What's the end milestone you're targeting? 

Elad Alon

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

Yoav Weiss

unread,
Sep 23, 2021, 10:16:42 AM9/23/21
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>

Elad Alon

unread,
Jan 20, 2022, 6:04:58 AM1/20/22
to blink-dev, yoav...@chromium.org, blink-dev, Elad Alon
The partner I had for this feature had a change of scheduling, and will only be set to deploy their test use of it in about a month. I would therefore like to reset this experiment, stopping it for 3 weeks and then starting it afresh in m99-m102 (inclusive). Wdys?
Relevant: Discussions about standardizing this feature are proceeding and there seems to be interest from Mozilla and Apple. See here.

Mike West

unread,
Jan 26, 2022, 12:00:51 PM1/26/22
to blink-dev, Elad Alon, Yoav Weiss, blink-dev
Hey Elad!

Did anyone at all use this feature via the OT? If so, it would be helpful to understand whether you had any feedback that would inform this new experiment.

If no one used it at all, then this really would be a no-op, and I think we'd happily approve shifting the milestones.

-mike

Elad Alon

unread,
Jan 31, 2022, 5:22:32 AM1/31/22
to blink-dev, mk...@chromium.org, Elad Alon, yoav...@chromium.org, blink-dev
My partners for this feature have not yet been able to take advantage of it, due to scheduling constraints on their end, and so could not yet file feedback.
I don't see feedback from anyone else.

Daniel Bratell

unread,
Jan 31, 2022, 6:21:48 AM1/31/22
to Elad Alon, blink-dev, mk...@chromium.org, yoav...@chromium.org

LGTM to shift to M99-M102. Hope you can get some good feedback.

/Daniel

--
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.

Elad Alon

unread,
Jun 8, 2022, 3:58:21 AM6/8/22
to blink-dev, Daniel Bratell, mk...@chromium.org, yoav...@chromium.org, Elad Alon
Hello all,

Due to the scheduling constraints of my partners, this origin trial was not used in m99-m101. But my partners ready to use it now in m102, and are eager to start teamfood and dogood right away. However, m102 only has two more weeks to go, so that would be a very short trial. I am therefore asking that the experiment period be shifted from m99-m102 (inclusive), to m102-m105 (inclusive).

The use-counters on the feature show that it's only been used a mere 75 times in the last 28 days (data from 2022-06-05). I am therefore asking that shifting the experiment's time window will happen without a breaking period.

Thanks,
Elad

Yoav Weiss

unread,
Jun 8, 2022, 4:13:23 AM6/8/22
to Elad Alon, blink-dev, Daniel Bratell, mk...@chromium.org
Seems fine to shift the experimental period. No further LGTMs needed.

On Wed, Jun 8, 2022 at 9:58 AM Elad Alon <elad...@google.com> wrote:
Hello all,

Due to the scheduling constraints of my partners, this origin trial was not used in m99-m101. But my partners ready to use it now in m102, and are eager to start teamfood and dogood right away. However, m102 only has two more weeks to go, so that would be a very short trial. I am therefore asking that the experiment period be shifted from m99-m102 (inclusive), to m102-m105 (inclusive).

The use-counters on the feature show that it's only been used a mere 75 times in the last 28 days 

Unfortunate (but understandable) that this is a Google-only link.
Reply all
Reply to author
Forward
0 new messages