@webex/plugin-meetings 3.8.1 → 3.9.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 (290) hide show
  1. package/README.md +26 -13
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/constants.js +32 -3
  5. package/dist/constants.js.map +1 -1
  6. package/dist/controls-options-manager/enums.js +1 -0
  7. package/dist/controls-options-manager/enums.js.map +1 -1
  8. package/dist/controls-options-manager/types.js.map +1 -1
  9. package/dist/controls-options-manager/util.js +26 -0
  10. package/dist/controls-options-manager/util.js.map +1 -1
  11. package/dist/interpretation/index.js +1 -1
  12. package/dist/interpretation/siLanguage.js +1 -1
  13. package/dist/locus-info/controlsUtils.js +11 -3
  14. package/dist/locus-info/controlsUtils.js.map +1 -1
  15. package/dist/locus-info/index.js +68 -84
  16. package/dist/locus-info/index.js.map +1 -1
  17. package/dist/media/index.js +2 -2
  18. package/dist/media/index.js.map +1 -1
  19. package/dist/meeting/brbState.js +17 -14
  20. package/dist/meeting/brbState.js.map +1 -1
  21. package/dist/meeting/in-meeting-actions.js +11 -1
  22. package/dist/meeting/in-meeting-actions.js.map +1 -1
  23. package/dist/meeting/index.js +428 -253
  24. package/dist/meeting/index.js.map +1 -1
  25. package/dist/meeting/request.js +19 -0
  26. package/dist/meeting/request.js.map +1 -1
  27. package/dist/meeting/request.type.js.map +1 -1
  28. package/dist/{rtcMetrics/constants.js → meeting/type.js} +1 -5
  29. package/dist/meeting/type.js.map +1 -0
  30. package/dist/meeting/util.js +68 -2
  31. package/dist/meeting/util.js.map +1 -1
  32. package/dist/meetings/index.js +35 -33
  33. package/dist/meetings/index.js.map +1 -1
  34. package/dist/members/index.js +11 -9
  35. package/dist/members/index.js.map +1 -1
  36. package/dist/members/request.js +3 -3
  37. package/dist/members/request.js.map +1 -1
  38. package/dist/members/util.js +18 -6
  39. package/dist/members/util.js.map +1 -1
  40. package/dist/metrics/constants.js +1 -0
  41. package/dist/metrics/constants.js.map +1 -1
  42. package/dist/multistream/mediaRequestManager.js +1 -1
  43. package/dist/multistream/mediaRequestManager.js.map +1 -1
  44. package/dist/multistream/remoteMedia.js +34 -5
  45. package/dist/multistream/remoteMedia.js.map +1 -1
  46. package/dist/multistream/remoteMediaGroup.js +42 -2
  47. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  48. package/dist/multistream/sendSlotManager.js +32 -2
  49. package/dist/multistream/sendSlotManager.js.map +1 -1
  50. package/dist/reachability/index.js +5 -10
  51. package/dist/reachability/index.js.map +1 -1
  52. package/dist/types/constants.d.ts +28 -0
  53. package/dist/types/controls-options-manager/enums.d.ts +2 -1
  54. package/dist/types/controls-options-manager/types.d.ts +4 -1
  55. package/dist/types/locus-info/index.d.ts +0 -9
  56. package/dist/types/meeting/brbState.d.ts +0 -1
  57. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  58. package/dist/types/meeting/index.d.ts +47 -19
  59. package/dist/types/meeting/request.d.ts +9 -1
  60. package/dist/types/meeting/request.type.d.ts +74 -0
  61. package/dist/types/meeting/type.d.ts +9 -0
  62. package/dist/types/meeting/util.d.ts +3 -0
  63. package/dist/types/members/index.d.ts +10 -7
  64. package/dist/types/members/request.d.ts +1 -1
  65. package/dist/types/members/util.d.ts +7 -3
  66. package/dist/types/metrics/constants.d.ts +1 -0
  67. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  68. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  69. package/dist/types/multistream/sendSlotManager.d.ts +16 -0
  70. package/dist/types/reachability/index.d.ts +2 -2
  71. package/dist/webinar/index.js +1 -1
  72. package/package.json +24 -25
  73. package/src/constants.ts +32 -2
  74. package/src/controls-options-manager/enums.ts +1 -0
  75. package/src/controls-options-manager/types.ts +6 -1
  76. package/src/controls-options-manager/util.ts +31 -0
  77. package/src/locus-info/controlsUtils.ts +15 -0
  78. package/src/locus-info/index.ts +88 -82
  79. package/src/media/index.ts +2 -2
  80. package/src/meeting/brbState.ts +13 -9
  81. package/src/meeting/in-meeting-actions.ts +21 -0
  82. package/src/meeting/index.ts +254 -71
  83. package/src/meeting/request.ts +16 -0
  84. package/src/meeting/request.type.ts +64 -0
  85. package/src/meeting/type.ts +9 -0
  86. package/src/meeting/util.ts +73 -2
  87. package/src/meetings/index.ts +3 -2
  88. package/src/members/index.ts +13 -10
  89. package/src/members/request.ts +2 -2
  90. package/src/members/util.ts +16 -4
  91. package/src/metrics/constants.ts +1 -0
  92. package/src/multistream/mediaRequestManager.ts +7 -7
  93. package/src/multistream/remoteMedia.ts +34 -4
  94. package/src/multistream/remoteMediaGroup.ts +37 -2
  95. package/src/multistream/sendSlotManager.ts +34 -2
  96. package/src/reachability/index.ts +5 -13
  97. package/test/unit/spec/controls-options-manager/util.js +58 -0
  98. package/test/unit/spec/locus-info/controlsUtils.js +52 -0
  99. package/test/unit/spec/locus-info/index.js +218 -82
  100. package/test/unit/spec/media/index.ts +107 -0
  101. package/test/unit/spec/meeting/brbState.ts +23 -4
  102. package/test/unit/spec/meeting/in-meeting-actions.ts +10 -0
  103. package/test/unit/spec/meeting/index.js +901 -84
  104. package/test/unit/spec/meeting/request.js +71 -0
  105. package/test/unit/spec/meeting/utils.js +122 -1
  106. package/test/unit/spec/meetings/index.js +2 -0
  107. package/test/unit/spec/members/index.js +68 -9
  108. package/test/unit/spec/members/request.js +2 -2
  109. package/test/unit/spec/members/utils.js +27 -7
  110. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  111. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  112. package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
  113. package/test/unit/spec/reachability/index.ts +2 -6
  114. package/dist/annotation/annotation.types.d.ts +0 -42
  115. package/dist/annotation/constants.d.ts +0 -31
  116. package/dist/annotation/index.d.ts +0 -117
  117. package/dist/breakouts/breakout.d.ts +0 -8
  118. package/dist/breakouts/collection.d.ts +0 -5
  119. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  120. package/dist/breakouts/events.d.ts +0 -8
  121. package/dist/breakouts/index.d.ts +0 -5
  122. package/dist/breakouts/request.d.ts +0 -22
  123. package/dist/breakouts/utils.d.ts +0 -15
  124. package/dist/common/browser-detection.d.ts +0 -9
  125. package/dist/common/collection.d.ts +0 -48
  126. package/dist/common/config.d.ts +0 -2
  127. package/dist/common/errors/captcha-error.d.ts +0 -15
  128. package/dist/common/errors/intent-to-join.d.ts +0 -16
  129. package/dist/common/errors/join-meeting.d.ts +0 -17
  130. package/dist/common/errors/media.d.ts +0 -15
  131. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  132. package/dist/common/errors/parameter.d.ts +0 -15
  133. package/dist/common/errors/password-error.d.ts +0 -15
  134. package/dist/common/errors/permission.d.ts +0 -14
  135. package/dist/common/errors/reclaim-host-role-error.d.ts +0 -60
  136. package/dist/common/errors/reclaim-host-role-error.js +0 -158
  137. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  138. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  139. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  140. package/dist/common/errors/reconnection-in-progress.js +0 -35
  141. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  142. package/dist/common/errors/reconnection.d.ts +0 -15
  143. package/dist/common/errors/stats.d.ts +0 -15
  144. package/dist/common/errors/webex-errors.d.ts +0 -81
  145. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  146. package/dist/common/events/events-scope.d.ts +0 -17
  147. package/dist/common/events/events.d.ts +0 -12
  148. package/dist/common/events/trigger-proxy.d.ts +0 -2
  149. package/dist/common/events/util.d.ts +0 -2
  150. package/dist/common/logs/logger-config.d.ts +0 -2
  151. package/dist/common/logs/logger-proxy.d.ts +0 -2
  152. package/dist/common/logs/request.d.ts +0 -34
  153. package/dist/common/queue.d.ts +0 -32
  154. package/dist/config.d.ts +0 -73
  155. package/dist/constants.d.ts +0 -952
  156. package/dist/controls-options-manager/constants.d.ts +0 -4
  157. package/dist/controls-options-manager/enums.d.ts +0 -5
  158. package/dist/controls-options-manager/index.d.ts +0 -120
  159. package/dist/controls-options-manager/types.d.ts +0 -43
  160. package/dist/controls-options-manager/util.d.ts +0 -7
  161. package/dist/index.d.ts +0 -4
  162. package/dist/interceptors/index.d.ts +0 -2
  163. package/dist/interceptors/locusRetry.d.ts +0 -27
  164. package/dist/interpretation/collection.d.ts +0 -5
  165. package/dist/interpretation/index.d.ts +0 -5
  166. package/dist/interpretation/siLanguage.d.ts +0 -5
  167. package/dist/locus-info/controlsUtils.d.ts +0 -2
  168. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  169. package/dist/locus-info/fullState.d.ts +0 -2
  170. package/dist/locus-info/hostUtils.d.ts +0 -2
  171. package/dist/locus-info/index.d.ts +0 -269
  172. package/dist/locus-info/infoUtils.d.ts +0 -2
  173. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  174. package/dist/locus-info/parser.d.ts +0 -212
  175. package/dist/locus-info/selfUtils.d.ts +0 -2
  176. package/dist/media/index.d.ts +0 -32
  177. package/dist/media/properties.d.ts +0 -108
  178. package/dist/media/util.d.ts +0 -2
  179. package/dist/mediaQualityMetrics/config.d.ts +0 -233
  180. package/dist/mediaQualityMetrics/config.js +0 -513
  181. package/dist/mediaQualityMetrics/config.js.map +0 -1
  182. package/dist/meeting/effectsState.d.ts +0 -42
  183. package/dist/meeting/effectsState.js +0 -260
  184. package/dist/meeting/effectsState.js.map +0 -1
  185. package/dist/meeting/in-meeting-actions.d.ts +0 -79
  186. package/dist/meeting/index.d.ts +0 -1622
  187. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  188. package/dist/meeting/muteState.d.ts +0 -116
  189. package/dist/meeting/request.d.ts +0 -257
  190. package/dist/meeting/request.type.d.ts +0 -11
  191. package/dist/meeting/state.d.ts +0 -9
  192. package/dist/meeting/util.d.ts +0 -2
  193. package/dist/meeting/voicea-meeting.d.ts +0 -16
  194. package/dist/meeting-info/collection.d.ts +0 -20
  195. package/dist/meeting-info/index.d.ts +0 -57
  196. package/dist/meeting-info/meeting-info-v2.d.ts +0 -93
  197. package/dist/meeting-info/request.d.ts +0 -22
  198. package/dist/meeting-info/util.d.ts +0 -2
  199. package/dist/meeting-info/utilv2.d.ts +0 -2
  200. package/dist/meetings/collection.d.ts +0 -23
  201. package/dist/meetings/index.d.ts +0 -296
  202. package/dist/meetings/meetings.types.d.ts +0 -4
  203. package/dist/meetings/request.d.ts +0 -27
  204. package/dist/meetings/util.d.ts +0 -18
  205. package/dist/member/index.d.ts +0 -148
  206. package/dist/member/member.types.d.ts +0 -11
  207. package/dist/member/member.types.js +0 -18
  208. package/dist/member/member.types.js.map +0 -1
  209. package/dist/member/types.d.ts +0 -32
  210. package/dist/member/util.d.ts +0 -2
  211. package/dist/members/collection.d.ts +0 -24
  212. package/dist/members/index.d.ts +0 -308
  213. package/dist/members/request.d.ts +0 -58
  214. package/dist/members/types.d.ts +0 -25
  215. package/dist/members/util.d.ts +0 -2
  216. package/dist/metrics/config.d.ts +0 -169
  217. package/dist/metrics/config.js +0 -289
  218. package/dist/metrics/config.js.map +0 -1
  219. package/dist/metrics/constants.d.ts +0 -59
  220. package/dist/metrics/index.d.ts +0 -152
  221. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  222. package/dist/multistream/receiveSlot.d.ts +0 -68
  223. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  224. package/dist/multistream/remoteMedia.d.ts +0 -72
  225. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  226. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  227. package/dist/multistream/sendSlotManager.d.ts +0 -69
  228. package/dist/networkQualityMonitor/index.d.ts +0 -70
  229. package/dist/networkQualityMonitor/index.js +0 -226
  230. package/dist/networkQualityMonitor/index.js.map +0 -1
  231. package/dist/peer-connection-manager/index.d.ts +0 -6
  232. package/dist/peer-connection-manager/index.js +0 -671
  233. package/dist/peer-connection-manager/index.js.map +0 -1
  234. package/dist/peer-connection-manager/util.d.ts +0 -6
  235. package/dist/peer-connection-manager/util.js +0 -110
  236. package/dist/peer-connection-manager/util.js.map +0 -1
  237. package/dist/personal-meeting-room/index.d.ts +0 -47
  238. package/dist/personal-meeting-room/request.d.ts +0 -14
  239. package/dist/personal-meeting-room/util.d.ts +0 -2
  240. package/dist/reachability/clusterReachability.d.ts +0 -109
  241. package/dist/reachability/index.d.ts +0 -139
  242. package/dist/reachability/request.d.ts +0 -35
  243. package/dist/reachability/util.d.ts +0 -8
  244. package/dist/reactions/constants.d.ts +0 -3
  245. package/dist/reactions/reactions.d.ts +0 -4
  246. package/dist/reactions/reactions.type.d.ts +0 -32
  247. package/dist/reconnection-manager/index.d.ts +0 -112
  248. package/dist/recording-controller/enums.d.ts +0 -7
  249. package/dist/recording-controller/index.d.ts +0 -193
  250. package/dist/recording-controller/util.d.ts +0 -13
  251. package/dist/roap/collection.d.ts +0 -10
  252. package/dist/roap/collection.js +0 -63
  253. package/dist/roap/collection.js.map +0 -1
  254. package/dist/roap/handler.d.ts +0 -47
  255. package/dist/roap/handler.js +0 -279
  256. package/dist/roap/handler.js.map +0 -1
  257. package/dist/roap/index.d.ts +0 -116
  258. package/dist/roap/request.d.ts +0 -35
  259. package/dist/roap/state.d.ts +0 -9
  260. package/dist/roap/state.js +0 -127
  261. package/dist/roap/state.js.map +0 -1
  262. package/dist/roap/turnDiscovery.d.ts +0 -81
  263. package/dist/roap/util.d.ts +0 -2
  264. package/dist/roap/util.js +0 -76
  265. package/dist/roap/util.js.map +0 -1
  266. package/dist/rtcMetrics/constants.d.ts +0 -4
  267. package/dist/rtcMetrics/constants.js.map +0 -1
  268. package/dist/rtcMetrics/index.d.ts +0 -61
  269. package/dist/rtcMetrics/index.js +0 -197
  270. package/dist/rtcMetrics/index.js.map +0 -1
  271. package/dist/statsAnalyzer/global.d.ts +0 -118
  272. package/dist/statsAnalyzer/global.js +0 -127
  273. package/dist/statsAnalyzer/global.js.map +0 -1
  274. package/dist/statsAnalyzer/index.d.ts +0 -193
  275. package/dist/statsAnalyzer/index.js +0 -1019
  276. package/dist/statsAnalyzer/index.js.map +0 -1
  277. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -22
  278. package/dist/statsAnalyzer/mqaUtil.js +0 -181
  279. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  280. package/dist/transcription/index.d.ts +0 -64
  281. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  282. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  283. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  284. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  285. package/dist/types/rtcMetrics/index.d.ts +0 -71
  286. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  287. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  288. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  289. package/dist/webinar/collection.d.ts +0 -16
  290. package/dist/webinar/index.d.ts +0 -5
@@ -25,3 +25,67 @@ export type PostMeetingDataConsentOptions = {
25
25
  deviceUrl: string;
26
26
  selfId: string;
27
27
  };
28
+
29
+ export type StageCustomLogoPositions =
30
+ | 'LowerLeft'
31
+ | 'LowerMiddle'
32
+ | 'LowerRight'
33
+ | 'UpperLeft'
34
+ | 'UpperMiddle'
35
+ | 'UpperRight';
36
+
37
+ export type StageNameLabelType = 'Primary' | 'PrimaryInverted' | 'Secondary' | 'SecondaryInverted';
38
+
39
+ export type StageCustomBackground = {
40
+ url: string;
41
+ [others: string]: unknown;
42
+ };
43
+
44
+ export type StageCustomLogo = {
45
+ url: string;
46
+ position: StageCustomLogoPositions;
47
+ [others: string]: unknown;
48
+ };
49
+
50
+ export type StageCustomNameLabel = {
51
+ accentColor: string;
52
+ background: {color: string};
53
+ border: {color: string};
54
+ content: {displayName: {color: string}; subtitle: {color: string}};
55
+ decoration: {color: string};
56
+ fadeOut?: {delay: number};
57
+ type: StageNameLabelType;
58
+ [others: string]: unknown;
59
+ };
60
+
61
+ export type SetStageOptions = {
62
+ activeSpeakerProportion?: number;
63
+ customBackground?: StageCustomBackground;
64
+ customLogo?: StageCustomLogo;
65
+ customNameLabel?: StageCustomNameLabel;
66
+ importantParticipants?: {mainCsi: number; participantId: string}[];
67
+ lockAttendeeViewOnStage?: boolean;
68
+ showActiveSpeaker?: boolean;
69
+ };
70
+
71
+ export type SetStageVideoLayout = {
72
+ overrideDefault: true;
73
+ lockAttendeeViewOnStageOnly: boolean;
74
+ stageParameters: {
75
+ importantParticipants?: {participantId: string; mainCsi: number; order: number}[];
76
+ showActiveSpeaker: {show: boolean; order: number};
77
+ activeSpeakerProportion: number;
78
+ stageManagerType: number;
79
+ };
80
+ customLayouts?: {
81
+ background?: StageCustomBackground;
82
+ logo?: StageCustomLogo;
83
+ };
84
+ nameLabelStyle?: StageCustomNameLabel;
85
+ };
86
+
87
+ export type UnsetStageVideoLayout = {
88
+ overrideDefault: false;
89
+ };
90
+
91
+ export type SynchronizeVideoLayout = SetStageVideoLayout | UnsetStageVideoLayout;
@@ -0,0 +1,9 @@
1
+ export type Invitee = {
2
+ memberId: string;
3
+ emailAddress: string;
4
+ email: string;
5
+ phoneNumber: string;
6
+ roles: Array<string>;
7
+ skipEmailValidation?: boolean;
8
+ isInternalNumber?: boolean;
9
+ };
@@ -197,6 +197,17 @@ const MeetingUtil = {
197
197
  });
198
198
 
199
199
  return parsed;
200
+ })
201
+ .catch((err) => {
202
+ webex.internal.newMetrics.submitClientEvent({
203
+ name: 'client.locus.join.response',
204
+ payload: {
205
+ identifiers: {meetingLookupUrl: meeting.meetingInfo?.meetingLookupUrl},
206
+ },
207
+ options: {meetingId: meeting.id, rawError: err},
208
+ });
209
+
210
+ throw err;
200
211
  });
201
212
  },
202
213
 
@@ -208,6 +219,10 @@ const MeetingUtil = {
208
219
  meeting.simultaneousInterpretation.cleanUp();
209
220
  meeting.locusMediaRequest = undefined;
210
221
 
222
+ meeting.webex?.internal?.newMetrics?.callDiagnosticMetrics?.clearEventLimitsForCorrelationId(
223
+ meeting.correlationId
224
+ );
225
+
211
226
  // make sure we send last metrics before we close the peerconnection
212
227
  const stopStatsAnalyzer = meeting.statsAnalyzer
213
228
  ? meeting.statsAnalyzer.stopAnalyzer()
@@ -328,10 +343,57 @@ const MeetingUtil = {
328
343
  meeting.resourceId = meeting.resourceId || options.resourceId;
329
344
 
330
345
  if (meeting.requiredCaptcha) {
331
- return Promise.reject(new CaptchaError());
346
+ const errorToThrow = new CaptchaError();
347
+
348
+ // @ts-ignore
349
+ webex.internal.newMetrics.submitClientEvent({
350
+ name: 'client.meetinginfo.response',
351
+ options: {
352
+ meetingId: meeting.id,
353
+ },
354
+ payload: {
355
+ errors: [
356
+ {
357
+ fatal: false,
358
+ category: 'expected',
359
+ name: 'other',
360
+ shownToUser: false,
361
+ errorCode: errorToThrow.code,
362
+ errorDescription: errorToThrow.name,
363
+ rawErrorMessage: errorToThrow.sdkMessage,
364
+ },
365
+ ],
366
+ },
367
+ });
368
+
369
+ return Promise.reject(errorToThrow);
332
370
  }
371
+
333
372
  if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {
334
- return Promise.reject(new PasswordError());
373
+ const errorToThrow = new PasswordError();
374
+
375
+ // @ts-ignore
376
+ webex.internal.newMetrics.submitClientEvent({
377
+ name: 'client.meetinginfo.response',
378
+ options: {
379
+ meetingId: meeting.id,
380
+ },
381
+ payload: {
382
+ errors: [
383
+ {
384
+ fatal: false,
385
+ category: 'expected',
386
+ name: 'other',
387
+ shownToUser: false,
388
+ errorCode: errorToThrow.code,
389
+ errorDescription: errorToThrow.name,
390
+ rawErrorMessage: errorToThrow.sdkMessage,
391
+ },
392
+ ],
393
+ },
394
+ });
395
+
396
+ return Promise.reject(errorToThrow);
335
397
  }
336
398
 
337
399
  if (options.pin) {
@@ -542,6 +604,15 @@ const MeetingUtil = {
542
604
  canStartManualCaption: (displayHints) =>
543
605
  displayHints.includes(DISPLAY_HINTS.MANUAL_CAPTION_START),
544
606
 
607
+ isLocalRecordingStarted: (displayHints) =>
608
+ displayHints.includes(DISPLAY_HINTS.LOCAL_RECORDING_STATUS_STARTED),
609
+
610
+ isLocalRecordingStopped: (displayHints) =>
611
+ displayHints.includes(DISPLAY_HINTS.LOCAL_RECORDING_STATUS_STOPPED),
612
+
613
+ isLocalRecordingPaused: (displayHints) =>
614
+ displayHints.includes(DISPLAY_HINTS.LOCAL_RECORDING_STATUS_PAUSED),
615
+
545
616
  canStopManualCaption: (displayHints) => displayHints.includes(DISPLAY_HINTS.MANUAL_CAPTION_STOP),
546
617
 
547
618
  isManualCaptionActive: (displayHints) =>
@@ -1560,11 +1560,12 @@ export default class Meetings extends WebexPlugin {
1560
1560
  {
1561
1561
  // @ts-ignore
1562
1562
  parent: this.webex,
1563
+ },
1564
+ (newMeeting) => {
1565
+ this.meetingCollection.set(newMeeting);
1563
1566
  }
1564
1567
  );
1565
1568
 
1566
- this.meetingCollection.set(meeting);
1567
-
1568
1569
  try {
1569
1570
  // if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
1570
1571
  // it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
@@ -30,6 +30,7 @@ import MembersUtil from './util';
30
30
  import {ReceiveSlotManager} from '../multistream/receiveSlotManager';
31
31
  import {MediaRequestManager} from '../multistream/mediaRequestManager';
32
32
  import {ServerRoleShape} from './types';
33
+ import {Invitee} from '../meeting/type';
33
34
 
34
35
  /**
35
36
  * Members Update Event
@@ -800,18 +801,18 @@ export default class Members extends StatelessWebexPlugin {
800
801
 
801
802
  /**
802
803
  * Adds a guest Member to the associated meeting
803
- * @param {String} invitee
804
+ * @param {Invitee} invitee
804
805
  * @param {Boolean} [alertIfActive]
805
806
  * @returns {Promise}
806
807
  * @memberof Members
807
808
  */
808
- addMember(invitee: any, alertIfActive?: boolean) {
809
+ addMember(invitee: Invitee, alertIfActive?: boolean) {
809
810
  if (!this.locusUrl) {
810
811
  return Promise.reject(
811
812
  new ParameterError('The associated locus url for this meeting object must be defined.')
812
813
  );
813
814
  }
814
- if (MembersUtil.isInvalidInvitee(invitee)) {
815
+ if (invitee?.skipEmailValidation !== true && MembersUtil.isInvalidInvitee(invitee)) {
815
816
  return Promise.reject(
816
817
  new ParameterError(
817
818
  'The invitee must be defined with either a valid email, emailAddress or phoneNumber property.'
@@ -825,11 +826,11 @@ export default class Members extends StatelessWebexPlugin {
825
826
 
826
827
  /**
827
828
  * Cancels an outgoing PSTN call to the associated meeting
828
- * @param {String} invitee
829
+ * @param {Invitee} invitee
829
830
  * @returns {Promise}
830
831
  * @memberof Members
831
832
  */
832
- cancelPhoneInvite(invitee: any) {
833
+ cancelPhoneInvite(invitee: Invitee) {
833
834
  if (!this.locusUrl) {
834
835
  return Promise.reject(
835
836
  new ParameterError('The associated locus url for this meeting object must be defined.')
@@ -846,12 +847,14 @@ export default class Members extends StatelessWebexPlugin {
846
847
  }
847
848
 
848
849
  /**
849
- * Cancels an SIP call to the associated meeting
850
- * @param {String} invitee
850
+ * Cancels an SIP/phone call to the associated meeting
851
+ * @param {Invitee} invitee
852
+ * @param {String} invitee.memberId - The memberId of the invitee
853
+ * @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal
851
854
  * @returns {Promise}
852
855
  * @memberof Members
853
856
  */
854
- cancelSIPInvite(invitee: any) {
857
+ cancelInviteByMemberId(invitee: Invitee) {
855
858
  if (!this.locusUrl) {
856
859
  return Promise.reject(
857
860
  new ParameterError('The associated locus url for this meeting object must be defined.')
@@ -862,9 +865,9 @@ export default class Members extends StatelessWebexPlugin {
862
865
  new ParameterError('The invitee must be defined with a memberId property.')
863
866
  );
864
867
  }
865
- const options = MembersUtil.cancelSIPInviteOptions(invitee, this.locusUrl);
868
+ const options = MembersUtil.cancelInviteByMemberIdOptions(invitee, this.locusUrl);
866
869
 
867
- return this.membersRequest.cancelSIPInvite(options);
870
+ return this.membersRequest.cancelInviteByMemberId(options);
868
871
  }
869
872
 
870
873
  /**
@@ -285,14 +285,14 @@ export default class MembersRequest extends StatelessWebexPlugin {
285
285
  * @throws {Error} if the options are not valid and complete, must have invitee with memberId AND locusUrl
286
286
  * @memberof MembersRequest
287
287
  */
288
- cancelSIPInvite(options: any) {
288
+ cancelInviteByMemberId(options: any) {
289
289
  if (!options?.invitee?.memberId || !options?.locusUrl) {
290
290
  throw new ParameterError(
291
291
  'invitee must be passed and the associated locus url for this meeting object must be defined.'
292
292
  );
293
293
  }
294
294
 
295
- const requestParams = MembersUtil.generateCancelSIPInviteRequestParams(options);
295
+ const requestParams = MembersUtil.generateCancelInviteByMemberIdRequestParams(options);
296
296
 
297
297
  return this.locusDeltaRequest(requestParams);
298
298
  }
@@ -1,4 +1,5 @@
1
1
  import uuid from 'uuid';
2
+ import {has} from 'lodash';
2
3
  import {
3
4
  HTTP_VERBS,
4
5
  CONTROLS,
@@ -13,6 +14,7 @@ import {
13
14
  } from '../constants';
14
15
 
15
16
  import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape} from './types';
17
+ import {Invitee} from '../meeting/type';
16
18
 
17
19
  const MembersUtil = {
18
20
  /**
@@ -47,6 +49,9 @@ const MembersUtil = {
47
49
  address:
48
50
  options.invitee.emailAddress || options.invitee.email || options.invitee.phoneNumber,
49
51
  ...(options.invitee.roles ? {roles: options.invitee.roles} : {}),
52
+ ...(has(options.invitee, 'isInternalNumber')
53
+ ? {isInternalNumber: options.invitee.isInternalNumber}
54
+ : {}),
50
55
  },
51
56
  ],
52
57
  alertIfActive: options.alertIfActive,
@@ -101,12 +106,16 @@ const MembersUtil = {
101
106
  return requestParams;
102
107
  },
103
108
 
104
- isInvalidInvitee: (invitee) => {
109
+ isInvalidInvitee: (invitee: Invitee) => {
105
110
  if (!(invitee && (invitee.email || invitee.emailAddress || invitee.phoneNumber))) {
106
111
  return true;
107
112
  }
108
113
 
109
114
  if (invitee.phoneNumber) {
115
+ if (invitee.isInternalNumber) {
116
+ return !DIALER_REGEX.INTERNAL_NUMBER.test(invitee.phoneNumber);
117
+ }
118
+
110
119
  return !DIALER_REGEX.E164_FORMAT.test(invitee.phoneNumber);
111
120
  }
112
121
 
@@ -371,17 +380,20 @@ const MembersUtil = {
371
380
  return requestParams;
372
381
  },
373
382
 
374
- cancelSIPInviteOptions: (invitee, locusUrl) => ({
383
+ cancelInviteByMemberIdOptions: (invitee, locusUrl) => ({
375
384
  invitee,
376
385
  locusUrl,
377
386
  }),
378
387
 
379
- generateCancelSIPInviteRequestParams: (options) => {
388
+ generateCancelInviteByMemberIdRequestParams: (options) => {
389
+ const {memberId, isInternalNumber} = options.invitee;
390
+ const hasIsInternalNumberProp = has(options.invitee, 'isInternalNumber');
380
391
  const body = {
381
392
  actionType: _REMOVE_,
382
393
  invitees: [
383
394
  {
384
- address: options.invitee.memberId,
395
+ address: memberId,
396
+ ...(hasIsInternalNumberProp ? {isInternalNumber} : {}),
385
397
  },
386
398
  ],
387
399
  };
@@ -72,6 +72,7 @@ const BEHAVIORAL_METRICS = {
72
72
  MEETING_INFO_POLICY_ERROR: 'js_sdk_meeting_info_policy_error',
73
73
  LOCUS_DELTA_SYNC_FAILED: 'js_sdk_locus_delta_sync_failed',
74
74
  LOCUS_DELTA_OUT_OF_ORDER: 'js_sdk_locus_delta_ooo',
75
+ LOCUS_SYNC_HANDLING_FAILED: 'js_sdk_locus_sync_handling_failed',
75
76
  PERMISSION_TOKEN_REFRESH: 'js_sdk_permission_token_refresh',
76
77
  PERMISSION_TOKEN_REFRESH_ERROR: 'js_sdk_permission_token_refresh_error',
77
78
  TURN_DISCOVERY_LATENCY: 'js_sdk_turn_discovery_latency',
@@ -15,7 +15,7 @@ import {cloneDeepWith, debounce, isEmpty} from 'lodash';
15
15
  import LoggerProxy from '../common/logs/logger-proxy';
16
16
 
17
17
  import {ReceiveSlot, ReceiveSlotEvents} from './receiveSlot';
18
- import {getMaxFs} from './remoteMedia';
18
+ import {MAX_FS_VALUES} from './remoteMedia';
19
19
 
20
20
  export interface ActiveSpeakerPolicyInfo {
21
21
  policy: 'active-speaker';
@@ -123,12 +123,12 @@ export class MediaRequestManager {
123
123
 
124
124
  private getDegradedClientRequests(clientRequests: ClientRequestsMap) {
125
125
  const maxFsLimits = [
126
- getMaxFs('best'),
127
- getMaxFs('large'),
128
- getMaxFs('medium'),
129
- getMaxFs('small'),
130
- getMaxFs('very small'),
131
- getMaxFs('thumbnail'),
126
+ MAX_FS_VALUES['1080p'],
127
+ MAX_FS_VALUES['720p'],
128
+ MAX_FS_VALUES['540p'],
129
+ MAX_FS_VALUES['360p'],
130
+ MAX_FS_VALUES['180p'],
131
+ MAX_FS_VALUES['90p'],
132
132
  ];
133
133
 
134
134
  // reduce max-fs until total macroblocks is below limit
@@ -19,17 +19,18 @@ export type RemoteVideoResolution =
19
19
  | 'large' // 1080p or less
20
20
  | 'best'; // highest possible resolution
21
21
 
22
- const MAX_FS_VALUES = {
22
+ export const MAX_FS_VALUES = {
23
23
  '90p': 60,
24
24
  '180p': 240,
25
25
  '360p': 920,
26
+ '540p': 2040,
26
27
  '720p': 3600,
27
28
  '1080p': 8192,
28
29
  };
29
30
 
30
31
  /**
31
32
  * Converts pane size into h264 maxFs
32
- * @param {PaneSize} paneSize
33
+ * @param {RemoteVideoResolution} paneSize
33
34
  * @returns {number}
34
35
  */
35
36
  export function getMaxFs(paneSize: RemoteVideoResolution): number {
@@ -89,6 +90,13 @@ export class RemoteMedia extends EventsScope {
89
90
 
90
91
  public readonly id: RemoteMediaId;
91
92
 
93
+ /**
94
+ * The max frame size of the media request, used for logging and media requests.
95
+ * Set by setSizeHint() based on video element dimensions.
96
+ * When > 0, this value takes precedence over options.resolution in sendMediaRequest().
97
+ */
98
+ private maxFrameSize = 0;
99
+
92
100
  /**
93
101
  * Constructs RemoteMedia instance
94
102
  *
@@ -136,15 +144,34 @@ export class RemoteMedia extends EventsScope {
136
144
  fs = MAX_FS_VALUES['180p'];
137
145
  } else if (height < getThresholdHeight(360)) {
138
146
  fs = MAX_FS_VALUES['360p'];
147
+ } else if (height < getThresholdHeight(540)) {
148
+ fs = MAX_FS_VALUES['540p'];
139
149
  } else if (height <= 720) {
140
150
  fs = MAX_FS_VALUES['720p'];
141
151
  } else {
142
152
  fs = MAX_FS_VALUES['1080p'];
143
153
  }
144
154
 
155
+ this.maxFrameSize = fs;
145
156
  this.receiveSlot?.setMaxFs(fs);
146
157
  }
147
158
 
159
+ /**
160
+ * Get the current effective maxFs value that would be used in media requests
161
+ * @returns {number | undefined} The maxFs value, or undefined if no constraints
162
+ */
163
+ public getEffectiveMaxFs(): number | undefined {
164
+ if (this.maxFrameSize > 0) {
165
+ return this.maxFrameSize;
166
+ }
167
+
168
+ if (this.options.resolution) {
169
+ return getMaxFs(this.options.resolution);
170
+ }
171
+
172
+ return undefined;
173
+ }
174
+
148
175
  /**
149
176
  * Invalidates the remote media by clearing the reference to a receive slot and
150
177
  * cancelling the media request.
@@ -185,6 +212,9 @@ export class RemoteMedia extends EventsScope {
185
212
  throw new Error('sendMediaRequest() called on an invalidated RemoteMedia instance');
186
213
  }
187
214
 
215
+ // Use maxFrameSize from setSizeHint if available, otherwise fallback to options.resolution
216
+ const maxFs = this.getEffectiveMaxFs();
217
+
188
218
  this.mediaRequestId = this.mediaRequestManager.addRequest(
189
219
  {
190
220
  policyInfo: {
@@ -192,9 +222,9 @@ export class RemoteMedia extends EventsScope {
192
222
  csi,
193
223
  },
194
224
  receiveSlots: [this.receiveSlot],
195
- codecInfo: this.options.resolution && {
225
+ codecInfo: maxFs && {
196
226
  codec: 'h264',
197
- maxFs: getMaxFs(this.options.resolution),
227
+ maxFs,
198
228
  },
199
229
  },
200
230
  commit
@@ -215,6 +215,9 @@ export class RemoteMediaGroup {
215
215
  private sendActiveSpeakerMediaRequest(commit: boolean) {
216
216
  this.cancelActiveSpeakerMediaRequest(false);
217
217
 
218
+ // Calculate the effective maxFs based on all unpinned RemoteMedia instances
219
+ const effectiveMaxFs = this.getEffectiveMaxFsForActiveSpeaker();
220
+
218
221
  this.mediaRequestId = this.mediaRequestManager.addRequest(
219
222
  {
220
223
  policyInfo: {
@@ -230,9 +233,9 @@ export class RemoteMediaGroup {
230
233
  receiveSlots: this.unpinnedRemoteMedia.map((remoteMedia) =>
231
234
  remoteMedia.getUnderlyingReceiveSlot()
232
235
  ) as ReceiveSlot[],
233
- codecInfo: this.options.resolution && {
236
+ codecInfo: effectiveMaxFs && {
234
237
  codec: 'h264',
235
- maxFs: getMaxFs(this.options.resolution),
238
+ maxFs: effectiveMaxFs,
236
239
  },
237
240
  },
238
241
  commit
@@ -300,4 +303,36 @@ export class RemoteMediaGroup {
300
303
  this.unpinnedRemoteMedia.includes(remoteMedia) || this.pinnedRemoteMedia.includes(remoteMedia)
301
304
  );
302
305
  }
306
+
307
+ /**
308
+ * Calculate the effective maxFs for the active speaker media request based on unpinned RemoteMedia instances
309
+ * @returns {number | undefined} The calculated maxFs value, or undefined if no constraints
310
+ * @private
311
+ */
312
+ private getEffectiveMaxFsForActiveSpeaker(): number | undefined {
313
+ // Get all effective maxFs values from unpinned RemoteMedia instances
314
+ const maxFsValues = this.unpinnedRemoteMedia
315
+ .map((remoteMedia) => remoteMedia.getEffectiveMaxFs())
316
+ .filter((maxFs) => maxFs !== undefined);
317
+
318
+ // Use the highest maxFs value to ensure we don't under-request resolution for any instance
319
+ if (maxFsValues.length > 0) {
320
+ return Math.max(...maxFsValues);
321
+ }
322
+
323
+ // Fall back to group's resolution option
324
+ if (this.options.resolution) {
325
+ return getMaxFs(this.options.resolution);
326
+ }
327
+
328
+ return undefined;
329
+ }
330
+
331
+ /**
332
+ * Get the current effective maxFs that would be used for the active speaker media request
333
+ * @returns {number | undefined} The effective maxFs value
334
+ */
335
+ public getEffectiveMaxFs(): number | undefined {
336
+ return this.getEffectiveMaxFsForActiveSpeaker();
337
+ }
303
338
  }
@@ -7,10 +7,20 @@ import {
7
7
  StreamState,
8
8
  } from '@webex/internal-media-core';
9
9
 
10
+ /**
11
+ * This class is used to manage the sendSlots for the given media types.
12
+ */
10
13
  export default class SendSlotManager {
11
14
  private readonly slots: Map<MediaType, SendSlot> = new Map();
12
15
  private readonly LoggerProxy: any;
16
+ private readonly sourceStateOverrides: Map<MediaType, StreamState> = new Map();
13
17
 
18
+ /**
19
+ * Constructor for SendSlotManager
20
+ *
21
+ * @param {any} LoggerProxy is used to log the messages
22
+ * @constructor
23
+ */
14
24
  constructor(LoggerProxy: any) {
15
25
  this.LoggerProxy = LoggerProxy;
16
26
  }
@@ -93,7 +103,7 @@ export default class SendSlotManager {
93
103
  public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {
94
104
  if (mediaType !== MediaType.VideoMain) {
95
105
  throw new Error(
96
- `sendSlotManager cannot set source state override which media type is ${mediaType}`
106
+ `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`
97
107
  );
98
108
  }
99
109
 
@@ -103,17 +113,39 @@ export default class SendSlotManager {
103
113
  throw new Error(`Slot for ${mediaType} does not exist`);
104
114
  }
105
115
 
116
+ const currentStateOverride = this.getSourceStateOverride(mediaType);
117
+ if (currentStateOverride === state) {
118
+ return;
119
+ }
120
+
106
121
  if (state) {
107
122
  slot.setSourceStateOverride(state);
123
+ this.sourceStateOverrides.set(mediaType, state);
108
124
  } else {
109
125
  slot.clearSourceStateOverride();
126
+ this.sourceStateOverrides.delete(mediaType);
110
127
  }
111
128
 
112
129
  this.LoggerProxy.logger.info(
113
- `SendSlotsManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`
130
+ `SendSlotManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`
114
131
  );
115
132
  }
116
133
 
134
+ /**
135
+ * Gets the source state override for the given media type.
136
+ * @param {MediaType} mediaType - The type of media to get the source state override for.
137
+ * @returns {StreamState | null} - The current source state override or null if not set.
138
+ */
139
+ private getSourceStateOverride(mediaType: MediaType): StreamState | null {
140
+ if (mediaType !== MediaType.VideoMain) {
141
+ throw new Error(
142
+ `Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`
143
+ );
144
+ }
145
+
146
+ return this.sourceStateOverrides.get(mediaType) || null;
147
+ }
148
+
117
149
  /**
118
150
  * This method publishes the given stream to the sendSlot for the given mediaType
119
151
  * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
@@ -140,22 +140,14 @@ export default class Reachability extends EventsScope {
140
140
 
141
141
  /**
142
142
  * Checks if the given subnet is reachable
143
- * @param {string} mediaServerIp - media server ip
143
+ * @param {string} selectedSubnetFirstOctet - selected subnet first octet, e.g. "10" for "10.X.X.X"
144
144
  * @returns {boolean | null} true if reachable, false if not reachable, null if mediaServerIp is not provided
145
145
  * @public
146
146
  * @memberof Reachability
147
147
  */
148
- public isSubnetReachable(mediaServerIp?: string): boolean | null {
149
- if (!mediaServerIp) {
150
- LoggerProxy.logger.error(`Reachability:index#isSubnetReachable --> mediaServerIp is null`);
151
-
152
- return null;
153
- }
154
-
155
- const subnetFirstOctet = mediaServerIp.split('.')[0];
156
-
148
+ public isSubnetReachable(selectedSubnetFirstOctet: string): boolean | null {
157
149
  LoggerProxy.logger.info(
158
- `Reachability:index#isSubnetReachable --> Looking for subnet: ${subnetFirstOctet}.X.X.X`
150
+ `Reachability:index#isSubnetReachable --> Looking for subnet: ${selectedSubnetFirstOctet}.X.X.X`
159
151
  );
160
152
 
161
153
  const matchingReachedClusters = Object.values(this.clusterReachability).reduce(
@@ -167,7 +159,7 @@ export default class Reachability extends EventsScope {
167
159
  const subnet = reachedSubnetsArray[i];
168
160
  const reachedSubnetFirstOctet = subnet.split('.')[0];
169
161
 
170
- if (subnetFirstOctet === reachedSubnetFirstOctet) {
162
+ if (selectedSubnetFirstOctet === reachedSubnetFirstOctet) {
171
163
  acc.add(cluster.name);
172
164
  }
173
165
 
@@ -186,7 +178,7 @@ export default class Reachability extends EventsScope {
186
178
  );
187
179
 
188
180
  LoggerProxy.logger.info(
189
- `Reachability:index#isSubnetReachable --> Found ${matchingReachedClusters.size} clusters that use the subnet ${subnetFirstOctet}.X.X.X`
181
+ `Reachability:index#isSubnetReachable --> Found ${matchingReachedClusters.size} clusters that use the subnet ${selectedSubnetFirstOctet}.X.X.X`
190
182
  );
191
183
 
192
184
  return matchingReachedClusters.size > 0;