@webex/plugin-meetings 3.6.0 → 3.7.0

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 (277) hide show
  1. package/README.md +2 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/webinar-registration-error.js +50 -0
  5. package/dist/common/errors/webinar-registration-error.js.map +1 -0
  6. package/dist/config.js +3 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/constants.js +31 -2
  9. package/dist/constants.js.map +1 -1
  10. package/dist/controls-options-manager/enums.js +1 -0
  11. package/dist/controls-options-manager/enums.js.map +1 -1
  12. package/dist/controls-options-manager/index.js +10 -3
  13. package/dist/controls-options-manager/index.js.map +1 -1
  14. package/dist/controls-options-manager/types.js.map +1 -1
  15. package/dist/controls-options-manager/util.js +12 -0
  16. package/dist/controls-options-manager/util.js.map +1 -1
  17. package/dist/index.js +7 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/interpretation/index.js +1 -1
  20. package/dist/interpretation/siLanguage.js +1 -1
  21. package/dist/locus-info/controlsUtils.js +28 -4
  22. package/dist/locus-info/controlsUtils.js.map +1 -1
  23. package/dist/locus-info/fullState.js +2 -1
  24. package/dist/locus-info/fullState.js.map +1 -1
  25. package/dist/locus-info/index.js +61 -3
  26. package/dist/locus-info/index.js.map +1 -1
  27. package/dist/locus-info/parser.js +5 -1
  28. package/dist/locus-info/parser.js.map +1 -1
  29. package/dist/meeting/in-meeting-actions.js +19 -1
  30. package/dist/meeting/in-meeting-actions.js.map +1 -1
  31. package/dist/meeting/index.js +664 -490
  32. package/dist/meeting/index.js.map +1 -1
  33. package/dist/meeting/muteState.js +5 -2
  34. package/dist/meeting/muteState.js.map +1 -1
  35. package/dist/meeting/util.js +3 -2
  36. package/dist/meeting/util.js.map +1 -1
  37. package/dist/meeting-info/meeting-info-v2.js +68 -17
  38. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  39. package/dist/meetings/index.js +25 -1
  40. package/dist/meetings/index.js.map +1 -1
  41. package/dist/members/index.js +3 -2
  42. package/dist/members/index.js.map +1 -1
  43. package/dist/members/util.js +9 -5
  44. package/dist/members/util.js.map +1 -1
  45. package/dist/metrics/constants.js +2 -1
  46. package/dist/metrics/constants.js.map +1 -1
  47. package/dist/multistream/remoteMedia.js +4 -0
  48. package/dist/multistream/remoteMedia.js.map +1 -1
  49. package/dist/networkQualityMonitor/index.js +19 -13
  50. package/dist/networkQualityMonitor/index.js.map +1 -1
  51. package/dist/reachability/index.js +3 -3
  52. package/dist/reachability/index.js.map +1 -1
  53. package/dist/reachability/request.js +2 -1
  54. package/dist/reachability/request.js.map +1 -1
  55. package/dist/roap/request.js +1 -1
  56. package/dist/roap/request.js.map +1 -1
  57. package/dist/{common/errors/parameter.d.ts → types/common/errors/webinar-registration-error.d.ts} +4 -5
  58. package/dist/types/config.d.ts +2 -0
  59. package/dist/types/constants.d.ts +25 -0
  60. package/dist/types/controls-options-manager/enums.d.ts +2 -1
  61. package/dist/types/controls-options-manager/index.d.ts +2 -1
  62. package/dist/types/controls-options-manager/types.d.ts +2 -0
  63. package/dist/types/index.d.ts +2 -1
  64. package/dist/types/locus-info/index.d.ts +9 -0
  65. package/dist/types/meeting/in-meeting-actions.d.ts +18 -0
  66. package/dist/types/meeting/index.d.ts +12 -1
  67. package/dist/types/meeting/muteState.d.ts +2 -1
  68. package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
  69. package/dist/types/meetings/index.d.ts +9 -0
  70. package/dist/types/members/index.d.ts +2 -1
  71. package/dist/types/members/util.d.ts +3 -1
  72. package/dist/types/metrics/constants.d.ts +1 -0
  73. package/dist/types/multistream/remoteMedia.d.ts +1 -0
  74. package/dist/webinar/index.js +32 -19
  75. package/dist/webinar/index.js.map +1 -1
  76. package/package.json +22 -22
  77. package/src/common/errors/webinar-registration-error.ts +27 -0
  78. package/src/config.ts +2 -0
  79. package/src/constants.ts +31 -0
  80. package/src/controls-options-manager/enums.ts +1 -0
  81. package/src/controls-options-manager/index.ts +19 -2
  82. package/src/controls-options-manager/types.ts +2 -0
  83. package/src/controls-options-manager/util.ts +12 -0
  84. package/src/index.ts +2 -0
  85. package/src/locus-info/controlsUtils.ts +46 -2
  86. package/src/locus-info/fullState.ts +1 -0
  87. package/src/locus-info/index.ts +60 -0
  88. package/src/locus-info/parser.ts +8 -1
  89. package/src/meeting/in-meeting-actions.ts +37 -0
  90. package/src/meeting/index.ts +154 -20
  91. package/src/meeting/muteState.ts +6 -2
  92. package/src/meeting/util.ts +6 -2
  93. package/src/meeting-info/meeting-info-v2.ts +51 -0
  94. package/src/meetings/index.ts +68 -40
  95. package/src/members/index.ts +4 -2
  96. package/src/members/util.ts +3 -1
  97. package/src/metrics/constants.ts +1 -0
  98. package/src/multistream/remoteMedia.ts +5 -0
  99. package/src/reachability/index.ts +3 -3
  100. package/src/reachability/request.ts +1 -0
  101. package/src/roap/request.ts +3 -1
  102. package/src/webinar/index.ts +31 -17
  103. package/test/unit/spec/controls-options-manager/index.js +56 -32
  104. package/test/unit/spec/controls-options-manager/util.js +44 -0
  105. package/test/unit/spec/locus-info/controlsUtils.js +80 -4
  106. package/test/unit/spec/locus-info/index.js +88 -2
  107. package/test/unit/spec/meeting/in-meeting-actions.ts +18 -0
  108. package/test/unit/spec/meeting/index.js +263 -64
  109. package/test/unit/spec/meeting/muteState.js +8 -4
  110. package/test/unit/spec/meeting/utils.js +16 -1
  111. package/test/unit/spec/meeting-info/meetinginfov2.js +37 -0
  112. package/test/unit/spec/meetings/index.js +32 -1
  113. package/test/unit/spec/members/index.js +25 -2
  114. package/test/unit/spec/members/request.js +37 -3
  115. package/test/unit/spec/members/utils.js +15 -1
  116. package/test/unit/spec/multistream/remoteMedia.ts +16 -2
  117. package/test/unit/spec/reachability/index.ts +1 -1
  118. package/test/unit/spec/reachability/request.js +13 -8
  119. package/test/unit/spec/webinar/index.ts +82 -16
  120. package/dist/annotation/annotation.types.d.ts +0 -42
  121. package/dist/annotation/constants.d.ts +0 -31
  122. package/dist/annotation/index.d.ts +0 -117
  123. package/dist/breakouts/breakout.d.ts +0 -8
  124. package/dist/breakouts/collection.d.ts +0 -5
  125. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  126. package/dist/breakouts/events.d.ts +0 -8
  127. package/dist/breakouts/index.d.ts +0 -5
  128. package/dist/breakouts/request.d.ts +0 -22
  129. package/dist/breakouts/utils.d.ts +0 -15
  130. package/dist/common/browser-detection.d.ts +0 -9
  131. package/dist/common/collection.d.ts +0 -48
  132. package/dist/common/config.d.ts +0 -2
  133. package/dist/common/errors/captcha-error.d.ts +0 -15
  134. package/dist/common/errors/intent-to-join.d.ts +0 -16
  135. package/dist/common/errors/join-meeting.d.ts +0 -17
  136. package/dist/common/errors/media.d.ts +0 -15
  137. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  138. package/dist/common/errors/password-error.d.ts +0 -15
  139. package/dist/common/errors/permission.d.ts +0 -14
  140. package/dist/common/errors/reclaim-host-role-error.js +0 -149
  141. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  142. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  143. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  144. package/dist/common/errors/reconnection-in-progress.js +0 -33
  145. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  146. package/dist/common/errors/reconnection.d.ts +0 -15
  147. package/dist/common/errors/stats.d.ts +0 -15
  148. package/dist/common/errors/webex-errors.d.ts +0 -93
  149. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  150. package/dist/common/events/events-scope.d.ts +0 -17
  151. package/dist/common/events/events.d.ts +0 -12
  152. package/dist/common/events/trigger-proxy.d.ts +0 -2
  153. package/dist/common/events/util.d.ts +0 -2
  154. package/dist/common/logs/logger-config.d.ts +0 -2
  155. package/dist/common/logs/logger-proxy.d.ts +0 -2
  156. package/dist/common/logs/request.d.ts +0 -36
  157. package/dist/common/queue.d.ts +0 -34
  158. package/dist/config.d.ts +0 -72
  159. package/dist/constants.d.ts +0 -1088
  160. package/dist/controls-options-manager/constants.d.ts +0 -4
  161. package/dist/controls-options-manager/enums.d.ts +0 -15
  162. package/dist/controls-options-manager/index.d.ts +0 -136
  163. package/dist/controls-options-manager/types.d.ts +0 -43
  164. package/dist/controls-options-manager/util.d.ts +0 -1
  165. package/dist/index.d.ts +0 -7
  166. package/dist/interceptors/index.d.ts +0 -2
  167. package/dist/interceptors/locusRetry.d.ts +0 -27
  168. package/dist/interpretation/collection.d.ts +0 -5
  169. package/dist/interpretation/index.d.ts +0 -5
  170. package/dist/interpretation/siLanguage.d.ts +0 -5
  171. package/dist/locus-info/controlsUtils.d.ts +0 -2
  172. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  173. package/dist/locus-info/fullState.d.ts +0 -2
  174. package/dist/locus-info/hostUtils.d.ts +0 -2
  175. package/dist/locus-info/index.d.ts +0 -322
  176. package/dist/locus-info/infoUtils.d.ts +0 -2
  177. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  178. package/dist/locus-info/parser.d.ts +0 -272
  179. package/dist/locus-info/selfUtils.d.ts +0 -2
  180. package/dist/media/index.d.ts +0 -34
  181. package/dist/media/properties.d.ts +0 -93
  182. package/dist/media/util.d.ts +0 -2
  183. package/dist/mediaQualityMetrics/config.d.ts +0 -241
  184. package/dist/mediaQualityMetrics/config.js +0 -502
  185. package/dist/mediaQualityMetrics/config.js.map +0 -1
  186. package/dist/meeting/effectsState.js +0 -260
  187. package/dist/meeting/effectsState.js.map +0 -1
  188. package/dist/meeting/in-meeting-actions.d.ts +0 -167
  189. package/dist/meeting/index.d.ts +0 -1825
  190. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  191. package/dist/meeting/muteState.d.ts +0 -178
  192. package/dist/meeting/request.d.ts +0 -295
  193. package/dist/meeting/request.type.d.ts +0 -11
  194. package/dist/meeting/state.d.ts +0 -9
  195. package/dist/meeting/util.d.ts +0 -119
  196. package/dist/meeting/voicea-meeting.d.ts +0 -16
  197. package/dist/meeting-info/collection.d.ts +0 -20
  198. package/dist/meeting-info/index.d.ts +0 -69
  199. package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
  200. package/dist/meeting-info/request.d.ts +0 -22
  201. package/dist/meeting-info/util.d.ts +0 -2
  202. package/dist/meeting-info/utilv2.d.ts +0 -2
  203. package/dist/meetings/collection.d.ts +0 -40
  204. package/dist/meetings/index.d.ts +0 -390
  205. package/dist/meetings/meetings.types.d.ts +0 -4
  206. package/dist/meetings/request.d.ts +0 -27
  207. package/dist/meetings/util.d.ts +0 -18
  208. package/dist/member/index.d.ts +0 -160
  209. package/dist/member/member.types.js +0 -17
  210. package/dist/member/member.types.js.map +0 -1
  211. package/dist/member/types.d.ts +0 -32
  212. package/dist/member/util.d.ts +0 -2
  213. package/dist/members/collection.d.ts +0 -29
  214. package/dist/members/index.d.ts +0 -353
  215. package/dist/members/request.d.ts +0 -114
  216. package/dist/members/types.d.ts +0 -25
  217. package/dist/members/util.d.ts +0 -215
  218. package/dist/metrics/config.js +0 -276
  219. package/dist/metrics/config.js.map +0 -1
  220. package/dist/metrics/constants.d.ts +0 -70
  221. package/dist/metrics/index.d.ts +0 -45
  222. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  223. package/dist/multistream/receiveSlot.d.ts +0 -68
  224. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  225. package/dist/multistream/remoteMedia.d.ts +0 -72
  226. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  227. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  228. package/dist/multistream/sendSlotManager.d.ts +0 -69
  229. package/dist/networkQualityMonitor/index.d.ts +0 -70
  230. package/dist/peer-connection-manager/index.js +0 -671
  231. package/dist/peer-connection-manager/index.js.map +0 -1
  232. package/dist/peer-connection-manager/util.js +0 -109
  233. package/dist/peer-connection-manager/util.js.map +0 -1
  234. package/dist/personal-meeting-room/index.d.ts +0 -47
  235. package/dist/personal-meeting-room/request.d.ts +0 -14
  236. package/dist/personal-meeting-room/util.d.ts +0 -2
  237. package/dist/reachability/clusterReachability.d.ts +0 -109
  238. package/dist/reachability/index.d.ts +0 -105
  239. package/dist/reachability/request.d.ts +0 -39
  240. package/dist/reachability/util.d.ts +0 -8
  241. package/dist/reactions/constants.d.ts +0 -3
  242. package/dist/reactions/reactions.d.ts +0 -4
  243. package/dist/reactions/reactions.type.d.ts +0 -52
  244. package/dist/reconnection-manager/index.d.ts +0 -136
  245. package/dist/recording-controller/enums.d.ts +0 -7
  246. package/dist/recording-controller/index.d.ts +0 -207
  247. package/dist/recording-controller/util.d.ts +0 -14
  248. package/dist/roap/collection.js +0 -62
  249. package/dist/roap/collection.js.map +0 -1
  250. package/dist/roap/handler.js +0 -275
  251. package/dist/roap/handler.js.map +0 -1
  252. package/dist/roap/index.d.ts +0 -86
  253. package/dist/roap/request.d.ts +0 -39
  254. package/dist/roap/state.js +0 -126
  255. package/dist/roap/state.js.map +0 -1
  256. package/dist/roap/turnDiscovery.d.ts +0 -155
  257. package/dist/roap/util.js +0 -75
  258. package/dist/roap/util.js.map +0 -1
  259. package/dist/rtcMetrics/constants.d.ts +0 -4
  260. package/dist/rtcMetrics/index.d.ts +0 -61
  261. package/dist/statsAnalyzer/global.d.ts +0 -36
  262. package/dist/statsAnalyzer/global.js +0 -126
  263. package/dist/statsAnalyzer/global.js.map +0 -1
  264. package/dist/statsAnalyzer/index.d.ts +0 -217
  265. package/dist/statsAnalyzer/index.js +0 -1013
  266. package/dist/statsAnalyzer/index.js.map +0 -1
  267. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
  268. package/dist/statsAnalyzer/mqaUtil.js +0 -179
  269. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  270. package/dist/transcription/index.d.ts +0 -64
  271. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  272. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  273. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  274. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  275. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  276. package/dist/webinar/collection.d.ts +0 -16
  277. package/dist/webinar/index.d.ts +0 -5
@@ -345,6 +345,22 @@ describe('plugin-meetings', () => {
345
345
  });
346
346
  });
347
347
 
348
+ describe('#_toggleIpv6BackendNativeSupport', () => {
349
+ it('should have _toggleIpv6BackendNativeSupport', () => {
350
+ assert.equal(typeof webex.meetings._toggleIpv6BackendNativeSupport, 'function');
351
+ });
352
+
353
+ describe('success', () => {
354
+ it('should update meetings config accordingly', () => {
355
+ webex.meetings._toggleIpv6BackendNativeSupport(true);
356
+ assert.equal(webex.meetings.config.backendIpv6NativeSupport, true);
357
+
358
+ webex.meetings._toggleIpv6BackendNativeSupport(false);
359
+ assert.equal(webex.meetings.config.backendIpv6NativeSupport, false);
360
+ });
361
+ });
362
+ });
363
+
348
364
  describe('Public API Contracts', () => {
349
365
  describe('#register', () => {
350
366
  it('emits an event and resolves when register succeeds', async () => {
@@ -2061,6 +2077,21 @@ describe('plugin-meetings', () => {
2061
2077
  ]);
2062
2078
  });
2063
2079
 
2080
+ it('should handle failure to get user information if scopes are insufficient', async () => {
2081
+ loggerProxySpy = sinon.spy(LoggerProxy.logger, 'error');
2082
+ Object.assign(webex.people, {
2083
+ _getMe: sinon.stub().returns(Promise.reject()),
2084
+ });
2085
+
2086
+ await webex.meetings.fetchUserPreferredWebexSite();
2087
+
2088
+ assert.equal(webex.meetings.preferredWebexSite, '');
2089
+ assert.calledOnceWithExactly(
2090
+ loggerProxySpy,
2091
+ 'Failed to retrieve user information. No preferredWebexSite will be set'
2092
+ );
2093
+ });
2094
+
2064
2095
  const setup = ({me = { type: 'validuser'}, user} = {}) => {
2065
2096
  loggerProxySpy = sinon.spy(LoggerProxy.logger, 'error');
2066
2097
  assert.deepEqual(webex.internal.services._getCatalog().getAllowedDomains(), []);
@@ -2077,7 +2108,7 @@ describe('plugin-meetings', () => {
2077
2108
 
2078
2109
  Object.assign(webex.people, {
2079
2110
  _getMe: sinon.stub().returns(Promise.resolve(me)),
2080
- });
2111
+ });
2081
2112
  };
2082
2113
 
2083
2114
  it('should not call request.getMeetingPreferences if user is a guest', async () => {
@@ -660,17 +660,20 @@ describe('plugin-meetings', () => {
660
660
  resultPromise,
661
661
  spies,
662
662
  expectedRequestingMemberId,
663
- expectedLocusUrl
663
+ expectedLocusUrl,
664
+ expectedRoles,
664
665
  ) => {
665
666
  await assert.isFulfilled(resultPromise);
666
667
  assert.calledOnceWithExactly(
667
668
  spies.generateLowerAllHandsMemberOptions,
668
669
  expectedRequestingMemberId,
669
- expectedLocusUrl
670
+ expectedLocusUrl,
671
+ expectedRoles,
670
672
  );
671
673
  assert.calledOnceWithExactly(spies.lowerAllHandsMember, {
672
674
  requestingParticipantId: expectedRequestingMemberId,
673
675
  locusUrl: expectedLocusUrl,
676
+ ...(expectedRoles !== undefined && { roles: expectedRoles })
674
677
  });
675
678
  assert.strictEqual(resultPromise, spies.lowerAllHandsMember.getCall(0).returnValue);
676
679
  };
@@ -707,6 +710,26 @@ describe('plugin-meetings', () => {
707
710
 
708
711
  await checkValid(resultPromise, spies, requestingMemberId, url1);
709
712
  });
713
+
714
+ it('should make the correct request when called with valid requestingMemberId and roles', async () => {
715
+ const requestingMemberId = 'test-member-id';
716
+ const roles = ['panelist', 'attendee'];
717
+ const { members, spies } = setup('test-locus-url');
718
+
719
+ const resultPromise = members.lowerAllHands(requestingMemberId, roles);
720
+
721
+ await checkValid(resultPromise, spies, requestingMemberId, 'test-locus-url', roles);
722
+ });
723
+
724
+ it('should handle an empty roles array correctly', async () => {
725
+ const requestingMemberId = 'test-member-id';
726
+ const roles = [];
727
+ const { members, spies } = setup('test-locus-url');
728
+
729
+ const resultPromise = members.lowerAllHands(requestingMemberId, roles);
730
+
731
+ await checkValid(resultPromise, spies, requestingMemberId, 'test-locus-url', roles);
732
+ });
710
733
  });
711
734
 
712
735
  describe('#editDisplayName', () => {
@@ -225,7 +225,7 @@ describe('plugin-meetings', () => {
225
225
  });
226
226
 
227
227
  describe('#assignRolesMember', () => {
228
- it('sends a PATCH to the locus endpoint', async () => {
228
+ it('sends a assignRolesMember PATCH to the locus endpoint', async () => {
229
229
  const locusUrl = url1;
230
230
  const memberId = 'test1';
231
231
  const roles = [
@@ -255,7 +255,7 @@ describe('plugin-meetings', () => {
255
255
  });
256
256
 
257
257
  describe('#raiseHand', () => {
258
- it('sends a PATCH to the locus endpoint', async () => {
258
+ it('sends a raiseOrLowerHandMember PATCH to the locus endpoint', async () => {
259
259
  const locusUrl = url1;
260
260
  const memberId = 'test1';
261
261
 
@@ -319,7 +319,7 @@ describe('plugin-meetings', () => {
319
319
  assert.strictEqual(result, requestResponse);
320
320
  });
321
321
 
322
- it('sends a PATCH to the locus endpoint', async () => {
322
+ it('sends a lowerAllHandsMember PATCH to the locus endpoint', async () => {
323
323
  const locusUrl = url1;
324
324
  const memberId = 'test1';
325
325
 
@@ -348,6 +348,40 @@ describe('plugin-meetings', () => {
348
348
  },
349
349
  });
350
350
  });
351
+
352
+ it('sends a lowerAllHandsMember PATCH to the locus endpoint with roles', async () => {
353
+ const locusUrl = url1;
354
+ const memberId = 'test1';
355
+ const roles = ['attendee'];
356
+
357
+ const options = {
358
+ requestingParticipantId: memberId,
359
+ locusUrl,
360
+ roles,
361
+ };
362
+
363
+ const getRequestParamsSpy = sandbox.spy(membersUtil, 'getLowerAllHandsMemberRequestParams');
364
+
365
+ await membersRequest.lowerAllHandsMember(options);
366
+
367
+ assert.calledOnceWithExactly(getRequestParamsSpy, {
368
+ requestingParticipantId: memberId,
369
+ locusUrl: url1,
370
+ roles: ['attendee'],
371
+ });
372
+
373
+ checkRequest({
374
+ method: 'PATCH',
375
+ uri: `${locusUrl}/controls`,
376
+ body: {
377
+ hand: {
378
+ raised: false,
379
+ roles: ['attendee'],
380
+ },
381
+ requestingParticipantId: memberId,
382
+ },
383
+ });
384
+ });
351
385
  });
352
386
 
353
387
  describe('#editDisplayName', () => {
@@ -101,7 +101,7 @@ describe('plugin-meetings', () => {
101
101
  });
102
102
  });
103
103
  describe('#generateLowerAllHandsMemberOptions', () => {
104
- it('returns the correct options', () => {
104
+ it('returns the correct options without roles', () => {
105
105
  const requestingParticipantId = 'test';
106
106
  const locusUrl = 'urlTest1';
107
107
 
@@ -113,6 +113,20 @@ describe('plugin-meetings', () => {
113
113
  }
114
114
  );
115
115
  });
116
+ it('returns the correct options with roles', () => {
117
+ const requestingParticipantId = 'test';
118
+ const locusUrl = 'urlTest1';
119
+ const roles = ['panelist'];
120
+
121
+ assert.deepEqual(
122
+ MembersUtil.generateLowerAllHandsMemberOptions(requestingParticipantId, locusUrl, roles),
123
+ {
124
+ requestingParticipantId,
125
+ locusUrl,
126
+ roles,
127
+ }
128
+ );
129
+ });
116
130
  });
117
131
  describe('#generateEditDisplayNameMemberOptions', () => {
118
132
  it('returns the correct options', () => {
@@ -7,7 +7,7 @@ import {RemoteMedia, RemoteMediaEvents} from '@webex/plugin-meetings/src/multist
7
7
  import {ReceiveSlotEvents} from '@webex/plugin-meetings/src/multistream/receiveSlot';
8
8
  import sinon from 'sinon';
9
9
  import {assert} from '@webex/test-helper-chai';
10
- import { forEach } from 'lodash';
10
+ import {forEach} from 'lodash';
11
11
 
12
12
  describe('RemoteMedia', () => {
13
13
  let remoteMedia;
@@ -227,12 +227,26 @@ describe('RemoteMedia', () => {
227
227
  });
228
228
 
229
229
  describe('setSizeHint()', () => {
230
-
231
230
  it('works if the receive slot is undefined', () => {
232
231
  remoteMedia.receiveSlot = undefined;
233
232
  remoteMedia.setSizeHint(100, 100);
234
233
  });
235
234
 
235
+ forEach(
236
+ [
237
+ {width: 0, height: 0},
238
+ {width: 135, height: 0},
239
+ {width: 0, height: 240},
240
+ ],
241
+ ({width, height}) => {
242
+ it(`skip updating the max fs when applied ${width}:${height}`, () => {
243
+ remoteMedia.setSizeHint(width, height);
244
+
245
+ assert.notCalled(fakeReceiveSlot.setMaxFs);
246
+ });
247
+ }
248
+ );
249
+
236
250
  forEach(
237
251
  [
238
252
  {height: 134, fs: 60},
@@ -1234,7 +1234,7 @@ describe('gatherReachability', () => {
1234
1234
  assert.equal(receivedEvents['done'], 1);
1235
1235
 
1236
1236
  // and that ip network detection was started
1237
- assert.calledOnceWithExactly(webex.internal.device.ipNetworkDetector.detect);
1237
+ assert.calledOnceWithExactly(webex.internal.device.ipNetworkDetector.detect, true);
1238
1238
 
1239
1239
  // finally, check the metrics - they should contain values from ipNetworkDetector
1240
1240
  assert.calledWith(Metrics.sendBehavioralMetric, 'js_sdk_reachability_completed', {
@@ -57,18 +57,23 @@ describe('plugin-meetings/reachability', () => {
57
57
  }
58
58
  }));
59
59
 
60
+ webex.config.meetings.reachabilityGetClusterTimeout = 3000;
61
+
60
62
  const res = await reachabilityRequest.getClusters(IP_VERSION.only_ipv4);
61
63
  const requestParams = webex.request.getCall(0).args[0];
62
64
 
63
- assert.equal(requestParams.method, 'GET');
64
- assert.equal(requestParams.resource, `clusters`);
65
- assert.equal(requestParams.api, 'calliopeDiscovery');
66
- assert.equal(requestParams.shouldRefreshAccessToken, false);
67
-
68
- assert.deepEqual(requestParams.qs, {
69
- JCSupport: 1,
70
- ipver: 4,
65
+ assert.deepEqual(requestParams, {
66
+ method: 'GET',
67
+ resource: `clusters`,
68
+ api: 'calliopeDiscovery',
69
+ shouldRefreshAccessToken: false,
70
+ qs: {
71
+ JCSupport: 1,
72
+ ipver: 4,
73
+ },
74
+ timeout: 3000,
71
75
  });
76
+
72
77
  assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
73
78
  assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
74
79
  assert.calledOnceWithExactly(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency, sinon.match.func, 'internal.get.cluster.time');
@@ -29,32 +29,98 @@ describe('plugin-meetings', () => {
29
29
  });
30
30
  });
31
31
 
32
- describe('#webcastUrlUpdate', () => {
33
- it('sets the webcast url', () => {
34
- webinar.webcastUrlUpdate('newUrl');
32
+ describe('#updateWebcastUrl', () => {
33
+ it('sets the webcast instance url', () => {
34
+ webinar.updateWebcastUrl({resources: {webcastInstance: {url:'newUrl'}}});
35
35
 
36
- assert.equal(webinar.webcastUrl, 'newUrl');
36
+ assert.equal(webinar.webcastInstanceUrl, 'newUrl');
37
37
  });
38
38
  });
39
39
 
40
- describe('#webinarAttendeesSearchingUrlUpdate', () => {
41
- it('sets the webinarAttendeesSearching url', () => {
42
- webinar.webinarAttendeesSearchingUrlUpdate('newUrl');
43
-
44
- assert.equal(webinar.webinarAttendeesSearchingUrl, 'newUrl');
45
- });
46
- });
47
40
 
48
41
  describe('#updateCanManageWebcast', () => {
49
- it('update canManageWebcast', () => {
50
- webinar.updateCanManageWebcast(true);
42
+ it('sets the webcast instance url when valid', () => {
43
+ webinar.updateWebcastUrl({resources: {webcastInstance: {url:'newUrl'}}});
44
+ assert.equal(webinar.webcastInstanceUrl, 'newUrl', 'webcast instance URL should be updated');
45
+ });
51
46
 
52
- assert.equal(webinar.canManageWebcast, true);
47
+ it('handles missing resources gracefully', () => {
48
+ webinar.updateWebcastUrl({});
49
+ assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
50
+ });
53
51
 
54
- webinar.updateCanManageWebcast(false);
52
+ it('handles missing webcastInstance gracefully', () => {
53
+ webinar.updateWebcastUrl({resources: {}});
54
+ assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
55
+ });
55
56
 
56
- assert.equal(webinar.canManageWebcast, false);
57
+ it('handles missing URL gracefully', () => {
58
+ webinar.updateWebcastUrl({resources: {webcastInstance: {}}});
59
+ assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
57
60
  });
58
61
  });
62
+
63
+ describe('#updateRoleChanged', () => {
64
+ it('updates roles when promoted from attendee to panelist', () => {
65
+ const payload = {
66
+ oldRoles: ['ATTENDEE'],
67
+ newRoles: ['PANELIST']
68
+ };
69
+
70
+ const result = webinar.updateRoleChanged(payload);
71
+
72
+ assert.equal(webinar.selfIsPanelist, true, 'self should be a panelist');
73
+ assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
74
+ assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
75
+ assert.equal(result.isPromoted, true, 'should indicate promotion');
76
+ assert.equal(result.isDemoted, false, 'should not indicate demotion');
77
+ });
78
+
79
+ it('updates roles when demoted from panelist to attendee', () => {
80
+ const payload = {
81
+ oldRoles: ['PANELIST'],
82
+ newRoles: ['ATTENDEE']
83
+ };
84
+
85
+ const result = webinar.updateRoleChanged(payload);
86
+
87
+ assert.equal(webinar.selfIsPanelist, false, 'self should not be a panelist');
88
+ assert.equal(webinar.selfIsAttendee, true, 'self should be an attendee');
89
+ assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
90
+ assert.equal(result.isPromoted, false, 'should not indicate promotion');
91
+ assert.equal(result.isDemoted, true, 'should indicate demotion');
92
+ });
93
+
94
+ it('updates roles when promoted to moderator', () => {
95
+ const payload = {
96
+ oldRoles: ['PANELIST'],
97
+ newRoles: ['MODERATOR']
98
+ };
99
+
100
+ const result = webinar.updateRoleChanged(payload);
101
+
102
+ assert.equal(webinar.selfIsPanelist, false, 'self should not be a panelist');
103
+ assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
104
+ assert.equal(webinar.canManageWebcast, true, 'self should have manage webcast capability');
105
+ assert.equal(result.isPromoted, false, 'should not indicate promotion');
106
+ assert.equal(result.isDemoted, false, 'should not indicate demotion');
107
+ });
108
+
109
+ it('updates roles when unchanged (remains as panelist)', () => {
110
+ const payload = {
111
+ oldRoles: ['PANELIST'],
112
+ newRoles: ['PANELIST']
113
+ };
114
+
115
+ const result = webinar.updateRoleChanged(payload);
116
+
117
+ assert.equal(webinar.selfIsPanelist, true, 'self should remain a panelist');
118
+ assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
119
+ assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
120
+ assert.equal(result.isPromoted, false, 'should not indicate promotion');
121
+ assert.equal(result.isDemoted, false, 'should not indicate demotion');
122
+ });
123
+ });
124
+
59
125
  })
60
126
  })
@@ -1,42 +0,0 @@
1
- import { ANNOTATION_POLICY } from './constants';
2
- /**
3
- * Type for an StrokeData Object
4
- */
5
- type StrokeData = {
6
- deviceId: string;
7
- toUserId: string;
8
- requesterId: string;
9
- content: string;
10
- shareInstanceId: string;
11
- encryptionKeyUrl: string;
12
- version: string;
13
- };
14
- type RequestData = {
15
- toUserId: string;
16
- toDeviceUrl: string;
17
- shareInstanceId: string;
18
- };
19
- type CommandRequestBody = {
20
- actionType: string;
21
- resourceType: string;
22
- shareInstanceId: string;
23
- receivers?: any[];
24
- };
25
- /**
26
- * Type for an annotation Object include annotation version and privilege
27
- */
28
- type AnnotationInfo = {
29
- version: string;
30
- policy: ANNOTATION_POLICY;
31
- };
32
- interface IAnnotationChannel {
33
- acceptRequest: (approval: any) => undefined | Promise<void>;
34
- declineRequest: (approval: any) => undefined | Promise<void>;
35
- closeAnnotation: (requestData: RequestData) => undefined | Promise<void>;
36
- approveAnnotation: (requestData: RequestData) => undefined | Promise<void>;
37
- cancelApproveAnnotation: (requestData: RequestData, approval: any) => undefined | Promise<void>;
38
- sendStrokeData: (strokeData: StrokeData) => void;
39
- approvalUrlUpdate: (approvalUrl: string) => void;
40
- locusUrlUpdate: (locusUrl: string) => void;
41
- }
42
- export type { StrokeData, RequestData, CommandRequestBody, IAnnotationChannel, AnnotationInfo };
@@ -1,31 +0,0 @@
1
- export declare const EVENT_TRIGGERS: {
2
- ANNOTATION_STROKE_DATA: string;
3
- ANNOTATION_COMMAND: string;
4
- };
5
- export declare const ANNOTATION_RESOURCE_TYPE = "AnnotationOnShare";
6
- export declare const ANNOTATION_RELAY_TYPES: {
7
- ANNOTATION_CLIENT: string;
8
- };
9
- export declare const ANNOTATION_STATUS: {
10
- NO_ANNOTATION: string;
11
- RUNNING_ANNOTATION: string;
12
- };
13
- export declare enum ANNOTATION_POLICY {
14
- ANYONE_CAN_ANNOTATE = "AnyoneCanAnnotate",
15
- APPROVAL = "Approval",
16
- ANNOTATION_NOT_ALLOWED = "AnnotationNotAllowed"
17
- }
18
- export declare const ANNOTATION_REQUEST_TYPE: {
19
- ANNOTATION_MESSAGE: string;
20
- };
21
- export declare const enum ANNOTATION_ACTION_TYPE {
22
- REQUESTED = "REQUESTED",
23
- ACCEPTED = "ACCEPTED",
24
- DECLINED = "DECLINED",
25
- OFFERED = "OFFERED",
26
- CANCELED = "CANCELED",
27
- EXPIRED = "EXPIRED",
28
- REVOKED = "REVOKED",
29
- CLOSED = "CLOSED"
30
- }
31
- export declare const ANNOTATION = "annotation";
@@ -1,117 +0,0 @@
1
- import { WebexPlugin } from '@webex/webex-core';
2
- import { StrokeData, RequestData, IAnnotationChannel } from './annotation.types';
3
- /**
4
- * @description Annotation to handle LLM and Mercury message and locus API
5
- * @class
6
- */
7
- declare class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
8
- namespace: string;
9
- private seqNum;
10
- hasSubscribedToEvents: boolean;
11
- approvalUrl: string;
12
- locusUrl: string;
13
- deviceUrl: string;
14
- /**
15
- * Initializes annotation module
16
- */
17
- constructor(...args: any[]);
18
- /**
19
- * Process Stroke Data
20
- * @param {object} data
21
- * @returns {void}
22
- */
23
- private processStrokeMessage;
24
- /** bind all events from mercury
25
- * @param {Object} e
26
- * @returns {undefined}
27
- */
28
- private eventCommandProcessor;
29
- /** bind all events from llm
30
- * @param {Object} e
31
- * @returns {undefined}
32
- */
33
- private eventDataProcessor;
34
- /**
35
- * Listen to websocket messages
36
- * @returns {undefined}
37
- */
38
- private listenToEvents;
39
- /**
40
- * set locusUrl
41
- * @param {string} locusUrl
42
- * @returns {void}
43
- */
44
- locusUrlUpdate(locusUrl: string): void;
45
- /**
46
- * set approved url
47
- * @param {string} approvalUrl
48
- * @returns {void}
49
- */
50
- approvalUrlUpdate(approvalUrl: string): void;
51
- /**
52
- * accept request
53
- * @param {object} approval
54
- * @returns {Promise}
55
- */
56
- acceptRequest(approval: any): any;
57
- /**
58
- * presenter declined request annotation
59
- * @param {approval} approval
60
- * @returns {Promise}
61
- */
62
- declineRequest(approval: any): any;
63
- /**
64
- * request approved annotation
65
- * @param {RequestData} requestData
66
- * @returns {Promise}
67
- */
68
- approveAnnotation(requestData: RequestData): Promise<void>;
69
- /**
70
- * cancel approved annotation
71
- * @param {object} requestData
72
- * @param {object} approval
73
- * @returns {Promise}
74
- */
75
- cancelApproveAnnotation(requestData: RequestData, approval: any): any;
76
- /**
77
- * close annotation
78
- * @param {object} requestData
79
- * @returns {Promise}
80
- */
81
- closeAnnotation(requestData: RequestData): Promise<void>;
82
- /**
83
- * send annotation command
84
- * @param {ANNOTATION_ACTION_TYPE} actionType
85
- * @param {RequestData} requestData
86
- * @returns {Promise}
87
- */
88
- private sendAnnotationAction;
89
- /**
90
- * decrypt data
91
- * @param {string} encryptionKeyUrl
92
- * @param {string} content encrypted content
93
- * @returns {string} decrypted content
94
- */
95
- private decryptContent;
96
- /**
97
- * encrypt data
98
- * @param {string} encryptionKeyUrl
99
- * @param {string} content original content
100
- * @returns {string} encrypted content
101
- */
102
- private encryptContent;
103
- /**
104
- * Sends stroke data to presenter
105
- * @param {StrokeData} strokeData
106
- * @returns {void}
107
- */
108
- sendStrokeData: (strokeData: StrokeData) => void;
109
- /**
110
- * private encrypted the strokes data
111
- * @param {string} encryptedContent
112
- * @param {StrokeData} strokeData
113
- * @returns {void}
114
- */
115
- private publishEncrypted;
116
- }
117
- export default AnnotationChannel;
@@ -1,8 +0,0 @@
1
- /*!
2
- * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
3
- */
4
- /**
5
- * @class
6
- */
7
- declare const Breakout: any;
8
- export default Breakout;
@@ -1,5 +0,0 @@
1
- /*!
2
- * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
3
- */
4
- declare const BreakoutCollection: any;
5
- export default BreakoutCollection;
@@ -1,15 +0,0 @@
1
- /**
2
- * Extended Error object to signify breakout related errors
3
- */
4
- export default class BreakoutEditLockedError extends Error {
5
- code: any;
6
- error: any;
7
- sdkMessage: any;
8
- /**
9
- *
10
- * @constructor
11
- * @param {String} [message]
12
- * @param {Object} [error]
13
- */
14
- constructor(message?: string, error?: any);
15
- }
@@ -1,8 +0,0 @@
1
- import { ClientEvent } from '@webex/internal-plugin-metrics';
2
- declare const breakoutEvent: {
3
- onBreakoutMoveRequest: (eventInfo: any, submitClientEvent: any) => void;
4
- onBreakoutMoveResponse: (eventInfo: any, submitClientEvent: any) => void;
5
- onBreakoutJoinResponse: (eventInfo: any, submitClientEvent: any) => void;
6
- postMoveCallAnalyzer: (event: ClientEvent['name'], eventInfo: any, submitClientEvent: any) => void;
7
- };
8
- export default breakoutEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * @class Breakouts
3
- */
4
- declare const Breakouts: any;
5
- export default Breakouts;
@@ -1,22 +0,0 @@
1
- import { StatelessWebexPlugin } from '@webex/webex-core';
2
- /**
3
- * @class BreakoutRequest
4
- */
5
- export default class BreakoutRequest extends StatelessWebexPlugin {
6
- /**
7
- * Broadcast message to all breakout session's participants
8
- * @param {String} url
9
- * @param {String} message
10
- * @param {Object} options
11
- * @param {string} groupId
12
- * @param {string} sessionId
13
- * @returns {Promise}
14
- */
15
- broadcast({ url, message, options, groupId, sessionId, }: {
16
- url: string;
17
- message: string;
18
- options?: object;
19
- groupId: string;
20
- sessionId?: string;
21
- }): any;
22
- }
@@ -1,15 +0,0 @@
1
- export declare const getBroadcastRoles: (options: any) => string[];
2
- /**
3
- * Deals with all kinds of errors of breakout service
4
- * @param {object} error // one of the breakout service error
5
- * @param {string} position // position of the error occur
6
- * @returns {object}
7
- */
8
- export declare const boServiceErrorHandler: (error: any, position: string) => any;
9
- /**
10
- *
11
- * @param {object} breakout
12
- * @param {string} newSessionType
13
- * @returns {boolean}
14
- */
15
- export declare const isSessionTypeChangedFromSessionToMain: (breakout: any, newSessionType: any) => boolean;