mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: VersionAdapter removed (no compatiblity for previous versions)
parent
818f824553
commit
affb5bec97
|
@ -122,7 +122,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L57">OpenVidu/OpenVidu.ts:57</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L56">OpenVidu/OpenVidu.ts:56</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-returns-title">Returns <a href="openvidu.html" class="tsd-signature-type">OpenVidu</a></h4>
|
||||
|
@ -142,7 +142,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L217">OpenVidu/OpenVidu.ts:217</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L198">OpenVidu/OpenVidu.ts:198</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -165,7 +165,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L334">OpenVidu/OpenVidu.ts:334</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L315">OpenVidu/OpenVidu.ts:315</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -187,7 +187,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L235">OpenVidu/OpenVidu.ts:235</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L216">OpenVidu/OpenVidu.ts:216</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -209,7 +209,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L304">OpenVidu/OpenVidu.ts:304</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L285">OpenVidu/OpenVidu.ts:285</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -278,7 +278,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L208">OpenVidu/OpenVidu.ts:208</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L189">OpenVidu/OpenVidu.ts:189</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -312,7 +312,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L88">OpenVidu/OpenVidu.ts:88</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L72">OpenVidu/OpenVidu.ts:72</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -343,7 +343,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L89">OpenVidu/OpenVidu.ts:89</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L73">OpenVidu/OpenVidu.ts:73</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -377,7 +377,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L90">OpenVidu/OpenVidu.ts:90</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L74">OpenVidu/OpenVidu.ts:74</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -435,7 +435,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L91">OpenVidu/OpenVidu.ts:91</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L75">OpenVidu/OpenVidu.ts:75</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -506,7 +506,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L179">OpenVidu/OpenVidu.ts:179</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L160">OpenVidu/OpenVidu.ts:160</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -528,7 +528,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L180">OpenVidu/OpenVidu.ts:180</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L161">OpenVidu/OpenVidu.ts:161</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
|
@ -549,49 +549,21 @@ OV.getUserMedia({
|
|||
<h3>init<wbr>Session</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">init<wbr>Session<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="session.html" class="tsd-signature-type">Session</a></li>
|
||||
<li class="tsd-signature tsd-kind-icon">init<wbr>Session<span class="tsd-signature-symbol">(</span>sessionId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="session.html" class="tsd-signature-type">Session</a></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L64">OpenVidu/OpenVidu.ts:64</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L66">OpenVidu/OpenVidu.ts:66</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Returns a session with id <code>sessionId</code></p>
|
||||
<p>Returns new session</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="session.html" class="tsd-signature-type">Session</a></h4>
|
||||
</li>
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L73">OpenVidu/OpenVidu.ts:73</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<hr>
|
||||
<h2 id="deprecated">DEPRECATED</h2>
|
||||
</div>
|
||||
<p><em>No <code>sessionId</code> is required. Now every necessary information is received in <a href="session.html#connect">Session.connect</a></em></p>
|
||||
<hr>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>sessionId: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Session unique ID generated in openvidu-server</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="session.html" class="tsd-signature-type">Session</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
|
@ -604,7 +576,7 @@ OV.getUserMedia({
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L349">OpenVidu/OpenVidu.ts:349</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/OpenVidu.ts#L330">OpenVidu/OpenVidu.ts:330</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
<div class="tsd-signature tsd-kind-icon">connection<span class="tsd-signature-symbol">:</span> <a href="connection.html" class="tsd-signature-type">Connection</a></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L49">OpenVidu/Session.ts:49</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L48">OpenVidu/Session.ts:48</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -143,7 +143,7 @@
|
|||
<div class="tsd-signature tsd-kind-icon">session<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L54">OpenVidu/Session.ts:54</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L53">OpenVidu/Session.ts:53</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -161,13 +161,12 @@
|
|||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">connect<span class="tsd-signature-symbol">(</span>token<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
|
||||
<li class="tsd-signature tsd-kind-icon">connect<span class="tsd-signature-symbol">(</span>token<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, metadata<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
|
||||
<li class="tsd-signature tsd-kind-icon">connect<span class="tsd-signature-symbol">(</span>token<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, metadata<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span>, callback<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L88">OpenVidu/Session.ts:88</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L87">OpenVidu/Session.ts:87</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -203,7 +202,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L89">OpenVidu/Session.ts:89</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L88">OpenVidu/Session.ts:88</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -239,35 +238,6 @@
|
|||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not</p>
|
||||
</li>
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L99">OpenVidu/Session.ts:99</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<hr>
|
||||
<h2 id="deprecated">DEPRECATED</h2>
|
||||
</div>
|
||||
<p><em>Use promisified version of the method</em></p>
|
||||
<hr>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>token: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> metadata: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> callback: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
<p>A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
|
@ -280,7 +250,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L181">OpenVidu/Session.ts:181</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L162">OpenVidu/Session.ts:162</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -316,7 +286,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L525">OpenVidu/Session.ts:525</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L490">OpenVidu/Session.ts:490</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -365,7 +335,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L467">OpenVidu/Session.ts:467</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L432">OpenVidu/Session.ts:432</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -414,7 +384,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L496">OpenVidu/Session.ts:496</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L461">OpenVidu/Session.ts:461</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -463,7 +433,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L320">OpenVidu/Session.ts:320</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L301">OpenVidu/Session.ts:301</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -492,13 +462,12 @@
|
|||
<h3>signal</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">signal<span class="tsd-signature-symbol">(</span>signal<span class="tsd-signature-symbol">: </span><a href="../interfaces/signaloptions.html" class="tsd-signature-type">SignalOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
|
||||
<li class="tsd-signature tsd-kind-icon">signal<span class="tsd-signature-symbol">(</span>signal<span class="tsd-signature-symbol">: </span><a href="../interfaces/signaloptions.html" class="tsd-signature-type">SignalOptions</a>, callback<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L403">OpenVidu/Session.ts:403</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L396">OpenVidu/Session.ts:396</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -520,33 +489,6 @@
|
|||
<p>A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. <em>This doesn't
|
||||
mean that openvidu-server could resend the message to all the listed receivers.</em></p>
|
||||
</li>
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L412">OpenVidu/Session.ts:412</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<hr>
|
||||
<h2 id="deprecated">DEPRECATED</h2>
|
||||
</div>
|
||||
<p><em>Use promisified version of the method</em></p>
|
||||
<hr>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>signal: <a href="../interfaces/signaloptions.html" class="tsd-signature-type">SignalOptions</a></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> callback: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
<p>A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. <em>This doesn't
|
||||
mean that openvidu-server could resend the message to all the listed receivers.</em></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
|
@ -562,7 +504,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L185">OpenVidu/Session.ts:185</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L166">OpenVidu/Session.ts:166</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -599,7 +541,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L186">OpenVidu/Session.ts:186</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L167">OpenVidu/Session.ts:167</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -639,7 +581,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L187">OpenVidu/Session.ts:187</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L168">OpenVidu/Session.ts:168</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -702,7 +644,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L188">OpenVidu/Session.ts:188</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L169">OpenVidu/Session.ts:169</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -778,7 +720,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L252">OpenVidu/Session.ts:252</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L233">OpenVidu/Session.ts:233</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -800,7 +742,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L253">OpenVidu/Session.ts:253</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L234">OpenVidu/Session.ts:234</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
|
@ -829,7 +771,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L370">OpenVidu/Session.ts:370</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L351">OpenVidu/Session.ts:351</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -865,7 +807,7 @@
|
|||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L285">OpenVidu/Session.ts:285</a></li>
|
||||
<li>Defined in <a href="https://github.com/OpenVidu/openvidu/tree/master/openvidu-browser/src/OpenVidu/Session.ts#L266">OpenVidu/Session.ts:266</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
|
|
@ -26,16 +26,10 @@ export declare class OpenVidu {
|
|||
*/
|
||||
advancedConfiguration: OpenViduAdvancedConfiguration;
|
||||
constructor();
|
||||
initSession(): Session;
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
*
|
||||
* _No `sessionId` is required. Now every necessary information is received in [[Session.connect]]_
|
||||
*
|
||||
* ---
|
||||
* Returns new session
|
||||
*/
|
||||
initSession(sessionId: string): Session;
|
||||
initSession(): Session;
|
||||
initPublisher(targetElement: string | HTMLElement): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement, properties: PublisherProperties): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement, completionHandler: (error: Error | undefined) => void): Publisher;
|
||||
|
|
|
@ -19,7 +19,6 @@ exports.__esModule = true;
|
|||
var __1 = require("..");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode");
|
||||
var VersionAdapter_1 = require("../OpenViduInternal/VersionAdapter");
|
||||
var RpcBuilder = require("../OpenViduInternal/KurentoUtils/kurento-jsonrpc");
|
||||
var screenSharingAuto = require("../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto");
|
||||
var screenSharing = require("../OpenViduInternal/ScreenSharing/Screen-Capturing");
|
||||
|
@ -45,13 +44,9 @@ var OpenVidu = /** @class */ (function () {
|
|||
console.info("'OpenVidu' initialized");
|
||||
}
|
||||
/**
|
||||
* Returns a session with id `sessionId`
|
||||
* @param sessionId Session unique ID generated in openvidu-server
|
||||
* Returns new session
|
||||
*/
|
||||
OpenVidu.prototype.initSession = function (sessionId) {
|
||||
if (!!sessionId) {
|
||||
console.warn("DEPRECATION WANING: In future releases 'OpenVidu.initSession' method won't require a parameter. Remove it (see https://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)");
|
||||
}
|
||||
OpenVidu.prototype.initSession = function () {
|
||||
this.session = new __1.Session(this);
|
||||
return this.session;
|
||||
};
|
||||
|
@ -79,8 +74,6 @@ var OpenVidu = /** @class */ (function () {
|
|||
if (!!param2 && (typeof param2 !== 'function')) {
|
||||
// Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)'
|
||||
properties = param2;
|
||||
// DEPRECATED WARNING
|
||||
properties = VersionAdapter_1.adaptPublisherProperties(properties);
|
||||
properties = {
|
||||
audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined,
|
||||
frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined),
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -52,15 +52,6 @@ export declare class Session implements EventDispatcher {
|
|||
constructor(openvidu: OpenVidu);
|
||||
connect(token: string): Promise<any>;
|
||||
connect(token: string, metadata: any): Promise<any>;
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
*
|
||||
* _Use promisified version of the method_
|
||||
*
|
||||
* ---
|
||||
*/
|
||||
connect(token: string, metadata?: any, callback?: any): void;
|
||||
/**
|
||||
* Leaves the session, destroying all streams and deleting the user as a participant.
|
||||
*
|
||||
|
@ -132,16 +123,18 @@ export declare class Session implements EventDispatcher {
|
|||
* See [[StreamEvent]] to learn more.
|
||||
*/
|
||||
unpublish(publisher: Publisher): void;
|
||||
signal(signal: SignalOptions): Promise<any>;
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
* Sends one signal. `signal` object has the following optional properties:
|
||||
* ```json
|
||||
* {data:string, to:Connection[], type:string}
|
||||
* ```
|
||||
* All users subscribed to that signal (`session.on('signal:type', ...)` or `session.on('signal', ...)` for all signals) and whose Connection objects are in `to` array will receive it. Their local
|
||||
* Session objects will dispatch a `signal` or `signal:type` event. See [[SignalEvent]] to learn more.
|
||||
*
|
||||
* _Use promisified version of the method_
|
||||
*
|
||||
* ---
|
||||
* @returns A Promise (to which you can optionally subscribe to) that is resolved if the message successfully reached openvidu-server and rejected with an Error object if not. _This doesn't
|
||||
* mean that openvidu-server could resend the message to all the listed receivers._
|
||||
*/
|
||||
signal(signal: SignalOptions, callback?: any): void;
|
||||
signal(signal: SignalOptions): Promise<any>;
|
||||
/**
|
||||
* See [[EventDispatcher.on]]
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,6 @@ var SignalEvent_1 = require("../OpenViduInternal/Events/SignalEvent");
|
|||
var StreamEvent_1 = require("../OpenViduInternal/Events/StreamEvent");
|
||||
var OpenViduError_1 = require("../OpenViduInternal/Enums/OpenViduError");
|
||||
var VideoInsertMode_1 = require("../OpenViduInternal/Enums/VideoInsertMode");
|
||||
var VersionAdapter_1 = require("../OpenViduInternal/VersionAdapter");
|
||||
var platform = require("platform");
|
||||
var EventEmitter = require("wolfy87-eventemitter");
|
||||
/**
|
||||
|
@ -80,11 +79,9 @@ var Session = /** @class */ (function () {
|
|||
* @returns A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not
|
||||
*
|
||||
*/
|
||||
Session.prototype.connect = function (token, metadata, param3) {
|
||||
Session.prototype.connect = function (token, metadata) {
|
||||
var _this = this;
|
||||
// DEPRECATED WARNING
|
||||
return VersionAdapter_1.solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''),
|
||||
/*return */ new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
_this.processToken(token);
|
||||
if (_this.openvidu.checkSystemRequirements()) {
|
||||
// Early configuration to deactivate automatic subscription to streams
|
||||
|
@ -102,7 +99,7 @@ var Session = /** @class */ (function () {
|
|||
else {
|
||||
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));
|
||||
}
|
||||
}));
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Leaves the session, destroying all streams and deleting the user as a participant.
|
||||
|
@ -329,11 +326,9 @@ var Session = /** @class */ (function () {
|
|||
* mean that openvidu-server could resend the message to all the listed receivers._
|
||||
*/
|
||||
/* tslint:disable:no-string-literal */
|
||||
Session.prototype.signal = function (signal, callback) {
|
||||
Session.prototype.signal = function (signal) {
|
||||
var _this = this;
|
||||
// DEPRECATED WARNING
|
||||
return VersionAdapter_1.solveIfCallback('Session.signal', callback,
|
||||
/*return */ new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var signalMessage = {};
|
||||
if (signal.to && signal.to.length > 0) {
|
||||
var connectionIds_1 = [];
|
||||
|
@ -357,7 +352,7 @@ var Session = /** @class */ (function () {
|
|||
resolve();
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
};
|
||||
/* tslint:enable:no-string-literal */
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* Defines property [[OpenViduError.name]]
|
||||
*/
|
||||
export declare enum OpenViduErrorName {
|
||||
BROWSER_NOT_SUPPORTED = "BROWSER_NOT_SUPPORTED",
|
||||
CAMERA_ACCESS_DENIED = "CAMERA_ACCESS_DENIED",
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
*
|
||||
*/
|
||||
exports.__esModule = true;
|
||||
/**
|
||||
* Defines property [[OpenViduError.name]]
|
||||
*/
|
||||
var OpenViduErrorName;
|
||||
(function (OpenViduErrorName) {
|
||||
OpenViduErrorName["BROWSER_NOT_SUPPORTED"] = "BROWSER_NOT_SUPPORTED";
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"OpenViduError.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/OpenViduError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,IAAY,iBAeX;AAfD,WAAY,iBAAiB;IACzB,oEAA+C,CAAA;IAC/C,kEAA6C,CAAA;IAC7C,0EAAqD,CAAA;IACrD,oEAA+C,CAAA;IAC/C,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,4EAAuD,CAAA;IACvD,kFAA6D,CAAA;IAC7D,kFAA6D,CAAA;IAC7D,gEAA2C,CAAA;IAC3C,8EAAyD,CAAA;IACzD,8EAAyD,CAAA;IACzD,sEAAiD,CAAA;IACjD,oDAA+B,CAAA;AACnC,CAAC,EAfW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAe5B;AAED;;GAEG;AACH;IAKI;;OAEG;IACH,uBAAY,IAAuB,EAAE,OAAe;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa"}
|
||||
{"version":3,"file":"OpenViduError.js","sourceRoot":"","sources":["../../../src/OpenViduInternal/Enums/OpenViduError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,iBAeX;AAfD,WAAY,iBAAiB;IACzB,oEAA+C,CAAA;IAC/C,kEAA6C,CAAA;IAC7C,0EAAqD,CAAA;IACrD,oEAA+C,CAAA;IAC/C,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,4EAAuD,CAAA;IACvD,kFAA6D,CAAA;IAC7D,kFAA6D,CAAA;IAC7D,gEAA2C,CAAA;IAC3C,8EAAyD,CAAA;IACzD,8EAAyD,CAAA;IACzD,sEAAiD,CAAA;IACjD,oDAA+B,CAAA;AACnC,CAAC,EAfW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAe5B;AAED;;GAEG;AACH;IAKI;;OAEG;IACH,uBAAY,IAAuB,EAAE,OAAe;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEL,oBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,sCAAa"}
|
|
@ -12,8 +12,8 @@ export declare class ConnectionEvent extends Event {
|
|||
connection: Connection;
|
||||
/**
|
||||
* For 'connectionDestroyed' event:
|
||||
* - "disconnect"
|
||||
* - "networkDisconnect"
|
||||
* - "disconnect": the remote user has called `Session.disconnect()`
|
||||
* - "networkDisconnect": the remote user network connection has dropped
|
||||
*
|
||||
* For 'connectionCreated' empty string
|
||||
*/
|
||||
|
|
|
@ -5,8 +5,8 @@ import { Session } from '../..';
|
|||
*/
|
||||
export declare class SessionDisconnectedEvent extends Event {
|
||||
/**
|
||||
* - "disconnect"
|
||||
* - "networkDisconnect"
|
||||
* - "disconnect": you have called `Session.disconnect()`
|
||||
* - "networkDisconnect": your network connection has dropped
|
||||
*/
|
||||
reason: string;
|
||||
/**
|
||||
|
|
|
@ -12,9 +12,9 @@ export declare class StreamEvent extends Event {
|
|||
stream: Stream;
|
||||
/**
|
||||
* For 'streamDestroyed' event:
|
||||
* - "disconnect"
|
||||
* - "networkDisconnect"
|
||||
* - "unpublish"
|
||||
* - "unpublish": method `Session.unpublish()` has been called
|
||||
* - "disconnect": method `Session.disconnect()` has been called
|
||||
* - "networkDisconnect": the user's network connection has dropped
|
||||
*
|
||||
* For 'streamCreated' empty string
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,6 @@ import { OpenViduAdvancedConfiguration } from '../OpenViduInternal/Interfaces/Pu
|
|||
import { PublisherProperties } from '../OpenViduInternal/Interfaces/Public/PublisherProperties';
|
||||
import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/OpenViduError';
|
||||
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
|
||||
import { adaptPublisherProperties } from '../OpenViduInternal/VersionAdapter';
|
||||
|
||||
import * as RpcBuilder from '../OpenViduInternal/KurentoUtils/kurento-jsonrpc';
|
||||
import * as screenSharingAuto from '../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto';
|
||||
|
@ -61,25 +60,10 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
|
||||
initSession(): Session;
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
*
|
||||
* _No `sessionId` is required. Now every necessary information is received in [[Session.connect]]_
|
||||
*
|
||||
* ---
|
||||
* Returns new session
|
||||
*/
|
||||
initSession(sessionId: string): Session;
|
||||
|
||||
/**
|
||||
* Returns a session with id `sessionId`
|
||||
* @param sessionId Session unique ID generated in openvidu-server
|
||||
*/
|
||||
initSession(sessionId?: string): Session {
|
||||
if (!!sessionId) {
|
||||
console.warn("DEPRECATION WANING: In future releases 'OpenVidu.initSession' method won't require a parameter. Remove it (see https://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)");
|
||||
}
|
||||
initSession(): Session {
|
||||
this.session = new Session(this);
|
||||
return this.session;
|
||||
}
|
||||
|
@ -119,9 +103,6 @@ export class OpenVidu {
|
|||
|
||||
properties = (<PublisherProperties>param2);
|
||||
|
||||
// DEPRECATED WARNING
|
||||
properties = adaptPublisherProperties(properties);
|
||||
|
||||
properties = {
|
||||
audioSource: (typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined,
|
||||
frameRate: this.isMediaStreamTrack(properties.videoSource) ? undefined : ((typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined),
|
||||
|
|
|
@ -30,7 +30,6 @@ import { SignalEvent } from '../OpenViduInternal/Events/SignalEvent';
|
|||
import { StreamEvent } from '../OpenViduInternal/Events/StreamEvent';
|
||||
import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/OpenViduError';
|
||||
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
|
||||
import { solveIfCallback } from '../OpenViduInternal/VersionAdapter';
|
||||
|
||||
import platform = require('platform');
|
||||
import EventEmitter = require('wolfy87-eventemitter');
|
||||
|
@ -88,16 +87,6 @@ export class Session implements EventDispatcher {
|
|||
connect(token: string): Promise<any>;
|
||||
connect(token: string, metadata: any): Promise<any>;
|
||||
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
*
|
||||
* _Use promisified version of the method_
|
||||
*
|
||||
* ---
|
||||
*/
|
||||
connect(token: string, metadata?: any, callback?): void;
|
||||
|
||||
/**
|
||||
* Connects to the session using `token`. Parameter `metadata` allows you to pass extra data to share with other users when
|
||||
* they receive `streamCreated` event. The structure of `metadata` string is up to you (maybe some standarized format
|
||||
|
@ -125,35 +114,27 @@ export class Session implements EventDispatcher {
|
|||
* @returns A Promise to which you must subscribe that is resolved if the recording successfully started and rejected with an Error object if not
|
||||
*
|
||||
*/
|
||||
connect(token: string, metadata?: any, param3?: (error: Error) => void): Promise<any> {
|
||||
connect(token: string, metadata?: any): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
// DEPRECATED WARNING
|
||||
return solveIfCallback('Session.connect', (!!param3 && (typeof param3 === 'function')) ? param3 : ((typeof metadata === 'function') ? metadata : ''),
|
||||
this.processToken(token);
|
||||
|
||||
|
||||
/*return */new Promise((resolve, reject) => {
|
||||
|
||||
this.processToken(token);
|
||||
|
||||
if (this.openvidu.checkSystemRequirements()) {
|
||||
// Early configuration to deactivate automatic subscription to streams
|
||||
this.options = {
|
||||
sessionId: this.sessionId,
|
||||
participantId: token,
|
||||
metadata: !!metadata ? this.stringClientMetadata(metadata) : ''
|
||||
};
|
||||
this.connectAux(token).then(() => {
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
} else {
|
||||
reject(new OpenViduError(OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
);
|
||||
if (this.openvidu.checkSystemRequirements()) {
|
||||
// Early configuration to deactivate automatic subscription to streams
|
||||
this.options = {
|
||||
sessionId: this.sessionId,
|
||||
participantId: token,
|
||||
metadata: !!metadata ? this.stringClientMetadata(metadata) : ''
|
||||
};
|
||||
this.connectAux(token).then(() => {
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
} else {
|
||||
reject(new OpenViduError(OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' ' + platform.version + ' is not supported in OpenVidu'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -400,17 +381,6 @@ export class Session implements EventDispatcher {
|
|||
}
|
||||
|
||||
|
||||
signal(signal: SignalOptions): Promise<any>;
|
||||
/**
|
||||
* ---
|
||||
* ## DEPRECATED
|
||||
*
|
||||
* _Use promisified version of the method_
|
||||
*
|
||||
* ---
|
||||
*/
|
||||
signal(signal: SignalOptions, callback?): void;
|
||||
|
||||
/**
|
||||
* Sends one signal. `signal` object has the following optional properties:
|
||||
* ```json
|
||||
|
@ -423,40 +393,35 @@ export class Session implements EventDispatcher {
|
|||
* mean that openvidu-server could resend the message to all the listed receivers._
|
||||
*/
|
||||
/* tslint:disable:no-string-literal */
|
||||
signal(signal: SignalOptions, callback?): Promise<any> {
|
||||
signal(signal: SignalOptions): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
// DEPRECATED WARNING
|
||||
return solveIfCallback('Session.signal', callback,
|
||||
const signalMessage = {};
|
||||
|
||||
/*return */new Promise((resolve, reject) => {
|
||||
const signalMessage = {};
|
||||
if (signal.to && signal.to.length > 0) {
|
||||
const connectionIds: string[] = [];
|
||||
|
||||
if (signal.to && signal.to.length > 0) {
|
||||
const connectionIds: string[] = [];
|
||||
|
||||
signal.to.forEach(connection => {
|
||||
connectionIds.push(connection.connectionId);
|
||||
});
|
||||
signalMessage['to'] = connectionIds;
|
||||
} else {
|
||||
signalMessage['to'] = [];
|
||||
}
|
||||
|
||||
signalMessage['data'] = signal.data ? signal.data : '';
|
||||
signalMessage['type'] = signal.type ? signal.type : '';
|
||||
|
||||
this.openvidu.sendRequest('sendMessage', {
|
||||
message: JSON.stringify(signalMessage)
|
||||
}, (error, response) => {
|
||||
if (!!error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
signal.to.forEach(connection => {
|
||||
connectionIds.push(connection.connectionId);
|
||||
});
|
||||
}));
|
||||
signalMessage['to'] = connectionIds;
|
||||
} else {
|
||||
signalMessage['to'] = [];
|
||||
}
|
||||
|
||||
signalMessage['data'] = signal.data ? signal.data : '';
|
||||
signalMessage['type'] = signal.type ? signal.type : '';
|
||||
|
||||
this.openvidu.sendRequest('sendMessage', {
|
||||
message: JSON.stringify(signalMessage)
|
||||
}, (error, response) => {
|
||||
if (!!error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
/* tslint:enable:no-string-literal */
|
||||
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
import { PublisherProperties } from './Interfaces/Public/PublisherProperties';
|
||||
import { VideoInsertMode } from './Enums/VideoInsertMode';
|
||||
|
||||
export function solveIfCallback(methodName: string, completionHandler: ((error: Error | undefined) => void) | undefined, promise: Promise<any>): Promise<any> {
|
||||
|
||||
if (!!completionHandler) {
|
||||
console.warn("DEPRECATION WANING: In future releases the 'completionHandler' parameter will be removed from method '" + methodName + "'. Refactor your callbacks to Promise API (see https://openvidu.io/api/openvidu-browser/index.html)");
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!!completionHandler && typeof completionHandler === 'function') {
|
||||
promise.then(() => {
|
||||
completionHandler(undefined);
|
||||
}).catch(error => {
|
||||
completionHandler(error);
|
||||
});
|
||||
} else {
|
||||
promise.then(() =>
|
||||
resolve()
|
||||
).catch(error =>
|
||||
reject(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function adaptPublisherProperties(properties: any): PublisherProperties {
|
||||
|
||||
if (
|
||||
'audio' in properties ||
|
||||
'video' in properties ||
|
||||
'audioActive' in properties ||
|
||||
'videoActive' in properties ||
|
||||
'quality' in properties ||
|
||||
'screen' in properties
|
||||
) {
|
||||
console.warn("DEPRECATION WANING: In future releases the properties passed to 'OpenVidu.initPublisher' method must match PublisherProperties interface (see https://openvidu.io/api/openvidu-browser/interfaces/publisherproperties.html)");
|
||||
}
|
||||
|
||||
const scr: boolean = (typeof properties.screen !== 'undefined' && properties.screen === true);
|
||||
let res = '';
|
||||
if (typeof properties.quality === 'string') {
|
||||
switch (properties.quality) {
|
||||
case 'LOW':
|
||||
res = '320x240';
|
||||
break;
|
||||
case 'MEDIUM':
|
||||
res = '640x480';
|
||||
break;
|
||||
case 'HIGH':
|
||||
res = '1280x720';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const publisherProperties = {
|
||||
audioSource: (typeof properties.audio !== 'undefined' && properties.audio === false) ? false : ((typeof properties.audioSource !== 'undefined') ? properties.audioSource : undefined),
|
||||
frameRate: (typeof properties.frameRate !== 'undefined') ? properties.frameRate : undefined,
|
||||
insertMode: (typeof properties.insertMode !== 'undefined') ? properties.insertMode : VideoInsertMode.APPEND,
|
||||
mirror: (typeof properties.mirror !== 'undefined') ? properties.mirror : true,
|
||||
publishAudio: (typeof properties.audioActive !== 'undefined' && properties.audioActive === false) ? false : (typeof properties.publishAudio !== 'undefined') ? properties.publishAudio : true,
|
||||
publishVideo: (typeof properties.videoActive !== 'undefined' && properties.videoActive === false) ? false : (typeof properties.publishVideo !== 'undefined') ? properties.publishVideo : true,
|
||||
resolution: !!res ? res : ((typeof properties.resolution !== 'undefined') ? properties.resolution : '640x480'),
|
||||
videoSource: scr ? 'screen' : ((typeof properties.video !== 'undefined' && properties.video === false) ? false : ((typeof properties.videoSource !== 'undefined') ? properties.videoSource : undefined))
|
||||
};
|
||||
|
||||
return publisherProperties;
|
||||
}
|
Loading…
Reference in New Issue