feat: Add trickle ICE support (client -> server)#121
Open
Object905 wants to merge 2 commits into
Open
Conversation
Lets a WebRTC caller send its offer immediately, without waiting for full ICE gathering, and stream candidates in via the new addIceCandidate command as they're found. Server-side answer behavior is unchanged (still waits for full gathering before answering). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
Don't know for sure - but this requires buffering candidates on "frontend" before offer/answer and then flushing. Not a great UX. |
Contributor
Author
|
Added buffering. Ready for review. Not sure that this is correct "trickle" due to this commit: restsend/rustrtc@8af2420 is trickling supported in rustrtc? Is api the same |
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.
Summary
AddIceCandidateWebSocket command, letting a WebRTC caller send its offer immediately (without waiting for full ICE gathering) and stream candidates in as they're found.Track::add_ice_candidatetrait method (default no-op), implemented onRtcTrackviarustrtc's existingPeerConnection::add_ice_candidate.Why
WebRTC callers behind NAT/restrictive networks can have slow ICE gathering, which currently blocks sending the offer at all. This lets the offer go out immediately and trickle candidates in afterward, cutting call-setup latency without touching server-side answer timing.