@webex/plugin-meetings 3.11.0-next.4 → 3.11.0-next.41
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/aiEnableRequest/index.js +184 -0
- package/dist/aiEnableRequest/index.js.map +1 -0
- package/dist/aiEnableRequest/utils.js +36 -0
- package/dist/aiEnableRequest/utils.js.map +1 -0
- package/dist/annotation/index.js +3 -3
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +26 -6
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/constants.js +3 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +709 -380
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +10 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +233 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interpretation/index.js +2 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +5 -3
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +125 -68
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +1 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +57 -1
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +4 -2
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +7 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +209 -90
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +50 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +128 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +78 -36
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +10 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/types/aiEnableRequest/index.d.ts +5 -0
- package/dist/types/aiEnableRequest/utils.d.ts +2 -0
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +21 -1
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +99 -14
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +35 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/locus-info/index.d.ts +9 -2
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +2 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +24 -2
- package/dist/types/meeting/request.d.ts +16 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +4 -2
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/util.d.ts +5 -0
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/reactions/reactions.type.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/README.md +84 -0
- package/src/aiEnableRequest/index.ts +170 -0
- package/src/aiEnableRequest/utils.ts +25 -0
- package/src/annotation/index.ts +7 -4
- package/src/config.ts +3 -0
- package/src/constants.ts +26 -1
- package/src/hashTree/constants.ts +1 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +627 -249
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +9 -0
- package/src/index.ts +8 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +142 -0
- package/src/interceptors/index.ts +2 -1
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +146 -58
- package/src/locus-info/selfUtils.ts +1 -0
- package/src/locus-info/types.ts +1 -0
- package/src/media/MediaConnectionAwaiter.ts +41 -1
- package/src/media/properties.ts +3 -1
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +127 -17
- package/src/meeting/request.ts +42 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +156 -1
- package/src/meetings/index.ts +94 -9
- package/src/member/index.ts +10 -0
- package/src/member/util.ts +12 -0
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +1 -1
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/reactions/reactions.type.ts +1 -0
- package/test/unit/spec/aiEnableRequest/index.ts +981 -0
- package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1869 -189
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +141 -0
- package/test/unit/spec/locus-info/controlsUtils.js +29 -0
- package/test/unit/spec/locus-info/index.js +201 -45
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
- package/test/unit/spec/media/properties.ts +12 -3
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -2
- package/test/unit/spec/meeting/index.js +441 -75
- package/test/unit/spec/meeting/request.js +64 -0
- package/test/unit/spec/meeting/utils.js +433 -22
- package/test/unit/spec/meetings/index.js +550 -10
- package/test/unit/spec/member/index.js +28 -4
- package/test/unit/spec/member/util.js +65 -27
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
|
@@ -5,6 +5,8 @@ import {ConnectionState, MediaConnectionEventNames} from '@webex/internal-media-
|
|
|
5
5
|
import testUtils from '../../../utils/testUtils';
|
|
6
6
|
import {ICE_AND_DTLS_CONNECTION_TIMEOUT} from '@webex/plugin-meetings/src/constants';
|
|
7
7
|
import MediaConnectionAwaiter from '../../../../src/media/MediaConnectionAwaiter';
|
|
8
|
+
import Metrics from '../../../../src/metrics';
|
|
9
|
+
import BEHAVIORAL_METRICS from '../../../../src/metrics/constants';
|
|
8
10
|
|
|
9
11
|
describe('MediaConnectionAwaiter', () => {
|
|
10
12
|
let mediaConnectionAwaiter;
|
|
@@ -14,18 +16,34 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
14
16
|
beforeEach(() => {
|
|
15
17
|
clock = sinon.useFakeTimers();
|
|
16
18
|
|
|
19
|
+
const mockTransportReport = {
|
|
20
|
+
type: 'transport',
|
|
21
|
+
dtlsState: 'connecting',
|
|
22
|
+
iceState: 'checking',
|
|
23
|
+
packetsSent: 10,
|
|
24
|
+
packetsReceived: 5,
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
mockMC = {
|
|
18
|
-
getStats: sinon.stub().resolves(
|
|
28
|
+
getStats: sinon.stub().resolves({
|
|
29
|
+
values: () => [mockTransportReport],
|
|
30
|
+
}),
|
|
19
31
|
on: sinon.stub(),
|
|
20
32
|
off: sinon.stub(),
|
|
21
33
|
getConnectionState: sinon.stub().returns(ConnectionState.New),
|
|
22
34
|
getIceGatheringState: sinon.stub().returns('new'),
|
|
23
35
|
getIceConnectionState: sinon.stub().returns('new'),
|
|
24
36
|
getPeerConnectionState: sinon.stub().returns('new'),
|
|
37
|
+
multistreamConnection: {
|
|
38
|
+
dataChannel: {
|
|
39
|
+
readyState: 'open',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
25
42
|
};
|
|
26
43
|
|
|
27
44
|
mediaConnectionAwaiter = new MediaConnectionAwaiter({
|
|
28
45
|
webrtcMediaConnection: mockMC,
|
|
46
|
+
correlationId: 'test-correlation-id',
|
|
29
47
|
});
|
|
30
48
|
});
|
|
31
49
|
|
|
@@ -44,6 +62,8 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
44
62
|
});
|
|
45
63
|
|
|
46
64
|
it('rejects after timeout if ice state is not connected', async () => {
|
|
65
|
+
const sendMetricSpy = sinon.spy(Metrics, 'sendBehavioralMetric');
|
|
66
|
+
|
|
47
67
|
mockMC.getConnectionState.returns(ConnectionState.Connecting);
|
|
48
68
|
mockMC.getIceGatheringState.returns('gathering');
|
|
49
69
|
|
|
@@ -83,6 +103,18 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
83
103
|
assert.equal(promiseRejected, true);
|
|
84
104
|
|
|
85
105
|
assert.calledThrice(mockMC.off);
|
|
106
|
+
|
|
107
|
+
assert.calledOnceWithExactly(sendMetricSpy, BEHAVIORAL_METRICS.MEDIA_STILL_NOT_CONNECTED, {
|
|
108
|
+
correlation_id: 'test-correlation-id',
|
|
109
|
+
numTransports: 1,
|
|
110
|
+
dtlsState: 'connecting',
|
|
111
|
+
iceState: 'checking',
|
|
112
|
+
packetsSent: 10,
|
|
113
|
+
packetsReceived: 5,
|
|
114
|
+
dataChannelState: 'open',
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
sendMetricSpy.restore();
|
|
86
118
|
});
|
|
87
119
|
|
|
88
120
|
it('rejects immediately if ice state is FAILED', async () => {
|
|
@@ -351,6 +383,8 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
351
383
|
});
|
|
352
384
|
|
|
353
385
|
it(`reject with restart timer once if gathering state is not complete`, async () => {
|
|
386
|
+
const sendMetricSpy = sinon.spy(Metrics, 'sendBehavioralMetric');
|
|
387
|
+
|
|
354
388
|
mockMC.getConnectionState.returns(ConnectionState.Connecting);
|
|
355
389
|
mockMC.getIceGatheringState.returns('new');
|
|
356
390
|
|
|
@@ -390,6 +424,12 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
390
424
|
|
|
391
425
|
assert.calledOnce(clearTimeoutSpy);
|
|
392
426
|
assert.calledTwice(setTimeoutSpy);
|
|
427
|
+
|
|
428
|
+
// verify sendMetric was called twice (once for each timeout)
|
|
429
|
+
assert.calledTwice(sendMetricSpy);
|
|
430
|
+
assert.calledWith(sendMetricSpy, BEHAVIORAL_METRICS.MEDIA_STILL_NOT_CONNECTED);
|
|
431
|
+
|
|
432
|
+
sendMetricSpy.restore();
|
|
393
433
|
});
|
|
394
434
|
|
|
395
435
|
it(`resolves gathering and connection state complete right after`, async () => {
|
|
@@ -41,14 +41,23 @@ describe('MediaProperties', () => {
|
|
|
41
41
|
describe('waitForMediaConnectionConnected', () => {
|
|
42
42
|
it('resolves if media connection is connected', async () => {
|
|
43
43
|
const waitForMediaConnectionConnectedResult = new Defer();
|
|
44
|
+
const correlationId = 'aaaa-bbbb-cccc-dddd';
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
let capturedInstance;
|
|
47
|
+
const stub = sinon
|
|
46
48
|
.stub(MediaConnectionAwaiter.prototype, 'waitForMediaConnectionConnected')
|
|
47
|
-
.
|
|
49
|
+
.callsFake(function () {
|
|
50
|
+
capturedInstance = this;
|
|
51
|
+
return waitForMediaConnectionConnectedResult.promise;
|
|
52
|
+
});
|
|
48
53
|
|
|
49
54
|
waitForMediaConnectionConnectedResult.resolve();
|
|
50
55
|
|
|
51
|
-
await mediaProperties.waitForMediaConnectionConnected();
|
|
56
|
+
await mediaProperties.waitForMediaConnectionConnected(correlationId);
|
|
57
|
+
|
|
58
|
+
assert.calledOnce(stub);
|
|
59
|
+
assert.equal(capturedInstance.correlationId, correlationId);
|
|
60
|
+
assert.equal(capturedInstance.webrtcMediaConnection, mockMC);
|
|
52
61
|
});
|
|
53
62
|
it('rejects if media connection is not connected', async () => {
|
|
54
63
|
const waitForMediaConnectionConnectedResult = new Defer();
|
|
@@ -26,6 +26,7 @@ describe('plugin-meetings', () => {
|
|
|
26
26
|
canLowerAllHands: null,
|
|
27
27
|
canLowerSomeoneElsesHand: null,
|
|
28
28
|
bothLeaveAndEndMeetingAvailable: null,
|
|
29
|
+
requireHostEndMeetingBeforeLeave: null,
|
|
29
30
|
canEnableClosedCaption: null,
|
|
30
31
|
canStartTranscribing: null,
|
|
31
32
|
canStopTranscribing: null,
|
|
@@ -35,8 +36,8 @@ describe('plugin-meetings', () => {
|
|
|
35
36
|
isLocalRecordingStarted: null,
|
|
36
37
|
isLocalRecordingStopped: null,
|
|
37
38
|
isLocalRecordingPaused: null,
|
|
38
|
-
isLocalStreamingStarted:null,
|
|
39
|
-
isLocalStreamingStopped:null,
|
|
39
|
+
isLocalStreamingStarted: null,
|
|
40
|
+
isLocalStreamingStopped: null,
|
|
40
41
|
isManualCaptionActive: null,
|
|
41
42
|
isPremiseRecordingEnabled: null,
|
|
42
43
|
isSaveTranscriptsEnabled: null,
|
|
@@ -111,6 +112,8 @@ describe('plugin-meetings', () => {
|
|
|
111
112
|
canMoveToLobby: null,
|
|
112
113
|
canEnablePollingQA: null,
|
|
113
114
|
canDisablePollingQA: null,
|
|
115
|
+
canAttendeeRequestAiAssistantEnabled: null,
|
|
116
|
+
isAttendeeRequestAiAssistantDeclinedAll: null,
|
|
114
117
|
|
|
115
118
|
...expected,
|
|
116
119
|
};
|
|
@@ -149,6 +152,7 @@ describe('plugin-meetings', () => {
|
|
|
149
152
|
'canLowerAllHands',
|
|
150
153
|
'canLowerSomeoneElsesHand',
|
|
151
154
|
'bothLeaveAndEndMeetingAvailable',
|
|
155
|
+
'requireHostEndMeetingBeforeLeave',
|
|
152
156
|
'canEnableClosedCaption',
|
|
153
157
|
'canStopTranscribing',
|
|
154
158
|
'isClosedCaptionActive',
|
|
@@ -228,6 +232,8 @@ describe('plugin-meetings', () => {
|
|
|
228
232
|
'canMoveToLobby',
|
|
229
233
|
'canEnablePollingQA',
|
|
230
234
|
'canDisablePollingQA',
|
|
235
|
+
'canAttendeeRequestAiAssistantEnabled',
|
|
236
|
+
'isAttendeeRequestAiAssistantDeclinedAll',
|
|
231
237
|
].forEach((key) => {
|
|
232
238
|
it(`get and set for ${key} work as expected`, () => {
|
|
233
239
|
const inMeetingActions = new InMeetingActions();
|