问题:
在我的react原生应用程序中,我使用的是jitsi react原生包装器。我的代码看起来像这样。
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: 'tharindu@example.com',
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;
当用户单击按钮时,我正在导航到此组件。当导航到此组件时,它显示黑色背景,当执行此代码JitsiMeet.call(url);
时,它将关闭我的应用程序,而不会显示任何错误。我试了很多办法想找到解决这个问题的办法,但都没能找到。如果有人能帮我解决这个问题,那真的很棒。谢谢
在设置react native jitsi meet的文档时,我们必须对MainApplication.java文件进行一些更改,在那里我们将app.bundle重命名为
检查以下链接lhttps://stackoverflow.com/a/69160383/5681567