You can set listeners for the following events on the client side, to enable you to take certain client actions based on the meeting events and state changes.

// When you have connected to the meeting but haven't started producing or consuming content streams
meeting.events.on('meetingJoin', this,  (ev,cont) {

});

// When you have disconnected from the meeting and cannot produce or consume streams without connecting again
meeting.events.on('meetingDisconnected', this, (ev,cont) {

});

// When you have joined the meeting to start producing and consuming content streams
meeting.events.on('meetingConnected', this, (ev,cont) {

});

// When the meeting is ended
meeting.events.on('meetingEnd', this, (ev,cont) {

});


// import 'package:dyte_client/dyteParticipant.dart';
// When a participant joins the meeting
meeting.events.on('participantJoin', this, (ev,cont) {
    DyteParticipant p = ev.eventData as DyteParticipant;

});


// import 'package:dyte_client/dyteParticipant.dart';
// When a participant leaves the meeting
meeting.events.on('participantLeave', this, (ev,cont) {
    DyteParticipant p = ev.eventData as DyteParticipant;
});