Compare commits
2 Commits
21e26d4be5
...
4a8afb7d47
Author | SHA1 | Date | |
---|---|---|---|
4a8afb7d47 | |||
9470a2077f |
15
app.js
15
app.js
@ -216,11 +216,11 @@ peers.on('connection', async socket => {
|
|||||||
try {
|
try {
|
||||||
const callId = socketDetails[socket.id];
|
const callId = socketDetails[socket.id];
|
||||||
if (typeof dtlsParameters === 'string') dtlsParameters = JSON.parse(dtlsParameters);
|
if (typeof dtlsParameters === 'string') dtlsParameters = JSON.parse(dtlsParameters);
|
||||||
|
|
||||||
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 });
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user