This event is emitted when the meeting is terminated

This event is emitted when the meeting has ended. The meeting could end for various reasons, it could be because the participant duration limit has reached (this value can be set on the meeting room and it specifies the duration for which the participants can be there in a meeting) or the admin has ejected the participant from the meeting or it could be that the roomExpiry has reached and ejectOnExpiry is set to true.

When the meeingEnded event is triggered the meetingState becomes terminated.

meeting.on("meetingEnded", function() {