How to detect when the last participant leaves the meeting?

I want to execute some code, only once the last person of a meeting leaves.
Is there a function or an event for this? I’m using the iFrame API. I’m sure there’s an event or function for this but I couldn’t find it in the list, in the handbook.
Thank you.

That is not possible through the iframe API as the one running it maybe not the last one to disconnect … You can detect though that you are alone in the meeting and disconnect then … Though it may happen that just before disconnecting someone joined … but will be the closest thing you can do through iframe.

When you say “you”, do you mean the host?

Yep, the one running the iframe API, a participant of the meeting.

Hmm. Okay, I don’t think that would be a fool proof plan for what I’m looking for, but thank you for this :slight_smile:

Actually, this might work, when the Host leaves the meeting it will end. Thank you again.