Skip to content

Commit

Permalink
Merged in pre-prod-2-0 (pull request #497)
Browse files Browse the repository at this point in the history
Release 2.6.2
  • Loading branch information
dinawee committed Oct 12, 2023
2 parents cbef4d5 + 5904db9 commit 8ffc99e
Show file tree
Hide file tree
Showing 200 changed files with 138 additions and 78 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SKYLINK WEB SDK 2.6.1
# SKYLINK WEB SDK 2.6.2
> 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.
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 @@ -34,7 +34,7 @@ You'll need a Temasys Account, and an App key to use this. [Register here to get
- 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.
- It is advised to not attach any event handlers to the WebRTC APIs as doing so may override the handlers set in SkylinkJS and result in unexpected behaviour.

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


## How to build your own Temasys SkylinkJS Web SDK
Expand Down
4 changes: 4 additions & 0 deletions demos/collection/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ input[type="text"] {
word-break: break-word;
}

.table.media-devices {
padding-bottom: 10px;
}

.table td:first-child {
font-weight: bold;
width: 38%;
Expand Down
14 changes: 14 additions & 0 deletions demos/collection/kitchensink/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ <h3>Logs</h3>

</div>
</div>
<table class="table media-devices">
<tbody>
<div class="panel-heading">Media Devices Selection</div>
<tr><td>Audio device <select id="audio-devices"></select></td></tr>
<tr><td>Video device <select id="video-devices"></select></td></tr>
</tbody>
</table>
<table>
<tbody>
<tr>
Expand Down Expand Up @@ -405,6 +412,13 @@ <h4>Media Settings</h4>
</div>
</td>
</tr>
<tr>
<td><h6>Devices</h6></td>
<td>
Audio <span id="audio-device-label"></span> <br/>
Video <span id="video-device-label"></span>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
48 changes: 47 additions & 1 deletion demos/collection/kitchensink/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ let selectedPeers = [];
let _peerId = null;
let selectedAppKey = null;
let stopStreamsOnLeaveRoom = true;
let audioDeviceLabel = 'default';
let videoDeviceLabel = 'default';

const { $, document } = window;

Expand All @@ -71,8 +73,37 @@ if (window.location.href.indexOf("appKey=") > -1) {
$('#join_room_mcu_key').prop('disabled', true);
}


function getDevices() {
navigator.mediaDevices.getUserMedia({audio: true, video: true})
.then((stream) => navigator.mediaDevices.enumerateDevices().then((devices) => {
devices.forEach((d) => {
let element;
let option = document.createElement('option');
option.value = d.deviceId;
option.label = d.label;
option.dataset.label = d.label;

if (d.kind === 'videoinput') {
element = '#video-devices'
}

if (d.kind === 'audioinput') {
element = '#audio-devices'
}

$(element).append(option);
})

stream.getTracks().forEach((t) => t.stop())
})
)
}

getDevices();

//----- join room options
const joinRoomOptions = {
let joinRoomOptions = {
audio: true,
video: true,
autoBandwidthAdjustment: true
Expand Down Expand Up @@ -304,6 +335,10 @@ SkylinkEventManager.addEventListener(SkylinkConstants.EVENTS.PEER_JOINED, (evt)
})

$('#display_user_info').val(userData.displayName);

$('#audio-device-label').html(audioDeviceLabel);
$('#video-device-label').html(videoDeviceLabel);

console.log(`[Kitchensink] Room Session Id - ${peerInfo.room.roomSessionId}`);

if (Demo.Methods.getFromLocalStorage('peerSessionId')) {
Expand Down Expand Up @@ -1497,6 +1532,17 @@ $(document).ready(function() {
Demo.Methods.logToConsoleDOM(`Check console log for output`, 'System');
});

// //---------------------------------------------------
$('#audio-devices').on('change', function(evt) {
joinRoomOptions.audio = { deviceId : evt.target.value};
audioDeviceLabel = evt.target.options[evt.target.options.selectedIndex].label
})

$('#video-devices').on('change', function(evt) {
joinRoomOptions.video = { deviceId : evt.target.value};
videoDeviceLabel = evt.target.options[evt.target.options.selectedIndex].label
})

window.setSelectedSecret = dom => {
var secretId = $(dom).attr('value');
Demo.Skylink.setSelectedSecret(config.defaultRoom, secretId);
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3>Classes</h3><ul><li id="Skylink-nav"><a href="Skylink.html">Skylink</a><ul c

<section class="readme">
<article>
<h1>SKYLINK WEB SDK 2.6.1</h1>
<h1>SKYLINK WEB SDK 2.6.2</h1>
<blockquote>
<p>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.</p>
</blockquote>
Expand Down Expand Up @@ -178,7 +178,7 @@ <h4>Current versions and stability</h4>
<li>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.</li>
<li>It is advised to not attach any event handlers to the WebRTC APIs as doing so may override the handlers set in SkylinkJS and result in unexpected behaviour.</li>
</ul>
<p><a href="https://github.com/Temasys/SkylinkJS/releases/tag/2.6.1">Latest version: 2.6.1</a></p>
<p><a href="https://github.com/Temasys/SkylinkJS/releases/tag/2.6.2">Latest version: 2.6.2</a></p>
<h2>How to build your own Temasys SkylinkJS Web SDK</h2>
<p>Using <a href="https://git-scm.com/download">Git</a> command line tools, execute the following:</p>
<p>Node version: <code>14.17.5</code></p>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "skylinkjs",
"description": "Temasys 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.",
"version": "2.6.1",
"version": "2.6.2",
"homepage": "https://temasys.io/",
"author": {
"name": "Temasys Communications Pte. Ltd.",
Expand Down
Binary file removed publish/2.6.1/gzip/skylink.complete.js
Binary file not shown.
Binary file removed publish/2.6.1/gzip/skylink.complete.min.js
Binary file not shown.
Binary file removed publish/2.6.1/gzip/skylink.complete.min.umd.js
Binary file not shown.
Binary file removed publish/2.6.1/gzip/skylink.complete.umd.js
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3>Classes</h3><ul><li id="Skylink-nav"><a href="Skylink.html">Skylink</a><ul c

<section class="readme">
<article>
<h1>SKYLINK WEB SDK 2.6.1</h1>
<h1>SKYLINK WEB SDK 2.6.2</h1>
<blockquote>
<p>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.</p>
</blockquote>
Expand Down Expand Up @@ -178,7 +178,7 @@ <h4>Current versions and stability</h4>
<li>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.</li>
<li>It is advised to not attach any event handlers to the WebRTC APIs as doing so may override the handlers set in SkylinkJS and result in unexpected behaviour.</li>
</ul>
<p><a href="https://github.com/Temasys/SkylinkJS/releases/tag/2.6.1">Latest version: 2.6.1</a></p>
<p><a href="https://github.com/Temasys/SkylinkJS/releases/tag/2.6.2">Latest version: 2.6.2</a></p>
<h2>How to build your own Temasys SkylinkJS Web SDK</h2>
<p>Using <a href="https://git-scm.com/download">Git</a> command line tools, execute the following:</p>
<p>Node version: <code>14.17.5</code></p>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added publish/2.6.2/gzip/skylink.complete.js
Binary file not shown.
Binary file added publish/2.6.2/gzip/skylink.complete.min.js
Binary file not shown.
Binary file added publish/2.6.2/gzip/skylink.complete.min.umd.js
Binary file not shown.
Binary file added publish/2.6.2/gzip/skylink.complete.umd.js
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SkylinkJS v2.6.1 Tue Mar 21 2023 08:50:40 GMT+0000 (Coordinated Universal Time) */
/* SkylinkJS v2.6.2 Thu Oct 12 2023 06:33:06 GMT+0000 (Coordinated Universal Time) */
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
Expand Down Expand Up @@ -6371,7 +6371,7 @@ const mediaInfoDeleted = (detail = {}) => new SkylinkEvent(MEDIA_INFO_DELETED, {
*/
const loggedOnConsole = (detail = {}) => new SkylinkEvent(LOGGED_ON_CONSOLE, { detail });

var name="skylinkjs";var description="Temasys 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.";var version="2.6.1";var homepage="https://temasys.io/";var author={name:"Temasys Communications Pte. Ltd.",email:"info@temasys.io"};var main="src/index.js";var module="src/index.js";var repository="Temasys/SkylinkJS";var license="Apache-2.0";var licenses=[{type:"Apache",url:"http://www.apache.org/licenses/LICENSE-2.0"}];var scripts={build:"./node_modules/rollup/dist/bin/rollup --config configs/rollup/rollup.dev.config.js && npm run build:doc-public",publish:"npm run build && ./node_modules/rollup/dist/bin/rollup --config configs/rollup/rollup.prod.config.js",prestart:"npm run build && ./start.sh &",lint:"node_modules/eslint/bin/eslint.js src/**","build:doc-public":"npx jsdoc -r -c configs/jsdoc/jsdoc.config.json","build:doc-private":"npx jsdoc -p -r -c configs/jsdoc/jsdoc.config.json","watch:doc-src":"npx nodemon --exec 'npm run build:doc-public' --watch src","watch:docs":"npm run watch:doc-src"};var dependencies={"@babel/polyfill":"^7.2.5","braintree-jsdoc-template":"^3.3.0",clone:"~2.1.2","crypto-js":"~3.1.9-1","socket.io-client":"^2.4.0","webrtc-adapter":"7.5.1"};var devServer={contentBase:"./dist"};var keywords=["webrtc","real-time","p2p"];var devDependencies={"@babel/core":"^7.16.0","@babel/preset-env":"7.16.0","@babel/register":"7.16.0","@rollup/plugin-json":"^4.1.0","babel-eslint":"^10.0.1","babel-loader":"^8.2.3",eslint:"^6.8.0","eslint-config-airbnb":"^18.2.1","eslint-loader":"^2.1.0","eslint-plugin-import":"^2.25.2","eslint-plugin-jsx-a11y":"^6.4.1",finalhandler:"^1.1.2",husky:"^7.0.4",jsdoc:"^3.6.7",jsdom:"^18.0.1","jsdom-global":"3.0.2","localstorage-polyfill":"^1.0.1",nodemon:"^2.0.14",rollup:"^2.59.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-external-globals":"^0.6.1","rollup-plugin-gzip":"^2.5.0","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-serve":"^1.1.0","rollup-plugin-terser":"^7.0.2","serve-static":"^1.14.1","whatwg-fetch":"^3.6.2"};var husky={hooks:{"pre-commit":"npm run lint","pre-push":"npm run lint"}};var pkg = {name:name,description:description,version:version,homepage:homepage,author:author,main:main,module:module,repository:repository,license:license,licenses:licenses,scripts:scripts,dependencies:dependencies,devServer:devServer,keywords:keywords,devDependencies:devDependencies,husky:husky};
var name="skylinkjs";var description="Temasys 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.";var version="2.6.2";var homepage="https://temasys.io/";var author={name:"Temasys Communications Pte. Ltd.",email:"info@temasys.io"};var main="src/index.js";var module="src/index.js";var repository="Temasys/SkylinkJS";var license="Apache-2.0";var licenses=[{type:"Apache",url:"http://www.apache.org/licenses/LICENSE-2.0"}];var scripts={build:"./node_modules/rollup/dist/bin/rollup --config configs/rollup/rollup.dev.config.js && npm run build:doc-public",publish:"npm run build && ./node_modules/rollup/dist/bin/rollup --config configs/rollup/rollup.prod.config.js",prestart:"npm run build && ./start.sh &",lint:"node_modules/eslint/bin/eslint.js src/**","build:doc-public":"npx jsdoc -r -c configs/jsdoc/jsdoc.config.json","build:doc-private":"npx jsdoc -p -r -c configs/jsdoc/jsdoc.config.json","watch:doc-src":"npx nodemon --exec 'npm run build:doc-public' --watch src","watch:docs":"npm run watch:doc-src"};var dependencies={"@babel/polyfill":"^7.2.5","braintree-jsdoc-template":"^3.3.0",clone:"~2.1.2","crypto-js":"~3.1.9-1","socket.io-client":"^2.4.0","webrtc-adapter":"7.5.1"};var devServer={contentBase:"./dist"};var keywords=["webrtc","real-time","p2p"];var devDependencies={"@babel/core":"^7.16.0","@babel/preset-env":"7.16.0","@babel/register":"7.16.0","@rollup/plugin-json":"^4.1.0","babel-eslint":"^10.0.1","babel-loader":"^8.2.3",eslint:"^6.8.0","eslint-config-airbnb":"^18.2.1","eslint-loader":"^2.1.0","eslint-plugin-import":"^2.25.2","eslint-plugin-jsx-a11y":"^6.4.1",finalhandler:"^1.1.2",husky:"^7.0.4",jsdoc:"^3.6.7",jsdom:"^18.0.1","jsdom-global":"3.0.2","localstorage-polyfill":"^1.0.1",nodemon:"^2.0.14",rollup:"^2.59.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-external-globals":"^0.6.1","rollup-plugin-gzip":"^2.5.0","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-serve":"^1.1.0","rollup-plugin-terser":"^7.0.2","serve-static":"^1.14.1","whatwg-fetch":"^3.6.2"};var husky={hooks:{"pre-commit":"npm run lint","pre-push":"npm run lint"}};var pkg = {name:name,description:description,version:version,homepage:homepage,author:author,main:main,module:module,repository:repository,license:license,licenses:licenses,scripts:scripts,dependencies:dependencies,devServer:devServer,keywords:keywords,devDependencies:devDependencies,husky:husky};

/**
* @namespace SkylinkConstants
Expand Down Expand Up @@ -9684,7 +9684,7 @@ const parseGumSettings = (settings, type) => {
gumSettings.audio.echoCancellation = settings.audio.echoCancellation;
}

if (isAgent(BROWSER_AGENT.FIREFOX)) ; else if (settings.audio.deviceId && isAString(settings.audio.deviceId)) {
if (settings.audio.deviceId && isAString(settings.audio.deviceId)) {
gumSettings.audio.deviceId = settings.audio.exactConstraints
? { exact: settings.audio.deviceId } : { ideal: settings.audio.deviceId };
}
Expand Down Expand Up @@ -9742,7 +9742,7 @@ const parseSettings = (options, type = '') => {
settings.audio.echoCancellation = options.audio.echoCancellation;
}

if (isAgent(BROWSER_AGENT.FIREFOX)) ; else if (options.audio.deviceId && isAString(options.audio.deviceId)) {
if (options.audio.deviceId && isAString(options.audio.deviceId)) {
settings.audio.deviceId = options.audio.deviceId;
}

Expand All @@ -9762,17 +9762,17 @@ const parseSettings = (options, type = '') => {

if (options.video.resolution && isAObj(options.video.resolution)) {
if ((options.video.resolution.width && isAString(options.video.resolution.width))
|| isANumber(options.video.resolution.width)) {
|| isANumber(options.video.resolution.width) || isAObj(options.video.resolution.width)) {
settings.video.resolution.width = options.video.resolution.width;
}
if ((options.video.resolution.height && isAString(options.video.resolution.height))
|| isANumber(options.video.resolution.height)) {
|| isANumber(options.video.resolution.height) || isAObj(options.video.resolution.height)) {
settings.video.resolution.height = options.video.resolution.height;
}
}

if ((options.video.frameRate && isAString(options.video.frameRate))
|| isANumber(options.video.frameRate)) {
|| isANumber(options.video.frameRate) || isAObj(options.video.frameRate)) {
settings.video.frameRate = options.video.frameRate;
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 8ffc99e

Please sign in to comment.