Compare commits

...

6 Commits

Author SHA1 Message Date
0c713ed286 Added logs 2022-09-29 18:26:59 +03:00
817781085f Added logs 2022-09-29 18:23:47 +03:00
a95c29659e Added logs 2022-09-29 18:07:32 +03:00
5d451d961f Added logs 2022-09-29 17:50:51 +03:00
1d47d02792 Added logs 2022-09-29 16:42:21 +03:00
8ac58f0d9d added log for dtls transport-connect 2022-09-29 14:24:44 +03:00

9
app.js
View File

@ -215,10 +215,14 @@ peers.on('connection', async socket => {
socket.on('transport-connect', async ({ dtlsParameters }) => { socket.on('transport-connect', async ({ dtlsParameters }) => {
try { try {
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
console.log(`[transport-connect] socket.id ${socket.id} | callId ${callId}`) // console.log('🔴 typeof dtlsParameters', typeof dtlsParameters);
// console.log('🟢 dtlsParameters', JSON.parse(dtlsParameters));
// console.log('🟡 dtlsParameters', dtlsParameters);
if (typeof dtlsParameters === 'string') dtlsParameters = JSON.parse(dtlsParameters);
console.log(`[transport-connect] socket.id ${socket.id} | callId ${callId}`);
await videoCalls[callId].producerTransport.connect({ dtlsParameters }); await videoCalls[callId].producerTransport.connect({ dtlsParameters });
} catch (error) { } catch (error) {
console.log(`ERROR | transport-connect | callId ${socketDetails[socket.id]} | ${error.message}`); console.log(`ERROR | transport-connect | callId ${socketDetails[socket.id]} | ${error.stack}`);
} }
}); });
@ -381,6 +385,7 @@ const createWebRtcTransportLayer = async (callId, callback) => {
dtlsParameters: transport.dtlsParameters, dtlsParameters: transport.dtlsParameters,
}; };
console.log(`createWebRtcTransportLayer | params.dtlsParameters ${params.dtlsParameters}`);
// Send back to the client the params // Send back to the client the params
callback({ params }); callback({ params });