Events
With events you can subscribe to various things which are happening inside the room.
For example you may want to hide the iframe when user leaves the meeting -> then you will subscribe to the userLeft event. For the full list of events please have a look at the navigation bar on the left.
You will subscribe to an event with the on() method and unsubscribe with the off() method. There is also the once() method for subscription, but it's only a one-time subscription and is used rarely in general. The events architecture is built upon the commonly used EventEmitter interface.
Templates for subscription/unsubscription:
There is a special event named '*', which can be useful for debugging purposes to see all incoming events and their data.
sambaFrame.on('*', (event) => {
console.log(event);
});
Last updated