saibotma / jitsi_meet_wrapper

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

Embed Jitsi as a PlatformView #36

Open geiszla opened 2 years ago

geiszla commented 2 years ago

As the original Jitsi Flutter plugin doesn't support embedding it into a Flutter view, we created a fork that could do that (we needed to put our buttons on the call). We forked that from https://github.com/gunschu/jitsi_meet, but as that plugin is not maintained anymore, I wanted to suggest to merge that feature in this plugin instead (it would also be easier for us to maintain the project if it was included in this one). Would people be interested in doing this?

saibotma commented 2 years ago

Yeah, sounds interesting. Can you share the fork with us so that we can take a look?

geiszla commented 2 years ago

Sure it's at https://github.com/BindrUK/jitsi_meet/tree/platform-view (notice the branch name, it's on platform-view, not master yet).

It's a bit of a Frankenstein at the moment, because many issues with wrapping the native view we could only solve by using the native Java files from the Jitsi React Native repo (the iOS part is much simpler, it's just a wrap of JitsiMeetView instance in a FlutterPlatformView). We are in the process of cleaning it up (maybe directly reference the files from the React Native repo as a submodule, so we don't need to copy them, etc.), however, we are already using it in production and so far ~the only issues we experienced are sometimes in some cases Jitsi prematurely closes the connection. That, however, looks more related to https://github.com/jitsi/jitsi-meet/issues/11012 than an issue with the platform view (and theoretically should be fixed by updating the Jitsi SDK).~ This was a bug from our side independent of the native view and now fixed in our app.

There is also an issue with platform view on Flutter v3 (the video feeds are "coming out" of the view and overlap Flutter elements), however that is a known issue, which should be fixed by the Flutter team soon: https://github.com/flutter/flutter/issues/103630

Let me know if this makes sense and how to proceed.

saibotma commented 2 years ago

I will take a look asap.

Delphinium-projects commented 2 years ago

I will take a look asap.

Hi, did you get any chance to do this ?

saibotma commented 2 years ago

@geiszla Would you mind sharing some screenshots of an example app that shows the platform view in use?

geiszla commented 2 years ago

Sure, here's a recording. You can also try our app for free from the play store (https://play.google.com/store/apps/details?id=com.bindr.app)

https://user-images.githubusercontent.com/4456689/177109176-18b18db5-3e96-41e0-8dc3-6f448dbc2ac5.mp4

We are using it as a full-screen native view, but it can be changed to any size and used on any part of the page. We have some buttons on it, which also showcases how to overlay elements on it.

duc1205 commented 2 years ago

I will take a look asap. have you finished it yet?

saibotma commented 1 year ago

I am sorry, but I won't be able to take a look at this in the near future. Feel free to create a PR, though, because this is actually really awesome.