@webex/plugin-meetings 3.12.0-next.14 → 3.12.0-next.140

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 (236) 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/annotation/index.js +2 -2
  5. package/dist/annotation/index.js.map +1 -1
  6. package/dist/breakouts/breakout.js +8 -3
  7. package/dist/breakouts/breakout.js.map +1 -1
  8. package/dist/breakouts/events.js +29 -14
  9. package/dist/breakouts/events.js.map +1 -1
  10. package/dist/breakouts/index.js +99 -4
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +2 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +37 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/index.js +46 -10
  19. package/dist/controls-options-manager/index.js.map +1 -1
  20. package/dist/hashTree/constants.js +4 -1
  21. package/dist/hashTree/constants.js.map +1 -1
  22. package/dist/hashTree/hashTreeParser.js +1096 -391
  23. package/dist/hashTree/hashTreeParser.js.map +1 -1
  24. package/dist/hashTree/utils.js +20 -0
  25. package/dist/hashTree/utils.js.map +1 -1
  26. package/dist/index.js +7 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  29. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  30. package/dist/interceptors/locusRetry.js +23 -8
  31. package/dist/interceptors/locusRetry.js.map +1 -1
  32. package/dist/interpretation/index.js +10 -1
  33. package/dist/interpretation/index.js.map +1 -1
  34. package/dist/interpretation/interpretation.types.js +7 -0
  35. package/dist/interpretation/interpretation.types.js.map +1 -0
  36. package/dist/interpretation/siLanguage.js +1 -1
  37. package/dist/locus-info/controlsUtils.js +4 -1
  38. package/dist/locus-info/controlsUtils.js.map +1 -1
  39. package/dist/locus-info/index.js +615 -176
  40. package/dist/locus-info/index.js.map +1 -1
  41. package/dist/locus-info/infoUtils.js +36 -5
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/types.js +20 -0
  44. package/dist/locus-info/types.js.map +1 -1
  45. package/dist/media/MediaConnectionAwaiter.js +15 -2
  46. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  47. package/dist/media/index.js +8 -2
  48. package/dist/media/index.js.map +1 -1
  49. package/dist/media/properties.js +4 -5
  50. package/dist/media/properties.js.map +1 -1
  51. package/dist/meeting/in-meeting-actions.js +5 -1
  52. package/dist/meeting/in-meeting-actions.js.map +1 -1
  53. package/dist/meeting/index.js +1680 -835
  54. package/dist/meeting/index.js.map +1 -1
  55. package/dist/meeting/locusMediaRequest.js +229 -82
  56. package/dist/meeting/locusMediaRequest.js.map +1 -1
  57. package/dist/meeting/muteState.js +10 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +5 -2
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/util.js +34 -2
  62. package/dist/meeting/util.js.map +1 -1
  63. package/dist/meeting/voicea-meeting.js +2 -1
  64. package/dist/meeting/voicea-meeting.js.map +1 -1
  65. package/dist/meeting-info/meeting-info-v2.js +9 -3
  66. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  67. package/dist/meetings/index.js +293 -124
  68. package/dist/meetings/index.js.map +1 -1
  69. package/dist/meetings/meetings.types.js +6 -1
  70. package/dist/meetings/meetings.types.js.map +1 -1
  71. package/dist/meetings/request.js +39 -0
  72. package/dist/meetings/request.js.map +1 -1
  73. package/dist/meetings/util.js +116 -18
  74. package/dist/meetings/util.js.map +1 -1
  75. package/dist/member/index.js +10 -0
  76. package/dist/member/index.js.map +1 -1
  77. package/dist/member/types.js.map +1 -1
  78. package/dist/member/util.js +30 -0
  79. package/dist/member/util.js.map +1 -1
  80. package/dist/members/index.js +101 -43
  81. package/dist/members/index.js.map +1 -1
  82. package/dist/members/util.js +8 -1
  83. package/dist/members/util.js.map +1 -1
  84. package/dist/metrics/constants.js +7 -1
  85. package/dist/metrics/constants.js.map +1 -1
  86. package/dist/multistream/codec/constants.js +63 -0
  87. package/dist/multistream/codec/constants.js.map +1 -0
  88. package/dist/multistream/mediaRequestManager.js +62 -15
  89. package/dist/multistream/mediaRequestManager.js.map +1 -1
  90. package/dist/multistream/receiveSlot.js +9 -0
  91. package/dist/multistream/receiveSlot.js.map +1 -1
  92. package/dist/reachability/clusterReachability.js.map +1 -1
  93. package/dist/reachability/index.js +121 -83
  94. package/dist/reachability/index.js.map +1 -1
  95. package/dist/reachability/reachability.types.js +2 -0
  96. package/dist/reachability/reachability.types.js.map +1 -1
  97. package/dist/reachability/util.js +45 -0
  98. package/dist/reachability/util.js.map +1 -1
  99. package/dist/reactions/reactions.type.js.map +1 -1
  100. package/dist/recording-controller/index.js +1 -3
  101. package/dist/recording-controller/index.js.map +1 -1
  102. package/dist/roap/turnDiscovery.js +8 -1
  103. package/dist/roap/turnDiscovery.js.map +1 -1
  104. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/constants.d.ts +13 -1
  107. package/dist/types/controls-options-manager/index.d.ts +16 -0
  108. package/dist/types/hashTree/constants.d.ts +1 -0
  109. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  110. package/dist/types/hashTree/utils.d.ts +7 -0
  111. package/dist/types/index.d.ts +3 -0
  112. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  113. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  114. package/dist/types/locus-info/index.d.ts +106 -8
  115. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  116. package/dist/types/locus-info/types.d.ts +22 -1
  117. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  118. package/dist/types/media/properties.d.ts +6 -2
  119. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  120. package/dist/types/meeting/index.d.ts +176 -11
  121. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  122. package/dist/types/meeting/request.d.ts +1 -0
  123. package/dist/types/meeting/util.d.ts +9 -0
  124. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  125. package/dist/types/meetings/index.d.ts +40 -19
  126. package/dist/types/meetings/meetings.types.d.ts +15 -0
  127. package/dist/types/meetings/request.d.ts +14 -0
  128. package/dist/types/member/index.d.ts +1 -0
  129. package/dist/types/member/types.d.ts +1 -0
  130. package/dist/types/member/util.d.ts +9 -0
  131. package/dist/types/members/index.d.ts +15 -2
  132. package/dist/types/members/util.d.ts +1 -5
  133. package/dist/types/metrics/constants.d.ts +6 -0
  134. package/dist/types/multistream/codec/constants.d.ts +7 -0
  135. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  136. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  137. package/dist/types/reachability/index.d.ts +10 -3
  138. package/dist/types/reachability/reachability.types.d.ts +7 -0
  139. package/dist/types/reachability/util.d.ts +17 -0
  140. package/dist/types/reactions/reactions.type.d.ts +3 -0
  141. package/dist/webinar/index.js +307 -161
  142. package/dist/webinar/index.js.map +1 -1
  143. package/package.json +23 -23
  144. package/src/aiEnableRequest/index.ts +16 -0
  145. package/src/annotation/index.ts +6 -4
  146. package/src/breakouts/breakout.ts +3 -1
  147. package/src/breakouts/events.ts +33 -11
  148. package/src/breakouts/index.ts +122 -2
  149. package/src/common/errors/webex-errors.ts +50 -3
  150. package/src/config.ts +2 -2
  151. package/src/constants.ts +21 -3
  152. package/src/controls-options-manager/index.ts +62 -10
  153. package/src/hashTree/constants.ts +7 -0
  154. package/src/hashTree/hashTreeParser.ts +861 -193
  155. package/src/hashTree/utils.ts +19 -0
  156. package/src/index.ts +6 -0
  157. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  158. package/src/interceptors/locusRetry.ts +25 -4
  159. package/src/interpretation/index.ts +27 -9
  160. package/src/interpretation/interpretation.types.ts +11 -0
  161. package/src/locus-info/controlsUtils.ts +3 -1
  162. package/src/locus-info/index.ts +566 -164
  163. package/src/locus-info/infoUtils.ts +41 -6
  164. package/src/locus-info/types.ts +26 -1
  165. package/src/media/MediaConnectionAwaiter.ts +21 -4
  166. package/src/media/index.ts +10 -1
  167. package/src/media/properties.ts +8 -3
  168. package/src/meeting/in-meeting-actions.ts +8 -0
  169. package/src/meeting/index.ts +933 -119
  170. package/src/meeting/locusMediaRequest.ts +106 -6
  171. package/src/meeting/muteState.ts +10 -1
  172. package/src/meeting/request.ts +11 -0
  173. package/src/meeting/util.ts +46 -5
  174. package/src/meeting/voicea-meeting.ts +1 -1
  175. package/src/meeting-info/meeting-info-v2.ts +10 -4
  176. package/src/meetings/index.ts +197 -80
  177. package/src/meetings/meetings.types.ts +19 -0
  178. package/src/meetings/request.ts +43 -0
  179. package/src/meetings/util.ts +117 -4
  180. package/src/member/index.ts +10 -0
  181. package/src/member/types.ts +1 -0
  182. package/src/member/util.ts +29 -0
  183. package/src/members/index.ts +70 -7
  184. package/src/members/util.ts +12 -4
  185. package/src/metrics/constants.ts +6 -0
  186. package/src/multistream/codec/constants.ts +58 -0
  187. package/src/multistream/mediaRequestManager.ts +119 -28
  188. package/src/multistream/receiveSlot.ts +18 -0
  189. package/src/reachability/clusterReachability.ts +3 -2
  190. package/src/reachability/index.ts +47 -16
  191. package/src/reachability/reachability.types.ts +11 -0
  192. package/src/reachability/util.ts +36 -0
  193. package/src/reactions/reactions.type.ts +3 -0
  194. package/src/recording-controller/index.ts +1 -2
  195. package/src/roap/turnDiscovery.ts +9 -1
  196. package/src/webinar/index.ts +216 -38
  197. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  198. package/test/unit/spec/annotation/index.ts +3 -3
  199. package/test/unit/spec/breakouts/breakout.ts +9 -3
  200. package/test/unit/spec/breakouts/events.ts +120 -2
  201. package/test/unit/spec/breakouts/index.ts +223 -3
  202. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  203. package/test/unit/spec/controls-options-manager/index.js +139 -32
  204. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  205. package/test/unit/spec/hashTree/utils.ts +37 -0
  206. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  207. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  208. package/test/unit/spec/interpretation/index.ts +26 -4
  209. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  210. package/test/unit/spec/locus-info/index.js +1014 -58
  211. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  212. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  213. package/test/unit/spec/media/index.ts +92 -0
  214. package/test/unit/spec/media/properties.ts +23 -23
  215. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  216. package/test/unit/spec/meeting/index.js +2805 -116
  217. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  218. package/test/unit/spec/meeting/muteState.js +81 -0
  219. package/test/unit/spec/meeting/request.js +12 -0
  220. package/test/unit/spec/meeting/utils.js +153 -1
  221. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  222. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  223. package/test/unit/spec/meetings/index.js +533 -49
  224. package/test/unit/spec/meetings/request.js +141 -0
  225. package/test/unit/spec/meetings/utils.js +402 -51
  226. package/test/unit/spec/member/index.js +7 -0
  227. package/test/unit/spec/member/util.js +89 -0
  228. package/test/unit/spec/members/index.js +216 -0
  229. package/test/unit/spec/members/request.js +37 -1
  230. package/test/unit/spec/members/utils.js +63 -0
  231. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  232. package/test/unit/spec/reachability/index.ts +128 -46
  233. package/test/unit/spec/reachability/util.ts +31 -0
  234. package/test/unit/spec/recording-controller/index.js +9 -8
  235. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  236. package/test/unit/spec/webinar/index.ts +332 -31
@@ -27,6 +27,7 @@ describe('plugin-meetings', () => {
27
27
  beforeEach(() => {
28
28
  request = {
29
29
  request: sinon.stub().returns(Promise.resolve()),
30
+ locusDeltaRequest: sinon.stub().returns(Promise.resolve()),
30
31
  };
31
32
 
32
33
  manager = new ControlsOptionsManager(request);
@@ -59,11 +60,11 @@ describe('plugin-meetings', () => {
59
60
 
60
61
  const result = manager.setMuteOnEntry(true);
61
62
 
62
- assert.calledWith(request.request, { uri: 'test/id/controls',
63
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
63
64
  body: { muteOnEntry: { enabled: true } },
64
65
  method: HTTP_VERBS.PATCH});
65
66
 
66
- assert.deepEqual(result, request.request.firstCall.returnValue);
67
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
67
68
  });
68
69
 
69
70
  it('can set mute on entry when the display hint is available enabled=false', () => {
@@ -71,11 +72,11 @@ describe('plugin-meetings', () => {
71
72
 
72
73
  const result = manager.setMuteOnEntry(false);
73
74
 
74
- assert.calledWith(request.request, { uri: 'test/id/controls',
75
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
75
76
  body: { muteOnEntry: { enabled: false } },
76
77
  method: HTTP_VERBS.PATCH});
77
78
 
78
- assert.deepEqual(result, request.request.firstCall.returnValue);
79
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
79
80
  });
80
81
 
81
82
  it('should send setMuteOnEntry to locusUrl without authorizingLocusUrl when in breakout', () => {
@@ -84,11 +85,11 @@ describe('plugin-meetings', () => {
84
85
 
85
86
  const result = manager.setMuteOnEntry(true);
86
87
 
87
- assert.calledWith(request.request, { uri: 'test/id/controls',
88
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
88
89
  body: { muteOnEntry: { enabled: true } },
89
90
  method: HTTP_VERBS.PATCH});
90
91
 
91
- assert.deepEqual(result, request.request.firstCall.returnValue);
92
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
92
93
  });
93
94
  });
94
95
 
@@ -114,11 +115,11 @@ describe('plugin-meetings', () => {
114
115
 
115
116
  const result = manager.setDisallowUnmute(true);
116
117
 
117
- assert.calledWith(request.request, { uri: 'test/id/controls',
118
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
118
119
  body: { disallowUnmute: { enabled: true } },
119
120
  method: HTTP_VERBS.PATCH});
120
121
 
121
- assert.deepEqual(result, request.request.firstCall.returnValue);
122
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
122
123
  });
123
124
 
124
125
  it('can set allow unmute when DISABLE_HARD_MUTE display hint is available', () => {
@@ -126,11 +127,11 @@ describe('plugin-meetings', () => {
126
127
 
127
128
  const result = manager.setDisallowUnmute(false);
128
129
 
129
- assert.calledWith(request.request, { uri: 'test/id/controls',
130
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
130
131
  body: { disallowUnmute: { enabled: false } },
131
132
  method: HTTP_VERBS.PATCH});
132
133
 
133
- assert.deepEqual(result, request.request.firstCall.returnValue);
134
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
134
135
  });
135
136
 
136
137
  it('should send setDisallowUnmute to locusUrl without authorizingLocusUrl when in breakout', () => {
@@ -139,11 +140,11 @@ describe('plugin-meetings', () => {
139
140
 
140
141
  const result = manager.setDisallowUnmute(true);
141
142
 
142
- assert.calledWith(request.request, { uri: 'test/id/controls',
143
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
143
144
  body: { disallowUnmute: { enabled: true } },
144
145
  method: HTTP_VERBS.PATCH});
145
146
 
146
- assert.deepEqual(result, request.request.firstCall.returnValue);
147
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
147
148
  });
148
149
  });
149
150
  });
@@ -154,6 +155,7 @@ describe('plugin-meetings', () => {
154
155
  beforeEach(() => {
155
156
  request = {
156
157
  request: sinon.stub().resolves(),
158
+ locusDeltaRequest: sinon.stub().resolves(),
157
159
  };
158
160
 
159
161
  manager = new ControlsOptionsManager(request);
@@ -202,7 +204,7 @@ describe('plugin-meetings', () => {
202
204
 
203
205
  return manager.update(audio, reactions)
204
206
  .then(() => {
205
- assert.calledWith(request.request, {
207
+ assert.calledWith(request.locusDeltaRequest, {
206
208
  uri: 'test/id/controls',
207
209
  body: {
208
210
  audio: audio.properties,
@@ -210,7 +212,7 @@ describe('plugin-meetings', () => {
210
212
  method: HTTP_VERBS.PATCH,
211
213
  });
212
214
 
213
- assert.calledWith(request.request, {
215
+ assert.calledWith(request.locusDeltaRequest, {
214
216
  uri: 'test/id/controls',
215
217
  body: {
216
218
  reactions: reactions.properties,
@@ -253,7 +255,7 @@ describe('plugin-meetings', () => {
253
255
  return manager.update(audio, reactions)
254
256
  .then(() => {
255
257
  // Audio controls go directly to current locusUrl (no cross-locus authorization)
256
- assert.calledWith(request.request, {
258
+ assert.calledWith(request.locusDeltaRequest, {
257
259
  uri: 'test/id/controls',
258
260
  body: {
259
261
  audio: audio.properties,
@@ -284,7 +286,7 @@ describe('plugin-meetings', () => {
284
286
 
285
287
  return manager.update(audio)
286
288
  .then(() => {
287
- assert.calledWith(request.request, {
289
+ assert.calledWith(request.locusDeltaRequest, {
288
290
  uri: 'test/id/controls',
289
291
  body: {
290
292
  audio: audio.properties,
@@ -317,6 +319,110 @@ describe('plugin-meetings', () => {
317
319
  Util.canUpdate = restorable;
318
320
  });
319
321
  });
322
+
323
+ describe('viewTheParticipantList fill-in', () => {
324
+ let restorable;
325
+
326
+ afterEach(() => {
327
+ Util.canUpdate = restorable;
328
+ });
329
+
330
+ describe('when meeting is a webinar', () => {
331
+ beforeEach(() => {
332
+ restorable = Util.canUpdate;
333
+ Util.canUpdate = sinon.stub().returns(true);
334
+ manager.set({
335
+ locusUrl: 'test/id',
336
+ displayHints: [],
337
+ getControls: () => ({viewTheParticipantList: {enabled: true, panelistEnabled: true, attendeeCount: true}}),
338
+ isWebinar: () => true,
339
+ });
340
+ });
341
+
342
+ it('should fill in all undefined properties from current state', () => {
343
+ const control = {scope: 'viewTheParticipantList', properties: {}};
344
+
345
+ return manager.update(control).then(() => {
346
+ assert.calledOnceWithExactly(request.locusDeltaRequest, {
347
+ uri: 'test/id/controls',
348
+ body: {
349
+ viewTheParticipantList: {enabled: true, panelistEnabled: true, attendeeCount: true},
350
+ },
351
+ method: HTTP_VERBS.PATCH,
352
+ });
353
+ });
354
+ });
355
+
356
+ it('should keep explicitly provided properties and fill in the rest', () => {
357
+ const control = {scope: 'viewTheParticipantList', properties: {enabled: false}};
358
+
359
+ return manager.update(control).then(() => {
360
+ assert.calledOnceWithExactly(request.locusDeltaRequest, {
361
+ uri: 'test/id/controls',
362
+ body: {
363
+ viewTheParticipantList: {enabled: false, panelistEnabled: true, attendeeCount: true},
364
+ },
365
+ method: HTTP_VERBS.PATCH,
366
+ });
367
+ });
368
+ });
369
+
370
+ it('should not fill in properties when all are explicitly provided', () => {
371
+ const control = {scope: 'viewTheParticipantList', properties: {enabled: false, panelistEnabled: false, attendeeCount: false}};
372
+
373
+ return manager.update(control).then(() => {
374
+ assert.calledOnceWithExactly(request.locusDeltaRequest, {
375
+ uri: 'test/id/controls',
376
+ body: {
377
+ viewTheParticipantList: {enabled: false, panelistEnabled: false, attendeeCount: false},
378
+ },
379
+ method: HTTP_VERBS.PATCH,
380
+ });
381
+ });
382
+ });
383
+ });
384
+
385
+ describe('when meeting is not a webinar', () => {
386
+ beforeEach(() => {
387
+ restorable = Util.canUpdate;
388
+ Util.canUpdate = sinon.stub().returns(true);
389
+ manager.set({
390
+ locusUrl: 'test/id',
391
+ displayHints: [],
392
+ getControls: () => ({viewTheParticipantList: {enabled: true, panelistEnabled: true, attendeeCount: true}}),
393
+ isWebinar: () => false,
394
+ });
395
+ });
396
+
397
+ it('should only send enabled property', () => {
398
+ const control = {scope: 'viewTheParticipantList', properties: {}};
399
+
400
+ return manager.update(control).then(() => {
401
+ assert.calledOnceWithExactly(request.locusDeltaRequest, {
402
+ uri: 'test/id/controls',
403
+ body: {
404
+ viewTheParticipantList: {enabled: true},
405
+ },
406
+ method: HTTP_VERBS.PATCH,
407
+ });
408
+ });
409
+ });
410
+
411
+ it('should not include panelistEnabled or attendeeCount even if explicitly provided', () => {
412
+ const control = {scope: 'viewTheParticipantList', properties: {enabled: false, panelistEnabled: true, attendeeCount: true}};
413
+
414
+ return manager.update(control).then(() => {
415
+ assert.calledOnceWithExactly(request.locusDeltaRequest, {
416
+ uri: 'test/id/controls',
417
+ body: {
418
+ viewTheParticipantList: {enabled: false},
419
+ },
420
+ method: HTTP_VERBS.PATCH,
421
+ });
422
+ });
423
+ });
424
+ });
425
+ });
320
426
  });
321
427
 
322
428
  describe('Mute/Unmute All', () => {
@@ -324,6 +430,7 @@ describe('plugin-meetings', () => {
324
430
  beforeEach(() => {
325
431
  request = {
326
432
  request: sinon.stub().returns(Promise.resolve()),
433
+ locusDeltaRequest: sinon.stub().returns(Promise.resolve()),
327
434
  };
328
435
 
329
436
  manager = new ControlsOptionsManager(request);
@@ -368,11 +475,11 @@ describe('plugin-meetings', () => {
368
475
 
369
476
  const result = manager.setMuteAll(true, true, true);
370
477
 
371
- assert.calledWith(request.request, { uri: 'test/id/controls',
478
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
372
479
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true } },
373
480
  method: HTTP_VERBS.PATCH});
374
481
 
375
- assert.deepEqual(result, request.request.firstCall.returnValue);
482
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
376
483
  });
377
484
 
378
485
  it('can set mute all when the display hint is available mutedEnabled=true', () => {
@@ -380,11 +487,11 @@ describe('plugin-meetings', () => {
380
487
 
381
488
  const result = manager.setMuteAll(true, true, true);
382
489
 
383
- assert.calledWith(request.request, { uri: 'test/id/controls',
490
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
384
491
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true } },
385
492
  method: HTTP_VERBS.PATCH});
386
493
 
387
- assert.deepEqual(result, request.request.firstCall.returnValue);
494
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
388
495
  });
389
496
 
390
497
  it('can set mute all when the display hint is available mutedEnabled=true', () => {
@@ -392,11 +499,11 @@ describe('plugin-meetings', () => {
392
499
 
393
500
  const result = manager.setMuteAll(true, true, true);
394
501
 
395
- assert.calledWith(request.request, { uri: 'test/id/controls',
502
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
396
503
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true } },
397
504
  method: HTTP_VERBS.PATCH});
398
505
 
399
- assert.deepEqual(result, request.request.firstCall.returnValue);
506
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
400
507
  });
401
508
 
402
509
  it('can set mute all when the display hint is available mutedEnabled=false', () => {
@@ -404,11 +511,11 @@ describe('plugin-meetings', () => {
404
511
 
405
512
  const result = manager.setMuteAll(false, false, false);
406
513
 
407
- assert.calledWith(request.request, { uri: 'test/id/controls',
514
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
408
515
  body: { audio: { muted: false, disallowUnmute: false, muteOnEntry: false } },
409
516
  method: HTTP_VERBS.PATCH});
410
517
 
411
- assert.deepEqual(result, request.request.firstCall.returnValue);
518
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
412
519
  });
413
520
 
414
521
  it('can set mute all panelists when the display hint is available mutedEnabled=true', () => {
@@ -416,11 +523,11 @@ describe('plugin-meetings', () => {
416
523
 
417
524
  const result = manager.setMuteAll(true, true, true, ['panelist']);
418
525
 
419
- assert.calledWith(request.request, { uri: 'test/id/controls',
526
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
420
527
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true, roles: ['panelist'] } },
421
528
  method: HTTP_VERBS.PATCH});
422
529
 
423
- assert.deepEqual(result, request.request.firstCall.returnValue);
530
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
424
531
  });
425
532
 
426
533
  it('can set mute all attendees when the display hint is available mutedEnabled=true', () => {
@@ -428,11 +535,11 @@ describe('plugin-meetings', () => {
428
535
 
429
536
  const result = manager.setMuteAll(true, true, true, ['attendee']);
430
537
 
431
- assert.calledWith(request.request, { uri: 'test/id/controls',
538
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
432
539
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true, roles: ['attendee'] } },
433
540
  method: HTTP_VERBS.PATCH});
434
541
 
435
- assert.deepEqual(result, request.request.firstCall.returnValue);
542
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
436
543
  });
437
544
 
438
545
  it('should send setMuteAll to locusUrl without authorizingLocusUrl when in breakout', () => {
@@ -441,11 +548,11 @@ describe('plugin-meetings', () => {
441
548
 
442
549
  const result = manager.setMuteAll(true, true, true, ['attendee']);
443
550
 
444
- assert.calledWith(request.request, { uri: 'test/id/controls',
551
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
445
552
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true, roles: ['attendee'] } },
446
553
  method: HTTP_VERBS.PATCH});
447
554
 
448
- assert.deepEqual(result, request.request.firstCall.returnValue);
555
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
449
556
  });
450
557
 
451
558
  it('should send setMuteAll with PANELIST role to locusUrl without authorizingLocusUrl when in breakout', () => {
@@ -454,11 +561,11 @@ describe('plugin-meetings', () => {
454
561
 
455
562
  const result = manager.setMuteAll(true, true, true, ['PANELIST']);
456
563
 
457
- assert.calledWith(request.request, { uri: 'test/id/controls',
564
+ assert.calledWith(request.locusDeltaRequest, { uri: 'test/id/controls',
458
565
  body: { audio: { muted: true, disallowUnmute: true, muteOnEntry: true, roles: ['PANELIST'] } },
459
566
  method: HTTP_VERBS.PATCH});
460
567
 
461
- assert.deepEqual(result, request.request.firstCall.returnValue);
568
+ assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
462
569
  });
463
570
  });
464
571
  });