In Lecture Mode, only the Moderator can publish a stream in the Room and the participants can only subscribe to the Moderator’s stream. If a participant(s) wants to publish their Stream during the session, they need to request the Moderator for Floor Access.

Table of Contents

The Floor Access Controls are implemented using the following APIs:

Request Floor Access

The EnxRoom.requestFloor() method allows a Participant to request the Moderator for Floor Access.

Class: EnxRoom

Method: - (void)requestFloor; – No parameter required.

Delegate Method:

- didFloorRequestReceived: – Notification to the Moderator when a Participant’s access request is received.

[room requestFloor];
 -(void)didFloorRequestReceived:(NSArray )Data{     
 
/*Data is 
      [   {
              "clientId": "XXXX", // Who requested
              "name": "iOS" 
          },
          "<null>"
      ]
      */
  }
CodeDescription
5003Unauthorized Access. When a user with a Moderator role invokes requestFloor().
5041Repeated requestFloor() call while the previous request is in process.
5042Repeated requestFloor() call after the request has already been registered with the Moderator.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index, and Error Info at the second Index.

Cancel Requested Floor Access

The Enxroom.cancelFloor() method allows participants to cancel their request for Floor Access pending for Moderator’s approval.

ClassEnxRoom

Method: - (void)cancelFloor; – No Parameter required.

Delegate Method

  • - room:didCancelledFloorRequest: Notification to the Moderator when the participant cancels the Floor Access Request.
  • room:didFloorCancelled: Acknowledgment to the Participant when their Floor Access Request is canceled.
[room cancelFloor];

//Moderator receives cancellation request
 -(void)didCancelledFloorRequest:(NSArray )Data;     
 
/*Data is 
      [   {
              "clientId": "XXXX", // Who requested
              "name": "iOS" 
          },
          "<null>"
      ]
      */
  }

// Participant receives acknowledgement
 -(void)didFloorCancelled:(NSArray )Data;     
 
/*Data is 
      [   {
              "clientId": "XXXX", // Who requested
              "name": "iOS" 
          },
          "<null>"
      ]
      */
  } 

Error Codes / Exceptions

CodeDescription
5003Unauthorized Access. When a user with moderator role invokes cancelFloor().
5041Repeated cancelFloor() call while a previous request is in process.
5042Repeated cancelFloor() call after the request has already been canceled.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index and Error Info at the second Index.

Deny Floor Access

The EnxRoom.denyFloor() method allows the Moderator to deny a Participant’s request for Floor Access.

ClassEnxRoom

Method: - (void)denyFloor:(NSString *)clientId; 

Parameter:

clientId – Client ID of the Participant requesting Floor Access.

Delegate Method

  • - didDeniedFloorRequest: – Notification to the Participant when the Floor Access has been denied.
  • - didProcessFloorRequested: – Acknowledgment to the Moderator when the Floor Access has been denied.
[room denyFloor:@”clientId”];   // Moderator denies floor access
 // Participant is notified about denied floor access
 -(void)didDeniedFloorRequest:(NSArray  )Data{     
     
     /* Data is 
     [   {
             "result":4117,
             "msg":"Floor Request Denied",
             "clientId":"XXX" 
         },
         "<null>"
     ] */
 }

Error Codes / Exceptions

CodeDescription
5005Unauthorized Access. When a user with participant role invokes denyFloor().
5045When an invalid Client ID is passed to denyFloor().
5047Repeated denyFloor() call while the previous request is in process.
5048denyFloor() called after granting Floor Access. Non-Contextual Method Call.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index and Error Info at the second Index.

Grant Floor Access

The EnxRoom.grantFloor() method allows the Moderator to grant Floor Access to one or more Participants one by one. Note that at any given point in time, only one Participant can be granted floor access. To grant Floor Access to others, the Moderator must release Floor Access from the existing participant.

Class: EnxRoom

Method: - (void)grantFloor:(NSString *)clientId;

Delegate Method:

  • - didGrantedFloorRequest: – Notification to the Participant when Floor Access is received.
  • - didProcessFloorRequested: – Acknowledgment to the Moderator when Participant is granted Floor Access.
[room grantFloor:@”clientId”];   // Moderator grants floor access
 // Participant receives floor access
 -(void) didGrantedFloorRequest:(NSArray *)Data{
    
     /* Data is 
     [   {
             "result":1708,
             "msg":"Floor Granted",
             "clientId":"XXX" 
         },
         "<null>"
     ] */
 }

Error Codes & Exceptions

CodeDescription
5004Unauthorized Access. When a user with participant role invokes grantFloor().
5045When Invalid Client ID is passed to grantFloor().
5043Repeated grantFloor() call while the previous request is in process.
5044Repeated grantFloor() call after successfully granting Floor Access.
5046grantFloor() to another Participant without releasing the Floor Access from the existing Participant.
5069Unable to grant Floor Access when Floor Release is in process.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index and Error Info at the second Index.

Finish Floor Access

The EnxRoom.finishFloor() allows the Participant to announce the completion of Floor Access and release Floor Access.

Class: EnxRoom

Method: - (void)finishFloor; – No Parameter required.

Delegate Method

  • - room:didFinishedFloorRequest: Notification to the Moderator when the Participant finishes Floor Access.
  • – room:didFloorFinished: Acknowledgment to the Participant when Floor Access is finished.
[room finishFloor];

//Moderator receives finished floor access
(void)didFinishedFloorRequest:(NSArray )Data;     
 
/*Data is 
      [   {
              "clientId": "XXXX", // Who requested
              "name": "iOS" 
          },
          "<null>"
      ]
      */
  }

// Participant receives acknowledgement
 -(void)didFloorFinished:(NSArray )Data;     
 
/*Data is 
      [   {
              "clientId": "XXXX", // Who requested
              "name": "iOS" 
          },
          "<null>"
      ]
      */
  } 

Error Codes / Exceptions

CodeDescription
5003Unauthorized Access. When a user with moderator role invokes finishFloor().
5041Repeated finishFloor() call while the previous request is in process.
5042When participant retries finishFloor() after finishing the Floor Access.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index and Error Info at the second Index.

Release Floor Access

The Enxroom.releaseFloor() method allows the Moderator to terminate the Floor Access granted to a Participant. This unpublishes the participant’s streams and makes the Floor available for access again.

Class: EnxRoom

Method: -(void)releaseFloor:(NSString *)clientId;

Parameter:

clientId – Client ID of the Participant whose Floor Access is being released.

Delegate Method:

  • - didReleasedFloorRequest: – Notification to the Participant when their Floor Access is revoked.
  • - didProcessFloorRequested: – Acknowledgment to the Moderator when the Floor Access is released.
[room releaseFloor:@”clientId”];   // Moderator revokes floor access 

 // Participant is notified moderator has revoked floor access 
 -(void)didReleasedFloorRequest:(NSArray )Data{     

    /* Data is 
     [   {
             "result":1712,
             "msg":"Floor Released",
             "clientId":"XXXX"    
         },
         "<null>"
     ] */
 }

Error Codes / Exceptions:

CodeDescription
5006Unauthorized Access. When a user with participant role invokes releaseFloor()
5045Invalid Client ID passed to releaseFloor().
5049Repeated releaseFloor() call while the previous request is in process.
5050releaseFloor() called without granting Floor Access. Non-Contextual Method Call.
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Note: In case of error, <null> is received at the first Index and Error Info at the second Index.

Restore Moderator Session

If the Moderator gets disconnected during a session, the list of Floor Access Requests and participants currently with Floor Access can be retrieved via the Room-Meta-Data when the Moderator gets reconnected.

Structured Data JSON

  • room.roomMetaData[@"raisedHands"]An Array of Client IDs requesting floor access.
  • room.roomMetaData[@"approvedHands"] – An Array of Client IDs currently having 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 EnxRoom.inviteToFloor() method allows the Moderator to invite any Participant in the ongoing conference to the Floor and talk.

Class: EnxRoom

Method: -(void)inviteToFloor:(NSString* _Nonnull)clientId 

Parameter:

clientId – String. The client ID of the invited Participant.

Delegate Methods:

  • didACKInviteToFloorRequested – Acknowledgment to the Moderator when an invitation to Floor is sent to the Participant.

Response Body:

{
   msg = Success; 
   result = 0;
} 
  • didInviteToFloorRequested – Notification to all the Moderators in the Room when an invitation to Floor is sent to the Participant.

Response Body:

{
    clientId = "cae0afbc-fb94-4743-8c04-ae48e9d3eb52"; 
    id = inviteToFloor; 
    name = Jay;
} 
  • didInvitedForFloorAccess – Notification to the invited Participant when an invitation to Floor is received.

Response Body:

{  
        clientId = "9554a040-58bd-4f0b-a010-7f92c54b2918"; 
        id = inviteToFloor; 
        moderator = "e2b48879-3754-49f2-bf86-08a73347e408"; 
        name = Jay; 
 } 
// invitation sent to participant to come on floor and talk
[EnxRoom inviteToFloor:"ClientID"]; 

//Acknowledgment to the moderator who invited
-(void)didACKInviteToFloorRequested:(NSArray *_Nullable)Data; 

//Notification to all the moderators in the room
-(void)didInviteToFloorRequested:(NSArray *_Nullable)Data; 

//Notification to the invited participant
-(void)didInvitedForFloorAccess:(NSArray *_Nullable)Data;  

Error Codes & Exceptions:

CodeDescription
5086 Endpoint application is not connected to a Room. 
5097inviteToFloor() is not applicable in a Chat-Only Room. Non-Contextual method call.
5006A User with a participant role is not authorized to invoke inviteToFloor().
5045Unable to invite a user with an invalid client ID. 
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Cancel Invitation to Floor

The EnxRoom.cancelFloorInvite() method allows the Moderator to cancel a Floor Invitation sent to a Participant.

Class: EnxRoom

Method: -(void)cancelFloorInvite:(NSString* _Nonnull)clientId; 

Parameter:

clientId – Client Id of the Participant whose invitation needs to be canceled.

Callback:

  • didProcessFloorRequested – Acknowledgment to the Moderator when Cancel Invitation request is sent to the Participant.

Response Body:

{ 
     msg = Success; 
     request =  { 

        id = processFloorRequest; 
 	params =  { 

            action = cancelFloorInvite;
            clientId = "cae0afbc-fb94-4743-8c04-ae48e9d3eb52"; 
       		}; 
	}; 
    	result = 0; 
} 
  • didCanceledFloorInvite – Notification to the invited Participant and other Moderators in the Room when invitation is canceled by the Moderator.

Response Body for the Participant:

{ 
        clientId = "a067fd70-1461-4ca4-befc-2b570c0db494"; 
        id = cancelFloorInvite; 
        moderator = "e2b48879-3754-49f2-bf86-08a73347e408"; 
        name = JayiOS; 
} 

Response Body for other Moderators:

{ 
        clientId = "ade30ef1-595d-4364-b4f5-1d9420f24b0f"; 
        id = cancelFloorInvite; 
        name = JayiOS; 
} 
// Cancel Floor invitation request sent by the Moderator
 [EnxRoom cancelFloorInvite:"ClientID"]; 

// Acknowledgment to the Moderator that Cancel Floor Invitation is initiated
- (void)didProcessFloorRequested:(NSArray *_Nullable)Data; 

// Notification to the invited participant and other Moderators in the Room that invitation is canceled
-(void)didCanceledFloorInvite:(NSArray *_Nullable)Data 

Error Codes & Exceptions:

CodeDescription
5086 Endpoint application is not connected to a Room. 
5097cancelFloorInvite() not applicable in a Chat-Only Room. Non-Contextual method call.
5006A User with a participant role is not authorized to invoke cancelFloorInvite().
5045Unable to cancel invitation for an invalid client ID. 
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Accept Invitation to Floor

The EnxRoom.acceptInviteFloorRequest() method allows the Participant to accept the invitation to the Floor and talk.

Class: EnxRoom

Method: -(void)acceptInviteFloorRequest:(NSString* _Nonnull)clientId 

Parameter:

clientId – Client Id of the Participant who has received the invitation to the Floor.

Delegate Methods:

  • didProcessFloorRequested – Acknowledgment to the Participant when they accept the invitation to the Floor.

Response Body:

{ 
    msg = Success; 
    request =     { 
        id = processFloorRequest; 
        params =  { 
            action = acceptFloor; 
            clientId = "18c9b8bb-142e-44a7-b30b-6701cd9e62d9"; 
        }; 
    }; 
    result = 0;
} 
  • didAcceptedFloorInvite – Notification to all the Moderators in the Room including the one who sent the invitation when the Participant accepts invitation.

Response Body:

{ 
        clientId = "8ed7241c-36d9-4224-b8f3-7d015718d09e"; 
        id = floorAccepted; 
        msg = "Floor accepted"; 
        result = 1738; 
}
//Participant accepts the invitation to Floor
[EnxRoom.acceptInviteFloorRequest:"ClientID"]; 

// Acknowledgment to the Participant when they accept the invitation to the Floor
- (void)didProcessFloorRequested:(NSArray *_Nullable)Data; 

// Notification to all the Moderators in the Room including the one who sent the invitation
-(void)didAcceptedFloorInvite:(NSArray *_Nullable)Data; 

Error Codes & Exceptions:

CodeDescription
5086 Endpoint application is not connected to a Room. 
5097acceptInviteFloorRequest() not applicable in a Chat-Only Room. Non-Contextual method call.
5006A User with a Moderator role is not authorized to invoke acceptInviteFloorRequest().
5045Unable to accept the invitation for an invalid client ID. 
5067Unable to process the request for a Room in group mode. Non-Contextual method call.

Reject Invitation to Floor

The EnxRoom.rejectInviteFloor() method allows the invited Participant to reject the invitation to the Floor.

Class: EnxRoom

Method: -(void)rejectInviteFloor:(NSString* _Nonnull)clientId; 

Parameter:

clientId – Client Id of the Participant who has received the invitation to the Floor.

Delegate Methods:

  • didProcessFloorRequested – Acknowledgment to the Participant when they reject the invitation to Floor.

Response Body:

{ 
    msg = Success; 
    request =     { 
        id = processFloorRequest; 
        params =  { 
            action = rejectFloor; 
            clientId = "87184b36-26b3-4450-b908-6d9de6a457c5"; 
        }; 
    }; 
    result = 0; 
} 
  • didRejectedInviteFloor – Notification to all the Moderators including the one who sent the invitation when the Participant rejects the invitation.

Response Body:

{ 
        clientId = "57ab3a52-2d85-4a22-a4b4-d58b90ea84ec"; 
        id = floorRejected; 
        msg = "Floor Denied"; 
        result = 1709; 
} 
// Participant rejects invitation to Floor
[EnxRoom rejectInviteFloor:"ClientID"];

// Acknowledgment to the Participant wen they reject invitation to the Floor
-(void)didProcessFloorRequested:(NSArray *_Nullable)Data;  

// Notification to the Moderators when Participant rejects invitation to the Floor
-(void)didRejectedInviteFloor:(NSArray *_Nullable)Data; 

Error Codes & Exceptions:

CodeDescription
5086 Endpoint application is not connected to a Room. 
5097rejectInviteFloor() not applicable in a Chat-Only Room. Non-Contextual method call.
5006A User with a Moderator role is not authorized to invoke rejectInviteFloor().
5045Unable to reject the invitation for an invalid client ID. 
5067Unable to process the request for a Room in group mode. Non-Contextual method call.