LH-276: Update producer close enent handler

This commit is contained in:
Sergiu Toma 2023-02-20 20:25:33 +02:00
parent 1fb5df4cde
commit bdda13e0d5

24
app.js
View File

@ -684,6 +684,30 @@ const createWebRtcTransportLayer = async (callId, callback) => {
console.log(`transport | closed | calldId ${callId}`); console.log(`transport | closed | calldId ${callId}`);
}); });
transport.observer.on("newdataproducer", (dataProducer) =>
{
console.log(
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^new data producer created [worker.pid:%d, router.id:%s, transport.id:%s, dataProducer.id:%s]",
worker.pid, router.id, transport.id, dataProducer.id);
dataProducer.observer.on("close", () =>
{
console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^data producer closed [dataProducer.id:%s]", dataProducer.id);
});
});
transport.observer.on("newproducer", (producer) =>
{
console.log(
"$$$$$$$$$$$$$$$$$$$$$$$$$$new producer created [worker.pid:%d, router.id:%s, transport.id:%s, producer.id:%s]",
worker.pid, router.id, transport.id, producer.id);
producer.observer.on("close", () =>
{
console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$producer closed [producer.id:%s]", producer.id);
});
});
const params = { const params = {
id: transport.id, id: transport.id,
iceParameters: transport.iceParameters, iceParameters: transport.iceParameters,