@observertc/observer-js 0.9.9-beta → 0.9.11-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"Evaluator.d.ts","sourceRoot":"","sources":["../src/Evaluator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAuB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAW7D,MAAM,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,YAAY,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAErF,qBAAa,SAAS;aAeJ,MAAM,EAAE,eAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAjBnC,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,YAAY,CAAoC;IAExD,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,QAAQ,CAAsB;IAEtC,OAAO,CAAC,mBAAmB,CAA6D;IACxF,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,qBAAqB,CAAgC;IAC7D,OAAO,CAAC,gBAAgB,CAA8B;gBAKrC,MAAM,EAAE,eAAe,EACtB,cAAc,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IAAW,cAAc,IAAI,MAAM,CAElC;YAEa,QAAQ;CAqBtB"}
package/lib/Evaluator.js CHANGED
@@ -110,9 +110,6 @@ class Evaluator {
110
110
  })
111
111
  .catch((err) => {
112
112
  logger.warn(`Error occurred while evaluating`, err);
113
- })
114
- .finally(() => {
115
- this._emit('ready', undefined);
116
113
  });
117
114
  }
118
115
  async _eval(callOperationsContext, evaluatorContext) {
@@ -1 +1 @@
1
- {"version":3,"file":"VisitObservedCallsMiddleware.d.ts","sourceRoot":"","sources":["../../src/middlewares/VisitObservedCallsMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAS9D,eAAO,MAAM,MAAM,0CAA+C,CAAC;AAEnE,wBAAgB,kCAAkC,CACjD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,GACnB,UAAU,CAAC,kBAAkB,CAAC,CA8OhC"}
1
+ {"version":3,"file":"VisitObservedCallsMiddleware.d.ts","sourceRoot":"","sources":["../../src/middlewares/VisitObservedCallsMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAS9D,eAAO,MAAM,MAAM,0CAA+C,CAAC;AAEnE,wBAAgB,kCAAkC,CACjD,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,GACnB,UAAU,CAAC,kBAAkB,CAAC,CA6OhC"}
@@ -7,6 +7,7 @@ const logger_1 = require("../common/logger");
7
7
  const visitInboundAudioTrack_1 = require("./visitors/visitInboundAudioTrack");
8
8
  const visitOutboundAudioTrack_1 = require("./visitors/visitOutboundAudioTrack");
9
9
  const visitOutboundVideoTarck_1 = require("./visitors/visitOutboundVideoTarck");
10
+ const visitInboundVideoTrack_1 = require("./visitors/visitInboundVideoTrack");
10
11
  exports.logger = (0, logger_1.createLogger)('VisitObservedCallsMiddleware');
11
12
  function createVisitObservedCallsMiddleware(reports, fetchSamples) {
12
13
  const process = async (transaction) => {
@@ -45,7 +46,7 @@ function createVisitObservedCallsMiddleware(reports, fetchSamples) {
45
46
  }
46
47
  for (const observedInboundVideoTrack of observedPeerConnection.inboundVideoTracks()) {
47
48
  const { trackId } = observedInboundVideoTrack;
48
- (0, visitInboundAudioTrack_1.visitInboundAudioTrack)(observedInboundVideoTrack, storedPeerConnection, updatedInboundVideoTracks, reports, fetchSamples);
49
+ (0, visitInboundVideoTrack_1.visitInboundVideoTrack)(observedInboundVideoTrack, storedPeerConnection, updatedInboundVideoTracks, reports, fetchSamples);
49
50
  visitedInboundVideoTrackIds.add(trackId);
50
51
  }
51
52
  for (const observedOutboundAudioTrack of observedPeerConnection.outboundAudioTracks()) {
@@ -1 +1 @@
1
- {"version":3,"file":"visitClient.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,wBAAgB,WAAW,CAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QA6KrB"}
1
+ {"version":3,"file":"visitClient.d.ts","sourceRoot":"","sources":["../../../src/middlewares/visitors/visitClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,wBAAgB,WAAW,CAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,OAAO,QA2LrB"}
@@ -4,10 +4,13 @@ exports.visitClient = void 0;
4
4
  const callMetaReports_1 = require("../../common/callMetaReports");
5
5
  const samples_pb_1 = require("../../models/samples_pb");
6
6
  function visitClient(observedClient, client, reports, fetchSamples) {
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7
8
  const { mediaUnitId, clientId } = observedClient;
8
9
  const { callId, serviceId, roomId } = observedClient.call;
9
10
  for (const clientSample of observedClient.samples()) {
10
- if (clientSample.os) {
11
+ if (clientSample.os && (((_a = client.operationSystem) === null || _a === void 0 ? void 0 : _a.name) !== clientSample.os.name ||
12
+ ((_b = client.operationSystem) === null || _b === void 0 ? void 0 : _b.version) !== clientSample.os.version ||
13
+ ((_c = client.operationSystem) === null || _c === void 0 ? void 0 : _c.versionName) !== clientSample.os.versionName)) {
11
14
  if (fetchSamples) {
12
15
  client.operationSystem = new samples_pb_1.Samples_ClientSample_OperationSystem({
13
16
  ...clientSample.os,
@@ -19,7 +22,8 @@ function visitClient(observedClient, client, reports, fetchSamples) {
19
22
  });
20
23
  reports.addCallMetaReport(callMetaReport);
21
24
  }
22
- if (clientSample.engine) {
25
+ if (clientSample.engine && (((_d = client.engine) === null || _d === void 0 ? void 0 : _d.name) !== clientSample.engine.name ||
26
+ ((_e = client.engine) === null || _e === void 0 ? void 0 : _e.version) !== clientSample.engine.version)) {
23
27
  if (fetchSamples) {
24
28
  client.engine = new samples_pb_1.Samples_ClientSample_Engine({
25
29
  ...clientSample.engine,
@@ -31,7 +35,9 @@ function visitClient(observedClient, client, reports, fetchSamples) {
31
35
  });
32
36
  reports.addCallMetaReport(callMetaReport);
33
37
  }
34
- if (clientSample.platform) {
38
+ if (clientSample.platform && (((_f = client.platform) === null || _f === void 0 ? void 0 : _f.model) !== clientSample.platform.model ||
39
+ ((_g = client.platform) === null || _g === void 0 ? void 0 : _g.type) !== clientSample.platform.type ||
40
+ ((_h = client.platform) === null || _h === void 0 ? void 0 : _h.vendor) !== clientSample.platform.vendor)) {
35
41
  if (fetchSamples) {
36
42
  client.platform = new samples_pb_1.Samples_ClientSample_Platform({
37
43
  ...clientSample.platform,
@@ -43,7 +49,8 @@ function visitClient(observedClient, client, reports, fetchSamples) {
43
49
  });
44
50
  reports.addCallMetaReport(callMetaReport);
45
51
  }
46
- if (clientSample.browser) {
52
+ if (clientSample.browser && (((_j = client.browser) === null || _j === void 0 ? void 0 : _j.name) !== clientSample.browser.name ||
53
+ ((_k = client.browser) === null || _k === void 0 ? void 0 : _k.version) !== clientSample.browser.version)) {
47
54
  if (fetchSamples) {
48
55
  client.browser = new samples_pb_1.Samples_ClientSample_Browser({
49
56
  ...clientSample.browser,
@@ -1 +1 @@
1
- {"version":3,"file":"joinClientProcess.d.ts","sourceRoot":"","sources":["../../src/processes/joinClientProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,MAAM,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAEtC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,gBAAgB,GACvB,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAoGlD"}
1
+ {"version":3,"file":"joinClientProcess.d.ts","sourceRoot":"","sources":["../../src/processes/joinClientProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,MAAM,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAEtC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,gBAAgB,GACvB,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAoGlD"}
@@ -26,11 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createJoinClientProcess = void 0;
27
27
  const Models = __importStar(require("../models/Models"));
28
28
  const callEventReports_1 = require("../sinks/callEventReports");
29
- const closePeerConnectionProcess_1 = require("./closePeerConnectionProcess");
30
29
  const logger_1 = require("../common/logger");
31
30
  const logger = (0, logger_1.createLogger)('ClientLeftProcess');
32
31
  function createJoinClientProcess(storageProvider, reports) {
33
- const peerConnectionClosedProcess = (0, closePeerConnectionProcess_1.createClosePeerConnectionProcess)(storageProvider);
34
32
  const process = async (context) => {
35
33
  const { clients: joinedClients, evaluatorContext } = context;
36
34
  if (joinedClients.length < 1) {
@@ -64,6 +62,7 @@ function createJoinClientProcess(storageProvider, reports) {
64
62
  roomId,
65
63
  callId,
66
64
  clientId,
65
+ joined: BigInt(timestamp),
67
66
  timeZoneId,
68
67
  marker,
69
68
  }));
@@ -1 +1 @@
1
- {"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BAAmB,CAA2B;IACtD,OAAO,CAAC,oBAAoB,CAAC,CAAS;gBAE7B,OAAO,EAAE,IAAI,CACpB,sBAAsB,EACpB,MAAM,gBAAgB,CAAC,sBAAsB,CAAC,GAC9C,QAAQ,GACR,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,oBAAoB,CACtB;IAGF,IAAW,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAE3C;IAEM,kBAAkB,CAAC,eAAe,EAAE,uBAAuB;IAI3D,oBAAoB,CAAC,uBAAuB,EAAE,iBAAiB;IAO/D,mBAAmB,CAAC,gBAAgB,EAAE,gBAAgB;IAGtD,qBAAqB,CAAC,kBAAkB,EAAE,kBAAkB;IAG5D,oBAAoB,CAAC,iBAAiB,EAAE,iBAAiB;IAIhE,OAAO,CAAC,4BAA4B;IAW7B,qBAAqB,CAAC,wBAAwB,EAAE,kBAAkB;IAOzE,OAAO,CAAC,6BAA6B;IAW9B,oBAAoB,CAAC,uBAAuB,EAAE,iBAAiB;IAOtE,OAAO,CAAC,4BAA4B;IAW7B,qBAAqB,CAAC,wBAAwB,EAAE,kBAAkB;IAOzE,OAAO,CAAC,6BAA6B;IAW9B,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG,sBAAsB;CA0C5D"}
@@ -44,6 +44,7 @@ class ObservedPeerConnectionBuilder {
44
44
  result = new ObservedInboundAudioTrack_1.ObservedInboundAudioTrackBuilder({
45
45
  trackId,
46
46
  });
47
+ this._inboundAudioTracks.set(trackId, result);
47
48
  }
48
49
  return result;
49
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Sources.d.ts","sourceRoot":"","sources":["../../src/sources/Sources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAwB,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAG1F,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AQ,CAAsB;IACtC,OAAO,CAAC,MAAM,CAAC,CAAgC;IAC/C,OAAO,CAAC,gBAAgB,CAAK;gBAEM,MAAM,EAAE,aAAa;IAEjD,EAAE,CAAC,CAAC,SAAS,MAAM,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI;IAK7F,GAAG,CAAC,CAAC,SAAS,MAAM,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI;IAKrG,OAAO,CAAC,KAAK;IAIN,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,0BAA0B,EAAE,QAAQ,CAAC,GAAG,oBAAoB;IAkDjG,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,uBAAuB,EAAE,QAAQ,CAAC,GAAG,iBAAiB;IA6C/F,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,WAAW;IAaZ,KAAK;CAQZ"}
@@ -41,7 +41,7 @@ class Sources {
41
41
  joined: (_a = config.joined) !== null && _a !== void 0 ? _a : Date.now(),
42
42
  accept: (...samples) => {
43
43
  if (closed) {
44
- throw new Error('Closed ClientSource cannot accept samples');
44
+ throw new Error('Cannot accept ClientSample, because the ClientSource is closed');
45
45
  }
46
46
  const observedCallBuilder = this._observedCallsBuilder.getOrCreateObservedCallBuilder(config.callId, () => {
47
47
  return {
@@ -63,6 +63,7 @@ class Sources {
63
63
  return;
64
64
  }
65
65
  closed = true;
66
+ this._clientSources.delete(config.clientId);
66
67
  this._emit('removed-client-source', source);
67
68
  },
68
69
  closed,
@@ -88,7 +89,7 @@ class Sources {
88
89
  joined: (_a = config.joined) !== null && _a !== void 0 ? _a : Date.now(),
89
90
  accept: (...samples) => {
90
91
  if (closed) {
91
- throw new Error('Closed ClientSource cannot accept samples');
92
+ throw new Error('Cannot accept SfuSample, because the SfuSource is closed');
92
93
  }
93
94
  const observedSfuBuilder = this._observedSfusBuilder.getOrCreateObservedSfuBuilder(config.sfuId, () => {
94
95
  return {
@@ -105,6 +106,7 @@ class Sources {
105
106
  return;
106
107
  }
107
108
  closed = true;
109
+ this._sfuSources.delete(config.sfuId);
108
110
  this._emit('removed-sfu-source', source);
109
111
  },
110
112
  closed,
@@ -128,6 +130,7 @@ class Sources {
128
130
  const observedCalls = this._observedCallsBuilder.build();
129
131
  this._observedCallsBuilder = new ObservedCalls_1.ObservedCallsBuilder();
130
132
  const observedSfus = this._observedSfusBuilder.build();
133
+ this._observedSfusBuilder = new ObservedSfus_1.ObservedSfusBuilder();
131
134
  this._emit('observed-samples', {
132
135
  observedCalls,
133
136
  observedSfus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@observertc/observer-js",
3
- "version": "0.9.9-beta",
3
+ "version": "0.9.11-beta",
4
4
  "description": "Server Side NodeJS Library for processing ObserveRTC Samples",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/Evaluator.ts CHANGED
@@ -152,9 +152,6 @@ export class Evaluator {
152
152
  })
153
153
  .catch((err) => {
154
154
  logger.warn(`Error occurred while evaluating`, err);
155
- })
156
- .finally(() => {
157
- this._emit('ready', undefined);
158
155
  });
159
156
  }
160
157
 
@@ -7,7 +7,7 @@ import { createLogger } from '../common/logger';
7
7
  import { visitInboundAudioTrack } from './visitors/visitInboundAudioTrack';
8
8
  import { visitOutboundAudioTrack } from './visitors/visitOutboundAudioTrack';
9
9
  import { visitOutboundVideoTrack } from './visitors/visitOutboundVideoTarck';
10
- import { CallEventReport, ClientExtensionReport } from '@observertc/report-schemas-js';
10
+ import { visitInboundVideoTrack } from './visitors/visitInboundVideoTrack';
11
11
 
12
12
  export const logger = createLogger('VisitObservedCallsMiddleware');
13
13
 
@@ -80,7 +80,6 @@ export function createVisitObservedCallsMiddleware(
80
80
 
81
81
  for (const observedInboundAudioTrack of observedPeerConnection.inboundAudioTracks()) {
82
82
  const { trackId } = observedInboundAudioTrack;
83
-
84
83
  visitInboundAudioTrack(
85
84
  observedInboundAudioTrack,
86
85
  storedPeerConnection,
@@ -95,7 +94,7 @@ export function createVisitObservedCallsMiddleware(
95
94
  for (const observedInboundVideoTrack of observedPeerConnection.inboundVideoTracks()) {
96
95
  const { trackId } = observedInboundVideoTrack;
97
96
 
98
- visitInboundAudioTrack(
97
+ visitInboundVideoTrack(
99
98
  observedInboundVideoTrack,
100
99
  storedPeerConnection,
101
100
  updatedInboundVideoTracks,
@@ -20,13 +20,17 @@ export function visitClient(
20
20
  const { callId, serviceId, roomId } = observedClient.call;
21
21
 
22
22
  for (const clientSample of observedClient.samples()) {
23
- if (clientSample.os) {
23
+ if (clientSample.os && (
24
+ client.operationSystem?.name !== clientSample.os.name ||
25
+ client.operationSystem?.version !== clientSample.os.version ||
26
+ client.operationSystem?.versionName !== clientSample.os.versionName
27
+ )) {
24
28
  if (fetchSamples) {
25
29
  client.operationSystem = new Samples_ClientSample_OperationSystem({
26
30
  ...clientSample.os,
27
31
  });
28
32
  }
29
-
33
+
30
34
  const callMetaReport = createCallMetaReport(serviceId, mediaUnitId, roomId, callId, clientId, {
31
35
  type: CallMetaType.OPERATION_SYSTEM,
32
36
  payload: clientSample.os,
@@ -34,7 +38,10 @@ export function visitClient(
34
38
  reports.addCallMetaReport(callMetaReport);
35
39
  }
36
40
 
37
- if (clientSample.engine) {
41
+ if (clientSample.engine && (
42
+ client.engine?.name !== clientSample.engine.name ||
43
+ client.engine?.version !== clientSample.engine.version
44
+ )) {
38
45
  if (fetchSamples) {
39
46
  client.engine = new Samples_ClientSample_Engine({
40
47
  ...clientSample.engine,
@@ -48,7 +55,11 @@ export function visitClient(
48
55
  reports.addCallMetaReport(callMetaReport);
49
56
  }
50
57
 
51
- if (clientSample.platform) {
58
+ if (clientSample.platform && (
59
+ client.platform?.model !== clientSample.platform.model ||
60
+ client.platform?.type !== clientSample.platform.type ||
61
+ client.platform?.vendor !== clientSample.platform.vendor
62
+ )) {
52
63
  if (fetchSamples) {
53
64
  client.platform = new Samples_ClientSample_Platform({
54
65
  ...clientSample.platform,
@@ -62,7 +73,10 @@ export function visitClient(
62
73
  reports.addCallMetaReport(callMetaReport);
63
74
  }
64
75
 
65
- if (clientSample.browser) {
76
+ if (clientSample.browser && (
77
+ client.browser?.name !== clientSample.browser.name ||
78
+ client.browser?.version !== clientSample.browser.version
79
+ )) {
66
80
  if (fetchSamples) {
67
81
  client.browser = new Samples_ClientSample_Browser({
68
82
  ...clientSample.browser,
@@ -3,11 +3,9 @@ import { StorageProvider } from '../storages/StorageProvider';
3
3
  import * as Models from '../models/Models';
4
4
  import { createCallStartedEventReport, createClientJoinedEventReport } from '../sinks/callEventReports';
5
5
  import { ReportsCollector } from '../common/ReportsCollector';
6
- import { createClosePeerConnectionProcess } from './closePeerConnectionProcess';
7
6
  import { createLogger } from '../common/logger';
8
7
  import { ObservedClientSourceConfig } from '../sources/ObservedClientSource';
9
8
  import { Writable } from '../common/utils';
10
- import { Semaphore } from '../common/Semaphore';
11
9
 
12
10
  const logger = createLogger('ClientLeftProcess');
13
11
 
@@ -21,7 +19,6 @@ export function createJoinClientProcess(
21
19
  storageProvider: StorageProvider,
22
20
  reports: ReportsCollector
23
21
  ): (input: JoinClientProcessInput) => Promise<void> {
24
- const peerConnectionClosedProcess = createClosePeerConnectionProcess(storageProvider);
25
22
  const process = async (context: JoinClientProcessInput) => {
26
23
  const { clients: joinedClients, evaluatorContext } = context;
27
24
  if (joinedClients.length < 1) {
@@ -60,6 +57,7 @@ export function createJoinClientProcess(
60
57
  roomId,
61
58
  callId,
62
59
  clientId,
60
+ joined: BigInt(timestamp),
63
61
  timeZoneId,
64
62
  marker,
65
63
  })
@@ -87,6 +87,7 @@ export class ObservedPeerConnectionBuilder {
87
87
  result = new ObservedInboundAudioTrackBuilder({
88
88
  trackId,
89
89
  });
90
+ this._inboundAudioTracks.set(trackId, result);
90
91
  }
91
92
  return result;
92
93
  }
@@ -66,7 +66,7 @@ export class Sources {
66
66
 
67
67
  accept: (...samples: ClientSample[]) => {
68
68
  if (closed) {
69
- throw new Error('Closed ClientSource cannot accept samples');
69
+ throw new Error('Cannot accept ClientSample, because the ClientSource is closed');
70
70
  }
71
71
  const observedCallBuilder = this._observedCallsBuilder.getOrCreateObservedCallBuilder(config.callId, () => {
72
72
  return {
@@ -89,6 +89,7 @@ export class Sources {
89
89
  return;
90
90
  }
91
91
  closed = true;
92
+ this._clientSources.delete(config.clientId);
92
93
  this._emit('removed-client-source', source);
93
94
  },
94
95
  closed,
@@ -115,7 +116,7 @@ export class Sources {
115
116
 
116
117
  accept: (...samples: SfuSample[]) => {
117
118
  if (closed) {
118
- throw new Error('Closed ClientSource cannot accept samples');
119
+ throw new Error('Cannot accept SfuSample, because the SfuSource is closed');
119
120
  }
120
121
  const observedSfuBuilder = this._observedSfusBuilder.getOrCreateObservedSfuBuilder(config.sfuId, () => {
121
122
  return {
@@ -133,6 +134,7 @@ export class Sources {
133
134
  return;
134
135
  }
135
136
  closed = true;
137
+ this._sfuSources.delete(config.sfuId);
136
138
  this._emit('removed-sfu-source', source);
137
139
  },
138
140
  closed,
@@ -158,6 +160,7 @@ export class Sources {
158
160
  const observedCalls = this._observedCallsBuilder.build();
159
161
  this._observedCallsBuilder = new ObservedCallsBuilder();
160
162
  const observedSfus = this._observedSfusBuilder.build();
163
+ this._observedSfusBuilder = new ObservedSfusBuilder();
161
164
  this._emit('observed-samples', {
162
165
  observedCalls,
163
166
  observedSfus,