From 0efd15deaae917ec9cf5dec23c2277e53aa434ed Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 11 Apr 2020 18:21:20 +0200 Subject: [PATCH] Can request offers --- assets/js/components/calls/window.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 5336fb7f..3378f80e 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -362,10 +362,9 @@ class CallWindow extends CustomEvents { */ async PeerReady(peerID) { const peer = new SimplePeer({ - initiator: true, + initiator: false, trickle: true, // Allow exchange of multiple ice candidates config: this.callConfig(), - stream: await navigator.mediaDevices.getUserMedia({audio: true, video: true}) // TODO : find a way to use fake strem }) this.peersEls.set(peerID, peer) @@ -389,6 +388,12 @@ class CallWindow extends CustomEvents { this.addVideoStream(peerID, false, stream) }); + + // Request an offer from proxy + await ws("calls/request_offer", { + callID: this.callID, + peerID: peerID, + }) } /**