Lock / Unlock Room
Moderator may lock the Room forbidding any new person from joining the Session. To allow subsequent users to join the session, Moderator needs to unlock the Room.
To set the room into Lock State, you use window.EnxRtc.lockRoom()
method; and to unlock the Room you use window.EnxRtc.unLockRoom()
method.
Methods:
-
lockRoom()
– To lock Room -
unLockRoom()
– To unlock Room
Event Listeners:
onAckLockRoom:
To acknowledge moderator that the Room has been lockedonLockedRoom:
To notify all participants that the room has been lockedonAckUnLockRoom:
To acknowledge moderator that the Room has been unlockedonUnLockedRoom:
To notify all participants that the room has been unlocked
// To lock Room window.EnxRtc.lockRoom(); // Add Event Listeners // Moderator is acknowledged that room has been locked. window.EnxRtc.addEventListner("onAckLockRoom", function (data) { console.log(JSON.stringify(data.data)); }); // Participants are notified that room has been locked. window.EnxRtc.addEventListner("onLockedRoom", function (data) { console.log(JSON.stringify(data.data)); }); // TO unlock Room window.EnxRtc.unLockRoom(); // Add Event Listeners // Moderator is acknowledged that room has been unlocked. window.EnxRtc.addEventListner("onAckUnLockRoom", function (data) { console.log(JSON.stringify(data.data)); }); // Participants are notified that room has been unlocked. window.EnxRtc.addEventListner("onUnLockedRoom", console.log(JSON.stringify(data.data)); });