The EnxRoom is a Derived Class from EnxRtc. It handles all the room-related functions to communicate with the Portal such as connection of Client endpoints to Video Room, publishing and subscription of Streams etc.
References: Attributes – Methods – Observers
Private Attributes
roomID– Unique Room Identifier generated for each Room.clientID– Unique Client ID assigned by the Portal 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.grouporlecture.getRole()– To get the role of the user connected to the Room, viz.moderatororparticipant.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.– To get a list of files shared in the room after joining the session.()getAvailableFilesgetLocalStream()– 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
publish()– To publish local stream in the Room.unpublish()– To unpublish a local stream from the Room.subscribe()– To subscribe to a remote stream to start receiving it.setReceiveVideoQuality()– To opt to receive a specific video quality.getMaxTalkers()– To get the maximum number of talkers allowed in the Active Talker List.setTalkerCount()– To set the desired number of talkers you want to receive in the Active Talker List.getTalkerCount()– To get the number of talkers set to be received in the Active Talker List.switchATView()– Provides the option to switch their talker view from leader/gallery or vice versa.getPlayer()– Provides the option to get a particular EnxPlayerView.highlightBorderForClient()– Provides the choice to highlight the EnxPlayer border colour.changeBgColorForClients()– To change the background colour for an EnxPlayer.forceUpdateATList()– To force reload the active talker view after any manipulation.enableStats()– To know statistics of Local & Remote Streams.getLocalStreamID()– To get Stream ID of the Local Stream.getStreamByStreamId()– To get Stream Information for the given Stream ID.getRemoteStreams()– To get the list of Remote Streams published in the Room.isPublishing()– To know if the local Stream is being published in the Room.– To switch to an audio-only call where you can neither receive anybody’s video nor publish your video.()setAudioOnlyMode
Advance Features
– To create a Screen-Sharing Stream.startScreenShare()– To stop the ongoing Screen-Sharing.stopScreenShare()stopAllSharing()– To force stop any ongoing Screen Share other user in the Room by the moderator.– To start canvas streaming.startCanvas()– To stop canvas streaming.stopCanvas()stopAllSharing()– To force stop any ongoing Screen Share other user in the Room by the moderator.– To start Annotation on a given Stream object.startAnnotation()– To stop Annotation on a given Stream object.stopAnnotation()– To receive notification for the talkers in the Room or the participants acting as a source of the noise.subscribeForTalkerNotification()– To send customized data adhering to a structure not bound by the Portal message structure, to one or more users connected in a session.sendUserData()– To allow the user to pause the Parent Room after joining the Break-Out Room.pause()– To resume the Parent Room if it was paused while joining the Break-Out Room.resume()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.– To send notification to the user when speech is detected at their endpoint.onSpeechDetected()– To send notification to the user when noise is detected at their endpoint.onNoiseDetected()– To enable the Camera to detect the proximity.enableProximitySensor()– To share Console Log with the Portal Tech Team for audit.postClientLogs()
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.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
– To create a Break-Out Room.createBreakOutRoom()– To allow the Creator/Owner of a Break-Out Room to invite one or more users from the Parent Room to join the Break-Out Room.inviteToBreakOutRoom()– To support certain use-cases where auto-assignment of users into different Break-Out Rooms is required.createAndInviteBreakoutRoom()– To allow users to join a Break-Out room on being invited by the creator.joinBreakOutRoom()– To allow the invited user to reject the invitation to join a Break-Out Room.rejectBreakOutRoom()clearAllBreakOutSession()– Allows the participant to clear all Break-Out Rooms.destroyAllBreakOutSession()– Allows the moderator to destroy all the Breakout Room sessions.
Messaging & File Sharing
sendMessage()– To send public and private messages to other users in the Room.– To upload files to share with all or selected users in the Room.sendFiles()– To download available files.downloadFile()– To cancel the ongoing file download job taking place at your endpoint.cancelDownload()– To cancel an ongoing file upload job initiated by you.CancelUpload()
Miscellaneous
postClientLogs()– To submit client endpoint logs to the Portal Team to auditchangeToAudioOnly()– To change from normal to Audio-Only mode where the user can neither receive or publish their video and vice-versa.stopVideoTracksOnApplicationBackground()– To configure the state of streams when moving the application from foreground to background.startVideoTracksOnApplicationForeground()– To configure the state of streams when moving the application from background to foreground.joinAsideRoom()– To join Aside Room.
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 the Portal 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.
