@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
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { StatelessWebexPlugin } from '@webex/webex-core';
3
3
  import { ClientEvent, ClientEventLeaveReason } from '@webex/internal-plugin-metrics';
4
+ import { MediaType } from '@webex/internal-media-core';
4
5
  import { LocalStream, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream } from '@webex/media-helpers';
5
6
  import { StatsAnalyzer } from '../statsAnalyzer';
6
7
  import NetworkQualityMonitor from '../networkQualityMonitor';
@@ -11,6 +12,7 @@ import ReconnectionManager from '../reconnection-manager';
11
12
  import MeetingRequest from './request';
12
13
  import Members from '../members/index';
13
14
  import Transcription from '../transcription';
15
+ import { NETWORK_STATUS } from '../constants';
14
16
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
15
17
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
16
18
  import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager';
@@ -37,6 +39,11 @@ export type AddMediaOptions = {
37
39
  bundlePolicy?: BundlePolicy;
38
40
  allowMediaInLobby?: boolean;
39
41
  };
42
+ export type CallStateForMetrics = {
43
+ correlationId?: string;
44
+ joinTrigger?: string;
45
+ loginType?: string;
46
+ };
40
47
  export declare const MEDIA_UPDATE_TYPE: {
41
48
  TRANSCODED_MEDIA_CONNECTION: string;
42
49
  SHARE_FLOOR_REQUEST: string;
@@ -47,6 +54,12 @@ export declare enum ScreenShareFloorStatus {
47
54
  GRANTED = "floor_request_granted",
48
55
  RELEASED = "floor_released"
49
56
  }
57
+ type FetchMeetingInfoParams = {
58
+ password?: string;
59
+ captchaCode?: string;
60
+ extraParams?: Record<string, any>;
61
+ sendCAevents?: boolean;
62
+ };
50
63
  /**
51
64
  * MediaDirection
52
65
  * @typedef {Object} MediaDirection
@@ -299,8 +312,9 @@ export default class Meeting extends StatelessWebexPlugin {
299
312
  breakouts: any;
300
313
  simultaneousInterpretation: any;
301
314
  annotation: any;
315
+ webinar: any;
302
316
  conversationUrl: string;
303
- correlationId: string;
317
+ callStateForMetrics: CallStateForMetrics;
304
318
  destination: string;
305
319
  destinationType: string;
306
320
  deviceUrl: string;
@@ -355,8 +369,9 @@ export default class Meeting extends StatelessWebexPlugin {
355
369
  };
356
370
  meetingInfoFailureReason: string;
357
371
  meetingInfoFailureCode?: number;
372
+ meetingInfoExtraParams?: Record<string, any>;
358
373
  networkQualityMonitor: NetworkQualityMonitor;
359
- networkStatus: string;
374
+ networkStatus?: NETWORK_STATUS;
360
375
  passwordStatus: string;
361
376
  queuedMediaUpdates: any[];
362
377
  recording: any;
@@ -366,6 +381,7 @@ export default class Meeting extends StatelessWebexPlugin {
366
381
  requiredCaptcha: any;
367
382
  receiveSlotManager: ReceiveSlotManager;
368
383
  selfUserPolicies: any;
384
+ enforceVBGImagesURL: string;
369
385
  shareStatus: string;
370
386
  screenShareFloorState: ScreenShareFloorStatus;
371
387
  statsAnalyzer: StatsAnalyzer;
@@ -387,18 +403,27 @@ export default class Meeting extends StatelessWebexPlugin {
387
403
  meetingState: any;
388
404
  permissionToken: string;
389
405
  permissionTokenPayload: any;
406
+ permissionTokenReceivedLocalTime: number;
390
407
  resourceId: any;
391
408
  resourceUrl: string;
392
409
  selfId: string;
393
410
  state: any;
394
- localAudioStreamMuteStateHandler: (muted: boolean) => void;
395
- localVideoStreamMuteStateHandler: (muted: boolean) => void;
411
+ localAudioStreamMuteStateHandler: () => void;
412
+ localVideoStreamMuteStateHandler: () => void;
396
413
  localOutputTrackChangeHandler: () => void;
397
414
  roles: any[];
398
415
  environment: string;
399
416
  namespace: string;
400
417
  allowMediaInLobby: boolean;
418
+ localShareInstanceId: string;
419
+ remoteShareInstanceId: string;
420
+ turnDiscoverySkippedReason: string;
421
+ turnServerUsed: boolean;
422
+ private retriedWithTurnServer;
401
423
  private sendSlotManager;
424
+ private deferSDPAnswer?;
425
+ private sdpResponseTimer?;
426
+ private hasMediaConnectionConnectedAtLeastOnce;
402
427
  /**
403
428
  * @param {Object} attrs
404
429
  * @param {Object} options
@@ -418,30 +443,79 @@ export default class Meeting extends StatelessWebexPlugin {
418
443
  * @returns {Boolean}
419
444
  */
420
445
  isLocusCall(): boolean;
446
+ /**
447
+ * Getter - Returns callStateForMetrics.correlationId
448
+ * @returns {string}
449
+ */
450
+ get correlationId(): string;
451
+ /**
452
+ * Setter - sets callStateForMetrics.correlationId
453
+ * @param {string} correlationId
454
+ */
455
+ set correlationId(correlationId: string);
456
+ /**
457
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
458
+ * @param {any} info
459
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
460
+ * @returns {void}
461
+ */
462
+ private setMeetingInfo;
463
+ /**
464
+ * Add pre-fetched meeting info
465
+ *
466
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
467
+ *
468
+ * @param {Object} meetingInfo - Complete meeting info
469
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
470
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
471
+ * @returns {Promise<void>}
472
+ */
473
+ injectMeetingInfo(meetingInfo: any, fetchParams: FetchMeetingInfoParams, meetingLookupUrl: string | undefined): Promise<void>;
474
+ /**
475
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
476
+ *
477
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
478
+ * @param {String} caller - Name of the caller for logging
479
+ *
480
+ * @returns {Promise<void>}
481
+ * @private
482
+ */
483
+ private prepForFetchMeetingInfo;
484
+ /**
485
+ * Internal method for fetching meeting info
486
+ *
487
+ * @returns {Promise}
488
+ */
489
+ private fetchMeetingInfoInternal;
490
+ /**
491
+ * Refreshes the meeting info permission token (it's required for joining meetings)
492
+ *
493
+ * @param {string} [reason] used for metrics and logging purposes (optional)
494
+ * @returns {Promise}
495
+ */
496
+ refreshPermissionToken(reason?: string): Promise<void>;
421
497
  /**
422
498
  * Fetches meeting information.
423
499
  * @param {Object} options
424
500
  * @param {String} [options.password] optional
425
501
  * @param {String} [options.captchaCode] optional
502
+ * @param {Boolean} [options.sendCAevents] optional - Whether to submit Call Analyzer events or not. Default: false.
426
503
  * @public
427
504
  * @memberof Meeting
428
505
  * @returns {Promise}
429
506
  */
430
- fetchMeetingInfo({ password, captchaCode, extraParams, }: {
431
- password?: string;
432
- captchaCode?: string;
433
- extraParams?: Record<string, any>;
434
- }): Promise<void>;
507
+ fetchMeetingInfo(options: FetchMeetingInfoParams): Promise<void>;
435
508
  /**
436
509
  * Checks if the supplied password/host key is correct. It returns a promise with information whether the
437
510
  * password and captcha code were correct or not.
438
511
  * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
439
512
  * @param {String} captchaCode - can be undefined if captcha was not required by the server
513
+ * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information
440
514
  * @public
441
515
  * @memberof Meeting
442
516
  * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
443
517
  */
444
- verifyPassword(password: string, captchaCode: string): Promise<{
518
+ verifyPassword(password: string, captchaCode: string, sendCAevents?: boolean): Promise<{
445
519
  isPasswordValid: boolean;
446
520
  requiredCaptcha: any;
447
521
  failureReason: string;
@@ -510,7 +584,7 @@ export default class Meeting extends StatelessWebexPlugin {
510
584
  private setUpLocusFullStateListener;
511
585
  /**
512
586
  * sets the network status on meeting object
513
- * @param {String} networkStatus
587
+ * @param {NETWORK_STATUS} networkStatus
514
588
  * @private
515
589
  * @returns {undefined}
516
590
  * @memberof Meeting
@@ -728,24 +802,36 @@ export default class Meeting extends StatelessWebexPlugin {
728
802
  /**
729
803
  * Sets the meeting info on the class instance
730
804
  * @param {Object} meetingInfo
731
- * @param {Object} meetingInfo.body
732
- * @param {String} meetingInfo.body.conversationUrl
733
- * @param {String} meetingInfo.body.locusUrl
734
- * @param {String} meetingInfo.body.sipUri
735
- * @param {Object} meetingInfo.body.owner
805
+ * @param {String} meetingInfo.conversationUrl
806
+ * @param {String} meetingInfo.locusUrl
807
+ * @param {String} meetingInfo.sipUri
808
+ * @param {String} [meetingInfo.sipUrl]
809
+ * @param {String} [meetingInfo.sipMeetingUri]
810
+ * @param {String} [meetingInfo.meetingNumber]
811
+ * @param {String} [meetingInfo.meetingJoinUrl]
812
+ * @param {String} [meetingInfo.hostId]
813
+ * @param {String} [meetingInfo.permissionToken]
814
+ * @param {String} [meetingInfo.channel]
815
+ * @param {Object} meetingInfo.owner
736
816
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
817
+ * @param {Object | String} errors Meeting info request error
737
818
  * @returns {undefined}
738
819
  * @private
739
820
  * @memberof Meeting
740
821
  */
741
822
  parseMeetingInfo(meetingInfo: {
742
- body: {
743
- conversationUrl: string;
744
- locusUrl: string;
745
- sipUri: string;
746
- owner: object;
747
- };
748
- } | any, destination?: object | string | null): void;
823
+ conversationUrl: string;
824
+ locusUrl: string;
825
+ sipUri: string;
826
+ owner: object;
827
+ sipUrl?: string;
828
+ sipMeetingUri?: string;
829
+ meetingNumber?: string;
830
+ meetingJoinUrl?: string;
831
+ hostId?: string;
832
+ permissionToken?: string;
833
+ channel?: string;
834
+ }, destination?: object | string | null, errors?: any): void;
749
835
  /**
750
836
  * Indicates whether policy can be applied
751
837
  * @returns {boolean}
@@ -827,7 +913,7 @@ export default class Meeting extends StatelessWebexPlugin {
827
913
  * @returns {undefined}
828
914
  * @memberof Meeting
829
915
  */
830
- closeRemoteStreams(): Promise<[any, any, any, any]>;
916
+ closeRemoteStreams(): Promise<[any, any, any]>;
831
917
  /**
832
918
  * Stores the reference to a new microphone stream, sets up the required event listeners
833
919
  * on it, cleans up previous stream, etc.
@@ -886,13 +972,21 @@ export default class Meeting extends StatelessWebexPlugin {
886
972
  */
887
973
  unsetPeerConnections(): void;
888
974
  /**
889
- * Convenience method to set the correlation id for the Meeting
890
- * @param {String} id correlation id to set on the class
975
+ * Convenience method to set the correlation id for the callStateForMetrics
976
+ * @param {String} id correlation id to set on the callStateForMetrics
891
977
  * @returns {undefined}
892
- * @private
978
+ * @public
979
+ * @memberof Meeting
980
+ */
981
+ setCorrelationId(id: string): void;
982
+ /**
983
+ * Update the callStateForMetrics
984
+ * @param {CallStateForMetrics} callStateForMetrics updated values for callStateForMetrics
985
+ * @returns {undefined}
986
+ * @public
893
987
  * @memberof Meeting
894
988
  */
895
- private setCorrelationId;
989
+ updateCallStateForMetrics(callStateForMetrics: CallStateForMetrics): void;
896
990
  /**
897
991
  * Enqueue request for screenshare floor and set the status to pending
898
992
  * @returns {Promise}
@@ -947,7 +1041,10 @@ export default class Meeting extends StatelessWebexPlugin {
947
1041
  joinWithMedia(options?: {
948
1042
  joinOptions?: any;
949
1043
  mediaOptions?: AddMediaOptions;
950
- }): any;
1044
+ }): Promise<{
1045
+ join: any;
1046
+ media: void;
1047
+ }>;
951
1048
  /**
952
1049
  * Initiates the reconnection of the media in the meeting
953
1050
  *
@@ -1012,7 +1109,7 @@ export default class Meeting extends StatelessWebexPlugin {
1012
1109
  * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop
1013
1110
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
1014
1111
  */
1015
- join(options?: any): any;
1112
+ join(options?: any): Promise<any>;
1016
1113
  /**
1017
1114
  * Connects to low latency mercury and reconnects if the address has changed
1018
1115
  * It will also disconnect if called when the meeting has ended
@@ -1082,6 +1179,12 @@ export default class Meeting extends StatelessWebexPlugin {
1082
1179
  * @returns {void}
1083
1180
  */
1084
1181
  handleRoapFailure: (error: any) => void;
1182
+ /**
1183
+ * This function makes sure we send the right metrics when local and remote SDPs are processed/generated
1184
+ *
1185
+ * @returns {undefined}
1186
+ */
1187
+ setupSdpListeners: () => void;
1085
1188
  setupMediaConnectionListeners: () => void;
1086
1189
  /**
1087
1190
  * Registers for all required StatsAnalyzer events
@@ -1110,20 +1213,122 @@ export default class Meeting extends StatelessWebexPlugin {
1110
1213
  * @returns {void}
1111
1214
  */
1112
1215
  forwardEvent(eventEmitter: any, eventTypeToForward: any, meetingEventType: any): void;
1216
+ /**
1217
+ * Sets up all the references to local streams in this.mediaProperties before creating media connection
1218
+ * and before TURN discovery, so that the correct mute state is sent with TURN discovery roap messages.
1219
+ *
1220
+ * @private
1221
+ * @param {LocalStreams} localStreams
1222
+ * @returns {Promise<void>}
1223
+ */
1224
+ private setUpLocalStreamReferences;
1225
+ /**
1226
+ * Calls mediaProperties.waitForMediaConnectionConnected() and sends CA client.ice.end metric on failure
1227
+ *
1228
+ * @private
1229
+ * @returns {Promise<void>}
1230
+ */
1231
+ private waitForMediaConnectionConnected;
1232
+ /**
1233
+ * Enables statsAnalyser if config allows it
1234
+ *
1235
+ * @private
1236
+ * @returns {void}
1237
+ */
1238
+ private createStatsAnalyzer;
1239
+ /**
1240
+ * Handles device logging
1241
+ *
1242
+ * @private
1243
+ * @static
1244
+ * @returns {Promise<void>}
1245
+ */
1246
+ private static handleDeviceLogging;
1247
+ /**
1248
+ * Returns a promise. This promise is created once the local sdp offer has been successfully created and is resolved
1249
+ * once the remote sdp answer has been received.
1250
+ *
1251
+ * @private
1252
+ * @returns {Promise<void>}
1253
+ */
1254
+ private waitForRemoteSDPAnswer;
1255
+ /**
1256
+ * Calls establishMediaConnection with isForced = true to force turn discovery to happen
1257
+ *
1258
+ * @private
1259
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1260
+ * @param {BundlePolicy} [bundlePolicy]
1261
+ * @returns {Promise<void>}
1262
+ */
1263
+ private retryEstablishMediaConnectionWithForcedTurnDiscovery;
1264
+ /**
1265
+ * Does relevant clean up before retrying to establish media connection
1266
+ * and performs the retry with forced turn discovery
1267
+ *
1268
+ * @private
1269
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1270
+ * @param {BundlePolicy} [bundlePolicy]
1271
+ * @returns {Promise<void>}
1272
+ */
1273
+ private retryWithForcedTurnDiscovery;
1274
+ /**
1275
+ * If waitForMediaConnectionConnected() fails when we haven't done turn discovery then we
1276
+ * attempt to establish a media connection again, but this time using turn discovery. If we
1277
+ * used turn discovery on the first pass we do not attempt connection again.
1278
+ *
1279
+ * @private
1280
+ * @param {Error} error
1281
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1282
+ * @param {BundlePolicy} [bundlePolicy]
1283
+ * @returns {Promise<void>}
1284
+ */
1285
+ private handleWaitForMediaConnectionConnectedError;
1286
+ /**
1287
+ * Does TURN discovery, SDP offer/answer exhange, establishes ICE connection and DTLS handshake.
1288
+ *
1289
+ * @private
1290
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1291
+ * @param {BundlePolicy} [bundlePolicy]
1292
+ * @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results
1293
+ * @returns {Promise<void>}
1294
+ */
1295
+ private establishMediaConnection;
1296
+ /**
1297
+ * Cleans up stats analyzer, peer connection, and turns off listeners
1298
+ *
1299
+ * @private
1300
+ * @returns {Promise<void>}
1301
+ */
1302
+ private cleanUpOnAddMediaFailure;
1303
+ /**
1304
+ * Sends stats report, closes peer connection and cleans up any media connection
1305
+ * related things before trying to establish media connection again with turn server
1306
+ *
1307
+ * @private
1308
+ * @returns {Promise<void>}
1309
+ */
1310
+ private cleanUpBeforeRetryWithTurnServer;
1113
1311
  /**
1114
1312
  * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
1115
1313
  *
1116
1314
  * @param {AddMediaOptions} options
1117
- * @returns {Promise}
1315
+ * @returns {Promise<void>}
1118
1316
  * @public
1119
1317
  * @memberof Meeting
1120
1318
  */
1121
- addMedia(options?: AddMediaOptions): Promise<any>;
1319
+ addMedia(options?: AddMediaOptions): Promise<void>;
1122
1320
  /**
1123
1321
  * Informs if the peer connection is in a state that can be updated with updateMedia (audio/video/share)
1124
1322
  * @returns {Boolean}
1125
1323
  */
1126
1324
  canUpdateMedia(): boolean;
1325
+ /**
1326
+ * media failed, so collect a stats report from webrtc using the wcme connection to grab the rtc stats report
1327
+ * send a webrtc telemetry dump to the configured server using the internal media core check metrics configured callback
1328
+ * @param {String} callFrom - the function calling this function, optional.
1329
+ * @returns {Promise<void>}
1330
+ */
1331
+ private forceSendStatsReport;
1127
1332
  /**
1128
1333
  * Enqueues a media update operation.
1129
1334
  * @param {String} mediaUpdateType one of MEDIA_UPDATE_TYPE values
@@ -1390,6 +1595,14 @@ export default class Meeting extends StatelessWebexPlugin {
1390
1595
  * @returns {undefined}
1391
1596
  */
1392
1597
  private handleShareAudioStreamEnded;
1598
+ /**
1599
+ * Functionality for when a share video is muted or unmuted.
1600
+ * @private
1601
+ * @memberof Meeting
1602
+ * @param {boolean} muted
1603
+ * @returns {undefined}
1604
+ */
1605
+ private handleShareVideoStreamMuteStateChange;
1393
1606
  /**
1394
1607
  * Functionality for when a share video is ended.
1395
1608
  * @private
@@ -1493,6 +1706,13 @@ export default class Meeting extends StatelessWebexPlugin {
1493
1706
  * @returns {Promise<void>}
1494
1707
  */
1495
1708
  private updateTranscodedMediaConnection;
1709
+ /**
1710
+ * set sending named media group which the audio should send to
1711
+ * @param {MediaType} mediaType of the stream
1712
+ * @param {number} languageCode of the stream
1713
+ * @returns {void}
1714
+ */
1715
+ setSendNamedMediaGroup(mediaType: MediaType, languageCode?: number): void;
1496
1716
  /**
1497
1717
  * Publishes a stream.
1498
1718
  *
@@ -1524,10 +1744,27 @@ export default class Meeting extends StatelessWebexPlugin {
1524
1744
  */
1525
1745
  unpublishStreams(streams: LocalStream[]): Promise<void>;
1526
1746
  /**
1527
- * Gets the time left in seconds till the permission token expires
1747
+ * Gets permission token expiry information including timeLeft, expiryTime, currentTime
1528
1748
  * (from the time the function has been fired)
1529
1749
  *
1530
- * @returns {number} time left in seconds
1750
+ * @returns {object} permissionTokenExpiryInfo
1751
+ * @returns {number} permissionTokenExpiryInfo.timeLeft The time left for token to expire
1752
+ * @returns {number} permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server
1753
+ * @returns {number} permissionTokenExpiryInfo.currentTime The current time of the local machine
1754
+ */
1755
+ getPermissionTokenExpiryInfo(): {
1756
+ timeLeft: number;
1757
+ expiryTime: number;
1758
+ currentTime: number;
1759
+ };
1760
+ /**
1761
+ * Check if there is enough time left till the permission token expires
1762
+ * If not - refresh the permission token
1763
+ *
1764
+ * @param {number} threshold - time in seconds
1765
+ * @param {string} reason - reason for refreshing the permission token
1766
+ * @returns {Promise<void>}
1531
1767
  */
1532
- getPermissionTokenTimeLeftInSec(): number | undefined;
1768
+ checkAndRefreshPermissionToken(threshold: number, reason: string): Promise<void>;
1533
1769
  }
1770
+ export {};
@@ -72,7 +72,7 @@ export declare class MuteState {
72
72
  * @param {Boolean} [mute] true for muting, false for unmuting request
73
73
  * @returns {void}
74
74
  */
75
- handleLocalStreamMuteStateChange(meeting?: object, mute?: boolean): void;
75
+ handleLocalStreamMuteStateChange(meeting?: any): void;
76
76
  /**
77
77
  * Applies the current mute state to the local stream (by enabling or disabling it accordingly)
78
78
  *
@@ -116,12 +116,6 @@ export declare class MuteState {
116
116
  * @returns {Promise}
117
117
  */
118
118
  private sendRemoteMuteRequestToServer;
119
- /** Sets the mute state of the local stream according to what server thinks is our state
120
- * @param {Object} meeting - the meeting object
121
- * @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local stream
122
- * @returns {void}
123
- */
124
- private applyServerMuteToLocalStream;
125
119
  /** Applies the current value for unmute allowed to the underlying stream
126
120
  *
127
121
  * @param {Meeting} meeting
@@ -147,7 +141,7 @@ export declare class MuteState {
147
141
  * @param {Object} [meeting] the meeting object
148
142
  * @returns {undefined}
149
143
  */
150
- handleServerLocalUnmuteRequired(meeting?: object): void;
144
+ handleServerLocalUnmuteRequired(meeting?: any): void;
151
145
  /**
152
146
  * Returns true if the user is locally or remotely muted.
153
147
  * It only checks the mute status, ignoring the fact whether audio/video is enabled.
@@ -202,6 +202,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
202
202
  * @param {String} options.deviceUrl Url of a device
203
203
  * @param {String} options.resourceId Populated if you are paired to a device
204
204
  * @param {String} options.uri floor grant uri
205
+ * @param {String} options.shareInstanceId id for current share
205
206
  * @returns {Promise}
206
207
  */
207
208
  changeMeetingFloor(options: {
@@ -211,6 +212,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
211
212
  resourceId: string;
212
213
  uri: string;
213
214
  annotationInfo: AnnotationInfo;
215
+ shareInstanceId: string;
214
216
  } | any): any;
215
217
  /**
216
218
  * Sends a request to the DTMF endpoint to send tones
@@ -98,5 +98,21 @@ declare const MeetingUtil: {
98
98
  generateLocusDeltaRequest: (originalMeeting: any) => (originalOptions: any) => any;
99
99
  selfSupportsFeature: (feature: SELF_POLICY, userPolicies: Record<SELF_POLICY, boolean>) => boolean;
100
100
  parseInterpretationInfo: (meeting: any, meetingInfo: any) => void;
101
+ /**
102
+ * Returns a CA-recognized error payload for the specified raw error message/reason.
103
+ *
104
+ * New errors can be added to this function for handling in the future
105
+ *
106
+ * @param {String} reason the raw error message
107
+ * @returns {Array<object>} an array of payload objects
108
+ */
109
+ getChangeMeetingFloorErrorPayload: (reason: string) => {
110
+ fatal: boolean;
111
+ category: string;
112
+ errorCode: number;
113
+ errorDescription: string;
114
+ name: string;
115
+ shownToUser: boolean;
116
+ }[];
101
117
  };
102
118
  export default MeetingUtil;
@@ -49,6 +49,12 @@ export default class MeetingInfo {
49
49
  * Fetches meeting info from the server
50
50
  * @param {String} destination one of many different types of destinations to look up info for
51
51
  * @param {String} [type] to match up with the destination value
52
+ * @param {String} [password] meeting password
53
+ * @param {Object} [captchaInfo] captcha code and id
54
+ * @param {String} [installedOrgID]
55
+ * @param {String} [locusId]
56
+ * @param {Object} [extraParams]
57
+ * @param {Boolean} [options] meeting Id and whether Call Analyzer events should be sent
52
58
  * @returns {Promise} returns a meeting info object
53
59
  * @public
54
60
  * @memberof MeetingInfo
@@ -58,5 +64,6 @@ export default class MeetingInfo {
58
64
  id: string;
59
65
  }, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
60
66
  meetingId?: string;
67
+ sendCAevents?: boolean;
61
68
  }): any;
62
69
  }
@@ -118,5 +118,6 @@ export default class MeetingInfoV2 {
118
118
  id: string;
119
119
  }, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
120
120
  meetingId?: string;
121
+ sendCAevents?: boolean;
121
122
  }): Promise<any>;
122
123
  }
@@ -28,4 +28,13 @@ export default class MeetingCollection extends Collection {
28
28
  * @memberof MeetingCollection
29
29
  */
30
30
  getActiveBreakoutLocus(breakoutUrl: string): any;
31
+ /**
32
+ * Gets the meeting that has a webrtc media connection
33
+ * NOTE: this function assumes there is no more than 1 such meeting
34
+ *
35
+ * @returns {Meeting} first meeting found, else undefined
36
+ * @public
37
+ * @memberof MeetingCollection
38
+ */
39
+ getActiveWebrtcMeeting(): any;
31
40
  }