New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@observertc/observer-js

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@observertc/observer-js - npm Package Compare versions

Comparing version 0.30.3-beta to 0.30.4-beta

27

lib/ObservedClient.d.ts
/// <reference types="node" />
import { ClientSample } from '@observertc/sample-schemas-js';
import { ClientSample, IceLocalCandidate, IceRemoteCandidate } from '@observertc/sample-schemas-js';
import { ObservedCall } from './ObservedCall';

@@ -25,2 +25,27 @@ import { StorageProvider } from './storages/StorageProvider';

newpeerconnection: [ObservedPeerConnection];
iceconnectionstatechange: [
{
peerConnection: ObservedPeerConnection;
state: string;
}
];
icegatheringstatechange: [
{
peerConnection: ObservedPeerConnection;
state: string;
}
];
connectionstatechange: [
{
peerConnection: ObservedPeerConnection;
state: string;
}
];
selectedcandidatepair: [
{
peerConnection: ObservedPeerConnection;
localCandidate: IceLocalCandidate;
remoteCandidate: IceRemoteCandidate;
}
];
};

@@ -27,0 +52,0 @@ export declare interface ObservedClient<AppData extends Record<string, unknown> = Record<string, unknown>> {

@@ -297,9 +297,18 @@ "use strict";

case CallEventType_1.CallEventType.ICE_CONNECTION_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('iceconnectionstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('iceconnectionstatechange', {
peerConnection,
state: callEvent.value,
});
break;
case CallEventType_1.CallEventType.ICE_GATHERING_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('icegatheringstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('icegatheringstatechange', {
peerConnection,
state: callEvent.value,
});
break;
case CallEventType_1.CallEventType.PEER_CONNECTION_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('connectionstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('connectionstatechange', {
peerConnection,
state: callEvent.value,
});
break;

@@ -584,3 +593,11 @@ case CallEventType_1.CallEventType.PEER_CONNECTION_OPENED: {

}
const onNewSelectedCandidatePair = ({ localCandidate, remoteCandidate }) => {
this.emit('selectedcandidatepair', {
peerConnection: result,
localCandidate,
remoteCandidate,
});
};
result.once('close', () => {
result.ICE.off('new-selected-candidate-pair', onNewSelectedCandidatePair);
this._peerConnections.delete(peerConnectionId);

@@ -590,2 +607,3 @@ this._model.peerConnectionIds = this._model.peerConnectionIds.filter((id) => id !== peerConnectionId);

});
result.ICE.on('new-selected-candidate-pair', onNewSelectedCandidatePair);
this._peerConnections.set(peerConnectionId, result);

@@ -592,0 +610,0 @@ this._model.peerConnectionIds.push(peerConnectionId);

3

lib/ObservedPeerConnection.d.ts

@@ -16,5 +16,2 @@ /// <reference types="node" />

newoutboundvideotrack: [ObservedOutboundTrack<'video'>];
iceconnectionstatechange: [string];
icegatheringstatechange: [string];
connectionstatechange: [string];
};

@@ -21,0 +18,0 @@ export type ObservedPeerConnectionConfig = {

{
"name": "@observertc/observer-js",
"version": "0.30.3-beta",
"version": "0.30.4-beta",
"description": "Server Side NodeJS Library for processing ObserveRTC Samples",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,2 +0,2 @@

import { ClientSample } from '@observertc/sample-schemas-js';
import { ClientSample, IceLocalCandidate, IceRemoteCandidate } from '@observertc/sample-schemas-js';
import { ObservedCall } from './ObservedCall';

@@ -37,2 +37,19 @@ import * as Models from './models/Models';

newpeerconnection: [ObservedPeerConnection],
iceconnectionstatechange: [{
peerConnection: ObservedPeerConnection,
state: string,
}],
icegatheringstatechange: [{
peerConnection: ObservedPeerConnection,
state: string,
}],
connectionstatechange: [{
peerConnection: ObservedPeerConnection,
state: string,
}],
selectedcandidatepair: [{
peerConnection: ObservedPeerConnection,
localCandidate: IceLocalCandidate,
remoteCandidate: IceRemoteCandidate,
}],
};

@@ -409,9 +426,18 @@

case CallEventType.ICE_CONNECTION_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('iceconnectionstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('iceconnectionstatechange', {
peerConnection,
state: callEvent.value,
});
break;
case CallEventType.ICE_GATHERING_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('icegatheringstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('icegatheringstatechange', {
peerConnection,
state: callEvent.value,
});
break;
case CallEventType.PEER_CONNECTION_STATE_CHANGED:
peerConnection && callEvent.value && peerConnection.emit('connectionstatechange', callEvent.value);
peerConnection && callEvent.value && this.emit('connectionstatechange', {
peerConnection,
state: callEvent.value,
});
break;

@@ -787,3 +813,12 @@ case CallEventType.PEER_CONNECTION_OPENED: {

const onNewSelectedCandidatePair = ({ localCandidate, remoteCandidate }: { localCandidate: IceLocalCandidate, remoteCandidate: IceRemoteCandidate }) => {
this.emit('selectedcandidatepair', {
peerConnection: result,
localCandidate,
remoteCandidate,
});
};
result.once('close', () => {
result.ICE.off('new-selected-candidate-pair', onNewSelectedCandidatePair);
this._peerConnections.delete(peerConnectionId);

@@ -793,2 +828,3 @@ this._model.peerConnectionIds = this._model.peerConnectionIds.filter((id) => id !== peerConnectionId);

});
result.ICE.on('new-selected-candidate-pair', onNewSelectedCandidatePair);
this._peerConnections.set(peerConnectionId, result);

@@ -795,0 +831,0 @@ this._model.peerConnectionIds.push(peerConnectionId);

@@ -19,6 +19,2 @@ import { EventEmitter } from 'events';

newoutboundvideotrack: [ObservedOutboundTrack<'video'>],
iceconnectionstatechange: [string],
icegatheringstatechange: [string],
connectionstatechange: [string],
};

@@ -25,0 +21,0 @@

Sorry, the diff of this file is not supported yet

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