Skip to content
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

preferCurrentTab #538

Open
eladalon1983 opened this issue Jun 9, 2021 · 8 comments
Open

preferCurrentTab #538

eladalon1983 opened this issue Jun 9, 2021 · 8 comments

Comments

@eladalon1983
Copy link

Request for Mozilla Position on an Emerging Web Specification

Other information

We've previously discussed this as getCurrentBrowsingContextMedia. Chrome has conducted an Origin Trial of the API using this shape (a method). We're intending to ship this as a dictionary member called preferCurrentTab.

@annevk
Copy link
Contributor

annevk commented Jun 21, 2021

What happens if the document in the tab is navigated?

It's not entirely clear to me we should expose "tab" as a term as it doesn't really work across all devices.

@annevk
Copy link
Contributor

annevk commented Jun 21, 2021

cc @jan-ivar

@eladalon1983
Copy link
Author

If you navigate the capturing document/frame or one of its parents, capturing stops, as it would with getDisplayMedia.
If you navigate an unrelated child frame, capturing proceeds uninterrupted, as it would with getDisplayMedia.

It's not entirely clear to me we should expose "tab" as a term as it doesn't really work across all devices.

I am open for suggestions. If there's a succinct term for tab-or-closest-equivalent-on-mobile I'd love to use it; if there isn't, maybe it would be good to mint such a term. (IMHO preferCurrentBrowserDisplaySurface would be as unpopular a name as getCurrentBrowsingContextMedia. I'd rather keep it short)

@annevk
Copy link
Contributor

annevk commented Jun 21, 2021

To me that sounds like (top-level) viewport capture, not tab capture.

@eladalon1983
Copy link
Author

eladalon1983 commented Jun 21, 2021

In Chrome, the user-facing UX distinguishes three types of surfaces - screen, window and tab.
This new dictionary member aims to say - of the category of of surfaces which Chrome refers to as "tabs," the app prefers the current one.
If there is a name that's more appropriate, I am happy to discuss and potentially adopt it.

Independently of naming, Mozilla's position about this API in its previous incarnations has been negative (@jan-ivar has more context). I would be happy if it has changed, but I have no reason to suspect so. This is a formal request for the formal position.

@jan-ivar
Copy link
Member

We're intending to ship this as a dictionary member called preferCurrentTab.

Is there an "Intent to Ship"? This does not appear to be a standards-track document.

I doubt Mozilla would implement this since it directly defeats and contradicts the security requirements of getDisplayMedia: "The user agent MUST let the end-user choose which display surface to share out of all available choices every time, and MUST NOT use constraints to limit that choice. ... This prevents an application from influencing the selection of sources"

Safer alternatives have been proposed, such as w3c/mediacapture-screen-share-extensions#9 which appears to have some support.

@eladalon1983
Copy link
Author

eladalon1983 commented Jun 22, 2021 via email

@jan-ivar
Copy link
Member

Sure, I would consider this harmful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Unscreened
Development

No branches or pull requests

3 participants