jitsi / jitsi-meet-sdk-samples

Jitsi Meet mobile SDK examples (Android, iOS and React Native)
Apache License 2.0
283 stars 240 forks source link

[IOS] Callkit hangup button not trigger event onReadyToClose #213

Closed Poovit-B closed 11 months ago

Poovit-B commented 11 months ago

Issue with Jitsi Meeting Integration

When initiating Jitsi with the feature flag call-integration.enabled = true on iOS, I encounter the following challenges:

1.After starting a call, when using CallKit, the microphone appears to be working fine. However, upon pressing the hangup button, it's unclear how to detect and handle the hangup event. How can I determine when the user presses the hangup button, and what callback or method should be utilized to handle this event effectively?

2.Despite using the JitsiMeetingRef and attempting to close the meeting using jitsiMeetingRef.current.close() or the leave meeting button, the call is not ending as expected. What would be the correct approach or command to effectively hang up the call and close the meeting using the provided Jitsi React Native SDK?

Here's a snippet of the relevant code from my implementation:

<JitsiMeeting
            ref={jitsiMeetingRef}
            userInfo={configJitsi?.userInfo}
            config={{
              startWithVideoMuted: videoMuted,
              startWithAudioMuted: audioMuted,
            }}
            flags={defaultMeetFeatureFlags}
            eventListeners={{
              onAudioMutedChanged: onAudioMutedChanged,
              onVideoMutedChanged: onVideoMutedChanged,
              onConferenceBlurred: onConferenceBlurred,
              onConferenceFocused: onConferenceFocused,
              onConferenceJoined: onConferenceJoined,
              onConferenceWillJoin: onConferenceWillJoin,
              onConferenceLeft: onConferenceLeft,
              onEnterPictureInPicture: onEnterPictureInPicture,
              onParticipantJoined: onParticipantJoined,
              onReadyToClose: onReadyToClose,
            }}
            room={configJitsi?.vdo_setting?.room_id}
            serverURL={configJitsi?.url}
            style={{
              flex: 1,
              height: '100%',
              width: '100%',
              backgroundColor: 'black',
            }}
          />

Additional Information:

React Native Version: 0.72.7 @jitsi/react-native-sdk Version: 1.0.3 @react-native-google-signin/google-signin Version: 10.1.1 react-native-webrtc Version: 118.0.0

Any guidance or insights on resolving these issues would be greatly appreciated. Thank you!

saghul commented 11 months ago

@react-native-google-signin/google-signin Version: 10.1.1 react-native-webrtc Version: 118.0.0

Did you bump these versions yourself?

How can I determine when the user presses the hangup button, and what callback or method should be utilized to handle this event effectively?

THis should be automatically handled and readyToClose should fire. If you are not observing this, that's a bug.

the call is not ending as expected.

What happens?

Poovit-B commented 11 months ago

@saghul Thank you for response

After a bit of troubleshooting, I discovered that the issue was with my serverURL. I had mistakenly set it to "https://imeet-demo.app/123124" instead of the correct "https://imeet-demo.app/". Once I corrected this, everything started working seamlessly.