Is there a way to reconnect two peers after one is destroyed?

578 views Asked by At

I'm working with simple-peer in React.js to implement a video conference. when I connect two peers after they got disconnected, peers get destroyed but I want to reconnect them on the same connection and I don't want to create a new set of peers and perform the handshake again in order to connect them. Is there a way to do it?

1

There are 1 answers

0
Arvin On

Do you create new Peer objects on both sides of the connection? Destroying a peer locally will destroy the remote peer it’s connected to.

Also, please post your console logs with debugging enabled.

peer._debug = console.log