Compare commits

..

2 Commits

Author SHA1 Message Date
4a8afb7d47 Added logs for transport-produce 2022-09-30 10:07:30 +03:00
9470a2077f Remove console.log 2022-09-29 18:34:58 +03:00

13
app.js
View File

@ -220,7 +220,7 @@ peers.on('connection', async socket => {
console.log(`[transport-connect] socket.id ${socket.id} | callId ${callId}`); 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.stack}`); console.log(`ERROR | transport-connect | callId ${socketDetails[socket.id]} | ${error.message}`);
} }
}); });
@ -232,6 +232,16 @@ peers.on('connection', async socket => {
socket.on('transport-produce', async ({ kind, rtpParameters, appData }) => { socket.on('transport-produce', async ({ kind, rtpParameters, appData }) => {
try { try {
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
console.log('kind typeof', typeof kind);
console.log('kind', kind);
console.log('rtpParameters typeof', typeof rtpParameters);
console.log('rtpParameters', rtpParameters);
console.log('appData typeof', typeof appData);
console.log('appData', appData);
if (typeof kind === 'string') kind = JSON.parse(kind); if (typeof kind === 'string') kind = JSON.parse(kind);
if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters); if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
@ -386,7 +396,6 @@ 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 });