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?
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.
Thanks for the tip
I’ll give it a try.