WebRTC-iOS icon indicating copy to clipboard operation
WebRTC-iOS copied to clipboard

Best Practices to reset WebRTC peer connections?

Open mannerism opened this issue 3 years ago • 1 comments

Hello,

I really appreciate your work and it has helped me a lot studying WebRTC tech in iOS.

One question I have is what would be the best practices to safely reset on-going peer connections between clients. For example, in the sample app, when I try to offer/answer for the first time, it works very well. But when I try to disconnect and reconnect in the same screen, it seems the offer/answer is not working properly. How would you go about the problem?

Thanks.

mannerism avatar Jun 17 '22 10:06 mannerism

Hi, happy that you find the project useful and informative.

From my experience, in order to reset peer connection, you will have to create a new instance of the class on both clients and start over (and discarding the previous instances)

stasel avatar Jun 22 '22 21:06 stasel