@observertc/observer-js 0.9.14-beta → 0.9.15-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":"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,QA6LrB"}
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,QAiNrB"}
@@ -163,6 +163,24 @@ function visitClient(observedClient, client, reports, fetchSamples) {
163
163
  reports.addCallMetaReport(callMetaReport);
164
164
  }
165
165
  }
166
+ if (clientSample.iceLocalCandidates && 0 < clientSample.iceLocalCandidates.length) {
167
+ for (const iceLocalCandidate of clientSample.iceLocalCandidates) {
168
+ const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
169
+ type: callMetaReports_1.CallMetaType.ICE_LOCAL_CANDIDATE,
170
+ payload: iceLocalCandidate,
171
+ }, userId);
172
+ reports.addCallMetaReport(callMetaReport);
173
+ }
174
+ }
175
+ if (clientSample.iceRemoteCandidates && 0 < clientSample.iceRemoteCandidates.length) {
176
+ for (const iceRemoteCandidate of clientSample.iceRemoteCandidates) {
177
+ const callMetaReport = (0, callMetaReports_1.createCallMetaReport)(serviceId, mediaUnitId, roomId, callId, clientId, {
178
+ type: callMetaReports_1.CallMetaType.ICE_REMOTE_CANDIDATE,
179
+ payload: iceRemoteCandidate,
180
+ }, userId);
181
+ reports.addCallMetaReport(callMetaReport);
182
+ }
183
+ }
166
184
  }
167
185
  }
168
186
  exports.visitClient = visitClient;
@@ -87,10 +87,10 @@ function createJoinClientProcess(storageProvider, reports) {
87
87
  await clientStorage.setAll(newClients);
88
88
  }
89
89
  for (const [clientId, client] of newClients) {
90
- const { serviceId, mediaUnitId, roomId, callId, clientId,
90
+ const { serviceId, mediaUnitId, roomId, callId, clientId: savedClientId,
91
91
  // timeZoneId,
92
92
  marker, joined, } = client;
93
- if (!serviceId || !mediaUnitId || !roomId || !callId || !clientId) {
93
+ if (!serviceId || !mediaUnitId || !roomId || !callId || !savedClientId) {
94
94
  continue;
95
95
  }
96
96
  const callEvent = (0, callEventReports_1.createClientJoinedEventReport)(serviceId, mediaUnitId, roomId, callId, clientId, Number(joined), marker);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@observertc/observer-js",
3
- "version": "0.9.14-beta",
3
+ "version": "0.9.15-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",
@@ -201,5 +201,25 @@ export function visitClient(
201
201
  reports.addCallMetaReport(callMetaReport);
202
202
  }
203
203
  }
204
+
205
+ if (clientSample.iceLocalCandidates && 0 < clientSample.iceLocalCandidates.length) {
206
+ for (const iceLocalCandidate of clientSample.iceLocalCandidates) {
207
+ const callMetaReport = createCallMetaReport(serviceId, mediaUnitId, roomId, callId, clientId, {
208
+ type: CallMetaType.ICE_LOCAL_CANDIDATE,
209
+ payload: iceLocalCandidate,
210
+ }, userId);
211
+ reports.addCallMetaReport(callMetaReport);
212
+ }
213
+ }
214
+
215
+ if (clientSample.iceRemoteCandidates && 0 < clientSample.iceRemoteCandidates.length) {
216
+ for (const iceRemoteCandidate of clientSample.iceRemoteCandidates) {
217
+ const callMetaReport = createCallMetaReport(serviceId, mediaUnitId, roomId, callId, clientId, {
218
+ type: CallMetaType.ICE_REMOTE_CANDIDATE,
219
+ payload: iceRemoteCandidate,
220
+ }, userId);
221
+ reports.addCallMetaReport(callMetaReport);
222
+ }
223
+ }
204
224
  }
205
225
  }
@@ -94,13 +94,13 @@ export function createJoinClientProcess(
94
94
  mediaUnitId,
95
95
  roomId,
96
96
  callId,
97
- clientId,
97
+ clientId: savedClientId,
98
98
  // timeZoneId,
99
99
  marker,
100
100
  joined,
101
101
  } = client;
102
102
 
103
- if (!serviceId || !mediaUnitId || !roomId || !callId || !clientId) {
103
+ if (!serviceId || !mediaUnitId || !roomId || !callId || !savedClientId) {
104
104
  continue;
105
105
  }
106
106