zdpjs_webrtc
Version:
基于easyrtc二次开发的webrtc框架
1,647 lines (466 loc) • 22.4 kB
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: eu</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="module-easyrtc_util.html">easyrtc_util</a>~</span>eu</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="eu"><span class="type-signature"></span>new eu<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Object to hold EasyRTC Utility methods and classes.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line22">line 22</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".ApplicationError"><span class="type-signature">(static) </span>ApplicationError<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for EasyRTC Application Errors.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line60">line 60</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".ApplicationWarning"><span class="type-signature">(static) </span>ApplicationWarning<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for EasyRTC Application Warnings.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line105">line 105</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".ConnectionError"><span class="type-signature">(static) </span>ConnectionError<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for Connection Errors.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line75">line 75</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".ConnectionWarning"><span class="type-signature">(static) </span>ConnectionWarning<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for Connection Warnings.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line120">line 120</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".getAvailableEasyrtcid"><span class="type-signature">(static) </span>getAvailableEasyrtcid<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<div class="description">
Returns a random available easyrtcid.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line163">line 163</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Available easyrtcid. A unique identifier for an EasyRTC connection.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id=".isError"><span class="type-signature">(static) </span>isError<span class="signature">(err)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
Determines if an Error object is an instance of ApplicationError, ConnectionError, or ServerError. If it is, it will return 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>err</code></td>
<td class="type">
<span class="param-type">Error</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line134">line 134</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=".isWarning"><span class="type-signature">(static) </span>isWarning<span class="signature">(err)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
Determines if an Error object is an instance of ApplicationWarning, ConnectionWarning, or ServerWarning. If it is, it will return 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>err</code></td>
<td class="type">
<span class="param-type">Error</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line149">line 149</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=".ServerError"><span class="type-signature">(static) </span>ServerError<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for EasyRTC Server Errors.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line45">line 45</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".ServerWarning"><span class="type-signature">(static) </span>ServerWarning<span class="signature">(msg)</span><span class="type-signature"> → {Error}</span></h4>
<div class="description">
Custom Error Object for EasyRTC Server Warnings.
</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>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Text message describing the error.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="easyrtc_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line90">line 90</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
<h4 class="name" id=".socketDisconnect"><span class="type-signature">(static) </span>socketDisconnect<span class="signature">(socket)</span><span class="type-signature"></span></h4>
<div class="description">
Disconnects socket. Failure results in a debug level log message.
</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>socket</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Socket.io 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_util.js.html">easyrtc_util.js</a>, <a href="easyrtc_util.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav class="hide"><h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a></li><li><a href="module-easyrtc_default_options.html">easyrtc_default_options</a></li><li><a href="module-easyrtc_private_obj.html">easyrtc_private_obj</a></li><li><a href="module-easyrtc_public_obj.html">easyrtc_public_obj</a></li><li><a href="module-easyrtc_util.html">easyrtc_util</a></li><li><a href="module-general_util.html">general_util</a></li></ul><h3>Classes</h3><ul><li><a href="module-easyrtc_default_event_listeners-eventListener.html">eventListener</a></li><li><a href="module-easyrtc_public_obj-pub.html">pub</a></li><li><a href="module-easyrtc_public_obj-pub.events.html">events</a></li><li><a href="module-easyrtc_public_obj-pub.util.html">util</a></li><li><a href="module-easyrtc_util-eu.html">eu</a></li><li><a href="module-general_util-g.html">g</a></li><li><a href="pub.appObj.html">appObj</a></li><li><a href="pub.appObj.connectionObj.html">connectionObj</a></li><li><a href="pub.appObj.connectionObj.connectionRoomObj.html">connectionRoomObj</a></li><li><a href="pub.appObj.roomObj.html">roomObj</a></li><li><a href="pub.appObj.sessionObj.html">sessionObj</a></li></ul></nav>
</div>
</div>
<footer class="template">
<div class="wrapper-content">
<p>Copyright ©2016 EasyRTC</p>
</div>
</footer>
<!-- <script>prettyPrint();</script> -->
<!-- <script src="scripts/linenumber.js"></script> -->
</body>
</html>