LH-276: Update producer close event handler
This commit is contained in:
parent
512d0f8bed
commit
cf6725dec4
10
app.js
10
app.js
@ -294,7 +294,7 @@ peers.on('connection', async (socket) => {
|
||||
});
|
||||
|
||||
videoCalls[callId].receiverVideoProducer.observer.on("close", () => {
|
||||
console.log(`[close-producer] receiverVideoProducer | callId: ${callId} | kind: ${kind}`);
|
||||
console.log(`[close-producer] receiverVideoProducer receiver --EMIT--> initiator | callId: ${callId} | kind: ${kind}`);
|
||||
videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind });
|
||||
})
|
||||
|
||||
@ -319,7 +319,7 @@ peers.on('connection', async (socket) => {
|
||||
});
|
||||
|
||||
videoCalls[callId].initiatorVideoProducer.observer.on("close", () => {
|
||||
console.log(`[close-producer] initiatorVideoProducer | callId: ${callId} | kind: ${kind}`);
|
||||
console.log(`[close-producer] initiatorVideoProducer initiator --EMIT--> receiver | callId: ${callId} | kind: ${kind}`);
|
||||
videoCalls[callId].receiverSocket.emit('close-producer', { callId, kind });
|
||||
})
|
||||
|
||||
@ -345,7 +345,7 @@ peers.on('connection', async (socket) => {
|
||||
});
|
||||
|
||||
videoCalls[callId].receiverAudioProducer.observer.on("close", () => {
|
||||
console.log(`[close-producer] receiverAudioProducer | callId: ${callId} | kind: ${kind}`);
|
||||
console.log(`[close-producer] receiverAudioProducer receiver --EMIT--> initiator | callId: ${callId} | kind: ${kind}`);
|
||||
videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind });
|
||||
})
|
||||
|
||||
@ -370,8 +370,8 @@ peers.on('connection', async (socket) => {
|
||||
});
|
||||
|
||||
videoCalls[callId].initiatorAudioProducer.observer.on("close", () => {
|
||||
console.log(`[close-producer] initiatorAudioProducer | callId: ${callId} | kind: ${kind}`);
|
||||
videoCalls[callId].initiatorSocket.emit('close-producer', { callId, kind });
|
||||
console.log(`[close-producer] initiatorAudioProducer initiator --EMIT--> receiver | callId: ${callId} | kind: ${kind}`);
|
||||
videoCalls[callId].receiverSocket.emit('close-producer', { callId, kind });
|
||||
})
|
||||
|
||||
// Send back to the client the Producer's id
|
||||
|
Loading…
Reference in New Issue
Block a user