Table of Contents

Lock / Unlock Room

Moderator may lock the Room forbidding any new person from joining the Session. To allow subsequent users to join session, Moderator need to unlock the Room.

To put room into Lock State, you use lockRoom() method; and to unlock the Room you use unLockRoom() method.

Methods:

  • static Future<void> lockRoom() – To lock Room
  • static Future<void> unLockRoom()  – To unlock Room

Event Listeners:

  • onAckLockRoom: To acknowledge moderator that the Room has been locked
  • onLockedRoom: To notify all participants that the room has been locked
  • onAckUnLockRoom: To acknowledge moderator that the Room has been unlocked
  • onUnLockedRoom: To notify all participants that the room has been unlocked
EnxRtc.lockRoom();	// To lock room
EnxRtc.unLockRoom();	// To unlock room

EnxRtc.onAckUnLockRoom = (Map<dynamic, dynamic> map) {
	// Moderator is acknowledged that room has been locked 
};

EnxRtc.onLockedRoom = (Map<dynamic, dynamic> map) {
	// Participants are notified that room has been locked
};
 
EnxRtc.onAckUnLockRoom = (Map<dynamic, dynamic> map) {
      // Moderator is acknowledged that room has been unlocked 
};

EnxRtc.onUnLockedRoom = (Map<dynamic, dynamic> map) {
	// Participants are notified that room has been unlocked
};

Moderate Participants’ entry to a Session

In a knock-enabled Room, a user needs to wait until the Moderator grants them permission to join the Session. The approveAwaitedUser() method allows the Moderator to approve a user’s entry and denyAwaitedUser() method is used to decline a user’s entry to the Session.

Methods:

  • static Future<void> approveAwaitedUser(String clientId)
  • static Future<void> denyAwaitedUser(String clientId)

Parameter:

  • clientId: Client ID of the user awaiting the Moderator’s approval.

Event Notifications:

  • onUserAwaited – Notification to the Moderator when a user awaits their permission to join Room.
  • onRoomAwaited – Notification to the user when they await Moderator’s permission to join Room with { “event_type”: “knock” } in the JSON Payload.
  • onAckForApproveAwaitedUser – Acknowledgment to the Moderator when the user is granted permission to join Room.
  • onRoomConnected – Notification to the user when the user is permitted to join Room.
  • onAckForDenyAwaitedUser – Acknowledgment to the Moderator when the user is denied permission to join Room.
  • onRoomDisconnected – Notification to the user along with a reason for denial when the user is denied access to the Room.
EnxRtc.approveAwaitedUser(clientId);     // method allows the Moderator to approve a user’s entry
EnxRtc.denyAwaitedUser(clientId);     // method is used to decline a user’s entry to the Session

EnxRtc.onAckForApproveAwaitedUser=(Map<dynamic,dynamic> map){
 
};
EnxRtc.onAckForDenyAwaitedUser=(Map<dynamic,dynamic> map){

};
EnxRtc.onRoomAwaited=(Map<dynamic,dynamic> map){

};
EnxRtc.onUserAwaited=(Map<dynamic,dynamic> map){

};