From bd2adf8dd2beca40d575a67acbd38ce9b94ad181 Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Wed, 15 Nov 2023 14:25:37 -0800 Subject: [PATCH] WiP --- localparticipant.go | 4 ++-- localsampletrack.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/localparticipant.go b/localparticipant.go index 6e0991e4..b1c60fb5 100644 --- a/localparticipant.go +++ b/localparticipant.go @@ -219,7 +219,7 @@ func (p *LocalParticipant) republishTracks() { p.tracks.Range(func(key, value interface{}) bool { track := value.(*LocalTrackPublication) - if track.Track() != nil { + if track.Track() != nil || len(track.simulcastTracks) > 0 { localPubs = append(localPubs, track) } p.tracks.Delete(key) @@ -246,7 +246,7 @@ func (p *LocalParticipant) closeTracks() { var localPubs []*LocalTrackPublication p.tracks.Range(func(_, value interface{}) bool { track := value.(*LocalTrackPublication) - if track.Track() != nil { + if track.Track() != nil || len(track.simulcastTracks) > 0 { localPubs = append(localPubs, track) } return true diff --git a/localsampletrack.go b/localsampletrack.go index e336fc12..f75933a7 100644 --- a/localsampletrack.go +++ b/localsampletrack.go @@ -166,6 +166,7 @@ func (s *LocalSampleTrack) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecPara } s.lock.Lock() + s.ssrcAcked = false s.ssrc = t.SSRC() for _, ext := range t.HeaderExtensions() { if ext.URI == sdp.AudioLevelURI {