0.6.1: Simultaneous Data Transfers
Dependencies
CDN links (gzipped)
- Minified library:
//cdn.temasys.com.sg/skylink/skylinkjs/0.6.1/skylink.min.js
- Debug library:
//cdn.temasys.com.sg/skylink/skylinkjs/0.6.1/skylink.debug.js
- Minified with all dependencies:
//cdn.temasys.com.sg/skylink/skylinkjs/0.6.1/skylink.complete.min.js
- Debug with all dependencies:
//cdn.temasys.com.sg/skylink/skylinkjs/0.6.1/skylink.complete.js
API Documentation
http://cdn.temasys.com.sg/skylink/skylinkjs/0.6.1/doc/classes/Skylink.html
NPM Installation
npm install skylinkjs@0.6.1
New Features
Simultaneous Data Transfers
This is a new feature that allows users to send multiple simultaneous Data Transfers by opening new DataChannel connections for particular transfers.
- Added a new attribute called
DATA_CHANNEL_TYPE
for identifying the types of DataChannel connection it's used for.
Target multiple Peers
This is a new feature that allows users to send private messages / transfers to certain targeted Peers by passing in an array of targeted Peers. This is available in refreshConnection()
, sendP2PMessage()
, sendMessage()
, sendBlobData()
, sendURLData()
.
Identification of server Peers
This is a new feature that allow developers to know when a server Peer has joined the room.
- Added a new attribute called
SERVER_PEER_TYPE
for identifying the types of server Peer. This list will be populated eventually when there are new types available. - Added a new event called
serverPeerJoined
for identifying the state when a server Peer has joined the room. - Added a new event called
serverPeerLeft
for identifying the state when a server Peer has left the room. - Added a new event called
serverPeerRestart
for identifying the state when a server Peer connection has been refreshed (restarted).
Privileged Key Scheme
This is a feature that allows privileged Peers to have the ability to introduce unprivileged Peers who does not know any peers in the room except what the privileged Peers introduces.
This is currently unofficially released. You may configure the privileged key feature by toggling the isPrivileged
for alias Application Keys to true
true
to make any Peer using the key become a privileged Peer.
- Added a new attribute called
GET_PEERS_STATE
for identifying the states ofgetPeers()
when retrieving the list unprivileged Peers in a room. - Added a new attribute called
INTRODUCE_STATE
for identifying the states ofintroducePeer()
when introducing one unprivileged Peer to another unprivileged Peer. This would work for introducing privileged Peers as well. - Added a new method called
getPeers()
that allows privileged Peers to get the list of unprivileged / privileged Peers in the room. - Added a new method called
introducePeer()
that allows privileged Peers to introduce an unprivileged Peer to another unprivileged Peer. Privileged Peers is also able to introduce other Peers to other privileged Peers. - Added a new event called
getPeersStateChange
that identifies the state ofgetPeers()
. - Added a new event called
introduceStateChange
that identifies the state ofintroducePeer()
.
Improvements
Documentation / Testing
- Troubleshooting should redirect to http://support.temasys.com.sg/support/solutions/folders/5000267498
- Added new test scripts
- Updated documentation for clarity.
- Demo code examples and test scripts are documented in separate README.md files in the relevant folders.
Room
joinRoom()
would allow seamless Stream connection without stopping the previously attached Stream unless media constraints are passed in the options to refetch and attach a new Stream.leaveRoom()
method takes in a new optional parameterstopUserMedia
that by default istrue
. It is a flag that tells Skylink not to stop self Stream when leaving the room.- Added a new configuration setting in
init()
calledforceTURNSSL
that causes any TURN server connections to use port443
SSL connections always. Ifturns:
protocol is supported, it will use theturns:
protocol. - Added a new configuration setting in
init()
calledforceTURN
that forces TURN server connection always. This will reset configuration settings forenableSTUNServer
andenableTURNServer
. - Added a new configuration setting in
init()
calledusePublicSTUN
that allows Skylink to use and connect using public STUN server instead of Skylink's platform own. - When video stream is not available for Room connection, the connection stream would fallback to audio only Stream connection in
joinRoom()
. - Added a new option in
TURN_TRANSPORT
calledALL
which allows connectivity with all transports and none. - Removed options in
SYSTEM_ACTION_REASON
as they are no longer in use.FAST_MESSAGE
,ROOM_FULL
,VERIFICATION
andOVER_SEAT_LIMIT
. - Removed options in
READY_STATE_CHANGE_ERROR
as they are no longer in use.API_NOT_ENOUGH_CREDIT
,API_NOT_ENOUGH_PREPAID_CREDIT
,API_FAILED_FINDING_PREPAID_CREDIT
. - Added
room
parameter inreadyStateChange
event to identify which room is the connection information retrieved for. - Fixed
callback
function with consistent payloads ininit()
,joinRoom()
andleaveRoom()
. - Added more errors in
callback
function forinit()
whenXMLHttpRequest
fails andjoinRoom()
wheninit()
orgetUserMedia()
fails.
Stream
- Added a new event called
streamMuted
that triggers when a Stream audio / video streaming muted status has been changed. This would still trigger if self has not joined the room. - Added a new
config.video.optional
andconfig.audio.optional
settings in methodgetUserMedia()
for advanced developers familiar with thenavigator.getUserMedia()
API. This is available in methodsjoinRoom()
andsendStream()
as well. peerInfo
video information should contain a flag calledscreenshare
that indicates if the Stream video streaming is a screensharing stream. When it is a screensharing Stream, it should display the Stream audio and video status as well.shareScreen
method takes in a new optional parameterenableAudio
that by default istrue
. It is a flag that tells Skylink if the screensharing stream should contain audio or not.mediaAccessError
,mediaAccessStopped
,streamEnded
,streamMuted
should contain theisScreensharing
flag that indicates if Stream is a screensharing stream or not.- Fixed
callback
function with consistent payloads inshareScreen()
,getUserMedia()
andsendStream()
.
Peer
- Added a new
room
information in thepeerInfo
data (or the returned data ingetPeerInfo()
) that would display the current room that the Peer is connected to. - Added a new
agent.os
information in thepeerInfo
data (or the returned data ingetPeerInfo()
) that would display the operating system (or platform) that the PeerConnection peer is on. - Added
refreshConnection()
andshareScreen()
functionality for MCU connection.refreshConnection()
would enable self to leave and join the room again. - Fixed
callback
function with consistent payloads inrefreshConnection()
,getPeers()
.
Data
- Added a new method called
sendURLData()
that allow developers to send base64 encoded data URL. transferInfo
information should contain a flag calledisPrivate
that indicates if Data Transfer is a targeted transfer or a broadcasted transfer.transferInfo
information should contain a string calleddataType
that indicates if Data Transfer data is a"blob"
for Blob type of transfers sent usingsendBlobData()
or a"dataURL"
for data URL type of transfers usingsendURLData()
.- Added a new event called
incomingData
that triggers when data is received from PeerConnection peer. - Added a new event called
incomingDataRequest
that triggers when data transfer request is made from PeerConnection peer. - Fixed
callback
function with consistent payloads insendBlobData()
,sendURLData()
.
IE 9 - 10 Support
While we do much support for IE 9 - 10, it's recommended that developers do not add attributes or methods that is not supported for <object>
DOM elements that are for <video>
and <audio>
DOM elements. We have polyfilled Object.keys
, Date.getISOString()
and addEventListener
to make sure it runs fine in Skylink.
Socket
- Automatically connect using
"Polling"
instead of"WebSocket"
is WebSocket is not supported.
Bug-fixes
Documentation / Testing
- Fixed most documentation errors
e.g.iceConnectionState
event is missing - Fixed most test errors (although there are still some).
- "Scroll to Top" button should scroll to the top.
Room
joinRoom()
should always triggerincomingStream
when there is a Stream sending if self is rejoining the room multiple times.- If
room
parameter is not provided, it should always connect to thedefaultRoom
provided in theinit()
options. - Connection should not be interrupted with
streamEnded
event. - Configuring
TURN_TRANSPORT.UDP
orTURN_TRANSPORT.TCP
ininit()
should not break connection.
Peer
getPeerInfo()
should return exact Stream information when information has already been updated.
Stream
enableVideo()
andenableAudio()
should not work if no Stream is present.muteStream()
should update theaudioMuted
andvideoMuted
status correctly. This causes theenableVideo()
andenableAudio()
bugs.
Things that Developers should take note of
Changes required to make when integrating 0.6.1
respondBlobRequest
would take in a mandatorytransferId
field in order to respond to the incoming transfers.cancelBlobRequest
would take in a mandatorytransferId
field and nottransferType
field in order to cancel the existing transfers.
Deprecation
These functionalities might be removed in next releases.
enableAudio()
,disableAudio()
,enableVideo()
anddisableVideo()
is deprecated from 0.5.x versions. Please usemuteStream()
.respondBlobRequest()
is deprecated from 0.6.1. Please useacceptDataTransfer()
.cancelBlobRequest()
is deprecated from 0.6.1. Please usecancelDataTransfer()
.region
option configuration in theinit()
is deprecated from 0.6.1. Signaling server selection would be handled on the server side based on load and latency.