The EnxRoom is a derived Class from EnxRtc. It handles all room related functions to communicate with portal, e.g. Connection of End-Points to video Room, publishing & subscribing of streams etc.
References: Attributes – Methods – Callbacks
Room Meta Data Properties
roomID
– Room IDclientID
– Unique Client ID assigned by the portal to the End-Pointstreams
– Dummy Streams to subscribe. Active Talker Notifications gives list of Streams carrying MediaremoteStreams
– List of Remote StreamslocalStreams
– List of Local Streamsstatus
– Room Connect Status: Enum (1=Connecting, 2=Connected, 0=Disconnected)awaitedParticipants
– List of Clients waiting for Moderator approval to get into a knock-enabled RoomraisedHands
– List of Clients requested Floor Access in a Lecture ModeapprovedHands
– List of Clients with approved Floor Access in a Lecture Mode
Methods
Given below a categorized listing of methods:
Connection
initRoom()
– To initiate a Roomconnect()
– To connect End-Client to the Roomdisconnect()
– To disconnect End-Point from the roomjoinRoom()
– 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-PointsetAdvancedOptions()
– 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 eventssendMessage()
– To send public and private chat-message
Moderator Controls
muteRoom()
– To hard-mute a Room, no participant is allowed to talkunMuteRoom()
– To hard-unmute a Room, a participant can talk if so desiredstartRecord()
stopRecord()
– To stop ongoing session recordingswitchUserRole()
– To switch Participant’s role to Moderator
Floor Access Controls
requestFloor()
– Participant to request Moderator for Floor Access in Lecture ModegrantFloor()
– Modreator to grant Floor Access to a ParticipantdenyFloor()
– Moderator to deny Floor Access to a ParticipantreleaseFloor()
– 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 DeviceswitchCamera()
– To switch between Front and Rear Camera
Miscellaneous
enableLogs()
– To enable Client Side LoggingpostClientLogs()
– To submit Client End Point logs to the Team to auditenableStats()
– To enable receiving Stream StatsenablePlayerStats()
– To enable display of Stream Stats on PlayeronPause()
– To handle background pause state of activity or fragmentonResume()
– To handle background to foreground state of activity or fragmentcaptureScreenShot()
– To capture Snapshot for given StreamchangePlayerScaleType()
– To choose Stream Scaling Options within Video PlayersetZOrderMediaOverlay()
– 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 successfullyroomDisconnected
– Client End Point got disconnected to the roomroomError
– Client End Point’s attempt to connect to room has faileduserConnected
– Everyone is notified that a new user is connected to the RoomuserDisconnected
– Everyone is notified that a connected user is disconnected from the Roomreconnect
– Client End Point is notified of reconnect attemptuserReconnect
– Client End Point notified on successful re-connection with the portal- 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 RoomstreamAdded
– Everyone is notified that a Published Stream is unpublished or removed from the RoomstreamSubscribed
– Participant is notified that he successfully subscribed to a streamcanvasStarted
– Everyone is notified that a Canvas Streaming has startedcanvasStopped
– Everyone is notified that ongoing Canvas Streaming has stoppedreceivedStats
– When updated Streaming Stats of all streams is received at End PointacknowledgeStats
– 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 eventadvancedOptionsUpdate
– When Advance Options are setcapturedView
– When Bitmap Snapshot is taken – it returns Base64 String of SnapshotlogsUploaded
– When log is uploaded to the Server successfully
Messaging
receiveChatDataAtRoom
– When Client End Point receives chat messageacknowledgeSendData
– Sender is acknowledged that chat message is sent
Screen Share
screenShareStarted
– All participants are notified that Screen Share has startedsceenShareStopped
– All participants are notified that Screen Share has stopped
Moderator Controls
roomRecordingOn
– All participants are notified when Recording startsroomRecordingOff
– All participants are notified when Recording stopsmutedAllUser
– Moderator is acknowledged when Room is put on Hard Mute stateunmutedAllUser
– Moderator is acknowledged when Room is put off Hard Mute statehardMutedAll
– Other participants are notified that Room is put on Hard Mute statehardUnmuteAllUser
– Other participants are notified that Room is put off Hard Mute stateuserRoleChanged
– The new Moderator is notified that his role is upgraded to ModeratoracknowledgeSwitchUserRole
– Moderator is acknowledged about Role Switch
Floor Control
floorRequested
– Participant is acknowledged that Moderator received his request for Floor AccessfloorRequestReceived
– Moderator is notified about a new request received for Floor AccessgrantFloorRequested
– Participant is notified that moderator has granted him Floor AccessdenyFloorRequested
– Participant is notified that moderator has denied Floor AccessreleaseFloorRequested
– Participant is notified that moderator has revoked Floor Access from himprocessFloorRequested
– 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 TalkersgetTalkerCountResponse
– End-Point receives number of Talkers is set to receive in Active Talker ListsetTalkerCountResponse
– End-Point is notified when you update number of Talkers to receive in Active Talker ListactiveTalkerList
– 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 StreamingshareStateEvent
– Everyone or one Recipient is notified that there is significant change in Bandwidth affecting Screen SharingbandWidthUpdated
– Everyone or one Recipient is notified that there is significant change in Bandwidth affecting publishing or receiving stream.
Explore React Native SDK