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

[FEATURE]: Embed JitsiMeet within a PlatformView to enable Custom Layouts #79

Closed
kleeb opened this issue Jul 30, 2020 · 20 comments
Closed
Labels
backlog Added to the backlog enhancement New feature or request help wanted Extra attention is needed wontfix This will not be worked on

Comments

@kleeb
Copy link
Contributor

kleeb commented Jul 30, 2020

Currently when joininig or creating a room, the fullscreen view is opened on top of the app.
Is it possible to allow for some flutter widget interaction, to give small example - show some footer with Flutter button that would open a modal.

@tuantvu tuantvu added enhancement New feature or request help wanted Extra attention is needed labels Sep 7, 2020
@tuantvu
Copy link
Collaborator

tuantvu commented Sep 7, 2020

I believe some one was hoping to put the jitsi views within a PlatformView, that would be cool, though I haven't heard how successful that was. That would be a cool pull requests, but I think it needs a lot of testing with multiple layouts.

@abnerh69
Copy link

Hi, is there some progress on using this package inside another widget (lets say PlatformView)?

@kleeb
Copy link
Contributor Author

kleeb commented Dec 16, 2020

I guess noone is working on it. Hell of a task!

This was referenced Apr 2, 2021
@tuantvu tuantvu changed the title Display widget on top of meeting [FEATURE]: Embed JitsiMeet within a PlatformView to enable Custom Layouts Apr 2, 2021
@tuantvu tuantvu pinned this issue Apr 4, 2021
@stale
Copy link

stale bot commented May 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 2, 2021
@wvffle
Copy link

wvffle commented May 2, 2021

I don't think that a pinned issue should be stale

@stale stale bot removed the wontfix This will not be worked on label May 2, 2021
@tuantvu tuantvu added the backlog Added to the backlog label May 2, 2021
@stale
Copy link

stale bot commented Jun 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 1, 2021
@tuantvu
Copy link
Collaborator

tuantvu commented Jun 1, 2021 via email

@stale stale bot removed the wontfix This will not be worked on label Jun 1, 2021
@stale
Copy link

stale bot commented Jul 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 1, 2021
@tuantvu
Copy link
Collaborator

tuantvu commented Jul 1, 2021 via email

@stale stale bot removed the wontfix This will not be worked on label Jul 1, 2021
@ShreshtaRupa
Copy link

I hope we get a customisable UI for Flutter

@stale
Copy link

stale bot commented Aug 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 7, 2021
@tuantvu
Copy link
Collaborator

tuantvu commented Aug 7, 2021 via email

@stale stale bot removed the wontfix This will not be worked on label Aug 7, 2021
@stale
Copy link

stale bot commented Sep 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 6, 2021
@stale stale bot closed this as completed Sep 13, 2021
@deepak-gehlot
Copy link

I have used platform view in my app, and performance is Good.

@kleeb
Copy link
Contributor Author

kleeb commented Oct 8, 2021

I have used platform view in my app, and performance is Good.

can you share some code snippet ?

@deepak-gehlot
Copy link

`import JitsiMeetSDK
import Flutter
import UIKit

class FLNativeViewFactory: NSObject, FlutterPlatformViewFactory {
private var messenger: FlutterBinaryMessenger

init(messenger: FlutterBinaryMessenger) {
    self.messenger = messenger
    super.init()
}

func create(
    withFrame frame: CGRect,
    viewIdentifier viewId: Int64,
    arguments args: Any?
) -> FlutterPlatformView {
    return FLNativeView(
        frame: frame,
        viewIdentifier: viewId,
        arguments: args,
        binaryMessenger: messenger)
}

}

class FLNativeView: NSObject, FlutterPlatformView {
private var _view: UIView
var jitsiMeetView: JitsiMeetView?

let viewId: Int64
 let messenger: FlutterBinaryMessenger
 let channel: FlutterMethodChannel

init(
    frame: CGRect,
    viewIdentifier viewId: Int64,
    arguments args: Any?,
    binaryMessenger messenger: FlutterBinaryMessenger?
) {
    self.messenger = messenger
      self.viewId = viewId
    
    _view = UIView()
    super.init()
    // iOS views can be created here
    createNativeView(view: _view)
    
    let channel = FlutterMethodChannel(name: "JitsiView/\(Id)",
                                          binaryMessenger: messenger)
    
       channel.setMethodCallHandler({ (call: FlutterMethodCall, result: FlutterResult) -> Void in
         switch call.method {
         case "receiveFromFlutter":
          guard let args = call.arguments as? [String: Any],
            let text = args["text"] as? String, else {
            result(FlutterError(code: "-1", message: "Error"))
            return
          }
           self.magicView.receiveFromFlutter(text)
           result("receiveFromFlutter success")
         default:
             result(FlutterMethodNotImplemented)
         }
       })
}

public func sendFromNative(_ text: String) {
    channel.invokeMethod("sendFromNative", arguments: text)
  }

func view() -> UIView {
    return _view
}

func createNativeView(view _view: UIView){
    _view.backgroundColor = UIColor.blue
    
    // create and configure jitsimeet view
            let jitsiMeetView = JitsiMeetView()
      //      jitsiMeetView.delegate = self
            self.jitsiMeetView = jitsiMeetView
            let options = JitsiMeetConferenceOptions.fromBuilder { (builder) in
                // for JaaS use <tenant>/<roomName> format
                builder.room = "worty43543"
                builder.serverURL = URL(string: "https://meet.jit.si")
               // builder.setFeatureFlag("toolbox.enabled", withBoolean: true)
                            //builder.setFeatureFlag("filmstrip.enabled", withBoolean: true)
                builder.setFeatureFlag("call-integration.enabled", withBoolean: false)
                // Settings for audio and video
                 builder.audioMuted = true;
                 builder.videoMuted = true;
            }
    self.jitsiMeetView?.frame = CGRect(x: 0, y: 0, width: 380, height: 450)
    
    jitsiMeetView.delegate = self
    
    // join room and display jitsi-call
    jitsiMeetView.join(options)
    
    _view.addSubview(jitsiMeetView)
}

fileprivate func cleanUp() {
        if(jitsiMeetView != nil) {
            dismiss(animated: true, completion: nil)
            jitsiMeetView = nil
        }
    }

}

extension FLNativeView: JitsiMeetViewDelegate {
func conferenceTerminated(_ data: [AnyHashable : Any]!) {
cleanUp()
}
func chatMessaageReceived(_ data: [AnyHashable : Any]!) {
sendFromNative(data["message"])
}
}`

@swarupbc
Copy link

Hi @deepak-gehlot can you please share an example project or something? It will help me a lot, thanks.

@Bilalsk
Copy link

Bilalsk commented Nov 2, 2022

Not stale

@tanthokg
Copy link

Hello @deepak-gehlot could you share your example project, please? It will help me a great deal, I've been stucked here for weeks. Thank you so much!

@zeckem19
Copy link

+1 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Added to the backlog enhancement New feature or request help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

10 participants