The EnxRoom is a Derived Class from EnxRtc. It handles all the room-related functions to communicate with EnableX such as connection of Client endpoints to EnableX Room, publishing and subscription of Streams etc.

References: AttributesMethodsObservers

Private Attributes

  • roomID – Unique Room Identifier generated for each Room.
  • clientID – Unique Client ID assigned by EnableX to the client endpoint.
  • streams – Dummy Streams available for subscription. Active Talker Notification gives a list of Streams carrying Media.
  • remoteStreams – List of Remote Streams.
  • localStreams – List of Local Streams.
  • status – Room Connection Status: Enum (1=Connecting, 2=Connected, 0=Disconnected).
  • awaitedParticipants – List of users awaiting Moderator’s approval to enter a knock-enabled Room.
  • raisedHands – List of users requesting Floor Access in Lecture Mode.
  • approvedHands – List of users approved for Floor Access in Lecture Mode.

Methods

The category-wise list of methods is as given below:

Connection

  • connect() – To connect client endpoint to the Room.
  • disconnect() – To disconnect client endpoint from the Room.
  • getRoomMetaData() – To get complete Meta Data of the connected Room.
  • getRoomId() – To retrieve the Room ID.
  • getMode() – To get Room Mode viz. group or lecture.
  • getRole()– To get the role of the user connected to the Room, viz. moderator or participant.
  • getClientId() – To get the Client ID of the user connected to the Room.
  • getClientName() – To get the Client Name of the user connected to the Room.
  • getUserList() – To get a list of users connected to the Room.
  • getAvailableFiles() – To get a list of files shared in the room after joining the session.
  • getLocalStream() – To initialize a local stream at the Client endpoint before it can be published to the Room.
  • whoami() – To provide the complete User Meta Information of the connected user.

Streaming

Advance Features

  • startScreenShare() – To create a Screen-Sharing Stream.
  • stopScreenShare() – To stop the ongoing Screen-Sharing.
  • stopAllSharing() – To force stop any ongoing Screen Share other user in the Room by the moderator.
  • startCanvas() – To start canvas streaming.
  • stopCanvas() – To stop canvas streaming.
  • stopAllSharing() – To force stop any ongoing Screen Share other user in the Room by the moderator.
  • startAnnotation() – To start Annotation on a given Stream object.
  • stopAnnotation() – To stop Annotation on a given Stream object.
  • subscribeForTalkerNotification() – To receive notification for the talkers in the Room or the participants acting as a source of the noise. 
  • sendUserData() – To send customized data adhering to a structure not bound by EnableX message structure, to one or more users connected in a session.
  • pause() – To allow the user to pause the Parent Room after joining the Break-Out Room.
  • resume() – To resume the Parent Room if it was paused while joining the Break-Out Room.
  • muteRoom() – Allows the user to mute Audio and/or Video of the Parent Room after joining the Break-Out Room.
  • unMuteRoom() – To unmute Audio and/or Video of the Parent Room after disconnecting from Break-Out Room and resuming the Parent Room.
  • onSpeechDetected() – To send notification to the user when speech is detected at their endpoint.
  • onNoiseDetected() – To send notification to the user when noise is detected at their endpoint.
  • enableProximitySensor() – To enable the Camera to detect the proximity.
  • makeOutboundCall() – To initiate an Outbound Call to PSTN Number or SIP URI while being in the session, thus inviting the called participant to join the session on accepting the call.
  • cancelOutboundCall() – To cancel an ongoing Outbound Call to PSTN Number or SIP URI thus disconnects the participant from the session on passing the number.
  • postClientLogs() – To share Console Log with EnableX Tech Team for audit.

Moderator Controls

  • hardMute() – To hard-mute a Room where no participant can talk.
  • hardUnMute() – To switch the Room from a hard-mute state to a normal state.
  • hardMuteUserAudio() – Allows the Moderator to hard-mute a Participant’s Audio.
  • hardMuteUserVideo() – Allows the Moderator to hard-mute a Participant’s Video Streams.
  • hardUnMuteUserAudio() – Allows the Moderator to hard-unmute a Participant’s Audio.
  • hardUnMuteUserVideo() – Allows the Moderator to hard-unmute a Participant’s Video Streams.
  • startRecord() – To start session recording.
  • stopRecord() – To stop ongoing session recording.
  • startLiveRecording() – Allows the Moderator to start live recording the session.
  • stopLiveRecording() – Allows the Moderator to stop live recording the session.
  • switchUserRole() – To change a Participant’s Role to Moderator.
  • lockRoom() – To allow the Moderator to lock the Room which forbids any new user from joining the Session.
  • unLockRoom() – To allow the Moderator to unlock the Room to allow subsequent users to join the Session.
  • dropUser() – To allow the Moderator to disconnect / force-drop one or more participant(s) from the Session.
  • destroy() – To allow the Moderator to conclude an ongoing session.
  • approveAwaitedUser() – To allow the Moderator to approve a user’s entry.
  • denyAwaitedUser() – To decline a user’s entry to the Session.
  • switchUserRole() – To allow the Moderator to promote a Participant to act as a Moderator in the ongoing Session. 
  • startStreaming() – To allow the Moderator to forward live Video Sessions over RTMP Stream to any live streaming CDNs supporting this protocol.
  • stopStreaming() – To stop forwarding RTMP Stream.
  • pinUsers() – To allow the Moderator to pin a user(s) to the Active Talker List irrespective of the user’s activity level.
  • addSpotlightUsers() – To allow the Moderator to spotlight a user which pushes the user’s Stream to the top of Active Talker List irrespective of the user’s activity level.

Floor Access

  • requestFloor() – To allow a Participant to request the Moderator for Floor Access.
  • cancelFloor() – To allow participants to cancel their request for Floor Access pending for Moderator’s approval.
  • denyFloor() – To allow the Moderator to deny a Participant’s request for Floor Access.
  • grantFloor() – To allow the Moderator to grant Floor Access to one or more Participants one by one.
  • finishFloor() – To allow the Participant to announce the completion of Floor Access and release Floor Access.
  • releaseFloor() – To allow the Moderator to terminate the Floor Access granted to a Participant.
  • inviteToFloor() – To allow the Moderator to invite any Participant in the ongoing conference to the Floor and talk.
  • cancelFloorInvite() – To allow the Moderator to cancel a Floor Invitation sent to a Participant.
  • acceptInviteFloorRequest() – To allow the Participant to accept the invitation to the Floor and talk.
  • rejectInviteFloor() – To allow the invited Participant to reject the invitation to the Floor.

Devices

  • getDevices() – To get a list of Audio devices connected to the client endpoint.
  • getSelectedDevice() – To get the name of the currently selected device by the user.
  • switchMediaDevice() – To switch to another Audio device.
  • switchCamera() – Allows to switch between Rear and Front Camera as a source for the published Stream.

Break Out Room

Messaging & File Sharing

  • sendMessage() – To send public and private messages to other users in the Room.
  • sendFiles() – To upload files to share with all or selected users in the Room.
  • downloadFile() – To download available files.
  • cancelDownload() – To cancel the ongoing file download job taking place at your endpoint.
  • CancelUpload() – To cancel an ongoing file upload job initiated by you.

Miscellaneous

Observers & their Callbacks

Room Observer

Given below is a list of Callbacks for Room-related events categorized by their functions. The Room Observer is initiated along with Room Initialization Process.

Connection

  • onRoomConnected – Acknowledgment to the user when the client endpoint is connected to the room successfully.
  • onRoomDisConnected – Acknowledgment to the user when the client endpoint gets disconnected from the Room.
  • onRoomError – Acknowledgment to the user when the client endpoint fails to connect to the Room.
  • onUserConnected – Notification to everyone in the Room when a new user enters the Room.
  • onUserDisConnected – Notification to everyone in the Room when a user is disconnected from the Room.
  • onConnectionLost – Acknowledgment to the user when the client endpoint loses network connection.
  • onConnectionInterrupted – Acknowledgment to the user when the client endpoint’s connection is interrupted such as a switch from WiFi to 4G and vice versa.
  • onUserReconnectSuccess – Acknowledgment to the user when the client endpoint gets reconnected with EnableX successfully.
  • onReconnect – Acknowledgment to the user when the client endpoint is trying to reconnect within the given time period.

Streaming

  • onPublishedStream – Acknowledgment to the user when the user’s Stream has been published into the Room successfully.
  • onUnPublishedStream – Acknowledgment to the user when the user’s Stream has been unpublished/removed from the Room.
  • onStreamAdded – Notification to everyone in the Room when a Stream is published in the Room.
  • onRemovedStream – Notification to everyone in the Room when a Stream is unpublished/removed from the Room.
  • onSubscribedStream – Acknowledgment to the user when they have successfully subscribed to a Remote Stream.
  • onActiveTalkerList – Notification to everyone in the Room when the list of Active Talkers is updated.
  • onActiveTalkerView – Video UI View built on list of Active Talkers.
  • onCanvasStarted – Notification to everyone in the Room that a Canvas Streaming has started.
  • onCanvasStopped – Notification to everyone in the Room that the ongoing Canvas Streaming has stopped.
  • onDialStateEvents -Notification to the call initiator about the status of the dial-out process as received from Gateway. The JSON Response returns status codes as: initiated, calling, connecting, connected, and terminated.
  • onDTMFCollected – Notification when DTMF input is collected. It gets the String of digits collected.
  • onOutBoundCallCancel: Notification to the call initiator when the participant gets disconnected.

Devices

  • onNotifyDeviceUpdate – Acknowledgment to the user that the Audio device is changed.
  • onDeviceAdded – Acknowledgment to the user that a new Audio device is added.
  • onDeviceRemoved – Acknowledgment to the user that the Audio device is removed.

Miscellaneous

  • onEventError – Acknowledgment to the user when client endpoint fails to perform an event.
  • onSwitchedUserRoleChange – Acknowledgment to the Moderator when they switch a user’s role.
  • onUserRoleChanged – Notification to everyone in the Room when a user is newly appointed as moderator and additional information provided to the newly appointed moderator.
  • onReceivedChatDataRoom – Client endpoint receives messages in JSONObject.
  • onAckSwitchedRoom – Acknowledgment to the Moderator when when Room Mode switch is done.
  • onRoomModeSwitched – Notification to everyone in the room when a moderator switched Room Mode.

Aside Room Observer

Observer: EnxRoom.EnxAsideRoomObserver – To receive the following callbacks:

  • onJoinedAsideRoom – Notification when joined room aside.
  • onFailedAsideRoom – Notification when failed to join room aside.
  • onDisconnectedAsideRoom – Notification when disconnected to joined room aside.

Log Observer

Observer: EnxRoom.setLogsObserver(EnxLogsObserver-Object) – To receive the following callbacks:

  • onLogUploaded – When log is uploaded to the Server successfully

Recording Observer

Observer: EnxRoom.setRecordingObserver(EnxRecordingObserver-Object) – To receive the following callbacks:

  • onStartRecordingEvent – Acknowledgment to the Moderator when Recording starts.
  • onStopRecordingEvent – Acknowledgment to the Moderator when Recording stops.
  • onRoomRecordingOn – Notification to all the participants when Recording starts.
  • onRoomRecordingOff – Notification to all the participants when Recording stops.
  • onACKStartLiveRecording – Acknowledgment callback to the Moderator when the Live Recording starts.
  • onLiveRecordingNotification – Notification to all the participants in the conference that the Live Recording has started/stopped.
  • onRoomliverecordOn – Notification to the new user joining the Session if the session is being recorded live.
  • onACKStopLiveRecording – Acknowledgment callback when the Live Recording stops.

Hard Mute Observer

Observer: EnxRoom.setMuteRoomObserver(EnxMuteRoomObserver-Object) – To receive the following callbacks:

  • onMutedRoom – Acknowledgment to the Moderator when the Room is put on a Hard Mute state.
  • onUnMutedRoom – Acknowledgment to the Moderator when the Room is put off a Hard Mute state.
  • onReceivedMuteRoom – Notification to all the participants when the Room is put on a Hard Mute state.
  • onReceivedUnMuteRoom – Notification to all the participants when the Room is put off a Hard Mute state.

Screen Share Observer

Observer: EnxRoom.setScreenShareObserver(EnxScreenShareObserver-Object) – To receive the following callbacks:

  • onScreenSharedStarted – Notification to everyone in the Room when Screen Sharing starts.
  • onScreenSharedStopped – Notification to everyone in the Room when Screen Sharing stops.

File Share Observer

Observer: setFileShareObserver(EnxFileShareObserver-Object) – To receive the following callbacks:

  • At File Sender’s End
    • onInitFileUpload – Acknowledgment to the sender when a file upload process is initiated.
    • onFileUploaded – Acknowledgment to the sender when the file is uploaded.
    • onFileUploadFailed – Acknowledgment to the sender when the file upload process fails.
  • At File Receiver’s End
    • onFileUploadStarted – Notification to the intended receiver when a file is being uploaded.
    • onFileAvailable – Notification to the intended receiver when a file is ready for download.

Bandwidth Observer

Observer: EnxRoom.setBandwidthObserver(EnxBandwidthObserver-Object) – To receive the following callbacks:

  • onBandWidthUpdated – Notification to the user when a significant change is noticed in the downstream bandwidth at the client endpoint.

Lecture Mode Observer

Observer: EnxRoom.setChairControlObserver(EnxChairControlObserver-Object) – To receive the following callbacks:

  • onFloorRequested – Acknowledgment to the Participant when their request for Floor Access is sent to the Moderator.
  • onFloorRequestReceived – Notification to the Moderator when a new request for Floor Access is received.
  • onGrantedFloorRequest – Notification to the Participant when the Moderator grants them Floor Access.
  • onDeniedFloorRequest – Notification to the Participant when the Moderator denies Floor Access to them.
  • onReleasedFloorRequest – Notification to the Participant when the Moderator revokes their Floor Access permission.
  • onProcessFloorRequested – Acknowledgment to the Moderator on his actions regarding Floor Requests such as grant, deny, and release floor access.

Active Talker Observer

Observer: EnxRoom.setTalkerObserver(EnxTalkerObserver-Object) – To receive the following callbacks:

  • onMaxTalkerCount – Notification to the user with information on the maximum number of permissible Active Talkers in the Room.
  • onGetTalkerCount – Notification to the user with information on the number of Talkers set to be received in the Active Talker List.
  • onSetTalkerCount – Acknowledgment to the user when they update the number of Talkers to be received in the Active Talker List.

Stats Observer

Given below is a list of Callbacks for the Stats Observer. The Stats Observer is initiated along with the Stats Enabling Process.

  • onAcknowledgeStats – Acknowledgment to the user when the Stream stats are enabled or disabled.
  • onReceivedStats – Notification to the user when Stream Statistics are received.