{"id":4850,"date":"2021-12-10T15:19:38","date_gmt":"2021-12-10T07:19:38","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4850"},"modified":"2025-02-22T21:09:21","modified_gmt":"2025-02-22T13:09:21","slug":"room-information","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/cordova-toolkit\/room-information\/","title":{"rendered":"Room Information: Cordova\/Ionic SDK &#8211; Video API"},"content":{"rendered":"\n<p>Video API provides different methods to access Room Information.<\/p>\n\n\n\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#get-room-id\">Get Room ID<\/a><\/li><li><a href=\"#room-meta-data\">Get Room Meta Information<\/a><\/li><li><a href=\"#is-room-connected\">Know if Room is Connected<\/a><\/li><li><a href=\"#get-room-mode\">Get Room Mode<\/a><\/li><li><a href=\"#get-connected-user-id\">Get Connected User Id or Client Id<\/a><\/li><li><a href=\"#get-connected-user-name\">Get Connected User Name<\/a><\/li><li><a href=\"#get-connected-user-role\">Get Connected User Role<\/a><\/li><li><a href=\"#whoami\">Get connected User Information<\/a><\/li><li><a href=\"#get-connected-user-list\">Get list of connected Users<\/a><\/li><li><a href=\"#local-stream-id\">Get Local Stream ID<\/a><\/li><\/ul>\n\n\n\n<a name=\"get-room-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get  Room ID<\/h3>\n\n\n\n<p>Every Room is assigned with a Unique Room ID while creating the Room. The Room ID of the room to which you are connected may be known by using <code>window.EnxRtc.getRoomId()<\/code> method.<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getRoomId( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getRoomId(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"room-meta-data\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Room Meta Information<\/h3>\n\n\n\n<p>To know Meta Information of the Room to which you are connected, you may use <code>window.EnxRtc.getRoomMetaData() <\/code>method. Room Meta information contains complete room definition along with many run-time parameters with their current values &amp; room stats of connected users and streams. This is received by all endpoints after getting connected to Room along with <code>onRoomConnected<\/code> event listener. Some of the run-time parameters are updated internally by the Toolkit on various events.<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>getRoomMetaData( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getRoomMetadata(function (data) {\nconsole.log('Excelsior succuss! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"is-room-connected\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Know if the Room is Connected<\/h3>\n\n\n\n<p>To know the status of the Room if it is connected or not, you may use <code>window.EnxRtc.isConnected()<\/code> method.<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>isConnected( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.isConnected(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"get-room-mode\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Room Mode<\/h3>\n\n\n\n<p>A connected Room may be in group or lecture mode. Use <code>window.EnxRtc.getMode()<\/code> to know the room mode.<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>getMode( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getMode(function (data) {\nconsole.log('Excelsior succuss! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"get-connected-user-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Connected User ID or Client ID<\/h3>\n\n\n\n<p>Each connected user to the Room is assigned a Unique Client ID for the session. To know the Client ID of the connected user from the endpoint, use <code>window.EnxRtc.getClientId()<\/code> method. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getClientId( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getClientId (function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"get-connected-user-name\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Connected User Name<\/h3>\n\n\n\n<p>To know the name of the connected user from the endpoint, use <code>window.EnxRtc.getClientName()<\/code> method. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getClientName( successCallback, errorCallback )<\/code> <\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getClientName(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));});<\/pre>\n\n\n\n<a name=\"get-connected-user-role\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Connected User Role<\/h3>\n\n\n\n<p>A User connected to a Room with either role of <em>moderator <\/em>or <em>participant<\/em>. Use <code>window.EnxRtc.getRole()<\/code> to know the role of the user <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getRole( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<p><strong>Returns<\/strong>: Enumerated Values: moderator, participant<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getRole(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"whoami\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Connected User Information at an End-Point<\/h3>\n\n\n\n<p>To get connected user information at an End-Point, use <code>window.EnxRtc.whoami()<\/code> method. It returns complete user-meta for the connected user in a JSON Object.<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>whoami( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.whoAmI(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<p><strong>Note<\/strong>: <a href=\"..\/..\/appendix\/#user-meta\">Refer JSON Object structure for User Meta<\/a> <\/p>\n\n\n\n<a name=\"get-connected-user-list\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Connected User List<\/h3>\n\n\n\n<p>To get a list of connected users to the Room to which the endpoint is also connected to, use <code>window.EnxRtc.getUserList()<\/code> method. It returns a JSON with a list of connected user&#8217;s information.<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getUserList( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getUserList(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"local-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Local Stream ID<\/h3>\n\n\n\n<p>Every Stream is identified by its Stream ID, be it a local or a remote stream, a canvas stream or a screen share stream. You may obtain the ID of the Local Stream using <code>window.EnxRtc.getLocalStreamID()<\/code>method.<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>getLocalStreamID( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getLocalStreamID(function (data) {\nconsole.log('Excelsior success! ' + JSON.stringify(data.data));\n}, function (err) {\nconsole.log('Uh oh\u2026 error' + JSON.stringify(err));\n});<\/pre>\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<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/active-talkers\/\"><\/a><a href=\"..\/active-talkers\/\">Handle Active Talkers<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/advance-stream-options\/\">Advance Stream Options<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Video API provides different methods to access Room Information. Table of Contents Get Room ID Get Room Meta Information Know if Room is Connected Get Room Mode Get Connected User Id or Client Id Get Connected User Name Get Connected User Role Get connected User Information Get list of connected Users Get Local Stream ID Get Room ID Every Room is assigned with a Unique Room ID while creating the&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3719,"menu_order":0,"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":"Video API provides different methods to access Room Information. Table of Contents Get Room ID Get Room Meta Information Know if Room is Connected Get Room Mode Get Connected User Id or Client Id Get Connected User Name Get Connected User Role Get connected User Information Get list of connected Users Get Local Stream ID&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4850"}],"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=4850"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4850\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3719"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}