From 526985f1090289e299cb0eddc537eb66da286db7 Mon Sep 17 00:00:00 2001 From: cnderrauber Date: Sat, 26 Oct 2024 22:29:04 +0800 Subject: [PATCH] don't return video/rtx to client (#3142) --- pkg/rtc/participant.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index fcdcf68b3..04ba5eef0 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -2807,7 +2807,14 @@ func (p *ParticipantImpl) setupEnabledCodecs(publishEnabledCodecs []*livekit.Cod } func (p *ParticipantImpl) GetEnabledPublishCodecs() []*livekit.Codec { - return p.enabledPublishCodecs + codecs := make([]*livekit.Codec, 0, len(p.enabledPublishCodecs)) + for _, c := range p.enabledPublishCodecs { + if c.Mime == "video/rtx" { + continue + } + codecs = append(codecs, c) + } + return codecs } func (p *ParticipantImpl) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) error {