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.– To get advance options.getAdvancedOptions()setAdvancedOptions()– To set advance options on your local Stream to get notified on various events affecting your Streaming process.isPublishing()– To check if the Local Stream is currently being published into the Room.
Diagnosis
clientDiagnostics()– A Diagnostic Tool to detect any issue causing the RTC to fail.
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
sendFiles()– To initiate a file transfer.getAvailableFiles()– Lists all the files available for download.downloadFile()– To initiate a file download.cancelUpload()– To cancel uploading process of individual file being uploaded.cancelAllUploads()– To cancel all files being uploaded.canceldownload()– To cancel downloading process of individual file being downloaded.cancelAllDownloads()– To cancel all files being downloaded.muteSelfAudio()– To mute and unmute audio from Local Stream.muteSelfVideo()– To mute and unmute audio from Local Stream.captureScreenShot()– To take snapshot of a video stream in your application.onPause()– To switch to different application pushing your RTC Application to Background.onResume()– To switch back to RTC Application.enableLogs()– To enable Client Side Logging.postClientLogs()– To share Console Log with EnableX Tech Team for auditing purpose.enableStats()– To opt to receive Streaming Stats.enablePlayerStats()– To opt to display received Streaming Stats on respective Player.subscribeForTalkerNotification()– To receive notification for the talkers in the Room.startAnnotation()– To initiate Annotation.stopAnnotation()– To stop Annotation.– To enable the Camera to detect the proximity.enableProximitySensor()
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.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.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.switchRoomMode()– Allows the Moderator to switch the Room’s mode of operation from Group to Lecture or vice versa during a running conference.
Floor Access Controls
requestFloor()– For the Participant to request floor access to the Moderator.cancelFloor()– Allows participants to cancel their request for Floor Access pending for Moderator’s approval.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.finishFloor()– Allows the Participant to announce the completion of Floor Access and release Floor Access.releaseFloor()– For the Moderator to terminate floor access granted to some participant.inviteToFloor()– Allows the Moderator to invite any Participant in the ongoing conference to the Floor and talk.
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
changePlayerScaleType()– To choose Stream Scaling Options within the Video Player.setZOrderMediaOverlay()– To overlay Player on other Player by setting Z Index.setConfigureOption()– To configure the Stream within the Video Player.
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.
