Refine transport fallback for client resuming (#1597)

* reset fallback after ice restart

* Configure ice for reconnect before send response
This commit is contained in:
cnderrauber
2023-04-10 15:12:05 +08:00
committed by GitHub
parent c56e37f3fe
commit c70a5c831f
6 changed files with 113 additions and 101 deletions
+3 -3
View File
@@ -407,7 +407,7 @@ func (r *Room) ResumeParticipant(p types.LocalParticipant, requestSource routing
p.SetSignalSourceValid(true)
if err := p.SendReconnectResponse(&livekit.ReconnectResponse{
if err := p.HandleReconnectAndSendResponse(reason, &livekit.ReconnectResponse{
IceServers: iceServers,
ClientConfiguration: p.GetClientConfiguration(),
}); err != nil {
@@ -423,7 +423,7 @@ func (r *Room) ResumeParticipant(p types.LocalParticipant, requestSource routing
p.SendRoomUpdate(r.protoRoom)
r.lock.RUnlock()
p.ICERestart(nil, reason)
p.ICERestart(nil)
return nil
}
@@ -729,7 +729,7 @@ func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScen
participant.ICERestart(&livekit.ICEConfig{
PreferenceSubscriber: livekit.ICECandidateType(scenario.SwitchCandidateProtocol),
PreferencePublisher: livekit.ICECandidateType(scenario.SwitchCandidateProtocol),
}, livekit.ReconnectReason_RR_SWITCH_CANDIDATE)
})
}
return nil
}