genesys-cloud-streaming-client 17.2.4-develop.109 → 17.2.4-develop.111
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.
- package/dist/cjs/client.js +1 -2
- package/dist/cjs/webrtc.d.ts +1 -1
- package/dist/cjs/webrtc.js +7 -6
- package/dist/deploy-info.json +2 -2
- package/dist/es/client.js +1 -2
- package/dist/es/index.bundle.js +786 -309
- package/dist/es/webrtc.d.ts +1 -1
- package/dist/es/webrtc.js +7 -6
- package/dist/npm/CHANGELOG.md +3 -0
- package/dist/npm/client.js +1 -2
- package/dist/npm/webrtc.d.ts +1 -1
- package/dist/npm/webrtc.js +7 -6
- package/dist/streaming-client.browser.ie.js +6 -6
- package/dist/streaming-client.browser.js +6 -6
- package/dist/v17/streaming-client.browser.ie.js +6 -6
- package/dist/v17/streaming-client.browser.js +6 -6
- package/dist/v17.2.4/streaming-client.browser.ie.js +6 -6
- package/dist/v17.2.4/streaming-client.browser.js +6 -6
- package/package.json +2 -2
package/dist/cjs/client.js
CHANGED
|
@@ -529,9 +529,8 @@ class Client extends events_1.default {
|
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
stopServerLogging() {
|
|
532
|
-
/* flush all pending logs
|
|
532
|
+
/* flush all pending logs – then turn off the logger */
|
|
533
533
|
this.logger.sendAllLogsInstantly();
|
|
534
|
-
this._webrtcSessions.flushStats();
|
|
535
534
|
this.logger.stopServerLogging();
|
|
536
535
|
}
|
|
537
536
|
startServerLogging() {
|
package/dist/cjs/webrtc.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class WebrtcExtension extends EventEmitter implements StreamingCl
|
|
|
64
64
|
sessionId: string;
|
|
65
65
|
sessionType?: SessionTypes;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
sendStatsImmediately(): void;
|
|
68
68
|
sendStats(): Promise<void>;
|
|
69
69
|
addEventListeners(): void;
|
|
70
70
|
/**
|
package/dist/cjs/webrtc.js
CHANGED
|
@@ -289,10 +289,6 @@ class WebrtcExtension extends events_1.EventEmitter {
|
|
|
289
289
|
// This should be moved when the sdk is the primary consumer
|
|
290
290
|
proxyStatsForSession(session) {
|
|
291
291
|
session.on('stats', (statsEvent) => {
|
|
292
|
-
/* if our logger was stopped, we need to stop stats logging too */
|
|
293
|
-
if (this.client.logger['stopReason']) {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
292
|
const statsCopy = JSON.parse(JSON.stringify(statsEvent));
|
|
297
293
|
const extraDetails = {
|
|
298
294
|
conversationId: session.conversationId,
|
|
@@ -335,7 +331,7 @@ class WebrtcExtension extends events_1.EventEmitter {
|
|
|
335
331
|
this.statBuffer += currentEventSize;
|
|
336
332
|
// If it exceeds max size, don't append just send current payload.
|
|
337
333
|
if (exceedsMaxStatSize) {
|
|
338
|
-
this.
|
|
334
|
+
this.sendStatsImmediately();
|
|
339
335
|
}
|
|
340
336
|
else {
|
|
341
337
|
this.throttledSendStats();
|
|
@@ -352,11 +348,16 @@ class WebrtcExtension extends events_1.EventEmitter {
|
|
|
352
348
|
}
|
|
353
349
|
return logDetails;
|
|
354
350
|
}
|
|
355
|
-
|
|
351
|
+
sendStatsImmediately() {
|
|
352
|
+
// `throttledSendStats` needs to have a scheduled exeuction for `flush` to invoke the throttled function
|
|
353
|
+
this.throttledSendStats();
|
|
356
354
|
this.throttledSendStats.flush();
|
|
357
355
|
}
|
|
358
356
|
async sendStats() {
|
|
359
357
|
var _a, _b;
|
|
358
|
+
if (!navigator.onLine) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
360
361
|
const statsToSend = [];
|
|
361
362
|
let currentSize = 0;
|
|
362
363
|
for (const stats of this.statsArr) {
|
package/dist/deploy-info.json
CHANGED
package/dist/es/client.js
CHANGED
|
@@ -541,9 +541,8 @@ export class Client extends EventEmitter {
|
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
stopServerLogging() {
|
|
544
|
-
/* flush all pending logs
|
|
544
|
+
/* flush all pending logs – then turn off the logger */
|
|
545
545
|
this.logger.sendAllLogsInstantly();
|
|
546
|
-
this._webrtcSessions.flushStats();
|
|
547
546
|
this.logger.stopServerLogging();
|
|
548
547
|
}
|
|
549
548
|
startServerLogging() {
|