Fixed #16 explicit passing of participant id

This commit is contained in:
David Zhao
2021-02-12 23:53:46 -08:00
parent 090f8d0664
commit e342ea2155
2 changed files with 9 additions and 4 deletions
+1 -2
View File
@@ -239,8 +239,7 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
defer t.lock.Unlock()
if t.receiver == nil {
// pack ID to identify all publishedTracks
packedId := PackTrackId(t.participantId, t.ID())
t.receiver = NewWrappedReceiver(sfu.NewWebRTCReceiver(receiver, track, t.participantId), packedId)
t.receiver = NewWrappedReceiver(sfu.NewWebRTCReceiver(receiver, track, t.participantId), t.ID(), t.participantId)
t.receiver.SetRTCPCh(t.rtcpCh)
t.receiver.OnCloseHandler(func() {
t.lock.Lock()