@webex/plugin-meetings 3.8.1-next.3 → 3.8.1-next.31

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 (80) 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 +21 -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/index.js +169 -66
  15. package/dist/meeting/index.js.map +1 -1
  16. package/dist/meeting/request.js +19 -0
  17. package/dist/meeting/request.js.map +1 -1
  18. package/dist/meeting/request.type.js.map +1 -1
  19. package/dist/meetings/index.js +35 -33
  20. package/dist/meetings/index.js.map +1 -1
  21. package/dist/members/index.js +8 -6
  22. package/dist/members/index.js.map +1 -1
  23. package/dist/members/request.js +3 -3
  24. package/dist/members/request.js.map +1 -1
  25. package/dist/members/util.js +18 -6
  26. package/dist/members/util.js.map +1 -1
  27. package/dist/multistream/mediaRequestManager.js +1 -1
  28. package/dist/multistream/mediaRequestManager.js.map +1 -1
  29. package/dist/multistream/remoteMedia.js +34 -5
  30. package/dist/multistream/remoteMedia.js.map +1 -1
  31. package/dist/multistream/remoteMediaGroup.js +42 -2
  32. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  33. package/dist/multistream/sendSlotManager.js +32 -2
  34. package/dist/multistream/sendSlotManager.js.map +1 -1
  35. package/dist/reachability/index.js +5 -10
  36. package/dist/reachability/index.js.map +1 -1
  37. package/dist/types/constants.d.ts +19 -0
  38. package/dist/types/locus-info/index.d.ts +0 -9
  39. package/dist/types/meeting/brbState.d.ts +0 -1
  40. package/dist/types/meeting/index.d.ts +28 -4
  41. package/dist/types/meeting/request.d.ts +9 -1
  42. package/dist/types/meeting/request.type.d.ts +74 -0
  43. package/dist/types/members/index.d.ts +8 -3
  44. package/dist/types/members/request.d.ts +1 -1
  45. package/dist/types/members/util.d.ts +5 -2
  46. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  47. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  48. package/dist/types/multistream/sendSlotManager.d.ts +16 -0
  49. package/dist/types/reachability/index.d.ts +2 -2
  50. package/dist/webinar/index.js +1 -1
  51. package/package.json +24 -24
  52. package/src/constants.ts +20 -0
  53. package/src/locus-info/index.ts +47 -82
  54. package/src/media/index.ts +2 -2
  55. package/src/meeting/brbState.ts +9 -7
  56. package/src/meeting/index.ts +126 -23
  57. package/src/meeting/request.ts +16 -0
  58. package/src/meeting/request.type.ts +64 -0
  59. package/src/meetings/index.ts +3 -2
  60. package/src/members/index.ts +7 -5
  61. package/src/members/request.ts +2 -2
  62. package/src/members/util.ts +14 -3
  63. package/src/multistream/mediaRequestManager.ts +7 -7
  64. package/src/multistream/remoteMedia.ts +34 -4
  65. package/src/multistream/remoteMediaGroup.ts +37 -2
  66. package/src/multistream/sendSlotManager.ts +34 -2
  67. package/src/reachability/index.ts +5 -13
  68. package/test/unit/spec/locus-info/index.js +177 -83
  69. package/test/unit/spec/media/index.ts +107 -0
  70. package/test/unit/spec/meeting/brbState.ts +9 -9
  71. package/test/unit/spec/meeting/index.js +606 -55
  72. package/test/unit/spec/meeting/request.js +71 -0
  73. package/test/unit/spec/meetings/index.js +1 -0
  74. package/test/unit/spec/members/index.js +32 -9
  75. package/test/unit/spec/members/request.js +2 -2
  76. package/test/unit/spec/members/utils.js +27 -7
  77. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  78. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  79. package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
  80. 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
  });
@@ -4345,17 +4354,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4345
4354
  }
4346
4355
 
4347
4356
  /**
4348
- * Cancel an SIP call invitation made during a meeting
4357
+ * Cancel an SIP/phone call invitation made during a meeting
4349
4358
  * @param {Object} invitee
4350
4359
  * @param {String} invitee.memberId
4351
- * @returns {Promise} see #members.cancelSIPInvite
4360
+ * @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal
4361
+ * @returns {Promise} see #members.cancelInviteByMemberId
4352
4362
  * @public
4353
4363
  * @memberof Meeting
4354
4364
  */
4355
4365
  }, {
4356
- key: "cancelSIPInvite",
4357
- value: function cancelSIPInvite(invitee) {
4358
- return this.members.cancelSIPInvite(invitee);
4366
+ key: "cancelInviteByMemberId",
4367
+ value: function cancelInviteByMemberId(invitee) {
4368
+ return this.members.cancelInviteByMemberId(invitee);
4359
4369
  }
4360
4370
 
4361
4371
  /**
@@ -7627,6 +7637,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7627
7637
  remoteMediaManagerConfig,
7628
7638
  _options$bundlePolicy,
7629
7639
  bundlePolicy,
7640
+ _options$additionalMe,
7641
+ additionalMediaOptions,
7642
+ rawSendVideo,
7643
+ rawReceiveVideo,
7644
+ rawSendAudio,
7645
+ rawReceiveAudio,
7646
+ sendVideo,
7647
+ receiveVideo,
7648
+ sendAudio,
7649
+ receiveAudio,
7630
7650
  _this$remoteMediaMana,
7631
7651
  _yield$this$mediaProp,
7632
7652
  connectionType,
@@ -7683,17 +7703,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7683
7703
  }
7684
7704
  throw new _webexErrors.UserNotJoinedError();
7685
7705
  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;
7706
+ 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;
7707
+ rawSendVideo = additionalMediaOptions.sendVideo, rawReceiveVideo = additionalMediaOptions.receiveVideo, rawSendAudio = additionalMediaOptions.sendAudio, rawReceiveAudio = additionalMediaOptions.receiveAudio;
7708
+ sendVideo = videoEnabled && (rawSendVideo !== null && rawSendVideo !== void 0 ? rawSendVideo : true);
7709
+ receiveVideo = videoEnabled && (rawReceiveVideo !== null && rawReceiveVideo !== void 0 ? rawReceiveVideo : true);
7710
+ sendAudio = audioEnabled && (rawSendAudio !== null && rawSendAudio !== void 0 ? rawSendAudio : true);
7711
+ receiveAudio = audioEnabled && (rawReceiveAudio !== null && rawReceiveAudio !== void 0 ? rawReceiveAudio : true);
7687
7712
  this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
7688
7713
 
7689
7714
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7690
7715
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7691
7716
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7692
- _context35.next = 14;
7717
+ _context35.next = 19;
7693
7718
  break;
7694
7719
  }
7695
7720
  throw new _webexErrors.UserInLobbyError();
7696
- case 14:
7721
+ case 19:
7697
7722
  // @ts-ignore
7698
7723
  this.webex.internal.newMetrics.submitClientEvent({
7699
7724
  name: 'client.media.capabilities',
@@ -7723,67 +7748,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7723
7748
  // when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
7724
7749
  // to avoid doing an extra SDP exchange when they are published for the first time
7725
7750
  this.mediaProperties.setMediaDirection({
7726
- sendAudio: audioEnabled,
7727
- sendVideo: videoEnabled,
7751
+ sendAudio: sendAudio,
7752
+ sendVideo: sendVideo,
7728
7753
  sendShare: false,
7729
- receiveAudio: audioEnabled,
7730
- receiveVideo: videoEnabled,
7754
+ receiveAudio: receiveAudio,
7755
+ receiveVideo: receiveVideo,
7731
7756
  receiveShare: shareAudioEnabled || shareVideoEnabled
7732
7757
  });
7733
7758
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7734
7759
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7735
7760
  this.brbState = (0, _brbState.createBrbState)(this, false);
7736
- _context35.prev = 19;
7737
- _context35.next = 22;
7761
+ _context35.prev = 24;
7762
+ _context35.next = 27;
7738
7763
  return this.setUpLocalStreamReferences(localStreams);
7739
- case 22:
7764
+ case 27:
7740
7765
  this.setMercuryListener();
7741
7766
  this.createStatsAnalyzer();
7742
- _context35.prev = 24;
7743
- _context35.next = 27;
7767
+ _context35.prev = 29;
7768
+ _context35.next = 32;
7744
7769
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7745
- case 27:
7746
- _context35.next = 40;
7770
+ case 32:
7771
+ _context35.next = 45;
7747
7772
  break;
7748
- case 29:
7749
- _context35.prev = 29;
7750
- _context35.t0 = _context35["catch"](24);
7773
+ case 34:
7774
+ _context35.prev = 34;
7775
+ _context35.t0 = _context35["catch"](29);
7751
7776
  if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7752
- _context35.next = 39;
7777
+ _context35.next = 44;
7753
7778
  break;
7754
7779
  }
7755
7780
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7756
- _context35.next = 35;
7781
+ _context35.next = 40;
7757
7782
  return this.downgradeFromMultistreamToTranscoded();
7758
- case 35:
7759
- _context35.next = 37;
7783
+ case 40:
7784
+ _context35.next = 42;
7760
7785
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7761
- case 37:
7762
- _context35.next = 40;
7786
+ case 42:
7787
+ _context35.next = 45;
7763
7788
  break;
7764
- case 39:
7789
+ case 44:
7765
7790
  throw _context35.t0;
7766
- case 40:
7791
+ case 45:
7767
7792
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
7768
7793
  if (!this.mediaProperties.hasLocalShareStream()) {
7769
- _context35.next = 44;
7794
+ _context35.next = 49;
7770
7795
  break;
7771
7796
  }
7772
- _context35.next = 44;
7797
+ _context35.next = 49;
7773
7798
  return this.enqueueScreenShareFloorRequest();
7774
- case 44:
7775
- _context35.next = 46;
7799
+ case 49:
7800
+ _context35.next = 51;
7776
7801
  return this.mediaProperties.getCurrentConnectionInfo();
7777
- case 46:
7802
+ case 51:
7778
7803
  _yield$this$mediaProp = _context35.sent;
7779
7804
  connectionType = _yield$this$mediaProp.connectionType;
7780
7805
  ipVersion = _yield$this$mediaProp.ipVersion;
7781
7806
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7782
7807
  numTransports = _yield$this$mediaProp.numTransports;
7783
7808
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7784
- _context35.next = 54;
7809
+ _context35.next = 59;
7785
7810
  return this.getMediaReachabilityMetricFields();
7786
- case 54:
7811
+ case 59:
7787
7812
  reachabilityMetrics = _context35.sent;
7788
7813
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7789
7814
  correlation_id: this.correlationId,
@@ -7813,21 +7838,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7813
7838
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7814
7839
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7815
7840
  this.startPeriodicLogUpload();
7816
- _context35.next = 80;
7841
+ _context35.next = 85;
7817
7842
  break;
7818
- case 62:
7819
- _context35.prev = 62;
7820
- _context35.t1 = _context35["catch"](19);
7843
+ case 67:
7844
+ _context35.prev = 67;
7845
+ _context35.t1 = _context35["catch"](24);
7821
7846
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7822
7847
 
7823
7848
  // @ts-ignore
7824
- _context35.next = 67;
7849
+ _context35.next = 72;
7825
7850
  return this.getMediaReachabilityMetricFields();
7826
- case 67:
7851
+ case 72:
7827
7852
  _reachabilityMetrics = _context35.sent;
7828
- _context35.next = 70;
7853
+ _context35.next = 75;
7829
7854
  return this.mediaProperties.getCurrentConnectionInfo();
7830
- case 70:
7855
+ case 75:
7831
7856
  _yield$this$mediaProp2 = _context35.sent;
7832
7857
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7833
7858
  _numTransports = _yield$this$mediaProp2.numTransports;
@@ -7851,9 +7876,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7851
7876
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7852
7877
  iceCandidatesCount: this.iceCandidatesCount
7853
7878
  }));
7854
- _context35.next = 77;
7879
+ _context35.next = 82;
7855
7880
  return this.cleanUpOnAddMediaFailure();
7856
- case 77:
7881
+ case 82:
7857
7882
  // Upload logs on error while adding media
7858
7883
  _triggerProxy.default.trigger(this, {
7859
7884
  file: 'meeting/index',
@@ -7865,15 +7890,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7865
7890
  });
7866
7891
  }
7867
7892
  throw _context35.t1;
7868
- case 80:
7869
- _context35.prev = 80;
7893
+ case 85:
7894
+ _context35.prev = 85;
7870
7895
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7871
- return _context35.finish(80);
7872
- case 83:
7896
+ return _context35.finish(85);
7897
+ case 88:
7873
7898
  case "end":
7874
7899
  return _context35.stop();
7875
7900
  }
7876
- }, _callee35, this, [[19, 62, 80, 83], [24, 29]]);
7901
+ }, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
7877
7902
  }));
7878
7903
  function addMediaInternal(_x33, _x34, _x35) {
7879
7904
  return _addMediaInternal.apply(this, arguments);
@@ -9422,7 +9447,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9422
9447
  key: "getMediaReachabilityMetricFields",
9423
9448
  value: (function () {
9424
9449
  var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
9425
- var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable, selectedCluster;
9450
+ var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
9451
+ var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
9426
9452
  return _regenerator.default.wrap(function _callee42$(_context42) {
9427
9453
  while (1) switch (_context42.prev = _context42.next) {
9428
9454
  case 0:
@@ -9438,18 +9464,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9438
9464
  }
9439
9465
  return total;
9440
9466
  }, 0);
9467
+ selectedSubnetFirstOctet = (_this$mediaServerIp = this.mediaServerIp) === null || _this$mediaServerIp === void 0 ? void 0 : _this$mediaServerIp.split('.')[0];
9441
9468
  isSubnetReachable = null;
9442
- if (totalSuccessCases > 0) {
9469
+ if (totalSuccessCases > 0 && selectedSubnetFirstOctet) {
9470
+ isSubnetReachable =
9443
9471
  // @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;
9472
+ this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
9449
9473
  }
9474
+ 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
9475
  return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9451
- isSubnetReachable: isSubnetReachable,
9452
- selectedCluster: selectedCluster
9476
+ subnet_reachable: isSubnetReachable,
9477
+ selected_cluster: selectedCluster,
9478
+ selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
9453
9479
  }));
9454
9480
  case 10:
9455
9481
  case "end":
@@ -9461,7 +9487,84 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9461
9487
  return _getMediaReachabilityMetricFields.apply(this, arguments);
9462
9488
  }
9463
9489
  return getMediaReachabilityMetricFields;
9464
- }())
9490
+ }()
9491
+ /**
9492
+ * Set the stage for the meeting
9493
+ *
9494
+ * @param {SetStageOptions} options Options to use when setting the stage
9495
+ * @returns {Promise} The locus request
9496
+ */
9497
+ )
9498
+ }, {
9499
+ key: "setStage",
9500
+ value: function setStage() {
9501
+ var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
9502
+ _ref37$activeSpeakerP = _ref37.activeSpeakerProportion,
9503
+ activeSpeakerProportion = _ref37$activeSpeakerP === void 0 ? 0.5 : _ref37$activeSpeakerP,
9504
+ customBackground = _ref37.customBackground,
9505
+ customLogo = _ref37.customLogo,
9506
+ customNameLabel = _ref37.customNameLabel,
9507
+ importantParticipants = _ref37.importantParticipants,
9508
+ _ref37$lockAttendeeVi = _ref37.lockAttendeeViewOnStage,
9509
+ lockAttendeeViewOnStage = _ref37$lockAttendeeVi === void 0 ? false : _ref37$lockAttendeeVi,
9510
+ _ref37$showActiveSpea = _ref37.showActiveSpeaker,
9511
+ showActiveSpeaker = _ref37$showActiveSpea === void 0 ? false : _ref37$showActiveSpea;
9512
+ var videoLayout = {
9513
+ overrideDefault: true,
9514
+ lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
9515
+ stageParameters: {
9516
+ activeSpeakerProportion: activeSpeakerProportion,
9517
+ showActiveSpeaker: {
9518
+ show: showActiveSpeaker,
9519
+ order: 0
9520
+ },
9521
+ stageManagerType: 0
9522
+ }
9523
+ };
9524
+ if (importantParticipants !== null && importantParticipants !== void 0 && importantParticipants.length) {
9525
+ videoLayout.stageParameters.importantParticipants = importantParticipants.map(function (importantParticipant, index) {
9526
+ return _objectSpread(_objectSpread({}, importantParticipant), {}, {
9527
+ order: index + 1
9528
+ });
9529
+ });
9530
+ }
9531
+ if (customLogo) {
9532
+ if (!videoLayout.customLayouts) {
9533
+ videoLayout.customLayouts = {};
9534
+ }
9535
+ videoLayout.customLayouts.logo = customLogo;
9536
+ // eslint-disable-next-line no-bitwise
9537
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.LOGO;
9538
+ }
9539
+ if (customBackground) {
9540
+ if (!videoLayout.customLayouts) {
9541
+ videoLayout.customLayouts = {};
9542
+ }
9543
+ videoLayout.customLayouts.background = customBackground;
9544
+ // eslint-disable-next-line no-bitwise
9545
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.BACKGROUND;
9546
+ }
9547
+ if (customNameLabel) {
9548
+ videoLayout.nameLabelStyle = customNameLabel;
9549
+ // eslint-disable-next-line no-bitwise
9550
+ videoLayout.stageParameters.stageManagerType |= _constants.STAGE_MANAGER_TYPE.NAME_LABEL;
9551
+ }
9552
+ return this.meetingRequest.synchronizeStage(this.locusUrl, videoLayout);
9553
+ }
9554
+
9555
+ /**
9556
+ * Unset the stage for the meeting
9557
+ *
9558
+ * @returns {Promise} The locus request
9559
+ */
9560
+ }, {
9561
+ key: "unsetStage",
9562
+ value: function unsetStage() {
9563
+ var videoLayout = {
9564
+ overrideDefault: false
9565
+ };
9566
+ return this.meetingRequest.synchronizeStage(this.locusUrl, videoLayout);
9567
+ }
9465
9568
  }]);
9466
9569
  return Meeting;
9467
9570
  }(_webexCore.StatelessWebexPlugin);