2

I am using this library (https://github.com/gunschu/jitsi_meet) for jitsi meet, i want to draw a widget over the video screen like a chat button. Can anyone help? https://github.com/gunschu/jitsi_meet/issues/357

2 Answers2

0

As you mentioned that jitsi takes whole screen, your widgets should be placed in following manner and it should work:

Stack(
  children: [
    Jitsi(),
    ChatButton(),
  ],
)

If you keep your widgets like the following, your button will get behind Jitsi:

Stack(
  children: [
    ChatButton(),
    Jitsi(),
  ],
)
Abhishek Doshi
  • 465
  • 2
  • 5
  • Jitsi actually doesnt have a view, its just a function jitsi.joinmeeting() which opens up the video. so need to have a button over it, i tried using the stack approach aswell but doesnt work. – Usama Ahmad Feb 20 '22 at 10:07
0

Stack will not work because when overlaying Flutter widgets on top of HtmlElementView widgets that respond to mouse gestures (handle clicks, for example), the clicks will be consumed by the HtmlElementView, and not relayed to Flutter.

The result is that Flutter widget's onTap (and other) handlers won't fire as expected, but they'll affect the underlying webview.

To fix this you can use : pointer_interceptor

Sample Code :

 Stack(
  children: [
    Jitsi(),
PointerInterceptor(     // wrap your widget inside pointer intercepter
child : ChatButton()),
  ],
)
MANISH
  • 2,883
  • 4
  • 11
  • 30