The Android SDK provides moderator-only methods for managing video sessions — recording, hard muting, room locking, participant control, RTMP and HLS streaming, pinning, spotlight, and room mode switching.
Recording
Auto Recording
Configure the room with settings.auto_recording: true during room creation to start recording automatically as soon as the session begins. The moderator can stop the recording at any time by calling stopRecord().
Start Recording
EnxRoom.startRecord() starts recording the session. This method is available to the moderator only. Register a recording observer before calling it.
Class:EnxRoom
Method:public void startRecord()
Observer:room.setRecordingObserver(this)
Moderator only: Yes
Callback
Description
onStartRecordingEvent
Acknowledgment to the moderator when recording starts.
onRoomRecordingOn
Notification to all participants when recording starts.
room?.setEnxRecordingObserver(myRecordingObserver)
room?.startRecord()
override fun onStartRecordingEvent(jsonObject: JSONObject?) {
// ACK to the user who started recording
}
override fun onRoomRecordingOn(jsonObject: JSONObject?) {
// Broadcast to ALL participants — recording has started
}
room.setRecordingObserver(this);
room.startRecord();
@Override
public void onStartRecordingEvent(JSONObject jsonObject) {
// You started recording
}
@Override
public void onRoomRecordingOn(JSONObject jsonObject) {
// Recording has started — notified to all
}
Error Code
Description
5007
Unauthorized — caller is not a moderator.
5033
Recording start request already in progress.
5034
Recording is already active.
Stop Recording
EnxRoom.stopRecord() stops an active recording. This method is available to the moderator only.
Class:EnxRoom
Method:public void stopRecord()
Observer:room.setRecordingObserver(this)
Moderator only: Yes
Callback
Description
onStopRecordingEvent
Acknowledgment to the moderator when recording stops.
onRoomRecordingOff
Notification to all participants when recording stops.
room?.stopRecord()
override fun onStopRecordingEvent(jsonObject: JSONObject?) {
// ACK to the user who stopped recording
}
override fun onRoomRecordingOff(jsonObject: JSONObject?) {
// Broadcast to ALL — recording stopped
}
room.stopRecord();
@Override
public void onStopRecordingEvent(JSONObject jsonObject) {
// You stopped recording
}
@Override
public void onRoomRecordingOff(JSONObject jsonObject) {
// Recording has stopped — notified to all
}
Error Code
Description
5008
Unauthorized — caller is not a moderator.
5035
Recording stop request already in progress.
5036
No recording is currently in progress.
Live Recording
Live Recording creates a transcoded composite file in real time using a custom layout view (the Virtual Agent). Unlike standard recording which transcodes after the session ends, you receive the composite file within minutes of the session concluding. See Virtual Agent for guidance on building a custom streaming view.
Auto Live Recording
Configure the room to start live recording automatically by including the following settings at room creation. The moderator can stop it at any time by calling stopLiveRecording().
EnxRoom.startLiveRecording(JSONObject jsonObject) starts live recording using a custom composite view. This method is available to the moderator only. Register a live recording observer before calling it.
urlDetails.url — Custom view URL (required). EnableX appends a participant token to this URL at runtime.
urlDetails.layOut — (Optional) Layout identifier for the custom view.
urlDetails.chatOverlay — (Optional) Boolean; overlays chat onto the recording view.
Callback
Description
onACKStartLiveRecording
Acknowledgment to the moderator when live recording starts.
onRoomLiveRecordingOn
Notification to all participants when live recording starts.
onRoomLiveRecordingUpdate
Intermediate progress updates sent to all participants during setup.
onRoomLiveRecordingFailed
Notification to all participants if live recording fails to start or fails mid-session.
enxRoom.setLiveRecordingObserver(this);
JSONObject jsonObject = new JSONObject();
JSONObject urlDetails = new JSONObject();
urlDetails.put("url", "https://your-domain/streaming-view/?token=");
jsonObject.put("urlDetails", urlDetails);
enxRoom.startLiveRecording(jsonObject);
@Override
public void onACKStartLiveRecording(JSONObject jsonObject) {
// Moderator: live recording has started
}
@Override
public void onRoomLiveRecordingOn(JSONObject jsonObject) {
// All participants: live recording started
}
@Override
public void onRoomLiveRecordingUpdate(JSONObject jsonObject) {
// All participants: live recording progress update
}
@Override
public void onRoomLiveRecordingFailed(JSONObject jsonObject) {
// All participants: live recording failed
}
Error Code
Description
5086
Not connected to room.
5097
Unauthorized — caller is not a moderator.
5138
Live recording request already in progress.
5122
Live recording is already active.
5139
Invalid live recording configuration.
Stop Live Recording
Two method signatures are available depending on your SDK version:
SDK v2.1.2:EnxRoom.stopLiveRecording(JSONObject jsonObject) — pass the same config used to start.
SDK v2.1.3+:EnxRoom.stopLiveRecording() — no parameters required.
Callback
Description
onACKStopLiveRecording
Acknowledgment to the moderator when live recording stops.
onRoomLiveRecordingOff
Notification to all participants when live recording stops.
enxRoom.stopLiveRecording(); // v2.1.3+
@Override
public void onACKStopLiveRecording(JSONObject jsonObject) {
// Moderator: live recording stopped
}
@Override
public void onRoomLiveRecordingOff(JSONObject jsonObject) {
// All participants: live recording stopped
}
Error Code
Description
5086
Not connected to room.
5097
Unauthorized — caller is not a moderator.
5138
Stop request already in progress.
5122
Live recording is not currently active.
5140
Live recording stop failed — internal error.
5141
Live recording stop timed out — internal error.
Live Recording Queue Error Codes
The following codes are delivered asynchronously to indicate the status of queued live recording and streaming requests.
Code
Description
7039
Live recording request in waiting — successfully removed from queue.
7046
Streaming request in waiting — successfully removed from queue.
7080
Live recording/streaming request in waiting queue failed to start.
7081
Live recording/streaming request in waiting queue failed to start.
7104
Streaming request is in waiting and will start soon.
7105
Last streaming request is in waiting.
7207
Live recording request is in waiting and will start soon.
7208
Last live recording request is in waiting.
Hard Muting
Hard Mute a Room
EnxRoom.hardMute() mutes all participants in the room. Users who join after the room is hard-muted are also automatically muted. Only the moderator can unmute the room. Register the mute room observer before calling this method.
Class:EnxRoom
Method:public void hardMute()
Observer:room.setMuteRoomObserver(this)
Moderator only: Yes
Callback
Description
onMutedRoom
Acknowledgment to the moderator when the room is hard-muted.
onReceivedMuteRoom
Notification to all participants when the room is hard-muted.
room?.hardMuteRoom()
override fun onHardMuteRoom(jsonObject: JSONObject?) {
// Received by ALL — room is hard-muted
}
room.setMuteRoomObserver(this);
room.hardMute();
@Override
public void onMutedRoom(JSONObject jsonObject) {
// You hard-muted the room
}
@Override
public void onReceivedMuteRoom(JSONObject jsonObject) {
// Room is hard-muted — notified to all
}
Error Code
Description
5001
Unauthorized — caller is not a moderator.
5037
Hard mute request already in progress.
5038
Room is already hard-muted.
Hard Unmute a Room
EnxRoom.hardUnMute() removes the hard mute from the room, restoring audio control to individual participants. This method is available to the moderator only.
Class:EnxRoom
Method:public void hardUnMute()
Moderator only: Yes
Callback
Description
onUnMutedRoom
Acknowledgment to the moderator when the room is hard-unmuted.
onReceivedUnMuteRoom
Notification to all participants when the room is hard-unmuted.
room?.hardUnMuteRoom()
override fun onHardUnMuteRoom(jsonObject: JSONObject?) { }
room.hardUnMute();
@Override
public void onUnMutedRoom(JSONObject jsonObject) {
// You hard-unmuted the room
}
@Override
public void onReceivedUnMuteRoom(JSONObject jsonObject) {
// Room is hard-unmuted — notified to all
}
Error Code
Description
5002
Unauthorized — caller is not a moderator.
5039
Room is not currently hard-muted.
5040
Hard unmute request already in progress.
Hard Mute a Participant
Note: The methods below are available in Android SDK v2.1.3 and later. For earlier versions, use EnxStream.hardMuteAudio(clientId) and EnxStream.hardMuteVideo(clientId) on the remote stream object instead.
Use these EnxRoom methods to force-mute a specific participant's audio or video. The affected participant receives a callback, and all other participants are also notified.
Notification to the affected participant when their audio is hard-muted.
onHardMutedVideo
Notification to the affected participant when their video is hard-muted.
onReceivedHardMuteAudio
Notification to all participants when a user's audio is hard-muted.
onReceivedHardMuteVideo
Notification to all participants when a user's video is hard-muted.
room?.hardMuteUser(clientId)
override fun onHardMuteUser(jsonObject: JSONObject?) { }
room.hardMuteUserAudio(clientId);
room.hardMuteUserVideo(clientId);
@Override
public void onHardMutedAudio(JSONObject jsonObject) {
// Your audio is hard-muted
}
@Override
public void onReceivedHardMuteAudio(JSONObject jsonObject) {
// A participant's audio is hard-muted — notified to all
}
Error Code
Description
5009
Unauthorized to mute participant audio.
5011
Unauthorized to mute participant video.
Hard Unmute a Participant
Use these EnxRoom methods (v2.1.3+) to restore audio or video for a specific participant who was previously hard-muted.
Notification to the affected participant when their audio is hard-unmuted.
onHardUnMutedVideo
Notification to the affected participant when their video is hard-unmuted.
onReceivedHardUnMuteAudio
Notification to all participants when a user's audio is hard-unmuted.
onReceivedHardUnMuteVideo
Notification to all participants when a user's video is hard-unmuted.
room?.hardUnMuteUser(clientId)
override fun onHardUnMuteUser(jsonObject: JSONObject?) { }
room.hardUnMuteUserAudio(clientId);
@Override
public void onHardUnMutedAudio(JSONObject jsonObject) {
// Your audio is hard-unmuted
}
@Override
public void onReceivedHardUnMuteAudio(JSONObject jsonObject) {
// A participant's audio is hard-unmuted — notified to all
}
Error Code
Description
5010
Unauthorized to unmute participant audio.
5012
Unauthorized to unmute participant video.
Room Entry Control
Lock a Room
EnxRoom.lockRoom() prevents any new participants from joining the session. Participants already connected remain unaffected. This method is available to the moderator only.
Class:EnxRoom
Method:public void lockRoom()
Moderator only: Yes
Callback
Description
onAckLockRoom
Acknowledgment to the moderator when the room is locked.
onLockedRoom
Notification to all participants when the room is locked.
room?.lockRoom()
room.lockRoom();
@Override
public void onAckLockRoom(JSONObject jsonObject) {
// Room has been locked
}
@Override
public void onLockedRoom(JSONObject jsonObject) {
// Room locked — notified to all
}
Error Code
Description
5115
Unauthorized — caller is not a moderator.
5117
Room is already locked.
Unlock a Room
EnxRoom.unLockRoom() re-opens the room to new participants. This method is available to the moderator only.
Class:EnxRoom
Method:public void unLockRoom()
Moderator only: Yes
Callback
Description
onAckUnLockRoom
Acknowledgment to the moderator when the room is unlocked.
onUnLockedRoom
Notification to all participants when the room is unlocked.
room?.unlockRoom()
room.unLockRoom();
@Override
public void onAckUnLockRoom(JSONObject jsonObject) {
// Room has been unlocked
}
@Override
public void onUnLockedRoom(JSONObject jsonObject) {
// Room unlocked — notified to all
}
Error Code
Description
5115
Unauthorized — caller is not a moderator.
5118
Room is already unlocked.
Knock — Moderate Participant Entry
In a knock-enabled room, participants are held in a waiting state after connecting and must receive explicit moderator approval before being admitted to the session. If the moderator joins late, use room.awaitedParticipants to retrieve the list of users currently waiting for approval.
Approve a User's Entry
EnxRoom.approveAwaitedUser(String clientId) admits a waiting participant into the session.
Parameter:clientId — the client ID of the waiting participant.
Callback
Description
onUserAwaited
Notification to the moderator when a user is waiting for entry approval.
onRoomAwaited
Notification to the waiting user that their knock request was received (includes event_type: "knock").
onAckForApproveAwaitedUser
Acknowledgment to the moderator when entry approval is sent.
onRoomConnected
Notification to the user when they are permitted to join the session.
room?.approveAwaitedUser(clientId)
override fun onUserAwaited(jsonObject: JSONObject?) {
val clientId = jsonObject?.optString("clientId")
room?.approveAwaitedUser(clientId!!)
}
override fun onRoomAwaited(enxRoom: EnxRoom?, jsonObject: JSONObject?) {
// Participant: room is locked, waiting for moderator approval
}
override fun onAckForApproveAwaitedUser(jsonObject: JSONObject?) { }
@Override
public void onUserAwaited(JSONObject jsonObject) {
// jsonObject: {"id": "String", "name": "String"}
enxRoom.approveAwaitedUser(jsonObject.getString("id"));
}
@Override
public void onAckForApproveAwaitedUser(JSONObject jsonObject) {
// User has been allowed entry
}
Decline a User's Entry
EnxRoom.denyAwaitedUser(String clientId) rejects a waiting participant and disconnects them from the waiting state.
Parameter:clientId — the client ID of the waiting participant.
Callback
Description
onAckForDenyAwaitedUser
Acknowledgment to the moderator when the entry denial is sent.
onRoomDisconnected
Notification to the denied user with the reason for disconnection.
room?.denyAwaitedUser(clientId)
override fun onAckForDenyAwaitedUser(jsonObject: JSONObject?) { }
@Override
public void onUserAwaited(JSONObject jsonObject) {
enxRoom.denyAwaitedUser(jsonObject.getString("id"));
}
@Override
public void onAckForDenyAwaitedUser(JSONObject jsonObject) {
// User has been denied entry
}
Late-joining moderator: If the moderator joins after participants have already knocked, use room.awaitedParticipants to retrieve the current list of users waiting for approval.
Participant Control
Disconnect a User
EnxRoom.dropUser(List<String> clientIds) force-disconnects one or more participants from the session. The affected users receive a disconnection notification with the reason. This method is available to the moderator only.
Parameter:clientIds — list of client IDs to disconnect.
Moderator only: Yes
Callback
Description
onAckDropUser
Acknowledgment to the moderator when the user is disconnected.
onRoomDisconnected
Notification to the affected user with the reason for disconnection.
room?.dropUser(JSONArray().put(clientId))
override fun onAckDropUser(jsonObject: JSONObject?) { }
List<String> clientIds = new ArrayList<>();
clientIds.add("clientId1");
room.dropUser(clientIds);
@Override
public void onAckDropUser(JSONObject jsonObject) {
// User has been dropped
}
Error Code
Description
5116
Unauthorized — caller is not a moderator.
Extend Session Duration
Each room has a defined maximum duration. Ten minutes before expiry, all participants receive an onConferenceRemainingDuration notification indicating that an extension window has opened. Any participant can trigger an extension; once triggered the first window closes. If the session has not been extended, a second window opens five minutes before expiry.
Class:EnxRoom
Method:public void extendConferenceDuration()
Callback
Description
onConferenceRemainingDuration
Notification to all participants when an extension window opens; includes the number of minutes remaining.
onConferencessExtended
Notification to all participants when the session duration has been extended.
val extOpts = JSONObject().apply { put("duration", 30) }
room?.extendConferenceDuration(extOpts)
override fun onConferenceRemainingDuration(jsonObject: JSONObject?) {
val seconds = jsonObject?.optInt("remainingDuration")
}
override fun onConferencessExtended(jsonObject: JSONObject?) { }
room.extendConferenceDuration();
@Override
public void onConferenceRemainingDuration(JSONObject jsonObject) {
// Extension window opened — N minutes remaining
}
@Override
public void onConferencessExtended(JSONObject jsonObject) {
// Session has been extended
}
Destroy a Session
EnxRoom.destroy() immediately ends the session for all connected participants. This method is available to the moderator only.
Class:EnxRoom
Method:public void destroy()
Moderator only: Yes
Callback
Description
onAckDestroy
Acknowledgment to the moderator when the session is destroyed.
onRoomDisconnected
Notification to all participants when the session ends.
room?.destroy()
override fun onAckDestroy(jsonObject: JSONObject?) { }
The moderator can promote any participant to the moderator role. When the role switch is confirmed, the promoted participant gains moderation capabilities and the original moderator becomes a regular participant. All participants are notified of the change.
Parameter:clientId — the client ID of the participant to promote.
Moderator only: Yes
Callback
Description
onSwitchedUserRole
Acknowledgment to the moderator when the role switch is initiated.
onUserRoleChanged
Notification to all participants; the new moderator receives additional moderation context.
room?.setEnxSwitchRoleObserver(mySwitchRoleObserver)
val opts = JSONObject().apply {
put("clientId", targetClientId)
put("role", "moderator")
}
room?.switchUserRole(opts)
override fun onAckUserRoleChangeRequest(jsonObject: JSONObject?) { }
override fun onUserRoleChangeRequest(jsonObject: JSONObject?) { }
override fun onUserRoleChangeAccepted(jsonObject: JSONObject?) { }
override fun onUserRoleChangeDenied(jsonObject: JSONObject?) { }
override fun onUserRoleChanged(jsonObject: JSONObject?) {
val newRole = jsonObject?.optString("role")
}
room.switchUserRole(clientId);
@Override
public void onSwitchedUserRole(JSONObject jsonObject) {
// Role switch acknowledged
}
@Override
public void onUserRoleChanged(JSONObject jsonObject) {
// New moderator notified:
// { "moderator": true, "clientId": "XXX", "raisedHands": [], "approvedHands": [] }
// All other participants notified:
// { "moderator": false, "clientId": "XXX" }
}
Error Code
Description
5085
Unauthorized — caller is not a moderator.
RTMP Live Streaming
RTMP streaming lets the moderator forward the video session as a single live stream to any CDN or platform that accepts an RTMP ingest — YouTube, Facebook, Vimeo, Twitch, and others. See RTMP Live Streaming for the full overview including CDN configuration and layout options.
Start Streaming
EnxRoom.startStreaming(JSONObject streamingDetails) begins forwarding the session to an RTMP endpoint. This method is available to the moderator only.
The streamingDetails object accepts the following fields:
Field
Required
Description
rtmpDetails.rtmpUrl
Yes
RTMP ingest URL and streaming key from your CDN (e.g. rtmp://a.rtmp.youtube.com/live2/YOUR_KEY).
urlDetails.url
No
Custom streaming view URL. If omitted, EnableX uses its default composite layout.
Callback
Description
onAckStartStreaming
Acknowledgment to the moderator when streaming starts.
onStreamingStarted
Notification to all participants when streaming starts.
onStreamingFailed
Notification to all participants if streaming fails to start or fails mid-stream.
onStreamingUpdated
Intermediate progress notifications to all participants during stream setup.
JSONObject streamingDetails = new JSONObject();
JSONObject rtmpDetails = new JSONObject();
rtmpDetails.put("rtmpUrl", "RTMP_URL/STREAMING_KEY");
streamingDetails.put("rtmpDetails", rtmpDetails);
// Optional: custom streaming view
JSONObject urlDetails = new JSONObject();
urlDetails.put("url", "https://your-domain/streaming-view/?token=");
streamingDetails.put("urlDetails", urlDetails);
room.startStreaming(streamingDetails);
@Override
public void onAckStartStreaming(JSONObject jsonObject) {
// Streaming started — you are live
}
@Override
public void onStreamingStarted(JSONObject jsonObject) {
// All participants notified: streaming has started
}
@Override
public void onStreamingFailed(JSONObject jsonObject) {
// All participants notified: streaming failed
}
@Override
public void onStreamingUpdated(JSONObject jsonObject) {
// All participants: streaming process update
}
Error Code
Description
5121
Streaming start request already in progress.
5122
Streaming is already active.
5125
Invalid streaming configuration.
Stop Streaming
EnxRoom.stopStreaming(JSONObject streamingDetails) stops the active RTMP stream. Pass the same configuration object used to start streaming.
Acknowledgment to the moderator when streaming stops.
onStreamingStopped
Notification to all participants when streaming stops.
room.stopStreaming(streamingDetails);
@Override
public void onAckStopStreaming(JSONObject jsonObject) {
// Streaming has stopped
}
@Override
public void onStreamingStopped(JSONObject jsonObject) {
// All participants notified: streaming stopped
}
Error Code
Description
5123
Streaming stop request already in progress.
5124
No active stream to stop.
HLS Streaming
HLS Streaming lets you broadcast the session to a large audience in real time. Unlike RTMP which pushes to an external CDN, HLS is managed entirely by EnableX. The HLS stream starts automatically when the first audience member joins and stops when the last audience member disconnects. See HLS Streaming for the full overview including room configuration and audience token generation.
Important: HLS Streaming is a subscription-based service. Contact your EnableX Sales or Account Manager to enable it for your account before using any HLS room settings.
Registering the HLS Observer
Before receiving HLS callbacks, register the HLS observer on the room object:
enxRoom.setEnxHlsObserver(this);
HLS Callbacks
Callback
Description
onHlsStarted
Fired when the HLS stream starts. Sent to the publisher and all connected audiences. Also sent to new audiences on room join. The payload includes hls_url for playback.
onHlsStopped
Fired when the HLS stream stops — sent to the publisher when the last audience member leaves.
onHlsWaiting
Fired when HLS stream initiation is underway — sent to audience members only while the stream is being set up.
onHlsFailed
Fired when the HLS stream fails to start or encounters a fatal error.
enxRoom.setEnxHlsObserver(this);
@Override
public void onHlsStarted(JSONObject jsonObject) {
// jsonObject contains "hls_url" — pass to HLS player
String hlsUrl = jsonObject.getString("hls_url");
}
@Override
public void onHlsStopped(JSONObject jsonObject) {
// HLS stream stopped
}
@Override
public void onHlsWaiting(JSONObject jsonObject) {
// HLS stream is being initialized — show a waiting UI
}
@Override
public void onHlsFailed(JSONObject jsonObject) {
// HLS stream failed
}
Playing the HLS Stream with ExoPlayer
Use ExoPlayer (or any HLS-compatible player) to play the hls_url received via onHlsStarted. Add the ExoPlayer PlayerView to your layout XML:
<!-- In your layout XML -->
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/exoplayer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="100dp"
app:resize_mode="fixed_width" />
Then initialize and start the player in your Activity or Fragment:
PlayerView ePlayer = findViewById(R.id.exoplayer);
String hlsUrl = "HLS_URL_FROM_onHlsStarted";
DefaultHttpDataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
HlsMediaSource hlsMediaSource = new HlsMediaSource.Factory(dataSourceFactory)
.createMediaSource(MediaItem.fromUri(hlsUrl));
ExoPlayer player = new ExoPlayer.Builder(context).build();
player.setMediaSource(hlsMediaSource);
player.prepare();
ePlayer.setPlayer(player);
player.play();
HLS Error Codes
On HLS Start
Code
Description
7501
Input parameters missing — internal error.
7502
Timeout — internal error.
7503
Request is already in process.
7504
Request timeout — internal error.
7505
Request is queued and will start shortly.
7506
Cannot start HLS — try again after 2 minutes.
7507
Input parameters missing — internal error.
7508
Input parameters missing — internal error.
On HLS Stop
Code
Description
7520
Queued request successfully removed from queue.
7521
HLS stop failed — internal error.
7522
HLS stop timed out — internal error.
On HLS Waiting
Code
Description
7509
Cannot start — internal error; try again after 2 minutes.
7510
Start failed — internal error; try again after 2 minutes.
7511
Last request is in waiting.
7512
Cannot start — internal error; try again.
7513
Failed to start — internal error.
Generic
Code
Description
7000
Input parameters missing — internal error.
Pin & Spotlight
Pin a User
The moderator can pin one or more participants to keep their streams in the Active Talker list regardless of audio activity. Pinned streams are always published. The maximum number of simultaneously pinned users is max_active_talkers - 1.
Acknowledgment to the moderator when users are pinned.
onPinnedUsers
Notification to all participants with the updated list of pinned users.
val pinList = JSONArray().put(clientId)
room?.pinUsers(pinList)
override fun onAckPinUsers(jsonObject: JSONObject?) { }
override fun onPinnedUsers(jsonObject: JSONObject?) { }
List<String> clientIds = new ArrayList<>();
clientIds.add("clientId1");
enxRoom.pinUsers(clientIds);
@Override
public void onAckPinUsers(JSONObject jsonObject) {
// Users pinned
}
@Override
public void onPinnedUsers(JSONObject jsonObject) {
// All notified with updated pinned list
}
Error Code
Description
5003
Unauthorized — caller is not a moderator.
5126
One or more client IDs are invalid.
Unpin a User
EnxRoom.unpinUsers(List<String> clientIds) removes the pin from one or more participants. All participants are notified via onPinnedUsers with the updated pinned list.
Spotlighting pushes a participant's stream to the top of the Active Talker list. Multiple users can be spotlighted simultaneously, up to the room's max_active_talkers limit. Spotlighted participants appear in the active talker list with "spotlight": true.
Parameter:clientIds — list of client IDs to spotlight.
Moderator only: Yes
Callback
Payload
Description
onAckAddSpotlightUsers
{ "result": 0, clients: [] }
Acknowledgment to the moderator when spotlight is applied.
onUpdateSpotlightUsers
{ "moderator_id": String, clients: [] }
Notification to all participants with the updated spotlight list.
room?.addSpotlightUsers(pinList)
override fun onAckAddSpotlightUsers(jsonObject: JSONObject?) { }
override fun onUpdateSpotlightUsers(jsonObject: JSONObject?) { }
List clientIds = new ArrayList();
clientIds.add("clientId1");
enxRoom.addSpotlightUsers(clientIds);
@Override
public void onAckAddSpotlightUsers(JSONObject jsonObject) {
// Spotlight applied — { "result": 0, clients: [] }
}
@Override
public void onUpdateSpotlightUsers(JSONObject jsonObject) {
// All notified with updated spotlight list
}
Remove Spotlight
EnxRoom.removeSpotlightUsers(List clientIds) removes the spotlight from one or more participants. All participants are notified via onUpdateSpotlightUsers.
A room defined with group or lecture mode can be switched to the other mode at runtime by the moderator. The behaviour differs by direction:
Group to Lecture: All participant streams are dropped. Lecture-mode features (floor control, hand raise) become active. Any active breakout rooms are terminated.
Lecture to Group: All participants receive notification to re-publish their streams. The SDK does not auto-publish for privacy — each participant must call publish explicitly.