The EnxRoom is a derived Class from EnxRtc. It handles all room related functions to communicate with EnableX, e.g. Connection of End-Points to EnableX Room, publishing & subscribing of streams etc.

References: AttributesMethodsCallbacks

Room Meta Data Properties

  • roomID – Room ID
  • clientID – Unique Client ID assigned by EnableX to the End-Point
  • streams – Dummy Streams to subscribe. Active Talker Notifications gives list of Streams carrying Media
  • remoteStreams – List of Remote Streams
  • localStreams – List of Local Streams
  • status – Room Connect Status: Enum (1=Connecting, 2=Connected, 0=Disconnected)
  • awaitedParticipants – List of Clients waiting for Moderator approval to get into a knock-enabled Room
  • raisedHands – List of Clients requested Floor Access in a Lecture Mode
  • approvedHands – List of Clients with approved Floor Access in a Lecture Mode

Methods

Given below a categorized listing of methods:

Connection

  • initRoom() – To initiate a Room
  • connect() – To connect End-Client to the Room
  • disconnect() – To disconnect End-Point from the room
  • joinRoom() – To connect and join Room with a Stream

Streaming

  • publish() – To publish local stream into Room
  • subscribe() – To subscribe a remote stream to receive
  • getMaxTalkers() – To get number of talkers allowed to receive in Active Talker List
  • setTalkerCount() – To opt for number of talkers to receive in Active Talker List
  • getTalkerCount() – To get number of talkers to receive in Active Talker List
  • getLocalStreamID() – To get Stream ID of Local Stream
  • changeToAudioOnly() – To switch between Audio Only call and Audio/Video Call from an End-Point
  • setAdvancedOptions() – To set advanced options like battery updated,video quality changed etc.
  • getAdvancedOptions() – To get advanced options

Messaging

  • sendUserData() – To send custom data structure or to handle custom events
  • sendMessage() – To send public and private chat-message

Moderator Controls

  • muteRoom() – To hard-mute a Room, no participant is allowed to talk
  • unMuteRoom() – To hard-unmute a Room, a participant can talk if so desired
  • startRecord() – To start session recording
  • stopRecord() – To stop ongoing session recording
  • switchUserRole() – To switch Participant’s role to Moderator

Floor Access Controls

  • requestFloor() – Participant to request Moderator for Floor Access in Lecture Mode
  • grantFloor() – Modreator to grant Floor Access to a Participant
  • denyFloor() – Moderator to deny Floor Access to a Participant
  • releaseFloor() – Moderator to release Floor Access from a Participant

Devices

  • getDevices() – To get a list of connected Audio devices
  • getSelectedDevice() – To get name of the given Device
  • switchMediaDevice() – To switch to given Audio Device
  • switchCamera() – To switch between Front and Rear Camera

Miscellaneous

  • enableLogs() – To enable Client Side Logging
  • postClientLogs() – To submit Client End Point logs to EnableX Team to audit
  • enableStats() – To enable receiving Stream Stats
  • enablePlayerStats() – To enable display of Stream Stats on Player
  • onPause()–  To handle background pause state of activity or fragment
  • onResume() – To handle background to foreground state of activity or fragment
  • captureScreenShot() – To capture Snapshot for given Stream
  • changePlayerScaleType() – To choose Stream Scaling Options within Video Player
  • setZOrderMediaOverlay() – To overlay Player on other Player by setting Z Index

Callbacks

Given below is a list of Callbacks categorized by their functions.

Connection

  • roomConnected – When Client End Point is connected to the room successfully
  • roomDisconnected – Client End Point got disconnected to the room
  • roomError – Client End Point’s attempt to connect to room has failed
  • userConnected– Everyone is notified that a new user is connected to the Room
  • userDisconnected – Everyone is notified that a connected user is disconnected from the Room
  • reconnect – Client End Point is notified of reconnect attempt
  • userReconnect – Client End Point notified on successful re-connection with EnableX
  • connectionLost – Client End Point is notified when Network Connection is lost
  • connectionInterrupted – Client End Point is notified when Network Connection is interrupted for switching between 4G, WiFi.

Streaming

  • streamPublished – Publisher is notified that its Stream has been published into the Room
  • streamAdded – Everyone is notified that a Published Stream is unpublished or removed from the Room
  • streamSubscribed – Participant is notified that he successfully subscribed to a stream
  • canvasStarted – Everyone is notified that a Canvas Streaming has started
  • canvasStopped – Everyone is notified that ongoing Canvas Streaming has stopped
  • receivedStats – When updated Streaming Stats of all streams is received at End Point
  • acknowledgeStats – End Point is notified when Strats Stats is enabled or disabled
  • playerStats – When updated Streaming Stats is received for a Stream at End Point

Miscellaneous

  • eventError – When Client End Point failed to perform an event
  • advancedOptionsUpdate – When Advance Options are set
  • capturedView – When Bitmap Snapshot is taken – it returns Base64 String of Snapshot
  • logsUploaded – When log is uploaded to the Server successfully

Messaging

  • receiveChatDataAtRoom – When Client End Point receives chat message
  • acknowledgeSendData – Sender is acknowledged that chat message is sent

Screen Share

  • screenShareStarted – All participants are notified that Screen Share has started
  • sceenShareStopped – All participants are notified that Screen Share has stopped

Moderator Controls

  • roomRecordingOn – All participants are notified when Recording starts
  • roomRecordingOff – All participants are notified when Recording stops
  • mutedAllUser – Moderator is acknowledged when Room is put on Hard Mute state
  • unmutedAllUser – Moderator is acknowledged when Room is put off Hard Mute state
  • hardMutedAll – Other participants are notified that Room is put on Hard Mute state
  • hardUnmuteAllUser – Other participants are notified that Room is put off Hard Mute state
  • userRoleChanged – The new Moderator is notified that his role is upgraded to Moderator
  • acknowledgeSwitchUserRole – Moderator is acknowledged about Role Switch

Floor Control

  • floorRequested – Participant is acknowledged that Moderator received his request for Floor Access
  • floorRequestReceived – Moderator is notified about a new request received for Floor Access
  • grantFloorRequested – Participant is notified that moderator has granted him Floor Access
  • denyFloorRequested – Participant is notified that moderator has denied Floor Access
  • releaseFloorRequested – Participant is notified that moderator has revoked Floor Access from him
  • processFloorRequested – Moderator is acknowledged on his actions on Floor Requests viz. on grant, deny and release floor access

Active Talkers

  • getMaxTalkersResponse – End-Point receives maximum number of permissible Active Talkers
  • getTalkerCountResponse – End-Point receives number of Talkers is set to receive in Active Talker List
  • setTalkerCountResponse – End-Point is notified when you update number of Talkers to receive in Active Talker List
  • activeTalkerList – Everyone is notified with a updated list of Active Talkers

Bandwidth Updates

  • canvasStateEvent – Everyone or one Recipient is notified that there is significant change in Bandwidth affecting Canvas Streaming
  • shareStateEvent – Everyone or one Recipient is notified that there is significant change in Bandwidth affecting Screen Sharing
  • bandWidthUpdated – Everyone or one Recipient is notified that there is significant change in Bandwidth affecting publishing or receiving stream.

Explore React Native SDK