@observertc/observer-js
Advanced tools
Comparing version 0.42.4 to 0.42.5
@@ -20,2 +20,3 @@ /// <reference types="node" /> | ||
callevent: [Omit<CallEventReport, 'callId' | 'serviceId' | 'roomId'>]; | ||
empty: []; | ||
close: []; | ||
@@ -22,0 +23,0 @@ }; |
@@ -118,2 +118,5 @@ "use strict"; | ||
this._clients.delete(result.clientId); | ||
if (this._clients.size === 0) { | ||
this.emit('empty'); | ||
} | ||
}); | ||
@@ -120,0 +123,0 @@ result.on('update', onUpdate); |
@@ -124,14 +124,2 @@ "use strict"; | ||
this._stats.set(sample.ssrc, stats); | ||
// this.bitrate = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.bitrate, 0); | ||
// this.rttInMs = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.rttInMs ?? 0), 0) / (this._stats.size || 1); | ||
// this.totalLostPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.packetsLost ?? 0), 0); | ||
// this.totalSentPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.packetsSent ?? 0), 0); | ||
// this.totalSentBytes = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.bytesSent ?? 0), 0); | ||
// this.totalSentFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaSentPackets ?? 0), 0); | ||
// this.deltaEncodedFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaEncodedFrames ?? 0), 0); | ||
// this.deltaSentFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaSentFrames ?? 0), 0); | ||
// this.deltaLostPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaLostPackets, 0); | ||
// this.deltaSentPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaSentPackets, 0); | ||
// this.deltaSentBytes = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaSentBytes, 0); | ||
// setting up sfu connection as it is not always available at the first sample | ||
this.visited = true; | ||
@@ -138,0 +126,0 @@ // a peer connection is active if it has at least one active track |
{ | ||
"name": "@observertc/observer-js", | ||
"version": "0.42.4", | ||
"version": "0.42.5", | ||
"description": "Server Side NodeJS Library for processing ObserveRTC Samples", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -23,2 +23,3 @@ import { EventEmitter } from 'events'; | ||
callevent: [Omit<CallEventReport, 'callId' | 'serviceId' | 'roomId'>], | ||
empty: [], | ||
close: [], | ||
@@ -177,2 +178,6 @@ } | ||
this._clients.delete(result.clientId); | ||
if (this._clients.size === 0) { | ||
this.emit('empty'); | ||
} | ||
}); | ||
@@ -179,0 +184,0 @@ |
@@ -233,18 +233,2 @@ import { EventEmitter } from 'events'; | ||
// this.bitrate = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.bitrate, 0); | ||
// this.rttInMs = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.rttInMs ?? 0), 0) / (this._stats.size || 1); | ||
// this.totalLostPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.packetsLost ?? 0), 0); | ||
// this.totalSentPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.packetsSent ?? 0), 0); | ||
// this.totalSentBytes = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.bytesSent ?? 0), 0); | ||
// this.totalSentFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaSentPackets ?? 0), 0); | ||
// this.deltaEncodedFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaEncodedFrames ?? 0), 0); | ||
// this.deltaSentFrames = [ ...this._stats.values() ].reduce((acc, stat) => acc + (stat.deltaSentFrames ?? 0), 0); | ||
// this.deltaLostPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaLostPackets, 0); | ||
// this.deltaSentPackets = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaSentPackets, 0); | ||
// this.deltaSentBytes = [ ...this._stats.values() ].reduce((acc, stat) => acc + stat.deltaSentBytes, 0); | ||
// setting up sfu connection as it is not always available at the first sample | ||
this.visited = true; | ||
@@ -251,0 +235,0 @@ // a peer connection is active if it has at least one active track |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
574599
12145