One shot signalling mode fixes (#3223)
* set desired on synchronous track * debug * debug * direction * reuse * clean up
This commit is contained in:
@@ -309,6 +309,7 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
|
|||||||
// but it is not detrimental to set this, needs clean up when participants modes are separated out better.
|
// but it is not detrimental to set this, needs clean up when participants modes are separated out better.
|
||||||
subTrack.SetNeedsNegotiation(!replacedTrack)
|
subTrack.SetNeedsNegotiation(!replacedTrack)
|
||||||
subTrack.SetRTPSender(sender)
|
subTrack.SetRTPSender(sender)
|
||||||
|
|
||||||
// it is possible that subscribed track is closed before subscription manager sets
|
// it is possible that subscribed track is closed before subscription manager sets
|
||||||
// the `OnClose` callback. That handler in subscription manager removes the track
|
// the `OnClose` callback. That handler in subscription manager removes the track
|
||||||
// from the peer connection.
|
// from the peer connection.
|
||||||
|
|||||||
@@ -2954,6 +2954,10 @@ func (p *ParticipantImpl) SupportsSyncStreamID() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) SupportsTransceiverReuse() bool {
|
func (p *ParticipantImpl) SupportsTransceiverReuse() bool {
|
||||||
|
if p.params.UseOneShotSignallingMode {
|
||||||
|
return p.ProtocolVersion().SupportsTransceiverReuse()
|
||||||
|
}
|
||||||
|
|
||||||
return p.ProtocolVersion().SupportsTransceiverReuse() && !p.SupportsSyncStreamID()
|
return p.ProtocolVersion().SupportsTransceiverReuse() && !p.SupportsSyncStreamID()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -645,6 +645,7 @@ func (m *SubscriptionManager) subscribeSynchronous(trackID livekit.TrackID) erro
|
|||||||
m.subscriptions[trackID] = sub
|
m.subscriptions[trackID] = sub
|
||||||
}
|
}
|
||||||
m.lock.Unlock()
|
m.lock.Unlock()
|
||||||
|
sub.setDesired(true)
|
||||||
|
|
||||||
subTrack, err := track.AddSubscriber(m.params.Participant)
|
subTrack, err := track.AddSubscriber(m.params.Participant)
|
||||||
if err != nil && !errors.Is(err, errAlreadySubscribed) {
|
if err != nil && !errors.Is(err, errAlreadySubscribed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user