openvidu-node-client TypeDoc refined

pull/73/head
pabloFuente 2018-04-25 11:03:30 +02:00
parent 20027ab19b
commit 9ef4ed9242
13 changed files with 131 additions and 52 deletions

View File

@ -41,7 +41,7 @@
"indent": [ "indent": [
true, true,
"spaces", "spaces",
4 2
], ],
"interface-name": [ "interface-name": [
true, true,

View File

@ -287,7 +287,7 @@
</li> </li>
</ul> </ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p> <p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p>
<ul> <ul>
<li><code>404</code>: no session exists for the passed <code>sessionId</code></li> <li><code>404</code>: no session exists for the passed <code>sessionId</code></li>
<li><code>400</code>: the session has no connected participants</li> <li><code>400</code>: the session has no connected participants</li>
@ -325,7 +325,7 @@
</li> </li>
</ul> </ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p> <p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p>
<ul> <ul>
<li><code>404</code>: no session exists for the passed <code>sessionId</code></li> <li><code>404</code>: no session exists for the passed <code>sessionId</code></li>
<li><code>400</code>: the session has no connected participants</li> <li><code>400</code>: the session has no connected participants</li>
@ -358,7 +358,7 @@
</li> </li>
</ul> </ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="recording.html" class="tsd-signature-type">Recording</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p> <p>A Promise that is resolved to the <a href="recording.html">Recording</a> if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as <code>message</code> property with the following values:</p>
<ul> <ul>
<li><code>404</code>: no session exists for the passed <code>sessionId</code></li> <li><code>404</code>: no session exists for the passed <code>sessionId</code></li>
<li><code>400</code>: the session has no connected participants</li> <li><code>400</code>: the session has no connected participants</li>

View File

@ -119,7 +119,7 @@
<li class="tsd-description"> <li class="tsd-description">
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L75">Recording.ts:75</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L77">Recording.ts:77</a></li>
</ul> </ul>
</aside> </aside>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>
@ -216,12 +216,14 @@
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L70">Recording.ts:70</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L72">Recording.ts:72</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p>Name of the Recording. The video file will be named after this property</p> <p>Name of the Recording. The video file will be named after this property.
You can access this same value in your clients on recording events
(<code>recordingStarted</code>, <code>recordingStopped</code>)</p>
</div> </div>
</div> </div>
</section> </section>
@ -231,7 +233,7 @@
<div class="tsd-signature tsd-kind-icon">recording<wbr>Layout<span class="tsd-signature-symbol">:</span> <a href="../enums/recordinglayout.html" class="tsd-signature-type">RecordingLayout</a></div> <div class="tsd-signature tsd-kind-icon">recording<wbr>Layout<span class="tsd-signature-symbol">:</span> <a href="../enums/recordinglayout.html" class="tsd-signature-type">RecordingLayout</a></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L75">Recording.ts:75</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L77">Recording.ts:77</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">

View File

@ -174,7 +174,7 @@
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p>Gets a new token associated to Session object. This translates into a new request to OpenVidu Server</p> <p>Gets a new token associated to Session object. This always translates into a new request to OpenVidu Server</p>
</div> </div>
</div> </div>
<h4 class="tsd-parameters-title">Parameters</h4> <h4 class="tsd-parameters-title">Parameters</h4>

View File

@ -92,9 +92,16 @@
<div class="tsd-signature tsd-kind-icon">available<span class="tsd-signature-symbol">:</span> </div> <div class="tsd-signature tsd-kind-icon">available<span class="tsd-signature-symbol">:</span> </div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L99">Recording.ts:99</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L119">Recording.ts:119</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The recording is available for downloading. This status is reached for all
stopped recordings if <a href="http://openvidu.io/docs/reference-docs/openvidu-server-params/">OpenVidu Server configuration</a>
property <code>openvidu.recording.free-access</code> is true</p>
</div>
</div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum">
<a name="failed" class="tsd-anchor"></a> <a name="failed" class="tsd-anchor"></a>
@ -102,9 +109,14 @@
<div class="tsd-signature tsd-kind-icon">failed<span class="tsd-signature-symbol">:</span> </div> <div class="tsd-signature tsd-kind-icon">failed<span class="tsd-signature-symbol">:</span> </div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L101">Recording.ts:101</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L124">Recording.ts:124</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The recording has failed</p>
</div>
</div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum">
<a name="started" class="tsd-anchor"></a> <a name="started" class="tsd-anchor"></a>
@ -112,9 +124,14 @@
<div class="tsd-signature tsd-kind-icon">started<span class="tsd-signature-symbol">:</span> </div> <div class="tsd-signature tsd-kind-icon">started<span class="tsd-signature-symbol">:</span> </div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L97">Recording.ts:97</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L107">Recording.ts:107</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The recording has started and is going on</p>
</div>
</div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum">
<a name="starting" class="tsd-anchor"></a> <a name="starting" class="tsd-anchor"></a>
@ -122,9 +139,14 @@
<div class="tsd-signature tsd-kind-icon">starting<span class="tsd-signature-symbol">:</span> </div> <div class="tsd-signature tsd-kind-icon">starting<span class="tsd-signature-symbol">:</span> </div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L96">Recording.ts:96</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L102">Recording.ts:102</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The recording is starting (cannot be stopped)</p>
</div>
</div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum">
<a name="stopped" class="tsd-anchor"></a> <a name="stopped" class="tsd-anchor"></a>
@ -132,9 +154,14 @@
<div class="tsd-signature tsd-kind-icon">stopped<span class="tsd-signature-symbol">:</span> </div> <div class="tsd-signature tsd-kind-icon">stopped<span class="tsd-signature-symbol">:</span> </div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L98">Recording.ts:98</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/Recording.ts#L112">Recording.ts:112</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The recording has finished OK</p>
</div>
</div>
</section> </section>
</section> </section>
</div> </div>

View File

@ -96,7 +96,7 @@
<div class="tsd-signature tsd-kind-icon">default<wbr>Custom<wbr>Layout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <div class="tsd-signature tsd-kind-icon">default<wbr>Custom<wbr>Layout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L37">SessionProperties.ts:37</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L45">SessionProperties.ts:45</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
@ -112,7 +112,7 @@
<div class="tsd-signature tsd-kind-icon">default<wbr>Recording<wbr>Layout<span class="tsd-signature-symbol">:</span> <a href="../enums/recordinglayout.html" class="tsd-signature-type">RecordingLayout</a></div> <div class="tsd-signature tsd-kind-icon">default<wbr>Recording<wbr>Layout<span class="tsd-signature-symbol">:</span> <a href="../enums/recordinglayout.html" class="tsd-signature-type">RecordingLayout</a></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L31">SessionProperties.ts:31</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L39">SessionProperties.ts:39</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
@ -128,9 +128,15 @@
<div class="tsd-signature tsd-kind-icon">media<wbr>Mode<span class="tsd-signature-symbol">:</span> <a href="../enums/mediamode.html" class="tsd-signature-type">MediaMode</a></div> <div class="tsd-signature tsd-kind-icon">media<wbr>Mode<span class="tsd-signature-symbol">:</span> <a href="../enums/mediamode.html" class="tsd-signature-type">MediaMode</a></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L24">SessionProperties.ts:24</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L28">SessionProperties.ts:28</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>How the media streams will be sent and received by your clients: routed through OpenVidu Media Server
(<code>MediaMode.ROUTED</code>) or attempting direct p2p connections (<code>MediaMode.RELAYED</code>, <em>not available yet</em>)</p>
</div>
</div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="recordingmode" class="tsd-anchor"></a> <a name="recordingmode" class="tsd-anchor"></a>
@ -138,9 +144,14 @@
<div class="tsd-signature tsd-kind-icon">recording<wbr>Mode<span class="tsd-signature-symbol">:</span> <a href="../enums/recordingmode.html" class="tsd-signature-type">RecordingMode</a></div> <div class="tsd-signature tsd-kind-icon">recording<wbr>Mode<span class="tsd-signature-symbol">:</span> <a href="../enums/recordingmode.html" class="tsd-signature-type">RecordingMode</a></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L25">SessionProperties.ts:25</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/SessionProperties.ts#L33">SessionProperties.ts:33</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Whether the Session will be automatically recorded (<code>RecordingMode.ALWAYS</code>) or not (<code>RecordingMode.MANUAL</code>)</p>
</div>
</div>
</section> </section>
</section> </section>
</div> </div>

View File

@ -114,9 +114,14 @@
<div class="tsd-signature tsd-kind-icon">role<span class="tsd-signature-symbol">:</span> <a href="../enums/openvidurole.html" class="tsd-signature-type">OpenViduRole</a></div> <div class="tsd-signature tsd-kind-icon">role<span class="tsd-signature-symbol">:</span> <a href="../enums/openvidurole.html" class="tsd-signature-type">OpenViduRole</a></div>
<aside class="tsd-sources"> <aside class="tsd-sources">
<ul> <ul>
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/TokenOptions.ts#L30">TokenOptions.ts:30</a></li> <li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-node-client/src/TokenOptions.ts#L33">TokenOptions.ts:33</a></li>
</ul> </ul>
</aside> </aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The role assigned to this token</p>
</div>
</div>
</section> </section>
</section> </section>
</div> </div>

View File

@ -57,7 +57,7 @@ export class OpenVidu {
* @param sessionId The `sessionId` of the [[Session]] you want to start recording * @param sessionId The `sessionId` of the [[Session]] you want to start recording
* @param name The name you want to give to the video file. You can access this same value in your clients on recording events (`recordingStarted`, `recordingStopped`) * @param name The name you want to give to the video file. You can access this same value in your clients on recording events (`recordingStarted`, `recordingStopped`)
* *
* @returns A Promise that is resolved to the [[Recording]] if it successfully started and rejected with an Error object if not. This Error object has as `message` property with the following values: * @returns A Promise that is resolved to the [[Recording]] if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as `message` property with the following values:
* - `404`: no session exists for the passed `sessionId` * - `404`: no session exists for the passed `sessionId`
* - `400`: the session has no connected participants * - `400`: the session has no connected participants
* - `409`: the session is not configured for using [[MediaMode.ROUTED]] or it is already being recorded * - `409`: the session is not configured for using [[MediaMode.ROUTED]] or it is already being recorded

View File

@ -65,7 +65,9 @@ export class Recording {
status: Recording.Status; status: Recording.Status;
/** /**
* Name of the Recording. The video file will be named after this property * Name of the Recording. The video file will be named after this property.
* You can access this same value in your clients on recording events
* (`recordingStarted`, `recordingStopped`)
*/ */
name: string; name: string;
@ -93,11 +95,32 @@ export class Recording {
export namespace Recording { export namespace Recording {
export enum Status { export enum Status {
starting, // The recording is starting (cannot be stopped)
started, // The recording has started and is going on /**
stopped, // The recording has finished OK * The recording is starting (cannot be stopped)
available, // The recording is available for downloading. This status is reached for all */
// stopped recordings if property 'openvidu.recording.free-access' is true starting,
failed // The recording has failed
/**
* The recording has started and is going on
*/
started,
/**
* The recording has finished OK
*/
stopped,
/**
* The recording is available for downloading. This status is reached for all
* stopped recordings if [OpenVidu Server configuration](http://openvidu.io/docs/reference-docs/openvidu-server-params/)
* property <code>openvidu.recording.free-access</code> is true
*/
available,
/**
* The recording has failed
*/
failed
} }
} }

View File

@ -103,7 +103,7 @@ export class Session {
} }
/** /**
* Gets a new token associated to Session object. This translates into a new request to OpenVidu Server * Gets a new token associated to Session object. This always translates into a new request to OpenVidu Server
* *
* @returns A Promise that is resolved to the _token_ if success and rejected with an Error object if not (due to a `400 (Bad Request)` error in OpenVidu Server) * @returns A Promise that is resolved to the _token_ if success and rejected with an Error object if not (due to a `400 (Bad Request)` error in OpenVidu Server)
*/ */

View File

@ -21,7 +21,15 @@ import { RecordingMode } from './RecordingMode';
export interface SessionProperties { export interface SessionProperties {
/**
* How the media streams will be sent and received by your clients: routed through OpenVidu Media Server
* (`MediaMode.ROUTED`) or attempting direct p2p connections (`MediaMode.RELAYED`, _not available yet_)
*/
mediaMode?: MediaMode; mediaMode?: MediaMode;
/**
* Whether the Session will be automatically recorded (`RecordingMode.ALWAYS`) or not (`RecordingMode.MANUAL`)
*/
recordingMode?: RecordingMode; recordingMode?: RecordingMode;
/** /**

View File

@ -27,5 +27,8 @@ export interface TokenOptions {
*/ */
data: string; data: string;
/**
* The role assigned to this token
*/
role: OpenViduRole; role: OpenViduRole;
} }