Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nothing happen when we click on end/cancel call #220

Closed
mubashiralisiddiqui opened this issue Feb 5, 2024 · 16 comments
Closed

nothing happen when we click on end/cancel call #220

mubashiralisiddiqui opened this issue Feb 5, 2024 · 16 comments

Comments

@mubashiralisiddiqui
Copy link

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 || ''}
/>
);
};

`

@saghul
Copy link
Member

saghul commented Feb 5, 2024

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.

@mubashiralisiddiqui
Copy link
Author

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

@saghul
Copy link
Member

saghul commented Feb 5, 2024

In which case are you not getting it?

@mubashiralisiddiqui
Copy link
Author

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

@mubashiralisiddiqui
Copy link
Author

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

@saghul
Copy link
Member

saghul commented Feb 5, 2024

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

@mubashiralisiddiqui
Copy link
Author

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
Copy link
Author

the issue is onReadyToclose is not triggering on ios

@saghul
Copy link
Member

saghul commented Feb 5, 2024

@Calinteodor PTAL and see if you can repro.

@Calinteodor
Copy link
Contributor

Calinteodor commented Feb 5, 2024

360153e3-a192-4397-8ba9-c5a633d0fdf0.mp4

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

@mubashiralisiddiqui
Copy link
Author

Simulator.Screen.Recording.-.iPhone.15.-.2024-02-06.at.11.37.43.mp4

@mubashiralisiddiqui
Copy link
Author

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
Copy link
Author

@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

@saghul
Copy link
Member

saghul commented Feb 6, 2024

Simulators can be unreliable.

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

@saghul
Copy link
Member

saghul commented Aug 8, 2024

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

@mubashiralisiddiqui
Copy link
Author

its working fine now
I was using the url like this
https://mybaseURL/ROOMName?token
then I replace the url to just the base url https://mybaseURL
and the events started working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants