Add option to not re-use transceiver in e2ee. (#4356)

This commit is contained in:
Raja Subramanian
2026-03-11 17:41:13 +05:30
committed by GitHub
parent 95225ff2e1
commit 0d34e45572
4 changed files with 20 additions and 10 deletions
+3 -2
View File
@@ -226,6 +226,7 @@ type ParticipantParams struct {
EnableRTPStreamRestartDetection bool
ForceBackupCodecPolicySimulcast bool
RequireMediaSectionWithJoinResponse bool
DisableTransceiverReuseForE2EE bool
}
type ParticipantImpl struct {
@@ -3752,12 +3753,12 @@ func (p *ParticipantImpl) SupportsSyncStreamID() bool {
return p.ProtocolVersion().SupportsSyncStreamID() && !p.params.ClientInfo.isFirefox() && p.params.SyncStreams
}
func (p *ParticipantImpl) SupportsTransceiverReuse() bool {
func (p *ParticipantImpl) SupportsTransceiverReuse(mt types.MediaTrack) bool {
if p.params.UseOneShotSignallingMode {
return p.ProtocolVersion().SupportsTransceiverReuse()
}
return p.ProtocolVersion().SupportsTransceiverReuse() && !p.SupportsSyncStreamID()
return p.ProtocolVersion().SupportsTransceiverReuse() && !p.SupportsSyncStreamID() && (!mt.IsEncrypted() || !p.params.DisableTransceiverReuseForE2EE)
}
func (p *ParticipantImpl) SendDataMessage(kind livekit.DataPacket_Kind, data []byte, sender livekit.ParticipantID, seq uint32) error {