Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0c713ed286 | |||
817781085f | |||
a95c29659e | |||
5d451d961f | |||
1d47d02792 | |||
8ac58f0d9d |
9
app.js
9
app.js
@ -215,10 +215,14 @@ peers.on('connection', async socket => {
|
||||
socket.on('transport-connect', async ({ dtlsParameters }) => {
|
||||
try {
|
||||
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 });
|
||||
} 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,
|
||||
};
|
||||
|
||||
console.log(`createWebRtcTransportLayer | params.dtlsParameters ${params.dtlsParameters}`);
|
||||
// Send back to the client the params
|
||||
callback({ params });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user