this-fifo/jutsu

Adding ReadyToClose callback

monomy001 opened this issue · 1 comments

Hi FIFO,

First off, great work! on simplifying Jitsi Meet API..
Question.. how do you add a callback to detect if the video conference is finished, ie : hang up.
Also is there any way to disable the annoying "chrome plugin not installed" popup? (and the thank you for using jitsi, at the end of conference?)
Thanks in advance.

Hey @Tansah , if you want to listen for the readyToClose event you can use the hook option to create a new instance of the jitsi api and then add that event listener, something like:

import { useJitsi } from 'react-jutsu'

const jitsi = useJitsi({ roomName, parentNode })
jitsi.addEventListener('readyToClose', readyToCloseHandler)

The <Jutsu /> component option doesn't expose the api as it was intended to just be a simple quick setup with little configuration for basic scenarios

For disabling the chrome popup and thank you page you can try adding an interfaceConfig flag from here
https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js

Looks like they have options such as SHOW_CHROME_EXTENSION_BANNER and SHOW_PROMOTIONAL_CLOSE_PAGE which seems to be what you want, just pass it in on the hook like

const jitsi = useJitsi({ roomName, parentNode, interfaceConfigOverwrite: { SHOW_CHROME_EXTENSION_BANNER: false, SHOW_PROMOTIONAL_CLOSE_PAGE: false } })

Have a nice day!