LH-276: Update producer close event handler

This commit is contained in:
Sergiu Toma 2023-02-20 23:53:08 +02:00
parent e53f4c353f
commit 189c262b32

8
app.js
View File

@ -333,7 +333,6 @@ peers.on('connection', async (socket) => {
videoCalls[callId].initiatorVideoProducer.on('close', () => { videoCalls[callId].initiatorVideoProducer.on('close', () => {
console.log('===================1 initiatorVideoProducer for this producer closed', callId); console.log('===================1 initiatorVideoProducer for this producer closed', callId);
}); });
videoCalls[callId].initiatorVideoProducer.observer.on("close", () => { videoCalls[callId].initiatorVideoProducer.observer.on("close", () => {
console.log('====================2 initiatorVideoProducer for this producer closed', callId); console.log('====================2 initiatorVideoProducer for this producer closed', callId);
}) })
@ -345,6 +344,13 @@ peers.on('connection', async (socket) => {
console.log('000000000000000000000000000 producerclose initiatorVideoProducer!!!!!!!!!!!'); console.log('000000000000000000000000000 producerclose initiatorVideoProducer!!!!!!!!!!!');
}); });
videoCalls[callId].initiatorVideoProducer.on('closed', () => {
console.log('===================4 initiatorVideoProducer for this producer closed', callId);
});
videoCalls[callId].initiatorVideoProducer.observer.on("closed", () => {
console.log('====================5 initiatorVideoProducer for this producer closed', callId);
})
// videoCalls[callId].initiatorProducerTransport.observer.on("newproducer", (producer) => // videoCalls[callId].initiatorProducerTransport.observer.on("newproducer", (producer) =>
// { // {
// console.log( // console.log(