{"id":3751,"date":"2025-04-02T13:26:39","date_gmt":"2025-04-02T05:26:39","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=3751"},"modified":"2025-04-10T20:51:10","modified_gmt":"2025-04-10T12:51:10","slug":"enxroom","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/enxroom\/","title":{"rendered":"Video API v1.9 React Native SDK \/ EnxRoom Room Handler"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\"><p>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 &amp; subscribing of streams etc.<\/p><\/blockquote>\n\n\n\n<p>References: <a href=\"#attributes\">Attributes<\/a> &#8211; <a href=\"#methodsd\">Methods<\/a> &#8211; <a href=\"#callbacks\">Callbacks<\/a><\/p>\n\n\n\n<a name=\"attributes\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Room Meta Data Properties<\/h2>\n\n\n\n<ul><li><code>roomID<\/code> &#8211; Room ID <\/li><li><code>clientID<\/code> &#8211; Unique Client ID assigned by the portal to the End-Point <\/li><li><code>streams<\/code> &#8211; Dummy Streams to subscribe. Active Talker Notifications gives list of Streams carrying Media<\/li><li><code>remoteStreams<\/code> &#8211; List of Remote Streams<\/li><li><code>localStreams<\/code> &#8211; List of Local Streams<\/li><li><code>status<\/code> &#8211; Room Connect Status: Enum (1=Connecting, 2=Connected, 0=Disconnected) <\/li><li><code>awaitedParticipants<\/code> &#8211; List of Clients waiting for Moderator approval to get into a knock-enabled Room<\/li><li><code>raisedHands<\/code> &#8211; List of Clients requested Floor Access in a Lecture Mode <\/li><li><code>approvedHands<\/code> &#8211; List of Clients with approved Floor Access in a Lecture Mode<\/li><\/ul>\n\n\n\n<a name=\"methodsd\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Methods<\/h2>\n\n\n\n<p>Given below a categorized listing of methods:  <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Connection<\/strong><\/p>\n\n\n\n<ul><li><code>initRoom()<\/code> &#8211; To initiate a Room <\/li><li><code>connect()<\/code> &#8211; To connect End-Client to the Room <\/li><li><code>disconnect()<\/code> &#8211; To disconnect End-Point from the room <\/li><li><code>joinRoom()<\/code> &#8211; To connect and join Room with a Stream <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Streaming<\/strong><\/p>\n\n\n\n<ul><li> <code>publish()<\/code>  &#8211; To publish local stream into Room <\/li><li><code>subscribe()<\/code> &#8211; To subscribe a remote stream to receive <\/li><li>\n<code>getMaxTalkers()<\/code> &#8211; To get number of talkers allowed to receive in Active Talker List <\/li><li>\n<code>setTalkerCount()<\/code> &#8211; To opt for number of talkers to receive in Active Talker List  <\/li><li>\n<code>getTalkerCount()<\/code> &#8211; To get number of talkers to receive in Active Talker List <\/li><li>\n<code>getLocalStreamID()<\/code> &#8211; To get Stream ID of Local Stream        <\/li><li><code>changeToAudioOnly()<\/code> &#8211; To switch between Audio Only call and Audio\/Video Call from an End-Point  <\/li><li><code>setAdvancedOptions() <\/code>&#8211; To set advanced options like battery updated,video quality changed etc.<\/li><li><code>getAdvancedOptions()<\/code> &#8211;  To get advanced options <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Messaging<\/strong><\/p>\n\n\n\n<ul><li><code>sendUserData()<\/code> &#8211; To send custom data structure or to handle custom events<\/li><li><code>sendMessage()<\/code> &#8211; To send public and private chat-message<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Moderator Controls<\/strong><\/p>\n\n\n\n<ul><li><code>muteRoom()<\/code> &#8211; To hard-mute a Room, no participant is allowed to talk <\/li><li><code>unMuteRoom()<\/code> &#8211; To hard-unmute a Room, a participant can talk if so desired <\/li><li><code>startRecord()<\/code><code> <\/code>&#8211; To start session recording <\/li><li><code>stopRecord()<\/code> &#8211; To stop ongoing session recording <\/li><li><code>switchUserRole()<\/code> &#8211; To switch Participant&#8217;s role to Moderator<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Floor Access Controls<\/strong><\/p>\n\n\n\n<ul><li><code>requestFloor()<\/code> &#8211; Participant to request Moderator for Floor Access in Lecture Mode <\/li><li><code>grantFloor()<\/code> &#8211; Modreator to grant Floor Access to a Participant <\/li><li><code>denyFloor()<\/code> &#8211; Moderator to deny Floor Access to a Participant <\/li><li><code>releaseFloor()<\/code> &#8211; Moderator to release Floor Access from a Participant  <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Devices<\/strong><\/p>\n\n\n\n<ul><li> <code>getDevices()<\/code> &#8211; To get a list of connected Audio devices <\/li><li> <code>getSelectedDevice()<\/code> &#8211; To get name of the given Device <\/li><li><code>switchMediaDevice()<\/code> &#8211; To switch to given Audio Device <\/li><li><code>switchCamera()<\/code> &#8211; To switch between Front and Rear Camera <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Miscellaneous<\/strong><\/p>\n\n\n\n<ul><li><code>enableLogs()<\/code> &#8211; To enable Client Side Logging <\/li><li><code>postClientLogs()<\/code> &#8211; To submit Client End Point logs to the Team to audit  <\/li><li><code>enableStats()<\/code> &#8211; To enable receiving Stream Stats <\/li><li><code>enablePlayerStats()<\/code>  &#8211; To enable display of Stream Stats on Player <\/li><li><code>onPause()<\/code>&#8211;  &nbsp;To handle background pause state of activity or fragment <\/li><li><code>onResume()<\/code> &#8211;   To handle background to foreground state of activity or fragment <\/li><li><code>captureScreenShot() <\/code>&#8211; To capture Snapshot for given Stream<\/li><li><code>changePlayerScaleType()<\/code> &#8211; To choose Stream Scaling Options within Video Player<\/li><li><code>setZOrderMediaOverlay()<\/code> &#8211; To overlay Player on other Player by setting Z Index<\/li><\/ul>\n\n\n\n<a name=\"callbacks\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Callbacks<\/h2>\n\n\n\n<p>Given below is a list of Callbacks categorized by their functions. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Connection<\/strong><\/p>\n\n\n\n<ul><li><code>roomConnected<\/code> &#8211; When Client End Point is connected to the room successfully <\/li><li><code>roomDisconnected<\/code> &#8211; Client End Point got disconnected to the room <\/li><li><code>roomError<\/code> &#8211; Client End Point\u2019s attempt to connect to room has failed <\/li><li><code>userConnected<\/code>&#8211; Everyone is notified that a new user is connected to the Room <\/li><li><code>userDisconnected<\/code> &#8211; Everyone is notified that a connected user is disconnected from the Room <\/li><li><code>reconnect<\/code> &#8211; Client End Point is notified of reconnect attempt<\/li><li><code>userReconnect<\/code> &#8211;  Client End Point notified on successful re-connection with the portal<\/li><li>connectionLost &#8211; Client End Point is notified when Network Connection is lost<\/li><li><code>connectionInterrupted<\/code> &#8211; Client End Point is notified when Network Connection is interrupted for switching between 4G, WiFi.<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Streaming<\/strong><\/p>\n\n\n\n<ul><li><code>streamPublished<\/code> &#8211; Publisher is notified that its Stream has been published into the Room <\/li><li><code>streamAdded<\/code> &#8211; Everyone is notified that a Published Stream is unpublished or removed from the Room <\/li><li><code>streamSubscribed<\/code> &#8211; Participant is notified that he successfully subscribed to a stream <\/li><li><code>canvasStarted<\/code> &#8211; Everyone is notified that a Canvas Streaming has started <\/li><li><code>canvasStopped<\/code> &#8211; Everyone is notified that ongoing Canvas Streaming has stopped<\/li><li><code>receivedStats <\/code>&#8211; When updated Streaming Stats of all streams is received at End Point<\/li><li><code>acknowledgeStats <\/code>&#8211;  End Point is notified when Strats Stats is enabled or disabled<\/li><li> <code>playerStats<\/code> &#8211; When updated Streaming Stats is received for a Stream at End Point<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Miscellaneous<\/strong><\/p>\n\n\n\n<ul><li><code>eventError<\/code> &#8211; When Client End Point failed to perform an event <\/li><li><code>advancedOptionsUpdate<\/code> &#8211; When Advance Options are set<\/li><li><code>capturedView<\/code> &#8211; When Bitmap Snapshot is taken &#8211; it returns Base64 String of Snapshot<\/li><li><code>logsUploaded<\/code> &#8211; When log is uploaded to the Server successfully  <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Messaging<\/strong><\/p>\n\n\n\n<ul><li><code>receiveChatDataAtRoom<\/code> &#8211; When Client End Point receives chat message<\/li><li><code>acknowledgeSendData<\/code> &#8211; Sender is acknowledged that chat message is sent <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Screen Share<\/strong><\/p>\n\n\n\n<ul><li><code>screenShareStarted<\/code> &#8211; All participants are notified that Screen Share has started <\/li><li><code>sceenShareStopped<\/code> &#8211; All participants are notified that Screen Share has stopped  <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Moderator Controls<\/strong><\/p>\n\n\n\n<ul><li><code>roomRecordingOn<\/code> &#8211; All participants are notified when Recording starts <\/li><li><code>roomRecordingOff<\/code> &#8211; All participants are notified when Recording stops <\/li><li><code>mutedAllUser<\/code> &#8211; Moderator is acknowledged when Room is put on Hard Mute state <\/li><li><code>unmutedAllUser<\/code> &#8211; Moderator is acknowledged when Room is put off Hard Mute state <\/li><li><code>hardMutedAll <\/code>&#8211; Other participants are notified that Room is put on Hard Mute state <\/li><li><code>hardUnmuteAllUser<\/code> &#8211; Other participants are notified that Room is put off Hard Mute state <\/li><li><code>userRoleChanged<\/code>&nbsp;&#8211; The new Moderator is notified that his role is upgraded to Moderator <\/li><li><code>acknowledgeSwitchUserRole<\/code> &#8211; Moderator is acknowledged about Role Switch<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p> <strong>Floor Control <\/strong><\/p>\n\n\n\n<ul><li><code>floorRequested<\/code> &#8211; Participant is acknowledged that Moderator received his request for Floor Access <\/li><li><code>floorRequestReceived<\/code> &#8211; Moderator is notified about a new request received for Floor Access <\/li><li><code>grantFloorRequested<\/code> &#8211; Participant is notified that moderator has granted him Floor Access <\/li><li><code>denyFloorRequested<\/code> &#8211; Participant is notified that moderator has denied Floor Access <\/li><li><code>releaseFloorRequested<\/code> &#8211; Participant is notified that moderator has revoked Floor Access from him <\/li><li><code>processFloorRequested<\/code> &#8211; Moderator is acknowledged on his actions on Floor Requests viz. on grant, deny and release floor access <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Active Talkers<\/strong><\/p>\n\n\n\n<ul><li><code>getMaxTalkersResponse <\/code>&#8211; End-Point receives maximum number of permissible Active Talkers  <\/li><li><code>getTalkerCountResponse <\/code>&#8211; End-Point receives number of Talkers is set to receive in Active Talker List <\/li><li><code>setTalkerCountResponse <\/code>&#8211; End-Point is notified when you update number of Talkers to receive in Active Talker List <\/li><li><code>activeTalkerList <\/code>&#8211; Everyone is notified with a updated list of Active Talkers <\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Bandwidth Updates<\/strong><\/p>\n\n\n\n<ul><li><code>canvasStateEvent<\/code>  &#8211; Everyone or one Recipient is notified that there is significant change in Bandwidth affecting Canvas Streaming <\/li><li><code>shareStateEvent <\/code>&#8211; Everyone or one Recipient is notified that there is significant change in Bandwidth affecting Screen Sharing<\/li><li><code>bandWidthUpdated<\/code> &#8211; Everyone or one Recipient is notified that there is significant change in Bandwidth affecting publishing or receiving stream.<\/li><\/ul>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p><strong>Explore React Native SDK<\/strong><\/p>\n\n\n\n<ul><li> \u2190 <a href=\"..\/enx\/\">EnxRtc &#8211; The React Native Bridge<\/a> <\/li><li> <a href=\"..\/enxstream\/\">EnxStream &#8211; Stream Handler<\/a> \u2192 <\/li><li> \u2191 <a href=\"#top\">Top<\/a> <\/li><li> \u21b0 <a href=\"..\/\">TOC &#8211; React Native SDK<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 &amp; subscribing of streams etc. References: Attributes &#8211; Methods &#8211; Callbacks Room Meta Data Properties roomID &#8211; Room ID clientID &#8211; Unique Client ID assigned by the portal to the End-Point streams &#8211; Dummy Streams to subscribe. Active Talker Notifications gives list of Streams&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"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 &amp; subscribing of streams etc. References: Attributes &#8211; Methods &#8211; Callbacks Room Meta Data Properties roomID &#8211; Room ID clientID &#8211; Unique Client ID assigned by the portal to&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3751"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=3751"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3751\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=3751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}