diff --git a/app.js b/app.js index a7f7381..2b8f689 100644 --- a/app.js +++ b/app.js @@ -684,6 +684,30 @@ const createWebRtcTransportLayer = async (callId, callback) => { 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 = { id: transport.id, iceParameters: transport.iceParameters,