Pass TrackInfo entirely to ensure fields aren't missing (#150)

This commit is contained in:
David Zhao
2021-10-19 17:27:32 -07:00
committed by GitHub
parent 2d76c672e3
commit 833e497f37
3 changed files with 63 additions and 30 deletions
+1 -5
View File
@@ -833,18 +833,14 @@ func (p *ParticipantImpl) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *w
mt = trk
} else {
mt = NewMediaTrack(track, MediaTrackParams{
TrackID: ti.Sid,
TrackInfo: ti,
ParticipantID: p.id,
RTCPChan: p.rtcpCh,
BufferFactory: p.params.Config.BufferFactory,
ReceiverConfig: p.params.Config.Receiver,
AudioConfig: p.params.AudioConfig,
Stats: p.params.Stats,
Width: ti.Width,
Height: ti.Height,
})
mt.name = ti.Name
mt.SetMuted(ti.Muted)
newTrack = true
}