Would you consider a PR to add “endConference” command to IFrame API? It’s not as useful to be able to intercept button clicks if it is not possible to programmatically trigger the underlying action from within the listener.
For the record, these changes have now been merged and available from Jitsi Meet v8072. Thanks @saghul
To summarise the changes:
If End Conference module not enabled or not applicable (e.g. non moderator) then the hangup button in toolbar will behave as usual – it will trigger “hangup” toolbar event.
If End Conference is applicable, then the button in the toolbar will trigger “hangup-menu” toolbar event while the buttons within the resulting menu will trigger “hangup” or “end-meeting” toolbar events.
The hangup and endConference IFrame command can be used to trigger those actions programmatically.