Hi,
I have a wrtc transport on the server side, and it is connected to the transport on the client side. Upon the user disconnecting, whether that’d be closing the tab or what not, I need to do some clean up on the server side.
I tried to use the “connectionstatechange” event, but the even never seems to get hit, not even once, despite being able to receive video and audio transmitted from server side to client side.
Could somebody point me in the right direction?
Thanks!
const recvTransport = await soup.router.createWebRtcTransport({
listenIps: [{ ip: room.ip, announcedIp: null }],
enableUdp: true,
enableTcp: true,
preferUdp: true,
enableSctp: true,
});
recvTransport.on("connectionstatechange", connectionState => {
console.log(connectionState)
})