Files
livekit/pkg/rtc
Raja SubramanianandClaude Opus 5.5 c19ae42e2c Let clients set a preferred ICE candidate protocol on join (#5267)
* Let clients set a preferred ICE candidate protocol on join

The v1 JoinRequest ConnectionSettings.candidate_protocol and the v0
candidate_protocol query parameter let a client ask for TCP or TLS
from the start. The SFU applies the stronger of the client preference
and the learned room fallback, and keeps the join preference on resume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Require the candidate protocol on every connect, check ICE/TCP

Resume uses the preference from the resume request, the same as join,
so the participant no longer stores the join value. TCP mode drops UDP
candidates, so a TCP preference applies only when ICE/TCP is enabled,
and TLS without TURN/TLS falls back to TCP only under the same check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the client preference apart from the learned fallback

The room cache now holds only fallbacks the transport learned after a
failure. The participant stores the client preference from join, and
resume applies the stronger of it and the resume request before the
resume response, so the response carries the matching ForceRelay.
TLS mode lists only TLS relays, also from external TURN servers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let a resume preference replace the join preference

A resume that sends TCP or TLS uses that value, and only a resume
without a value inherits the preference from join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ignore an unsupported preference on resume

A resume preference for a transport the server does not offer no
longer replaces the join preference. Each preference is lowered to a
supported transport before the resume picks between them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:16:42 +05:30
..
2025-08-28 05:20:25 -07:00