diff --git a/Gruntfile.js b/Gruntfile.js
index b9cee73a3..b7c5764e6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -185,7 +185,7 @@ module.exports = function (grunt) {
grunt.registerTask('publish', [
'clean:production',
'concat:production',
- 'concat:complete',
+ 'concat:complete',
'versionise',
'replace:dist',
'uglify:production_min',
diff --git a/README.md b/README.md
index e50f709a5..e345baa28 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,10 @@ You'll need a Temasys Developer Account and an API key to use this. [Register he
We've gone to great length to make this library work in as many browsers as possible. SkywayJS is build on top of [AdapterJS](https://github.com/Temasys/AdapterJS) and works with our [Temasys WebRTC Plugin](https://temasys.atlassian.net/wiki/display/TWPP/WebRTC+Plugins) even in Internet Explorer and Safari on Mac and PC.
-- [Introducing SkywayJS](https://temasys.atlassian.net/wiki/display/TPD/Introducing+SkywayJS) - The complete documentation and API docs
+- [Getting started](http://temasys.github.io/how-to/2014/08/08/Getting_started_with_WebRTC_and_SkywayJS/)
+- [SkywayJS API Docs](http://cdn.temasys.com.sg/skyway/skywayjs/0.3.x/doc/classes/Skyway.html)
+- [Introducing SkywayJS](http://temasys.atlassian.net/wiki/display/TPD/Introducing+SkywayJS)
+- [Developer Console](https://developer.temasys.com.sg) - Get your API key
#### Need help or want something changed?
@@ -53,11 +56,11 @@ The skyway.js library development files
#### tests
-Tape/Testling tests, currently work-in-progress
-
+- Run `test.sh ' +
- '' + nick + '' +
+ '' + peerId + '' +
'' + timestamp.getHours() +
':' + timestamp.getMinutes() + ':' + timestamp.getSeconds() +
' ' +
- (isPvt?'[pvt msg] ':'') + msg + (isPvt?'':'') +
+ (message.isPrivate ? '[pvt msg] ' : '') + message.content +
+ (message.isPrivate ? '' : '') +
' ' + name + ' ' + name + ' ' + name + ' ',
- false, true);
- Demo.API.displayMsg(senderPeerId, 'I\'ve sent you a File', false);
+ alert(JSON.stringify(transferInfo));
+ Demo.API.displayChatMessage(senderPeerId, {
+ content: ' ' + name + ' '
+ }, true);
+ Demo.API.displayChatMessage(senderPeerId, {
+ content: 'I\'ve sent you a File'
+ });
break;
case Demo.Skyway.DATA_TRANSFER_STATE.UPLOADING :
if ($(element).find('.' + peerId).width() < 1) {
@@ -124,7 +132,9 @@ Demo.Skyway.on('dataTransferState', function (state, transferId, peerId, transfe
$(element).find('span').html(percentage + ' %');
break;
case Demo.Skyway.DATA_TRANSFER_STATE.UPLOAD_COMPLETED :
- Demo.API.displayMsg(peerId, 'Peer ' + peerId + ' has received your file "' + name + '"');
+ Demo.API.displayChatMessage(peerId, {
+ content: 'Peer ' + peerId + ' has received your file "' + name + '"'
+ });
$(element).find('.' + peerId).html('✓');
break;
case Demo.Skyway.DATA_TRANSFER_STATE.DOWNLOAD_COMPLETED :
@@ -142,13 +152,24 @@ Demo.Skyway.on('dataTransferState', function (state, transferId, peerId, transfe
}
});
//---------------------------------------------------
-Demo.Skyway.on('chatMessageReceived', function (msg, peerId, isPvt) {
- Demo.API.displayMsg(peerId, msg, isPvt);
+Demo.Skyway.on('incomingMessage', function (message, peerId, isSelf) {
+ console.info(message);
+ if (message.isDataChannel) {
+ message.content = message.content.header + ': ' + message.content.content;
+ } else {
+ message.content = message.content.content;
+ }
+ Demo.API.displayChatMessage((isSelf) ? 'You' : peerId, message);
});
//---------------------------------------------------
Demo.Skyway.on('peerJoined', function (peerId, peerInfo, isSelf){
+ console.info(peerInfo);
if (isSelf) {
$(Demo.Elements.displayUserId).html(peerId);
+ $('#isAudioMuted').css('color',
+ (peerInfo.mediaStatus.audioMuted) ? 'red' : 'green');
+ $('#isVideoMuted').css('color',
+ (peerInfo.mediaStatus.videoMuted) ? 'red' : 'green');
$(Demo.Elements.joinRoom).hide();
$(Demo.Elements.leaveRoomBtn).show();
$(Demo.Elements.presencePanel).show();
@@ -159,32 +180,38 @@ Demo.Skyway.on('peerJoined', function (peerId, peerInfo, isSelf){
$(Demo.Elements.fileListPanel).show();
}
} else {
- Demo.API.displayMsg('System', 'Peer ' + peerId + ' joined the room');
+ Demo.API.displayChatMessage('System', {
+ content: 'Peer ' + peerId + ' joined the room'
+ });
var newListEntry = '
Display Name
+
+
diff --git a/demo/app/js/main.js b/demo/app/js/main.js
index f73af46ba..e9f67c02e 100644
--- a/demo/app/js/main.js
+++ b/demo/app/js/main.js
@@ -44,19 +44,20 @@ Demo.Elements = {
chatLog: '#chat_log',
chatBody: '#chat_body'
};
-Demo.API.displayMsg = function (nick, msg, isPvt, isFile) {
+Demo.API.displayChatMessage = function (peerId, message, isFile) {
var timestamp = new Date();
var element = (isFile) ? Demo.Elements.fileLog : Demo.Elements.chatLog;
var element_body = (isFile) ? Demo.Elements.fileBody : Demo.Elements.chatBody;
$(element).append(
'
' + size + ' Bytes' +
- '
' +
- '',
- false, true);
- Demo.API.displayMsg(senderPeerId, 'I\'ve sent a File', false);
+ Demo.API.displayChatMessage(senderPeerId, {
+ content: ' ' +
- '' +
- ' Uploaded Status
' + size + ' Bytes' +
+ '
' +
+ ''
+ }, true);
+ Demo.API.displayChatMessage(senderPeerId, 'I\'ve sent a File', false);
break;
case Demo.Skyway.DATA_TRANSFER_STATE.DOWNLOAD_STARTED :
- Demo.API.displayMsg(senderPeerId,
- ' ' +
+ '' +
+ ' Uploaded Status
' + size + ' Bytes
' + size + ' Bytes' +
- ' ';
$('#presence_list').append(newListEntry);
$('#user' + peerId + ' .0').css('color','green');
+ $('#user' + peerId + ' .video').css('color',
+ (peerInfo.mediaStatus.videoMuted) ? 'red' : 'green');
+ $('#user' + peerId + ' .audio').css('color',
+ (peerInfo.mediaStatus.audioMuted) ? 'red' : 'green');
}
});
//---------------------------------------------------
-Demo.Skyway.on('addPeerStream', function (peerId, stream, isSelf){
+Demo.Skyway.on('incomingStream', function (peerId, stream, isSelf){
if (!isSelf) {
Demo.API.peers += 1;
if( Demo.API.peers > 2 ){
@@ -243,13 +270,22 @@ Demo.Skyway.on('readyStateChange', function (state, error){
$(Demo.Elements.updateUserInput).val(displayName);
return;
} else if (state === Demo.Skyway.READY_STATE_CHANGE.ERROR) {
- alert(error);
+ for (var errorCode in Demo.Skyway.READY_STATE_CHANGE_ERROR) {
+ if (Demo.Skyway.READY_STATE_CHANGE_ERROR[errorCode] ===
+ error.errorCode) {
+ alert('An error occurred parsing and retrieving server code.\n' +
+ 'Error was: ' + errorCode);
+ break;
+ }
+ }
}
$(Demo.Elements.channelStatus).show();
});
//---------------------------------------------------
Demo.Skyway.on('peerLeft', function (peerId){
- Demo.API.displayMsg('System', 'Peer ' + peerId + ' has left the room');
+ Demo.API.displayChatMessage('System', {
+ content: 'Peer ' + peerId + ' has left the room'
+ });
Demo.API.peers -= 1;
$('video').each( function(){
if(this.peerId === peerId){
@@ -357,17 +393,21 @@ Demo.Skyway.on('dataChannelState', function (state, peerId) {
//---------------------------------------------------
Demo.Skyway.on('peerUpdated', function (peerId, peerInfo, isSelf) {
if (isSelf) {
- $(Demo.Elements.updateUserInput).val('[' +
- ((peerInfo.mediaStatus.audioMuted) ? 'NA' : 'A') + '] ' +
- peerInfo.userData.displayName);
+ $('#isAudioMuted').css('color',
+ (peerInfo.mediaStatus.audioMuted) ? 'red' : 'green');
+ $('#isVideoMuted').css('color',
+ (peerInfo.mediaStatus.videoMuted) ? 'red' : 'green');
if (peerInfo.mediaStatus.videoMuted) {
$(Demo.Elements.localVideo)[0].src = '';
} else {
$(Demo.Elements.localVideo)[0].src = Demo.Streams.local;
}
} else {
- $('#user' + peerId +' .name').html('[' + ((peerInfo.mediaStatus.audioMuted) ? 'NA' : 'A') +
- '] ' + peerInfo.userData.displayName);
+ $('#user' + peerId + ' .video').css('color',
+ (peerInfo.mediaStatus.videoMuted) ? 'red' : 'green');
+ $('#user' + peerId + ' .audio').css('color',
+ (peerInfo.mediaStatus.audioMuted) ? 'red' : 'green');
+ $('#user' + peerId + ' .name').html(peerInfo.userData.displayName);
$('video').each( function(){
if ($(this)[0].peerId === peerId) {
if (peerInfo.mediaStatus.videoMuted) {
@@ -380,12 +420,9 @@ Demo.Skyway.on('peerUpdated', function (peerId, peerInfo, isSelf) {
}
});
//---------------------------------------------------
-Demo.Skyway.on('roomLock', function (status, isLocked, error) {
- if (!status) {
- alert(error);
- } else {
- $(Demo.Elements.displayLockStatus).html((isLocked) ? 'Locked' : 'Not Locked');
- }
+Demo.Skyway.on('roomLock', function (isLocked, peerId, peerInfo, isSelf) {
+ $(Demo.Elements.displayLockStatus).html((isLocked) ? 'Locked' : 'Not Locked');
+ console.info(peerInfo);
});
//---------------------------------------------------
Demo.Skyway.on('channelOpen', function () {
@@ -406,7 +443,9 @@ Demo.Skyway.on('channelMessage', function (){
});
//---------------------------------------------------
Demo.Skyway.on('channelError', function (error) {
- Demo.API.displayMsg('System', 'Channel Error:[' +
- ((peerInfo.mediaStatus.audioMuted) ? 'NA' : 'A') +
- '] ' + peerInfo.userData.displayName + ' ';
+ ' ' + peerInfo.userData.displayName + ' ';
var titleList = [
'Joined Room', 'Handshake: Welcome', 'Handshake: Offer',
'Handshake: Answer', 'Candidate Generation state', 'ICE Connection state',
- 'Peer Connection state', 'Data Channel Connection state'
+ 'Peer Connection state', 'Data Channel Connection state',
+ 'MediaStream: Video', 'MediaStream: Audio'
];
var glyphiconList = [
'glyphicon-log-in', 'glyphicon-hand-right', 'glyphicon-hand-left',
'glyphicon-thumbs-up', 'glyphicon-flash', 'glyphicon-magnet',
- 'glyphicon-user', 'glyphicon-link'
+ 'glyphicon-user', 'glyphicon-link', 'glyphicon-facetime-video video',
+ 'glyphicon-volume-up audio'
];
- for( var i = 0; i < 8; i++) {
+ for( var i = 0; i < 10; i++) {
newListEntry += ' ';
}
newListEntry += '
' + error);
+ Demo.API.displayChatMessage('System', {
+ content: 'Channel Error:
' + error
+ });
});
/********************************************************
DOM Events
@@ -418,8 +457,13 @@ $(document).ready(function () {
$(Demo.Elements.chatInput).keyup(function(e) {
e.preventDefault();
if (e.keyCode === 13) {
- //Demo.Skyway.sendDataChannelChatMsg( $(Demo.Elements.chatInput).val() );
- Demo.Skyway.sendChatMessage( $(Demo.Elements.chatInput).val() );
+ Demo.Skyway.sendP2PMessage({
+ header: '[DC]',
+ content: $(Demo.Elements.chatInput).val()
+ });
+ Demo.Skyway.sendMessage({
+ content: $(Demo.Elements.chatInput).val()
+ });
$(Demo.Elements.chatInput).val('');
}
});
@@ -455,14 +499,10 @@ $(document).ready(function () {
});
//---------------------------------------------------
$(Demo.Elements.updateUserBtn).click(function () {
- try {
- var displayName = $(Demo.Elements.updateUserInput).val();
- var userData = Demo.Skyway.getUserData();
- userData.userData.displayName = displayName;
- Demo.Skyway.setUserData(userData.userData);
- } catch (err) {
- alert('Invalid JSON provided');
- }
+ var displayName = $(Demo.Elements.updateUserInput).val();
+ var userData = Demo.Skyway.getUserData();
+ userData.displayName = displayName;
+ Demo.Skyway.setUserData(userData);
});
//---------------------------------------------------
$(Demo.Elements.lockBtn).click(function () {
diff --git a/demo/index.html b/demo/index.html
index 3d232a5e4..7f36148f3 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -41,6 +41,28 @@ SkywayJS Documentation
+ This demo connect as Guest to your API test account. + You just need to fill app ID that you want to use for this demo at the top of the + simple-app/app.js file. No css is provided. +
++ View Demo +
+Available since 0.1.0
+Please check on the init() function -on how you can initialize Skyway.
+on how you can initialize Skyway. Note that: +Skyway
Available since 0.1.0
+_addLocalStream
source\skyway.js:2142
+ source\skyway.js:2422
@@ -1235,6 +1260,8 @@ _addLocalStream
Available since 0.2.0
+PeerId of the peer to send local stream to.
+_addStereo
source\skyway.js:2237
+ source\skyway.js:2522
@@ -1331,10 +1359,15 @@ _addStereo
Available since 0.2.0
+Add Stereo to SDP. Requires OPUS
+Adds stereo feature to the SDP.
+Sdp received.
+_alphanumeric
source\skyway.js:3372
+ source\skyway.js:3651
@@ -1440,12 +1474,16 @@ _alphanumeric
Available since 0.2.0
+Check if a text string consist of only alphanumeric characters. -If so, return true. -If not, return false.
+Check if a string consist of only alphanumeric characters.
+source\skyway.js:2711
+ source\skyway.js:2950
@@ -1553,10 +1591,12 @@ Available since 0.1.0
+Handling reception of an answer (to a previous offer). handshake step 4.
+Handles the reception of an answer (to a previous offer). handshake step 4.
_base64ToBlob
source\skyway.js:3296
+ source\skyway.js:3573
@@ -1718,13 +1758,15 @@ _base64ToBlob
Available since 0.1.0
+Convert base64 to raw binary data held in a string. -Doesn't handle URLEncoded DataURIs
+Converts base64 string to raw binary data.
Blob base64 dataurl.
+source\skyway.js:1833
+ source\skyway.js:2079
@@ -1819,6 +1862,8 @@ Available since 0.1.0
+The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that has left the room.
Message type
+The type of message received.
_candidateHandler
source\skyway.js:2665
+ source\skyway.js:2903
@@ -1956,10 +2002,12 @@ _candidateHandler
Available since 0.1.0
+Handling reception of a candidate. handshake done, connection ongoing.
+Handles the reception of a candidate. handshake done, connection ongoing.
_chatHandler
_checkDataChannelStatus
_chatHandler
message
+ dc
_chatHandler
source\skyway.js:1700
+ source\skyway.js:3116
@@ -2154,10 +2202,16 @@ Available since 0.1.0
+Throw an event with the received chat message
+Checks datachannel ready state.
+message
- JSON
+ dc
+ Object
rid
- String
-
-
- RoomId
- -mid
- String
-
-
- TargetMid.
- -target
- String
-
-
- targetPeerId. For private message
- -data
- String
-
-
- Chat message
- -sender
- String
-
-
- senderPeerId
- -type
- String
-
-
- Message type
+The datachannel object.
-_checkDataChannelStatus
_chunkFile
_checkDataChannelStatus
dc
+ blob
+
+ blobByteSize
_checkDataChannelStatus
-
Check DataChannel ReadyState. If ready, it sends a 'CONN'
+Chunks blob data into chunks.
dc
- Object
+ blob
+ Blob
+
+
+
+
+ The blob data to chunk.
+ +blobByteSize
+ Integer
DataChannel object
+The blob data size.
_chunkFile
_clearDataChannelTimeout
_chunkFile
blob
+ peerId
blobByteSize
-
- To chunk the File (which already is a blob) into smaller blob files. -For now please send files below or around 2KB till chunking is implemented
- -blob
- Blob
-
-
-
-
- blobByteSize
- Integer
-
-
-
-
- _clearDataChannelTimeout
peerId
-
- isSender
+ isSender
_clearDataChannelTimeout
source\skyway.js:3279
+ source\skyway.js:3555
@@ -2555,10 +2428,12 @@ _clearDataChannelTimeout
Available since 0.1.0
+Clear the DataChannel timeout as a response is received
+Clears the datachannel timeout.
PeerId of the datachannel to clear timeout.
+Is peer the sender or the receiver?
+Skyway object.
+_closeChannel
source\skyway.js:2804
+ source\skyway.js:3049
@@ -2666,10 +2544,12 @@ _closeChannel
Available since 0.1.0
+Close the Socket signaling connection.
+Closes the socket signaling connection.
_closeDataChannel
source\skyway.js:2938
+ source\skyway.js:3190
@@ -2740,10 +2620,12 @@ _closeDataChannel
Available since 0.1.0
+To obtain the Peer that it's connected to from the DataChannel
+Closes the datachannel.
PeerId of the peer's datachannel to close.
+Skyway object.
+source\skyway.js:2818
+ source\skyway.js:3064
@@ -2863,6 +2747,8 @@ Available since 0.1.0
+The peerId of which the dataChannel is connected to
+PeerId of the peer which the datachannel is connected to
The callback which it returns the DataChannel object to
+The callback fired when datachannel is created.
The DataChannel object passed inside
+The datachannel object received.
_createPeerConnection
source\skyway.js:2540
+ source\skyway.js:2776
@@ -2991,10 +2877,12 @@ _createPeerConnection
Available since 0.1.0
+Create a peerconnection to communicate with the peer whose ID is 'targetMid'. +
Creates a peerconnection to communicate with the peer whose ID is 'targetMid'. All the peerconnection callbacks are set up here. This is a quite central piece.
source\skyway.js:3047
+ source\skyway.js:3313
@@ -3114,12 +3002,12 @@ Available since 0.1.0
+DataChannel TFTP Protocol Stage: ACK -The user sends a ACK of the request [accept/reject/nhe current -index of chunk to be sent over]
+The user receives an acknowledge of the blob request.
PeerId of the peer that is sending the acknowledgement.
+The data object received from datachannel.
+Skyway object.
+_dataChannelCHATHandler
source\skyway.js:3103
+ source\skyway.js:3368
@@ -3254,11 +3145,12 @@ Available since 0.4.0
+DataChannel TFTP Protocol Stage: CHAT -The user receives a DataChannel CHAT message
+The user receives a datachannel broadcast message.
PeerId of the peer that is sending a broadcast message.
+The data object received from datachannel.
+Skyway object.
+source\skyway.js:3167
+ source\skyway.js:3440
@@ -3399,11 +3294,12 @@ Available since 0.1.0
+DataChannel TFTP Protocol Stage: DATA -This is when the data is sent from the sender to the receiving user
+This is when the data is sent from the sender to the receiving user.
PeerId of the peer that is sending the data.
+The data received.
+[Rel: Skyway.DATA_TRANSFER_DATA_TYPE]
+The data type received from datachannel. + [Rel: Skyway.DATA_TRANSFER_DATA_TYPE]
Skyway object.
+source\skyway.js:3143
+ source\skyway.js:3416
@@ -3554,11 +3454,12 @@ Available since 0.1.0
+DataChannel TFTP Protocol Stage: ERROR -The user received an error, usually an exceeded timeout.
+The user receives a timeout error.
PeerId of the peer that is sending the error.
+The data object received from datachannel.
+Skyway object.
+_dataChannelHandler
source\skyway.js:2956
+ source\skyway.js:3209
@@ -3676,10 +3580,12 @@ _dataChannelHandler
Available since 0.1.0
+The Handler for all DataChannel Protocol events
+Handles all datachannel protocol events.
data
- String
+ String | Object
The data received from datachannel.
+_dataChannelPeer
source\skyway.js:2926
+ source\skyway.js:3177
@@ -3775,10 +3682,12 @@ _dataChannelPeer
Available since 0.1.0
+To obtain the Peer that it's connected to from the DataChannel
+Obtains the peerId of the peer connected to the datachannel.
The datachannel name.
+Skyway object.
+source\skyway.js:3003
+ source\skyway.js:3250
@@ -3898,11 +3809,12 @@ Available since 0.4.0
+DataChannel TFTP Protocol Stage: WRQ -The sender has sent a request to send file +
The user receives a blob request. From here, it's up to the user to accept or reject it
PeerId of the peer that is sending the request.
+The data object received from datachannel.
+Skyway object.
+_doAnswer
source\skyway.js:2083
+ source\skyway.js:2361
@@ -4021,6 +3936,8 @@ _doAnswer
Available since 0.1.0
+The peer we should connect to.
+PeerId of the peer to send answer to.
_doCall
source\skyway.js:2182
+ source\skyway.js:2464
@@ -4114,6 +4031,8 @@ _doCall
Available since 0.1.0
+PeerId of the peer to send offer to.
+_enterHandler
source\skyway.js:1942
+ source\skyway.js:2206
@@ -4210,6 +4130,8 @@ Available since 0.1.0
+The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending the enter shake.
Browser agent
+Peer's browser agent.
Browser version
+Peer's browser version.
Peer Skyway._user.info data.
+Peer's user information.
_errorHandler
source\skyway.js:1718
+ source\skyway.js:1955
@@ -4526,6 +4449,8 @@ _errorHandler
Available since 0.1.0
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending the error message.
Error type
+The error kind.
Message type
+The type of message received.
_findSDPLine
source\skyway.js:2212
+ source\skyway.js:2495
@@ -4693,10 +4618,15 @@ _findSDPLine
Available since 0.2.0
+Find a line in the SDP and return it
+Finds a line in the SDP and returns it.
+Sdp received.
+The conditions.
+_handleAV
isEnabled
-
- hasMedia
+ enableMedia
source\skyway.js:3546
+ source\skyway.js:3843
@@ -4846,11 +4772,18 @@ Available since 0.4.0
+Restart the joinRoom() -process to initiate Audio and Video
+Handles all audio and video mute events.
+isEnabled
- Boolean
-
+ Media types expected to receive. + [Rel: 'audio' or 'video']
- - -hasMedia
+ enableMedia
Boolean
Enable it or disable it
+_handleLock
callback
+
+ source\skyway.js:3504
+ source\skyway.js:3793
@@ -4973,10 +4900,12 @@ Available since 0.4.0
+Handle the Lock actions
+Handles all the room lock events.
[Rel: SkywayDemo.LOCK_ACTION]
+Lock action to send to server for response. + [Rel: SkywayDemo.LOCK_ACTION]
+ +callback
+ Function
+
+
+
+
+ The callback to return the response after + everything's loaded.
source\skyway.js:1901
+ source\skyway.js:2164
@@ -5070,6 +5017,8 @@ Available since 0.1.0
+The message object received.
+pc_config
- JSON
+ rid
+ String
The PeerConnection configuration
+RoomId of the connected room.
Self peerId.
+PeerId of self.
rid
+ mid
String
RoomId
+PeerId of the peer that is
mid
- String
+ pc_config
+ JSON
TargetMid.
+The peerconnection configuration + sending the joinRoom message.
Message type
+The type of message received.
source\skyway.js:712
+ source\skyway.js:834
@@ -5240,6 +5191,8 @@ Available since 0.1.0
+source\skyway.js:1791
+ source\skyway.js:2033
@@ -5337,10 +5290,12 @@ Available since 0.2.0
+Peer Audio is muted/unmuted
+Peer Audio is muted/unmuted.
The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending + their own updated audio stream status.
Message type
+The type of message received.
source\skyway.js:1812
+ source\skyway.js:2056
@@ -5493,10 +5450,12 @@ Available since 0.2.0
+Peer Video is muted/unmuted
+Peer Video is muted/unmuted.
The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending + their own updated video streams status.
Message type
+The type of message received.
source\skyway.js:2048
+ source\skyway.js:2326
@@ -5649,6 +5610,8 @@ Available since 0.1.0
+The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
- -target
- String
-
-
- targetPeerId
+PeerId of the peer that is sending the offer shake.
Message type
+The type of message received.
source\skyway.js:2620
+ source\skyway.js:2857
@@ -5826,6 +5776,8 @@ Available since 0.1.0
+_onRemoteStreamAdded
source\skyway.js:2168
+ source\skyway.js:2449
@@ -5945,6 +5897,8 @@ Available since 0.1.0
+PeerId of the peer that has remote stream to send.
+source\skyway.js:1580
+ source\skyway.js:1838
@@ -6064,6 +6019,8 @@ Available since 0.1.0
+source\skyway.js:1559
+ source\skyway.js:1811
@@ -6183,6 +6140,8 @@ Available since 0.3.0
+source\skyway.js:2756
+ source\skyway.js:3000
@@ -6286,10 +6245,12 @@ Available since 0.1.0
+Initiate a Socket signaling connection.
+Initiate a socket signaling connection.
_openPeer
source\skyway.js:2110
+ source\skyway.js:2389
@@ -6372,6 +6333,8 @@ _openPeer
Available since 0.1.0
+The peer we should connect to.
+PeerId of the peer we should connect to.
The peer's browser
+Peer's browser
source\skyway.js:659
+ source\skyway.js:775
@@ -6524,6 +6487,8 @@ Available since 0.1.0
+_parseStreamSettings
source\skyway.js:3705
+ source\skyway.js:4008
@@ -6632,10 +6597,12 @@ _parseStreamSettings
Available since 0.4.0
+Parse Stream settings
+Parse stream settings
Optional. Media Constraints.
+user
+ JSON
+
+
+ Optional. User custom data.
+ +audio
+ Boolean | JSON
+
+
+ This call requires audio
+ +stereo
+ Boolean
+
+
+ video
+ Boolean | JSON
+
+
+ This call requires video
+ +resolution
+ JSON
+
+
+ resolution.width
+ Integer
+
+
+ resolution.height
+ Integer
+
+
+ frameRate
+ Integer
+
+
+ bandwidth
+ String
+
+
+ Bandwidth settings
+ +audio
+ String
+
+
+ video
+ String
+
+
+ data
+ String
+
+
+ source\skyway.js:1849
+ source\skyway.js:2096
@@ -6728,6 +6856,8 @@ Available since 0.4.0
+The message object received.
+sender
- String
-
-
- The senderPeerId.
- -data
@@ -6777,7 +6894,7 @@ The Data broadcasted
+The data broadcasted
nick
+ rid
String
Deprecated. Nickname of the user
+RoomId of the connected room.
mid
+ cid
String
TargetMid
+CredentialId of the room
cid
+ mid
String
The credentialId
+PeerId of the peer that is sending a private + broadcast message
rid
- String
+ isDataChannel
+ Boolean
RoomId
+Is the message sent from datachannel
Message type
+The type of message received.
_processingSingleMessage
source\skyway.js:1620
+ source\skyway.js:1881
@@ -6921,6 +7039,8 @@ _processingSingleMessage
Available since 0.1.0
+_processSigMessage
source\skyway.js:1600
+ source\skyway.js:1859
@@ -7012,12 +7132,16 @@ _processSigMessage
Available since 0.1.0
+Handle every incoming message. If it's a bundle, extract single messages -Eventually handle the message(s) to -Skyway/_processSingleMessage:method
+Handle every incoming message. If it's a bundle, extract single messages
+messageString
- JSON
+ String
@@ -7102,7 +7226,7 @@ source\skyway.js:1867
+ source\skyway.js:2121
@@ -7110,6 +7234,8 @@ Available since 0.4.0
+The message object received.
+sender
- String
+ data
+ JSON | String
The senderPeerId.
+The data broadcasted
data
- JSON | String
+ rid
+ String
The Data broadcasted
+RoomId of the connected room.
nick
+ cid
String
Deprecated. Nickname of the user
+CredentialId of the room
TargetMid
+PeerId of the peer that is sending a private + broadcast message
cid
- String
+ isDataChannel
+ Boolean
The credentialId
+Is the message sent from datachannel
rid
+ type
String
RoomId
- -type
- String
-
-
- Message type
+The type of message received.
source\skyway.js:1733
+ source\skyway.js:1971
@@ -7308,6 +7422,8 @@ Available since 0.1.0
+The message object.
+RoomId
- -mid
- String
-
-
- TargetMid.
+RoomId of the connected room.
Deprecated. Url to redirect to
+Deprecated. Url to redirect to.
Reason for redirect
+The reason for redirect
Action of the redirect +
The action of the redirect [Rel: Skyway.SYSTEM_ACTION]
Message type
+The type of message received.
_reinit
callback
+ options
options
+ callback
source\skyway.js:952
+ source\skyway.js:1107
@@ -7499,10 +7602,12 @@ Available since 0.4.0
+Reinitialize Skyway signaling credentials
+Re-initialize Skyway signaling credentials.
callback
- Function
-
-
-
-
- Once everything is done
- -options
@@ -7611,7 +7700,7 @@ iceTrickle
- String
+ Boolean
dataChannel
- String
+ Boolean
credentials
- String
+ JSON
callback
+ Function
+
+
+
+
+ Once everything is initialized.
+ +source\skyway.js:1885
+ source\skyway.js:2146
@@ -7756,11 +7861,13 @@ Available since 0.1.0
+Actually clean the peerconnection and trigger an event. Can be called by _byHandler -and leaveRoom.
+Actually clean the peerconnection and trigger an event. +Can be called by _byHandler and leaveRoom.
Id of the peer to remove
+PeerId of the peer that has left.
_requestServerInfo
source\skyway.js:628
+ source\skyway.js:743
@@ -7867,6 +7974,8 @@ _requestServerInfo
Available since 0.2.0
+source\skyway.js:1774
+ source\skyway.js:2013
@@ -8012,10 +8121,12 @@ Available since 0.2.0
+Room Lock is Fired
+Room lock status is changed.
RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending the + updated room lock status.
Message type
+The type of message received.
_sendBlobDataToPeer
source\skyway.js:3469
+ source\skyway.js:3755
@@ -8175,11 +8287,16 @@ _sendBlobDataToPeer
Available since 0.1.0
+Method to send Blob data to individual peer. -This sends the 'WRQ' and initiate the TFTP protocol.
+Sends blob data to individual peer.
+The blob data to be sent over.
The data information.
The transfer Id
+TransferId of the data.
The Blob data name
+Data name.
The timeout to wait for packets. - Default is 60.
+Data timeout to wait for packets. + [Default is 60].
The Blob data size
+Data size
PeerId targeted to receive data. + Leave blank to send to all peers.
+_sendDataChannel
source\skyway.js:2890
+ source\skyway.js:3140
@@ -8370,10 +8485,12 @@ _sendDataChannel
Available since 0.1.0
+Sending of String Data over the DataChannels
+Sends data to the datachannel.
PeerId of the peer's datachannel to send data.
+The data to send.
+_sendMessage
source\skyway.js:2740
+ source\skyway.js:2980
@@ -8476,10 +8595,17 @@ _sendMessage
Available since 0.1.0
+Send a message to the signaling server
+Sends a message to the signaling server.
+_setDataChannelTimeout
source\skyway.js:3244
+ source\skyway.js:3518
@@ -8585,10 +8711,15 @@ _setDataChannelTimeout
Available since 0.1.0
+Set the DataChannel timeout. If exceeded, send the 'ERROR' message
+Sets the datachannel timeout.
+PeerId of the datachannel to set timeout.
+The timeout to set in seconds.
+Is peer the sender or the receiver?
+Skyway object.
+_setFirefoxIceServers
_setFirefoxIceServers
source\skyway.js:2357
+ source\skyway.js:2646
@@ -8721,10 +8860,12 @@ _setFirefoxIceServers
Available since 0.1.0
+This sets the STUN server specially for Firefox for ICE Connection
+Sets the STUN server specially for Firefox for ICE Connection.
Ice configuration servers url object.
+Updated configuration
+ + +source\skyway.js:2295
+ source\skyway.js:2583
@@ -8823,6 +8979,8 @@ Available since 0.1.0
+PeerId of the peer to send offer/answer to.
+_setSDPBitrate
source\skyway.js:2265
+ source\skyway.js:2552
@@ -8936,6 +9095,8 @@ _setSDPBitrate
Available since 0.2.0
+Sdp received.
+_setStreams
source\skyway.js:2498
+ source\skyway.js:2733
@@ -9045,10 +9207,12 @@ _setStreams
Available since 0.3.0
+Close/Open existing mediaStreams
+Opens or closes existing MediaStreams.
_stripNonAlphanumeric
source\skyway.js:3347
+ source\skyway.js:3625
@@ -9186,10 +9350,12 @@ _stripNonAlphanumeric
Available since 0.2.0
+Removes non-alphanumeric characters from a string and return it.
+Removes non-alphanumeric characters from a string.
_trigger
source\skyway.js:804
+ source\skyway.js:949
@@ -9292,12 +9458,16 @@ _trigger
Available since 0.1.0
+Trigger all the callbacks associated with an event -Note that extra arguments can be passed to the callback -which extra argument can be expected by callback is documented by each event
+Trigger all the callbacks associated with an event
+source\skyway.js:1752
+ source\skyway.js:1990
@@ -9390,10 +9560,12 @@ Available since 0.2.0
+User Information is updated
+User information is updated.
The message object.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending the + updated event.
The Skyway._user.info.userData data.
+The peer's user data.
Message type
+The type of message received.
_waitForMediaStream
source\skyway.js:2392
+ source\skyway.js:2683
@@ -9547,11 +9721,16 @@ _waitForMediaStream
Available since 0.4.0
+Waits for MediaStream. Once the stream is loaded, callback is called -If there's not a need for stream, callback is called
+Waits for MediaStream.
+_welcomeHandler
source\skyway.js:2004
+ source\skyway.js:2270
@@ -9821,6 +10000,8 @@ Available since 0.1.0
+The message object received.
+RoomId
+RoomId of the connected room.
TargetMid.
+PeerId of the peer that is sending the welcome shake.
source\skyway.js:3633
+ source\skyway.js:3967
@@ -10172,11 +10354,15 @@ Available since 0.4.0
+Disable Microphone. If Microphone is not enabled from the -beginning, there is no effect.
+Disable microphone.
+source\skyway.js:3683
+ source\skyway.js:3995
@@ -10243,11 +10429,15 @@ Available since 0.4.0
+Disable Webcam Video. If Webcam Video is not enabled from the -beginning, there is no effect.
+Disable webcam video.
+source\skyway.js:3606
+ source\skyway.js:3952
@@ -10314,13 +10504,17 @@ Available since 0.4.0
+Enable Microphone. If Microphone is not enabled from the -beginning, user would have to reinitate the +
Enable microphone.
+source\skyway.js:3655
+ source\skyway.js:3980
@@ -10387,13 +10581,17 @@ Available since 0.4.0
+Enable Webcam Video. If Webcam Video is not enabled from the -beginning, user would have to reinitate the +
Enable webcam video.
+getPeerInfo
source\skyway.js:1133
+ source\skyway.js:1295
@@ -10469,10 +10667,16 @@ getPeerInfo
Available since 0.4.0
+Get the Peer Information
+Gets the peer information.
+-@@ -10538,7 +10745,7 @@var peerInfo = SkywayDemo.getPeerInfo(peerId);
+// Example 1: To get other peer's information + var peerInfo = SkywayDemo.getPeerInfo(peerId);
+// Example 2: To get own information + var userInfo = SkywayDemo.getPeerInfo();
getUserData
getUserData
source\skyway.js:1122
+ source\skyway.js:1281
@@ -10575,10 +10782,12 @@ getUserData
Available since 0.4.0
+Get the User Information
+Gets the user information.
User information
@@ -10661,7 +10870,7 @@source\skyway.js:1498
+ source\skyway.js:1718
@@ -10669,10 +10878,12 @@ Available since 0.4.0
+Get the default cam and microphone
+Get the default webcam and microphone
// Default is to get both audio and video - // Example 1: Get the default stream. + // Example 1: Get both audio and video by default. SkywayDemo.getUserMedia();
// Example 2: Get the audio stream only SkywayDemo.getUserMedia({ @@ -10813,8 +11024,8 @@
Example:
// Example 3: Set the stream settings for the audio and video SkywayDemo.getUserMedia({ 'video' : { - resolution: SkywayDemo.VIDEO_RESOLUTION.HD, - frameRate: 50 + 'resolution': SkywayDemo.VIDEO_RESOLUTION.HD, + 'frameRate': 50 }, 'audio' : { stereo: true } });
@@ -10873,7 +11084,7 @@Triggers:
-source\skyway.js:824
+source\skyway.js:978
@@ -10881,12 +11092,16 @@Triggers:
+Available since 0.3.0
+-@@ -10974,7 +11189,7 @@IMPORTANT: Please call this method to load all server information before joining -the room or doing anything else. -This is Init function to load Skyway.
+Initialize Skyway
++
- IMPORTANT: Please call this method to load all server +information before joining the room or doing anything else.
+Parameters:
iceTrickle
- String
+ Boolean
dataChannel
- String
+ Boolean
credentials
- String
+ JSON
isRoomLocked
Get the lock status of the room.
+++if(SkywayDemo.isRoomLocked()) { + SkywayDemo.unlockRoom(); + } else { + SkywayDemo.lockRoom(); + }
+ +
source\skyway.js:3772
+ source\skyway.js:4097
@@ -11173,13 +11465,18 @@ Available since 0.2.0
+User to join the room. -You may call getUserMedia() -first if you want to get -MediaStream and joining Room seperately.
+User to join the room.
+audio
- String
+ Integer
video
- String
+ Integer
data
- String
+ Integer
// To just join the default room without any video or audio + // Note that calling joinRoom without any parameters + // Still sends any available existing MediaStreams allowed. + // See Examples 2, 3, 4 and 5 etc to prevent video or audio stream SkywayDemo.joinRoom();
// To just join the default room with bandwidth settings SkywayDemo.joinRoom({ - bandwidth: { - data: 14440 + 'bandwidth': { + 'data': 14440 } });
// Example 1: To call getUserMedia and joinRoom seperately @@ -11417,7 +11717,7 @@
Example:
SkywayDemo.joinRoom('room', { 'audio' : true, 'video' : { - 'res' : { + 'resolution' : { 'width' : 640, 'height' : 320 } @@ -11425,9 +11725,9 @@Example:
});// Example 5: Join a room with userData and settings with audio, video and bandwidth SkwayDemo.joinRoom({ - 'userData': { - item1: 'My custom data', - item2: 'Put whatever, string or JSON or array' + 'user': { + 'item1': 'My custom data', + 'item2': 'Put whatever, string or JSON or array' }, 'audio' : { 'stereo' : true @@ -11487,7 +11787,7 @@
Triggers:
-source\skyway.js:3896
+source\skyway.js:4228
@@ -11495,10 +11795,12 @@Triggers:
+Available since 0.1.0
+
User to leave the room
+User to leave the room.
source\skyway.js:3580
+ source\skyway.js:3906
@@ -11565,10 +11867,12 @@ Available since 0.2.0
+Lock the Room to prevent users from coming in
+Lock the room to prevent peers from joining.
off
source\skyway.js:781
+ source\skyway.js:925
@@ -11646,10 +11950,12 @@ off
Available since 0.1.0
+Let app unregister a callback function from an event
+To unregister a callback function from an event.
The Skyway event.
+The callback everytime the event is fired.
+on
source\skyway.js:762
+ source\skyway.js:905
@@ -11765,10 +12073,12 @@ on
Available since 0.1.0
+Let app register a callback function to an event
+To register a callback function to an event.
The Skyway event.
+The callback everytime the event is fired.
+respondBlobRequest
peerId
+
+ accept
+
+ +
User's response to accept or reject file.
+ +peerId
+ String
+
+
+
+
+ PeerId of the peer that is expected to receive + the request response.
+ +accept
+ Boolean
+
+
+
+
+ Accept the Blob download request or not.
+ +source\skyway.js:3389
+ source\skyway.js:3669
@@ -11899,11 +12331,18 @@ Available since 0.1.0
+Method to send Blob data to peers. -Peers have the option to download or reject the file.
+Sends blob data to peer(s).
+The blob data to be sent over.
The data information.
transferId
+ String
+
+
+ TransferId of the data.
+ +name
@@ -11956,7 +12405,7 @@ The Blob data name
+Data name.
The timeout to wait for packets
+Data timeout to wait for packets. + [Default is 60].
The Blob data size. Default is 60.
+Data size
The specific peerId to send to. +
PeerId targeted to receive data. Leave blank to send to all peers.
sendChatMessage
sendMessage
sendChatMessage
source\skyway.js:1368
+ source\skyway.js:1637
@@ -12104,10 +12554,16 @@ Available since 0.4.0
+Send a chat message
+Broadcast a message to all peers.
+message
- String
+ String | JSON
The message data to send.
+Optional. Specified when peer wants to - send a private chat message to the targeted peer.
+PeerId of the peer to send a private + message data to.
// Example 1: Send to all peers - SkywayDemo.sendChatMessage('Hi there!');
-// Example 2: Send to specific peer - SkywayDemo.sendChatMessage('Hi there peer!', targetPeerId)
+ SkywayDemo.sendMessage('Hi there!'); +// Example 2: Send to a targeted peer + SkywayDemo.sendMessage('Hi there peer!', targetPeerId);
sendDataChannelChatMessage
sendP2PMessage
sendDataChannelChatMessage
source\skyway.js:1398
+ source\skyway.js:1676
@@ -12233,10 +12690,20 @@ Available since 0.4.0
+Send a chat message via DataChannel
+Broadcasts to all P2P datachannel messages and broadcasts to a +peer only when targetPeerId is provided.
+message
- String
+ String | JSON
The message data to send.
+Optional. Specified when peer wants to - send a private chat message to the targeted peer.
+Optional. Provide if you want to send to + only one peer
// Example 1: Send to all peers - SkywayDemo.sendDataChannelChatMessage('Hi there!');
+ SkywayDemo.sendP2PMessage('Hi there! This is from a DataChannel!');// Example 2: Send to specific peer - SkywayDemo.sendDataChannelChatMessage('Hi there peer!', targetPeerId)
+ SkywayDemo.sendP2PMessage('Hi there peer! This is from a DataChannel!', targetPeerId);
sendPrivateMessage
setUserData
sendPrivateMessage
data
-
- targetPeerId
+ userData
sendPrivateMessage
source\skyway.js:1438
+ source\skyway.js:1234
@@ -12362,10 +12824,20 @@ Available since 0.3.0
+Broadcasts a private message
+Updates the User information.
+data
- String | JSON
+ userData
+ JSON
targetPeerId
- String
-
-
-
+ User custom data
--// Example 1: Send JSON - SkywayDemo.sendPrivateMessage({ - item1: data1, - item2: data2 - }, targetPeerId);
-// Example 2: Send a String - SkywayDemo.sendPrivateMessage(data1 + '-' + data2, targetPeerId);
+// Example 1: Intial way of setting data before user joins the room + SkywayDemo.setUserData({ + displayName: 'Bobby Rays', + fbUserId: 'blah' + });
+// Example 2: Way of setting data after user joins the room + var userData = SkywayDemo.getUserData(); + userData.userData.displayName = 'New Name'; + userData.userData.fbUserId = 'another Id'; + SkywayDemo.setUserData(userData);
sendPublicMessage
unlockRoom
data
-
- sendPublicMessage
source\skyway.js:1469
+ source\skyway.js:3918
@@ -12486,37 +12937,16 @@ Available since 0.2.0
+Broadcasts a public broadcast message
+Unlock the room to allow peers to join.
data
- String | JSON
-
-
-
-
- -// Example 1: Send JSON - SkywayDemo.sendPublicMessage({ - item1: data1, - item2: data2 - });
-// Example 2: Send a String - SkywayDemo.sendPublicMessage(data1 + '-' + data2);
+SkywayDemo.unlockRoom();
setUserData
userData
-
- -
Set and Update the User information. Please note that the custom -data would be overrided so please call getUser and then modify the -information you want individually.
- -userData
- JSON
-
-
-
-
- User custom data
- ---// Example 1: Intial way of setting data before user joins the room - SkywayDemo.setUserData({ - displayName: 'Bobby Rays', - fbUserId: 'blah' - });
-// Example 2: Way of setting data after user joins the room - var userData = SkywayDemo.getUserData(); - userData.userData.displayName = 'New Name'; - userData.userData.fbUserId = 'another Id'; - SkywayDemo.setUserData(userData);
- -
unlockRoom
-
Unlock the Room to allow users to come in
- ---SkywayDemo.unlockRoom();
- -
_apiKey
source\skyway.js:353
+ source\skyway.js:431
+ Available since 0.3.0
+_channel_open
source\skyway.js:522
+ source\skyway.js:616
+ Available since 0.1.0
+_chunkFileSize
source\skyway.js:578
+ source\skyway.js:688
+ Available since 0.1.0
+_chunkFileSize
_dataChannelPeers
_dataChannelPeers
source\skyway.js:505
+ source\skyway.js:597
+ Available since 0.2.0
+_dataChannelPeers
_dataChannels
_dataChannels
source\skyway.js:497
+ source\skyway.js:588
+ Available since 0.2.0
+_dataTransfersTimeout
source\skyway.js:570
+ source\skyway.js:679
+ Available since 0.1.0
+_defaultRoom
source\skyway.js:360
+ source\skyway.js:439
+ Available since 0.3.0
+_downloadDataSessions
source\skyway.js:562
+ source\skyway.js:670
+ Available since 0.1.0
+_downloadDataTransfers
source\skyway.js:554
+ source\skyway.js:661
+ Available since 0.1.0
+_enableDataChannel
source\skyway.js:605
+ source\skyway.js:718
+ Available since 0.3.0
+_enableIceTrickle
source\skyway.js:596
+ source\skyway.js:708
+ Available since 0.3.0
+_in_room
source\skyway.js:530
+ source\skyway.js:634
+ Available since 0.1.0
+_key
source\skyway.js:399
+ source\skyway.js:483
+ Available since 0.1.0
+_mozChunkFileSize
source\skyway.js:587
+ source\skyway.js:698
+ Available since 0.2.0
+_path
source\skyway.js:319
+ source\skyway.js:393
+ Available since 0.1.0
+_path
_peerConnections
_peerConnections
source\skyway.js:481
+ source\skyway.js:570
+ Available since 0.1.0
+Internal array of peerconnections
+Internal array of peer connections
_peerConnections
_peerInformations
_peerInformations
source\skyway.js:489
+ source\skyway.js:579
+ Available since 0.3.0
+_readyState
source\skyway.js:513
+ source\skyway.js:606
+ Available since 0.1.0
+The current ReadyState --1 'failed', 0 'false', 1 'in process', 2 'done'
+[Rel: Skyway.READY_STATE_CHANGE]_room
source\skyway.js:449
+ source\skyway.js:537
+ Available since 0.3.0
+_room_lock
State if Room is locked or not
+ +_roomCredentials
source\skyway.js:391
+ source\skyway.js:474
+ Available since 0.3.0
+_roomDuration
source\skyway.js:383
+ source\skyway.js:465
+ Available since 0.3.0
+_roomServer
source\skyway.js:346
+ source\skyway.js:423
+ Available since 0.3.0
+_roomStart
source\skyway.js:375
+ source\skyway.js:456
+ Available since 0.3.0
+_selectedRoom
source\skyway.js:367
+ source\skyway.js:447
+ Available since 0.3.0
+_serverPath
source\skyway.js:329
+ source\skyway.js:404
+ Available since 0.2.0
+_serverRegion
source\skyway.js:338
+ source\skyway.js:414
+ Available since 0.3.0
+_socket
source\skyway.js:406
+ source\skyway.js:491
+ Available since 0.1.0
+_socketVersion
source\skyway.js:414
+ source\skyway.js:500
+ Available since 0.1.0
+_streamSettings
source\skyway.js:614
+ source\skyway.js:728
+ Available since 0.2.0
+User stream settings
+User stream settings. By default, all is false.
Default: { - 'audio' : true, - 'video' : true + 'audio' : false, + 'video' : false }
@@ -14700,13 +15057,15 @@_uploadDataSessions
source\skyway.js:546
+ source\skyway.js:652
+ Available since 0.1.0
+_uploadDataTransfers
source\skyway.js:538
+ source\skyway.js:643
+ Available since 0.1.0
+_user
source\skyway.js:421
+ source\skyway.js:508
+ Available since 0.3.0
+CANDIDATE_GENERATION_STATE
source\skyway.js:87
+ source\skyway.js:96
+ Available since 0.1.0
+DATA_CHANNEL_STATE
source\skyway.js:153
+ source\skyway.js:166
+ Available since 0.1.0
+DATA_CHANNEL_STATE
source\skyway.js:117
+ source\skyway.js:128
+ Available since 0.1.0
+DATA_TRANSFER_DATA_TYPE
source\skyway.js:207
+ source\skyway.js:277
+ Available since 0.1.0
+TODO : ArrayBuffer and Blob in DataChannel +
TODO : ArrayBuffer and Blob in DataChannel. Data Channel Transfer Data type. Data Types are:
DATA_TRANSFER_STATE
source\skyway.js:183
+ source\skyway.js:251
+ Available since 0.1.0
+DATA_TRANSFER_TYPE
source\skyway.js:171
+ source\skyway.js:238
+ Available since 0.1.0
+HANDSHAKE_PROGRESS
source\skyway.js:99
+ source\skyway.js:109
+ Available since 0.1.0
+ICE_CONNECTION_STATE
source\skyway.js:43
+ source\skyway.js:50
+ Available since 0.1.0
+LOCK_ACTION
source\skyway.js:269
+ source\skyway.js:341
+ Available since 0.2.0
+PEER_CONNECTION_STATE
source\skyway.js:65
+ source\skyway.js:73
+ Available since 0.1.0
+REGIONAL_SERVER
READY_STATE_CHANGE_ERROR
REGIONAL_SERVER
source\skyway.js:26
+ source\skyway.js:186
+ Available since 0.4.0
+List of regional server for Skyway to connect to. -Default server is US1. Servers:
+Error states that occurs when retrieving server information. States are:
US1
- String
+ API_INVALID
+ Integer
USA server 1. Default server if region is not provided.
+Api Key provided does not exist.
US2
- String
+ API_DOMAIN_NOT_MATCH
+ Integer
USA server 2
+Api Key used in domain does not match.
SG
- String
+ API_CORS_DOMAIN_NOT_MATCH
+ Integer
Singapore server
+Api Key used in CORS domain does + not match.
EU
- String
+ API_CREDENTIALS_INVALID
+ Integer
Europe server
+Api Key credentials does not exist.
SIG_TYPE
Signaling message type. These message types are fixed. -(Legend: S - Send only. R - Received only. SR - Can be Both). -Signaling types are:
- -JOIN_ROOM
- String
+ API_CREDENTIALS_NOT_MATCH
+ Integer
S. Join the Room
+Api Key credentials does not + match what is expected.
IN_ROOM
- String
+ API_INVALID_PARENT_KEY
+ Integer
R. User has already joined the Room
+Api Key does not have a parent key + nor is a root key.
ENTER
- String
+ API_NOT_ENOUGH_CREDIT
+ Integer
SR. Enter from handshake
+Api Key does not have enough credits + to use.
WELCOME
- String
+ API_NOT_ENOUGH_PREPAID_CREDIT
+ Integer
SR. Welcome from handshake
+Api Key does not have enough + prepaid credits to use.
OFFER
- String
+ API_FAILED_FINDING_PREPAID_CREDIT
+ Integer
SR. Offer from handshake
+Api Key preapid payments + does not exist.
ANSWER
- String
+ API_NO_MEETING_RECORD_FOUND
+ Integer
SR. Answer from handshake
+Api Key does not have a meeting + record at this timing. This occurs when Api Key is a static one.
CANDIDATE
- String
+ ROOM_LOCKED
+ Integer
SR. Candidate received
+Room is locked.
BYE
- String
+ NO_SOCKET_IO
+ Integer
R. Peer left the room
+No socket.io dependency is loaded to use.
CHAT
- String
+ NO_XMLHTTPREQUEST_SUPPORT
+ Integer
SR. Chat message relaying
+Browser does not support + XMLHttpRequest to use.
REDIRECT
- String
+ NO_WEBRTC_SUPPORT
+ Integer
R. Server redirecting User
+Browser does not have WebRTC support.
ERROR
- String
+ NO_PATH
+ Integer
R. Server occuring an error
+No path is loaded yet.
INVITE
- String
+ INVALID_XMLHTTPREQUEST_STATUS
+ Integer
SR. TODO.
+Invalid XMLHttpRequest + when retrieving information.
UPDATE_USER
- String
-
+ SR. Update of User information
+ + + - - + + + + + + + + + + + + readonly + + + +List of regional server for Skyway to connect to. +Default server is US1. Servers:
- - +MUTE_VIDEO
+ US1
String
SR. Muting of User's video
+USA server 1. Default server if region is not provided.
MUTE_AUDIO
+ US2
String
SR. Muting of User's audio
+USA server 2
PUBLIC_MESSAGE
+ SG
String
SR. Sending a public broadcast message.
+Singapore server
PRIVATE_MESSAGE
+ EU
String
SR. Sending a private message
+Europe server
SYSTEM_ACTION
SIG_TYPE
SYSTEM_ACTION
source\skyway.js:139
+ source\skyway.js:293
+ Available since 0.3.0
+System actions received from Signaling server. System action outcomes are:
+Signaling message type.
+WARNING
+ JOIN_ROOM
String
System is warning user that the room is closing
+[S] Join the Room
REJECT
+ IN_ROOM
String
System has rejected user from room
+[R] User has already joined the Room
CLOSED
+ ENTER
String
System has closed the room
+[SR] Enter from handshake
WELCOME
+ String
+
-
-[SR] Welcome from handshake
+ +OFFER
+ String
+
+
+
+
+ [SR] Offer from handshake
+ +ANSWER
+ String
+
+
+
+
+ [SR] Answer from handshake
+ +CANDIDATE
+ String
+
+
+
+
+ [SR] Candidate received
+ +BYE
+ String
+
+
+
+
+ [R] Peer left the room
+ +CHAT
+ String
+
+
+
+
+ [SR] Deprecated. Chat message relaying
+ +REDIRECT
+ String
+
+
+
+
+ [R] Server redirecting User
+ +ERROR
+ String
+
+
+
+
+ [R] Server occuring an error
+ +UPDATE_USER
+ String
+
+
+
+
+ [SR] Update of User information
+ +ROOM_LOCK
+ String
+
+
+
+
+ [SR] Locking of Room
+ +MUTE_VIDEO
+ String
+
+
+
+
+ [SR] Muting of User's video
+ +MUTE_AUDIO
+ String
+
+
+
+
+ [SR] Muting of User's audio
+ +PUBLIC_MESSAGE
+ String
+
+
+
+
+ [SR] Sending a public broadcast message.
+ +PRIVATE_MESSAGE
+ String
+
+
+
+
+ [SR] Sending a private message
+ +SYSTEM_ACTION
System actions received from Signaling server. System action outcomes are:
+ +WARNING
+ String
+
+
+
+
+ System is warning user that the room is closing
+ +REJECT
+ String
+
+
+
+
+ System has rejected user from room
+ +CLOSED
+ String
+
+
+
+
+ System has closed the room
+ +VERSION
Version of Skyway
+ +VIDEO_RESOLUTION
Video Resolutions. Resolution types are:
+ +QVGA
+ JSON
+
+
+
+
+ QVGA video quality
+ +width
+ Integer
+
+
+ 320
+ +height
+ Integer
+
+
+ 180
+ +VGA
+ JSON
+
+
+
+
+ VGA video quality
+ +width
+ Integer
+
+
+ 640
+ +height
+ Integer
+
+
+ 360
+ +HD
+ JSON
+
+
+
+
+ HD video quality
+ +width
+ Integer
+
+
+ 1280
+ +height
+ Integer
+
+
+ 720
+ +FHD
+ JSON
+
+
+
+
+ Might not be supported. FullHD video quality.
+ +width
+ Integer
+
+
+ 1920
+ +height
+ Integer
+
+
+ 1080
+ +candidateGenerationState
channelClose
Version of Skyway
+Event fired when the channel has been closed.
channelError
VIDEO_RESOLUTION
Event fired when there was an error with the connection channel to the sig server.
+ +error
+ Object | String
+
+
+
+
+ Error message or object thrown.
+ +channelMessage
Video Resolutions. Resolution types are:
+Event fired when we received a message from the signaling server.
QVGA
+ message
JSON
QVGA video quality
- +width
- Integer
-
+ 320
-height
- Integer
-
+
+ channelOpen
180
+ -Event fired when a successfull connection channel has been established +with the signaling server
- -width
- Integer
-
+ Datachannel: ACK
height
- Integer
-
+ Fired when a datachannel has a blob data send request acknowledgement.
+360
+HD
- JSON
+ ackN
+ Integer
HD video quality
+The acknowledge number.
width
- Integer
-
-
- 1280
- -height
- Integer
-
-
- 720
- -FHD
- JSON
+ userAgent
+ Integer
Might not be supported. FullHD video quality.
+The user's browser agent.
width
- Integer
-
-
- 1920
- -height
- Integer
-
-
- 1080
- -addPeerStream
Datachannel: CHAT
addPeerStream
source\skyway.js:1290
+ source\skyway.js:1623
+ Available since 0.4.0
+Event fired when a remote stream has become available
+Fired when a datachannel chat has been received.
peerId
+ type
String
If the message is a private or group message.
+stream
- Object
+ peerId
+ String
PeerId of the sender.
+isSelf
- Boolean
+ message
+ JSON | String
The message data or object.
+candidateGenerationState
Datachannel: CONN
candidateGenerationState
source\skyway.js:1189
+ source\skyway.js:1581
+ Available since 0.4.0
+Event fired during ICE gathering
+Fired when a datachannel is successfully connected.
state
- String
-
-
-
-
- [Rel: Skyway.CANDIDATE_GENERATION_STATE]
- -peerId
+ UNKNOWN
String
@@ -17637,13 +18760,15 @@ channelClose
Datachannel: ERROR
channelClose
source\skyway.js:1156
+ source\skyway.js:1614
+ Available since 0.4.0
+Event fired when the channel has been closed.
+Fired when a datachannel transfer has an error occurred.
message
+ String
+
+
+
+
+ The error message.
+ +isSender
+ Boolean
+
+
+
+
+ If user's the uploader.
+ +channelError
Datachannel: WRQ
channelError
source\skyway.js:1167
-
-
+
+
+ source\skyway.js:1590
+
+
+
+
+
+
+ Available since 0.4.0
+ +Fired when a datachannel has a blob data send request.
+ +userAgent
+ String
+
+
+
+
+ The user's browser agent.
+ +name
+ String
+
+
+
+
+ The blob data name.
+ +size
+ Integer
+
-
+
-
- The blob data size.
-Event fired when there was an error with the connection channel to the sig server.
+chunkSize
+ Integer
+
-
- The expected chunk size.
+ +error
- String
+ timeout
+ Integer
The timeout in seconds.
+channelMessage
dataChannelState
channelMessage
source\skyway.js:1161
+ source\skyway.js:1538
+ Available since 0.1.0
+Event fired when we received a message from the sig server..
+Event fired when a peer's datachannel state has changed.
message
- JSON
+ state
+ String
The current datachannel state. + [Rel: Skyway.DATA_CHANNEL_STATE]
+channelOpen
peerId
+ String
+
-
+
-
+ PeerId of peer that has a datachannel state change.
- +Event fired when a successfull connection channel has been established -with the signaling server
- -channelOpen
chatMessageReceived
dataTransferState
chatMessageReceived
source\skyway.js:1222
+ source\skyway.js:1547
+ Available since 0.1.0
+Event fired when a chat message is received from other peers
+Event fired when a data transfer state has changed.
message
+ state
String
The current data transfer state. + [Rel: Skyway.DATA_TRANSFER_STATE]
+senderPeerId
+ transferId
String
TransferId of the data
+userData
- String | JSON
+ peerId
+ String
PeerId of the peer that has a data + transfer state change.
+isPrivate
- Boolean
+ transferInfo
+ JSON
Transfer information.
+isSelf
- Boolean
-
+ percentage
+ JSON
+
-
+ The percetange of data being + uploaded / downloaded
-senderPeerId
+ JSON
+
+
+ data
+ JSON
+
+
+ Blob data URL
+ +name
+ JSON
+
+
+ Blob data name
+ +size
+ JSON
+
+
+ Blob data size
+ +message
+ JSON
+
+
+ Error object thrown.
+ +type
+ JSON
+
+ Where the error message occurred. + [Rel: Skyway.DATA_TRANSFER_TYPE]
+ +dataChannelState
handshakeProgress
dataChannelState
source\skyway.js:1314
+ source\skyway.js:1358
+ Available since 0.3.0
+Event fired when a DataChannel's state has changed
+Event fired when a step of the handshake has happened. Usefull for diagnostic +or progress bar.
state
+ step
+ String
+
+
+
+
+ The current handshake progress step. + [Rel: Skyway.HANDSHAKE_PROGRESS]
+ +peerId
String
[Rel: Skyway.DATA_CHANNEL_STATE]
+PeerId of the peer's handshake progress.
peerId
- String
+ error
+ JSON | Object | String
Error message or object thrown.
+dataTransferState
incomingMessage
dataTransferState
source\skyway.js:1321
+ source\skyway.js:1500
+ Available since 0.4.0
+Event fired when a Peer there is a Data Transfer going on
+Event fired when a message being broadcasted is received.
state
- String
-
-
-
-
- [Rel: Skyway.DATA_TRANSFER_STATE]
- -transferId
- String
-
-
-
-
- ID of the Data Transfer
- -peerId
- String
-
-
-
-
- Peer's ID
- -transferInfo
+ message
JSON
Available data may vary at different state.
+Message object that is received.
percentage
- JSON
+ content
+ JSON | String
The percetange of data being - uploaded / downloaded
+Data that is broadcasted.
senderPeerId
- JSON
+ sendPeerId
+ String
PeerId of the sender peer.
+data
- JSON
+ targetPeerId
+ String
Blob data URL
+PeerId that is specifically + targeted to receive the message.
name
- JSON
+ isPrivate
+ Boolean
Data name
+Is data received a private message.
size
- JSON
+ isDataChannel
+ Boolean
Data size
+Is data received from a data channel.
message
- JSON
-
+
+
+ peerId
+ String
+
- Error message
+ -PeerId of the sender peer.
- - - -type
- JSON
-
+ Where the error message occurred. - [Rel: Skyway.DATA_TRANSFER_TYPE]
+ + + +isSelf
+ Boolean
+
- Check if message is sent to self
+ +handshakeProgress
incomingStream
handshakeProgress
source\skyway.js:1180
+ source\skyway.js:1488
+ Available since 0.4.0
+Event fired when a step of the handshake has happened. Usefull for diagnostic -or progress bar.
+Event fired when a remote stream has become available.
+step
- String
+ stream
+ Object
[Rel: Skyway.HANDSHAKE_PROGRESS]
+MediaStream object.
PeerId of the peer that is sending the stream.
+error
- JSON | Object | String
+ isSelf
+ Boolean
Error message when error occurs
+Is the peer self.
mediaAccessError
source\skyway.js:1210
+ source\skyway.js:1399
+ Available since 0.1.0
+Error message or object thrown.
+mediaAccessSuccess
source\skyway.js:1216
+ source\skyway.js:1406
+ Available since 0.1.0
+MediaStream object.
+peerConnectionState
source\skyway.js:1196
+ source\skyway.js:1379
+ Available since 0.1.0
+[Rel: Skyway.PEER_CONNECTION_STATE]
+The current peer connection state. + [Rel: Skyway.PEER_CONNECTION_STATE]
+ +peerId
+ String
+
+
+
+
+ PeerId of the peer that had a peer connection state + change.
peerJoined
source\skyway.js:1232
+ source\skyway.js:1413
+ Available since 0.3.0
+PeerId of the peer that joined the room.
+Peer Information of the peer
+peerLeft
source\skyway.js:1274
+ source\skyway.js:1457
- Event fired when a peer leaves the room
- -peerId,
- String
-
-
-
-
- isSelf
- Boolean
-
-
-
-
- peerUpdated
Event fired when a peer information is updated. Inactive audio or video means that the -audio is muted or video is muted.
+Event fired when a peer leaves the room
PeerId of the peer that left.
+Peer Information of the peer
+Is the Peer self.
+Is the peer self.
presenceChanged
peerUpdated
presenceChanged
source\skyway.js:1281
+ source\skyway.js:1435
+ Available since 0.3.0
+TODO Event fired when a peer joins the room
+Event fired when a peer information is updated. Inactive audio or video means that the +audio is muted or video is muted.
users
- JSON
+ peerId
+ String
The list of users
+PeerId of the peer that had information updaed.
privateMessage
peerInfo
+ JSON
+
-
+
-
+ Peer Information of the peer
- +Event fired when a private message is broadcasted.
+ +audio
+ Boolean | JSON
- audio.stereo
+ Boolean
-
- video
+ Boolean | JSON
- data
- JSON | String
-
+ video.resolution
+ JSON
-
+ video.resolution.width
+ Integer
- Data to be sent over. Data is based on - what the user has set.
+video.resolution.height
+ Integer
- video.frameRate
+ Integer
-
- senderPeerId
- String
-
+ mediaStatus
+ JSON
+
-
+ Peer stream status.
-Sender
+audioMuted
+ Boolean
-
- peerId
- String
-
+ videoMuted
+ Boolean
-
+ userData
+ String | JSON
+
- Targeted Peer to receive the data
+Peer custom data
-Check if message is sent to self
+Is the peer self.
publicMessage
presenceChanged
publicMessage
source\skyway.js:1357
+ source\skyway.js:1478
+ Available since 0.1.0
+Event fired when a public message is broadcasted.
+TODO Event fired when a peer joins the room
data
- JSON | String
-
-
-
-
- Data to be sent over. Data is based on - what the user has set.
- -senderPeerId
- String
-
-
-
-
- Sender
- -isSelf
- Boolean
+ users
+ JSON
Check if message is sent to self
+The list of users
readyStateChange
source\skyway.js:1173
+ source\skyway.js:1345
+ Available since 0.4.0
+error
- String
+ JSON
Error message when there's an error
+Error object thrown.
removePeerStream
TODO Event fired when a remote stream has become unavailable
+ + + +content
+ String
+
- A short description of the error
- -peerId
- String
-
+
+ errorCode
+ Integer
+
-
+ The error code for the type of error + [Rel: Skyway.READY_STATE_CHANGE_ERROR]
-roomLock
source\skyway.js:1305
+ source\skyway.js:1515
+ Available since 0.4.0
+Event fired when a room is locked
+Event fired when a room lock status has changed.
success
+ isLocked
Boolean
Is the room locked.
+isLocked
- Boolean
+ peerId
+ String
PeerId of the peer that is locking/unlocking the room.
+error
- String
+ peerInfo
+ JSON
Peer Information of the peer
+ +settings
+ JSON
+
+
+ Peer stream settings
+ +audio
+ Boolean | JSON
+
+ audio.stereo
+ Boolean
+
+ video
+ Boolean | JSON
+
+ video.resolution
+ JSON
+
+ video.resolution.width
+ Integer
+
+ video.resolution.height
+ Integer
+
+ video.frameRate
+ Integer
+
+ mediaStatus
+ JSON
+
+
+ Peer stream status.
+ +audioMuted
+ Boolean
+
+ videoMuted
+ Boolean
+
+ userData
+ String | JSON
+
+
+ Peer custom data
+ +isSelf
+ Boolean
+
+
+
+
+ Is the peer self.
+systemAction
source\skyway.js:1339
+ source\skyway.js:1568
+ Available since 0.1.0
+[Rel: Skyway.SYSTEM_ACTION]
+The action that is required for the current peer to + follow. [Rel: Skyway.SYSTEM_ACTION]
The reason of the action
+Reason for the action