Browser reload behavior

Hello. I am testing a situation in which I have two browsers, one is publishing a video and audio track and the other is consuming that video and audio track.

When I reload the web page on the client that is publishing the tracks, I am (perhaps incorrectly) expecting that somewhere an event would fire indicating that either a transport closed or producer ended. I believe I’m listening to all the relevant events on both the client and server side, but I don’t see anything firing. Obviously I know that the websocket connection is closed, so I can key on that, but I was wondering if this seems like I’m doing something wrong listening for events or if this is expected.

Thanks so much for the help!

You need to rely on signaling channel (WS) connection.

thank you for your assistance! One additional follow up - the transport on the server side should see a change in the connectionstate, right? I was wondering if perhaps I could use the change in connectionstate to then indicate to my server that the associated transport needs to be closed. Since I wasn’t seeing this I’m assuming I have a lack of understanding somewhere wrt to ICE lite but just wanted to double check.

I answered “check signaling channel status” for something.

You can check server side WebRtcTransport.dtlsState (or its event), the browser may send a DTLS Close Alert when you close the tab, but this is not reliable, it may happen or not.

No other way to detect “disconnection”. mediasoup is ICE Lite server so it does not send ICE “ping” requests to the peer.

1 Like

I see. thank you for your help!