UNPKG

zdpjs_webrtc

Version:
4,083 lines (1,022 loc) 58.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>EasyRTC Documentation</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> <link href="../assets/easyrtc-docs-jsdoc-styles-1.css" media="all" rel="stylesheet" /> </head> <body> <header class="template"> <div class="wrapper-content"> <a href="../index.html"><img src="../assets/easyrtc-logo.png" alt="EasyRTC Documentation"></a> <h1 title="EasyRTC Documentation">Documentation</h1> </div> </header> <div class="wrapper-docs"> <nav> <h2><a href="../index.html">Docs Home</a></h2> <h3>EasyRTC Guides</h3> <ul> <li><a href="../easyrtc_faq.html">FAQ</a></li> <li><a href="../easyrtc_gettingStarted.html">Getting Started</a></li> <li><a href="../easyrtc_server_install.html">EasyRTC Server: Installation</a></li> <li><a href="../easyrtc_client_tutorial.html">EasyRTC Framework Tutorial</a></li> <li><a href="../easyrtc_rooms.html">Rooms</a></li> <li><a href="../easyrtc_server_configuration.html">EasyRTC Server: Configuration</a></li> <li><a href="../easyrtc_server_events.html">EasyRTC Server: Events</a></li> <li><a href="../easyrtc_server_ice.html">EasyRTC Server: ICE Configuration</a></li> <li><a href="../easyrtc_with_other_servers.html">Using Alongside Other Servers</a></li> <li><a href="../easyrtc_server_ssl.html">EasyRTC Server: Using SSL</a></li> <li><a href="../easyrtc_webrtc_problems.html">WebRTC Problems and Possible Fixes</a></li> <li><a href="../easyrtc_upcoming_features.html">Upcoming Features</a></li> <li><a href="../easyrtc_changelog.html">Change Log</a></li> </ul> <h3>EasyRTC Client Classes</h3> <ul> <li><a href="../client-api/Easyrtc.html">Easyrtc</a></li> <li><a href="../client-api/Easyrtc_App.html">Easyrtc_App</a></li> <li><a href="../client-api/Easyrtc_ft.html">Easyrtc_ft</a></li> <li><a href="../client-api/Easyrtc_IframeCapture.html">Easyrtc_IframeCapture</a></li> <li><a href="../client-api/Easyrtc_No_IframeCapture.html">Easyrtc_No_IframeCapture</a></li> <li><a href="../client-api/Easyrtc_Rates.html">Easyrtc_Rates</a></li> <li><a href="../client-api/Easyrtc_Recorder.html">Easyrtc_Recorder</a></li> </ul> <h3>EasyRTC Server Modules</h3> <ul> <li><a href="../server-api/module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a></li> <li><a href="../server-api/module-easyrtc_default_options.html">easyrtc_default_options</a></li> <li><a href="../server-api/module-easyrtc_private_obj.html">easyrtc_private_obj</a></li> <li><a href="../server-api/module-easyrtc_public_obj.html">easyrtc_public_obj</a></li> <li><a href="../server-api/module-easyrtc_util.html">easyrtc_util</a></li> <li><a href="../server-api/module-general_util.html">general_util</a></li> </ul> <h3>EasyRTC Server Classes</h3> <ul> <li><a href="../server-api/module-easyrtc_default_event_listeners-eventListener.html">eventListener</a></li> <li><a href="../server-api/module-easyrtc_public_obj-pub.html">pub</a></li> <li><a href="../server-api/module-easyrtc_public_obj-pub.events.html">events</a></li> <li><a href="../server-api/module-easyrtc_public_obj-pub.util.html">util</a></li> <li><a href="../server-api/module-easyrtc_util-eu.html">eu</a></li> <li><a href="../server-api/module-general_util-g.html">g</a></li> <li><a href="../server-api/pub.appObj.html">appObj</a></li> <li><a href="../server-api/pub.appObj.connectionObj.html">connectionObj</a></li> <li><a href="../server-api/pub.appObj.connectionObj.connectionRoomObj.html">connectionRoomObj</a></li> <li><a href="../server-api/pub.appObj.roomObj.html">roomObj</a></li> <li><a href="../server-api/pub.appObj.sessionObj.html">sessionObj</a></li> </ul> </nav> <div class="easyrtc-docs-content"> <div id="main"> <h1 class="page-title">Class: appObj</h1> <section> <header> <h2>appObj</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="appObj"><span class="type-signature"></span>new appObj<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> The primary method for interfacing with an EasyRTC application. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1182">line 1182</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Classes</h3> <dl> <dt><a href="pub.appObj.connectionObj.html">connectionObj</a></dt> <dd></dd> <dt><a href="pub.appObj.roomObj.html">roomObj</a></dt> <dd></dd> <dt><a href="pub.appObj.sessionObj.html">sessionObj</a></dt> <dd></dd> </dl> <h3 class="subsection-title">Members</h3> <h4 class="name" id=".appObj.events"><span class="type-signature">(static) </span>appObj.events<span class="type-signature"></span></h4> <div class="description"> Expose all event functions </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1208">line 1208</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.util"><span class="type-signature">(static) </span>appObj.util<span class="type-signature"></span></h4> <div class="description"> Expose all utility functions </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1216">line 1216</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".appObj.connection"><span class="type-signature">(static) </span>appObj.connection<span class="signature">(easyrtcid, callback)</span><span class="type-signature"></span></h4> <div class="description"> Gets connection object for a given connection key. Returns null if connection not found. The returned connection object includes functions for managing connection fields. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC unique identifier for a socket connection.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">connectionCallback</span> </td> <td class="description last">Callback with error and object containing EasyRTC connection object.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1498">line 1498</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.createConnection"><span class="type-signature">(static) </span>appObj.createConnection<span class="signature">(easyrtcid, socketId, callback)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new connection with a provided connection key </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC unique identifier for a socket connection.</td> </tr> <tr> <td class="name"><code>socketId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Socket.io socket identifier for a socket connection.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and object containing EasyRTC connection object (same as calling connection(easyrtcid))</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2476">line 2476</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.createRoom"><span class="type-signature">(static) </span>appObj.createRoom<span class="signature">(roomName, options<span class="signature-attributes">nullable</span>, callback)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new room, sending the resulting room object to a provided callback. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;nullable><br> </td> <td class="description last">Options object with options to apply to the room. May be null.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last">Callback with error and object containing EasyRTC room object (same as calling appObj.room(roomName))</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2593">line 2593</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.createSession"><span class="type-signature">(static) </span>appObj.createSession<span class="signature">(easyrtcsid, callback)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new session with a provided easyrtcsid </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcsid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC Session Identifier. Must be formatted according to "easyrtcsidRegExp" option.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and object containing EasyRTC session object (same as calling session(easyrtcsid))</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2664">line 2664</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.deleteRoom"><span class="type-signature">(static) </span>appObj.deleteRoom<span class="signature">(roomName, callback)</span><span class="type-signature"></span></h4> <div class="description"> Delete an existing room, providing the room is empty. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and true if a room was deleted.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2555">line 2555</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getAppName"><span class="type-signature">(static) </span>appObj.getAppName<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4> <div class="description"> Returns the application name for the application. Note that unlike most EasyRTC functions, this returns a value and does not use a callback. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1225">line 1225</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> The application name. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id=".appObj.getConnectionCount"><span class="type-signature">(static) </span>appObj.getConnectionCount<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Sends the count of the number of connections in the app to a provided callback. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and array containing all easyrtcids.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1236">line 1236</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getConnectionCountSync"><span class="type-signature">(static) </span>appObj.getConnectionCountSync<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4> <div class="description"> Sends the count of the number of connections in the app to a provided callback. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1247">line 1247</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> The current number of connections in a room. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Number</span> </dd> </dl> <h4 class="name" id=".appObj.getConnectionEasyrtcids"><span class="type-signature">(static) </span>appObj.getConnectionEasyrtcids<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns an array of all easyrtcids connected to the application </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and array of easyrtcids.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1258">line 1258</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getEasyrtcsids"><span class="type-signature">(static) </span>appObj.getEasyrtcsids<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns an array of all easyrtcsids within the application </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and array containing easyrtcsids.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1383">line 1383</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getField"><span class="type-signature">(static) </span>appObj.getField<span class="signature">(fieldName, callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns application level field object for a given field name to a provided callback. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fieldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Field name</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and field object (any type)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1274">line 1274</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getFields"><span class="type-signature">(static) </span>appObj.getFields<span class="signature">(limitToIsShared, callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns an object containing all field names and values within the application. Can be limited to fields with isShared option set to true. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>limitToIsShared</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last">Limits returned fields to those which have the isShared option set to true.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and object containing field names and values.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1321">line 1321</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getFieldSync"><span class="type-signature">(static) </span>appObj.getFieldSync<span class="signature">(fieldName)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> Returns application level field object for a given field name. If the field is not set, it will return a field object will a null field value. This is a synchronous function, thus may not be available in custom cases where state is not kept in memory. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fieldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Field name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1291">line 1291</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Field object </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id=".appObj.getFieldValueSync"><span class="type-signature">(static) </span>appObj.getFieldValueSync<span class="signature">(fieldName)</span><span class="type-signature"> &rarr; (nullable) {*}</span></h4> <div class="description"> Returns application level field value for a given field name. If the field is not set, it will return a null field value. This is a synchronous function, thus may not be available in custom cases where state is not kept in memory. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fieldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Field name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1306">line 1306</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Field value. Can be any JSON object. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id=".appObj.getGroupNames"><span class="type-signature">(static) </span>appObj.getGroupNames<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns an array of all group names within the application </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and array of group names.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1341">line 1341</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getOption"><span class="type-signature">(static) </span>appObj.getOption<span class="signature">(optionName)</span><span class="type-signature"> &rarr; {*}</span></h4> <div class="description"> Gets individual option value. Will first check if option is defined for the application, else it will revert to the global level option. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>optionName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Option name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1357">line 1357</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Option value (can be any JSON type) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id=".appObj.getRoomNames"><span class="type-signature">(static) </span>appObj.getRoomNames<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Returns an array of all room names within the application. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and array of room names.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1368">line 1368</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.getRoomOccupantCount"><span class="type-signature">(static) </span>appObj.getRoomOccupantCount<span class="signature">(roomName, callback)</span><span class="type-signature"></span></h4> <div class="description"> Counts how many occupants are in a room. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and client count</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2539">line 2539</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.group"><span class="type-signature">(static) </span>appObj.group<span class="signature">(groupName, callback)</span><span class="type-signature"></span></h4> <div class="description"> NOT YET IMPLEMENTED - Gets group object for a given group name. Returns null if group not found. The returned group object includes functions for managing group fields. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>groupName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Group name</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and object containing EasyRTC group object.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2735">line 2735</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.isConnected"><span class="type-signature">(static) </span>appObj.isConnected<span class="signature">(easyrtcid, callback)</span><span class="type-signature"></span></h4> <div class="description"> Gets connection status for a connection. It is possible for a connection to be considered connected without being authenticated. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC unique identifier for a socket connection.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and a boolean indicating if easyrtcid is connected.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1407">line 1407</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.isConnectedSync"><span class="type-signature">(static) </span>appObj.isConnectedSync<span class="signature">(easyrtcid)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> Gets connection status for a connection. It is possible for a connection to be considered connected without being authenticated. Synchronous function. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC unique identifier for a socket connection.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1423">line 1423</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id=".appObj.isRoom"><span class="type-signature">(static) </span>appObj.isRoom<span class="signature">(roomName, callback)</span><span class="type-signature"></span></h4> <div class="description"> Checks if a provided room is defined. The callback returns a boolean if room is defined. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and boolean of whether room is defined.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2698">line 2698</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.isRoomSync"><span class="type-signature">(static) </span>appObj.isRoomSync<span class="signature">(roomName)</span><span class="type-signature"> &rarr; {Boolean}</span></h4> <div class="description"> Checks if a provided room is defined. This is a synchronous function, thus may not be available in custom cases where room state is not kept in memory. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2710">line 2710</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Returns boolean. True if room is defined. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Boolean</span> </dd> </dl> <h4 class="name" id=".appObj.isSession"><span class="type-signature">(static) </span>appObj.isSession<span class="signature">(easyrtcsid, callback)</span><span class="type-signature"></span></h4> <div class="description"> Checks if a provided session is defined. The callback returns a boolean if session is defined </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>easyrtcsid</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">EasyRTC session identifier</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and boolean of whether session is defined.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2722">line 2722</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.room"><span class="type-signature">(static) </span>appObj.room<span class="signature">(roomName, callback)</span><span class="type-signature"></span></h4> <div class="description"> Gets room object for a given room name. Returns null if room not found. The returned room object includes functions for managing room fields. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>roomName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback with error and object containing EasyRTC room object.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line2780">line 2780</a> </li></ul></dd> </dl> <h4 class="name" id=".appObj.session"><span class="type-signature">(static) </span>appObj.session<span class="signature">(easyrtcsid, callback)</span><span class="type-signature"></span></h4> <div class="description"> NOT YET IMPLEMENTED - Gets session object for a given easyrtcsid. Returns null if session not found. The returned session object includes functions for managing session fields. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <