@webex/plugin-meetings 3.8.1 → 3.9.0-next.10

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 (294) 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 +84 -91
  16. package/dist/locus-info/index.js.map +1 -1
  17. package/dist/locus-info/parser.js +4 -1
  18. package/dist/locus-info/parser.js.map +1 -1
  19. package/dist/media/index.js +2 -2
  20. package/dist/media/index.js.map +1 -1
  21. package/dist/meeting/brbState.js +17 -14
  22. package/dist/meeting/brbState.js.map +1 -1
  23. package/dist/meeting/in-meeting-actions.js +11 -1
  24. package/dist/meeting/in-meeting-actions.js.map +1 -1
  25. package/dist/meeting/index.js +484 -287
  26. package/dist/meeting/index.js.map +1 -1
  27. package/dist/meeting/request.js +19 -0
  28. package/dist/meeting/request.js.map +1 -1
  29. package/dist/meeting/request.type.js.map +1 -1
  30. package/dist/{rtcMetrics/constants.js → meeting/type.js} +1 -5
  31. package/dist/meeting/type.js.map +1 -0
  32. package/dist/meeting/util.js +68 -2
  33. package/dist/meeting/util.js.map +1 -1
  34. package/dist/meetings/index.js +35 -33
  35. package/dist/meetings/index.js.map +1 -1
  36. package/dist/members/index.js +14 -11
  37. package/dist/members/index.js.map +1 -1
  38. package/dist/members/request.js +3 -3
  39. package/dist/members/request.js.map +1 -1
  40. package/dist/members/util.js +25 -8
  41. package/dist/members/util.js.map +1 -1
  42. package/dist/metrics/constants.js +1 -0
  43. package/dist/metrics/constants.js.map +1 -1
  44. package/dist/multistream/mediaRequestManager.js +1 -1
  45. package/dist/multistream/mediaRequestManager.js.map +1 -1
  46. package/dist/multistream/remoteMedia.js +34 -5
  47. package/dist/multistream/remoteMedia.js.map +1 -1
  48. package/dist/multistream/remoteMediaGroup.js +42 -2
  49. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  50. package/dist/multistream/sendSlotManager.js +32 -2
  51. package/dist/multistream/sendSlotManager.js.map +1 -1
  52. package/dist/reachability/index.js +8 -13
  53. package/dist/reachability/index.js.map +1 -1
  54. package/dist/types/constants.d.ts +28 -0
  55. package/dist/types/controls-options-manager/enums.d.ts +2 -1
  56. package/dist/types/controls-options-manager/types.d.ts +4 -1
  57. package/dist/types/locus-info/index.d.ts +2 -9
  58. package/dist/types/meeting/brbState.d.ts +0 -1
  59. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  60. package/dist/types/meeting/index.d.ts +47 -19
  61. package/dist/types/meeting/request.d.ts +9 -1
  62. package/dist/types/meeting/request.type.d.ts +74 -0
  63. package/dist/types/meeting/type.d.ts +9 -0
  64. package/dist/types/meeting/util.d.ts +3 -0
  65. package/dist/types/members/index.d.ts +12 -8
  66. package/dist/types/members/request.d.ts +1 -1
  67. package/dist/types/members/util.d.ts +13 -6
  68. package/dist/types/metrics/constants.d.ts +1 -0
  69. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  70. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  71. package/dist/types/multistream/sendSlotManager.d.ts +16 -0
  72. package/dist/types/reachability/index.d.ts +2 -2
  73. package/dist/webinar/index.js +1 -1
  74. package/package.json +24 -25
  75. package/src/constants.ts +32 -2
  76. package/src/controls-options-manager/enums.ts +1 -0
  77. package/src/controls-options-manager/types.ts +6 -1
  78. package/src/controls-options-manager/util.ts +31 -0
  79. package/src/locus-info/controlsUtils.ts +15 -0
  80. package/src/locus-info/index.ts +103 -92
  81. package/src/locus-info/parser.ts +5 -1
  82. package/src/media/index.ts +2 -2
  83. package/src/meeting/brbState.ts +13 -9
  84. package/src/meeting/in-meeting-actions.ts +21 -0
  85. package/src/meeting/index.ts +278 -73
  86. package/src/meeting/request.ts +16 -0
  87. package/src/meeting/request.type.ts +64 -0
  88. package/src/meeting/type.ts +9 -0
  89. package/src/meeting/util.ts +73 -2
  90. package/src/meetings/index.ts +3 -2
  91. package/src/members/index.ts +22 -12
  92. package/src/members/request.ts +2 -2
  93. package/src/members/util.ts +34 -6
  94. package/src/metrics/constants.ts +1 -0
  95. package/src/multistream/mediaRequestManager.ts +7 -7
  96. package/src/multistream/remoteMedia.ts +34 -4
  97. package/src/multistream/remoteMediaGroup.ts +37 -2
  98. package/src/multistream/sendSlotManager.ts +34 -2
  99. package/src/reachability/index.ts +8 -16
  100. package/test/unit/spec/controls-options-manager/util.js +58 -0
  101. package/test/unit/spec/locus-info/controlsUtils.js +52 -0
  102. package/test/unit/spec/locus-info/index.js +247 -89
  103. package/test/unit/spec/locus-info/parser.js +3 -2
  104. package/test/unit/spec/media/index.ts +107 -0
  105. package/test/unit/spec/meeting/brbState.ts +23 -4
  106. package/test/unit/spec/meeting/in-meeting-actions.ts +10 -0
  107. package/test/unit/spec/meeting/index.js +976 -91
  108. package/test/unit/spec/meeting/request.js +71 -0
  109. package/test/unit/spec/meeting/utils.js +122 -1
  110. package/test/unit/spec/meetings/index.js +2 -0
  111. package/test/unit/spec/members/index.js +98 -11
  112. package/test/unit/spec/members/request.js +57 -2
  113. package/test/unit/spec/members/utils.js +139 -17
  114. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  115. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  116. package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
  117. package/test/unit/spec/reachability/index.ts +160 -9
  118. package/dist/annotation/annotation.types.d.ts +0 -42
  119. package/dist/annotation/constants.d.ts +0 -31
  120. package/dist/annotation/index.d.ts +0 -117
  121. package/dist/breakouts/breakout.d.ts +0 -8
  122. package/dist/breakouts/collection.d.ts +0 -5
  123. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  124. package/dist/breakouts/events.d.ts +0 -8
  125. package/dist/breakouts/index.d.ts +0 -5
  126. package/dist/breakouts/request.d.ts +0 -22
  127. package/dist/breakouts/utils.d.ts +0 -15
  128. package/dist/common/browser-detection.d.ts +0 -9
  129. package/dist/common/collection.d.ts +0 -48
  130. package/dist/common/config.d.ts +0 -2
  131. package/dist/common/errors/captcha-error.d.ts +0 -15
  132. package/dist/common/errors/intent-to-join.d.ts +0 -16
  133. package/dist/common/errors/join-meeting.d.ts +0 -17
  134. package/dist/common/errors/media.d.ts +0 -15
  135. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  136. package/dist/common/errors/parameter.d.ts +0 -15
  137. package/dist/common/errors/password-error.d.ts +0 -15
  138. package/dist/common/errors/permission.d.ts +0 -14
  139. package/dist/common/errors/reclaim-host-role-error.d.ts +0 -60
  140. package/dist/common/errors/reclaim-host-role-error.js +0 -158
  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 -35
  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 -81
  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 -34
  157. package/dist/common/queue.d.ts +0 -32
  158. package/dist/config.d.ts +0 -73
  159. package/dist/constants.d.ts +0 -952
  160. package/dist/controls-options-manager/constants.d.ts +0 -4
  161. package/dist/controls-options-manager/enums.d.ts +0 -5
  162. package/dist/controls-options-manager/index.d.ts +0 -120
  163. package/dist/controls-options-manager/types.d.ts +0 -43
  164. package/dist/controls-options-manager/util.d.ts +0 -7
  165. package/dist/index.d.ts +0 -4
  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 -269
  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 -212
  179. package/dist/locus-info/selfUtils.d.ts +0 -2
  180. package/dist/media/index.d.ts +0 -32
  181. package/dist/media/properties.d.ts +0 -108
  182. package/dist/media/util.d.ts +0 -2
  183. package/dist/mediaQualityMetrics/config.d.ts +0 -233
  184. package/dist/mediaQualityMetrics/config.js +0 -513
  185. package/dist/mediaQualityMetrics/config.js.map +0 -1
  186. package/dist/meeting/effectsState.d.ts +0 -42
  187. package/dist/meeting/effectsState.js +0 -260
  188. package/dist/meeting/effectsState.js.map +0 -1
  189. package/dist/meeting/in-meeting-actions.d.ts +0 -79
  190. package/dist/meeting/index.d.ts +0 -1622
  191. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  192. package/dist/meeting/muteState.d.ts +0 -116
  193. package/dist/meeting/request.d.ts +0 -257
  194. package/dist/meeting/request.type.d.ts +0 -11
  195. package/dist/meeting/state.d.ts +0 -9
  196. package/dist/meeting/util.d.ts +0 -2
  197. package/dist/meeting/voicea-meeting.d.ts +0 -16
  198. package/dist/meeting-info/collection.d.ts +0 -20
  199. package/dist/meeting-info/index.d.ts +0 -57
  200. package/dist/meeting-info/meeting-info-v2.d.ts +0 -93
  201. package/dist/meeting-info/request.d.ts +0 -22
  202. package/dist/meeting-info/util.d.ts +0 -2
  203. package/dist/meeting-info/utilv2.d.ts +0 -2
  204. package/dist/meetings/collection.d.ts +0 -23
  205. package/dist/meetings/index.d.ts +0 -296
  206. package/dist/meetings/meetings.types.d.ts +0 -4
  207. package/dist/meetings/request.d.ts +0 -27
  208. package/dist/meetings/util.d.ts +0 -18
  209. package/dist/member/index.d.ts +0 -148
  210. package/dist/member/member.types.d.ts +0 -11
  211. package/dist/member/member.types.js +0 -18
  212. package/dist/member/member.types.js.map +0 -1
  213. package/dist/member/types.d.ts +0 -32
  214. package/dist/member/util.d.ts +0 -2
  215. package/dist/members/collection.d.ts +0 -24
  216. package/dist/members/index.d.ts +0 -308
  217. package/dist/members/request.d.ts +0 -58
  218. package/dist/members/types.d.ts +0 -25
  219. package/dist/members/util.d.ts +0 -2
  220. package/dist/metrics/config.d.ts +0 -169
  221. package/dist/metrics/config.js +0 -289
  222. package/dist/metrics/config.js.map +0 -1
  223. package/dist/metrics/constants.d.ts +0 -59
  224. package/dist/metrics/index.d.ts +0 -152
  225. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  226. package/dist/multistream/receiveSlot.d.ts +0 -68
  227. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  228. package/dist/multistream/remoteMedia.d.ts +0 -72
  229. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  230. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  231. package/dist/multistream/sendSlotManager.d.ts +0 -69
  232. package/dist/networkQualityMonitor/index.d.ts +0 -70
  233. package/dist/networkQualityMonitor/index.js +0 -226
  234. package/dist/networkQualityMonitor/index.js.map +0 -1
  235. package/dist/peer-connection-manager/index.d.ts +0 -6
  236. package/dist/peer-connection-manager/index.js +0 -671
  237. package/dist/peer-connection-manager/index.js.map +0 -1
  238. package/dist/peer-connection-manager/util.d.ts +0 -6
  239. package/dist/peer-connection-manager/util.js +0 -110
  240. package/dist/peer-connection-manager/util.js.map +0 -1
  241. package/dist/personal-meeting-room/index.d.ts +0 -47
  242. package/dist/personal-meeting-room/request.d.ts +0 -14
  243. package/dist/personal-meeting-room/util.d.ts +0 -2
  244. package/dist/reachability/clusterReachability.d.ts +0 -109
  245. package/dist/reachability/index.d.ts +0 -139
  246. package/dist/reachability/request.d.ts +0 -35
  247. package/dist/reachability/util.d.ts +0 -8
  248. package/dist/reactions/constants.d.ts +0 -3
  249. package/dist/reactions/reactions.d.ts +0 -4
  250. package/dist/reactions/reactions.type.d.ts +0 -32
  251. package/dist/reconnection-manager/index.d.ts +0 -112
  252. package/dist/recording-controller/enums.d.ts +0 -7
  253. package/dist/recording-controller/index.d.ts +0 -193
  254. package/dist/recording-controller/util.d.ts +0 -13
  255. package/dist/roap/collection.d.ts +0 -10
  256. package/dist/roap/collection.js +0 -63
  257. package/dist/roap/collection.js.map +0 -1
  258. package/dist/roap/handler.d.ts +0 -47
  259. package/dist/roap/handler.js +0 -279
  260. package/dist/roap/handler.js.map +0 -1
  261. package/dist/roap/index.d.ts +0 -116
  262. package/dist/roap/request.d.ts +0 -35
  263. package/dist/roap/state.d.ts +0 -9
  264. package/dist/roap/state.js +0 -127
  265. package/dist/roap/state.js.map +0 -1
  266. package/dist/roap/turnDiscovery.d.ts +0 -81
  267. package/dist/roap/util.d.ts +0 -2
  268. package/dist/roap/util.js +0 -76
  269. package/dist/roap/util.js.map +0 -1
  270. package/dist/rtcMetrics/constants.d.ts +0 -4
  271. package/dist/rtcMetrics/constants.js.map +0 -1
  272. package/dist/rtcMetrics/index.d.ts +0 -61
  273. package/dist/rtcMetrics/index.js +0 -197
  274. package/dist/rtcMetrics/index.js.map +0 -1
  275. package/dist/statsAnalyzer/global.d.ts +0 -118
  276. package/dist/statsAnalyzer/global.js +0 -127
  277. package/dist/statsAnalyzer/global.js.map +0 -1
  278. package/dist/statsAnalyzer/index.d.ts +0 -193
  279. package/dist/statsAnalyzer/index.js +0 -1019
  280. package/dist/statsAnalyzer/index.js.map +0 -1
  281. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -22
  282. package/dist/statsAnalyzer/mqaUtil.js +0 -181
  283. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  284. package/dist/transcription/index.d.ts +0 -64
  285. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  286. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  287. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  288. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  289. package/dist/types/rtcMetrics/index.d.ts +0 -71
  290. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  291. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  292. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  293. package/dist/webinar/collection.d.ts +0 -16
  294. package/dist/webinar/index.d.ts +0 -5
@@ -32,6 +32,7 @@ import {
32
32
  BrbOptions,
33
33
  ToggleReactionsOptions,
34
34
  PostMeetingDataConsentOptions,
35
+ SynchronizeVideoLayout,
35
36
  } from './request.type';
36
37
  import MeetingUtil from './util';
37
38
  import {AnnotationInfo} from '../annotation/annotation.types';
@@ -969,4 +970,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
969
970
  },
970
971
  });
971
972
  }
973
+
974
+ /**
975
+ * Synchronize the stage for a meeting
976
+ *
977
+ * @param {LocusUrl} locusUrl The locus URL
978
+ * @param {SetStageVideoLayout} videoLayout The video layout to synchronize
979
+ * @returns {Promise} The locus request
980
+ */
981
+ synchronizeStage(locusUrl: string, videoLayout: SynchronizeVideoLayout) {
982
+ return this.locusDeltaRequest({
983
+ method: HTTP_VERBS.PATCH,
984
+ uri: `${locusUrl}/${CONTROLS}`,
985
+ body: {videoLayout},
986
+ });
987
+ }
972
988
  }
@@ -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
  /**
@@ -1178,11 +1181,17 @@ export default class Members extends StatelessWebexPlugin {
1178
1181
  * @param {string} memberId - id of the participant who is receiving request
1179
1182
  * @param {string} requestingParticipantId - id of the participant who is sending request (optional)
1180
1183
  * @param {string} [alias] - alias name
1184
+ * @param {string} [suffix] - name suffix (optional)
1181
1185
  * @returns {Promise}
1182
1186
  * @public
1183
1187
  * @memberof Members
1184
1188
  */
1185
- public editDisplayName(memberId: string, requestingParticipantId: string, alias: string) {
1189
+ public editDisplayName(
1190
+ memberId: string,
1191
+ requestingParticipantId: string,
1192
+ alias: string,
1193
+ suffix?: string
1194
+ ) {
1186
1195
  if (!this.locusUrl) {
1187
1196
  return Promise.reject(
1188
1197
  new ParameterError(
@@ -1202,7 +1211,8 @@ export default class Members extends StatelessWebexPlugin {
1202
1211
  memberId,
1203
1212
  requestingParticipantId,
1204
1213
  alias,
1205
- locusUrl
1214
+ locusUrl,
1215
+ suffix
1206
1216
  );
1207
1217
 
1208
1218
  return this.membersRequest.editDisplayNameMember(options);
@@ -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
 
@@ -181,13 +190,21 @@ const MembersUtil = {
181
190
  * @param {String} requestingParticipantId id of the participant who is sending request (optional)
182
191
  * @param {String} alias alias name
183
192
  * @param {String} locusUrl url
193
+ * @param {String} suffix optional suffix
184
194
  * @returns {Object} consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
185
195
  */
186
- generateEditDisplayNameMemberOptions: (memberId, requestingParticipantId, alias, locusUrl) => ({
196
+ generateEditDisplayNameMemberOptions: (
197
+ memberId,
198
+ requestingParticipantId,
199
+ alias,
200
+ locusUrl,
201
+ suffix
202
+ ) => ({
187
203
  memberId,
188
204
  requestingParticipantId,
189
205
  alias,
190
206
  locusUrl,
207
+ suffix,
191
208
  }),
192
209
 
193
210
  getMuteMemberRequestParams: (options) => {
@@ -292,10 +309,18 @@ const MembersUtil = {
292
309
  * @returns {Object} request parameters (method, uri, body) needed to make a editDisplayName request
293
310
  */
294
311
  editDisplayNameMemberRequestParams: (options) => {
295
- const body = {
312
+ const body: {
313
+ aliasValue: string;
314
+ requestingParticipantId: string;
315
+ suffixValue?: string;
316
+ } = {
296
317
  aliasValue: options.alias,
297
318
  requestingParticipantId: options.requestingParticipantId,
298
319
  };
320
+
321
+ if (options.suffix !== undefined) {
322
+ body.suffixValue = options.suffix;
323
+ }
299
324
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${ALIAS}`;
300
325
 
301
326
  return {
@@ -371,17 +396,20 @@ const MembersUtil = {
371
396
  return requestParams;
372
397
  },
373
398
 
374
- cancelSIPInviteOptions: (invitee, locusUrl) => ({
399
+ cancelInviteByMemberIdOptions: (invitee, locusUrl) => ({
375
400
  invitee,
376
401
  locusUrl,
377
402
  }),
378
403
 
379
- generateCancelSIPInviteRequestParams: (options) => {
404
+ generateCancelInviteByMemberIdRequestParams: (options) => {
405
+ const {memberId, isInternalNumber} = options.invitee;
406
+ const hasIsInternalNumberProp = has(options.invitee, 'isInternalNumber');
380
407
  const body = {
381
408
  actionType: _REMOVE_,
382
409
  invitees: [
383
410
  {
384
- address: options.invitee.memberId,
411
+ address: memberId,
412
+ ...(hasIsInternalNumberProp ? {isInternalNumber} : {}),
385
413
  },
386
414
  ],
387
415
  };
@@ -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
  }