Setting up event listener for "close ad" button Ⓧ (basic Jisti Meet iframe implementation)

Hi all :wave:

I am using the basic iframe implementation of Jitsi Meet to enable my users to jump on a Jitsi video conference within my web app. It’s super simple, it works great, I love it, my users love it, and at this point I’d rather not embark on API integration and/or self-hosting since this is just for an MVP (not meant to be used on mobile devices).

<iframe allow = "camera; microphone; fullscreen; display-capture" src = "" style = "height: 100%; width: 100%; border: 0px;"> </iframe>

As this is the free version of Jitsi Meet, there is an advertisement when you hang up. I don’t really have a problem with that, my users don’t really have a problem with that either, and I think it’s totally fair. What I’m trying to do is use the “CLOSE” button Ⓧ of the advertisement to trigger an action in my app (display something else, navigate elsewhere, etc.), otherwise my users are stuck on that screen.

At the moment clicking on that button doesn’t do anything, so I imagine it’s just to use it however we want (?).

I guess I need to use an event listener, but I’m not sure what the name of the event is, or how to include the event listener in my code.

I read in this other thread that there’s an event called ReadyToClose, but I think it is triggered when you hang up (or 15 seconds later in the free version with the ad, if I understood correctly,) not when you click on the “CLOSE” button Ⓧ of the ad screen, which is the one I’m interested in.

Would someone be able to point me to the right event name to use, and how to set up the event listener in/with my iframe?


I’m just answering to say that yes readyToClose is not for the close button of the ad screen.

About iframe and event listener, you could get the DOM element of that close button by doing a api.iframe.querySelector('the_selector_of_that_close_button)` which I think will work.

Then, you could use something like a postMessage to communicate with your top domain?

i hope it help you a little

1 Like