Use atomic to store codec. (#3505)

* Use atomic to store codec.

It can change on up stream codec change, but not seeing any racy
behaviour with atomic access.

Reverting the previous change to mute with this change.

* no mime arg
This commit is contained in:
Raja Subramanian
2025-03-09 11:51:48 +05:30
committed by GitHub
parent 7f6afe05ad
commit 6c04909f88
2 changed files with 22 additions and 30 deletions
+2 -2
View File
@@ -183,8 +183,6 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
}()
}
}
subTrack.SetPublisherMuted(t.params.MediaTrack.IsMuted())
})
downTrack.OnBinding(func(err error) {
if err != nil {
@@ -205,6 +203,8 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
}
go subTrack.Bound(nil)
subTrack.SetPublisherMuted(t.params.MediaTrack.IsMuted())
})
downTrack.OnStatsUpdate(func(_ *sfu.DownTrack, stat *livekit.AnalyticsStat) {