Floor Access Control

In Lecture Mode, only the moderator publishes a stream. Participants must request floor access to publish their audio or video. The Android SDK provides methods to request, grant, deny, release, and invite participants to the floor, giving the moderator full control over who speaks.

Floor Access Methods
Note: Call room.setChairControlObserver(this) once before invoking any floor access methods. This registers the observer that delivers all floor-related callbacks to your activity or fragment.

Request Floor Access

EnxRoom.requestFloor() lets a participant send a floor access request to the moderator. The participant receives an acknowledgment when the moderator receives the request, and the moderator is notified separately.

CallbackDescription
onFloorRequestedAcknowledgment to the participant when the moderator receives their request.
onFloorRequestReceivedNotification to the moderator when a participant's request is received.
room?.setChairControlObserver(myChairControlObserver)
room?.requestFloor()

override fun onFloorRequested(jsonObject: JSONObject?) {
    // Your floor request was received by the moderator
}

override fun onFloorRequestReceived(jsonObject: JSONObject?) {
    // Moderator: a participant has requested floor access
}
Error CodeDescription
5003Unauthorized — moderator cannot request floor access.
5041A previous floor request is already in process.
5042Floor request already registered.
5067Non-contextual — room is in group mode, not lecture mode.

Cancel a Floor Request

EnxRoom.cancelFloor() allows a participant to withdraw a pending floor access request before the moderator has responded.

CallbackDescription
onFloorCancelledAcknowledgment to the participant when their request is cancelled.
onCancelledFloorRequestNotification to the moderator when the participant cancels their request.
room?.cancelFloor()

override fun onFloorCancelled(jsonObject: JSONObject?) {
    // Your floor request was cancelled
}

override fun onCancelledFloorRequest(jsonObject: JSONObject?) {
    // Moderator: participant cancelled their floor request
}
Error CodeDescription
5003Unauthorized — moderator cannot cancel a floor request.
5041A previous request is already in process.
5042Floor request is already cancelled.
5067Non-contextual — room is in group mode.

Grant Floor Access

EnxRoom.grantFloor(String clientId) gives floor access to a specific participant, allowing them to publish their stream. This method is available to the moderator only. Only one participant can hold floor access at a time — release the current holder's floor before granting to another.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the moderator when floor access is granted.
onGrantedFloorNotification to the participant when they receive floor access — they can now publish.
room?.grantFloor(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Moderator: floor granted to participant
}

override fun onGrantedFloor(jsonObject: JSONObject?) {
    // Participant: you have floor access — publish your stream
    room?.publish(localStream)
}
Error CodeDescription
5004Unauthorized — participant cannot grant floor access.
5045Invalid client ID.
5043A previous grant request is already in process.
5044Floor access is already granted to this participant.
5046Another participant currently holds floor access — release it first.
5069A floor release is currently in process.
5067Non-contextual — room is in group mode.

Deny Floor Access

EnxRoom.denyFloor(String clientId) rejects a participant's floor access request. The moderator receives an acknowledgment and the participant is notified that their request was denied.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the moderator when the denial is processed.
onDeniedFloorRequestNotification to the participant that their floor request was denied.
room?.denyFloor(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Moderator: floor request denied
}

override fun onDeniedFloorRequest(jsonObject: JSONObject?) {
    // Participant: your floor request was denied
}
Error CodeDescription
5005Unauthorized — participant cannot deny floor requests.
5045Invalid client ID.
5047A previous deny request is already in process.
5048Non-contextual — floor has already been granted to this participant.
5067Non-contextual — room is in group mode.

Finish Floor Access

EnxRoom.finishFloor() lets a participant announce that they are done speaking and voluntarily release the floor. All moderators are notified.

CallbackDescription
onFloorFinishedAcknowledgment to the participant when their floor access is finished.
onFinishedFloorRequestNotification to all moderators that the participant has finished with floor access.
room?.finishFloor()

override fun onFloorFinished(jsonObject: JSONObject?) {
    // Your floor access has ended
}

override fun onFinishedFloorRequest(jsonObject: JSONObject?) {
    // Moderator: participant finished floor access
}
Error CodeDescription
5003Unauthorized — moderator cannot finish floor access.
5041A previous request is already in process.
5042Floor access is already finished.
5067Non-contextual — room is in group mode.
Note: In case of an error, <null> is received at the first index and error information at the second index of the response array.

Release Floor Access

EnxRoom.releaseFloor(String clientId) allows the moderator to forcibly revoke floor access from a participant. All participants are notified when floor access is released.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the moderator when the release is processed.
onReleasedFloorRequestNotification to all participants when floor access has been revoked.
room?.releaseFloor(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Moderator: floor released from participant
}

override fun onReleasedFloorRequest(jsonObject: JSONObject?) {
    // Participant: your floor access has been revoked
}
Error CodeDescription
5006Unauthorized — participant cannot release floor access.
5045Invalid client ID.
5049A previous release request is already in process.
5050Non-contextual — no floor access has been granted to this participant.
5067Non-contextual — room is in group mode.

Restore Moderator Session

If the moderator reconnects after a disconnection, retrieve the current floor state from room metadata so pending and active requests can be resumed:

Floor Invitation

These methods give the moderator additional control — instead of waiting for participants to request floor access, the moderator can proactively invite participants to speak.

Invite a Participant to the Floor

EnxRoom.inviteToFloor(String clientId) lets the moderator invite any participant to take the floor without waiting for a request. The invited participant receives a notification and can accept or reject the invitation.

CallbackDescription
onACKInviteToFloorRequestedAcknowledgment to the moderator when the invitation is sent.
onInviteToFloorRequestedNotification to all moderators in the room.
onInvitedForFloorAccessNotification to the invited participant.
room?.inviteToFloor(clientId)

override fun onACKInviteToFloorRequested(jsonObject: JSONObject?) {
    // Moderator: invitation sent
}

override fun onInviteToFloorRequested(jsonObject: JSONObject?) {
    // All moderators notified
}

override fun onInvitedForFloorAccess(jsonObject: JSONObject?) {
    // Participant: you have been invited to speak
}
Error CodeDescription
5086Not connected to room.
5097Unauthorized — chat-only room.
5006Unauthorized — participant cannot invite to floor.
5045Invalid client ID.
5067Non-contextual — room is in group mode.

Cancel a Floor Invitation

EnxRoom.cancelFloorInvite(String clientId) allows the moderator to withdraw an outstanding floor invitation before the participant has accepted or rejected it. The invited participant and all other moderators are notified.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the moderator when the cancellation is processed.
onCanceledFloorInviteNotification to the invited participant and other moderators that the invitation was cancelled.
room?.cancelFloorInvite(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Moderator: invitation cancelled
}

override fun onCanceledFloorInvite(jsonObject: JSONObject?) {
    // Participant notified: invitation cancelled
}
Error CodeDescription
5086Not connected to room.
5097Unauthorized — chat-only room.
5006Unauthorized — participant cannot cancel floor invitations.
5045Invalid client ID.
5067Non-contextual — room is in group mode.

Accept a Floor Invitation

EnxRoom.acceptInviteFloorRequest(String clientId) lets a participant accept the moderator's floor invitation. All moderators are notified when the participant accepts.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the participant when their acceptance is processed.
onAcceptedFloorInviteNotification to all moderators including the one who sent the invitation.
room?.acceptInviteFloor(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Participant: floor invitation accepted
}

override fun onAcceptedFloorInvite(jsonObject: JSONObject?) {
    // Moderators notified: participant accepted
}
Error CodeDescription
5086Not connected to room.
5097Unauthorized — chat-only room.
5006Unauthorized — moderator cannot accept floor invitations.
5045Invalid client ID.
5067Non-contextual — room is in group mode.

Reject a Floor Invitation

EnxRoom.rejectInviteFloor(String clientId) lets a participant decline the moderator's floor invitation. All moderators are notified of the rejection.

CallbackDescription
onProcessFloorRequestedAcknowledgment to the participant when their rejection is processed.
onRejectedInviteFloorNotification to all moderators that the participant rejected the invitation.
room?.rejectInviteFloor(clientId)

override fun onProcessFloorRequested(jsonObject: JSONObject?) {
    // Participant: floor invitation rejected
}

override fun onRejectedInviteFloor(jsonObject: JSONObject?) {
    // Moderators notified: participant rejected
}
Error CodeDescription
5086Not connected to room.
5097Unauthorized — chat-only room.
5006Unauthorized — moderator cannot reject floor invitations.
5045Invalid client ID.
5067Non-contextual — room is in group mode.