parse-params #9
18
app.js
18
app.js
@ -232,17 +232,6 @@ peers.on('connection', async socket => {
|
|||||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
||||||
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 rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
|
if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
|
||||||
|
|
||||||
console.log('[transport-produce] | socket.id', socket.id, '| callId', callId);
|
console.log('[transport-produce] | socket.id', socket.id, '| callId', callId);
|
||||||
@ -258,11 +247,10 @@ peers.on('connection', async socket => {
|
|||||||
closeCall(callId);
|
closeCall(callId);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('----------- videoCalls[callId].producer.id', videoCalls[callId].producer.id);
|
|
||||||
// Send back to the client the Producer's id
|
// Send back to the client the Producer's id
|
||||||
callback({
|
// callback({
|
||||||
id: videoCalls[callId].producer.id
|
// id: videoCalls[callId].producer.id
|
||||||
});
|
// });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`ERROR | transport-produce | callId ${socketDetails[socket.id]} | ${error.message}`);
|
console.log(`ERROR | transport-produce | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user