From d67debc70be682c47232ae15966663793e553a44 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 16 Aug 2022 14:21:02 +0300 Subject: [PATCH] Add log on createRecvTransport --- app.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 611b657..737ec47 100644 --- a/app.js +++ b/app.js @@ -253,8 +253,8 @@ const createWebRtcTransportLayer = async (callId, callback) => { preferUdp: true, } - console.log('webRtcTransport_options', webRtcTransport_options); - console.log('router', router, '| router[callId]', router[callId]); + // console.log('webRtcTransport_options', webRtcTransport_options); + // console.log('router', router, '| router[callId]', router[callId]); // https://mediasoup.org/documentation/v3/mediasoup/api/#router-createWebRtcTransport let transport = await router[callId].createWebRtcTransport(webRtcTransport_options) @@ -270,15 +270,19 @@ const createWebRtcTransportLayer = async (callId, callback) => { console.log('transport closed') }) + const params = { + id: transport.id, + iceParameters: transport.iceParameters, + iceCandidates: transport.iceCandidates, + dtlsParameters: transport.dtlsParameters, + } + + console.log('params', params); + // send back to the client the following prameters callback({ // https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions - params: { - id: transport.id, - iceParameters: transport.iceParameters, - iceCandidates: transport.iceCandidates, - dtlsParameters: transport.dtlsParameters, - } + params }) return transport