React-Native-Jitsi-Meet endCall function

Hello there,

im making an mobile app with react-native-jitsi-meet library and i use my own jitsi server. i want to close conferences with buttons but i cant able to that because endCall() function is not working manually. its not close or finish conferences.

when i use endCall() function like this;

componentDidMount() {
  setTimeout(() => {
      JitsiMeet.endCall();
    }, 1000);
}

its working but when I assign this function to phone back button and phone home button, it doesnt end conference.

  handleBackButton() {
    JitsiMeet.endCall();
    setTimeout(() => {
      this.props.navigation.navigate('Login');
    }, 100);
  }

what will i do for this problem?
How to solve this problem and how to finish conferences manually?

We are not the maintainers of that library. Please the author.