The EnxRoom Class provides the following methods to access various room-related information.
Table of Contents
- Get Room ID
- Get Room Meta Data
- Get connected Client Id
- Get Name of the connected User
- Get Role of the connected User
- Get Information of the connected User
- Get list of the connected Users
Get Room ID
The roomID
property provides the ID of the Room you are connected to. The Room ID is assigned to each Room during Room Creation.
Class: EnxRoom
Property: roomId
NSString* roomID= room.roomId;
Get Room Meta Information
The roomMetadata
property provides the Meta Information of the Room to which you are connected. The Room Meta information JSON payload contains the complete Room definition along with many run-time parameters with their current values and room-stats of connected users and streams. All the endpoints receive this information through - room:didConnect:
delegate method after getting connected to the Room. Some of the run-time parameters are updated internally by the SDK on various events.
Class: EnxRoom
property: roomMetadata
NSDictionary* roomMeta = room.roomMetadata;
Get Client ID of the connected User
The clientId
property provides the Client ID of the connected endpoint. The Client ID is unique for each user connected to the Room for the session.
Class: EnxRoom
Method: clientId
NSString* ClientId = room.clientId;
Get Name of the connected User
The clientName
property provides the name of the user connected through the Client endpoint.
Class: EnxRoom
Method: clientName
NSString* ClientName = room.clientName;
Get Role of the connected User
The userRole
property provides the role of the user connected to the Room for the session, either Moderator or Participant.
Class: EnxRoom
Method: userRole
NSString* role = room.userRole;
Get Information of the connected User
The EnxRoom.whoami()
method provides the complete User Meta Information of the connected user.
Class: EnxRoom
Method: - (NSDictionary)Whoami;
Returns: User Meta Information JSON object.
NSDictionary* myinfo = [room Whoami];
Get list of connected Users
The userList
property provides a list of users connected to the Room.
Class: EnxRoom
Property: NSArray userList
(NSArray)Users = room.getUserList() // Return JSON Users /* [ { "clientId": "", // Unique Client ID assigned by the Portal "name": "", // User's name "user_ref": "", // User's Reference "role": "participant", // Enum: moderator, participant "permissions": { // In-Session Permission of User "publish": Boolean, // Whether user can pubish local stream "subscribe": Boolean, // Whether user can subscribe remote streams "record": Boolean, // Whether user can initiate recording "stats": Boolean, // Whether user can view stream status "controlhandlers": Boolean } } ] */