handle client reconnect with ICE restarts

This commit is contained in:
David Zhao
2021-04-19 16:51:20 -07:00
parent b8c9d05d3e
commit 3b236f0d72
5 changed files with 92 additions and 8 deletions
+7
View File
@@ -360,6 +360,13 @@ func (p *ParticipantImpl) Negotiate() {
p.subscriber.Negotiate()
}
// ICERestart restarts subscriber ICE connections
func (p *ParticipantImpl) ICERestart() error {
return p.subscriber.CreateAndSendOffer(&webrtc.OfferOptions{
ICERestart: true,
})
}
// AddSubscriber subscribes op to all publishedTracks
func (p *ParticipantImpl) AddSubscriber(op types.Participant) (int, error) {
p.lock.RLock()