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

  • 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.
  • 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.
  • setAudioOnlyMode() – To switch to an audio-only call where you can neither receive anybody’s video nor publish your video.

Advance Features

  • startScreenShare() – To create a Screen-Sharing Stream.
  • stopScreenShare() – To stop the ongoing Screen-Sharing.
  • startCanvas() – To start canvas streaming.
  • stopCanvas() – To stop canvas streaming.
  • 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.
  • 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.
  • postClientLogs() – To share Console Log with EnableX Tech Team for audit.

Moderator Controls

  • muteRoom() – To hard-mute a Room where no participant can talk.
  • unMuteRoom() – To switch the Room from a hard-mute state to a normal state.
  • startRecord() – To start session recording.
  • stopRecord() – To stop ongoing session recording.
  • 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

Break Out Room

  • createBreakOutRoom() – To create a Break-Out Room.
  • inviteToBreakOutRoom() – 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.
  • createAndInviteBreakoutRoom() – To support certain use-cases where auto-assignment of users into different Break-Out Rooms is required. 
  • joinBreakOutRoom() – To allow users to join a Break-Out room on being invited by the creator.
  • rejectBreakOutRoom() – To allow the invited user to reject the invitation to join a 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.

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.

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.

Explore Android SDK