keep mid unchange after migration for subscribed track (#995)

This commit is contained in:
cnderrauber
2022-09-09 17:39:09 +08:00
committed by GitHub
parent 93da599059
commit f1915feb1a
9 changed files with 129 additions and 74 deletions
+2 -10
View File
@@ -408,14 +408,6 @@ func (t *TransportManager) NegotiateSubscriber(force bool) {
t.subscriber.Negotiate(force)
}
func (t *TransportManager) AddNegotiationPending(publisherID livekit.ParticipantID) {
t.subscriber.AddNegotiationPending(publisherID)
}
func (t *TransportManager) IsNegotiationPending(publisherID livekit.ParticipantID) bool {
return t.subscriber.IsNegotiationPending(publisherID)
}
func (t *TransportManager) ICERestart(iceConfig *types.IceConfig) {
if iceConfig != nil {
t.SetICEConfig(*iceConfig)
@@ -496,7 +488,7 @@ func (t *TransportManager) handleConnectionFailed(isShortLived bool) {
t.SetICEConfig(nextConfig)
}
func (t *TransportManager) SetMigrateInfo(previousAnswer *webrtc.SessionDescription, dataChannels []*livekit.DataChannelInfo) {
func (t *TransportManager) SetMigrateInfo(previousOffer, previousAnswer *webrtc.SessionDescription, dataChannels []*livekit.DataChannelInfo) {
t.lock.Lock()
t.pendingDataChannelsPublisher = make([]*livekit.DataChannelInfo, 0, len(dataChannels))
pendingDataChannelsSubscriber := make([]*livekit.DataChannelInfo, 0, len(dataChannels))
@@ -515,7 +507,7 @@ func (t *TransportManager) SetMigrateInfo(previousAnswer *webrtc.SessionDescript
}
}
t.subscriber.SetPreviousAnswer(previousAnswer)
t.subscriber.SetPreviousSdp(previousOffer, previousAnswer)
}
func (t *TransportManager) ProcessPendingPublisherDataChannels() {