@webex/plugin-meetings 3.8.1-next.4 → 3.8.1-next.40

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 (94) hide show
  1. package/README.md +26 -13
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/constants.js +24 -2
  5. package/dist/constants.js.map +1 -1
  6. package/dist/interpretation/index.js +1 -1
  7. package/dist/interpretation/siLanguage.js +1 -1
  8. package/dist/locus-info/index.js +38 -84
  9. package/dist/locus-info/index.js.map +1 -1
  10. package/dist/media/index.js +2 -2
  11. package/dist/media/index.js.map +1 -1
  12. package/dist/meeting/brbState.js +14 -12
  13. package/dist/meeting/brbState.js.map +1 -1
  14. package/dist/meeting/in-meeting-actions.js +6 -0
  15. package/dist/meeting/in-meeting-actions.js.map +1 -1
  16. package/dist/meeting/index.js +213 -77
  17. package/dist/meeting/index.js.map +1 -1
  18. package/dist/meeting/request.js +19 -0
  19. package/dist/meeting/request.js.map +1 -1
  20. package/dist/meeting/request.type.js.map +1 -1
  21. package/dist/meeting/type.js +7 -0
  22. package/dist/meeting/type.js.map +1 -0
  23. package/dist/meeting/util.js +11 -0
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meetings/index.js +35 -33
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/members/index.js +11 -9
  28. package/dist/members/index.js.map +1 -1
  29. package/dist/members/request.js +3 -3
  30. package/dist/members/request.js.map +1 -1
  31. package/dist/members/util.js +18 -6
  32. package/dist/members/util.js.map +1 -1
  33. package/dist/multistream/mediaRequestManager.js +1 -1
  34. package/dist/multistream/mediaRequestManager.js.map +1 -1
  35. package/dist/multistream/remoteMedia.js +34 -5
  36. package/dist/multistream/remoteMedia.js.map +1 -1
  37. package/dist/multistream/remoteMediaGroup.js +42 -2
  38. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  39. package/dist/multistream/sendSlotManager.js +32 -2
  40. package/dist/multistream/sendSlotManager.js.map +1 -1
  41. package/dist/reachability/index.js +5 -10
  42. package/dist/reachability/index.js.map +1 -1
  43. package/dist/types/constants.d.ts +22 -0
  44. package/dist/types/locus-info/index.d.ts +0 -9
  45. package/dist/types/meeting/brbState.d.ts +0 -1
  46. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  47. package/dist/types/meeting/index.d.ts +35 -18
  48. package/dist/types/meeting/request.d.ts +9 -1
  49. package/dist/types/meeting/request.type.d.ts +74 -0
  50. package/dist/types/meeting/type.d.ts +9 -0
  51. package/dist/types/meeting/util.d.ts +3 -0
  52. package/dist/types/members/index.d.ts +10 -7
  53. package/dist/types/members/request.d.ts +1 -1
  54. package/dist/types/members/util.d.ts +7 -3
  55. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  56. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  57. package/dist/types/multistream/sendSlotManager.d.ts +16 -0
  58. package/dist/types/reachability/index.d.ts +2 -2
  59. package/dist/webinar/index.js +1 -1
  60. package/package.json +24 -25
  61. package/src/constants.ts +23 -2
  62. package/src/locus-info/index.ts +47 -82
  63. package/src/media/index.ts +2 -2
  64. package/src/meeting/brbState.ts +9 -7
  65. package/src/meeting/in-meeting-actions.ts +13 -0
  66. package/src/meeting/index.ts +168 -42
  67. package/src/meeting/request.ts +16 -0
  68. package/src/meeting/request.type.ts +64 -0
  69. package/src/meeting/type.ts +9 -0
  70. package/src/meeting/util.ts +13 -0
  71. package/src/meetings/index.ts +3 -2
  72. package/src/members/index.ts +13 -10
  73. package/src/members/request.ts +2 -2
  74. package/src/members/util.ts +16 -4
  75. package/src/multistream/mediaRequestManager.ts +7 -7
  76. package/src/multistream/remoteMedia.ts +34 -4
  77. package/src/multistream/remoteMediaGroup.ts +37 -2
  78. package/src/multistream/sendSlotManager.ts +34 -2
  79. package/src/reachability/index.ts +5 -13
  80. package/test/unit/spec/locus-info/index.js +177 -83
  81. package/test/unit/spec/media/index.ts +107 -0
  82. package/test/unit/spec/meeting/brbState.ts +9 -9
  83. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  84. package/test/unit/spec/meeting/index.js +694 -60
  85. package/test/unit/spec/meeting/request.js +71 -0
  86. package/test/unit/spec/meeting/utils.js +21 -0
  87. package/test/unit/spec/meetings/index.js +2 -0
  88. package/test/unit/spec/members/index.js +68 -9
  89. package/test/unit/spec/members/request.js +2 -2
  90. package/test/unit/spec/members/utils.js +27 -7
  91. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  92. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  93. package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
  94. package/test/unit/spec/reachability/index.ts +2 -6
@@ -382,10 +382,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
382
382
  /**
383
383
  * @param {Object} attrs
384
384
  * @param {Object} options
385
+ * @param {Function} callback - if provided, it will be called with the newly created meeting object as soon as the meeting.id is set
385
386
  * @constructor
386
387
  * @memberof Meeting
387
388
  */
388
- function Meeting(attrs, _options) {
389
+ function Meeting(attrs, _options, callback) {
389
390
  var _attrs$callStateForMe, _attrs$callStateForMe2, _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3, _this$locusInfo4;
390
391
  var _this;
391
392
  (0, _classCallCheck2.default)(this, Meeting);
@@ -1489,6 +1490,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1489
1490
  * @memberof Meeting
1490
1491
  */
1491
1492
  _this.id = _uuid.default.v4();
1493
+ if (callback) {
1494
+ callback((0, _assertThisInitialized2.default)(_this));
1495
+ }
1496
+
1492
1497
  /**
1493
1498
  * Call state used for metrics
1494
1499
  * @instance
@@ -3405,14 +3410,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3405
3410
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref12) {
3406
3411
  var spokenLanguage = _ref12.spokenLanguage;
3407
3412
  if (spokenLanguage) {
3408
- _this14.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
3413
+ var _this14$transcription;
3414
+ if ((_this14$transcription = _this14.transcription) !== null && _this14$transcription !== void 0 && _this14$transcription.languageOptions) {
3415
+ _this14.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
3416
+ }
3409
3417
  // @ts-ignore
3410
- _this14.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage);
3418
+ _this14.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage, _this14.id);
3411
3419
  _triggerProxy.default.trigger(_this14, {
3412
3420
  file: 'meeting/index',
3413
3421
  function: 'setupLocusControlsListener'
3414
3422
  }, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, {
3415
- spokenLanguage: spokenLanguage
3423
+ spokenLanguage: spokenLanguage,
3424
+ meetingId: _this14.id
3416
3425
  });
3417
3426
  }
3418
3427
  });
@@ -3651,9 +3660,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3651
3660
  // There is no concept of local/remote share for whiteboard
3652
3661
  // It does not matter who requested to share the whiteboard, everyone gets the same view
3653
3662
  else if (whiteboardShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
3654
- // WHITEBOARD - sharing whiteboard
3655
- // Webinar attendee should receive whiteboard as remote share
3656
- newShareStatus = (_this15$locusInfo = _this15.locusInfo) !== null && _this15$locusInfo !== void 0 && (_this15$locusInfo$inf = _this15$locusInfo.info) !== null && _this15$locusInfo$inf !== void 0 && _this15$locusInfo$inf.isWebinar && (_this15$webinar = _this15.webinar) !== null && _this15$webinar !== void 0 && _this15$webinar.selfIsAttendee ? _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE : _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3663
+ if ((_this15$locusInfo = _this15.locusInfo) !== null && _this15$locusInfo !== void 0 && (_this15$locusInfo$inf = _this15$locusInfo.info) !== null && _this15$locusInfo$inf !== void 0 && _this15$locusInfo$inf.isWebinar && (_this15$webinar = _this15.webinar) !== null && _this15$webinar !== void 0 && _this15$webinar.selfIsAttendee) {
3664
+ // WHITEBOARD - sharing whiteboard
3665
+ // Webinar attendee should receive whiteboard as remote share
3666
+ newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3667
+ } else if (_this15.guest) {
3668
+ // If user is a guest to a meeting, they should receive whiteboard as remote share
3669
+ newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3670
+ } else {
3671
+ newShareStatus = _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3672
+ }
3657
3673
  }
3658
3674
  // or if content share is either released or null and whiteboard share is either released or null, no one is sharing
3659
3675
  else if ((previousContentShare && contentShare.disposition === _constants.FLOOR_ACTION.RELEASED || contentShare.disposition === null) && (previousWhiteboardShare && whiteboardShare.disposition === _constants.FLOOR_ACTION.RELEASED || whiteboardShare.disposition === null)) {
@@ -4314,11 +4330,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4314
4330
 
4315
4331
  /**
4316
4332
  * Invite a guest to the call that isn't normally part of this call
4317
- * @param {Object} invitee
4333
+ * @param {Invitee} invitee
4318
4334
  * @param {String} invitee.emailAddress
4319
4335
  * @param {String} invitee.email
4320
4336
  * @param {String} invitee.phoneNumber
4321
4337
  * @param {Boolean} [alertIfActive]
4338
+ * @param {Boolean} [invitee.skipEmailValidation]
4339
+ * @param {Boolean} [invitee.isInternalNumber]
4322
4340
  * @returns {Promise} see #members.addMember
4323
4341
  * @public
4324
4342
  * @memberof Meeting
@@ -4332,7 +4350,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4332
4350
 
4333
4351
  /**
4334
4352
  * Cancel an outgoing phone call invitation made during a meeting
4335
- * @param {Object} invitee
4353
+ * @param {Invitee} invitee
4336
4354
  * @param {String} invitee.phoneNumber
4337
4355
  * @returns {Promise} see #members.cancelPhoneInvite
4338
4356
  * @public
@@ -4345,17 +4363,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4345
4363
  }
4346
4364
 
4347
4365
  /**
4348
- * Cancel an SIP call invitation made during a meeting
4349
- * @param {Object} invitee
4366
+ * Cancel an SIP/phone call invitation made during a meeting
4367
+ * @param {Invitee} invitee
4350
4368
  * @param {String} invitee.memberId
4351
- * @returns {Promise} see #members.cancelSIPInvite
4369
+ * @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal
4370
+ * @returns {Promise} see #members.cancelInviteByMemberId
4352
4371
  * @public
4353
4372
  * @memberof Meeting
4354
4373
  */
4355
4374
  }, {
4356
- key: "cancelSIPInvite",
4357
- value: function cancelSIPInvite(invitee) {
4358
- return this.members.cancelSIPInvite(invitee);
4375
+ key: "cancelInviteByMemberId",
4376
+ value: function cancelInviteByMemberId(invitee) {
4377
+ return this.members.cancelInviteByMemberId(invitee);
4359
4378
  }
4360
4379
 
4361
4380
  /**
@@ -4640,6 +4659,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4640
4659
  isClosedCaptionActive: _util2.default.isClosedCaptionActive(this.userDisplayHints),
4641
4660
  canStartManualCaption: _util2.default.canStartManualCaption(this.userDisplayHints),
4642
4661
  canStopManualCaption: _util2.default.canStopManualCaption(this.userDisplayHints),
4662
+ isLocalRecordingStarted: _util2.default.isLocalRecordingStarted(this.userDisplayHints),
4663
+ isLocalRecordingStopped: _util2.default.isLocalRecordingStopped(this.userDisplayHints),
4664
+ isLocalRecordingPaused: _util2.default.isLocalRecordingPaused(this.userDisplayHints),
4643
4665
  isManualCaptionActive: _util2.default.isManualCaptionActive(this.userDisplayHints),
4644
4666
  isSaveTranscriptsEnabled: _util2.default.isSaveTranscriptsEnabled(this.userDisplayHints),
4645
4667
  isWebexAssistantActive: _util2.default.isWebexAssistantActive(this.userDisplayHints),
@@ -7627,6 +7649,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7627
7649
  remoteMediaManagerConfig,
7628
7650
  _options$bundlePolicy,
7629
7651
  bundlePolicy,
7652
+ _options$additionalMe,
7653
+ additionalMediaOptions,
7654
+ rawSendVideo,
7655
+ rawReceiveVideo,
7656
+ rawSendAudio,
7657
+ rawReceiveAudio,
7658
+ sendVideo,
7659
+ receiveVideo,
7660
+ sendAudio,
7661
+ receiveAudio,
7630
7662
  _this$remoteMediaMana,
7631
7663
  _yield$this$mediaProp,
7632
7664
  connectionType,
@@ -7683,17 +7715,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7683
7715
  }
7684
7716
  throw new _webexErrors.UserNotJoinedError();
7685
7717
  case 10:
7686
- localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy;
7718
+ localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy, _options$additionalMe = options.additionalMediaOptions, additionalMediaOptions = _options$additionalMe === void 0 ? {} : _options$additionalMe;
7719
+ rawSendVideo = additionalMediaOptions.sendVideo, rawReceiveVideo = additionalMediaOptions.receiveVideo, rawSendAudio = additionalMediaOptions.sendAudio, rawReceiveAudio = additionalMediaOptions.receiveAudio;
7720
+ sendVideo = videoEnabled && (rawSendVideo !== null && rawSendVideo !== void 0 ? rawSendVideo : true);
7721
+ receiveVideo = videoEnabled && (rawReceiveVideo !== null && rawReceiveVideo !== void 0 ? rawReceiveVideo : true);
7722
+ sendAudio = audioEnabled && (rawSendAudio !== null && rawSendAudio !== void 0 ? rawSendAudio : true);
7723
+ receiveAudio = audioEnabled && (rawReceiveAudio !== null && rawReceiveAudio !== void 0 ? rawReceiveAudio : true);
7687
7724
  this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
7688
7725
 
7689
7726
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7690
7727
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7691
7728
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7692
- _context35.next = 14;
7729
+ _context35.next = 19;
7693
7730
  break;
7694
7731
  }
7695
7732
  throw new _webexErrors.UserInLobbyError();
7696
- case 14:
7733
+ case 19:
7697
7734
  // @ts-ignore
7698
7735
  this.webex.internal.newMetrics.submitClientEvent({
7699
7736
  name: 'client.media.capabilities',
@@ -7723,67 +7760,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7723
7760
  // when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
7724
7761
  // to avoid doing an extra SDP exchange when they are published for the first time
7725
7762
  this.mediaProperties.setMediaDirection({
7726
- sendAudio: audioEnabled,
7727
- sendVideo: videoEnabled,
7763
+ sendAudio: sendAudio,
7764
+ sendVideo: sendVideo,
7728
7765
  sendShare: false,
7729
- receiveAudio: audioEnabled,
7730
- receiveVideo: videoEnabled,
7766
+ receiveAudio: receiveAudio,
7767
+ receiveVideo: receiveVideo,
7731
7768
  receiveShare: shareAudioEnabled || shareVideoEnabled
7732
7769
  });
7733
7770
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7734
7771
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7735
7772
  this.brbState = (0, _brbState.createBrbState)(this, false);
7736
- _context35.prev = 19;
7737
- _context35.next = 22;
7773
+ _context35.prev = 24;
7774
+ _context35.next = 27;
7738
7775
  return this.setUpLocalStreamReferences(localStreams);
7739
- case 22:
7776
+ case 27:
7740
7777
  this.setMercuryListener();
7741
7778
  this.createStatsAnalyzer();
7742
- _context35.prev = 24;
7743
- _context35.next = 27;
7779
+ _context35.prev = 29;
7780
+ _context35.next = 32;
7744
7781
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7745
- case 27:
7746
- _context35.next = 40;
7782
+ case 32:
7783
+ _context35.next = 45;
7747
7784
  break;
7748
- case 29:
7749
- _context35.prev = 29;
7750
- _context35.t0 = _context35["catch"](24);
7785
+ case 34:
7786
+ _context35.prev = 34;
7787
+ _context35.t0 = _context35["catch"](29);
7751
7788
  if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7752
- _context35.next = 39;
7789
+ _context35.next = 44;
7753
7790
  break;
7754
7791
  }
7755
7792
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7756
- _context35.next = 35;
7793
+ _context35.next = 40;
7757
7794
  return this.downgradeFromMultistreamToTranscoded();
7758
- case 35:
7759
- _context35.next = 37;
7795
+ case 40:
7796
+ _context35.next = 42;
7760
7797
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7761
- case 37:
7762
- _context35.next = 40;
7798
+ case 42:
7799
+ _context35.next = 45;
7763
7800
  break;
7764
- case 39:
7801
+ case 44:
7765
7802
  throw _context35.t0;
7766
- case 40:
7803
+ case 45:
7767
7804
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
7768
7805
  if (!this.mediaProperties.hasLocalShareStream()) {
7769
- _context35.next = 44;
7806
+ _context35.next = 49;
7770
7807
  break;
7771
7808
  }
7772
- _context35.next = 44;
7809
+ _context35.next = 49;
7773
7810
  return this.enqueueScreenShareFloorRequest();
7774
- case 44:
7775
- _context35.next = 46;
7811
+ case 49:
7812
+ _context35.next = 51;
7776
7813
  return this.mediaProperties.getCurrentConnectionInfo();
7777
- case 46:
7814
+ case 51:
7778
7815
  _yield$this$mediaProp = _context35.sent;
7779
7816
  connectionType = _yield$this$mediaProp.connectionType;
7780
7817
  ipVersion = _yield$this$mediaProp.ipVersion;
7781
7818
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7782
7819
  numTransports = _yield$this$mediaProp.numTransports;
7783
7820
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7784
- _context35.next = 54;
7821
+ _context35.next = 59;
7785
7822
  return this.getMediaReachabilityMetricFields();
7786
- case 54:
7823
+ case 59:
7787
7824
  reachabilityMetrics = _context35.sent;
7788
7825
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7789
7826
  correlation_id: this.correlationId,
@@ -7813,21 +7850,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7813
7850
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7814
7851
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7815
7852
  this.startPeriodicLogUpload();
7816
- _context35.next = 80;
7853
+ _context35.next = 85;
7817
7854
  break;
7818
- case 62:
7819
- _context35.prev = 62;
7820
- _context35.t1 = _context35["catch"](19);
7855
+ case 67:
7856
+ _context35.prev = 67;
7857
+ _context35.t1 = _context35["catch"](24);
7821
7858
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7822
7859
 
7823
7860
  // @ts-ignore
7824
- _context35.next = 67;
7861
+ _context35.next = 72;
7825
7862
  return this.getMediaReachabilityMetricFields();
7826
- case 67:
7863
+ case 72:
7827
7864
  _reachabilityMetrics = _context35.sent;
7828
- _context35.next = 70;
7865
+ _context35.next = 75;
7829
7866
  return this.mediaProperties.getCurrentConnectionInfo();
7830
- case 70:
7867
+ case 75:
7831
7868
  _yield$this$mediaProp2 = _context35.sent;
7832
7869
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7833
7870
  _numTransports = _yield$this$mediaProp2.numTransports;
@@ -7851,9 +7888,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7851
7888
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7852
7889
  iceCandidatesCount: this.iceCandidatesCount
7853
7890
  }));
7854
- _context35.next = 77;
7891
+ _context35.next = 82;
7855
7892
  return this.cleanUpOnAddMediaFailure();
7856
- case 77:
7893
+ case 82:
7857
7894
  // Upload logs on error while adding media
7858
7895
  _triggerProxy.default.trigger(this, {
7859
7896
  file: 'meeting/index',
@@ -7865,15 +7902,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7865
7902
  });
7866
7903
  }
7867
7904
  throw _context35.t1;
7868
- case 80:
7869
- _context35.prev = 80;
7905
+ case 85:
7906
+ _context35.prev = 85;
7870
7907
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7871
- return _context35.finish(80);
7872
- case 83:
7908
+ return _context35.finish(85);
7909
+ case 88:
7873
7910
  case "end":
7874
7911
  return _context35.stop();
7875
7912
  }
7876
- }, _callee35, this, [[19, 62, 80, 83], [24, 29]]);
7913
+ }, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
7877
7914
  }));
7878
7915
  function addMediaInternal(_x33, _x34, _x35) {
7879
7916
  return _addMediaInternal.apply(this, arguments);
@@ -8221,6 +8258,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8221
8258
  return _promise.default.reject(new _parameter.default('Cannot share without channelUrl.'));
8222
8259
  }
8223
8260
  if (whiteboard) {
8261
+ // @ts-ignore
8262
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8263
+ key: 'internal.client.share.initiated'
8264
+ });
8224
8265
  // @ts-ignore
8225
8266
  this.webex.internal.newMetrics.submitClientEvent({
8226
8267
  name: 'client.share.initiated',
@@ -8276,11 +8317,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8276
8317
  return element.name === 'whiteboard';
8277
8318
  });
8278
8319
  if (whiteboard) {
8320
+ // @ts-ignore
8321
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8322
+ key: 'internal.client.share.stopped'
8323
+ });
8279
8324
  // @ts-ignore
8280
8325
  this.webex.internal.newMetrics.submitClientEvent({
8281
8326
  name: 'client.share.stopped',
8282
8327
  payload: {
8283
- mediaType: 'whiteboard'
8328
+ mediaType: 'whiteboard',
8329
+ // @ts-ignore
8330
+ shareDuration: this.webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration()
8284
8331
  },
8285
8332
  options: {
8286
8333
  meetingId: this.id
@@ -8426,11 +8473,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8426
8473
  if (content) {
8427
8474
  var _content$floor;
8428
8475
  // @ts-ignore
8476
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8477
+ key: 'internal.client.share.stopped'
8478
+ });
8479
+ // @ts-ignore
8429
8480
  this.webex.internal.newMetrics.submitClientEvent({
8430
8481
  name: 'client.share.stopped',
8431
8482
  payload: {
8432
8483
  mediaType: 'share',
8433
- shareInstanceId: this.localShareInstanceId
8484
+ shareInstanceId: this.localShareInstanceId,
8485
+ // @ts-ignore
8486
+ shareDuration: this.webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration()
8434
8487
  },
8435
8488
  options: {
8436
8489
  meetingId: this.id
@@ -9246,13 +9299,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9246
9299
  return this.updateTranscodedMediaConnection();
9247
9300
  case 31:
9248
9301
  if (!floorRequestNeeded) {
9249
- _context40.next = 39;
9302
+ _context40.next = 40;
9250
9303
  break;
9251
9304
  }
9252
9305
  this.localShareInstanceId = _uuid.default.v4();
9253
9306
  this.shareCAEventSentStatus.transmitStart = false;
9254
9307
  this.shareCAEventSentStatus.transmitStop = false;
9255
9308
 
9309
+ // @ts-ignore
9310
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
9311
+ key: 'internal.client.share.initiated'
9312
+ });
9313
+
9256
9314
  // @ts-ignore
9257
9315
  this.webex.internal.newMetrics.submitClientEvent({
9258
9316
  name: 'client.share.initiated',
@@ -9272,9 +9330,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9272
9330
  // we're sending the http request to Locus to request the screen share floor
9273
9331
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9274
9332
  // and also if sharing from the start, we need confluence to have been created
9275
- _context40.next = 39;
9333
+ _context40.next = 40;
9276
9334
  return this.enqueueScreenShareFloorRequest();
9277
- case 39:
9335
+ case 40:
9278
9336
  case "end":
9279
9337
  return _context40.stop();
9280
9338
  }
@@ -9422,7 +9480,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9422
9480
  key: "getMediaReachabilityMetricFields",
9423
9481
  value: (function () {
9424
9482
  var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
9425
- var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable, selectedCluster;
9483
+ var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
9484
+ var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
9426
9485
  return _regenerator.default.wrap(function _callee42$(_context42) {
9427
9486
  while (1) switch (_context42.prev = _context42.next) {
9428
9487
  case 0:
@@ -9438,18 +9497,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9438
9497
  }
9439
9498
  return total;
9440
9499
  }, 0);
9500
+ selectedSubnetFirstOctet = (_this$mediaServerIp = this.mediaServerIp) === null || _this$mediaServerIp === void 0 ? void 0 : _this$mediaServerIp.split('.')[0];
9441
9501
  isSubnetReachable = null;
9442
- if (totalSuccessCases > 0) {
9502
+ if (totalSuccessCases > 0 && selectedSubnetFirstOctet) {
9503
+ isSubnetReachable =
9443
9504
  // @ts-ignore
9444
- isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
9445
- }
9446
- selectedCluster = null;
9447
- if (this.mediaConnections && this.mediaConnections.length > 0) {
9448
- selectedCluster = this.mediaConnections[0].mediaAgentCluster;
9505
+ this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
9449
9506
  }
9507
+ selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
9450
9508
  return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9451
- isSubnetReachable: isSubnetReachable,
9452
- selectedCluster: selectedCluster
9509
+ subnet_reachable: isSubnetReachable,
9510
+ selected_cluster: selectedCluster,
9511
+ selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
9453
9512
  }));
9454
9513
  case 10:
9455
9514
  case "end":
@@ -9461,7 +9520,84 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9461
9520
  return _getMediaReachabilityMetricFields.apply(this, arguments);
9462
9521
  }
9463
9522
  return getMediaReachabilityMetricFields;
9464
- }())
9523
+ }()
9524
+ /**
9525
+ * Set the stage for the meeting
9526
+ *
9527
+ * @param {SetStageOptions} options Options to use when setting the stage
9528
+ * @returns {Promise} The locus request
9529
+ */
9530
+ )
9531
+ }, {
9532
+ key: "setStage",
9533
+ value: function setStage() {
9534
+ var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
9535
+ _ref37$activeSpeakerP = _ref37.activeSpeakerProportion,
9536
+ activeSpeakerProportion = _ref37$activeSpeakerP === void 0 ? 0.5 : _ref37$activeSpeakerP,
9537
+ customBackground = _ref37.customBackground,
9538
+ customLogo = _ref37.customLogo,
9539
+ customNameLabel = _ref37.customNameLabel,
9540
+ importantParticipants = _ref37.importantParticipants,
9541
+ _ref37$lockAttendeeVi = _ref37.lockAttendeeViewOnStage,
9542
+ lockAttendeeViewOnStage = _ref37$lockAttendeeVi === void 0 ? false : _ref37$lockAttendeeVi,
9543
+ _ref37$showActiveSpea = _ref37.showActiveSpeaker,
9544
+ showActiveSpeaker = _ref37$showActiveSpea === void 0 ? false : _ref37$showActiveSpea;
9545
+ var videoLayout = {
9546
+ overrideDefault: true,
9547
+ lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
9548
+ stageParameters: {
9549
+ activeSpeakerProportion: activeSpeakerProportion,
9550
+ showActiveSpeaker: {
9551
+ show: showActiveSpeaker,
9552
+ order: 0
9553
+ },
9554
+ stageManagerType: 0
9555
+ }
9556
+ };
9557
+ if (importantParticipants !== null && importantParticipants !== void 0 && importantParticipants.length) {
9558
+ videoLayout.stageParameters.importantParticipants = importantParticipants.map(function (importantParticipant, index) {
9559
+ return _objectSpread(_objectSpread({}, importantParticipant), {}, {
9560
+ order: index + 1
9561
+ });
9562
+ });
9563
+ }
9564
+ if (customLogo) {
9565
+ if (!videoLayout.customLayouts) {
9566
+ videoLayout.customLayouts = {};
9567
+ }
9568
+ videoLayout.customLayouts.logo = customLogo;
9569
+ // eslint-disable-next-line no-bitwise
9570
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.LOGO;
9571
+ }
9572
+ if (customBackground) {
9573
+ if (!videoLayout.customLayouts) {
9574
+ videoLayout.customLayouts = {};
9575
+ }
9576
+ videoLayout.customLayouts.background = customBackground;
9577
+ // eslint-disable-next-line no-bitwise
9578
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.BACKGROUND;
9579
+ }
9580
+ if (customNameLabel) {
9581
+ videoLayout.nameLabelStyle = customNameLabel;
9582
+ // eslint-disable-next-line no-bitwise
9583
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.NAME_LABEL;
9584
+ }
9585
+ return this.meetingRequest.synchronizeStage(this.locusUrl, videoLayout);
9586
+ }
9587
+
9588
+ /**
9589
+ * Unset the stage for the meeting
9590
+ *
9591
+ * @returns {Promise} The locus request
9592
+ */
9593
+ }, {
9594
+ key: "unsetStage",
9595
+ value: function unsetStage() {
9596
+ var videoLayout = {
9597
+ overrideDefault: false
9598
+ };
9599
+ return this.meetingRequest.synchronizeStage(this.locusUrl, videoLayout);
9600
+ }
9465
9601
  }]);
9466
9602
  return Meeting;
9467
9603
  }(_webexCore.StatelessWebexPlugin);