Better robustness against dead webrtc channels

I can’t tell if it’s getting worse or not, but I’ve noticed lately that W2G really struggles when connectivity is flaky. It seems like clients could report whether connections are healthy and reestablish them when things stall / drop. Main symptoms i see are:

  1. Video turns black or freezes, never recovers. Requires refresh by either client.
  2. Audio drops out, never recovers. Requires refresh by either client.

In both cases, the client “knows” that the other user has their media enabled and shows it as such (e.g. isn’t showing user avatar and/or is showing volume slider) but doesn’t know that the connection is effectively dead. It’s a shame to force users to refresh the page and reestablish all connections and the playing video to try to recover.

Decent options imo:

  1. Allow users to toggle their connection to other users somehow and cause the media streams to retry.
  2. Detect that there’s no data coming over the stream(s) and retry them manually.

Thanks a lot for your feedback. I agree that the webcam system needs to be more robust. It’s however a tricky thing to emulate and debug these kind of network failures. But the idea to trigger a reconnect to a specific user sounds great. May I ask how many online users with cams enabled you typically have in your room? Would you still rate the webcam system as „useable“ or did it become to worse?

Even with only two people it is flaky enough that we have started announcing every time we turn the cameras on or off in chat, because we can’t rely on the app tracking it correctly.

Thanks a lot for the feedback once more. Two questions:

  • Do you see that media is enabled but no video stream could be established? Or is there just nothing happening at all?

  • Which browsers are both of you using?

Florian

Sometimes I see that video is enabled, sometimes not. Sometimes there’s a big “playing” triangle over the camera and sometimes not. In general it seems like the state is just wildly inconsistent when the connection is flaky. Toggling video off and on does not help in that case. It requires a refresh.

This happens on all combinations of chrome and firefox for android and linux that I have tried.

Thanks for the bug report. What kind of mobile device and which mobile browser are you using?

The problem is not only on mobile, but my phone is a pixel 7 and I’ve tried with both Firefox and Chrome. If you want to repro, you can use the browser and do something like switch to a different network and then try to toggle the camera off and on. Alternatively, you can just try killing your connection in dev tools until it freeze the stream, then try to recover without refreshing the entire page.

Thanks for the update. I will run some tests with network changes and check If the reconnect can be implemented in a smarter way.