[meet] [iframe API] Problem with events initializing external_api from a main window into a new window

Hi I want to initialize a Jitsi call in a new window.
So, to avoid having a secondary app for the second window, just secondary window for call, I tried something like:

const callWindow = window.open( ... );
const myDiv = document.createElement('div');
api = new JitsiMeetExternalAPI( .... parentNode:myDiv );

This apparently works well, call is initialized etc.; the problem comes when trying to listen for events.
for example api.addEventListener('videoConferenceJoined', ()=>console.log('joined'))
Listeners don’t work, and seems related with the way I’m invoking Jitsi, in new window.

Do you know if this could be a bug candidate? Or maybe you recommend to just create a second app for the second window instead of trying to have full control from the main window and main app? If so, why?

What I find is that, if second window has the <script> with JitsiMeetExternalApi, it works well invoking from main window/app.

Please, How did you solve it?

To workaround, I just initialized Jitsi api in the child window instead of the main window.

1 Like