Simulcast audio fixes (#3925)

* Simulcast audio fixes

* clean up
This commit is contained in:
Raja Subramanian
2025-09-14 09:41:40 +05:30
committed by GitHub
parent 9f0ab8706f
commit 6489237e33
11 changed files with 70 additions and 57 deletions
+3 -2
View File
@@ -303,10 +303,11 @@ func (p *ParticipantImpl) setCodecPreferencesOpusRedForPublisher(
continue
}
// if RED is disabled for this track, don't prefer RED codec in offer
preferRED := IsRedEnabled(ti)
// if RED is enabled for this track, prefer RED codec in offer
for _, codec := range codecs {
// codec contain opus/red
if !ti.DisableRed &&
if preferRED &&
mime.IsMimeTypeCodecStringRED(codec.Name) &&
strings.Contains(codec.Fmtp, strconv.FormatInt(int64(opusPayload), 10)) {
configureReceiverCodecs(transceiver, "audio/red", true)