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.
  • 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.
  • getClientName() – To get the Client Name of the user connected to the Room.

Streaming

Moderator Controls

Devices

Miscellaneous

  • postClientLogs() – To submit client endpoint logs to the EnableX Team to audit
  • changeToAudioOnly() – To change from normal to Audio-Only mode where the user can neither receive or publish their video and vice-versa.
  • 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.
  • 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.

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.
  • 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.

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