@webex/plugin-meetings 3.12.0-next.7 → 3.12.0-next.71

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.
Files changed (178) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +8 -3
  5. package/dist/breakouts/breakout.js.map +1 -1
  6. package/dist/breakouts/index.js +26 -2
  7. package/dist/breakouts/index.js.map +1 -1
  8. package/dist/config.js +2 -0
  9. package/dist/config.js.map +1 -1
  10. package/dist/constants.js +30 -7
  11. package/dist/constants.js.map +1 -1
  12. package/dist/controls-options-manager/constants.js +11 -1
  13. package/dist/controls-options-manager/constants.js.map +1 -1
  14. package/dist/controls-options-manager/index.js +38 -24
  15. package/dist/controls-options-manager/index.js.map +1 -1
  16. package/dist/controls-options-manager/util.js +91 -0
  17. package/dist/controls-options-manager/util.js.map +1 -1
  18. package/dist/hashTree/constants.js +13 -1
  19. package/dist/hashTree/constants.js.map +1 -1
  20. package/dist/hashTree/hashTreeParser.js +880 -382
  21. package/dist/hashTree/hashTreeParser.js.map +1 -1
  22. package/dist/hashTree/utils.js +42 -0
  23. package/dist/hashTree/utils.js.map +1 -1
  24. package/dist/index.js +7 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  27. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  28. package/dist/interceptors/locusRetry.js +23 -8
  29. package/dist/interceptors/locusRetry.js.map +1 -1
  30. package/dist/interpretation/index.js +10 -1
  31. package/dist/interpretation/index.js.map +1 -1
  32. package/dist/interpretation/interpretation.types.js +7 -0
  33. package/dist/interpretation/interpretation.types.js.map +1 -0
  34. package/dist/interpretation/siLanguage.js +1 -1
  35. package/dist/locus-info/controlsUtils.js +4 -1
  36. package/dist/locus-info/controlsUtils.js.map +1 -1
  37. package/dist/locus-info/index.js +298 -87
  38. package/dist/locus-info/index.js.map +1 -1
  39. package/dist/locus-info/types.js +19 -0
  40. package/dist/locus-info/types.js.map +1 -1
  41. package/dist/media/index.js +3 -1
  42. package/dist/media/index.js.map +1 -1
  43. package/dist/media/properties.js +1 -0
  44. package/dist/media/properties.js.map +1 -1
  45. package/dist/meeting/in-meeting-actions.js +3 -1
  46. package/dist/meeting/in-meeting-actions.js.map +1 -1
  47. package/dist/meeting/index.js +1046 -689
  48. package/dist/meeting/index.js.map +1 -1
  49. package/dist/meeting/muteState.js +10 -1
  50. package/dist/meeting/muteState.js.map +1 -1
  51. package/dist/meeting/request.js +5 -2
  52. package/dist/meeting/request.js.map +1 -1
  53. package/dist/meeting/util.js +20 -2
  54. package/dist/meeting/util.js.map +1 -1
  55. package/dist/meeting-info/meeting-info-v2.js +2 -2
  56. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  57. package/dist/meetings/index.js +231 -78
  58. package/dist/meetings/index.js.map +1 -1
  59. package/dist/meetings/meetings.types.js +6 -1
  60. package/dist/meetings/meetings.types.js.map +1 -1
  61. package/dist/meetings/request.js +39 -0
  62. package/dist/meetings/request.js.map +1 -1
  63. package/dist/meetings/util.js +79 -5
  64. package/dist/meetings/util.js.map +1 -1
  65. package/dist/member/index.js +10 -0
  66. package/dist/member/index.js.map +1 -1
  67. package/dist/member/types.js.map +1 -1
  68. package/dist/member/util.js +3 -0
  69. package/dist/member/util.js.map +1 -1
  70. package/dist/metrics/constants.js +4 -1
  71. package/dist/metrics/constants.js.map +1 -1
  72. package/dist/multistream/codec/constants.js +63 -0
  73. package/dist/multistream/codec/constants.js.map +1 -0
  74. package/dist/multistream/mediaRequestManager.js +62 -15
  75. package/dist/multistream/mediaRequestManager.js.map +1 -1
  76. package/dist/multistream/receiveSlot.js +9 -0
  77. package/dist/multistream/receiveSlot.js.map +1 -1
  78. package/dist/reactions/reactions.type.js.map +1 -1
  79. package/dist/recording-controller/index.js +1 -3
  80. package/dist/recording-controller/index.js.map +1 -1
  81. package/dist/types/config.d.ts +2 -0
  82. package/dist/types/constants.d.ts +9 -1
  83. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  84. package/dist/types/controls-options-manager/index.d.ts +10 -0
  85. package/dist/types/hashTree/constants.d.ts +2 -0
  86. package/dist/types/hashTree/hashTreeParser.d.ts +146 -17
  87. package/dist/types/hashTree/utils.d.ts +18 -0
  88. package/dist/types/index.d.ts +3 -0
  89. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  90. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  91. package/dist/types/locus-info/index.d.ts +50 -6
  92. package/dist/types/locus-info/types.d.ts +21 -1
  93. package/dist/types/media/properties.d.ts +1 -0
  94. package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
  95. package/dist/types/meeting/index.d.ts +78 -5
  96. package/dist/types/meeting/request.d.ts +1 -0
  97. package/dist/types/meeting/util.d.ts +8 -0
  98. package/dist/types/meetings/index.d.ts +30 -2
  99. package/dist/types/meetings/meetings.types.d.ts +15 -0
  100. package/dist/types/meetings/request.d.ts +14 -0
  101. package/dist/types/member/index.d.ts +1 -0
  102. package/dist/types/member/types.d.ts +1 -0
  103. package/dist/types/member/util.d.ts +1 -0
  104. package/dist/types/metrics/constants.d.ts +3 -0
  105. package/dist/types/multistream/codec/constants.d.ts +7 -0
  106. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  107. package/dist/types/reactions/reactions.type.d.ts +3 -0
  108. package/dist/webinar/index.js +305 -159
  109. package/dist/webinar/index.js.map +1 -1
  110. package/package.json +22 -22
  111. package/src/aiEnableRequest/index.ts +16 -0
  112. package/src/breakouts/breakout.ts +3 -1
  113. package/src/breakouts/index.ts +31 -0
  114. package/src/config.ts +2 -0
  115. package/src/constants.ts +13 -2
  116. package/src/controls-options-manager/constants.ts +14 -1
  117. package/src/controls-options-manager/index.ts +47 -24
  118. package/src/controls-options-manager/util.ts +81 -1
  119. package/src/hashTree/constants.ts +16 -0
  120. package/src/hashTree/hashTreeParser.ts +580 -196
  121. package/src/hashTree/utils.ts +36 -0
  122. package/src/index.ts +6 -0
  123. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  124. package/src/interceptors/locusRetry.ts +25 -4
  125. package/src/interpretation/index.ts +27 -9
  126. package/src/interpretation/interpretation.types.ts +11 -0
  127. package/src/locus-info/controlsUtils.ts +3 -1
  128. package/src/locus-info/index.ts +293 -97
  129. package/src/locus-info/types.ts +25 -1
  130. package/src/media/index.ts +3 -0
  131. package/src/media/properties.ts +1 -0
  132. package/src/meeting/in-meeting-actions.ts +4 -0
  133. package/src/meeting/index.ts +386 -48
  134. package/src/meeting/muteState.ts +10 -1
  135. package/src/meeting/request.ts +11 -0
  136. package/src/meeting/util.ts +21 -2
  137. package/src/meeting-info/meeting-info-v2.ts +4 -2
  138. package/src/meetings/index.ts +134 -44
  139. package/src/meetings/meetings.types.ts +19 -0
  140. package/src/meetings/request.ts +43 -0
  141. package/src/meetings/util.ts +97 -1
  142. package/src/member/index.ts +10 -0
  143. package/src/member/types.ts +1 -0
  144. package/src/member/util.ts +3 -0
  145. package/src/metrics/constants.ts +3 -0
  146. package/src/multistream/codec/constants.ts +58 -0
  147. package/src/multistream/mediaRequestManager.ts +119 -28
  148. package/src/multistream/receiveSlot.ts +18 -0
  149. package/src/reactions/reactions.type.ts +3 -0
  150. package/src/recording-controller/index.ts +1 -2
  151. package/src/webinar/index.ts +214 -36
  152. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  153. package/test/unit/spec/breakouts/breakout.ts +9 -3
  154. package/test/unit/spec/breakouts/index.ts +49 -0
  155. package/test/unit/spec/controls-options-manager/index.js +140 -29
  156. package/test/unit/spec/controls-options-manager/util.js +165 -0
  157. package/test/unit/spec/hashTree/hashTreeParser.ts +1838 -180
  158. package/test/unit/spec/hashTree/utils.ts +125 -1
  159. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  160. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  161. package/test/unit/spec/interpretation/index.ts +26 -4
  162. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  163. package/test/unit/spec/locus-info/index.js +487 -81
  164. package/test/unit/spec/media/index.ts +31 -0
  165. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
  166. package/test/unit/spec/meeting/index.js +1240 -37
  167. package/test/unit/spec/meeting/muteState.js +81 -0
  168. package/test/unit/spec/meeting/request.js +12 -0
  169. package/test/unit/spec/meeting/utils.js +33 -0
  170. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  171. package/test/unit/spec/meetings/index.js +360 -10
  172. package/test/unit/spec/meetings/request.js +141 -0
  173. package/test/unit/spec/meetings/utils.js +189 -0
  174. package/test/unit/spec/member/index.js +7 -0
  175. package/test/unit/spec/member/util.js +24 -0
  176. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  177. package/test/unit/spec/recording-controller/index.js +9 -8
  178. package/test/unit/spec/webinar/index.ts +329 -28
@@ -5,6 +5,8 @@ import MeetingsUtil from '@webex/plugin-meetings/src/meetings/util';
5
5
  import Metrics from '@webex/plugin-meetings/src/metrics';
6
6
  import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
7
7
 
8
+ const multipartSitePrefixList = ['.my.', '.mydmz.', '.mybts.', '.mydev.', '.myats2.', '.myats.'];
9
+
8
10
  describe('plugin-meetings', () => {
9
11
  beforeEach(() => {
10
12
  sinon.stub(Metrics, 'sendBehavioralMetric');
@@ -75,6 +77,28 @@ describe('plugin-meetings', () => {
75
77
  });
76
78
  });
77
79
 
80
+ describe('#getSiteName', () => {
81
+ it('gets the site name from a standard Webex site', () => {
82
+ assert.equal(MeetingsUtil.getSiteName('go.webex.com', multipartSitePrefixList), 'go');
83
+ });
84
+
85
+ it('gets the site name from a my Webex site', () => {
86
+ assert.equal(MeetingsUtil.getSiteName('go.my.webex.com', multipartSitePrefixList), 'go.my');
87
+ });
88
+
89
+ it('uses the configured multipart site prefix list', () => {
90
+ assert.equal(MeetingsUtil.getSiteName('go.custom.webex.com', ['.custom.']), 'go.custom');
91
+ });
92
+
93
+ it('falls back to the first label when the multipart site prefix list does not match', () => {
94
+ assert.equal(MeetingsUtil.getSiteName('go.my.webex.com', ['.custom.']), 'go');
95
+ });
96
+
97
+ it('returns null when the site is empty', () => {
98
+ assert.equal(MeetingsUtil.getSiteName('', multipartSitePrefixList), null);
99
+ });
100
+ });
101
+
78
102
  describe('#getThisDevice', () => {
79
103
  it('return null if no devices in self', () => {
80
104
  const newLocus = {};
@@ -128,6 +152,171 @@ describe('plugin-meetings', () => {
128
152
  };
129
153
  assert.equal(MeetingsUtil.isBreakoutLocusDTO(newLocus), false);
130
154
  });
155
+
156
+ it('returns true if newLocus.info.isBreakout is true', () => {
157
+ const newLocus = {
158
+ info: {
159
+ isBreakout: true,
160
+ },
161
+ };
162
+ assert.equal(MeetingsUtil.isBreakoutLocusDTO(newLocus), true);
163
+ });
164
+
165
+ it('returns false if newLocus.info.isBreakout is false', () => {
166
+ const newLocus = {
167
+ info: {
168
+ isBreakout: false,
169
+ },
170
+ };
171
+ assert.equal(MeetingsUtil.isBreakoutLocusDTO(newLocus), false);
172
+ });
173
+
174
+ it('returns true if both sessionType is BREAKOUT and info.isBreakout is true', () => {
175
+ const newLocus = {
176
+ controls: {
177
+ breakout: {
178
+ sessionType: 'BREAKOUT',
179
+ },
180
+ },
181
+ info: {
182
+ isBreakout: true,
183
+ },
184
+ };
185
+ assert.equal(MeetingsUtil.isBreakoutLocusDTO(newLocus), true);
186
+ });
187
+ });
188
+
189
+ describe('#isMainAssociatedWithBreakout', () => {
190
+ it('returns true when breakout control url matches main locus breakout url', () => {
191
+ const mainLocus = {
192
+ url: 'main-locus-url',
193
+ controls: {
194
+ breakout: {
195
+ url: 'breakout-control-url',
196
+ },
197
+ },
198
+ };
199
+ const breakoutLocus = {
200
+ controls: {
201
+ breakout: {
202
+ url: 'breakout-control-url',
203
+ },
204
+ },
205
+ };
206
+
207
+ assert.equal(MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus), true);
208
+ });
209
+
210
+ it('returns true when breakout self device replaces the main locus url', () => {
211
+ const mainLocus = {
212
+ url: 'main-locus-url',
213
+ controls: {},
214
+ };
215
+ const breakoutLocus = {
216
+ controls: {
217
+ breakout: {
218
+ url: 'other-breakout-url',
219
+ },
220
+ },
221
+ self: {
222
+ deviceUrl: 'device-url-1',
223
+ devices: [
224
+ {
225
+ url: 'device-url-1',
226
+ replaces: [{locusUrl: 'main-locus-url'}],
227
+ },
228
+ ],
229
+ },
230
+ };
231
+
232
+ assert.equal(MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus), true);
233
+ });
234
+
235
+ it('returns false when breakout locus is not associated with the main locus', () => {
236
+ const mainLocus = {
237
+ url: 'main-locus-url',
238
+ controls: {
239
+ breakout: {
240
+ url: 'breakout-control-url',
241
+ },
242
+ },
243
+ };
244
+ const breakoutLocus = {
245
+ controls: {
246
+ breakout: {
247
+ url: 'different-breakout-url',
248
+ },
249
+ },
250
+ self: {
251
+ deviceUrl: 'device-url-1',
252
+ devices: [
253
+ {
254
+ url: 'device-url-1',
255
+ replaces: [{locusUrl: 'another-main-locus-url'}],
256
+ },
257
+ ],
258
+ },
259
+ };
260
+
261
+ assert.equal(MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus), false);
262
+ });
263
+ });
264
+
265
+ describe('#isWholeMeetingEnded', () => {
266
+ [
267
+ {description: 'state is INACTIVE with no endMeetingReason', fullState: {state: 'INACTIVE'}, expected: true},
268
+ {description: 'state is INACTIVE with endMeetingReason OTHER', fullState: {state: 'INACTIVE', endMeetingReason: 'SOME_OTHER_REASON'}, expected: true},
269
+ {description: 'state is INACTIVE with endMeetingReason BREAKOUT_ENDED', fullState: {state: 'INACTIVE', endMeetingReason: 'BREAKOUT_ENDED'}, expected: false},
270
+ {description: 'state is not INACTIVE', fullState: {state: 'ACTIVE', endMeetingReason: 'SOME_OTHER_REASON'}, expected: false},
271
+ ].forEach(({description, fullState, expected}) => {
272
+ it(`returns ${expected} when ${description}`, () => {
273
+ assert.equal(MeetingsUtil.isWholeMeetingEnded(fullState), expected);
274
+ });
275
+ });
276
+ });
277
+
278
+ describe('#isSelfMovedOrBreakoutEnded', () => {
279
+ [
280
+ {description: 'locus is undefined', locus: undefined, expected: false},
281
+ {description: 'self state is JOINED', locus: {self: {state: 'JOINED', reason: 'OTHER'}}, expected: false},
282
+ {description: 'self state is LEFT with reason MOVED', locus: {self: {state: 'LEFT', reason: 'MOVED'}}, expected: true},
283
+ {description: 'fullState is INACTIVE with BREAKOUT_ENDED', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE', endMeetingReason: 'BREAKOUT_ENDED'}}, expected: true},
284
+ {description: 'fullState is INACTIVE with different endMeetingReason', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE', endMeetingReason: 'SOME_OTHER_REASON'}}, expected: false},
285
+ {description: 'fullState is missing', locus: {self: {state: 'LEFT', reason: 'OTHER'}}, expected: false},
286
+ {description: 'endMeetingReason is missing', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE'}}, expected: false},
287
+ ].forEach(({description, locus, expected}) => {
288
+ it(`returns ${expected} when ${description}`, () => {
289
+ assert.equal(MeetingsUtil.isSelfMovedOrBreakoutEnded(locus), expected);
290
+ });
291
+ });
292
+ });
293
+
294
+ describe('#isOneOnOneCall', () => {
295
+ [
296
+ {description: 'locus is undefined', locus: undefined, expected: false},
297
+ {description: 'fullState is missing', locus: {}, expected: false},
298
+ {description: 'fullState.type is missing', locus: {fullState: {}}, expected: false},
299
+ {description: 'fullState.type is CALL', locus: {fullState: {type: 'CALL'}}, expected: true},
300
+ {
301
+ description: 'fullState.type is SIP_BRIDGE',
302
+ locus: {fullState: {type: 'SIP_BRIDGE'}},
303
+ expected: true,
304
+ },
305
+ {
306
+ description: 'fullState.type is SPACE_SHARE',
307
+ locus: {fullState: {type: 'SPACE_SHARE'}},
308
+ expected: true,
309
+ },
310
+ {
311
+ description: 'fullState.type is MEETING',
312
+ locus: {fullState: {type: 'MEETING'}},
313
+ expected: false,
314
+ },
315
+ ].forEach(({description, locus, expected}) => {
316
+ it(`returns ${expected} when ${description}`, () => {
317
+ assert.equal(MeetingsUtil.isOneOnOneCall(locus), expected);
318
+ });
319
+ });
131
320
  });
132
321
 
133
322
  describe('#joinedOnThisDevice', () => {
@@ -59,6 +59,13 @@ describe('member', () => {
59
59
  assert.calledOnceWithExactly(MemberUtil.isPresenterAssignmentProhibited, participant);
60
60
  });
61
61
 
62
+ it('checks that processParticipant calls isAttendeeAssignmentProhibited', () => {
63
+ sinon.spy(MemberUtil, 'isAttendeeAssignmentProhibited');
64
+ member.processParticipant(participant);
65
+
66
+ assert.calledOnceWithExactly(MemberUtil.isAttendeeAssignmentProhibited, participant);
67
+ });
68
+
62
69
  it('checks that processParticipant calls canApproveAIEnablement', () => {
63
70
  sinon.spy(MemberUtil, 'canApproveAIEnablement');
64
71
  member.processParticipant(participant);
@@ -643,6 +643,30 @@ describe('plugin-meetings', () => {
643
643
  assert.isUndefined(MemberUtil.isPresenterAssignmentProhibited(participant));
644
644
  });
645
645
  });
646
+
647
+ describe('MemberUtil.isAttendeeAssignmentProhibited', () => {
648
+ it('returns true when attendeeAssignmentNotAllowed is true', () => {
649
+ const participant = {
650
+ attendeeAssignmentNotAllowed: true,
651
+ };
652
+
653
+ assert.isTrue(MemberUtil.isAttendeeAssignmentProhibited(participant));
654
+ });
655
+
656
+ it('returns false when attendeeAssignmentNotAllowed is false', () => {
657
+ const participant = {
658
+ attendeeAssignmentNotAllowed: false,
659
+ };
660
+
661
+ assert.isFalse(MemberUtil.isAttendeeAssignmentProhibited(participant));
662
+ });
663
+
664
+ it('returns false when attendeeAssignmentNotAllowed is undefined', () => {
665
+ const participant = {};
666
+
667
+ assert.isFalse(MemberUtil.isAttendeeAssignmentProhibited(participant));
668
+ });
669
+ });
646
670
  });
647
671
 
648
672
  describe('extractMediaStatus', () => {