LH-276: Update producer close enent handler

This commit is contained in:
Sergiu Toma 2023-02-20 20:01:21 +02:00
parent 21b4b6d04f
commit ea1c8e7e80

11
app.js
View File

@ -327,6 +327,17 @@ peers.on('connection', async (socket) => {
console.log('2 initiatorVideoProducer for this producer closed', callId);
})
videoCalls[callId].initiatorProducerTransport.observer.on("newproducer", (producer) =>
{
console.log(
"new producer created [worker.pid:%d, router.id:%s, transport.id:%s, producer.id:%s]", producer.id);
producer.observer.on("close", () =>
{
console.log("producer closed [producer.id:%s]", producer.id);
});
});
callback &&
callback({
id: videoCalls[callId].initiatorVideoProducer.id,