Detecting dropped call

What method should I take to detect a dropped call? ie: User X calls user Y, user Y answers. Then user Y refreshes their browser, or closes browser all together. Is there a reconnection handler I could access somewhere to timeout the call & cleanup user X’s UI (close modal, etc etc)?


1 Like


The best bet would be to utilize the onReconnecting() event handler.

With that you could implement some logic client side to timeout the connection after sitting in the reconnected state for a certain period of time.


Ok thanks @Tyler, the call to that handler seems a bit random but I’ll try to figure something out. I’ve got a follow up question. I’m using sendbird-calls sdk v1.5.1, and after making the call camera/microphone is still being used, even after calling call.end(). Both hardware camera indicator and browsers software are active. Tested both on Firefox and Chrome. Should anything besides .end() be called on the call object to stop video/audio?

If you’re calling the useMedia() method, but are not disposing of it, you’d see similar behavior.

So if you’re doing something like

let media = SendBirdCall.useMedia({ audio: true, video: false });

You’d need to ensure you call