Jump to content
  • 0

React Native SDK - Connection drop support


Rahul
 Share

Question

Hi everyone,

We are using the React Native SDK and the Community edition of Ant Media on AWS.

1. Is there a way or callback to detect when the call drops due to internet issues? 

2. Is there a way to keep retrying the call, so the call is reconnected when the internet resumes?

 

Our integration is working fine in most cases, but a lot of our calls drop in the middle due to internet issues. If there is a callback available to detect the call has dropped, then I can handle the retry logic and a user warning on the front end. Thank you

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 1

Hi @Rahul

I am not sure, this is helpful for you or not, but sharing my idea for your resolution.

Your both points will be covered into this reference.

I am sharing a reference of javascript SDK here.

You can make use of this function in setInterval for publishing OR playing.

Websocket gets closed when you are disconnected from stream, By using some flags you can check the call auto disconnected or you stopped. If auto disconnected then you setInterval will try to rejoin/republish the stream.

Customize the code as per your language.

 

Link to comment
Share on other sites

  • 0

Thanks! I was thinking something similar. We were using the ReactNative adaptor by AntMedia, but sadly that doesn't expose a way to edit the WebRTC adaptor. 

I think I will use the react-native-webrtc directly and add a listener for iceconnectionstate. Any time the connection is dropped, I can retry as per the function you provided. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...