diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index fbea8384..aa85917c 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -405,17 +405,16 @@ class CallWindow extends CustomEvents { */ async PeerReady(peerID) { - // Mark the peer as ready - const el = this.getMemberNameEl(peerID) - if(el) - el.classList.add("ready") - - // Remove any previous connection if(this.peersEls.has(peerID)) { this.peersEls.get(peerID).destroy() } + // Mark the peer as ready + const el = this.getMemberNameEl(peerID) + if(el) + el.classList.add("ready") + const peer = new SimplePeer({ initiator: false, trickle: true, // Allow exchange of multiple ice candidates