Set down track connected flag in one-shot-signalling mode. (#3191)
* Set down track connected flag in one-shot-signalling mode. Also, added maintaing ICE candidates for info purposes. And doing analytics events (have to maintain the subscription inside subscriptionmanager to get list of subscribed tracks, so added enough bits from the async path into sync path to get the analytics bits also) * comment typo
This commit is contained in:
+18
-5
@@ -1388,12 +1388,21 @@ func (p *ParticipantImpl) onTrackSubscribed(subTrack types.SubscribedTrack) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if p.TransportManager.HasSubscriberEverConnected() {
|
||||
dt := subTrack.DownTrack()
|
||||
dt.SeedState(sfu.DownTrackState{ForwarderState: p.getAndDeleteForwarderState(subTrack.ID())})
|
||||
dt.SetConnected()
|
||||
if p.params.UseOneShotSignallingMode {
|
||||
if p.TransportManager.HasPublisherEverConnected() {
|
||||
dt := subTrack.DownTrack()
|
||||
dt.SeedState(sfu.DownTrackState{ForwarderState: p.getAndDeleteForwarderState(subTrack.ID())})
|
||||
dt.SetConnected()
|
||||
}
|
||||
// ONE-SHOT-SIGNALLING-MODE-TODO: video support should add to publisher PC for congestion control
|
||||
} else {
|
||||
if p.TransportManager.HasSubscriberEverConnected() {
|
||||
dt := subTrack.DownTrack()
|
||||
dt.SeedState(sfu.DownTrackState{ForwarderState: p.getAndDeleteForwarderState(subTrack.ID())})
|
||||
dt.SetConnected()
|
||||
}
|
||||
p.TransportManager.AddSubscribedTrack(subTrack)
|
||||
}
|
||||
p.TransportManager.AddSubscribedTrack(subTrack)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1882,6 +1891,10 @@ func (p *ParticipantImpl) onPublisherInitialConnected() {
|
||||
p.supervisor.SetPublisherPeerConnectionConnected(true)
|
||||
}
|
||||
|
||||
if p.params.UseOneShotSignallingMode {
|
||||
p.setDownTracksConnected()
|
||||
}
|
||||
|
||||
p.pubRTCPQueue.Start()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user