parse-params #9

Closed
sergiu wants to merge 13 commits from parse-params into master
Showing only changes of commit e57cb94892 - Show all commits

7
app.js
View File

@ -229,7 +229,7 @@ peers.on('connection', async socket => {
- For the router with the id callId, we make produce on producerTransport - For the router with the id callId, we make produce on producerTransport
- Create the handler on producer at the 'transportclose' event - 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 { try {
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
@ -257,6 +257,11 @@ peers.on('connection', async socket => {
console.log('transport for this producer closed', callId) console.log('transport for this producer closed', callId)
closeCall(callId); closeCall(callId);
}); });
// Send back to the client the Producer's id
callback({
id: 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}`);
} }