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

Suggest User Agents treat a captured tab as visible #307

Open
jan-ivar opened this issue Oct 30, 2024 · 3 comments
Open

Suggest User Agents treat a captured tab as visible #307

jan-ivar opened this issue Oct 30, 2024 · 3 comments

Comments

@jan-ivar
Copy link
Member

From @youennf in w3c/mediacapture-surface-control#42:

I had a quick try and AIUI, Chrome is making sure that a tab thinks it is visible (which is sort of true) when captured.
This would also be consistent with unsuspending/ not-throttling the captured tab.
And this also helps ensuring that the surface control API is not leaking that a tab is being captured.

This might be good input for the screen share main spec.

Chrome's behavior here seems desirable, so we might want to capture it in the spec, as either mandate or best practice.

@jan-ivar
Copy link
Member Author

jan-ivar commented Oct 30, 2024

@youennf did you check if the captured tab's visibility was tied to the capturing tab's visibility?

To determine whether it should be normative or not might depend on whether this would be considered JS observable or not, which seems debatable.

While thinking through a WPT test for this — instrument self-capture and then window.open() another tab and to see if focus still is lost — is when it occurred to me it would make sense for the visibility to be inherited, which would make the WPT not work. So maybe this is not observable, and we should just describe it as best practice?

@jan-ivar
Copy link
Member Author

As to whether this should include broader guidance against leaking that a tab is being captured, discuss.

@youennf
Copy link
Collaborator

youennf commented Oct 30, 2024

@youennf did you check if the captured tab's visibility was tied to the capturing tab's visibility?

I didn't, given it can be sent to remote peers, my guess it that it does not depend on the capturing tab's visibility.
It would be nice to get input from Chrome's implementors.

To determine whether it should be normative or not might depend on whether this would be considered JS observable

This is JS observable via document.visibilitystate and its related change event.

broader guidance against leaking that a tab is being captured, discuss.

If there is no guidance, I think it is worth adding a section describing the potential issues.

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

No branches or pull requests

2 participants