jitsi / jitsi-meet-flutter-sdk

Jitsi Meet plugin for Flutter
Apache License 2.0
31 stars 25 forks source link

Enable to join Jitsi Meeting (You have been disconnected) #47

Closed Muneeb-U-Rehman closed 2 months ago

Muneeb-U-Rehman commented 2 months ago

I have this method to implement jitsi using Saas in futter:

    void _joinMeeting() {

const appId = 'vpaas-magic-cookie-33e8cdefae0c471f984e28a47b1b424c';
String roomName = '/$appId/FS';
var options = JitsiMeetConferenceOptions(

  serverURL: 'http://8x8.vc',
  room: roomName,

  configOverrides: {
    "startWithAudioMuted": false,
    "startWithVideoMuted": false,
    // "subject" : "Meeting",
  },

  featureFlags: {
    "unsaferoomwarning.enabled": false
  },
);

var listener = JitsiMeetEventListener(
  conferenceJoined: (url) {
    debugPrint("conferenceJoined: url: $url");
  },
  participantJoined: (email, name, role, participantId) {
    debugPrint(
      "participantJoined: email: $email, name: $name, role: $role, participantId: $participantId",
    );
    // You can add your logic here when a participant joins the meeting
  },
  chatMessageReceived: (senderId, message, isPrivate, timestamp) {
    debugPrint(
      "chatMessageReceived: senderId: $senderId, message: $message, isPrivate: $isPrivate, timestamp: $timestamp",
    );
    // Handle chat messages received during the meeting
  },
  readyToClose: () {

  },
);

print('Jitsi Meet-- $options');
jitsiMeet.join(options,listener);

}

But I am getting error you have been disconnected

jitsi

saghul commented 2 months ago

The server URL is incorrect, it's https://8x8.vc

Muneeb-U-Rehman commented 2 months ago

I have correct this. And I have done with it the main issue is token, according to SAAS implementation token is must. Here is new code: void _joinMeeting() {

const appId = 'your app id get form 8x8.vc console';

// Set the room name with the format "<AppID>/<room>"
String roomName = '$appId/FS';
var options = JitsiMeetConferenceOptions(
  serverURL: 'https://8x8.vc',
  room: roomName,
  token: 'eyJraWQiOiJ2cGFhcy1tYWdpYy1jb29raWUtMzNlOGNkZWZhZTBjNDcxZjk4NGUyOGE0N2IxYjQyNGMvY2UzMTVjLVNBTVBMRV9BUFAiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJqaXRzaSIsImlzcyI6ImNoYXQiLCJpYXQiOjE3MDg0OTY3MjgsImV4cCI6MTcwODQ5ODUyOCwibmJmIjoxNzA4NDk2NzIzLCJzdWIiOiJ2cGFhcy1tYWdpYy1jb29raWUtMzNlOGNkZWZhZTBjNDcxZjk4NGUyOGE0N2IxYjQyNGMiLCJjb250ZXh0Ijp7ImZlYXR1cmVzIjp7ImxpdmVzdHJlYW1pbmciOnRydWUsIm91dGJvdW5kLWNhbGwiOnRydWUsInNpcC1vdXRib3VuZC1jYWxsIjpmYWxzZSwidHJhbnNjcmlwdGlvbiI6dHJ1ZSwicmVjb3JkaW5nIjp0cnVlfSwidXNlciI6eyJoaWRkZW4tZnJvbS1yZWNvcmRlciI6ZmFsc2UsIm1vZGVyYXRvciI6dHJ1ZSwibmFtZSI6InNvZml0c29mdHdhcmVzIiwiaWQiOiJnb29nbGUtb2F1dGgyfDEwMTYxMTEwMjc1NTMxNDQwNTk2NCIsImF2YXRhciI6IiIsImVtYWlsIjoic29maXRzb2Z0d2FyZXNAZ21haWwuY29tIn19LCJyb29tIjoiKiJ9.RamYdXfHKKuQRPRH2TanxWi1kLi5VSCKbvR6a-cC0mehUbEvJME4gCm-XckQQnCqBQU--AN8DPu-WSH7Z-zL4ag7a7jBkEVsJqN-zJ4W9oO5NhZ6d91w9aH8i_zuU33kX--ZMVxbwZrkPZ_aabomPuVWMiSpyftKEkQk2L_BxZftlfp47W6i9Yi77-tZx0cSEDDfaw5GnGjnDPGrgB7Q4l0xl19nfJSZxMNzo0hCpbJSUQNHRQiwXuNbW8PM0KcK1hl4e2QEB3uyF_1OigS6tO7P9Z3-xeGtmAYlmVgxZknpxXfkdHXmuJILi0BkkZn3Mfno7znBM0hnxRx71UpMIA',
  configOverrides: {
    "startWithAudioMuted": false,
    "startWithVideoMuted": false,
    // "subject" : "Meeting",
  },

  featureFlags: {
    "unsaferoomwarning.enabled": false
  },
);

var listener = JitsiMeetEventListener(
  conferenceJoined: (url) {
    debugPrint("conferenceJoined: url: $url");
  },
  participantJoined: (email, name, role, participantId) {
    debugPrint(
      "participantJoined: email: $email, name: $name, role: $role, participantId: $participantId",
    );
    // You can add your logic here when a participant joins the meeting
  },
  chatMessageReceived: (senderId, message, isPrivate, timestamp) {
    debugPrint(
      "chatMessageReceived: senderId: $senderId, message: $message, isPrivate: $isPrivate, timestamp: $timestamp",
    );
    // Handle chat messages received during the meeting
  },
  readyToClose: () {

  },
);

jitsiMeet.join(options,listener);

}

This token also get form 8x8.vc console

saghul commented 2 months ago

@Calinteodor can you PTAL?

Calinteodor commented 2 months ago

Please follow the sample app implementation here: https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/flutter. I am unable to repro your issue. Joining and ending a meeting works as expected.