Hello,
I’m trying to implement the docking/undocking feature in my application based on the event ‘iframeDockStateChanged’.
Is there some documentation on how to do that ?
On my own, I did the following:
api.addListener("iframeDockStateChanged", (state) => {
if(!state.docked) {
this.win = window.open(`about:config?width=${640}&height=${480}&?ontop`, 'newWindow', `height=600, width=800, popup=yes, scrollbars=auto, resizable=no, location=no, status=no`);
this.win.document.open();
this.win.document.write("<!DOCTYPE html><html style='overflow:hidden;height: 100%; width: 100%;margin: 0'><head></head><body id='container' style='height: 100%; width: 100%;margin: 0'></body></html>");
this.win.document.querySelector('#container').appendChild(api.getIFrame());
this.win.document.close();
this.win.onload = () => {
console.log("loaded");
}
this.win.onbeforeunload = () => {
console.log("unloaded");
// reconnect
api = new window["JitsiMeetExternalAPI"](domain, options)
}
}
});
When the external window is opened, the internal Iframe instance is disposed. And when the external window is closed, I reinstantiate the IFrame.
Is there a way to avoid being disconnected when transferring the IFrame?
Thanks in advance