-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define CaptureController.setFocusBehavior() #240
Conversation
Still some work here, but early feedback welcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments below.
In general, it seems the spec assumes that the UA is focused at the time of resolution, which might not be the case if the captured window is already focused due to the window selection process.
Also, where is the code stating that if controller is not null, automatic focusing rule is prevented?
index.html
Outdated
</li> | ||
<li> | ||
<p> | ||
If {{CaptureController/[[initialFocusLost]]}} is <code>true</code>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this step, we might want to run steps in parallel, given this might actually happen in another process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure I understand you correctly, could you clarify the proposed change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friendly ping @youennf for this question.
There is a line that should handle this: "If [[initialFocusLost]] is true, abort these steps."
The TPAC meeting concluded with this result: "We'll not specify the default behavior (focus/no-focus) for either case (controller/no-controller)." (That comment was published before the minutes came out, but I first checked with Dom that the summary matched the minutes he was going to publish.) |
Co-authored-by: François Beaufort <beaufort.francois@gmail.com>
Co-authored-by: François Beaufort <beaufort.francois@gmail.com>
This makes this whole API useless for these UAs, meaning it will not be implemented.
How about the following:
|
The threads are really getting hard to follow, and the dog ate my homework, in that I have penned a response to one of Jan-Ivar's comments, that I now see was lost - unclear how. Namely, I want to point out that a property involves a getter that is problematic on many accounts, one additional one being that it's unclear what "default" means (recall that the default could be different for tabs/windows, and it's too early to know what the user chose). So before setting, the value is meaningless, and after setting, a getter is not necessary. I propose that we:
I think the size and number of the threads make it too difficult to proceed otherwise. |
Thank you for the concrete proposal. I am happy to adopt a variant of this. However, I am not the only one who will have opinions, and this can take some time (the PR currently adds ~250 lines, and has roughly that many comments). This does not seem to change behavior, only improve the spec, so it should not be a blocker. I can commit to producing the follow-up PR by end-of-day of the day when we merge this PR. |
I think we should demonstrate in this PR that the API is expected to work with more than Chrome current device picker. |
The challenge is in the excessive number of open comment threads in case your editorial vision does not immediately align with Jan-Ivar's. |
So, I've tried to accommodate this one more round of spec-shape comments. Hopefully we can agree that this is enough for v1, or something very close to it.
I've gone with [[FocusChangeDisabled]] because [[Disabled]] would refer to future APIs too, and we don't intend that atm.
That's already in the spec - see section with "When the top-level document loses focus, run the following steps on all {{CaptureController}} objects", noting that it's no-op before calling gDM(controller).
I've added that.
I don't think focusing the capturing surface is desirable. It could interfere with the users own actions, and cannot otherwise help. |
@youennf claims that a 2-line change to the PR will address his concern. @eladalon1983 and @youennf will work to finish today. |
This is ready. Wdys @youennf? |
Co-authored-by: youennf <youennf@users.noreply.github.com>
Co-authored-by: youennf <youennf@users.noreply.github.com>
I see GitHub has had a hiccup when committing the last suggestions, and things somehow got merged without them. I'll fix that later tonight. |
@beaufortfrancois, you've mentioned some commits were dropped, but as far as I can see these are in gh-pages. Please advise. (Note that https://github.com/w3c/mediacapture-screen-share/pull/245/files does not appear to be the PR to have fixed this; Youenn's suggestions appear on the left side, too.) |
Fixes #190.
Preview | Diff