saibotma / jitsi_meet_wrapper

Jitsi Meet Plugin for Flutter. Wrapping JitsiMeetSDK for Android and iOS.
BSD 3-Clause "New" or "Revised" License
27 stars 61 forks source link

Add macOS Support #12

Open jaumard opened 2 years ago

jaumard commented 2 years ago

Should be pretty straight forward as it should be very close to what is done for iOS. Same I'll try to make a PR if you're ok with that :)

jaumard commented 2 years ago

Hum in fact might be harder, just see that jitsi doesn't have a mac SDK at all as they rely on an electron wrapper... bummer but let's keep that open in any case to keep it on the radar

efraespada commented 2 years ago

I've integrated Jitsi by web for desktops: a new window that it's closed automatically when the user ends his session.

@saibotma do you consider it could be a friendly solution for this plugin?

saibotma commented 2 years ago

Sounds very interesting. Do you have any implementation to share? Could be a good candidate for this package.

efraespada commented 2 years ago

Yep, it is simple, with desktop_webview_window:

var room = '$domain/${meet.hash}';
room += '#userInfo.displayName="${user.name}"';
room += '&userInfo.email="${user.email}"';
room += '&config.subject="$subject"';

room = Uri.encodeFull(room);

Webview desktopWebview = await WebviewWindow.create(
  configuration: CreateConfiguration(
    title: subject,
    titleBarHeight: 0,
  ),
);
desktopWebview?.addOnUrlRequestCallback((url) {
  if (!url.contains(meet.hash)) {
    desktopWebview?.close();
  }
});
desktopWebview?.launch(room);

Jitsi is configured by URL parameters and the window is closed when the meet ends (when the redirection is done).

saibotma commented 2 years ago

Wow, this looks good, thanks. Will think about how we can include this into this package.