-
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 DisplayMediaStreamConstraints.selfBrowserSurface #216
Conversation
index.html
Outdated
<div class="note"> | ||
<p> | ||
For clarity's sake, "tab" is used rather than "browser display surface". | ||
</p> | ||
</div> |
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.
I don't think we need this note, since this prose is largely explanatory. I think it's fine to use "tab" here as a shorthand, as long as normative prose below doesn't use it and sticks to defined terms only.
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.
That's fine by me. We can remove.
index.html
Outdated
@@ -732,6 +788,7 @@ <h2>DisplayMediaStreamConstraints</h2> | |||
dictionary DisplayMediaStreamConstraints { | |||
(boolean or MediaTrackConstraints) video = true; | |||
(boolean or MediaTrackConstraints) audio = false; | |||
CurrentTabPreferenceEnum currentTabPreference = "none"; |
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.
I could be wrong, but this would be the first time the word "Tab" appears in a web API. I know this was already discussed in the issue, but I can't help thinking we're over-selecting here.
At a conceptual level, the user agent learns whether self-capture (hall of mirrors) is part of the application's use case(s) or not. This seems like valuable information to the user agent, at its most abstract.
It seems less relevant how the user agent ends up acting on this information: whether this applies only to tab-capture or whether it also applies to window capture of the browser window the document is in ... those are really good questions user agents should perhaps be left to figure out, which seems OK to me.
I also don't think it matters if user agents fall short of promises on this today, since this is a hint. E.g. I wouldn't expect browsers to ever exclude full-screen capture over this, but a user agent might take "exclude"
as a clue it's OK to blur away the undesirable hall-of-mirrors effect for instance. This way the user agent doesn't need to worry it's stepping on apps that rely on self-capture. cc @youennf
So I'd suggest an iteration on @martinthomson's wording:
CurrentTabPreferenceEnum currentTabPreference = "none"; | |
CurrentTabPreferenceEnum selfCapture = "no-preference"; |
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.
I'm OK with the s/none/no-preference replacement.
I don't want to accept the s/currentTabPreference/selfCapture suggestion, because this only refers to tabs, and that is intentional - we only got consensus over that in the interim meeting. (Also note how it's CurrentTabPreferenceEnum, btw.)
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.
(with chair-hat off)
I recall us having rough agreement (not consensus which would require a call on the list) on this being a "hint", which seems to leave this more as an indicator describing application preference, than an explicit control surface to enact certain specific behavior.
Yes I'm bikeshedding, and perhaps suggesting a bit of abstraction here that wasn't discussed before, but I don't read the last meeting as a final word on naming, and would love to hear from others. I think the question of whether to introduce the term "Tab" to the web platform seems orthogonal to discussion over behavior.
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.
I recall us having rough agreement (not consensus which would require a call on the list) on this being a "hint", which seems to leave this more as an indicator describing application preference, than an explicit control surface to enact certain specific behavior.
This has not changed. We're discussing what the hint will be called.
I think the question of whether to introduce the term "Tab" to the web platform seems orthogonal to discussion over behavior.
If you're not convinced that "tab" can be a convenient shorthand in this case, we can go with the following alternative, although I consider it inferior to "tab":
SelfCapturePreference selfCaptureBrowser = "no-preference";
enum SelfCapturePreference {
"no-preference",
"include",
"exclude",
};
This way:
- We use the browser that everyone is already forced to know means "tab" in most relevant contexts.
- We have not blocked the way for
selfCaptureWindow
to be introduced later, if the WG happens to be interested later.
--
But please see my note
in the original PR. I think "tab" can be understood well as shorthand for "display surface of type 'browser'". My intention is that this would not formally introduce "tab" into the Web platform, but rather, serve as a localized convenience.
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.
Ping @jan-ivar; PTAL.
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Hi @jan-ivar, could you PTAL? |
I would rename the property to slefBrowserSurface and remove no-preference. |
index.html
Outdated
"exclude" | ||
}; | ||
</pre> | ||
<table data-dfn-for="CurrentTabPreferenceEnum" class="simple"> |
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.
two spaces
What we plan to do:
|
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.
Look good to me with the changes.
I think we should beef up the security section since we are now allowing the web page to fiddle with UA UI.
Fixes #209.
Preview | Diff