Skip to content

Commit

Permalink
Merged in pre-prod-2-0 (pull request #484)
Browse files Browse the repository at this point in the history
Release changes for 2.6.0
  • Loading branch information
dinawee committed Jan 9, 2023
2 parents dd35fe5 + 5e4e0e3 commit aaa9c8c
Show file tree
Hide file tree
Showing 251 changed files with 2,187 additions and 1,786 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.5.0
# SKYLINK WEB SDK 2.6.0
> 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.5.0](https://github.com/Temasys/SkylinkJS/releases/tag/2.5.0)
[Latest version: 2.6.0](https://github.com/Temasys/SkylinkJS/releases/tag/2.6.0)


## How to build your own Temasys SkylinkJS Web SDK
Expand Down
9 changes: 9 additions & 0 deletions demos/collection/kitchensink/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ <h3>Logs</h3>
</button>
</div>
</td>
<!-- UNCOMMENT TO TEST JOIN ROOM WITH PREFETCHED STREAMS -->
<!-- <td>-->
<!-- <div class="margin-right-5">-->
<!-- <button id="join_room_with_prefetched_stream_btn" type="button" title="Join room with prefetched stream" class="btn btn-primary">-->
<!-- <span class="glyphicon glyphicon glyphicon-play-circle"></span>-->
<!-- Join Room with Prefetched Stream-->
<!-- </button>-->
<!-- </div>-->
<!-- </td>-->
<td>
<div class="checkbox">
<label for="remember_me">
Expand Down
69 changes: 63 additions & 6 deletions demos/collection/kitchensink/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,25 @@ SkylinkEventManager.addEventListener(SkylinkConstants.EVENTS.GET_CONNECTION_STAT
}
});

// //---------------------------------------------------
// // RECORDING EVENTS
// //---------------------------------------------------
SkylinkEventManager.addEventListener(SkylinkConstants.EVENTS.RECORDING_STATE, (evt) => {
const eventDetail = evt.detail;
const { recordingId, state, error } = eventDetail;
if (state === SkylinkConstants.RECORDING_STATE.ERROR) {
Demo.Methods.logToConsoleDOM(`Recording Error - ${error}`, 'error');
}

if (state === SkylinkConstants.RECORDING_STATE.START) {
Demo.Methods.logToConsoleDOM(`Recording started: ${recordingId}`, 'Recording');
}

if (state === SkylinkConstants.RECORDING_STATE.STOP) {
Demo.Methods.logToConsoleDOM(`Recording stopped: ${recordingId}`, 'Recording');
}
});

/********************************************************
DOM Events
*********************************************************/
Expand Down Expand Up @@ -1366,6 +1385,47 @@ $(document).ready(function() {
$('#join_room_container').css("display", "none");
$('#mcu_loading').css("display", "block");
}
})
// //---------------------------------------------------
// Uncomment join_room_with_prefetched_stream_btn in index.html to test
$('#join_room_with_prefetched_stream_btn').click(function () {
if (!joinRoomOptions.audio && !joinRoomOptions.video) {
console.error(`Audio or Video must be requested to join with a prefetched stream.`);
return
}

Demo.userData = { displayName: $('#join_room_user_info').val(), peerSessionId: Demo.Methods.getFromLocalStorage('peerSessionId')};
joinRoomOptions.userData = JSON.stringify(Demo.userData);
Demo.rememberMe = $('#remember_me').prop('checked');

config.appKey = selectedAppKey || config.appKey;

Demo.Skylink = new Skylink(config);
Demo.Skylink.getStreamSources().then(sources => {
const audioInputDevices = sources.audio.input;
const videoInputDevices = sources.video.input;
const prefetchJoinRoomOptions = {}
if (joinRoomOptions.audio) {
prefetchJoinRoomOptions.audio = {
deviceId : audioInputDevices[0].deviceId,
}
}

if (joinRoomOptions.video) {
prefetchJoinRoomOptions.video = {
deviceId : videoInputDevices[0].deviceId,
}
}

Demo.Skylink.getUserMedia(null, prefetchJoinRoomOptions).then(prefetchedStreams => {
Demo.Skylink.joinRoom(joinRoomOptions, prefetchedStreams);
$('#join_room_btn').addClass('disabled');
if (Demo.isMCU) {
$('#join_room_container').css("display", "none");
$('#mcu_loading').css("display", "block");
}
})
})
});
// //---------------------------------------------------
$('#share_screen_btn').click(function () {
Expand Down Expand Up @@ -1407,16 +1467,13 @@ $(document).ready(function() {
// //---------------------------------------------------
$('#start_recording_btn').click(function() {
Demo.Skylink.startRecording(config.defaultRoom)
.then((recordingId) => {
Demo.Methods.logToConsoleDOM(`Recording started: ${recordingId}`, 'Recording');
})
.catch((error) => Demo.Methods.logToConsoleDOM(error.message, 'error'));
});
// //---------------------------------------------------
$('#stop_recording_btn').click(function() {
Demo.Skylink.stopRecording(config.defaultRoom)
.then((recordingId) => {
Demo.Methods.logToConsoleDOM(`Recording stopped: ${recordingId}`, 'Recording');
});
.catch((error) => Demo.Methods.logToConsoleDOM(error.message, 'error'));

$('#peer_video_list').on('click', '.toggle-connstats', function() {
$(this).parent().find('.connstats').slideToggle();
$(this).attr('toggled', $(this).attr('toggled') ? '' : 'true');
Expand Down

0 comments on commit aaa9c8c

Please sign in to comment.