From 8febe2a5239ec9a81b98f76a5a6ea76c426c0f20 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 11 Apr 2020 14:30:16 +0200 Subject: [PATCH] Mark call as ready as soon as possible --- assets/js/components/calls/window.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 6548da3b..fd337f3f 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -308,7 +308,12 @@ class CallWindow extends CustomEvents { notify("An error occured while trying to connect!", "danger", 5) }); - this.mainPeer.on("connect", () => console.info("Connected to remote peer!")) + this.mainPeer.on("connect", () => { + console.info("Connected to remote peer!") + ws("calls/mark_ready", { + callID: this.callID + }) + }) this.mainPeer.on("message", message => { console.log("Message from remote peer: " + message);