RCTWebRTCDemo2 icon indicating copy to clipboard operation
RCTWebRTCDemo2 copied to clipboard

Its crashing on continuous calling

Open pavanMude opened this issue 4 years ago • 0 comments

First of all, I definitely want to appreciate your efforts in providing such demo, where we can understand step by step procedure for call connection. But when I continuously try to test peer calling, some how it is crashing when it tries to add peer stream.

peer.onaddstream = event => {
    const remoteList = appClass.state.remoteList;
    remoteList[socketId] = event.stream.toURL();
    InCallManager.stopRingback();
    appClass.setState({
      info: 'Connected...',
      remoteList: remoteList,
    });
  };

The method works efficiently but I doubt about appClass.setstate({}), it throws the error (In 'o.setState({remoteList:c})', 'o.setState' is an instance of Object) . I would like to know how I can put a condition or avoid being undefined. Help will be highly appreciated.

pavanMude avatar Jun 26 '20 05:06 pavanMude