Repository navigation
Scoped speaker update - #280
Conversation
Include only participants a participant is subscribed to. NOTE: Not doing this for active speaker changes for Protocol < 3.
| return err | ||
| } | ||
| subTrack := NewSubscribedTrack(SubscribedTrackParams{ | ||
| PublisherID: t.params.ParticipantID, |
There was a problem hiding this comment.
Once again, sid vs identity issues. Looks like we can swap out PublisherID for PublisherIdentity in SubscribedTrack. But, have left PublisherIdentity in there for now. Please let me know if it can be cleaned out and I will add a commit to this PR to clean that out.
|
|
||
| var scopedSpeakers []*livekit.SpeakerInfo | ||
| for _, s := range speakers { | ||
| if p.IsSubscribedTo(s.Sid) { |
There was a problem hiding this comment.
subscribedTo was keyed by identity, but SpeakerInfo only has SID. So, switching out the key to SID for the subscribedTo map which also necessitated the change in SubscribedTrack interface.
| p.params.Logger.Debugw("added subscribedTrack", | ||
| "publisher", subTrack.PublisherIdentity(), | ||
| "publisherID", subTrack.PublisherID(), | ||
| "publisherIdentity", subTrack.PublisherIdentity(), |
There was a problem hiding this comment.
Still using the PublisherIdentity just for logging. This and the log below are the only places where PublisherIdentity of SubscribedTrack is used.
|
excuse the misspelled branch name :-) |
davidzhao
left a comment
There was a problem hiding this comment.
lg, thanks for cleaning this up!
* Scoped speaker update Include only participants a participant is subscribed to. NOTE: Not doing this for active speaker changes for Protocol < 3. * correct comment spelling
Include only participants a participant is subscribed to.
NOTE: Not doing this for active speaker changes for Protocol < 3.