I did finish my client side implementation and it works cleanly. Much better that the room.clear() and room.destroy(). I did not need to use the listener. Before I show you how I implemented let me explain what my goal was.
Goal: I wanted to limit my duration of call to a max time and also limit the amount of time we have less than the required number of occupants for a given time. The easiest way to limit was to disconnect every one individually client side.
Implementation: (I will list for someone who is getting mixed up with which code where)
- In /usr/share/jitsi-meet/ create a file myname_conf.js
- In /usr/share/jitsi-meet/index.html add this line … -#include virtual="/myname_conf_q.js" … and also add the myname_conf.js to the var critical files (not sure if this last one needs to be done).
- In myname_conf.js add code to use a timer
var ms = 60000; // this is one minute
var occCount = 0;
var mins = 0;
… add what ever vars you need
min = min +1;
occCount = APP.conference.membersCount; // this is working
// Do whatever you want with the time and members count
// To redirect to home page from here is simple
setTimeout(startCounting, ms); // the function calls itself before exiting
// you should be able to APP.conference.addConferenceListener in this file - i have not tired
timer = setTimeout(startCounting, ms);
- You do not need to restart anything when you do this just go straight to testing after you save the js file.
Hope this helps.