From a conceptual perspective, the Vidyo.io API is intended to manage the local connection to the platform and not to manage conferences (like an admin API), hence there is no way to control conferences by interfering on other users.
I see two ways of doing what you want:
- In the frontend: whenever there is a change in the list of
participants check if it is the case to disconnect other users (the admin
user left or you are the only one left in the room). If so, disconnect
yourself.
- In the backend (the most reliable way): use your server to monitor
the conference rooms. Whenever there is a situation where you want to end the
call, the server will disconnect everyone by sending them commands to
disconnect themselves.
Hope this helps.