react native jitsi meet wrapper make my app clash

688 views Asked by At

Problem:

In my react native application I am using jitsi react-native wrapper. My code looks like this.

import React, {Component, useEffect} from 'react';
import JitsiMeet, {JitsiMeetView} from 'react-native-jitsi-meet';

const JitsiVideo = () => {
  useEffect(() => {
    setTimeout(() => {
      const url = 'https://meet.jit.si/MagneticNichesBlameTruly';
      const userInfo = {
        displayName: 'Tharaka',
        email: '[email protected]',
        avatar: 'https:/gravatar.com/avatar/abc123',
      };
      JitsiMeet.call(url);
      /* Você também pode usar o JitsiMeet.audioCall (url) para chamadas apenas de áudio */
      /* Você pode terminar programaticamente a chamada com JitsiMeet.endCall () */
    }, 1000);
  }, []);

  useEffect(() => {
    return () => {
      JitsiMeet.endCall();
    };
  });

  function onConferenceTerminated(nativeEvent) {
    /* Conference terminated event */
    console.log(nativeEvent);
  }

  function onConferenceJoined(nativeEvent) {
    /* Conference joined event */
    console.log(nativeEvent);
  }

  function onConferenceWillJoin(nativeEvent) {
    /* Conference will join event */
    console.log(nativeEvent);
  }
  return (
    <JitsiMeetView
      onConferenceTerminated={(e) => onConferenceTerminated(e)}
      onConferenceJoined={(e) => onConferenceJoined(e)}
      onConferenceWillJoin={(e) => onConferenceWillJoin(e)}
      style={{
        flex: 1,
        height: '100%',
        width: '100%',
      }}
    />
  );
};

export default JitsiVideo;

I am navigating to this component when the user clicks on a button. when navigating to this component it is showing a black background and when this code is executed JitsiMeet.call(url); it is closing my app without showing any error. I tried a lot to find out a solution for this one but I was unable to do so. If someone can help me out with this one it is really great. Thank you

1

There are 1 answers

0
Pravin Ghorle On

While setting up with respect to the documentation of react-native-jitsi-meet we have to do some changes in MainApplication.java file, there we rename the app.bundle

Check the following link l https://stackoverflow.com/a/69160383/5681567