Repository navigation
Enable WARP (SPED + SNAP), gated by the server - #1138
Merged
Merged
Conversation
Always on, no runtime switch: SPED (DTLS in STUN) via the WebRTC-IceHandshakeDtls field trial passed to configureFieldTrials before the factory is built, SNAP (SCTP INIT in SDP) via enableSctpSnap on the default configuration. Neither engages unless the server negotiates it. Supersedes #1128 and #1094. Co-Authored-By: cloudwebrtc <duanweiwei1982@gmail.com> Co-Authored-By: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pblazej
requested review from
hiroshihorie and
xianshijing-lk
as code owners
September 24, 2026 15:32
Contributor
Author
|
Stability fixes should come after #1131 |
hiroshihorie
approved these changes
Sep 24, 2026
xianshijing-lk
approved these changes
Sep 25, 2026
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables WARP (draft-uberti-tsvwg-warp). This is the best of #1128 (@cloudwebrtc) and #1094 (@hiroshihorie) merged into one PR, and it supersedes both.
WebRTC-IceHandshakeDtlsfield trial, passed toLKRTCPeerConnectionFactory.configureFieldTrialsright before the factory is built. This avoids the deprecatedLKRTCInitFieldTrialDictionary.enableSctpSnap = trueinLKRTCConfiguration.liveKitDefault(). Every configuration, including thesetConfigurationcalls on quick reconnect and early-publisher adoption, is built from it. So this immutable field never changes after the peer connection exists, which was theINVALID_MODIFICATIONtrap in Add WARP support (DTLS handshake carried in the ICE exchange) #1128.WARP is always on, with no public API and no runtime switch, the same as rust-sdks#1342. The server decides whether WARP engages. A server without WARP ignores the offer and the connection falls back to the standard handshake.
SPED was turned off in #1015 on suspicion of #929. That crash turned out to be the ADM
fine_audio_buffer_null dereference, fixed in #1041.Testing
WARPTestschecks that the offer carries bothgoog-sped-v1anda=sctp-init:. Removing either leg makes it fail (verified).End to end, against local
livekit-server1.13.7 (the latest release; it ships thelivekit/ice v4.4.0-warp.2/dtls v3.1.5-warp.1/webrtc-pion v4.2.18-warp.1forks). The test connects two rooms and sends one reliable packet:rtc.enable_warp: trueDTLS-STUN piggyback complete with success=1, the SFU logsDone with the SPED handshakea=sctp-initin all four SDPs (client offer, SFU answer, SFU offer, client answer)To reproduce, add this to the server config:
rtc: { enable_warp: true }andlogging: { pion_level: debug }.Server-side fixes
WARP needs a server with livekit/livekit#4916 (on
master, not yet in a release). Againstlivekit-server1.13.7, SPED causes two problems. Neither is a client bug, and both are fixed in LiveKit's pion forks:Measured locally on loopback with this PR's client. For the data rows, a fresh pair of rooms is used per iteration, with n=10 for first messages and n=5 for bursts.
master(#4916)The connect-time rows are
BM-CONN: dual PC, n=25, p50 / p90.master, WARP onCI's dev server doesn't enable WARP, so CI doesn't exercise either path.