parse-params #9
7
app.js
7
app.js
@ -229,7 +229,7 @@ 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 }) => {
|
||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
||||
try {
|
||||
const callId = socketDetails[socket.id];
|
||||
|
||||
@ -257,6 +257,11 @@ 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: producer.id
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(`ERROR | transport-produce | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user