@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-task-refactor.1

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 (201) hide show
  1. package/dist/annotation/index.js +5 -14
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/config.js +2 -8
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +6 -29
  8. package/dist/constants.js.map +1 -1
  9. package/dist/hashTree/hashTreeParser.js +29 -1563
  10. package/dist/hashTree/hashTreeParser.js.map +1 -1
  11. package/dist/hashTree/types.js +3 -13
  12. package/dist/hashTree/types.js.map +1 -1
  13. package/dist/index.js +2 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interceptors/index.js +0 -7
  16. package/dist/interceptors/index.js.map +1 -1
  17. package/dist/interceptors/locusRouteToken.js +5 -27
  18. package/dist/interceptors/locusRouteToken.js.map +1 -1
  19. package/dist/interpretation/index.js +2 -2
  20. package/dist/interpretation/index.js.map +1 -1
  21. package/dist/interpretation/siLanguage.js +1 -1
  22. package/dist/locus-info/controlsUtils.js +3 -7
  23. package/dist/locus-info/controlsUtils.js.map +1 -1
  24. package/dist/locus-info/index.js +247 -642
  25. package/dist/locus-info/index.js.map +1 -1
  26. package/dist/locus-info/selfUtils.js +0 -1
  27. package/dist/locus-info/selfUtils.js.map +1 -1
  28. package/dist/locus-info/types.js.map +1 -1
  29. package/dist/media/MediaConnectionAwaiter.js +1 -57
  30. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  31. package/dist/media/properties.js +2 -4
  32. package/dist/media/properties.js.map +1 -1
  33. package/dist/meeting/in-meeting-actions.js +1 -7
  34. package/dist/meeting/in-meeting-actions.js.map +1 -1
  35. package/dist/meeting/index.js +1036 -1481
  36. package/dist/meeting/index.js.map +1 -1
  37. package/dist/meeting/request.js +0 -50
  38. package/dist/meeting/request.js.map +1 -1
  39. package/dist/meeting/request.type.js.map +1 -1
  40. package/dist/meeting/util.js +3 -133
  41. package/dist/meeting/util.js.map +1 -1
  42. package/dist/meetings/index.js +59 -142
  43. package/dist/meetings/index.js.map +1 -1
  44. package/dist/meetings/util.js +7 -11
  45. package/dist/meetings/util.js.map +1 -1
  46. package/dist/member/index.js +0 -10
  47. package/dist/member/index.js.map +1 -1
  48. package/dist/member/util.js +0 -10
  49. package/dist/member/util.js.map +1 -1
  50. package/dist/metrics/constants.js +1 -7
  51. package/dist/metrics/constants.js.map +1 -1
  52. package/dist/multistream/mediaRequestManager.js +60 -9
  53. package/dist/multistream/mediaRequestManager.js.map +1 -1
  54. package/dist/multistream/remoteMediaManager.js +0 -11
  55. package/dist/multistream/remoteMediaManager.js.map +1 -1
  56. package/dist/multistream/sendSlotManager.js +2 -116
  57. package/dist/multistream/sendSlotManager.js.map +1 -1
  58. package/dist/reachability/clusterReachability.js +18 -171
  59. package/dist/reachability/clusterReachability.js.map +1 -1
  60. package/dist/reachability/index.js +11 -21
  61. package/dist/reachability/index.js.map +1 -1
  62. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  63. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  64. package/dist/reactions/reactions.type.js.map +1 -1
  65. package/dist/reconnection-manager/index.js +1 -0
  66. package/dist/reconnection-manager/index.js.map +1 -1
  67. package/dist/types/common/browser-detection.d.ts +0 -1
  68. package/dist/types/common/events/events-scope.d.ts +0 -1
  69. package/dist/types/common/events/events.d.ts +0 -1
  70. package/dist/types/config.d.ts +0 -5
  71. package/dist/types/constants.d.ts +1 -24
  72. package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
  73. package/dist/types/hashTree/types.d.ts +0 -20
  74. package/dist/types/index.d.ts +0 -1
  75. package/dist/types/interceptors/index.d.ts +1 -2
  76. package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
  77. package/dist/types/locus-info/index.d.ts +47 -68
  78. package/dist/types/locus-info/types.d.ts +12 -28
  79. package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
  80. package/dist/types/media/properties.d.ts +1 -2
  81. package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
  82. package/dist/types/meeting/index.d.ts +7 -86
  83. package/dist/types/meeting/request.d.ts +1 -16
  84. package/dist/types/meeting/request.type.d.ts +0 -5
  85. package/dist/types/meeting/util.d.ts +0 -31
  86. package/dist/types/meeting-info/util.d.ts +0 -1
  87. package/dist/types/meeting-info/utilv2.d.ts +0 -1
  88. package/dist/types/meetings/index.d.ts +2 -4
  89. package/dist/types/member/index.d.ts +0 -1
  90. package/dist/types/member/types.d.ts +4 -4
  91. package/dist/types/member/util.d.ts +0 -5
  92. package/dist/types/metrics/constants.d.ts +0 -6
  93. package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
  94. package/dist/types/multistream/sendSlotManager.d.ts +1 -23
  95. package/dist/types/reachability/clusterReachability.d.ts +3 -30
  96. package/dist/types/reactions/reactions.type.d.ts +0 -1
  97. package/dist/types/recording-controller/util.d.ts +5 -5
  98. package/dist/types/roap/index.d.ts +1 -1
  99. package/dist/webinar/index.js +163 -438
  100. package/dist/webinar/index.js.map +1 -1
  101. package/package.json +24 -26
  102. package/src/annotation/index.ts +7 -27
  103. package/src/config.ts +0 -5
  104. package/src/constants.ts +1 -30
  105. package/src/hashTree/hashTreeParser.ts +25 -1523
  106. package/src/hashTree/types.ts +1 -24
  107. package/src/index.ts +1 -8
  108. package/src/interceptors/index.ts +1 -2
  109. package/src/interceptors/locusRouteToken.ts +5 -22
  110. package/src/interpretation/index.ts +2 -2
  111. package/src/locus-info/controlsUtils.ts +0 -17
  112. package/src/locus-info/index.ts +213 -707
  113. package/src/locus-info/selfUtils.ts +0 -1
  114. package/src/locus-info/types.ts +12 -27
  115. package/src/media/MediaConnectionAwaiter.ts +1 -41
  116. package/src/media/properties.ts +1 -3
  117. package/src/meeting/in-meeting-actions.ts +0 -12
  118. package/src/meeting/index.ts +84 -461
  119. package/src/meeting/request.ts +0 -42
  120. package/src/meeting/request.type.ts +0 -6
  121. package/src/meeting/util.ts +2 -160
  122. package/src/meetings/index.ts +60 -180
  123. package/src/meetings/util.ts +9 -10
  124. package/src/member/index.ts +0 -10
  125. package/src/member/util.ts +0 -12
  126. package/src/metrics/constants.ts +0 -7
  127. package/src/multistream/mediaRequestManager.ts +54 -4
  128. package/src/multistream/remoteMediaManager.ts +0 -13
  129. package/src/multistream/sendSlotManager.ts +3 -97
  130. package/src/reachability/clusterReachability.ts +27 -153
  131. package/src/reachability/index.ts +1 -15
  132. package/src/reachability/reachabilityPeerConnection.ts +1 -3
  133. package/src/reactions/reactions.type.ts +0 -1
  134. package/src/reconnection-manager/index.ts +1 -0
  135. package/src/webinar/index.ts +6 -265
  136. package/test/unit/spec/annotation/index.ts +7 -69
  137. package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
  138. package/test/unit/spec/locus-info/controlsUtils.js +1 -56
  139. package/test/unit/spec/locus-info/index.js +90 -1457
  140. package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
  141. package/test/unit/spec/media/properties.ts +3 -12
  142. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
  143. package/test/unit/spec/meeting/index.js +128 -981
  144. package/test/unit/spec/meeting/request.js +0 -70
  145. package/test/unit/spec/meeting/utils.js +26 -438
  146. package/test/unit/spec/meetings/index.js +33 -845
  147. package/test/unit/spec/meetings/utils.js +1 -51
  148. package/test/unit/spec/member/index.js +4 -28
  149. package/test/unit/spec/member/util.js +27 -65
  150. package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
  151. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
  152. package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
  153. package/test/unit/spec/reachability/clusterReachability.ts +1 -125
  154. package/test/unit/spec/reachability/index.ts +3 -26
  155. package/test/unit/spec/reconnection-manager/index.js +8 -4
  156. package/test/unit/spec/webinar/index.ts +37 -534
  157. package/dist/aiEnableRequest/index.js +0 -184
  158. package/dist/aiEnableRequest/index.js.map +0 -1
  159. package/dist/aiEnableRequest/utils.js +0 -36
  160. package/dist/aiEnableRequest/utils.js.map +0 -1
  161. package/dist/hashTree/constants.js +0 -22
  162. package/dist/hashTree/constants.js.map +0 -1
  163. package/dist/hashTree/hashTree.js +0 -533
  164. package/dist/hashTree/hashTree.js.map +0 -1
  165. package/dist/hashTree/utils.js +0 -69
  166. package/dist/hashTree/utils.js.map +0 -1
  167. package/dist/interceptors/constant.js +0 -12
  168. package/dist/interceptors/constant.js.map +0 -1
  169. package/dist/interceptors/dataChannelAuthToken.js +0 -290
  170. package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
  171. package/dist/interceptors/utils.js +0 -27
  172. package/dist/interceptors/utils.js.map +0 -1
  173. package/dist/types/aiEnableRequest/index.d.ts +0 -5
  174. package/dist/types/aiEnableRequest/utils.d.ts +0 -2
  175. package/dist/types/hashTree/constants.d.ts +0 -9
  176. package/dist/types/hashTree/hashTree.d.ts +0 -136
  177. package/dist/types/hashTree/utils.d.ts +0 -22
  178. package/dist/types/interceptors/constant.d.ts +0 -5
  179. package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
  180. package/dist/types/interceptors/utils.d.ts +0 -1
  181. package/dist/types/webinar/utils.d.ts +0 -6
  182. package/dist/webinar/utils.js +0 -25
  183. package/dist/webinar/utils.js.map +0 -1
  184. package/src/aiEnableRequest/README.md +0 -84
  185. package/src/aiEnableRequest/index.ts +0 -170
  186. package/src/aiEnableRequest/utils.ts +0 -25
  187. package/src/hashTree/constants.ts +0 -10
  188. package/src/hashTree/hashTree.ts +0 -480
  189. package/src/hashTree/utils.ts +0 -62
  190. package/src/interceptors/constant.ts +0 -6
  191. package/src/interceptors/dataChannelAuthToken.ts +0 -170
  192. package/src/interceptors/utils.ts +0 -16
  193. package/src/webinar/utils.ts +0 -16
  194. package/test/unit/spec/aiEnableRequest/index.ts +0 -981
  195. package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
  196. package/test/unit/spec/hashTree/hashTree.ts +0 -721
  197. package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
  198. package/test/unit/spec/hashTree/utils.ts +0 -140
  199. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
  200. package/test/unit/spec/interceptors/utils.ts +0 -75
  201. package/test/unit/spec/webinar/utils.ts +0 -39
@@ -117,16 +117,15 @@ MeetingsUtil.getMediaServerIp = (sdp) => {
117
117
  return mediaServerIp;
118
118
  };
119
119
 
120
- /**
121
- * Finds correlationId of a device from locus self devices array
122
- * that matches the given deviceUrl
123
- * @param {string} deviceUrl
124
- * @param {object} locusSelf
125
- * @returns {string|false} correlationId or false if not found
126
- */
127
- MeetingsUtil.getCorrelationIdForDevice = (deviceUrl: string, locusSelf: any) => {
128
- if (locusSelf?.devices) {
129
- const foundDevice = locusSelf?.devices.find((device) => device.url === deviceUrl);
120
+ MeetingsUtil.checkForCorrelationId = (deviceUrl, locus) => {
121
+ let devices = [];
122
+
123
+ if (locus) {
124
+ if (locus && locus.self && locus.self.devices) {
125
+ devices = locus.self.devices;
126
+ }
127
+
128
+ const foundDevice = devices.find((device) => device.url === deviceUrl);
130
129
 
131
130
  if (foundDevice && foundDevice.correlationId) {
132
131
  return foundDevice.correlationId;
@@ -13,7 +13,6 @@ export type MemberId = string;
13
13
  export default class Member {
14
14
  associatedUser: MemberId | null; // deprecated, use associatedUsers instead
15
15
  associatedUsers: Set<MemberId>; // users associated with this device, empty if this member is not a device
16
- canApproveAIEnablement: boolean;
17
16
  canReclaimHost: boolean;
18
17
  id: MemberId;
19
18
  isAudioMuted: any;
@@ -292,14 +291,6 @@ export default class Member {
292
291
  */
293
292
  this.isPresenterAssignmentProhibited = null;
294
293
 
295
- /**
296
- * @instance
297
- * @type {Boolean}
298
- * @public
299
- * @memberof Member
300
- */
301
- this.canApproveAIEnablement = null;
302
-
303
294
  /**
304
295
  * @instance
305
296
  * @type {Boolean}
@@ -369,7 +360,6 @@ export default class Member {
369
360
  MemberUtil.isModeratorAssignmentProhibited(participant);
370
361
  this.isPresenterAssignmentProhibited =
371
362
  MemberUtil.isPresenterAssignmentProhibited(participant);
372
- this.canApproveAIEnablement = MemberUtil.canApproveAIEnablement(participant);
373
363
  this.processStatus(participant);
374
364
  this.processRoles(participant);
375
365
  // must be done last
@@ -42,18 +42,6 @@ const MemberUtil = {
42
42
  return participant.canReclaimHostRole || false;
43
43
  },
44
44
 
45
- /**
46
- * @param {Object} participant - The locus participant object.
47
- * @returns {Boolean}
48
- */
49
- canApproveAIEnablement: (participant) => {
50
- if (!participant) {
51
- return false;
52
- }
53
-
54
- return !participant.attendeeRequestAiAssistantNotAllowed;
55
- },
56
-
57
45
  /**
58
46
  * @param {Object} participant - The locus participant object.
59
47
  * @returns {[ServerRoleShape]}
@@ -21,7 +21,6 @@ const BEHAVIORAL_METRICS = {
21
21
  GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures',
22
22
  JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures',
23
23
  LLM_CONNECTION_AFTER_JOIN_FAILURE: 'js_sdk_llm_connection_after_join_failure',
24
- LLM_HEALTHCHECK_FAILURE: 'js_sdk_llm_healthcheck_failure',
25
24
  RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: 'js_sdk_receive_transcription_after_join_failure',
26
25
 
27
26
  DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity',
@@ -90,12 +89,6 @@ const BEHAVIORAL_METRICS = {
90
89
  MEDIA_ISSUE_DETECTED: 'js_sdk_media_issue_detected',
91
90
  LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH: 'js_sdk_locus_classic_vs_hash_tree_mismatch',
92
91
  LOCUS_HASH_TREE_UNSUPPORTED_OPERATION: 'js_sdk_locus_hash_tree_unsupported_operation',
93
- MEDIA_STILL_NOT_CONNECTED: 'js_sdk_media_still_not_connected',
94
- DEPRECATED_SET_CODEC_PARAMETERS_USED: 'js_sdk_deprecated_set_codec_parameters_used',
95
- DEPRECATED_DELETE_CODEC_PARAMETERS_USED: 'js_sdk_deprecated_delete_codec_parameters_used',
96
- SET_CUSTOM_CODEC_PARAMETERS_USED: 'js_sdk_set_custom_codec_parameters_used',
97
- MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED:
98
- 'js_sdk_mark_custom_codec_parameters_for_deletion_used',
99
92
  };
100
93
 
101
94
  export {BEHAVIORAL_METRICS as default};
@@ -10,7 +10,7 @@ import {
10
10
  RecommendedOpusBitrates,
11
11
  NamedMediaGroup,
12
12
  } from '@webex/internal-media-core';
13
- import {cloneDeepWith, debounce} from 'lodash';
13
+ import {cloneDeepWith, debounce, isEmpty} from 'lodash';
14
14
 
15
15
  import LoggerProxy from '../common/logs/logger-proxy';
16
16
 
@@ -94,6 +94,8 @@ export class MediaRequestManager {
94
94
 
95
95
  private debouncedSourceUpdateListener: () => void;
96
96
 
97
+ private previousStreamRequests: Array<StreamRequest> = [];
98
+
97
99
  private trimRequestsToNumOfSources: boolean;
98
100
  private numTotalSources: number;
99
101
  private numLiveSources: number;
@@ -159,6 +161,36 @@ export class MediaRequestManager {
159
161
  }
160
162
  }
161
163
 
164
+ /**
165
+ * Returns true if two stream requests are the same, false otherwise.
166
+ *
167
+ * @param {StreamRequest} streamRequestA - Stream request A for comparison.
168
+ * @param {StreamRequest} streamRequestB - Stream request B for comparison.
169
+ * @returns {boolean} - Whether they are equal.
170
+ */
171
+ // eslint-disable-next-line class-methods-use-this
172
+ public isEqual(streamRequestA: StreamRequest, streamRequestB: StreamRequest) {
173
+ return (
174
+ JSON.stringify(streamRequestA._toJmpStreamRequest()) ===
175
+ JSON.stringify(streamRequestB._toJmpStreamRequest())
176
+ );
177
+ }
178
+
179
+ /**
180
+ * Compares new stream requests to previous ones and determines
181
+ * if they are the same.
182
+ *
183
+ * @param {StreamRequest[]} newRequests - Array with new requests.
184
+ * @returns {boolean} - True if they are equal, false otherwise.
185
+ */
186
+ private checkIsNewRequestsEqualToPrev(newRequests: StreamRequest[]) {
187
+ return (
188
+ !isEmpty(this.previousStreamRequests) &&
189
+ this.previousStreamRequests.length === newRequests.length &&
190
+ this.previousStreamRequests.every((req, idx) => this.isEqual(req, newRequests[idx]))
191
+ );
192
+ }
193
+
162
194
  /**
163
195
  * Returns the maxPayloadBitsPerSecond per Stream
164
196
  *
@@ -198,6 +230,15 @@ export class MediaRequestManager {
198
230
  return (mediaRequest.codecInfo.maxFs * maxFps) / 100;
199
231
  }
200
232
 
233
+ /**
234
+ * Clears the previous stream requests.
235
+ *
236
+ * @returns {void}
237
+ */
238
+ public clearPreviousRequests(): void {
239
+ this.previousStreamRequests = [];
240
+ }
241
+
201
242
  /** Modifies the passed in clientRequests and makes sure that in total they don't ask
202
243
  * for more streams than there are available.
203
244
  *
@@ -315,7 +356,7 @@ export class MediaRequestManager {
315
356
  mr.receiveSlots.map((receiveSlot) => receiveSlot.wcmeReceiveSlot),
316
357
  this.getMaxPayloadBitsPerSecond(mr),
317
358
  mr.codecInfo && [
318
- WcmeCodecInfo.fromH264(
359
+ new WcmeCodecInfo(
319
360
  0x80,
320
361
  new H264Codec(
321
362
  mr.codecInfo.maxFs,
@@ -331,8 +372,17 @@ export class MediaRequestManager {
331
372
  }
332
373
  });
333
374
 
334
- this.sendMediaRequestsCallback(streamRequests);
335
- LoggerProxy.logger.info(`multistream:sendRequests --> media requests sent. `);
375
+ //! IMPORTANT: this is only a temporary fix. This will soon be done in the jmp layer (@webex/json-multistream)
376
+ // https://jira-eng-gpk2.cisco.com/jira/browse/WEBEX-326713
377
+ if (!this.checkIsNewRequestsEqualToPrev(streamRequests)) {
378
+ this.sendMediaRequestsCallback(streamRequests);
379
+ this.previousStreamRequests = streamRequests;
380
+ LoggerProxy.logger.info(`multistream:sendRequests --> media requests sent. `);
381
+ } else {
382
+ LoggerProxy.logger.info(
383
+ `multistream:sendRequests --> detected duplicate WCME requests, skipping them... `
384
+ );
385
+ }
336
386
  }
337
387
 
338
388
  public addRequest(mediaRequest: MediaRequest, commit = true): MediaRequestId {
@@ -67,18 +67,6 @@ const AllEqualLayout: VideoLayout = {
67
67
  ],
68
68
  };
69
69
 
70
- // An "all equal" grid, with size up to 5 x 5 = 25:
71
- const AllEqual25Layout: VideoLayout = {
72
- activeSpeakerVideoPaneGroups: [
73
- {
74
- id: 'main',
75
- numPanes: 25,
76
- size: 'best',
77
- priority: 255,
78
- },
79
- ],
80
- };
81
-
82
70
  // A layout with just a single remote active speaker video pane:
83
71
  const SingleLayout: VideoLayout = {
84
72
  activeSpeakerVideoPaneGroups: [
@@ -176,7 +164,6 @@ export const DefaultConfiguration: Configuration = {
176
164
 
177
165
  layouts: {
178
166
  AllEqual: AllEqualLayout,
179
- AllEqual25: AllEqual25Layout,
180
167
  OnePlusFive: OnePlusFiveLayout,
181
168
  Single: SingleLayout,
182
169
  Stage: Stage2x2With6ThumbnailsLayout,
@@ -5,11 +5,7 @@ import {
5
5
  MultistreamRoapMediaConnection,
6
6
  NamedMediaGroup,
7
7
  StreamState,
8
- MediaCodecMimeType,
9
- CodecParameters,
10
8
  } from '@webex/internal-media-core';
11
- import Metrics from '../metrics';
12
- import BEHAVIORAL_METRICS from '../metrics/constants';
13
9
 
14
10
  /**
15
11
  * This class is used to manage the sendSlots for the given media types.
@@ -210,8 +206,6 @@ export default class SendSlotManager {
210
206
  }
211
207
 
212
208
  /**
213
- * @deprecated Use {@link setCustomCodecParameters} instead, which requires specifying the codec MIME type.
214
- *
215
209
  * This method is used to set the codec parameters for the sendSlot of the given mediaType
216
210
  * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
217
211
  * @param {Object} codecParameters
@@ -232,19 +226,12 @@ export default class SendSlotManager {
232
226
 
233
227
  await slot.setCodecParameters(codecParameters);
234
228
 
235
- this.LoggerProxy.logger.warn(
236
- 'SendSlotsManager->setCodecParameters --> [DEPRECATION WARNING]: setCodecParameters has been deprecated, use setCustomCodecParameters instead'
229
+ this.LoggerProxy.logger.info(
230
+ `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`
237
231
  );
238
-
239
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_SET_CODEC_PARAMETERS_USED, {
240
- mediaType,
241
- codecParameters,
242
- });
243
232
  }
244
233
 
245
234
  /**
246
- * @deprecated Use {@link markCustomCodecParametersForDeletion} instead, which requires specifying the codec MIME type.
247
- *
248
235
  * This method is used to delete the codec parameters for the sendSlot of the given mediaType
249
236
  * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
250
237
  * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
@@ -259,89 +246,8 @@ export default class SendSlotManager {
259
246
 
260
247
  await slot.deleteCodecParameters(parameters);
261
248
 
262
- this.LoggerProxy.logger.warn(
263
- 'SendSlotsManager->deleteCodecParameters --> [DEPRECATION WARNING]: deleteCodecParameters has been deprecated, use markCustomCodecParametersForDeletion instead'
264
- );
265
-
266
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_DELETE_CODEC_PARAMETERS_USED, {
267
- mediaType,
268
- parameters,
269
- });
270
- }
271
-
272
- /**
273
- * Sets custom codec parameters for the sendSlot of the given mediaType, scoped to a specific codec MIME type.
274
- * Delegates to WCME's setCustomCodecParameters API.
275
- * @param {MediaType} mediaType MediaType of the sendSlot
276
- * @param {MediaCodecMimeType} codecMimeType The codec MIME type to apply parameters to (e.g. OPUS, H264, AV1)
277
- * @param {CodecParameters} parameters Key-value pairs of codec parameters to set
278
- * @returns {Promise<void>}
279
- */
280
- public async setCustomCodecParameters(
281
- mediaType: MediaType,
282
- codecMimeType: MediaCodecMimeType,
283
- parameters: CodecParameters
284
- ): Promise<void> {
285
- const slot = this.slots.get(mediaType);
286
-
287
- if (!slot) {
288
- throw new Error(`Slot for ${mediaType} does not exist`);
289
- }
290
-
291
- try {
292
- await slot.setCustomCodecParameters(codecMimeType, parameters);
293
-
294
- this.LoggerProxy.logger.info(
295
- `SendSlotsManager->setCustomCodecParameters#Set custom codec parameters for ${mediaType} (codec: ${codecMimeType}) to ${JSON.stringify(
296
- parameters
297
- )}`
298
- );
299
- } catch (error) {
300
- this.LoggerProxy.logger.error(
301
- `SendSlotsManager->setCustomCodecParameters#Failed to set custom codec parameters for ${mediaType} (codec: ${codecMimeType}): ${error}`
302
- );
303
- throw error;
304
- } finally {
305
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.SET_CUSTOM_CODEC_PARAMETERS_USED, {
306
- mediaType,
307
- codecMimeType,
308
- parameters,
309
- });
310
- }
311
- }
312
-
313
- /**
314
- * Marks custom codec parameters for deletion on the sendSlot of the given mediaType, scoped to a specific codec MIME type.
315
- * Delegates to WCME's markCustomCodecParametersForDeletion API.
316
- * @param {MediaType} mediaType MediaType of the sendSlot
317
- * @param {MediaCodecMimeType} codecMimeType The codec MIME type whose parameters should be deleted (e.g. OPUS, H264, AV1)
318
- * @param {string[]} parameters Array of parameter keys to delete
319
- * @returns {Promise<void>}
320
- */
321
- public async markCustomCodecParametersForDeletion(
322
- mediaType: MediaType,
323
- codecMimeType: MediaCodecMimeType,
324
- parameters: string[]
325
- ): Promise<void> {
326
- const slot = this.slots.get(mediaType);
327
-
328
- if (!slot) {
329
- throw new Error(`Slot for ${mediaType} does not exist`);
330
- }
331
-
332
- await slot.markCustomCodecParametersForDeletion(codecMimeType, parameters);
333
-
334
249
  this.LoggerProxy.logger.info(
335
- `SendSlotsManager->markCustomCodecParametersForDeletion#Marked codec parameters for deletion -> ${parameters} for ${mediaType} (codec: ${codecMimeType})`
336
- );
337
-
338
- Metrics.sendBehavioralMetric(
339
- BEHAVIORAL_METRICS.MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED,
340
- {
341
- mediaType,
342
- codecMimeType,
343
- parameters,
344
- }
250
+ `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`
345
251
  );
346
252
  }
347
253
 
@@ -1,6 +1,5 @@
1
1
  import {ClusterNode} from './request';
2
2
  import EventsScope from '../common/events/events-scope';
3
- import LoggerProxy from '../common/logs/logger-proxy';
4
3
 
5
4
  import {Enum} from '../constants';
6
5
  import {
@@ -38,117 +37,36 @@ export type Events = Enum<typeof Events>;
38
37
 
39
38
  /**
40
39
  * A class that handles reachability checks for a single cluster.
41
- * Creates and orchestrates ReachabilityPeerConnection instance(s).
40
+ * Creates and orchestrates a ReachabilityPeerConnection instance.
42
41
  * Listens to events and emits them to consumers.
43
- *
44
- * When enablePerUdpUrlReachability is true:
45
- * - Creates one ReachabilityPeerConnection for each UDP URL
46
- * - Creates one ReachabilityPeerConnection for all TCP and TLS URLs together
47
- * Otherwise:
48
- * - Creates a single ReachabilityPeerConnection for all URLs
49
42
  */
50
43
  export class ClusterReachability extends EventsScope {
51
- private reachabilityPeerConnection: ReachabilityPeerConnection | null = null;
52
- private reachabilityPeerConnectionsForUdp: ReachabilityPeerConnection[] = [];
53
-
44
+ private reachabilityPeerConnection: ReachabilityPeerConnection;
54
45
  public readonly isVideoMesh: boolean;
55
46
  public readonly name;
56
47
  public readonly reachedSubnets: Set<string> = new Set();
57
48
 
58
- private enablePerUdpUrlReachability: boolean;
59
- private udpResultEmitted = false;
60
-
61
49
  /**
62
50
  * Constructor for ClusterReachability
63
51
  * @param {string} name cluster name
64
52
  * @param {ClusterNode} clusterInfo information about the media cluster
65
- * @param {boolean} enablePerUdpUrlReachability whether to create separate peer connections per UDP URL
66
53
  */
67
- constructor(name: string, clusterInfo: ClusterNode, enablePerUdpUrlReachability = false) {
54
+ constructor(name: string, clusterInfo: ClusterNode) {
68
55
  super();
69
56
  this.name = name;
70
57
  this.isVideoMesh = clusterInfo.isVideoMesh;
71
- this.enablePerUdpUrlReachability = enablePerUdpUrlReachability;
72
58
 
73
- if (this.enablePerUdpUrlReachability) {
74
- this.initializePerUdpUrlReachabilityCheck(clusterInfo);
75
- } else {
76
- this.initializeSingleReachabilityPeerConnection(clusterInfo);
77
- }
78
- }
59
+ this.reachabilityPeerConnection = new ReachabilityPeerConnection(name, clusterInfo);
79
60
 
80
- /**
81
- * Initializes a single ReachabilityPeerConnection for all protocols
82
- * @param {ClusterNode} clusterInfo information about the media cluster
83
- * @returns {void}
84
- */
85
- private initializeSingleReachabilityPeerConnection(clusterInfo: ClusterNode) {
86
- this.reachabilityPeerConnection = new ReachabilityPeerConnection(this.name, clusterInfo);
87
- this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);
61
+ this.setupReachabilityPeerConnectionEventListeners();
88
62
  }
89
63
 
90
64
  /**
91
- * Initializes per-URL UDP reachability checks:
92
- * - One ReachabilityPeerConnection per UDP URL
93
- * - One ReachabilityPeerConnection for all TCP and TLS URLs together
94
- * @param {ClusterNode} clusterInfo information about the media cluster
65
+ * Sets up event listeners for the ReachabilityPeerConnection instance
95
66
  * @returns {void}
96
67
  */
97
- private initializePerUdpUrlReachabilityCheck(clusterInfo: ClusterNode) {
98
- LoggerProxy.logger.log(
99
- `ClusterReachability#initializePerUdpUrlReachabilityCheck --> cluster: ${this.name}, performing per-URL UDP reachability for ${clusterInfo.udp.length} URLs`
100
- );
101
-
102
- // Create one ReachabilityPeerConnection for each UDP URL
103
- clusterInfo.udp.forEach((udpUrl) => {
104
- const singleUdpClusterInfo: ClusterNode = {
105
- isVideoMesh: clusterInfo.isVideoMesh,
106
- udp: [udpUrl],
107
- tcp: [],
108
- xtls: [],
109
- };
110
- const rpc = new ReachabilityPeerConnection(this.name, singleUdpClusterInfo);
111
- this.setupReachabilityPeerConnectionEventListeners(rpc, true);
112
- this.reachabilityPeerConnectionsForUdp.push(rpc);
113
- });
114
-
115
- // Create one ReachabilityPeerConnection for all TCP and TLS URLs together
116
- if (clusterInfo.tcp.length > 0 || clusterInfo.xtls.length > 0) {
117
- const tcpTlsClusterInfo: ClusterNode = {
118
- isVideoMesh: clusterInfo.isVideoMesh,
119
- udp: [],
120
- tcp: clusterInfo.tcp,
121
- xtls: clusterInfo.xtls,
122
- };
123
- this.reachabilityPeerConnection = new ReachabilityPeerConnection(
124
- this.name,
125
- tcpTlsClusterInfo
126
- );
127
- this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);
128
- }
129
- }
130
-
131
- /**
132
- * Sets up event listeners for a ReachabilityPeerConnection instance
133
- * @param {ReachabilityPeerConnection} rpc the ReachabilityPeerConnection instance
134
- * @param {boolean} isUdpPerUrl whether this is a per-URL UDP instance
135
- * @returns {void}
136
- */
137
- private setupReachabilityPeerConnectionEventListeners(
138
- rpc: ReachabilityPeerConnection,
139
- isUdpPerUrl = false
140
- ) {
141
- rpc.on(ReachabilityPeerConnectionEvents.resultReady, (data) => {
142
- // For per-URL UDP checks, only emit the first successful UDP result
143
- if (isUdpPerUrl && data.protocol === 'udp') {
144
- if (this.udpResultEmitted) {
145
- return;
146
- }
147
- if (data.result === 'reachable') {
148
- this.udpResultEmitted = true;
149
- }
150
- }
151
-
68
+ private setupReachabilityPeerConnectionEventListeners() {
69
+ this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.resultReady, (data) => {
152
70
  this.emit(
153
71
  {
154
72
  file: 'clusterReachability',
@@ -159,18 +77,21 @@ export class ClusterReachability extends EventsScope {
159
77
  );
160
78
  });
161
79
 
162
- rpc.on(ReachabilityPeerConnectionEvents.clientMediaIpsUpdated, (data) => {
163
- this.emit(
164
- {
165
- file: 'clusterReachability',
166
- function: 'setupReachabilityPeerConnectionEventListeners',
167
- },
168
- Events.clientMediaIpsUpdated,
169
- data
170
- );
171
- });
80
+ this.reachabilityPeerConnection.on(
81
+ ReachabilityPeerConnectionEvents.clientMediaIpsUpdated,
82
+ (data) => {
83
+ this.emit(
84
+ {
85
+ file: 'clusterReachability',
86
+ function: 'setupReachabilityPeerConnectionEventListeners',
87
+ },
88
+ Events.clientMediaIpsUpdated,
89
+ data
90
+ );
91
+ }
92
+ );
172
93
 
173
- rpc.on(ReachabilityPeerConnectionEvents.natTypeUpdated, (data) => {
94
+ this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.natTypeUpdated, (data) => {
174
95
  this.emit(
175
96
  {
176
97
  file: 'clusterReachability',
@@ -181,54 +102,18 @@ export class ClusterReachability extends EventsScope {
181
102
  );
182
103
  });
183
104
 
184
- rpc.on(ReachabilityPeerConnectionEvents.reachedSubnets, (data) => {
185
- data.subnets.forEach((subnet: string) => {
105
+ this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.reachedSubnets, (data) => {
106
+ data.subnets.forEach((subnet) => {
186
107
  this.reachedSubnets.add(subnet);
187
108
  });
188
109
  });
189
110
  }
190
111
 
191
112
  /**
192
- * Gets the aggregated reachability result for this cluster.
193
113
  * @returns {ClusterReachabilityResult} reachability result for this cluster
194
114
  */
195
115
  getResult(): ClusterReachabilityResult {
196
- if (!this.enablePerUdpUrlReachability) {
197
- return (
198
- this.reachabilityPeerConnection?.getResult() ?? {
199
- udp: {result: 'untested'},
200
- tcp: {result: 'untested'},
201
- xtls: {result: 'untested'},
202
- }
203
- );
204
- }
205
-
206
- const result: ClusterReachabilityResult = {
207
- udp: {result: 'untested'},
208
- tcp: {result: 'untested'},
209
- xtls: {result: 'untested'},
210
- };
211
-
212
- // Get the first reachable UDP result from per-URL instances
213
- for (const rpc of this.reachabilityPeerConnectionsForUdp) {
214
- const rpcResult = rpc.getResult();
215
- if (rpcResult.udp.result === 'reachable') {
216
- result.udp = rpcResult.udp;
217
- break;
218
- }
219
- if (rpcResult.udp.result === 'unreachable' && result.udp.result === 'untested') {
220
- result.udp = rpcResult.udp;
221
- }
222
- }
223
-
224
- // Get TCP and TLS results from the main peer connection
225
- if (this.reachabilityPeerConnection) {
226
- const mainResult = this.reachabilityPeerConnection.getResult();
227
- result.tcp = mainResult.tcp;
228
- result.xtls = mainResult.xtls;
229
- }
230
-
231
- return result;
116
+ return this.reachabilityPeerConnection.getResult();
232
117
  }
233
118
 
234
119
  /**
@@ -236,17 +121,7 @@ export class ClusterReachability extends EventsScope {
236
121
  * @returns {Promise<ClusterReachabilityResult>}
237
122
  */
238
123
  async start(): Promise<ClusterReachabilityResult> {
239
- const startPromises: Promise<ClusterReachabilityResult>[] = [];
240
-
241
- this.reachabilityPeerConnectionsForUdp.forEach((rpc) => {
242
- startPromises.push(rpc.start());
243
- });
244
-
245
- if (this.reachabilityPeerConnection) {
246
- startPromises.push(this.reachabilityPeerConnection.start());
247
- }
248
-
249
- await Promise.all(startPromises);
124
+ await this.reachabilityPeerConnection.start();
250
125
 
251
126
  return this.getResult();
252
127
  }
@@ -256,7 +131,6 @@ export class ClusterReachability extends EventsScope {
256
131
  * @returns {void}
257
132
  */
258
133
  public abort() {
259
- this.reachabilityPeerConnectionsForUdp.forEach((rpc) => rpc.abort());
260
- this.reachabilityPeerConnection?.abort();
134
+ this.reachabilityPeerConnection.abort();
261
135
  }
262
136
  }
@@ -6,7 +6,6 @@
6
6
  import {isEqual, mapValues, mean} from 'lodash';
7
7
 
8
8
  import {Defer} from '@webex/common';
9
- import {CapabilityState, WebCapabilities} from '@webex/web-capabilities';
10
9
  import LoggerProxy from '../common/logs/logger-proxy';
11
10
  import MeetingUtil from '../meeting/util';
12
11
 
@@ -197,14 +196,6 @@ export default class Reachability extends EventsScope {
197
196
  if (!this.webex.config.meetings.enableReachabilityChecks) {
198
197
  throw new Error('enableReachabilityChecks is disabled in config');
199
198
  }
200
-
201
- if (WebCapabilities.supportsRTCPeerConnection() !== CapabilityState.CAPABLE) {
202
- LoggerProxy.logger.warn(
203
- 'Reachability:index#gatherReachability --> WebRTC API is not available, skipping reachability checks'
204
- );
205
-
206
- return {};
207
- }
208
199
  // Fetch clusters and measure latency
209
200
  try {
210
201
  this.lastTrigger = trigger;
@@ -970,12 +961,7 @@ export default class Reachability extends EventsScope {
970
961
  Object.keys(clusterList).forEach((key) => {
971
962
  const cluster = clusterList[key];
972
963
 
973
- this.clusterReachability[key] = new ClusterReachability(
974
- key,
975
- cluster,
976
- // @ts-ignore
977
- this.webex.config.meetings.enablePerUdpUrlReachability
978
- );
964
+ this.clusterReachability[key] = new ClusterReachability(key, cluster);
979
965
  this.clusterReachability[key].on(Events.resultReady, async (data: ResultEventData) => {
980
966
  const {protocol, result, clientMediaIPs, latencyInMilliseconds} = data;
981
967
 
@@ -243,9 +243,7 @@ export class ReachabilityPeerConnection extends EventsScope {
243
243
  if (result.latencyInMilliseconds === undefined) {
244
244
  LoggerProxy.logger.log(
245
245
  // @ts-ignore
246
- `Reachability:ReachabilityPeerConnection#saveResult --> Successfully reached ${
247
- this.clusterName
248
- } over ${protocol}: ${latency}ms, serverIp=${serverIp || 'unknown'}`
246
+ `Reachability:ReachabilityPeerConnection#saveResult --> Successfully reached ${this.clusterName} over ${protocol}: ${latency}ms`
249
247
  );
250
248
  result.latencyInMilliseconds = latency;
251
249
  result.result = 'reachable';
@@ -40,7 +40,6 @@ export enum SkinToneType {
40
40
  }
41
41
 
42
42
  export type Sender = {
43
- displayName: string;
44
43
  participantId: string;
45
44
  };
46
45
 
@@ -609,6 +609,7 @@ export default class ReconnectionManager {
609
609
  if (this.meeting.isMultistream) {
610
610
  Object.values(this.meeting.mediaRequestManagers).forEach(
611
611
  (mediaRequestManager: MediaRequestManager) => {
612
+ mediaRequestManager.clearPreviousRequests();
612
613
  mediaRequestManager.commit();
613
614
  }
614
615
  );