Can I use the same WebRTC peer connection object multiple times for different connections (not concurrent)?

Viewed 169

Think of a scenario where,

  • Peer A is connected to peer B
  • Peer A disconnects
  • Peer C wants to connect to Peer B

In this case, can peer B use the same PeerConnection object to connect with peer C? Or should it create a new object?

I built a chat application using WebRTC. The problem showed up when any of the two users refreshed the page. It's essentially same as one user disconnecting and another user taking that place. The connection doesn't establish when I tried, but not sure whether the problem is with my code or the limitation of RTCPeerConnection.

0 Answers
Related