@webex/plugin-meetings 3.0.0-stream-classes.5 → 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 (233) 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 +67 -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 +15 -10
  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 +37 -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 +2143 -1087
  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 +33 -18
  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 +13 -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 +177 -65
  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 +65 -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 +272 -35
  114. package/dist/types/meeting/muteState.d.ts +2 -8
  115. package/dist/types/meeting/request.d.ts +2 -0
  116. package/dist/types/meeting/util.d.ts +16 -0
  117. package/dist/types/meeting-info/index.d.ts +7 -0
  118. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  119. package/dist/types/meetings/collection.d.ts +9 -0
  120. package/dist/types/meetings/index.d.ts +42 -14
  121. package/dist/types/member/index.d.ts +1 -0
  122. package/dist/types/members/types.d.ts +1 -0
  123. package/dist/types/members/util.d.ts +5 -0
  124. package/dist/types/metrics/constants.d.ts +12 -0
  125. package/dist/types/multistream/mediaRequestManager.d.ts +2 -0
  126. package/dist/types/multistream/remoteMediaGroup.d.ts +2 -0
  127. package/dist/types/multistream/remoteMediaManager.d.ts +16 -0
  128. package/dist/types/multistream/sendSlotManager.d.ts +9 -0
  129. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  130. package/dist/types/reachability/index.d.ts +59 -106
  131. package/dist/types/reachability/util.d.ts +8 -0
  132. package/dist/types/reconnection-manager/index.d.ts +10 -0
  133. package/dist/types/roap/index.d.ts +2 -1
  134. package/dist/types/roap/turnDiscovery.d.ts +21 -4
  135. package/dist/types/rtcMetrics/index.d.ts +15 -1
  136. package/dist/types/statsAnalyzer/index.d.ts +28 -11
  137. package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
  138. package/dist/types/webinar/collection.d.ts +16 -0
  139. package/dist/types/webinar/index.d.ts +5 -0
  140. package/dist/webinar/collection.js +44 -0
  141. package/dist/webinar/collection.js.map +1 -0
  142. package/dist/webinar/index.js +69 -0
  143. package/dist/webinar/index.js.map +1 -0
  144. package/package.json +3 -2
  145. package/src/common/errors/no-meeting-info.ts +24 -0
  146. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  147. package/src/common/errors/webex-errors.ts +19 -2
  148. package/src/common/logs/request.ts +5 -1
  149. package/src/config.ts +1 -1
  150. package/src/constants.ts +70 -6
  151. package/src/index.ts +5 -0
  152. package/src/interceptors/index.ts +3 -0
  153. package/src/interceptors/locusRetry.ts +67 -0
  154. package/src/interpretation/index.ts +18 -1
  155. package/src/locus-info/index.ts +19 -14
  156. package/src/locus-info/mediaSharesUtils.ts +16 -0
  157. package/src/locus-info/parser.ts +40 -21
  158. package/src/media/index.ts +8 -6
  159. package/src/media/properties.ts +17 -2
  160. package/src/mediaQualityMetrics/config.ts +103 -238
  161. package/src/meeting/in-meeting-actions.ts +8 -0
  162. package/src/meeting/index.ts +1471 -533
  163. package/src/meeting/muteState.ts +34 -20
  164. package/src/meeting/request.ts +18 -0
  165. package/src/meeting/util.ts +97 -0
  166. package/src/meeting-info/index.ts +47 -20
  167. package/src/meeting-info/meeting-info-v2.ts +27 -5
  168. package/src/meeting-info/utilv2.ts +1 -1
  169. package/src/meetings/collection.ts +13 -0
  170. package/src/meetings/index.ts +112 -31
  171. package/src/meetings/util.ts +2 -8
  172. package/src/member/index.ts +9 -0
  173. package/src/member/util.ts +14 -0
  174. package/src/members/index.ts +29 -2
  175. package/src/members/types.ts +1 -0
  176. package/src/members/util.ts +15 -1
  177. package/src/metrics/constants.ts +12 -0
  178. package/src/multistream/mediaRequestManager.ts +4 -1
  179. package/src/multistream/remoteMediaGroup.ts +19 -0
  180. package/src/multistream/remoteMediaManager.ts +101 -15
  181. package/src/multistream/sendSlotManager.ts +29 -0
  182. package/src/reachability/clusterReachability.ts +320 -0
  183. package/src/reachability/index.ts +221 -382
  184. package/src/reachability/request.ts +1 -1
  185. package/src/reachability/util.ts +24 -0
  186. package/src/reconnection-manager/index.ts +87 -83
  187. package/src/roap/index.ts +60 -24
  188. package/src/roap/request.ts +3 -16
  189. package/src/roap/turnDiscovery.ts +112 -39
  190. package/src/rtcMetrics/index.ts +71 -5
  191. package/src/statsAnalyzer/index.ts +430 -427
  192. package/src/statsAnalyzer/mqaUtil.ts +317 -168
  193. package/src/webinar/collection.ts +31 -0
  194. package/src/webinar/index.ts +62 -0
  195. package/test/integration/spec/journey.js +22 -22
  196. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  197. package/test/unit/spec/interpretation/index.ts +36 -3
  198. package/test/unit/spec/locus-info/index.js +87 -11
  199. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  200. package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
  201. package/test/unit/spec/locus-info/parser.js +54 -13
  202. package/test/unit/spec/media/index.ts +20 -4
  203. package/test/unit/spec/media/properties.ts +2 -2
  204. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  205. package/test/unit/spec/meeting/index.js +4178 -1289
  206. package/test/unit/spec/meeting/muteState.js +219 -67
  207. package/test/unit/spec/meeting/request.js +63 -12
  208. package/test/unit/spec/meeting/utils.js +93 -0
  209. package/test/unit/spec/meeting-info/index.js +180 -61
  210. package/test/unit/spec/meeting-info/meetinginfov2.js +196 -53
  211. package/test/unit/spec/meetings/collection.js +12 -0
  212. package/test/unit/spec/meetings/index.js +617 -204
  213. package/test/unit/spec/meetings/utils.js +35 -12
  214. package/test/unit/spec/member/index.js +8 -7
  215. package/test/unit/spec/member/util.js +32 -0
  216. package/test/unit/spec/members/index.js +130 -17
  217. package/test/unit/spec/members/utils.js +26 -0
  218. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  219. package/test/unit/spec/multistream/remoteMediaGroup.ts +80 -1
  220. package/test/unit/spec/multistream/remoteMediaManager.ts +200 -1
  221. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  222. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  223. package/test/unit/spec/reachability/index.ts +505 -135
  224. package/test/unit/spec/reachability/util.ts +40 -0
  225. package/test/unit/spec/reconnection-manager/index.js +74 -17
  226. package/test/unit/spec/roap/index.ts +181 -61
  227. package/test/unit/spec/roap/request.ts +27 -3
  228. package/test/unit/spec/roap/turnDiscovery.ts +362 -101
  229. package/test/unit/spec/rtcMetrics/index.ts +57 -3
  230. package/test/unit/spec/stats-analyzer/index.js +1225 -12
  231. package/test/unit/spec/webinar/collection.ts +13 -0
  232. package/test/unit/spec/webinar/index.ts +60 -0
  233. 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;
@@ -54,5 +60,11 @@ declare const BEHAVIORAL_METRICS: {
54
60
  MEETING_INFO_POLICY_ERROR: string;
55
61
  LOCUS_DELTA_SYNC_FAILED: string;
56
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;
57
69
  };
58
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
  */
@@ -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,11 +1,37 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- export type ICECandidateResult = {
5
- clusterId: string;
6
- elapsed?: string | null;
7
- 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;
8
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
+ }>;
9
35
  /**
10
36
  * @class Reachability
11
37
  * @export
@@ -13,8 +39,10 @@ export type ICECandidateResult = {
13
39
  export default class Reachability {
14
40
  namespace: string;
15
41
  webex: object;
16
- reachabilityRequest: any;
17
- clusterLatencyResults: any;
42
+ reachabilityRequest: ReachabilityRequest;
43
+ clusterReachability: {
44
+ [key: string]: ClusterReachability;
45
+ };
18
46
  /**
19
47
  * Creates an instance of Reachability.
20
48
  * @param {object} webex
@@ -22,87 +50,45 @@ export default class Reachability {
22
50
  */
23
51
  constructor(webex: object);
24
52
  /**
25
- * fetches reachability data
26
- * @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
27
55
  * @public
28
- * @async
29
56
  * @memberof Reachability
30
57
  */
31
- gatherReachability(): Promise<unknown>;
58
+ gatherReachability(): Promise<ReachabilityResults>;
32
59
  /**
33
- * fetches reachability data and checks for cluster reachability
34
- * @returns {boolean}
35
- * @public
36
- * @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.
37
64
  */
38
- isAnyClusterReachable(): Promise<boolean>;
65
+ getReachabilityMetrics(): Promise<ReachabilityMetrics>;
39
66
  /**
40
- * Generate peerConnection config settings
41
- * @param {object} cluster
42
- * @returns {object} peerConnectionConfig
43
- * @private
44
- * @memberof Reachability
67
+ * Maps our internal transport result to the format that backend expects
68
+ * @param {TransportResult} transportResult
69
+ * @returns {TransportResultForBackend}
45
70
  */
46
- private buildPeerConnectionConfig;
71
+ private mapTransportResultToBackendDataFormat;
47
72
  /**
48
- * Creates an RTCPeerConnection
49
- * @param {object} cluster
50
- * @returns {RTCPeerConnection} peerConnection
51
- * @private
52
- * @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
53
76
  */
54
- private createPeerConnection;
77
+ getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined>;
55
78
  /**
56
- * Gets total elapsed time
57
- * @param {RTCPeerConnection} peerConnection
58
- * @returns {Number} Milliseconds
59
- * @private
60
- * @memberof Reachability
61
- */
62
- private getElapsedTime;
63
- /**
64
- * creates offer and generates localSDP
65
- * @param {object} clusterList cluster List
66
- * @returns {Promise} Reachability latency results
67
- * @private
79
+ * fetches reachability data and checks for cluster reachability
80
+ * @returns {boolean}
81
+ * @public
68
82
  * @memberof Reachability
69
83
  */
70
- private getLocalSDPForClusters;
84
+ isAnyPublicClusterReachable(): Promise<boolean>;
71
85
  /**
72
86
  * Get list of all unreachable clusters
73
87
  * @returns {array} Unreachable clusters
74
88
  * @private
75
89
  * @memberof Reachability
76
90
  */
77
- private getUnreachablClusters;
78
- /**
79
- * Attach an event handler for the icegatheringstatechange
80
- * event and measure latency.
81
- * @param {RTCPeerConnection} peerConnection
82
- * @returns {undefined}
83
- * @private
84
- * @memberof Reachability
85
- */
86
- private handleIceGatheringStateChange;
87
- /**
88
- * Attach an event handler for the icecandidate
89
- * event and measure latency.
90
- * @param {RTCPeerConnection} peerConnection
91
- * @returns {undefined}
92
- * @private
93
- * @memberof Reachability
94
- */
95
- private handleOnIceCandidate;
96
- /**
97
- * An event handler on an RTCPeerConnection when the state of the ICE
98
- * candidate gathering process changes. Used to measure connection
99
- * speed.
100
- * @private
101
- * @param {RTCPeerConnection} peerConnection
102
- * @param {number} timeout
103
- * @returns {Promise}
104
- */
105
- private iceGatheringState;
91
+ private getUnreachableClusters;
106
92
  /**
107
93
  * Make a log of unreachable clusters.
108
94
  * @returns {undefined}
@@ -111,42 +97,9 @@ export default class Reachability {
111
97
  */
112
98
  private logUnreachableClusters;
113
99
  /**
114
- * Calculates time to establish connection
115
- * @param {Array<ICECandidateResult>} iceResults iceResults
116
- * @returns {object} reachabilityMap
117
- * @protected
118
- * @memberof Reachability
119
- */
120
- protected parseIceResultsToReachabilityResults(iceResults: Array<ICECandidateResult>): {};
121
- /**
122
- * fetches reachability data
123
- * @param {object} clusterList
124
- * @returns {Promise<localSDPData>} reachability check results
125
- * @private
126
- * @memberof Reachability
127
- */
128
- private performReachabilityCheck;
129
- /**
130
- * Adds public IP (client media IPs)
131
- * @param {RTCPeerConnection} peerConnection
132
- * @param {string} publicIP
133
- * @returns {void}
134
- */
135
- protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null): void;
136
- /**
137
- * Records latency and closes the peerConnection
138
- * @param {RTCPeerConnection} peerConnection
139
- * @param {number} elapsed Latency in milliseconds
140
- * @returns {undefined}
141
- * @private
142
- * @memberof Reachability
143
- */
144
- private setLatencyAndClose;
145
- /**
146
- * utility function
147
- * @returns {undefined}
148
- * @private
149
- * @memberof Reachability
100
+ * Performs reachability checks for all clusters
101
+ * @param {ClusterList} clusterList
102
+ * @returns {Promise<ReachabilityResults>} reachability check results
150
103
  */
151
- private setup;
104
+ private performReachabilityChecks;
152
105
  }
@@ -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;
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
+ import { RECONNECTION_STATE } from '../constants';
4
5
  import Meeting from '../meeting';
5
6
  /**
6
7
  * @export
@@ -73,6 +74,15 @@ export default class ReconnectionManager {
73
74
  * @returns {Boolean} true if reconnection operation is in progress
74
75
  */
75
76
  isReconnectInProgress(): boolean;
77
+ /**
78
+ * Sets the reconnection status
79
+ *
80
+ * @public
81
+ * @param {RECONNECTION_STATE} status
82
+ * @memberof ReconnectionManager
83
+ * @returns {undefined}
84
+ */
85
+ setStatus(status: RECONNECTION_STATE): void;
76
86
  /**
77
87
  * @returns {Boolean}
78
88
  * @throws {ReconnectionError}
@@ -71,7 +71,8 @@ export default class Roap extends StatelessWebexPlugin {
71
71
  * @param {Meeting} meeting
72
72
  * @param {Boolean} isReconnecting should be set to true if this is a new
73
73
  * media connection just after a reconnection
74
+ * @param {Boolean} [isForced]
74
75
  * @returns {Promise}
75
76
  */
76
- doTurnDiscovery(meeting: Meeting, isReconnecting: boolean): any;
77
+ doTurnDiscovery(meeting: Meeting, isReconnecting: boolean, isForced?: boolean): any;
77
78
  }