Readytoclose-event-listener-not-working-from-me-in-iframe

HI,

readytoclose-event-listener-not-working-from-me-in-iframe
My sample code:
api.addEventListener('videoConferenceJoined ', function (event) {
console.log(event);
const numberOfParticipants = api.getNumberOfParticipants();
console.log(“numberOfParticipants:”+numberOfParticipants);
});
Can some one help me on this.
Thanks in Advance