Legacy TrackInfo.Simulcast flag. (#4493)

* Legacy TrackInfo.Simulcast flag.

When AddTrack did not send SimulcastCodecs, the legacy `Simulcast` flag
was not set. Fix it by setting the flag when a second layer is
published.

* staticcheck

* use the existing PrimaryReceiver function
This commit is contained in:
Raja Subramanian
2026-04-29 22:43:33 +05:30
committed by GitHub
parent af1dcc8843
commit a002337db1
4 changed files with 41 additions and 5 deletions
+14
View File
@@ -200,6 +200,20 @@ func (w *WebRTCReceiver) AddUpTrack(track TrackRemote, buff *buffer.Buffer) erro
return nil
}
func (w *WebRTCReceiver) NumUpTracks() int {
numUpTracks := 0
w.upTracksMu.Lock()
for _, track := range w.upTracks {
if track != nil {
numUpTracks++
}
}
w.upTracksMu.Unlock()
return numUpTracks
}
func (w *WebRTCReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) {
w.ReceiverBase.UpdateTrackInfo(ti)
w.connectionStats.UpdateMute(ti.GetMuted())