Exempt egress participant from track permissions. (#3322)

* Exempt egress participant from track permissions.

* test
This commit is contained in:
Raja Subramanian
2025-01-11 12:50:34 +05:30
committed by GitHub
parent 5b61bbc446
commit 28c39efa06
5 changed files with 32 additions and 26 deletions
+3 -3
View File
@@ -503,7 +503,7 @@ func (m *SubscriptionManager) subscribe(s *trackSubscription) error {
}
trackID := s.trackID
res := m.params.TrackResolver(m.params.Participant.Identity(), trackID)
res := m.params.TrackResolver(m.params.Participant, trackID)
s.logger.Debugw("resolved track", "result", res)
if res.TrackChangedNotifier != nil && s.setChangedNotifier(res.TrackChangedNotifier) {
@@ -517,7 +517,7 @@ func (m *SubscriptionManager) subscribe(s *trackSubscription) error {
if res.TrackRemovedNotifier != nil && s.setRemovedNotifier(res.TrackRemovedNotifier) {
res.TrackRemovedNotifier.AddObserver(string(m.params.Participant.ID()), func() {
// re-resolve the track in case the same track had been re-published
res := m.params.TrackResolver(m.params.Participant.Identity(), trackID)
res := m.params.TrackResolver(m.params.Participant, trackID)
if res.Track != nil {
// do not unsubscribe, track is still available
return
@@ -627,7 +627,7 @@ func (m *SubscriptionManager) subscribeSynchronous(trackID livekit.TrackID) erro
return ErrNoSubscribePermission
}
res := m.params.TrackResolver(m.params.Participant.Identity(), trackID)
res := m.params.TrackResolver(m.params.Participant, trackID)
m.params.Logger.Debugw("resolved track", "trackID", trackID, " result", res)
track := res.Track