Add a little delay before marking peer as ready

This commit is contained in:
Pierre HUBERT 2020-05-03 20:26:52 +02:00
parent 58e9130b4f
commit f3b7091332

View File

@ -863,9 +863,14 @@ class CallWindow extends CustomEvents {
this.mainPeer.on("connect", () => {
console.info("Connected to remote peer!")
setTimeout(() => {
// Add a little delay before notifying other peers in order to let the tracks be received by the proxy
if(this.mainPeer && !this.mainPeer.destroyed)
ws("calls/mark_ready", {
callID: this.callID
})
}, 2000);
})
this.mainPeer.on("message", message => {