ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

ConnectyCube.videochat.onCallListener works very slowly #254

Closed DavidAmirKham closed 2 years ago

DavidAmirKham commented 3 years ago

Sometimes, ConnectyCube.videochat.onCallListener is very slowly and can't get session for getUserMedia and makes error? How to fix this bug?

DavidAmirKham commented 2 years ago

Please help me about this issue?

DaveLomber commented 2 years ago

hi @DavidAmirKham

could you specify more about it

DavidAmirKham commented 2 years ago

yes, I used RN at both sides and tested two times. The first time worked fast and in the second time, onCallListener worked before VideoScreen. When navigating to VideoScreen, onCallListener doesn't work.

DaveLomber commented 2 years ago

so on 2nd attempt it does not work at all, correct?

DavidAmirKham commented 2 years ago

Yes, 2nd attempt does not work at all

DavidAmirKham commented 2 years ago

May be it is need to add

resetState = () => { CallService.stopCall(); AuthService.logout(); . . . };

DaveLomber commented 2 years ago

It seems it's an issue with a code sample itself, and some state is not reset

DavidAmirKham commented 2 years ago

Is it the bug from ConnectyCube?

DaveLomber commented 2 years ago

It seems like an issue with code sample, so this case is not properly handled

I suggest to try your approach https://github.com/ConnectyCube/connectycube-reactnative-samples/issues/254#issuecomment-892456059

DavidAmirKham commented 2 years ago

I would like to get receiving call from all screen and login AuthService and navigate to VideoScreen.

DaveLomber commented 2 years ago

got it

so then all these listeners https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/master/RNVideoChat/src/components/VideoScreen/index.js#L119 should be moved outside of Video component

ccvlad commented 2 years ago

Closed due to inactivity. Please create a new issue if needed.