Socket
Socket
Sign inDemoInstall

connectycube

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connectycube - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

2

package.json
{
"name": "connectycube",
"description": "ConnectyCube JavaScript SDK",
"version": "1.7.2",
"version": "1.7.3",
"homepage": "https://developers.connectycube.com/js/",

@@ -6,0 +6,0 @@ "main": "src/cubeMain.js",

let config = {
version: '1.7.2',
version: '1.7.3',
creds: {

@@ -4,0 +4,0 @@ appId: '',

@@ -142,3 +142,3 @@ 'use strict';

msg.c(title);
msg = msg.c(title);

@@ -149,20 +149,23 @@ Object.keys(obj).forEach(function(field) {

} else {
msg.c(field)
.t(obj[field])
.up();
msg = msg.c(field).t(obj[field]).up();
}
});
msg.up();
msg = msg.up();
},
_XMLtoJS: function(extension, title, obj) {
var self = this;
extension[title] = {};
for (var i = 0, len = obj.childNodes.length; i < len; i++) {
if (obj.childNodes[i].childNodes.length > 1) {
extension[title] = self._XMLtoJS(extension[title], obj.childNodes[i].tagName, obj.childNodes[i]);
var objChildNodes = obj.childNodes || obj.children;
for (var i = 0; i < objChildNodes.length; i++) {
var subNode = objChildNodes[i];
var subNodeChildNodes = subNode.childNodes || subNode.children;
var subNodeTagName = subNode.tagName || subNode.name;
var subNodeTextContent = subNode.textContent || subNode.children[0];
if (subNodeChildNodes.length > 1) {
extension[title] = this._XMLtoJS(extension[title], subNodeTagName, subNode);
} else {
extension[title][obj.childNodes[i].tagName] = obj.childNodes[i].textContent;
extension[title][subNodeTagName] = subNodeTextContent;
}

@@ -169,0 +172,0 @@ }

@@ -57,2 +57,4 @@ 'use strict';

this.iceCandidates = [];
this.released = false;
};

@@ -64,5 +66,3 @@

if (this.connectionState !== 'closed') {
this.close();
}
this.close();

@@ -73,2 +73,4 @@ // TODO: 'closed' state doesn't fires on Safari 11 (do it manually)

}
this.released = true;
};

@@ -193,3 +195,6 @@

*/
// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/signalingState
RTCPeerConnection.prototype.onSignalingStateCallback = function() {
Helpers.trace("onSignalingStateCallback: " + this.signalingState);
if (this.signalingState === 'stable' && this.iceCandidates.length > 0){

@@ -253,3 +258,3 @@ this.delegate.processIceCandidates(this, this.iceCandidates);

if (typeof this.delegate._onSessionConnectionStateChangedListener === 'function'){
var connectionState = null;
var conState = null;

@@ -263,3 +268,3 @@ if (Helpers.getVersionSafari() >= 11) {

this.state = RTCPeerConnection.State.CHECKING;
connectionState = Helpers.SessionConnectionState.CONNECTING;
conState = Helpers.SessionConnectionState.CONNECTING;
break;

@@ -270,3 +275,3 @@

this.state = RTCPeerConnection.State.CONNECTED;
connectionState = Helpers.SessionConnectionState.CONNECTED;
conState = Helpers.SessionConnectionState.CONNECTED;
break;

@@ -277,3 +282,3 @@

this.state = RTCPeerConnection.State.COMPLETED;
connectionState = Helpers.SessionConnectionState.COMPLETED;
conState = Helpers.SessionConnectionState.COMPLETED;
break;

@@ -283,3 +288,3 @@

this.state = RTCPeerConnection.State.FAILED;
connectionState = Helpers.SessionConnectionState.FAILED;
conState = Helpers.SessionConnectionState.FAILED;
break;

@@ -290,3 +295,3 @@

this.state = RTCPeerConnection.State.DISCONNECTED;
connectionState = Helpers.SessionConnectionState.DISCONNECTED;
conState = Helpers.SessionConnectionState.DISCONNECTED;

@@ -305,3 +310,3 @@ // repeat to call onIceConnectionStateCallback to get status "closed"

this.state = RTCPeerConnection.State.CLOSED;
connectionState = Helpers.SessionConnectionState.CLOSED;
conState = Helpers.SessionConnectionState.CLOSED;
break;

@@ -313,4 +318,4 @@

if (connectionState) {
self.delegate._onSessionConnectionStateChangedListener(this.userID, connectionState);
if (conState) {
self.delegate._onSessionConnectionStateChangedListener(this.userID, conState);
}

@@ -317,0 +322,0 @@ }

@@ -173,3 +173,3 @@ 'use strict';

Helpers.trace("onCall. UserID:" + userID + ". SessionID: " + sessionID);
Helpers.trace("onCall. UserID:" + userID + ". SessionID: " + sessionID + ". extension: " + JSON.stringify(userInfo));

@@ -257,8 +257,7 @@ if (this.isExistNewOrActiveSessionExceptSessionID(sessionID)) {

if (session && (session.state === WebRTCSession.State.ACTIVE || session.state === WebRTCSession.State.NEW)) {
session.processOnStop(userID, extension);
if (typeof this.onStopCallListener === 'function') {
Utils.safeCallbackCall(this.onStopCallListener, session, userID, userInfo);
Utils.safeCallbackCall(this.onStopCallListener, session, userID, userInfo);
}
// Need to make this asynchronously, to keep the strophe handler alive
setTimeout(session.processOnStop.bind(session), 10, userID, extension);
} else {

@@ -265,0 +264,0 @@ if (typeof this.onInvalidEventsListener === 'function'){

@@ -464,25 +464,2 @@ 'use strict';

/**
* [function close connection with user]
* @param {Number} userId [id of user]
*/
WebRTCSession.prototype.closeConnection = function(userId) {
var self = this,
peer = this.peerConnections[userId];
if(!peer) {
Helpers.traceWarn('Not found connection with user (' + userId + ')');
return false;
}
try {
peer.release();
} catch (e) {
Helpers.traceError(e);
} finally {
self._closeSessionIfAllConnectionsClosed();
}
};
/**
* Update a call

@@ -605,4 +582,5 @@ * @param {array} A map with custom parameters

if (userID === self.initiatorID) {
if (Object.keys(self.peerConnections).length) {
Object.keys(self.peerConnections).forEach(function(key) {
var pcKeys = Object.keys(self.peerConnections);
if (pcKeys.length > 0) {
pcKeys.forEach(function(key) {
self.peerConnections[key].release();

@@ -769,3 +747,5 @@ });

*/
peerState = peerCon.iceConnectionState === 'closed' ? 'closed' : peerCon.signalingState;
peerState = peerCon.iceConnectionState === 'closed' ? 'closed' :
peerCon.signalingState === 'closed' ? 'closed' :
peerCon.released ? 'closed' : null;
} catch(err) {

@@ -772,0 +752,0 @@ Helpers.traceError(err);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc