From c6edb2947d5b21d41bf10887b1d389deb96f8741 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Thu, 24 Nov 2022 16:46:00 +0200 Subject: [PATCH] Update server --- app.js | 3 +++ public/bundle.js | 5 +++-- public/index.js | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 8217598..973de2f 100644 --- a/app.js +++ b/app.js @@ -332,6 +332,8 @@ peers.on('connection', async socket => { */ socket.on('consume', async ({ rtpCapabilities }, callback) => { try { + console.log(`[consume] rtpCapabilities: ${rtpCapabilities}`); + const callId = socketDetails[socket.id]; console.log('[consume] callId', callId); @@ -370,6 +372,7 @@ peers.on('connection', async socket => { rtpParameters: videoCalls[callId].consumer.rtpParameters, }; + console.log('[consume] params', params); // Send the parameters to the client callback({ params }); } else { diff --git a/public/bundle.js b/public/bundle.js index 99709c6..e3fbe0f 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20688,7 +20688,7 @@ const connectSendTransport = async () => { // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // this action will trigger the 'connect' and 'produce' events above - + console.log('videoParams', videoParams); producerVideo = await producerTransport.produce(videoParams) console.log('producerVideo', producerVideo); producerVideo.on('trackended', () => { @@ -20701,6 +20701,7 @@ const connectSendTransport = async () => { // close video track }) + console.log('audioParams', audioParams); producerAudio = await producerTransport.produce(audioParams) console.log('producerAudio', producerAudio); producerAudio.on('trackended', () => { @@ -20710,7 +20711,7 @@ const connectSendTransport = async () => { producerAudio.on('transportclose', () => { console.log('transport ended') - + // close video track }) diff --git a/public/index.js b/public/index.js index 8b046bb..fed244a 100644 --- a/public/index.js +++ b/public/index.js @@ -330,7 +330,7 @@ const connectSendTransport = async () => { // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // this action will trigger the 'connect' and 'produce' events above - + console.log('videoParams', videoParams); producerVideo = await producerTransport.produce(videoParams) console.log('producerVideo', producerVideo); producerVideo.on('trackended', () => { @@ -343,6 +343,7 @@ const connectSendTransport = async () => { // close video track }) + console.log('audioParams', audioParams); producerAudio = await producerTransport.produce(audioParams) console.log('producerAudio', producerAudio); producerAudio.on('trackended', () => { @@ -352,7 +353,7 @@ const connectSendTransport = async () => { producerAudio.on('transportclose', () => { console.log('transport ended') - + // close video track })