Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connectycube

Package Overview
Dependencies
Maintainers
2
Versions
104
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 3.22.3 to 3.23.0

28

lib/videocalling_conference/cubeConferenceSession.js

@@ -214,6 +214,4 @@ const Utils = require('../cubeInternalUtils');

stopLocalStreamTracks(isIgnoreAudioTrack = false) {
const isReactNative = Utils.getEnv().reactnative;
this.localStream.getTracks().forEach(track => {
if ((isIgnoreAudioTrack || isReactNative) && track.kind === CALL_TYPES.AUDIO) {
if (isIgnoreAudioTrack && track.kind === CALL_TYPES.AUDIO) {
return

@@ -302,4 +300,2 @@ } else {

) {
const isReactNative = Utils.getEnv().reactnative;
if (!updateCurrentStream) {

@@ -337,9 +333,6 @@ this.localStream = newStream

if (updateCurrentStream) {
if (!isReactNative) {
const pcSenders = this.currentPublisherPC.getSenders()
const sender = pcSenders.find(sender => track.kind === sender.track.kind)
//update remote stream
sender.replaceTrack(track)
}
const pcSenders = this.currentPublisherPC.getSenders()
const sender = pcSenders.find(sender => track.kind === sender.track.kind)
//update remote stream
sender.replaceTrack(track)
//update local stream

@@ -354,13 +347,2 @@ this.localStream.addTrack(track)

if (isReactNative && updateCurrentStream) {
const janusClient = this._clientConf;
janusClient.videoRoomPlugin.webrtcStuff.sdpSent = false;
janusClient.videoRoomPlugin.webrtcStuff.mySdp = null;
janusClient.createOffer({}, {
success: () => {},
error: () => {}
})
}
return this.localStream

@@ -367,0 +349,0 @@ }

50

lib/videocalling/cubeRTCPeerConnection.js

@@ -13,5 +13,2 @@ const config = require('../cubeConfig');

this.isAddTrackSupported = !!this.addTrack;
this.isRTCRtpSenderSupported = !!this.getSenders;
this.delegate = delegate;

@@ -26,2 +23,4 @@

this.remoteStream = new MediaStream();
this.ontrack = this.onAddRemoteMediaCallback.bind(this);
this.onicecandidate = this.onIceCandidateCallback.bind(this);

@@ -31,10 +30,3 @@ this.onsignalingstatechange = this.onSignalingStateCallback.bind(this);

if (this.isAddTrackSupported) {
this.remoteStream = new MediaStream();
this.ontrack = this.onAddRemoteMediaCallback.bind(this);
this.onStatusClosedChecker = undefined;
} else {
this.remoteStream = null;
this.onaddstream = this.onAddRemoteMediaCallback.bind(this);
}
this.onStatusClosedChecker = undefined;

@@ -93,15 +85,6 @@ /** We use this timer interval to dial a user - produce the call requests each N seconds. */

.then(offer => {
if (!this.isRTCRtpSenderSupported) {
/* caller updates maxBandwidth (bitrate) in offer's SDP
and sets the modified SDP to localDescription */
offer.sdp = updateVideoBandwidthRestriction(offer.sdp, maxBandwidth);
}
this.setLocalDescription(offer)
.then(result => {
if (this.isRTCRtpSenderSupported) {
/* caller sets maxBandwidth to RTCRtpSender parameters' encodings */
this.setRTCRtpSenderMaxBandwidth(maxBandwidth);
}
/* caller sets maxBandwidth to RTCRtpSender parameters' encodings */
this.setRTCRtpSenderMaxBandwidth(maxBandwidth);
resolve(result);

@@ -113,15 +96,6 @@ }).catch(reject);

.then(answer => {
if (!this.isRTCRtpSenderSupported) {
/* callee updates maxBandwidth (bitrate) in answer's SDP
and sets the modified SDP to localDescription */
answer.sdp = updateVideoBandwidthRestriction(answer.sdp, maxBandwidth);
}
this.setLocalDescription(answer)
.then(result => {
if (this.isRTCRtpSenderSupported) {
/* callee sets maxBandwidth (bitrate) to RTCRtpSender parameters' encodings */
this.setRTCRtpSenderMaxBandwidth(maxBandwidth);
}
/* callee sets maxBandwidth (bitrate) to RTCRtpSender parameters' encodings */
this.setRTCRtpSenderMaxBandwidth(maxBandwidth);
resolve(result);

@@ -143,7 +117,7 @@ })

if (!params.encodings) {
params.encodings = [{}];
params.encodings = [];
}
if (!maxBandwidth) {
delete params.encodings[0].maxBitrate;
delete params.encodings[0]?.maxBitrate;
} else {

@@ -222,7 +196,3 @@ params.encodings[0].maxBitrate = maxBandwidth * 1000;

if (typeof this.delegate._onRemoteStreamListener === 'function') {
if (event.type === 'addstream') {
this.remoteStream = event.stream;
} else {
this.remoteStream.addTrack(event.track);
}
this.remoteStream.addTrack(event.track);

@@ -229,0 +199,0 @@ if (((this.delegate.callType == 1) && this.remoteStream.getVideoTracks().length) ||

@@ -106,6 +106,2 @@ const config = require('../cubeConfig');

if (!peer.isRTCRtpSenderSupported) {
break;
}
peer.getSenders().map(sender => {

@@ -135,9 +131,3 @@ const track = newStreamTracks.find(track => {

if (peer.isRTCRtpSenderSupported) {
peer.setRTCRtpSenderMaxBandwidth(maxBandwidth);
} else {
Helpers.trace("'setMaxBandwidth' API is not supported in your client");
break;
}
peer.setRTCRtpSenderMaxBandwidth(maxBandwidth);
}

@@ -265,9 +255,5 @@ }

if (peer.isAddTrackSupported) {
this.localStream.getTracks().forEach(track => {
peer.addTrack(track, this.localStream);
});
} else {
peer.addStream(this.localStream);
}
this.localStream.getTracks().forEach(track => {
peer.addTrack(track, this.localStream);
});

@@ -278,7 +264,7 @@ this.peerConnections[userID] = peer;

.then(() => {
Helpers.trace("getAndSessionDescription success");
Helpers.trace("getAndSetLocalSessionDescription success");
/* let's send call requests to user */
peer._startDialingTimer(extension, withOnNotAnswerCallback);
}).catch(err => {
Helpers.trace("getAndSessionDescription error: " + err);
Helpers.trace("getAndSetLocalSessionDescription error: " + err);
});

@@ -329,9 +315,5 @@ }

if (peerConnection) {
if (peerConnection.isAddTrackSupported) {
this.localStream.getTracks().forEach(track => {
peerConnection.addTrack(track, this.localStream);
});
} else {
peerConnection.addStream(this.localStream);
}
this.localStream.getTracks().forEach(track => {
peerConnection.addTrack(track, this.localStream);
});

@@ -338,0 +320,0 @@ peerConnection

{
"name": "connectycube",
"description": "ConnectyCube chat and video chat JavaScript SDK",
"version": "3.22.3",
"version": "3.23.0",
"homepage": "https://developers.connectycube.com/reactnative",

@@ -84,3 +84,3 @@ "main": "lib/cubeMain.js",

},
"gitHead": "1950bc97c5219ccaeec277f877e5544401afcf78"
"gitHead": "d5531bf92adcf329a10b6b82af1932e91cd05f72"
}

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