@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0-test.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 (239) hide show
  1. package/README.md +12 -0
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/no-meeting-info.js +51 -0
  5. package/dist/common/errors/no-meeting-info.js.map +1 -0
  6. package/dist/common/errors/reclaim-host-role-errors.js +158 -0
  7. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  8. package/dist/common/errors/webex-errors.js +23 -3
  9. package/dist/common/errors/webex-errors.js.map +1 -1
  10. package/dist/common/logs/request.js +5 -1
  11. package/dist/common/logs/request.js.map +1 -1
  12. package/dist/config.js +1 -1
  13. package/dist/config.js.map +1 -1
  14. package/dist/constants.js +69 -9
  15. package/dist/constants.js.map +1 -1
  16. package/dist/index.js +11 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/interceptors/index.js +15 -0
  19. package/dist/interceptors/index.js.map +1 -0
  20. package/dist/interceptors/locusRetry.js +93 -0
  21. package/dist/interceptors/locusRetry.js.map +1 -0
  22. package/dist/interpretation/index.js +16 -2
  23. package/dist/interpretation/index.js.map +1 -1
  24. package/dist/interpretation/siLanguage.js +1 -1
  25. package/dist/locus-info/index.js +40 -11
  26. package/dist/locus-info/index.js.map +1 -1
  27. package/dist/locus-info/mediaSharesUtils.js +15 -1
  28. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  29. package/dist/locus-info/parser.js +42 -21
  30. package/dist/locus-info/parser.js.map +1 -1
  31. package/dist/media/index.js +10 -6
  32. package/dist/media/index.js.map +1 -1
  33. package/dist/media/properties.js +13 -3
  34. package/dist/media/properties.js.map +1 -1
  35. package/dist/mediaQualityMetrics/config.js +135 -330
  36. package/dist/mediaQualityMetrics/config.js.map +1 -1
  37. package/dist/meeting/in-meeting-actions.js +4 -0
  38. package/dist/meeting/in-meeting-actions.js.map +1 -1
  39. package/dist/meeting/index.js +2187 -1074
  40. package/dist/meeting/index.js.map +1 -1
  41. package/dist/meeting/muteState.js +37 -25
  42. package/dist/meeting/muteState.js.map +1 -1
  43. package/dist/meeting/request.js +34 -19
  44. package/dist/meeting/request.js.map +1 -1
  45. package/dist/meeting/util.js +71 -0
  46. package/dist/meeting/util.js.map +1 -1
  47. package/dist/meeting-info/index.js +48 -23
  48. package/dist/meeting-info/index.js.map +1 -1
  49. package/dist/meeting-info/meeting-info-v2.js +25 -4
  50. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  51. package/dist/meeting-info/utilv2.js +1 -1
  52. package/dist/meeting-info/utilv2.js.map +1 -1
  53. package/dist/meetings/collection.js +17 -0
  54. package/dist/meetings/collection.js.map +1 -1
  55. package/dist/meetings/index.js +142 -57
  56. package/dist/meetings/index.js.map +1 -1
  57. package/dist/meetings/util.js +2 -6
  58. package/dist/meetings/util.js.map +1 -1
  59. package/dist/member/index.js +9 -0
  60. package/dist/member/index.js.map +1 -1
  61. package/dist/member/util.js +11 -0
  62. package/dist/member/util.js.map +1 -1
  63. package/dist/members/index.js +17 -1
  64. package/dist/members/index.js.map +1 -1
  65. package/dist/members/types.js.map +1 -1
  66. package/dist/members/util.js +15 -4
  67. package/dist/members/util.js.map +1 -1
  68. package/dist/metrics/constants.js +15 -1
  69. package/dist/metrics/constants.js.map +1 -1
  70. package/dist/multistream/mediaRequestManager.js +1 -1
  71. package/dist/multistream/mediaRequestManager.js.map +1 -1
  72. package/dist/multistream/remoteMediaGroup.js +16 -2
  73. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  74. package/dist/multistream/remoteMediaManager.js +222 -73
  75. package/dist/multistream/remoteMediaManager.js.map +1 -1
  76. package/dist/multistream/sendSlotManager.js +22 -0
  77. package/dist/multistream/sendSlotManager.js.map +1 -1
  78. package/dist/reachability/clusterReachability.js +356 -0
  79. package/dist/reachability/clusterReachability.js.map +1 -0
  80. package/dist/reachability/index.js +262 -432
  81. package/dist/reachability/index.js.map +1 -1
  82. package/dist/reachability/request.js +1 -1
  83. package/dist/reachability/request.js.map +1 -1
  84. package/dist/reachability/util.js +29 -0
  85. package/dist/reachability/util.js.map +1 -0
  86. package/dist/reconnection-manager/index.js +113 -96
  87. package/dist/reconnection-manager/index.js.map +1 -1
  88. package/dist/roap/index.js +57 -25
  89. package/dist/roap/index.js.map +1 -1
  90. package/dist/roap/request.js +5 -13
  91. package/dist/roap/request.js.map +1 -1
  92. package/dist/roap/turnDiscovery.js +173 -81
  93. package/dist/roap/turnDiscovery.js.map +1 -1
  94. package/dist/rtcMetrics/index.js +68 -6
  95. package/dist/rtcMetrics/index.js.map +1 -1
  96. package/dist/statsAnalyzer/index.js +338 -289
  97. package/dist/statsAnalyzer/index.js.map +1 -1
  98. package/dist/statsAnalyzer/mqaUtil.js +296 -156
  99. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  100. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  101. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  102. package/dist/types/common/errors/webex-errors.d.ts +13 -1
  103. package/dist/types/common/logs/request.d.ts +2 -0
  104. package/dist/types/config.d.ts +1 -1
  105. package/dist/types/constants.d.ts +66 -13
  106. package/dist/types/index.d.ts +1 -1
  107. package/dist/types/interceptors/index.d.ts +2 -0
  108. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  109. package/dist/types/locus-info/index.d.ts +1 -1
  110. package/dist/types/locus-info/parser.d.ts +3 -2
  111. package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
  112. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  113. package/dist/types/meeting/index.d.ts +285 -34
  114. package/dist/types/meeting/locusMediaRequest.d.ts +1 -2
  115. package/dist/types/meeting/muteState.d.ts +2 -8
  116. package/dist/types/meeting/request.d.ts +4 -1
  117. package/dist/types/meeting/util.d.ts +25 -1
  118. package/dist/types/meeting-info/index.d.ts +7 -0
  119. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  120. package/dist/types/meetings/collection.d.ts +9 -0
  121. package/dist/types/meetings/index.d.ts +42 -14
  122. package/dist/types/member/index.d.ts +1 -0
  123. package/dist/types/members/types.d.ts +1 -0
  124. package/dist/types/members/util.d.ts +5 -0
  125. package/dist/types/metrics/constants.d.ts +15 -0
  126. package/dist/types/multistream/mediaRequestManager.d.ts +2 -0
  127. package/dist/types/multistream/remoteMediaGroup.d.ts +2 -0
  128. package/dist/types/multistream/remoteMediaManager.d.ts +25 -1
  129. package/dist/types/multistream/sendSlotManager.d.ts +9 -0
  130. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  131. package/dist/types/reachability/index.d.ts +59 -112
  132. package/dist/types/reachability/request.d.ts +1 -1
  133. package/dist/types/reachability/util.d.ts +8 -0
  134. package/dist/types/reconnection-manager/index.d.ts +10 -0
  135. package/dist/types/roap/index.d.ts +2 -1
  136. package/dist/types/roap/request.d.ts +2 -1
  137. package/dist/types/roap/turnDiscovery.d.ts +21 -4
  138. package/dist/types/rtcMetrics/index.d.ts +15 -1
  139. package/dist/types/statsAnalyzer/index.d.ts +28 -11
  140. package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
  141. package/dist/types/webinar/collection.d.ts +16 -0
  142. package/dist/types/webinar/index.d.ts +5 -0
  143. package/dist/webinar/collection.js +44 -0
  144. package/dist/webinar/collection.js.map +1 -0
  145. package/dist/webinar/index.js +69 -0
  146. package/dist/webinar/index.js.map +1 -0
  147. package/package.json +3 -2
  148. package/src/common/errors/no-meeting-info.ts +24 -0
  149. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  150. package/src/common/errors/webex-errors.ts +19 -2
  151. package/src/common/logs/request.ts +5 -1
  152. package/src/config.ts +1 -1
  153. package/src/constants.ts +71 -6
  154. package/src/index.ts +5 -0
  155. package/src/interceptors/index.ts +3 -0
  156. package/src/interceptors/locusRetry.ts +67 -0
  157. package/src/interpretation/index.ts +18 -1
  158. package/src/locus-info/index.ts +52 -16
  159. package/src/locus-info/mediaSharesUtils.ts +16 -0
  160. package/src/locus-info/parser.ts +47 -21
  161. package/src/media/index.ts +8 -6
  162. package/src/media/properties.ts +17 -2
  163. package/src/mediaQualityMetrics/config.ts +103 -238
  164. package/src/meeting/in-meeting-actions.ts +8 -0
  165. package/src/meeting/index.ts +1510 -529
  166. package/src/meeting/muteState.ts +34 -20
  167. package/src/meeting/request.ts +19 -1
  168. package/src/meeting/util.ts +97 -0
  169. package/src/meeting-info/index.ts +47 -20
  170. package/src/meeting-info/meeting-info-v2.ts +27 -5
  171. package/src/meeting-info/utilv2.ts +1 -1
  172. package/src/meetings/collection.ts +13 -0
  173. package/src/meetings/index.ts +112 -31
  174. package/src/meetings/util.ts +2 -8
  175. package/src/member/index.ts +9 -0
  176. package/src/member/util.ts +14 -0
  177. package/src/members/index.ts +29 -2
  178. package/src/members/types.ts +1 -0
  179. package/src/members/util.ts +15 -1
  180. package/src/metrics/constants.ts +14 -0
  181. package/src/multistream/mediaRequestManager.ts +4 -1
  182. package/src/multistream/remoteMediaGroup.ts +19 -0
  183. package/src/multistream/remoteMediaManager.ts +141 -18
  184. package/src/multistream/sendSlotManager.ts +29 -0
  185. package/src/reachability/clusterReachability.ts +320 -0
  186. package/src/reachability/index.ts +221 -382
  187. package/src/reachability/request.ts +1 -1
  188. package/src/reachability/util.ts +24 -0
  189. package/src/reconnection-manager/index.ts +87 -83
  190. package/src/roap/index.ts +60 -24
  191. package/src/roap/request.ts +3 -16
  192. package/src/roap/turnDiscovery.ts +112 -39
  193. package/src/rtcMetrics/index.ts +71 -5
  194. package/src/statsAnalyzer/index.ts +430 -427
  195. package/src/statsAnalyzer/mqaUtil.ts +317 -168
  196. package/src/webinar/collection.ts +31 -0
  197. package/src/webinar/index.ts +62 -0
  198. package/test/integration/spec/converged-space-meetings.js +7 -7
  199. package/test/integration/spec/journey.js +86 -104
  200. package/test/integration/spec/space-meeting.js +9 -9
  201. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  202. package/test/unit/spec/interpretation/index.ts +36 -3
  203. package/test/unit/spec/locus-info/index.js +205 -12
  204. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  205. package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
  206. package/test/unit/spec/locus-info/parser.js +54 -13
  207. package/test/unit/spec/media/index.ts +20 -4
  208. package/test/unit/spec/media/properties.ts +2 -2
  209. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  210. package/test/unit/spec/meeting/index.js +4027 -1075
  211. package/test/unit/spec/meeting/muteState.js +219 -67
  212. package/test/unit/spec/meeting/request.js +63 -12
  213. package/test/unit/spec/meeting/utils.js +93 -0
  214. package/test/unit/spec/meeting-info/index.js +180 -61
  215. package/test/unit/spec/meeting-info/meetinginfov2.js +196 -53
  216. package/test/unit/spec/meetings/collection.js +12 -0
  217. package/test/unit/spec/meetings/index.js +619 -206
  218. package/test/unit/spec/meetings/utils.js +35 -12
  219. package/test/unit/spec/member/index.js +8 -7
  220. package/test/unit/spec/member/util.js +32 -0
  221. package/test/unit/spec/members/index.js +130 -17
  222. package/test/unit/spec/members/utils.js +26 -0
  223. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  224. package/test/unit/spec/multistream/remoteMediaGroup.ts +80 -1
  225. package/test/unit/spec/multistream/remoteMediaManager.ts +210 -3
  226. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  227. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  228. package/test/unit/spec/reachability/index.ts +505 -135
  229. package/test/unit/spec/reachability/util.ts +40 -0
  230. package/test/unit/spec/reconnection-manager/index.js +74 -17
  231. package/test/unit/spec/roap/index.ts +181 -61
  232. package/test/unit/spec/roap/request.ts +27 -3
  233. package/test/unit/spec/roap/turnDiscovery.ts +362 -101
  234. package/test/unit/spec/rtcMetrics/index.ts +57 -3
  235. package/test/unit/spec/stats-analyzer/index.js +1225 -12
  236. package/test/unit/spec/webinar/collection.ts +13 -0
  237. package/test/unit/spec/webinar/index.ts +60 -0
  238. package/test/utils/integrationTestUtils.js +4 -4
  239. package/test/utils/webex-test-users.js +12 -4
@@ -3,6 +3,7 @@ import '@webex/internal-plugin-conversation';
3
3
  import '@webex/internal-plugin-metrics';
4
4
  import { WebexPlugin } from '@webex/webex-core';
5
5
  import 'webrtc-adapter';
6
+ import { CallStateForMetrics } from '../meeting';
6
7
  import Reachability from '../reachability';
7
8
  import { INoiseReductionEffect, IVirtualBackgroundEffect } from './meetings.types';
8
9
  /**
@@ -159,21 +160,21 @@ export default class Meetings extends WebexPlugin {
159
160
  */
160
161
  private _toggleUnifiedMeetings;
161
162
  /**
162
- * API to enable or disable TURN discovery
163
- * @param {Boolean} enable
163
+ * API to toggle starting adhoc meeting
164
+ * @param {Boolean} changeState
164
165
  * @private
165
166
  * @memberof Meetings
166
167
  * @returns {undefined}
167
168
  */
168
- private _toggleTurnDiscovery;
169
+ private _toggleAdhocMeetings;
169
170
  /**
170
- * API to toggle starting adhoc meeting
171
- * @param {Boolean} changeState
171
+ * API to toggle TCP reachability, needs to be called before webex.meetings.register()
172
+ * @param {Boolean} newValue
172
173
  * @private
173
174
  * @memberof Meetings
174
175
  * @returns {undefined}
175
176
  */
176
- private _toggleAdhocMeetings;
177
+ private _toggleTcpReachability;
177
178
  /**
178
179
  * Explicitly sets up the meetings plugin by registering
179
180
  * the device, connecting to mercury, and listening for locus events.
@@ -223,8 +224,10 @@ export default class Meetings extends WebexPlugin {
223
224
  * @returns {String} feedback ID logs were submitted under
224
225
  */
225
226
  uploadLogs(options?: {
227
+ autoupload?: boolean;
226
228
  callStart?: string;
227
229
  feedbackId?: string;
230
+ locussessionid?: string;
228
231
  locusId?: string;
229
232
  correlationId?: string;
230
233
  meetingId?: string;
@@ -244,7 +247,7 @@ export default class Meetings extends WebexPlugin {
244
247
  * @public
245
248
  * @memberof Meetings
246
249
  */
247
- startReachability(): Promise<unknown>;
250
+ startReachability(): Promise<import("../reachability").ReachabilityResults>;
248
251
  /**
249
252
  * Get geoHint for info for meetings
250
253
  * @returns {Promise}
@@ -277,23 +280,37 @@ export default class Meetings extends WebexPlugin {
277
280
  */
278
281
  private destroy;
279
282
  /**
280
- * Create a meeting.
283
+ * Create a meeting or return an existing meeting.
284
+ *
285
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
286
+ *
281
287
  * @param {string} destination - sipURL, phonenumber, or locus object}
282
288
  * @param {string} [type] - the optional specified type, such as locusId
283
289
  * @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
284
290
  * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
285
- * @param {string} correlationId - the optional specified correlationId
291
+ * @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
292
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
293
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
294
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
295
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
286
296
  * @returns {Promise<Meeting>} A new Meeting.
287
297
  * @public
288
298
  * @memberof Meetings
289
299
  */
290
- create(destination: string, type?: string, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string): any;
300
+ create(destination: string, type?: string, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string, failOnMissingMeetingInfo?: boolean, callStateForMetrics?: CallStateForMetrics, meetingInfo?: any, meetingLookupUrl?: any): any;
291
301
  /**
302
+ * Create meeting
303
+ *
304
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
305
+ *
292
306
  * @param {String} destination see create()
293
307
  * @param {String} type see create()
294
308
  * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
295
309
  * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
296
- * @param {String} correlationId the optional specified correlationId
310
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
311
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
312
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
313
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
297
314
  * @returns {Promise} a new meeting instance complete with meeting info and destination
298
315
  * @private
299
316
  * @memberof Meetings
@@ -322,12 +339,15 @@ export default class Meetings extends WebexPlugin {
322
339
  endDate: object;
323
340
  }): any;
324
341
  /**
325
- * syncs all the meeting from server
326
- * @returns {undefined}
342
+ * Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
343
+ * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
344
+ * @returns {Promise<void>}
327
345
  * @public
328
346
  * @memberof Meetings
329
347
  */
330
- syncMeetings(): any;
348
+ syncMeetings({ keepOnlyLocusMeetings }?: {
349
+ keepOnlyLocusMeetings?: boolean;
350
+ }): Promise<void>;
331
351
  /**
332
352
  * sort out locus array for initial creating
333
353
  * @param {Array} loci original locus array
@@ -358,4 +378,12 @@ export default class Meetings extends WebexPlugin {
358
378
  * @returns {Logger}
359
379
  */
360
380
  getLogger(): any;
381
+ /**
382
+ * Returns the first meeting it finds that has the webrtc media connection created.
383
+ * Useful for debugging in the console.
384
+ *
385
+ * @private
386
+ * @returns {Meeting} Meeting object that has a webrtc media connection, else undefined
387
+ */
388
+ getActiveWebrtcMeeting(): any;
361
389
  }
@@ -4,6 +4,7 @@ import { IExternalRoles, IMediaStatus } from './types';
4
4
  */
5
5
  export default class Member {
6
6
  associatedUser: any;
7
+ canReclaimHost: boolean;
7
8
  id: any;
8
9
  isAudioMuted: any;
9
10
  isContentSharing: any;
@@ -6,6 +6,7 @@ export declare enum ServerRoles {
6
6
  export type ServerRoleShape = {
7
7
  type: ServerRoles;
8
8
  hasRole: boolean;
9
+ hostKey?: string;
9
10
  };
10
11
  export type RoleAssignmentOptions = {
11
12
  roles: Array<ServerRoleShape>;
@@ -121,6 +121,11 @@ declare const MembersUtil: {
121
121
  };
122
122
  };
123
123
  };
124
+ /**
125
+ * @param {ServerRoleShape} role
126
+ * @returns {ServerRoleShape} the role shape to be added to the body
127
+ */
128
+ getAddedRoleShape: (role: ServerRoleShape) => ServerRoleShape;
124
129
  /**
125
130
  * @param {RoleAssignmentOptions} options
126
131
  * @returns {RoleAssignmentRequest} the request parameters (method, uri, body) needed to make a addMember request
@@ -1,12 +1,14 @@
1
1
  declare const BEHAVIORAL_METRICS: {
2
2
  MEETINGS_REGISTRATION_FAILED: string;
3
3
  MEETINGS_REGISTRATION_SUCCESS: string;
4
+ MEETINGS_REGISTRATION_STEP: string;
4
5
  MERCURY_CONNECTION_FAILURE: string;
5
6
  MERCURY_CONNECTION_RESTORED: string;
6
7
  JOIN_SUCCESS: string;
7
8
  JOIN_FAILURE: string;
8
9
  ADD_MEDIA_SUCCESS: string;
9
10
  ADD_MEDIA_FAILURE: string;
11
+ ADD_MEDIA_RETRY: string;
10
12
  ROAP_MERCURY_EVENT_RECEIVED: string;
11
13
  CONNECTION_SUCCESS: string;
12
14
  CONNECTION_FAILURE: string;
@@ -16,13 +18,17 @@ declare const BEHAVIORAL_METRICS: {
16
18
  GET_USER_MEDIA_FAILURE: string;
17
19
  GET_DISPLAY_MEDIA_FAILURE: string;
18
20
  JOIN_WITH_MEDIA_FAILURE: string;
21
+ LLM_CONNECTION_AFTER_JOIN_FAILURE: string;
22
+ RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: string;
19
23
  DISCONNECT_DUE_TO_INACTIVITY: string;
20
24
  MEETING_MEDIA_INACTIVE: string;
21
25
  MEETING_RECONNECT_FAILURE: string;
22
26
  MEETING_MAX_REJOIN_FAILURE: string;
27
+ MEETING_SHARE_SUCCESS: string;
23
28
  MEETING_SHARE_FAILURE: string;
24
29
  MEETING_START_WHITEBOARD_SHARE_FAILURE: string;
25
30
  MEETING_STOP_WHITEBOARD_SHARE_FAILURE: string;
31
+ MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE: string;
26
32
  MUTE_AUDIO_FAILURE: string;
27
33
  MUTE_VIDEO_FAILURE: string;
28
34
  SET_MEETING_QUALITY_FAILURE: string;
@@ -37,6 +43,7 @@ declare const BEHAVIORAL_METRICS: {
37
43
  PEERCONNECTION_FAILURE: string;
38
44
  INVALID_ICE_CANDIDATE: string;
39
45
  UPLOAD_LOGS_FAILURE: string;
46
+ UPLOAD_LOGS_SUCCESS: string;
40
47
  RECEIVE_TRANSCRIPTION_FAILURE: string;
41
48
  FETCH_MEETING_INFO_V1_SUCCESS: string;
42
49
  FETCH_MEETING_INFO_V1_FAILURE: string;
@@ -51,5 +58,13 @@ declare const BEHAVIORAL_METRICS: {
51
58
  MOVE_FROM_FAILURE: string;
52
59
  TURN_DISCOVERY_FAILURE: string;
53
60
  MEETING_INFO_POLICY_ERROR: string;
61
+ LOCUS_DELTA_SYNC_FAILED: string;
62
+ LOCUS_DELTA_OUT_OF_ORDER: string;
63
+ PERMISSION_TOKEN_REFRESH: string;
64
+ PERMISSION_TOKEN_REFRESH_ERROR: string;
65
+ TURN_DISCOVERY_LATENCY: string;
66
+ ROAP_OFFER_TO_ANSWER_LATENCY: string;
67
+ ROAP_HTTP_RESPONSE_MISSING: string;
68
+ TURN_DISCOVERY_REQUIRES_OK: string;
54
69
  };
55
70
  export { BEHAVIORAL_METRICS as default };
@@ -1,4 +1,5 @@
1
1
  import { StreamRequest } from '@webex/internal-media-core';
2
+ import { NamedMediaGroup } from '@webex/json-multistream';
2
3
  import { ReceiveSlot } from './receiveSlot';
3
4
  export interface ActiveSpeakerPolicyInfo {
4
5
  policy: 'active-speaker';
@@ -6,6 +7,7 @@ export interface ActiveSpeakerPolicyInfo {
6
7
  crossPriorityDuplication: boolean;
7
8
  crossPolicyDuplication: boolean;
8
9
  preferLiveVideo: boolean;
10
+ namedMediaGroups?: NamedMediaGroup[];
9
11
  }
10
12
  export interface ReceiverSelectedPolicyInfo {
11
13
  policy: 'receiver-selected';
@@ -1,9 +1,11 @@
1
+ import { NamedMediaGroup } from '@webex/json-multistream';
1
2
  import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
2
3
  import { MediaRequestManager } from './mediaRequestManager';
3
4
  import { CSI, ReceiveSlot } from './receiveSlot';
4
5
  type Options = {
5
6
  resolution?: RemoteVideoResolution;
6
7
  preferLiveVideo?: boolean;
8
+ namedMediaGroup?: NamedMediaGroup;
7
9
  };
8
10
  export declare class RemoteMediaGroup {
9
11
  private mediaRequestManager;
@@ -1,4 +1,6 @@
1
1
  import { EventMap } from 'typed-emitter';
2
+ import { MediaType } from '@webex/internal-media-core';
3
+ import { NamedMediaGroup } from '@webex/json-multistream';
2
4
  import EventsScope from '../common/events/events-scope';
3
5
  import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
4
6
  import { CSI } from './receiveSlot';
@@ -39,6 +41,7 @@ export interface Configuration {
39
41
  [key: LayoutId]: VideoLayout;
40
42
  };
41
43
  };
44
+ namedMediaGroup?: NamedMediaGroup;
42
45
  }
43
46
  /**
44
47
  * Default configuration:
@@ -49,6 +52,7 @@ export interface Configuration {
49
52
  export declare const DefaultConfiguration: Configuration;
50
53
  export declare enum Event {
51
54
  AudioCreated = "AudioCreated",
55
+ InterpretationAudioCreated = "InterpretationAudioCreated",
52
56
  ScreenShareAudioCreated = "ScreenShareAudioCreated",
53
57
  VideoLayoutChanged = "VideoLayoutChanged"
54
58
  }
@@ -153,10 +157,22 @@ export declare class RemoteMediaManager extends EventsScope {
153
157
  remoteMedia: RemoteMedia;
154
158
  csi?: number;
155
159
  }[]): void;
160
+ /**
161
+ * Sets which named media group need receiving
162
+ * @param {MediaType} mediaType of the stream
163
+ * @param {number} languageCode of the stream. If the languageId is 0, the named media group request will be canceled,
164
+ * and only receive the main audio stream.
165
+ * @returns {void}
166
+ */
167
+ setReceiveNamedMediaGroup(mediaType: MediaType, languageId: number): Promise<void>;
156
168
  /**
157
169
  * Creates the audio slots
158
170
  */
159
171
  private createAudioMedia;
172
+ /**
173
+ * Creates the audio slots for named media
174
+ */
175
+ private createInterpretationAudioMedia;
160
176
  /**
161
177
  * Creates receive slots required for receiving screen share audio and video
162
178
  */
@@ -199,7 +215,15 @@ export declare class RemoteMediaManager extends EventsScope {
199
215
  /**
200
216
  * Logs the state of the receive slots
201
217
  */
202
- private logReceieveSlots;
218
+ private logMainVideoReceiveSlots;
219
+ /** logs main audio slots */
220
+ private logMainAudioReceiveSlots;
221
+ /** logs slides video slots */
222
+ private logSlidesVideoReceiveSlots;
223
+ /** logs slides audio slots */
224
+ private logSlidesAudioReceiveSlots;
225
+ /** Logs all current receive slots */
226
+ logAllReceiveSlots(): void;
203
227
  /**
204
228
  * Makes sure we have the right number of receive slots created for the current layout
205
229
  * and allocates them to the right video panes / pane groups
@@ -1,4 +1,5 @@
1
1
  import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection } from '@webex/internal-media-core';
2
+ import { NamedMediaGroup } from '@webex/json-multistream';
2
3
  export default class SendSlotManager {
3
4
  private readonly slots;
4
5
  private readonly LoggerProxy;
@@ -17,6 +18,14 @@ export default class SendSlotManager {
17
18
  * @returns {SendSlot}
18
19
  */
19
20
  getSlot(mediaType: MediaType): SendSlot;
21
+ /**
22
+ * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.
23
+ * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group
24
+ * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,
25
+ * named media group will be canceled and the audio stream will be sent to the floor.
26
+ * @returns {void}
27
+ */
28
+ setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void;
20
29
  /**
21
30
  * This method publishes the given stream to the sendSlot for the given mediaType
22
31
  * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
@@ -0,0 +1,109 @@
1
+ import { ClusterNode } from './request';
2
+ export type TransportResult = {
3
+ result: 'reachable' | 'unreachable' | 'untested';
4
+ latencyInMilliseconds?: number;
5
+ clientMediaIPs?: string[];
6
+ };
7
+ export type ClusterReachabilityResult = {
8
+ udp: TransportResult;
9
+ tcp: TransportResult;
10
+ xtls: TransportResult;
11
+ };
12
+ /**
13
+ * A class that handles reachability checks for a single cluster.
14
+ */
15
+ export declare class ClusterReachability {
16
+ private numUdpUrls;
17
+ private numTcpUrls;
18
+ private result;
19
+ private pc?;
20
+ private defer;
21
+ private startTimestamp;
22
+ readonly isVideoMesh: boolean;
23
+ readonly name: any;
24
+ /**
25
+ * Constructor for ClusterReachability
26
+ * @param {string} name cluster name
27
+ * @param {ClusterNode} clusterInfo information about the media cluster
28
+ */
29
+ constructor(name: string, clusterInfo: ClusterNode);
30
+ /**
31
+ * Gets total elapsed time, can be called only after start() is called
32
+ * @returns {Number} Milliseconds
33
+ */
34
+ private getElapsedTime;
35
+ /**
36
+ * Generate peerConnection config settings
37
+ * @param {ClusterNode} cluster
38
+ * @returns {RTCConfiguration} peerConnectionConfig
39
+ */
40
+ private buildPeerConnectionConfig;
41
+ /**
42
+ * Creates an RTCPeerConnection
43
+ * @param {ClusterNode} clusterInfo information about the media cluster
44
+ * @returns {RTCPeerConnection} peerConnection
45
+ */
46
+ private createPeerConnection;
47
+ /**
48
+ * @returns {ClusterReachabilityResult} reachability result for this cluster
49
+ */
50
+ getResult(): ClusterReachabilityResult;
51
+ /**
52
+ * Closes the peerConnection
53
+ *
54
+ * @returns {void}
55
+ */
56
+ private closePeerConnection;
57
+ /**
58
+ * Resolves the defer, indicating that reachability checks for this cluster are completed
59
+ *
60
+ * @returns {void}
61
+ */
62
+ private finishReachabilityCheck;
63
+ /**
64
+ * Adds public IP (client media IPs)
65
+ * @param {string} protocol
66
+ * @param {string} publicIP
67
+ * @returns {void}
68
+ */
69
+ private addPublicIP;
70
+ /**
71
+ * Registers a listener for the iceGatheringStateChange event
72
+ *
73
+ * @returns {void}
74
+ */
75
+ private registerIceGatheringStateChangeListener;
76
+ /**
77
+ * Checks if we have the results for all the protocols (UDP and TCP)
78
+ *
79
+ * @returns {boolean} true if we have all results, false otherwise
80
+ */
81
+ private haveWeGotAllResults;
82
+ /**
83
+ * Stores the latency in the result for the given protocol and marks it as reachable
84
+ *
85
+ * @param {string} protocol
86
+ * @param {number} latency
87
+ * @returns {void}
88
+ */
89
+ private storeLatencyResult;
90
+ /**
91
+ * Registers a listener for the icecandidate event
92
+ *
93
+ * @returns {void}
94
+ */
95
+ private registerIceCandidateListener;
96
+ /**
97
+ * Starts the process of doing UDP and TCP reachability checks on the media cluster.
98
+ * XTLS reachability checking is not supported.
99
+ *
100
+ * @returns {Promise}
101
+ */
102
+ start(): Promise<ClusterReachabilityResult>;
103
+ /**
104
+ * Starts the process of gathering ICE candidates
105
+ *
106
+ * @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached
107
+ */
108
+ private gatherIceCandidates;
109
+ }
@@ -1,12 +1,37 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- import { IP_VERSION } from '../constants';
5
- export type ICECandidateResult = {
6
- clusterId: string;
7
- elapsed?: string | null;
8
- publicIPs?: string[];
4
+ import ReachabilityRequest from './request';
5
+ import { ClusterReachability, ClusterReachabilityResult } from './clusterReachability';
6
+ export type ReachabilityMetrics = {
7
+ reachability_public_udp_success: number;
8
+ reachability_public_udp_failed: number;
9
+ reachability_public_tcp_success: number;
10
+ reachability_public_tcp_failed: number;
11
+ reachability_vmn_udp_success: number;
12
+ reachability_vmn_udp_failed: number;
13
+ reachability_vmn_tcp_success: number;
14
+ reachability_vmn_tcp_failed: number;
9
15
  };
16
+ /**
17
+ * This is the type that matches what backend expects us to send to them. It is a bit weird, because
18
+ * it uses strings instead of booleans and numbers, but that's what they require.
19
+ */
20
+ export type TransportResultForBackend = {
21
+ reachable?: 'true' | 'false';
22
+ latencyInMilliseconds?: string;
23
+ clientMediaIPs?: string[];
24
+ untested?: 'true';
25
+ };
26
+ export type ReachabilityResultForBackend = {
27
+ udp: TransportResultForBackend;
28
+ tcp: TransportResultForBackend;
29
+ xtls: TransportResultForBackend;
30
+ };
31
+ export type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;
32
+ export type ReachabilityResults = Record<string, ClusterReachabilityResult & {
33
+ isVideoMesh?: boolean;
34
+ }>;
10
35
  /**
11
36
  * @class Reachability
12
37
  * @export
@@ -14,8 +39,10 @@ export type ICECandidateResult = {
14
39
  export default class Reachability {
15
40
  namespace: string;
16
41
  webex: object;
17
- reachabilityRequest: any;
18
- clusterLatencyResults: any;
42
+ reachabilityRequest: ReachabilityRequest;
43
+ clusterReachability: {
44
+ [key: string]: ClusterReachability;
45
+ };
19
46
  /**
20
47
  * Creates an instance of Reachability.
21
48
  * @param {object} webex
@@ -23,92 +50,45 @@ export default class Reachability {
23
50
  */
24
51
  constructor(webex: object);
25
52
  /**
26
- * fetches reachability data
27
- * @returns {Object} reachability data
53
+ * Gets a list of media clusters from the backend and performs reachability checks on all the clusters
54
+ * @returns {Promise<ReachabilityResults>} reachability results
28
55
  * @public
29
- * @async
30
56
  * @memberof Reachability
31
57
  */
32
- gatherReachability(): Promise<unknown>;
58
+ gatherReachability(): Promise<ReachabilityResults>;
33
59
  /**
34
- * fetches reachability data and checks for cluster reachability
35
- * @returns {boolean}
36
- * @public
37
- * @memberof Reachability
38
- */
39
- isAnyClusterReachable(): Promise<boolean>;
40
- /**
41
- * Returns what we know about the IP version of the networks we're connected to.
42
- * @returns {IP_VERSION}
43
- */
44
- getIpVersion(): IP_VERSION;
45
- /**
46
- * Generate peerConnection config settings
47
- * @param {object} cluster
48
- * @returns {object} peerConnectionConfig
49
- * @private
50
- * @memberof Reachability
60
+ * Returns statistics about last reachability results. The returned value is an object
61
+ * with a flat list of properties so that it can be easily sent with metrics
62
+ *
63
+ * @returns {Promise} Promise with metrics values, it never rejects/throws.
51
64
  */
52
- private buildPeerConnectionConfig;
65
+ getReachabilityMetrics(): Promise<ReachabilityMetrics>;
53
66
  /**
54
- * Creates an RTCPeerConnection
55
- * @param {object} cluster
56
- * @returns {RTCPeerConnection} peerConnection
57
- * @private
58
- * @memberof Reachability
67
+ * Maps our internal transport result to the format that backend expects
68
+ * @param {TransportResult} transportResult
69
+ * @returns {TransportResultForBackend}
59
70
  */
60
- private createPeerConnection;
71
+ private mapTransportResultToBackendDataFormat;
61
72
  /**
62
- * Gets total elapsed time
63
- * @param {RTCPeerConnection} peerConnection
64
- * @returns {Number} Milliseconds
65
- * @private
66
- * @memberof Reachability
73
+ * Reachability results as an object in the format that backend expects
74
+ *
75
+ * @returns {any} reachability results that need to be sent to the backend
67
76
  */
68
- private getElapsedTime;
77
+ getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined>;
69
78
  /**
70
- * creates offer and generates localSDP
71
- * @param {object} clusterList cluster List
72
- * @returns {Promise} Reachability latency results
73
- * @private
79
+ * fetches reachability data and checks for cluster reachability
80
+ * @returns {boolean}
81
+ * @public
74
82
  * @memberof Reachability
75
83
  */
76
- private getLocalSDPForClusters;
84
+ isAnyPublicClusterReachable(): Promise<boolean>;
77
85
  /**
78
86
  * Get list of all unreachable clusters
79
87
  * @returns {array} Unreachable clusters
80
88
  * @private
81
89
  * @memberof Reachability
82
90
  */
83
- private getUnreachablClusters;
84
- /**
85
- * Attach an event handler for the icegatheringstatechange
86
- * event and measure latency.
87
- * @param {RTCPeerConnection} peerConnection
88
- * @returns {undefined}
89
- * @private
90
- * @memberof Reachability
91
- */
92
- private handleIceGatheringStateChange;
93
- /**
94
- * Attach an event handler for the icecandidate
95
- * event and measure latency.
96
- * @param {RTCPeerConnection} peerConnection
97
- * @returns {undefined}
98
- * @private
99
- * @memberof Reachability
100
- */
101
- private handleOnIceCandidate;
102
- /**
103
- * An event handler on an RTCPeerConnection when the state of the ICE
104
- * candidate gathering process changes. Used to measure connection
105
- * speed.
106
- * @private
107
- * @param {RTCPeerConnection} peerConnection
108
- * @param {number} timeout
109
- * @returns {Promise}
110
- */
111
- private iceGatheringState;
91
+ private getUnreachableClusters;
112
92
  /**
113
93
  * Make a log of unreachable clusters.
114
94
  * @returns {undefined}
@@ -117,42 +97,9 @@ export default class Reachability {
117
97
  */
118
98
  private logUnreachableClusters;
119
99
  /**
120
- * Calculates time to establish connection
121
- * @param {Array<ICECandidateResult>} iceResults iceResults
122
- * @returns {object} reachabilityMap
123
- * @protected
124
- * @memberof Reachability
125
- */
126
- protected parseIceResultsToReachabilityResults(iceResults: Array<ICECandidateResult>): {};
127
- /**
128
- * fetches reachability data
129
- * @param {object} clusterList
130
- * @returns {Promise<localSDPData>} reachability check results
131
- * @private
132
- * @memberof Reachability
133
- */
134
- private performReachabilityCheck;
135
- /**
136
- * Adds public IP (client media IPs)
137
- * @param {RTCPeerConnection} peerConnection
138
- * @param {string} publicIP
139
- * @returns {void}
140
- */
141
- protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null): void;
142
- /**
143
- * Records latency and closes the peerConnection
144
- * @param {RTCPeerConnection} peerConnection
145
- * @param {number} elapsed Latency in milliseconds
146
- * @returns {undefined}
147
- * @private
148
- * @memberof Reachability
149
- */
150
- private setLatencyAndClose;
151
- /**
152
- * utility function
153
- * @returns {undefined}
154
- * @private
155
- * @memberof Reachability
100
+ * Performs reachability checks for all clusters
101
+ * @param {ClusterList} clusterList
102
+ * @returns {Promise<ReachabilityResults>} reachability check results
156
103
  */
157
- private setup;
104
+ private performReachabilityChecks;
158
105
  }
@@ -25,7 +25,7 @@ declare class ReachabilityRequest {
25
25
  * @param {IP_VERSION} ipVersion information about current ip network we're on
26
26
  * @returns {Promise}
27
27
  */
28
- getClusters: (ipVersion: IP_VERSION) => Promise<{
28
+ getClusters: (ipVersion?: IP_VERSION) => Promise<{
29
29
  clusters: ClusterList;
30
30
  joinCookie: any;
31
31
  }>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts a stun url to a turn url
3
+ *
4
+ * @param {string} stunUrl url of a stun server
5
+ * @param {'tcp'|'udp'} protocol what protocol to use for the turn server
6
+ * @returns {string} url of a turn server
7
+ */
8
+ export declare function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp'): string;