-
Notifications
You must be signed in to change notification settings - Fork 67
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
RFC 169: WebRTC Echo server #169
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# RFC 169: WebRTC Test Server | ||
|
||
|
||
## Summary | ||
|
||
Add a [WebRTC](https://datatracker.ietf.org/doc/html/rfc8834) server to wpt. The server is used to test the [WebRTC Web APIs](https://w3c.github.io/webrtc/). The server requires Python 3. | ||
|
||
The server uses a WebSocket connection to negotiate the WebRTC connection. | ||
It terminates STUN, DTLS and SRTP and forwards unencrypted RTP or RTCP packets to the browser. | ||
This allows the tests to receive and inspect any packets received. | ||
|
||
Future versions may use WebTransport instead of WebSockets for signaling and transport of packets to the client and allow the client to send packets over the WebSocket to be forwarded | ||
via WebRTC. | ||
|
||
## Details | ||
|
||
### Implementation | ||
|
||
The WebRTC test server is built on top of `aiortc`, similar to how the WebTransport/H3 test server is based on `aioquic`. | ||
|
||
The server will be implemented under `tools/webrtc` directory. | ||
|
||
### `wptserve` integration | ||
|
||
When the WebRTC test server runs as a part of `wptserve`, `$ROOT` will be the same as `$WPT_ROOT`. | ||
|
||
`wptserve` runs the WebRTC test server in a way similar to [pywebsocket](https://github.com/web-platform-tests/wpt/blob/246a32576020cb9c4241b7cfbc296f92d944ff6b/tools/serve/serve.py#L713): | ||
`wptserve` launches the server as a daemon and passes relevant configurations (port number, root directory etc) to the server. The daemon is monitored by `wptserve` like other daemons. | ||
|
||
### Dependencies | ||
|
||
As of writing this RFC, the only dependency is `aiortc`. | ||
|
||
## Risks | ||
|
||
Risks are similar to [RFC #42](https://github.com/web-platform-tests/rfcs/blob/master/rfcs/quic.md#risks). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this involve new binary dependencies? I assume it does, but it would help to be specific here since those require special handling, especially in vedor repos where we can't depend on pypi. They also add some maintenance risk (as we've seen with aioquic not updating its releases for newer Python versions) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Python bindings for libsrtp and google-crc32c should be the only new dependencies I think. @jlaine might know more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/aiortc/aiortc/blob/0ecc5379762883fbf6454d4633b948c2ad50dec8/pyproject.toml#L28-L38 shows quite a lot of (direct) Python dependencies:
I think (There's a few other notable new dependencies: Are we actually planning on doing any testing that actually requires media codecs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes. The initial proposals (passing the RTP packets back to the test for analysis) would not need media codecs on the server, but once we have experience with those, running media codecs on the server is a definite option. The argument for doing these tests in wpt is that we would get wpt's infrastructure for tracking and sharing tests with a relatively small investment in engineering on the webrtc support side (by using aiortc). If we start asking to reengineer aiortc in order to integrate it, the value of this approach starts dropping. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now forking to remove "av" as a dependency is possible: https://github.com/aiortc/aiortc/compare/main...fippo:aiortc:no-av?expand=1 Just running this in Chromium's CI would be ok as the tests will be testing low-level libWebRTC behavior which is going to be largely identical in consuming browsers like Safari. |
||
|
||
The WebRTC test server itself is standalone and the maintenance cost of the code will be low from the `wptserve`'s perspective. | ||
The WebRTC team at Google and Microsoft will be responsible for maintaining the integration point and the server. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alvestrand can you confirm Google's WebRTC can commit to maintain this together with Microsoft? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. We plan to submit and maintain WPT tests that use this facility. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming! |
||
|
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.
Nice!