Compare commits
9 Commits
4.00
...
4a8afb7d47
Author | SHA1 | Date | |
---|---|---|---|
4a8afb7d47 | |||
9470a2077f | |||
21e26d4be5 | |||
0c713ed286 | |||
817781085f | |||
a95c29659e | |||
5d451d961f | |||
1d47d02792 | |||
8ac58f0d9d |
18
app.js
18
app.js
@ -229,9 +229,20 @@ peers.on('connection', async socket => {
|
||||
- For the router with the id callId, we make produce on producerTransport
|
||||
- Create the handler on producer at the 'transportclose' event
|
||||
*/
|
||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }) => {
|
||||
try {
|
||||
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);
|
||||
|
||||
console.log('[transport-produce] | socket.id', socket.id, '| callId', callId);
|
||||
@ -246,11 +257,6 @@ peers.on('connection', async socket => {
|
||||
console.log('transport for this producer closed', callId)
|
||||
closeCall(callId);
|
||||
});
|
||||
|
||||
// Send back to the client the Producer's id
|
||||
// callback({
|
||||
// id: videoCalls[callId].producer.id
|
||||
// });
|
||||
} catch (error) {
|
||||
console.log(`ERROR | transport-produce | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user