@webex/plugin-meetings 3.7.0-next.1 → 3.7.0-next.3
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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +268 -198
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +19 -0
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +21 -21
- package/src/config.ts +1 -0
- package/src/meeting/index.ts +71 -0
- package/src/meeting/util.ts +1 -0
- package/src/metrics/constants.ts +2 -0
- package/test/unit/spec/meeting/index.js +71 -0
- package/test/unit/spec/meeting/utils.js +2 -0
package/src/meeting/util.ts
CHANGED
package/src/metrics/constants.ts
CHANGED
|
@@ -71,6 +71,8 @@ const BEHAVIORAL_METRICS = {
|
|
|
71
71
|
TURN_DISCOVERY_REQUIRES_OK: 'js_sdk_turn_discovery_requires_ok',
|
|
72
72
|
REACHABILITY_COMPLETED: 'js_sdk_reachability_completed',
|
|
73
73
|
WEBINAR_REGISTRATION_ERROR: 'js_sdk_webinar_registration_error',
|
|
74
|
+
GUEST_ENTERED_LOBBY: 'js_sdk_guest_entered_lobby',
|
|
75
|
+
GUEST_EXITED_LOBBY: 'js_sdk_guest_exited_lobby',
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
export {BEHAVIORAL_METRICS as default};
|
|
@@ -2465,6 +2465,63 @@ describe('plugin-meetings', () => {
|
|
|
2465
2465
|
checkWorking();
|
|
2466
2466
|
});
|
|
2467
2467
|
|
|
2468
|
+
it('should upload logs periodically', async () => {
|
|
2469
|
+
const clock = sinon.useFakeTimers();
|
|
2470
|
+
|
|
2471
|
+
meeting.roap.doTurnDiscovery = sinon
|
|
2472
|
+
.stub()
|
|
2473
|
+
.resolves({turnServerInfo: undefined, turnDiscoverySkippedReason: undefined});
|
|
2474
|
+
|
|
2475
|
+
let logUploadCounter = 0;
|
|
2476
|
+
|
|
2477
|
+
TriggerProxy.trigger.callsFake((meetingObject, options, event) => {
|
|
2478
|
+
if (
|
|
2479
|
+
meetingObject === meeting &&
|
|
2480
|
+
options.file === 'meeting/index' &&
|
|
2481
|
+
options.function === 'uploadLogs' &&
|
|
2482
|
+
event === 'REQUEST_UPLOAD_LOGS'
|
|
2483
|
+
) {
|
|
2484
|
+
logUploadCounter += 1;
|
|
2485
|
+
}
|
|
2486
|
+
});
|
|
2487
|
+
|
|
2488
|
+
meeting.config.logUploadIntervalMultiplicationFactor = 1;
|
|
2489
|
+
meeting.meetingState = 'ACTIVE';
|
|
2490
|
+
|
|
2491
|
+
await meeting.addMedia({
|
|
2492
|
+
mediaSettings: {},
|
|
2493
|
+
});
|
|
2494
|
+
|
|
2495
|
+
const checkLogCounter = (delay, expectedCounter) => {
|
|
2496
|
+
// first check that the counter is not increased just before the delay
|
|
2497
|
+
clock.tick(delay - 50);
|
|
2498
|
+
assert.equal(logUploadCounter, expectedCounter - 1);
|
|
2499
|
+
|
|
2500
|
+
// and now check that it has reached expected value after the delay
|
|
2501
|
+
clock.tick(50);
|
|
2502
|
+
assert.equal(logUploadCounter, expectedCounter);
|
|
2503
|
+
};
|
|
2504
|
+
|
|
2505
|
+
checkLogCounter(100, 1);
|
|
2506
|
+
checkLogCounter(1000, 2);
|
|
2507
|
+
checkLogCounter(15000, 3);
|
|
2508
|
+
checkLogCounter(15000, 4);
|
|
2509
|
+
checkLogCounter(30000, 5);
|
|
2510
|
+
checkLogCounter(30000, 6);
|
|
2511
|
+
checkLogCounter(30000, 7);
|
|
2512
|
+
checkLogCounter(60000, 8);
|
|
2513
|
+
checkLogCounter(60000, 9);
|
|
2514
|
+
checkLogCounter(60000, 10);
|
|
2515
|
+
|
|
2516
|
+
// simulate media connection being removed -> no more log uploads should happen
|
|
2517
|
+
meeting.mediaProperties.webrtcMediaConnection = undefined;
|
|
2518
|
+
|
|
2519
|
+
clock.tick(60000);
|
|
2520
|
+
assert.equal(logUploadCounter, 11);
|
|
2521
|
+
|
|
2522
|
+
clock.restore();
|
|
2523
|
+
});
|
|
2524
|
+
|
|
2468
2525
|
it('should attach the media and return promise when in the lobby if allowMediaInLobby is set', async () => {
|
|
2469
2526
|
meeting.roap.doTurnDiscovery = sinon
|
|
2470
2527
|
.stub()
|
|
@@ -8620,6 +8677,13 @@ describe('plugin-meetings', () => {
|
|
|
8620
8677
|
{payload: test1}
|
|
8621
8678
|
);
|
|
8622
8679
|
assert.calledOnce(meeting.updateLLMConnection);
|
|
8680
|
+
assert.calledOnceWithExactly(
|
|
8681
|
+
Metrics.sendBehavioralMetric,
|
|
8682
|
+
BEHAVIORAL_METRICS.GUEST_ENTERED_LOBBY,
|
|
8683
|
+
{
|
|
8684
|
+
correlation_id: meeting.correlationId,
|
|
8685
|
+
}
|
|
8686
|
+
);
|
|
8623
8687
|
done();
|
|
8624
8688
|
});
|
|
8625
8689
|
it('listens to the self admitted guest event', (done) => {
|
|
@@ -8641,6 +8705,13 @@ describe('plugin-meetings', () => {
|
|
|
8641
8705
|
assert.calledOnce(meeting.updateLLMConnection);
|
|
8642
8706
|
assert.calledOnceWithExactly(meeting.rtcMetrics.sendNextMetrics);
|
|
8643
8707
|
|
|
8708
|
+
assert.calledOnceWithExactly(
|
|
8709
|
+
Metrics.sendBehavioralMetric,
|
|
8710
|
+
BEHAVIORAL_METRICS.GUEST_EXITED_LOBBY,
|
|
8711
|
+
{
|
|
8712
|
+
correlation_id: meeting.correlationId,
|
|
8713
|
+
}
|
|
8714
|
+
);
|
|
8644
8715
|
done();
|
|
8645
8716
|
});
|
|
8646
8717
|
|
|
@@ -45,6 +45,7 @@ describe('plugin-meetings', () => {
|
|
|
45
45
|
meeting.cleanupLocalStreams = sinon.stub().returns(Promise.resolve());
|
|
46
46
|
meeting.closeRemoteStreams = sinon.stub().returns(Promise.resolve());
|
|
47
47
|
meeting.closePeerConnections = sinon.stub().returns(Promise.resolve());
|
|
48
|
+
meeting.stopPeriodicLogUpload = sinon.stub();
|
|
48
49
|
|
|
49
50
|
meeting.unsetRemoteStreams = sinon.stub();
|
|
50
51
|
meeting.unsetPeerConnections = sinon.stub();
|
|
@@ -70,6 +71,7 @@ describe('plugin-meetings', () => {
|
|
|
70
71
|
assert.calledOnce(meeting.cleanupLocalStreams);
|
|
71
72
|
assert.calledOnce(meeting.closeRemoteStreams);
|
|
72
73
|
assert.calledOnce(meeting.closePeerConnections);
|
|
74
|
+
assert.calledOnce(meeting.stopPeriodicLogUpload);
|
|
73
75
|
|
|
74
76
|
assert.calledOnce(meeting.unsetRemoteStreams);
|
|
75
77
|
assert.calledOnce(meeting.unsetPeerConnections);
|