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
+2 -1
View File
@@ -2290,6 +2290,7 @@ func (p *ParticipantImpl) onMediaTrack(rtcTrack *webrtc.TrackRemote, rtpReceiver
)
if !isNewTrack && !publishedTrack.HasPendingCodec() && p.IsReady() {
p.dirty.Store(true)
p.listener().OnTrackUpdated(p, publishedTrack)
}
}
@@ -2865,7 +2866,7 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
if len(req.SimulcastCodecs) == 0 {
// clients not supporting simulcast codecs, synthesise a codec
videoLayerMode := livekit.VideoLayer_MODE_UNUSED
videoLayerMode := livekit.VideoLayer_ONE_SPATIAL_LAYER_PER_STREAM
if p.params.ClientInfo.isOBS() {
videoLayerMode = livekit.VideoLayer_ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR
}