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

What should the default be for the "webrtc" directive in workers? #538

Open
alvestrand opened this issue Feb 15, 2022 · 1 comment
Open

Comments

@alvestrand
Copy link

As specified in #457, the default for "webrtc" is "on", due to Web compatibility.

At the moment, RTCPeerConnection is only available in [Window] context; w3c/webrtc-pc#230 explores the issue of exposing it in a [Worker] context.

An issue has been raised (w3c/webrtc-pc#230 (comment)) that raises the concern about whether the default for "webrtc" should be "off" for workers.

At the moment I can't see:

  • How a context that creates a worker sets its CSP permissions (without cooperation from the site the worker is loaded from)
  • How we can specify in the spec language that if the context is a worker, the default should be "off"

I think the last is relatively easy, but I'm missing some context in figuring out the first.

@antosart
Copy link
Member

I would prefer consistency here, and have the same behaviour for worker and for window.

Also notice that CSP is not a mechanism for allowing anything. It would be the first time you use CSP for allowing things, so again for consistency I would avoid that. Maybe something like feature policy would be better suited for such a use case?

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