Handle video freeze on bad network conditions

#1

In a bad network condition with high amount of packet loss it’s very common that the audio or video subscription is failed and dropped. AFAIK the only way to detect and restore the stream is by listening to the stream-failed event and re-subscribe to that stream. The problem with this approach is that the event is called very late and after a timeout (30s or more). Any one has a better idea for handing audio/video drops? Or any way to decrease the timeout?

#2

hey, I would use: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/getStats
as mentioned at: https://stackoverflow.com/questions/35577657/detect-offline-peer-in-webrtc-connection
The post is a bit older so this should work in chrome as well.

#3

Thanks for the tip :ok_hand:
I’ll give it a try.