You can use a timer to automatically end the meeting after a specified duration. This can be achieved by setting a countdown timer when the meeting starts and programmatically ending the meeting once the timer expires.
The Zoom Web SDK provides event listeners that can capture different meeting statuses. You can utilize these listeners to detect when the host ends the meeting or when an attendee leaves. These events can then trigger corresponding functions to handle the required actions.