A user connected with EnableX session with “Moderator” role has additional privileges over that of a “Participant” for the session. The Moderator exercises his privileges by executing exclusive methods designed to work from his End Point only, are known as Moderator Controls.

Table of Contents

Record a Session

Using EnableX you may get a RTC session recorded as individual streams and later be transcoded through a post-session service to create a single video file which can be retrieved and re-played using any Video Player. Recording can be started in 2 ways, viz.

Auto-Recording

You may define a room to start recording automatically as and when a session starts in the room. You may pass { settings: { auto_recording: true }} in the JSON Payload while creating a room to ensure a session is recorded automatically.

On-Demand Recording

Client API call helps you start and stop recording as and when needed. The available methods are accessible to Moderator only. Therefore, on the Moderator End-Point, you may require to create UI to use the methods to start or stop recording a session.

To start session recording on demand you may use EnxRoom.startRecord() method, and to stop may use EnxRoom.stopRecord() method. On successful initiation of recording and stopping of recording the moderator will be notified using onStartRecordingEvent and onStopRecordingEvent callbacks; also, all other participant swill be notified using onRoomRecordingO and onRoomRecordingOff Callbacks respectively.

Class: EnxRoom

Methods:

  • public void startRecord() – No parameter needed. To start recording
  • public void stopRecord() – No parameter needed. To stop recording

Observer: public void setRecordingObserver(EnxRecordingObserver-Object)

Callbacks:

  • onStartRecordingEvent – To moderator to notify that recording has started
  • onStopRecordingEvent – To moderaor to notify that recording has stopped
  • onRoomRecordingOn – To all participant to notify recording is on
  • onRoomRecordingOff – To all participant to notify recording is off
// Initiate Recording Observer to receive Callbacks
room.setRecordingObserver(this);

room.startRecord(); // To start recording
room.stopRecord(); // To stop recording

public void onStartRecordingEvent(JSONObject jsonobject){
   // You started recording
}

public void onStopRecordingEvent(JSONObject jsonobject){
   // You stopped recording
}

public void onRoomRecordingOn(JSONObject jsonobject){
   // Recording has started - to all
}  

public void onRoomRecordingOff(JSONObject jsonobject){
   // Recording has stopped - to all
}

Error Codes & Exceptions

CodeDescription
5007Unauthorized Access. When user with participant role uses startRecord()
5008Unauthorized Access. When user with participant role uses stopRecord()
5033Repeated startRecord() call, awaiting confirmation for previous request
5034When moderator retries startRecord() after recording has started by previous request
5035Repeated stopRecord() call, awaiting confirmation for previous request
5036Non-Contextual method call. stopRecord() call without starting to record

Note:

  • Moderator can start/stop recording any number of time during a session as he wishes.
  • Moderator can stop recording in a room defined with auto-recording feature.

Refer: How to fetch Recordings?

Hard Mute / Unmute Room

Moderator may put the room in a hard-mute state when he wishes no-one else to be audible in the Room. Any new user who joins the room when the room is in hard-mute state will also be inaudible

To put room into hard mute state, you may use EnxRoom.muteRoom() method; and to disable you may use EnxRoom.unMuteRoom() method. All participant of the room are notified with   onReceivedMuteRoom and onReceivedUnMuteRoom callbacks; whereas the Moderator is notified with onMutedRoom and onUnMutedRoom callbacks respectively.

Class: EnxRoom

Methods:

  • public void hardMute() – to hard mute room
  • public void hardUnMute() – to hard unmute room

Observer: public void setMuteRoomObserver(EnxMuteRoomObserver-Object)

Callbacks:

  • onReceivedMuteRoom  – To all participants on hard-muting Room
  • onReceivedUnMuteRoom  – To all participants on hard-unmuting Room
  • onMutedRoom  – To notify Moderator that Room is hard-muted
  • onUnMutedRoom – To notify Moderator that Room is hard-unmuted
// Initiate Hard-Mute Observer to receive Callbacks 
room.setMuteRoomObserver(this); 

room.hardMute(); // To hard-mute Room
room.hardUnMute(); // To hard-unmute Room

public void onMutedRoom(JSONObject jsonobject){
 // You hard-muted Room
}

public void onUnMutedRoom(JSONObject jsonobject){
 // You hard-unuted Room
}

public void onReceivedMuteRoom(JSONObject jsonobject){
 // Room is hard-muted - to all
} 

public void onReceivedUnMuteRoom(JSONObject jsonobject){
 // Room is hard-unmuted - to all
}

Error Codes & Exceptions

CodeDescription
5001Unauthorized Access. When a user with participant role uses muteRoom()
5002Unauthorized Access. When a user with participant role uses unMuteRoom()
5037Request to mute Room is in process. When moderator retries muteRoom()
5038Room is in muted state. When moderator uses muteRoom() on a muted Room
5039Room is in unmuted state. When moderator uses unMuteRoom() on a unmuted Room
5040Request to unmute Room is in process. When moderator retries unMuteRoom()

Hard Mute / Unmute Participant

Moderator may enforce hard-mute on any selected participant in the room. The affected participant will not be able to talk or may not be able to publish his video ntil the imposed state is lifted.

Android SDK offers hard muting audio and force dropping the video of selected participant using EnxStream.hardMuteAudio() and EnxStream.hardMuteVideo() methods respectively. You may lift the enforced muting state of Audio or Video using EnxStream.hardUnMuteAudio() and EnxStream.hardUnMuteVideo() methods respectively. The affected participant is notified using related events, viz. onHardMutedAudioonHardUnMutedAudioonHardMutedVideo and onHardUnMutedVide. All participants are notified about the mute status of the affected participant using related events, viz. onReceivedHardMuteAudioonReceivedHardUnMuteAudioonReceivedHardMuteVideo and onReceivedHardUnMuteVideo.

Class: EnxStream

Methods:

  • public void hardMuteAudio(String clientId) – to hard mute audio
  • public void hardMuteVideo(String clientId) – to hard mute video
  • public void hardUnMuteAudio(String clientId) – to hard unmute audio
  • public void hardUnMuteVideo(String clientId) – to hard unmute video

Callbacks:

  • onHardMutedAudio – To the affected participant to notify about hard-muted audio
  • onHardUnMutedAudio – To the affected participant to notify about hard-unmuted audio
  • onHardMutedVideo – To the affected participant to notify about hard-muted video
  • onHardUnMutedVideo – To the affected participant to notify about hard-unmuted video
  • onReceivedHardMuteAudio – To all participants to notify about user’s hard-muted audio
  • onReceivedHardUnMuteAudio – To all participants to notify about user’s hard-unmuted audio
  • onReceivedHardMuteVideo – To all participants to notify about user’s hard-muted video
  • onReceivedHardUnMuteVideo – To all participants to notify about user’s hard-unmuted vdeo
stream.hardMuteAudio(clientId); // To hard-mute user
stream.hardUnMuteAudio(clientId); // To hard-unmute user

public void onHardMutedAudio(JSONObject jsonobject){
 // Your audio is hard-muted
}

public void onHardUnMutedAudio(JSONObject jsonobject){
 // Your audio is hard-unmuted
}

public void onReceivedHardUnMuteAudio(JSONObject jsonObject){
 // A User's audio is hardmuted - to all
} 

public void onReceivedHardMuteAudio(JSONObject jsonobject){
 // A User's audio is hardmuted - to all
}

// Video Hard-Mute/Hard-Unmute will used in the same way as Audio.  

Error Codes & Exceptions

CodeDescription
5009Unauthorized Access. When a user with participant role uses hardMuteAudio()
5010Unauthorized Access. When a user with participant role uses hardUnMuteAudio()
5011Unauthorized Access. When a user with participant role uses hardMuteVideo()
5012Unauthorized Access. When a user with participant role uses hardUnMuteVideo()

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 EnxRoom.lockRoom() method; and to unlock the Room you use EnxRoom.unLockRoom() method.

ClassEnxRoom

Methods:

  • public void lockRoom()  – To lock Room
  • public void unLockRoom()  – To unlock Room

Callbacks:

  • 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
room.lockRoom();

// Moderator is acknowledged that room has been locked 
public void onAckLockRoom(JSONObject jsonObject) {
	// Handle JSONObject
}

// Participants are notified that room has been locked
public void onLockedRoom(JSONObject jsonObject) {
	// Handle JSONObject
}

room.unLockRoom();

// Moderator is acknowledged that room has been locked 
public void onAckUnLockRoom(JSONObject jsonObject) {
	// Handle JSONObject
}

// Participants are notified that room has been locked
public void onUnLockedRoom(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5115Unauthorized Access. When user with participant role uses lockRoom() or unlockRoom()
5117Room is already locked. When user with moderator role uses lockRoom() on a locked Room
5118Room is already unlocked. When user with moderator role uses unlockRoom() on a unlocked Room

Disconnect User

Moderation may wish to disconnect or force-drop one or more participant(s) from the Session by using EnxRoom.dropUser() method.

Method: public void dropUser(List<String> clientIds)

Parameter:

  • ClientIds: Required. List of CientId to be disconnected.

Callbacks:

  • onAckDropUser: To acknowledge that the user has been disconnected
  • onRoomDisconnected: To notify the effected user that he is disconnected from Room with reason.
room.dropUser(list);

// Moderator is acknowledged that user has been dropped
public void onAckDropUser(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5116Unauthorized Access. When user with participant role uses dropUser()

Destroy Session

Moderation may wish to conclude an ongoing session by using using EnxRoom.destroy() method.

Method: public void destroy()

Callbacks:

  • onAckDestroy To acknowledge that the session has been destroyed
  • onRoomDisconnected:  To notify all users that Session is closed.
room.destroy();

// Moderator is acknowledged that session is destroyed
public void onAckDestroy(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5116Unauthorized Access. When user with participant role uses destroy()

Moderate Participants’ entry to a Session

In a knock-enabled Room, when a participant is connected to a room, he needs to wait until the Moderator grants him access to join the Session. While being awaited, participants will not be able to get remote streams and communicate with others awaited participants or moderators. The Moderator may allow the awaited participants into the room or deny entry.

When a participant is made to wait, the end points gets different callback i.e. onRoomAwaited on getting connected to room with a reason in JSON as { "event_type": "knock" }. Read more…

Methods:

  • public void approveAwaitedUser(String clientId) – To allow participant into the Session.
  • public void denyAwaitedUser(String clientId) – To deny user’s entry to room

Parameters:

  • clientId: For the user who is being allowed or denied entry to session

Callbacks:

  • onUserAwaited– Moderator is notified about a user is awaited to join room
  • onAckForApproveAwaitedUser – Moderator is acknowledged that the awaited user is approved to join the session. Once approved, the approved user will get onRoomConnected Callback.
  • onAckForDenyAwaitedUser – Moderator is acknowledged that the awaited user is denied entry to the session. Once denied, the denied user will get onRoomDisconnected Callback with reason.
// Moderator is notified about awaited user
public void onUserAwaited(JSONObject jsonObject)  {
	// Awaited Client Info in the jsonObject, e.g.
	// {"id","String", "name": "String”} 
	
	enxRoom.approveAwaitedUser(jsonObject.id);  // To allow

	enxRoom.denyAwaitedUser(jsonObject.id); // To deny
	 
};

public void onAckForApproveAwaitedUser(JSONObject jsonObject) {
	// User has been allowed entry	
}

public void onAckForDenyAwaitedUser(JSONObject jsonObject) {
	// User has been denied entry	
}

To manage awaited users when moderator joins late

If moderator joins later than all the participants in a Knock-enabled Room, then his end-point needs to handle all the waiting participants to allow or deny entry to  the room individually or collectively. To do this, you need to get a list of participants who are waiting for access to the Room using  room.awaitedParticipants. You may need to build UI to allow or deny participant to join Room.

// e.g. room.awaitedParticipants

[
	{	"clientId”: "String", 
		"name": "String" 
	}
]

Floor Access Control in Lecture Mode

In Lecture Mode, only the Moderator publishes a stream to the room whereas all other participants subscribe to see and listen to the Moderator. If participants have questions to ask during the session, the Moderator can grant the floor to the participant to publish his stream.

The following steps to deploy Control Floor Access by moderator:

Request Floor Access

A participant requests for Floor access is forwarded to the Moderator using a notification event.

Class: EnxRoom

Method: public void requestFloor() – No parameter needed. Participant requests floor access

Observer: public void setChairControlObserver( EnxChairControlObserver-Object )

Callbacks:

  • onFloorRequested  – Requesting Participant received acknowledgement that his request has been received by Moderator
  • onFloorRequestReceived  – The Moderator receives requests from Participant
// Initiate Chair Control Observer to receive Callbacks
room.setChairControlObserver(this);
 
room.requestFloor(); // To request floor access

public void onFloorRequested(JSONObject jsonobject){
 // Your Request is receved by Moderator
}

public void onFloorRequestReceived(JSONObject jsonobject){
 // Moderator receives floor access request
 // JSON has requesting participant information
}

Error Codes & Exceptions

CodeDescription
5003Unauthorized Access. When a user with moderator role uses requestFloor()
5041Repeated requestFloor() call, awaiting acknowledgement of previous request
5042Repeated requestFloor() call after its registered with moderator
5082Non-Contextual method call. Method not available in group mode Room

Cancel Requested Floor Access

A participant may cancel his request for Floor access which is pending at Moderator Side.

ClassEnxRoom

Method: public void cancelFloor() - Participant cancels request floor access

Callbacks

  • onCancelledFloorRequest: Moderator receives cancellation notification for already posted Floor Access Request from Participant
  • onFloorCancelled: Participant receives acknowledgement that his request for Floor Request has been cancelled.
 room.cancelFloor();

// Moderator received cancellationr request 
public void onCancelledFloorRequest(JSONObject jsonObject) {
	// Handle JSONObject
}

// Participants is acknowedged that floor request is cancelled
public void onFloorCancelled(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5003Unauthorized Access. When a user with moderator role uses cancelFloor()
5041Repeated cancelFloor(), awaiting acknowledgement of previous request
5042Repeated cancelFloor() call after its acknowledged
5082Non-Contextual method call. Method not available in group mode Room

Deny Floor Access

The Moderator may also deny a request for floor access to a participant.

ClassEnxRoom

Method: public void denyFloor(String nClientIDk) – Moderator denies floor access to a Participant

Observerpublic void setChairControlObserver( EnxChairControlObserver-Object )

Callbacks:

  • onProcessFloorRequested – Moderator is acknowledged that he denied floor access to a Participant
  • onDeniedFloorRequest – Participant is notified that he has been denied floor access
// Initiate Chair Control Observer to receive Callbacks
room.setChairControlObserver(this); 

room.denyFloor(clientId); // To deny floor access to a clientId

public void onProcessFloorRequested(JSONObject jsonobject){
 // You denied floor access to a Participant
}

public void onDeniedFloorRequest(JSONObject jsonobject){
 // Participant is notified that he is denied Floor Access
}

Error Codes & Exceptions

CodeDescription
5005Unauthorized Access. When a user with participant role uses denyFloor()
5045Invalid Client ID. When denyFloor() is called with Invalid Client ID
5047Repeated denyFloor() call, awaiting acknowledgement of previous request
5048Non-Contextual Method Call. denyFloor() Call after granting Floor Access

Grant Floor Access

Moderator might grant floor access to one or many users one by one. Note that at any given point of time, only one person may be granted floor access. To grant access to others, moderator must release floor access from the participant who is currently granted floor access. Once granted floor access, the designated participant will be notified using an event and he can publish his stream.

Class: EnxRoom

Method: public void grantFloor(String clientID) – moderator grants floor access to participant

Observer: public void setChairControlObserver( EnxChairControlObserver-Object )

Callbacks:

  • onProcessFloorRequested – Moderator is acknowledged that Participant is granted floor access
  • onGrantedFloor – Participant receives floor access
// Initiate Chair Control Observer to receive Callbacks
room.setChairControlObserver(this); 

room.grantFloor(clientId); // To grant floor access to a clientId

public void onProcessFloorRequested(JSONObject jsonobject){
 // You granted floor access to a Participant
}

public void onGrantedFloor(JSONObject jsonobject){
 // Participant is notified that he is granted Floor Access
 room.publish(localStream); // Publish now
}

Error Codes & Exceptions

CodeDescription
5004Unauthorized Access. When a user with participant role uses grantFloor()
5045Invalid Client ID. When grantFloor() is called with Invalid Client ID
5043Repeated grantFloor() call, awaiting acknowledgement of previous request
5044Repeated grantFloor() call after successfully granting Floor Access on a request
5046grantFloor() to another user without releasing the Floor Access from another user
5069Floor Access can’t be granted when Floor Release is in process

Finish Granted Floor Access

The Participant can finish floor access granted to him by Moderator.

ClassEnxRoom

Method: public void finishFloor() – Participant finishes his granted Floor Access

Delegate Method

  • onFinishedFloorRequest: Moderator receives notification that participant has finish granted Floor Access himself.
  • onFloorFinished: Participant receives acknowledgement that he finished granted Floor Access.
room.finishFloor();

// Moderator received Floor Finish notification 
public void onFinishedFloorRequest(JSONObject jsonObject) {
	// Handle JSONObject
}

// Participants is acknowledged that floor access is finished
public void onFloorFinished(JSONObject jsonObject) {
	// Handle JSONObject
}

Error Codes & Exceptions

CodeDescription
5003Unauthorized Access. When a user with moderator role uses finishFloor()
5041Repeated finishFloor() call, awaiting acknowledgement of previous request
5042Request pending. When participant retries finishFloor() after its acknowledged
5082Non-Contextual method call. Method not available in group mode Room

Note: In case of error, <null> is received at 1st Index, and Error Info at 2nd Index,

Release Floor Access

Moderator may terminate floor access granted to some participant. Upon termination, the user’s stream(s) is unpublished. It is necessary to terminate floor access of a participant before giving out floor access to another participant.

Class: EnxRoom

Method: public void releaseFloor(String clientId) – Moderator asks participant to release floor

Observer: public void setChairControlObserver( EnxChairControlObserver-Object )

Callbacks:

  • onProcessFloorRequested – Moderator is acknowledged that floor is released
  • onReleasedFloorRequest – Participant i notified that floor access has been revoked. His stream is automatically unpublished.
// Initiate Chair Control Observer to receive Callbacks
room.setChairControlObserver(this); 

room.releaseFloor(clientId); // To ask Participant to release floor access

public void onProcessFloorRequested(JSONObject jsonobject){
 // You got floor access released from the Participant
}

public void onReleasedFloorRequest(JSONObject jsonobject){
 // Participant is notified that floor access is revoked
}

Error Codes & Exceptions

CodeDescription
5006Unauthorized Access. When a user with participant role uses releaseFloor()
5045Invalid Client ID. When releaseFloor() is called with Invalid Client ID
5049Repeated releaseFloor() call, awaiting acknowledgement of previous request
5050Non-Contextual Method Call. releaseFloor() call without granting floor access

Note: The Object EnxRoom.setChairControlObserver() needs to be used only once for any one or all of the above method calls to receive callbacks.

Restore Moderator Session

In case the Moderator is disconnected during a session, the list of received floor requests and participant currently with floor access can be retrieved when connection is restored to the room in the Room-Meta-Data viz.

Structured Data JSON

  • room.getRoomMetaData().getJSONArray("raisedHands")– An Array of Client Information who requested floor-access
  • room.getRoomMetaData().getJSONArray("approvedHands") An Array of Client-Information who currently has floor access

Change Participant’s Role

A Moderator can designate a connected Participant to act as a Moderator during the session. Doing so, the promoted Participant would get access to all the rights of the Moderator, i.e. accesses all features listed under Moderator Controls; and the old Moderator becomes a Participant. Similarly, the new Moderator can further grant Moderator Role to other participant if needed.

Class: EnxRoom

Method: public void switchUserRole(String ClientId)

Parameter: ClientId – Client ID of the participant who is being designated as Moderator

Callbacks:

  • onSwitchedUserRoleChange – Moderator is acknowledged that he has requested for Switch User Role
  • onUserRoleChanged – All participants are notified with a message that a new user has been appointed as moderator. Also, the newly appointed moderator is notified with extra information
room.switchUserRole(clientId); // Role Change Request from Moderator

public void onSwitchedUserRole(JSONObject jsonObject){
	// Moderator is acknowledged
}

public void onUserRoleChanged(JSONObject jsonObject){
	// All Participants are notified - jsonObject
	/*
	{	"moderator": false, // You are not a moderator
		"clientId": "XXX"   // New Moderator's Client ID
	}
	*/
    
	// New Moderator is notified  - jsonObject
	/*
	{   "moderator": true,  // You are a moderator
		"clientId": "XXX",  // New Moderator's Client ID i.e. You
		"raisedHands":[],   // List of Client IDs requested Floor Access
		"approvedHands":[]  // List of Client IDs with Floor Access
	}
	*/
}

Error Codes & Exceptions

CodeDescription
5085Unauthorized Access. When user with participant role uses switchUserRole()

Start / Stop Live Streaming

EnableX supports forwarding live Video Sessions over RTMP to any live streaming CDNs which support this protocol.

To start forwarding RTMP stream you use startStreaming() method; and to stop you use stopStreaming() method.

Class: EnxRoom

Methods:

  • public void startStreaming(JSONObject streamingDetails) – To start forwarding RTMP Stream
  • public void stopStreaming(JSONObject streamingDetails)  – To stop forwarding RTMP Stream

Parameters:

  • streamingDetails – Configuration, Options for forwarding streams
    • rtmpDetails.rtmpUrl – Use “RTM-URL/RTMP-KEY” from CDN Provider
    • rtmpDetails.urlDetails.url – Optional. Its RTMP Streaming View URL. If not given, a default Streaming View will be applied.

Callbacks:

  • onAckStartStreaming: To acknowledge that a RTMP Streaming has started.
  • onAckStopStreaming: To acknowledge that RTMP Streaming has stopped.
  • onStreamingNotification To notify all on Streaming Event
JSONObject jsonObject = new JSONObject();

JSONObject rtmpDetails = new JSONObject();
rtmpDetails.put("rtmpUrl", "RTMP_URL/RTMP_KEY"");
jsonObject.put("rtmpDetails", rtmpDetails);

/* Optional Streaming View URL */
JSONObject urlDetails = new JSONObject();
urlDetails.put("url", "URL-TO-USE-AS-STREAMING-VIEW");
jsonObject.put("urlDetails", urlDetails);

room.startStreaming(jsonObject); // Start Streaming
room.Moderator (jsonObject);     // Stop Streaming

public void onAckStartStreaming(JSONObject jsonObject){
	 // Acknowledges that Streaming Started
}

public void onAckStopStreaming(JSONObject jsonObject){
	 // Acknowledges that Streaming Stopped
}

public void onStreamingNotification(JSONObject jsonObject){
	 // Notifies all that Streaming Started/Stopped
}

Error Codes & Exceptions

CodeDescription
5121Steaming Start is in process. Repeated startStreaming() call
5122Steaming is on. Repeated startStreaming() call
5123Steaming Stop is in process. Repeated stopStreaming() call
5124Non-Contextual Method Call. stopStreaming() call without starting a Stream.
5125Invalid Stream Configuration

Pin User Stream(s)

A Moderator can now pin any user to force EnableX carry his stream to all end-points irrespective of the user talking or not. So, pinned users’ streams will always be available on Active Talker list. Users who are actively talking will be placed first, and then pinned-non-talkers are placed in the Active Talker list. Moderator can pin 1 less user than max_active_talkers configured in the room.

When a user joins a room, he is notified with a room meta information with onRoomConnected event. In the room meta, a new array is introduced called pinnedUsers, its a array of Client-Ids of users who are currently pinned.

Methods:

  • public void pinUsers(List<String> clientIds) – To pin one or more user stream(s)
  • public void unpinUsers(List<String> clientIds) – To unpin one or more pinned user stream(s)

Parameters:

  • clientIds– Array of Client-Ids of users whose streams will be pinned or unpinned

Event Notifications:

  • onAckPinUsers – To acknowledge that the users are pinned
  • - onAckUnpinUsers – To acknowledge that the users are unpinned
  • - onPinnedUsers: To notify all others in the room with an updated list of pinned users
List<String> clientIds = new ArrayList<>(); 
clientIds.add("clientId1");
clientIds.add("clientId2");
 
enxRoom.pinUsers(clientIds);		// To pin
enxRoom.unpinUsers(clientIds);	// To unpin

// Moderator who pins is acknowledged 
public void onAckPinUsers(JSONObject jsonObject){ 

}

// Moderator who unpins is acknowledged 
public void onAckUnpinUsers(JSONObject jsonObject){ 

}

// Everyone is notified wtih updated pinned list
public void onPinnedUsers(JSONObject jsonObject){ 

}

Error Codes & Exceptions

CodeDescription
5003Unauthorized Access. When a user with participant role uses pinUser()
5003Unauthorized Access. When a user with participant role uses unpinUser()
5126Undefined clientIDs

Explore Android SDK