From 3a7f2628b0ea42da7a2292de14e5bb6d1552624c Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Thu, 23 Apr 2026 19:04:10 +0530 Subject: [PATCH] Turn off transceiver re-use on Safari. (#4474) There are issues with insertable streams + Safari which causes tracks to go missing mid-stream sometimes. --- pkg/rtc/clientinfo.go | 4 ++++ pkg/rtc/participant.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/rtc/clientinfo.go b/pkg/rtc/clientinfo.go index 5f2f75178..4ced077b3 100644 --- a/pkg/rtc/clientinfo.go +++ b/pkg/rtc/clientinfo.go @@ -114,6 +114,10 @@ func (c ClientInfo) SupportsSctpZeroChecksum() bool { (!c.isGo() || c.compareVersion("2.4.0") >= 0) } +func (c ClientInfo) SupportsTransceiverReuse() bool { + return !c.isSafari() +} + // compareVersion compares a semver against the current client SDK version // returning 1 if current version is greater than version // 0 if they are the same, and -1 if it's an earlier version diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 5daed00a2..b8e65cf84 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -3756,6 +3756,10 @@ func (p *ParticipantImpl) SupportsSyncStreamID() bool { } func (p *ParticipantImpl) SupportsTransceiverReuse(mt types.MediaTrack) bool { + if !p.params.ClientInfo.SupportsTransceiverReuse() { + return false + } + if p.params.UseOneShotSignallingMode { return p.ProtocolVersion().SupportsTransceiverReuse() }