jitsi-meet-sdk-samples icon indicating copy to clipboard operation
jitsi-meet-sdk-samples copied to clipboard

nothing happen when we click on end/cancel call

Open mubashiralisiddiqui opened this issue 1 year ago • 15 comments

after we connect to the meeting url when we click on red button of end call nothing happen in react native android but in ios it works and get back to the join meeting page but on that page also close meeting option do nothing ios issue jitsi ios

android issue jitsiandroid2

here is my usage of code ` const Meeting = props => { const {route} = props; const jitsiMeetingRef = useRef(null); const navigation = useNavigation(); const backHandler = useRef(null);

useEffect(() => { if (Platform.OS === 'android') { backHandler.current = BackHandler.addEventListener( 'hardwareBackPress', () => { onClose(); return true; }, ); }

return () => {
  // Clean up the event listener
  if (Platform.OS === 'android') {
    backHandler.current.remove();
  }
};

}, []); const urlObject = new URL(route?.params?.jitsiUrl); const onClose = () => { console.log("close67890987y") navigation.goBack(); navigation.navigate('myBooking'); }; const onConferenceTerminated = nativeEvent => { console.log('Jitsi Terminated'); // JitsiMeet.endCall(); onClose(); }; // Get the value of the 'jwt' parameter from the URL search parameters const jitsiUrl = route?.params?.jitsiUrl; const jwt = jitsiUrl.split('?jwt=')[1]; const room = route?.params?.user || 'room'; return ( <JitsiMeeting // eventListeners={eventListeners} ref={jitsiMeetingRef} onConferenceTerminated={onConferenceTerminated} style={{flex: 1}} room={room} serverURL={route?.params?.jitsiUrl || 'https://meet.jit.si/'} token={jwt || ''} /> ); };

`

mubashiralisiddiqui avatar Feb 05 '24 09:02 mubashiralisiddiqui

Make sure you add a listener for onReadyToClose: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-react-native-sdk#eventlisteners onConferenceTerminated is not a reliable way to decide to dispose the component.

saghul avatar Feb 05 '24 09:02 saghul

@saghul Thanks event listner worked for me for android but for ios onReadyToclose not triggered so I need solution for ios now

mubashiralisiddiqui avatar Feb 05 '24 13:02 mubashiralisiddiqui

In which case are you not getting it?

saghul avatar Feb 05 '24 14:02 saghul

when I press on cancel call button the red button then onReadyToClose not triggered nothing happen same code working for android @saghul

mubashiralisiddiqui avatar Feb 05 '24 14:02 mubashiralisiddiqui

when I click on cancel call it takes me out to join room page and nothing happen and the listnere didn't called

mubashiralisiddiqui avatar Feb 05 '24 14:02 mubashiralisiddiqui

Which cancel, the Close one on the pre-join screen? Does the same happen on the sample app?

saghul avatar Feb 05 '24 14:02 saghul

after I leave the meeting by cancel on red button press it takes me to pre-join screen and then nothing happen and yes I can reproduce same on example app

mubashiralisiddiqui avatar Feb 05 '24 15:02 mubashiralisiddiqui

the issue is onReadyToclose is not triggering on ios

mubashiralisiddiqui avatar Feb 05 '24 15:02 mubashiralisiddiqui

@Calinteodor PTAL and see if you can repro.

saghul avatar Feb 05 '24 15:02 saghul

https://github.com/jitsi/jitsi-meet-sdk-samples/assets/26413496/03b78646-d647-4266-a093-b774953f11e9

Using the sample app on iOS and onReadyToClose works as expected. Same for Android. Issue is not reproducible.

Calinteodor avatar Feb 05 '24 17:02 Calinteodor

https://github.com/jitsi/jitsi-meet-sdk-samples/assets/16689214/9a50d369-5f4b-428a-89d6-3ba7a96d9c48

mubashiralisiddiqui avatar Feb 06 '24 06:02 mubashiralisiddiqui

I am using the sample app project for my app I transfer all my code into sample app project and the code I used for Meeting component is exactly the same as in sample project

mubashiralisiddiqui avatar Feb 06 '24 06:02 mubashiralisiddiqui

@saghul @Calinteodor I noticed now that its working fine on ios 17.0.1 simulator but not with ios 17.2 can you check if its related to specific ios version I checked on iphone14 simulator and it work well

mubashiralisiddiqui avatar Feb 06 '24 06:02 mubashiralisiddiqui

Simulators can be unreliable.

Since they don't even emulate a camera I'd recommend you test in real hardware.

saghul avatar Feb 06 '24 07:02 saghul

Please don't hijack issues. Open a new one and provide logs.

saghul avatar Aug 08 '24 09:08 saghul