Skip to content

Commit

Permalink
Merged in staging-2-0 (pull request #362)
Browse files Browse the repository at this point in the history
Release 2.1.5
  • Loading branch information
dinawee committed Sep 8, 2020
2 parents a78e0f6 + 160b6fa commit ca9a78e
Show file tree
Hide file tree
Showing 272 changed files with 3,518 additions and 2,048 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SKYLINK WEB SDK 2.1.4
# SKYLINK WEB SDK 2.1.5
> Temasys SkylinkJS Web SDK is an open-source client-side library for your web-browser that enables any website to easily leverage the capabilities of WebRTC and its direct data streaming powers between peers for audio/video conferencing or file transfer.
You'll need a Temasys Account, and an App key to use this. [Register here to get your App key](https://console.temasys.io).
Expand Down Expand Up @@ -35,7 +35,7 @@ You'll need a Temasys Account, and an App key to use this. [Register here to get
#### Current versions and stability
- We recommend that you always use the latest versions of the Temasys SkylinkJS Web SDK as WebRTC is still evolving and we adapt to changes very frequently.

[Latest version: 2.1.4](https://github.com/Temasys/SkylinkJS/releases/tag/2.1.4)
[Latest version: 2.1.5](https://github.com/Temasys/SkylinkJS/releases/tag/2.1.5)


## How to build your own Temasys SkylinkJS Web SDK
Expand All @@ -54,6 +54,9 @@ npm install
npm start # Note that this runs in Chrome currently.
```




__What's included in the repository?__

- `demos` : Reference Code Examples.
Expand Down
2 changes: 1 addition & 1 deletion bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipelines:
- npm install
- npm run build
branches:
staging:
staging-2-0:
- step:
name: Build and Test
script:
Expand Down
29 changes: 15 additions & 14 deletions demos/collection/kitchensink/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ $(document).ready(function() {
});
// //---------------------------------------------------
$('#stop_stream_btn').click(function() {
if (Demo.Streams && (Demo.Streams[_peerId].streams.audio || Demo.Streams[_peerId].streams.video)) {
if (Demo.Streams && Demo.Streams[_peerId] && (Demo.Streams[_peerId].streams.audio || Demo.Streams[_peerId].streams.video)) {
Demo.Skylink.stopStreams(config.defaultRoom)
.then(() => console.log("stopStreams resolved"))
.catch((err) => console.error("stopStreams rejected", err));
Expand All @@ -947,8 +947,7 @@ $(document).ready(function() {
};

$("#add_stream_btn").click(function() {
// const options = Object.assign({}, joinRoomOptions);
// delete options.userData;

const options = {
audio: true,
video: {
Expand All @@ -967,7 +966,7 @@ $(document).ready(function() {
video: true,
};

if (Demo.Streams && Demo.Streams.userMedia) {
if (Demo.Streams && Demo.Streams[_peerId] && (Demo.Streams[_peerId].streams.audio || Demo.Streams[_peerId].streams.video)) {
Demo.Skylink.stopStreams(config.defaultRoom)
.then(() => startSendStream(mediaOptions))
.catch((err) => console.error("stopStreams rejected", err));
Expand All @@ -977,14 +976,16 @@ $(document).ready(function() {
});
//---------------------------------------------------
$("#start_video_btn").click(function() {
const mediaOptions = {
audio: false,
video: true,
};

if (Demo.Streams && Demo.Streams.userMedia) {
const mediaOptions = {
audio: false,
video: true,
};

if (Demo.Streams && Demo.Streams[_peerId] && (Demo.Streams[_peerId].streams.video)) {
const clonedVideoStream = Object.values(Demo.Streams[_peerId].streams.video)[0].clone();
console.log("Cloned mediaStream", clonedVideoStream);
Demo.Skylink.stopStreams(config.defaultRoom)
.then(() => startSendStream(mediaOptions))
.then(() => startSendStream(clonedVideoStream))
.catch((err) => console.error("stopStreams rejected", err));
} else {
startSendStream(mediaOptions);
Expand All @@ -997,7 +998,7 @@ $(document).ready(function() {
video: false,
};

if (Demo.Streams && Demo.Streams.userMedia) {
if (Demo.Streams && Demo.Streams[_peerId] && (Demo.Streams[_peerId].streams.audio || Demo.Streams[_peerId].streams.video)) {
Demo.Skylink.stopStreams(config.defaultRoom)
.then(() => startSendStream(mediaOptions))
.catch((err) => console.error("stopStreams rejected", err));
Expand Down Expand Up @@ -1046,7 +1047,7 @@ $(document).ready(function() {
});
// //---------------------------------------------------
$('#restart_btn').click(function() {
Demo.Skylink.refreshConnection(config.defaultRoom, null, true, { bandwidth: SkylinkConstants.VIDEO_QUALITY.SQ});
Demo.Skylink.refreshConnection(config.defaultRoom, null, true);
});
// //---------------------------------------------------
$('#join_room_btn').click(function () {
Expand All @@ -1061,7 +1062,7 @@ $(document).ready(function() {
});
// //---------------------------------------------------
$('#share_screen_btn').click(function () {
Demo.Skylink.shareScreen(config.defaultRoom, true).then((stream) => {
Demo.Skylink.shareScreen(config.defaultRoom).then((stream) => {
console.log('Screen share started: ', stream);
});
});
Expand Down
81 changes: 55 additions & 26 deletions docs/Skylink.html
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1302">line 1302</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1303">line 1303</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -569,7 +569,7 @@ <h4 class="name" id="generateUUID">
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1264">line 1264</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1265">line 1265</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -963,7 +963,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1289">line 1289</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1290">line 1290</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1118,7 +1118,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1360">line 1360</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1361">line 1361</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -2289,7 +2289,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1017">line 1017</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1018">line 1018</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -2489,7 +2489,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1329">line 1329</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1330">line 1330</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -2895,7 +2895,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1249">line 1249</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1250">line 1250</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -3002,7 +3002,7 @@ <h4 class="name" id="getStreamSources">
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1155">line 1155</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1156">line 1156</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -3453,7 +3453,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line716">line 716</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line717">line 717</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -3908,7 +3908,7 @@ <h4 class="name" id="leaveAllRooms">
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line845">line 845</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line846">line 846</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -4063,7 +4063,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line830">line 830</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line831">line 831</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -4253,7 +4253,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line952">line 952</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line953">line 953</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -4658,7 +4658,7 @@ <h6>Properties</h6>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1063">line 1063</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1064">line 1064</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -6188,7 +6188,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1219">line 1219</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1220">line 1220</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -6472,7 +6472,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1276">line 1276</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1277">line 1277</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -6661,7 +6661,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1347">line 1347</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1348">line 1348</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -6845,7 +6845,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1315">line 1315</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1316">line 1316</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -7097,7 +7097,7 @@ <h5 id="setUserData-examples">Example</h5>
</svg>
</a>
<h4 class="name" id="shareScreen">
<span class="type-signature"></span>shareScreen<span class="signature">(roomName)</span><span class="type-signature"> &rarr; {<a href="global.html#MediaStream">MediaStream</a>|null}</span>
<span class="type-signature"></span>shareScreen<span class="signature">(roomName, options)</span><span class="type-signature"> &rarr; {<a href="global.html#MediaStream">MediaStream</a>|null}</span>
</h4>
</span>

Expand Down Expand Up @@ -7166,6 +7166,35 @@ <h5>Parameters:</h5>
</tr>


<tr>

<td class="name"><code>options</code></td>


<td class="type">


<span class="param-type">
<a href="global.html#getDisplayMediaOptions">getDisplayMediaOptions</a>
</span>





</td>





<td class="description last">
<p>Screen share options.</p>

</td>
</tr>


</tbody>
</table>

Expand Down Expand Up @@ -7213,7 +7242,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line613">line 613</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line614">line 614</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -7373,7 +7402,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line874">line 874</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line875">line 875</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -7626,7 +7655,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1096">line 1096</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1097">line 1097</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -7824,7 +7853,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line915">line 915</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line916">line 916</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -8047,7 +8076,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1127">line 1127</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line1128">line 1128</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -8233,7 +8262,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line775">line 775</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line776">line 776</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -8454,7 +8483,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line799">line 799</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line800">line 800</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -8641,7 +8670,7 @@ <h5>Parameters:</h5>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line969">line 969</a>
<a href="public_index.js.html">public/index.js</a>, <a href="public_index.js.html#line970">line 970</a>
</li>
</ul>
</dd>
Expand Down
Loading

0 comments on commit ca9a78e

Please sign in to comment.