From 6d13805ac60769da5b06e62bf2c1473835db999f Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 5 Sep 2022 17:39:33 +0300 Subject: [PATCH] On goConnect send accept call and start setup --- public/index.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/public/index.js b/public/index.js index ebe77cd..f91b787 100644 --- a/public/index.js +++ b/public/index.js @@ -155,7 +155,13 @@ const getLocalStream = () => { const goConnect = () => { console.log('[goConnect] device:', device); - device === undefined ? getRtpCapabilities() : goCreateTransport() + setTimeout(() => { + hub.emit( + 'video', + JSON.stringify(answer) + ); + device === undefined ? getRtpCapabilities() : goCreateTransport() + }, 7000); } const goCreateTransport = () => { @@ -300,12 +306,12 @@ const connectSendTransport = async () => { }; console.log('SEND answer', answer); - setTimeout(() => { - hub.emit( - 'video', - JSON.stringify(answer) - ); - }, 7000); + // setTimeout(() => { + // hub.emit( + // 'video', + // JSON.stringify(answer) + // ); + // }, 7000); // Enable Close call button const closeCallBtn = document.getElementById('btnCloseCall');