From 0230e668e4fe9bbbfd90f2969dbab5eab1631db2 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 21 Feb 2023 01:50:43 +0200 Subject: [PATCH] LH-276: Update producer close event handler --- app.js | 2 ++ public/bundle.js | 6 +++--- public/index.js | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 7a9dc77..50666bf 100644 --- a/app.js +++ b/app.js @@ -506,6 +506,8 @@ peers.on('connection', async (socket) => { } catch (error) { console.log('sssss22222', error.message); } + console.log('videoCalls[callId].receiverConsumerVideo', videoCalls[callId].receiverConsumerVideo); + console.log('videoCalls[callId].receiverConsumerAudio', videoCalls[callId].receiverConsumerAudio); } } catch (error) { console.error(`[consumer-resume] | ERROR | callId: ${socketDetails[socket.id]} | isInitiator: ${isInitiator} | error: ${error.message}`); diff --git a/public/bundle.js b/public/bundle.js index e8c10b0..892c9f1 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20832,14 +20832,14 @@ const connectRecvTransport = async () => { console.log('❗ Don\'t have AUDIO stream to consume'); } - socket.emit('consumer-resume') - + remoteVideo.srcObject = stream remoteVideo.setAttribute('autoplay', true) - + remoteVideo.play() .then(() => { console.log('remoteVideo PLAY') + socket.emit('consumer-resume') }) .catch((error) => { displayError(`remoteVideo PLAY ERROR | ${error.message}`) diff --git a/public/index.js b/public/index.js index 1007851..57a23b1 100644 --- a/public/index.js +++ b/public/index.js @@ -474,14 +474,14 @@ const connectRecvTransport = async () => { console.log('❗ Don\'t have AUDIO stream to consume'); } - socket.emit('consumer-resume') - + remoteVideo.srcObject = stream remoteVideo.setAttribute('autoplay', true) - + remoteVideo.play() .then(() => { console.log('remoteVideo PLAY') + socket.emit('consumer-resume') }) .catch((error) => { displayError(`remoteVideo PLAY ERROR | ${error.message}`)