Enx is a custom native module that acts as React Native Bridge to expose native iOS and Android methods.

Room Metadata 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

The table below shows a list of methods in the Enx Class.

Connection

  • initRoom() – To connect to the Virtual Room hosted at EnableX to establish a session.
  • joinRoom() – To connect Client Endpoint to an EnableX Room and join an RTC Session with or without a published stream. 
  • disconnect() – To disconnect End-Point from the room to close its session.

Streaming

  • publish() – To publish a local stream to the connected Room.
  • subscribe() – To subscribe to the streams individually to receive media streams of other participants connected to a Room.
  • getMaxTalkers() – To know maximum permissible Active Talkers that you may receive and you can set.
  • setTalkerCount() – To set maximum Active Talkers.
  • getTalkerCount() – To get number of talkers to receive in Active Talker List.
  • changeToAudioOnly() – To change to a audio-only call.
  • getAdvancedOptions() – To get advance options.
  • setAdvancedOptions() – To set advance options on your local Stream to get notified on various events affecting your Streaming process.

Messaging

  • sendMessage() – To allow advance messaging feature between Session participants.
  • sendUserData() – To send instructions, data to one or more recipient connected in a Session to deploy new features, business workflow.

Advance Features

Moderator Control

  • startRecord() – To start session recording.
  • stopRecord() – To stop session recording.
  • hardMute() – To put room into hard mute state.
  • hardUnmute() – To put room into hard mute state.
  • hardMuteAudio() – For the Moderator to enforce hard-mute audio on any selected participant in the room.
  • hardMuteVideo() – For the Moderator to enforce hard-mute video on any selected participant in the room.
  • switchUserRole() – For the Moderator to designate a connected Participant to act as a Moderator during the session.

Floor Access Controls

  • requestFloor() – For the Participant to request floor access to the Moderator.
  • grantFloor() – For the Moderator to grant floor access to one or many users one by one. 
  • denyFloor() – For the Moderator to deny floor access to a participant. 
  • releaseFloor() – For the Moderator to terminate floor access granted to some participant.

Devices

  • getDevices() – To return a list containing all the microphones available with your client platform. 
  • getSelectedDevice() – To get the selected or used Audio Device for the Stream. 
  • switchCamera() – To switch between Rear and Front Camera as a source for published Stream.
  • switchMediaDevice() – To switch Micrcophone used to create published Stream to an alternate Microphone.

Play Stream

Callbacks

Callbacks categorized by their functions are listed below.

Connection

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

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.

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.

Explore React Native SDK