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

Hlo i am using jitsi meet version 2.1.1 and when i try to connect my meeting url with jwt it is stuck in connecting to meeting.The issue is only in ios but works fine in android #438

Open
Shekhardeuba opened this issue May 18, 2023 · 0 comments

Comments

@Shekhardeuba
Copy link

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

import { Colors } from '../../../Constants';

function Jitsi({ jitsiData, tabIndex }) {
useEffect(() => {
setTimeout(() => {
console.log('jitsiData =>', jitsiData);

  const options = {
    audioMuted: false,
    audioOnly: false,
    videoMuted: false,
    subject: '',
    token: jitsiData.jwt,
  };
  const meetFeatureFlags = {
    addPeopleEnabled: false,
    calendarEnabled: false,
    callIntegrationEnabled: false,
    chatEnabled: false,
    closeCaptionsEnabled: false,
    inviteEnabled: false,
    androidScreenSharingEnabled: false,
    liveStreamingEnabled: false,
    meetingNameEnabled: false,
    meetingPasswordEnabled: false,
    pipEnabled: false,
    kickOutEnabled: false,
    conferenceTimerEnabled: false,
    videoShareButtonEnabled: false,
    recordingEnabled: false,
    reactionsEnabled: false,
    raiseHandEnabled: false,
    tileViewEnabled: true,
    toolboxAlwaysVisible: false,
    toolboxEnabled: true,
    welcomePageEnabled: false,
  };


  const url = jitsiData.meetingUrl + '?jwt=' + jitsiData.jwt;
  console.log(url);

  JitsiMeet.call(
    // jitsiData.meetingUrl ,
    url,
    jitsiData.userInfo,
    options,
    meetFeatureFlags,
  );
}, 1000);

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

}, []);

const [showJitsi, setShowJitsi] = useState(true);

function onConferenceTerminated(nativeEvent) {
/* Conference terminated event */
console.warn('Terminated', nativeEvent);
}

function onConferenceJoined(nativeEvent) {
/* Conference joined event */
console.warn('Joined', nativeEvent);
if (Platform.OS == 'android') {
setShowJitsi(false);
setTimeout(() => {
setShowJitsi(true);
}, 100);
}
}

function onConferenceWillJoin(nativeEvent) {
/* Conference will join event */
console.warn('Will Join', nativeEvent);
}

return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: Colors.black_000000,
}}>
{showJitsi && (
<JitsiMeetView
onConferenceTerminated={onConferenceTerminated}
onConferenceJoined={onConferenceJoined}
onConferenceWillJoin={onConferenceWillJoin}
style={{
// flex: 1,
height: '100%',
width: tabIndex === 0 ? '100%' : '100%',
backgroundColor: Colors.transparent,
}}
/>
)}

);
}

export default Jitsi;

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

1 participant