SDK Methods

Enx Bridge

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

Room Metadata Properties

roomID Represents the Room ID of a room.
clientID A unique Client ID assigned to an endpoint by EnableX.
streams Dummy streams to subscribe. Active Talker Notifications provide the list of streams carrying media.
remoteStreams List of remote streams.
localStreams List of local streams.
status Status of room connection : 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 for floor access in the Lecture mode.
approvedHands. List of clients with approved floor access in the Lecture mode.

Methods

Methods included in the Enx class are listed in the below table.

Connection

initRoom() To connect to a virtual room hosted on the EnableX platform to establish a session.
joinRoom() To connect a client endpoint to an EnableX room and join an RTC Session with or without a published stream.
disconnect() To disconnect an endpoint from a 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 the maximum permissible active talkers you may receive and can set.
setTalkerCount() To set maximum active talkers.
getTalkerCount() To get the number of talkers to receive in the Active Talker list.
changeToAudioOnly() To change to an audio-only call.
getAdvancedOptions() To get advanced options.
setAdvancedOptions() To set advanced 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 issues causing the RTC to fail.

Messaging

sendMessage() To allow usage of advanced messaging features among session participants.
sendUserData() To send instructions and data to one or more recipients connected to a session to deploy new features and 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 the ongoing uploading process of an individual file.
cancelAllUploads() To cancel the upload of all the files being uploaded.
canceldownload() To cancel the ongoing downloading process of an individual file.
cancelAllDownloads() To cancel all files being downloaded.
muteSelfAudio() To mute and unmute audio from a local stream.
muteSelfVideo() To mute and unmute audio from a local stream.
captureScreenShot() To take a snapshot of your application's video stream.
onPause() To switch to a different application, and push your RTC application to the background.
onResume() To switch back to an RTC application.
enableLogs() To enable client-side logging.
postClientLogs() To share console log with the EnableX Technical team for auditing purposes.
enableStats() To opt to receive streaming statistics.
enablePlayerStats() To display the received streaming statistics of a player.
subscribeForTalkerNotification() To receive notification for the talkers in the room.
makeOutboundCall() To initiate an outbound call to a PSTN number or a SIP URI during a session, inviting the called participant to join the session on accepting the call.
startAnnotation() To initiate annotation.
stopAnnotation() To stop annotation..
enableProximitySensor() To enable the camera to detect proximity.

Moderator Control

startRecord() To start session recording.
stopRecord() To stop session recording.
hardMute() To put the room into a hard-mute state.
hardUnmute() To put the room into a hard-mute state.
hardMuteAudio() For the moderator to enforce hard-mute audio on a selected participant in the room.
hardMuteVideo() For the moderator to enforce hard-mute video on a selected participant in the room.
switchUserRole() For the moderator to designate a connected participant to act as a moderator during a session.
dropUser() To allow the moderator to disconnect/force-drop one or more participant.
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 a session.
pinUsers() To allow the moderator to pin a user.
addSpotlightUsers() To allow the moderator to spotlight a user, pushing the user's stream to the top of the 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 participants to request the moderator for floor access.
cancelFloor() For the participants to cancel their floor access request pending moderator's approval.
grantFloor() For the moderator to grant floor access to one or multiple participants one by one.
denyFloor() For the moderator to deny floor access to a participant.
finishFloor() For the participants to announce the completion of floor access and its availability for subsequent requests.
releaseFloor() For the moderator to terminate floor access granted to a participant.
inviteToFloor() For the moderator invite a participant of an 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 the rear and front camera as a source for the published stream.
switchMediaDevice() To switch the microphone used to create a published stream to an alternate microphone.

Play a Stream

changePlayerScaleType() To choose the scaling options for a stream within the video player.
setZOrderMediaOverlay() To overlay the player on other player by setting the Z Index.
setConfigureOption() To configure a stream within the video player.

Callbacks

Callbacks categorized by their functions are listed below.

Connection

roomConnected The client endpoint is successfully connected to the room.
roomDisconnected Client endpoint got disconnected from the room.
roomError A client endpoint's attempt to connect to the room has failed.
userConnected Everyone in a room is notified that a new user is connected to the room.
userDisconnected Everyone in a room is notified that a connected user is disconnected from the room.
reconnect The client endpoint is notified of the reconnection attempt.
userReconnect The client endpoint is notified of the successful reconnection with EnableX.
connectionLost The client endpoint is notified when network connection is lost.
connectionInterrupted The client endpoint is notified when network connection is interrupted while switching between 4G and WiFi connections.

Streaming

streamPublished The publisher is notified that its stream has been published into the room.
streamAdded Everyone in a room is notified that a published stream is unpublished or removed from the room.
streamSubscribed The participant is notified that the participant has successfully subscribed to a stream.
canvasStarted Everyone in a room is notified that canvas streaming has started.
canvasStopped Everyone in a room is notified that the ongoing canvas streaming has stopped.
receivedStats When updated, the streaming statistics of all the streams is received at the endpoint.
acknowledgeStats The endpoint is notified when streaming statistics is enabled or disabled.
playerStats When updated, streaming statistics is received for a stream at the endpoint.

Messaging

receiveChatDataAtroom When the client endpoint receives a chat message.
acknowledgeSendData Sender is acknowledged that the chat message was sent.

Screen Share

screenShareStarted All the participants are notified that screen sharing has started.
sceenShareStopped All the participants are notified that screen sharing has stopped.

Moderator Controls

roomRecordingOn All participants are notified when the recording starts.
roomRecordingOff All participants are notified when the recording stops.
mutedAllUser The moderator is acknowledged when the room is put on the Hard-Mute state.
unmutedAllUser The moderator is acknowledged when the room is put off the Hard Mute state.
hardMutedAll Participants are notified that the room is put on the Hard Mute state.
hardUnmuteAllUser Participants are notified that the room is off the Hard Mute state.
userRoleChanged The participant (new moderator) is notified that the moderator's role has been upgraded to that of the moderator.
acknowledgeSwitchUserRole The moderator has acknowledged the role switch.

Floor Control

floorRequested The participant is acknowledged that the moderator has received the participant's request for floor access.
floorRequestReceived The moderator is notified about a new request received for floor access.
grantFloorRequested The participant is notified that the moderator has granted floor access to the participant.
denyFloorRequested The participant is notified that the moderator has denied floor access to the participant.
releaseFloorRequested The participant is notified that the moderator has revoked floor access from the participant.
processFloorRequested The moderator is acknowledged for the moderator's actions on floor Requests, such as grant and deny floor access, and release floor access.

Active Talkers

getMaxTalkersResponse The endpoint receives a maximum number of permissible Active Talkers.
getTalkerCountResponse The endpoint receives a number of talkers that it is set to receive in the Active Talker list.
setTalkerCountResponse The endpoint is notified when you update the number of talkers in the Active Talker list that it is set to receive.
activeTalkerList Everyone in a room is notified with an updated list of Active Talkers.

Bandwidth Updates

canvasStateEvent One recipient or everyone in a room is notified of a significant change in bandwidth affecting canvas streaming.
shareStateEvent One recipient or everyone in a room is notified that there is a significant change in bandwidth affecting screen sharing.
bandWidthUpdated One recipient or everyone in a room is notified that a significant change in bandwidth affects publishing or receiving of streams.

Miscellaneous

eventError When a client endpoint fails to perform an event.
advancedOptionsUpdate When Advanced options are set.
capturedView When a bitmap snapshot is captured.
logsUploaded When the log is successfully uploaded to the server.