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.
Table of Contents
- Request Floor Access
- Cancel Requested Floor Access
- Grant Floor Access
- Deny Floor Access
- Finish Floor Access
- Release Granted Floor Access
- Restore Moderator Session
- Invite Participant to Floor
Request Floor Access
A participant requests for Floor access is forwarded to the Moderator using a notification event.
Method: Enx.requestFloor()
– No parameter needed. Participant requests floor access
Callbacks:
-
floorRequested
– Requesting Participant received acknowledgement that his request has been received by Moderator -
floorRequestReceived
– The Moderator receives requests from Participant
Enx.requestFloor(); // Participant requests floor access // Participant is acknowledged floorRequested : event =>{ // event { result:1701, msg:'Floor Request Received' } } // Moderator receive Floor Access Request floorRequestReceived : event =>{ // event { clientId : 1234, name : 'android' } }
Cancel Requested Floor Access
The Enx.cancelFloor()
method allows participants to cancel their request for Floor Access pending for Moderator’s approval.
Class: Enx
Method: Enx.cancelFloor()
– No Parameter required.
Callbacks:
cancelledFloorRequest
– Notification to the Moderator when the participant cancels the Floor Access Request.floorCancelled
– Acknowledgment to the Participant when their Floor Access Request is cancelled.
Enx.cancelFloor() cancelledFloorRequest:event=>{ // Moderator receives cancellation request } floorCancelled:event=>{ // Participant is acknowledged that floor request is cancelled }
Error Codes & Exceptions
Code | Description |
---|---|
5003 | Unauthorized Access. When a user with moderator role invokes cancelFloor() . |
5041 | Repeated cancelFloor() call while a previous request is in process. |
5042 | Repeated cancelFloor() call after the request has already been canceled. |
5067 | Unable to process the request for a Room in group mode. Non-Contextual method call. |
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.
Method: Enx.grantFloor(clientID)
– Moderator grants floor access to participant
Callbacks:
processFloorRequested
– Moderator is acknowledged that Participant is granted floor accessgrantedFloorRequest
– Participant receives floor access
Enx.grantFloor(ClientId); // To grant floor access to ClientId // To participant: Floor Access granted grantedFloorRequest : event =>{ // event = { result:1708, msg:'Floor Granted', clientId: "XXX" } } //To moderator: Acknowledgement processFloorRequested : event =>{ // event = { result:1708, msg:'Floor Granted' } }
Deny Floor Access
The Moderator may also deny a request for floor access to a participant.
Method: Enx.denyFloor(ClientIDk)
– Moderator denies floor access to a Participant
Callbacks:
processFloorRequested
– Moderator is acknowledged that he denied floor access to a ParticipantdeniedFloorRequest
– Participant is notified that he has been denied floor access
Enx.denyFloor(ClientId); // To deny floor access to ClientId // To participant: Floor Access request denied deniedFloorRequest : event =>{ // event = { result:4117, msg:'Floor request denied', clientId: "XXX" } } //To moderator: Acknowledgement processFloorRequested : event =>{ // event = { result:1709, msg:'Floor Denied' } }
Finish Floor Access
The Enx.finishFloor()
allows the Participant to announce the completion of Floor Access and release Floor Access.
Class: Enx
Method: Enx.finishFloor()
– No Parameter required.
Callbacks:
finishedFloorRequest:
Notification to the Moderator when the Participant finishes Floor Access.floorFinished:
Acknowledgment to the Participant when Floor Access is finished.
Enx.finishFloor() onFinishedFloorRequest:event=>{ // Moderator received Floor Finish notification } onFloorFinished:event=>{ // Participants is acknowledged that floor access is finished }
Error Codes & Exceptions
Code | Description |
---|---|
5003 | Unauthorized Access. When a user with moderator role invokes finishFloor() . |
5041 | Repeated finishFloor() call while the previous request is in process. |
5042 | When participant retries finishFloor() after finishing the Floor Access. |
5067 | Unable to process the request for a Room in group mode. Non-Contextual method call. |
Note: In case of an error, <null> is received at the first Index and Error Info at the second 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.
Method: Enx.releaseFloor(clientId)
– Moderator released floor request from a Client
Callbacks:
processFloorRequested
– Moderator is acknowledged that floor is releasedfloorReleased
– Participant i notified that floor access has been revoked. His stream is automatically unpublished.
Enx.releaseFloor(ClientId); // To release floor access floor ClientId // To participant: Floor Access released floorReleased : event =>{ // event = { result:1712, msg:'Floor released', clientId: "XXX" } } //To moderator: Acknowledgement processFloorRequested : event =>{ // event = { result:1712, msg:'Floor Released' } }
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 viz.
Structured Data JSON
room.raisedHands
– An Array of Client-IDs who requested floor-accessroom.approvedHands
– An Array of Client-IDs who currently has floor access
Invite to Floor
In lecture mode, where only the Moderator can speak and control speakers in the Room through Floor Access Control methods, the Invite to Floor methods provide more options to the Moderator to organize a conference in lecture mode.
Invite Participant to Floor
The Enx.inviteToFloor()
method allows the Moderator to invite any Participant in the ongoing conference to the Floor and talk.
Class: Enx
Method: Enx.inviteToFloor(clientId)
Parameter: clientId
– String. The client ID of the invited Participant.
Callback:
ackInviteToFloorRequested
– Acknowledgment to the Moderator when an invitation to Floor is sent to the Participant.inviteToFloorRequested
– Notification to all the Moderators in the Room when an invitation to Floor is sent to the Participant.
Enx.inviteToFloor(clientId) ackInviteToFloorRequested:event=>{ //Acknowledgment to the moderator who invited } inviteToFloorRequested:event=>{ //Notification to all the moderators in the room } invitedForFloorAccess: event=>{ //Notification to the invited participant }
Error Codes & Exceptions:
Code | Description |
---|---|
5086 | Endpoint application is not connected to a Room. |
5097 | inviteToFloor() is not applicable in a Chat-Only Room. Non-Contextual method call. |
5006 | A User with a participant role is not authorized to invoke inviteToFloor() . |
5045 | Unable to invite a user with an invalid client ID. |
5067 | Unable to process the request for a Room in group mode. Non-Contextual method call. |