From c38d2083539761eec8b3a746bb6c6bbf9196067b Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Wed, 8 Feb 2023 03:17:05 +0200 Subject: [PATCH] Update Client show error correctly --- public/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/public/index.js b/public/index.js index 46a3eb8..9c5c35e 100644 --- a/public/index.js +++ b/public/index.js @@ -97,7 +97,7 @@ setTimeout(() => { socket.on('new-producer', ({ callId }) => { console.log(`🟢 new-producer | callId: ${callId} | Ready to consume`); - consume() + !consumerTransport && consume() }) } @@ -467,13 +467,13 @@ const connectRecvTransport = async () => { remoteVideo.srcObject = stream remoteVideo.setAttribute('autoplay', true) - // remoteVideo.play() - // .then(() => { - // console.log('remoteVideo PLAY') - // }) - // .catch((error) => { - // console.log(`remoteVideo PLAY ERROR | ${error.message}`) - // }) + remoteVideo.play() + .then(() => { + console.log('remoteVideo PLAY') + }) + .catch((error) => { + console.log(`remoteVideo PLAY ERROR | ${error.message}`) + }) }) }