@webex/plugin-meetings 3.8.1-next.42 → 3.8.1-next.44

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.
@@ -2382,6 +2382,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2382
2382
  this.callStateForMetrics.correlationId = correlationId;
2383
2383
  }
2384
2384
 
2385
+ /**
2386
+ * Getter - Returns callStateForMetrics.pstnCorrelationId
2387
+ * @returns {string | undefined}
2388
+ */
2389
+ }, {
2390
+ key: "pstnCorrelationId",
2391
+ get: function get() {
2392
+ return this.callStateForMetrics.pstnCorrelationId;
2393
+ }
2394
+
2395
+ /**
2396
+ * Setter - sets callStateForMetrics.pstnCorrelationId
2397
+ * @param {string | undefined} correlationId
2398
+ */,
2399
+ set: function set(correlationId) {
2400
+ this.callStateForMetrics.pstnCorrelationId = correlationId;
2401
+ }
2402
+
2385
2403
  /**
2386
2404
  * Getter - Returns callStateForMetrics.userNameInput
2387
2405
  * @returns {string}
@@ -6336,24 +6354,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6336
6354
  _this36.deferJoin = undefined;
6337
6355
  return join;
6338
6356
  }).catch(function (error) {
6339
- var _this36$meetingInfo, _error$error;
6357
+ var _error$error;
6340
6358
  _this36.meetingFiniteStateMachine.fail(error);
6341
6359
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
6342
6360
 
6343
- // @ts-ignore
6344
- _this36.webex.internal.newMetrics.submitClientEvent({
6345
- name: 'client.locus.join.response',
6346
- payload: {
6347
- identifiers: {
6348
- meetingLookupUrl: (_this36$meetingInfo = _this36.meetingInfo) === null || _this36$meetingInfo === void 0 ? void 0 : _this36$meetingInfo.meetingLookupUrl
6349
- }
6350
- },
6351
- options: {
6352
- meetingId: _this36.id,
6353
- rawError: error
6354
- }
6355
- });
6356
-
6357
6361
  // TODO: change this to error codes and pre defined dictionary
6358
6362
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
6359
6363
  correlation_id: _this36.correlationId,
@@ -6507,14 +6511,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6507
6511
  value: function dialInPstn() {
6508
6512
  var _this38 = this;
6509
6513
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6510
-
6511
- var correlationId = this.correlationId,
6514
+ this.pstnCorrelationId = _uuid.default.v4();
6515
+ var pstnCorrelationId = this.pstnCorrelationId,
6512
6516
  locusUrl = this.locusUrl;
6513
6517
  if (!this.dialInUrl) this.dialInUrl = "dialin:///".concat(_uuid.default.v4());
6514
6518
  return this.meetingRequest
6515
6519
  // @ts-ignore
6516
6520
  .dialIn({
6517
- correlationId: correlationId,
6521
+ correlationId: pstnCorrelationId,
6518
6522
  dialInUrl: this.dialInUrl,
6519
6523
  locusUrl: locusUrl,
6520
6524
  clientUrl: this.deviceUrl
@@ -6523,11 +6527,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6523
6527
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6524
6528
  correlation_id: _this38.correlationId,
6525
6529
  dial_in_url: _this38.dialInUrl,
6530
+ dial_in_correlation_id: pstnCorrelationId,
6526
6531
  locus_id: locusUrl.split('/').pop(),
6527
6532
  client_url: _this38.deviceUrl,
6528
6533
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6529
6534
  stack: error.stack
6530
6535
  });
6536
+ if (_this38.pstnCorrelationId === pstnCorrelationId) {
6537
+ _this38.pstnCorrelationId = undefined;
6538
+ }
6531
6539
  return _promise.default.reject(error);
6532
6540
  });
6533
6541
  }
@@ -6544,14 +6552,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6544
6552
  value: function dialOutPstn(phoneNumber) {
6545
6553
  var _this39 = this;
6546
6554
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6547
-
6548
- var correlationId = this.correlationId,
6549
- locusUrl = this.locusUrl;
6555
+ this.pstnCorrelationId = _uuid.default.v4();
6556
+ var locusUrl = this.locusUrl,
6557
+ pstnCorrelationId = this.pstnCorrelationId;
6550
6558
  if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
6551
6559
  return this.meetingRequest
6552
6560
  // @ts-ignore
6553
6561
  .dialOut({
6554
- correlationId: correlationId,
6562
+ correlationId: pstnCorrelationId,
6555
6563
  dialOutUrl: this.dialOutUrl,
6556
6564
  phoneNumber: phoneNumber,
6557
6565
  locusUrl: locusUrl,
@@ -6561,11 +6569,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6561
6569
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6562
6570
  correlation_id: _this39.correlationId,
6563
6571
  dial_out_url: _this39.dialOutUrl,
6572
+ dial_out_correlation_id: pstnCorrelationId,
6564
6573
  locus_id: locusUrl.split('/').pop(),
6565
6574
  client_url: _this39.deviceUrl,
6566
6575
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6567
6576
  stack: error.stack
6568
6577
  });
6578
+ if (_this39.pstnCorrelationId === pstnCorrelationId) {
6579
+ _this39.pstnCorrelationId = undefined;
6580
+ }
6569
6581
  return _promise.default.reject(error);
6570
6582
  });
6571
6583
  }
@@ -6580,7 +6592,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6580
6592
  }, {
6581
6593
  key: "disconnectPhoneAudio",
6582
6594
  value: function disconnectPhoneAudio() {
6583
- return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]);
6595
+ var _this40 = this;
6596
+ var correlationToClear = this.pstnCorrelationId;
6597
+ return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]).then(function () {
6598
+ if (_this40.pstnCorrelationId === correlationToClear) {
6599
+ _this40.pstnCorrelationId = undefined;
6600
+ }
6601
+ });
6584
6602
  }
6585
6603
 
6586
6604
  /**
@@ -6593,7 +6611,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6593
6611
  }, {
6594
6612
  key: "moveTo",
6595
6613
  value: function moveTo(resourceId) {
6596
- var _this40 = this;
6614
+ var _this41 = this;
6597
6615
  if (!resourceId) {
6598
6616
  throw new _parameter.default('Cannot move call without a resourceId.');
6599
6617
  }
@@ -6637,12 +6655,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6637
6655
  while (1) switch (_context21.prev = _context21.next) {
6638
6656
  case 0:
6639
6657
  _context21.prev = 0;
6640
- if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6658
+ if (!(_this41.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6641
6659
  _context21.next = 4;
6642
6660
  break;
6643
6661
  }
6644
6662
  _context21.next = 4;
6645
- return _this40.releaseScreenShareFloor();
6663
+ return _this41.releaseScreenShareFloor();
6646
6664
  case 4:
6647
6665
  mediaSettings = {
6648
6666
  mediaDirection: {
@@ -6654,37 +6672,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6654
6672
  receiveShare: true
6655
6673
  }
6656
6674
  };
6657
- _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6658
- _this40.mediaProperties.unsetRemoteMedia();
6675
+ _this41.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6676
+ _this41.mediaProperties.unsetRemoteMedia();
6659
6677
 
6660
6678
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
6661
6679
  // once the device answers we close the old connection and create new media server connection with only share enabled
6662
- if (!_this40.statsAnalyzer) {
6680
+ if (!_this41.statsAnalyzer) {
6663
6681
  _context21.next = 10;
6664
6682
  break;
6665
6683
  }
6666
6684
  _context21.next = 10;
6667
- return _this40.statsAnalyzer.stopAnalyzer();
6685
+ return _this41.statsAnalyzer.stopAnalyzer();
6668
6686
  case 10:
6669
6687
  _context21.next = 12;
6670
- return _this40.closeRemoteStreams();
6688
+ return _this41.closeRemoteStreams();
6671
6689
  case 12:
6672
6690
  _context21.next = 14;
6673
- return _this40.closePeerConnections();
6691
+ return _this41.closePeerConnections();
6674
6692
  case 14:
6675
- _this40.cleanupLocalStreams();
6676
- _this40.unsetRemoteStreams();
6677
- _this40.unsetPeerConnections();
6678
- _this40.reconnectionManager.cleanUp();
6693
+ _this41.cleanupLocalStreams();
6694
+ _this41.unsetRemoteStreams();
6695
+ _this41.unsetPeerConnections();
6696
+ _this41.reconnectionManager.cleanUp();
6679
6697
  _context21.next = 20;
6680
- return _this40.addMedia({
6698
+ return _this41.addMedia({
6681
6699
  audioEnabled: false,
6682
6700
  videoEnabled: false,
6683
6701
  shareVideoEnabled: true
6684
6702
  });
6685
6703
  case 20:
6686
6704
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6687
- _this40.isMoveToInProgress = false;
6705
+ _this41.isMoveToInProgress = false;
6688
6706
  _context21.next = 29;
6689
6707
  break;
6690
6708
  case 24:
@@ -6692,12 +6710,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6692
6710
  _context21.t0 = _context21["catch"](0);
6693
6711
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6694
6712
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6695
- correlation_id: _this40.correlationId,
6696
- locus_id: _this40.locusUrl.split('/').pop(),
6713
+ correlation_id: _this41.correlationId,
6714
+ locus_id: _this41.locusUrl.split('/').pop(),
6697
6715
  reason: _context21.t0.message,
6698
6716
  stack: _context21.t0.stack
6699
6717
  });
6700
- _this40.isMoveToInProgress = false;
6718
+ _this41.isMoveToInProgress = false;
6701
6719
  case 29:
6702
6720
  case "end":
6703
6721
  return _context21.stop();
@@ -6713,17 +6731,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6713
6731
  resourceId: resourceId,
6714
6732
  moveToResource: true
6715
6733
  }).then(function () {
6716
- _this40.meetingFiniteStateMachine.join();
6734
+ _this41.meetingFiniteStateMachine.join();
6717
6735
  }).catch(function (error) {
6718
- _this40.meetingFiniteStateMachine.fail(error);
6736
+ _this41.meetingFiniteStateMachine.fail(error);
6719
6737
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6720
- correlation_id: _this40.correlationId,
6721
- locus_id: _this40.locusUrl.split('/').pop(),
6738
+ correlation_id: _this41.correlationId,
6739
+ locus_id: _this41.locusUrl.split('/').pop(),
6722
6740
  reason: error.message,
6723
6741
  stack: error.stack
6724
6742
  });
6725
6743
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6726
- _this40.isMoveToInProgress = false;
6744
+ _this41.isMoveToInProgress = false;
6727
6745
  return _promise.default.reject(error);
6728
6746
  });
6729
6747
  }
@@ -6738,7 +6756,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6738
6756
  }, {
6739
6757
  key: "moveFrom",
6740
6758
  value: function moveFrom(resourceId) {
6741
- var _this41 = this;
6759
+ var _this42 = this;
6742
6760
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6743
6761
  if (!resourceId) {
6744
6762
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6753,19 +6771,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6753
6771
  }
6754
6772
  });
6755
6773
  return _util2.default.joinMeetingOptions(this).then(function () {
6756
- return _util2.default.leaveMeeting(_this41, {
6774
+ return _util2.default.leaveMeeting(_this42, {
6757
6775
  resourceId: resourceId,
6758
6776
  correlationId: oldCorrelationId,
6759
6777
  moveMeeting: true
6760
6778
  }).then(function () {
6761
- _this41.resourceId = '';
6779
+ _this42.resourceId = '';
6762
6780
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6763
6781
  });
6764
6782
  }).catch(function (error) {
6765
- _this41.meetingFiniteStateMachine.fail(error);
6783
+ _this42.meetingFiniteStateMachine.fail(error);
6766
6784
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6767
- correlation_id: _this41.correlationId,
6768
- locus_id: _this41.locusUrl.split('/').pop(),
6785
+ correlation_id: _this42.correlationId,
6786
+ locus_id: _this42.locusUrl.split('/').pop(),
6769
6787
  reason: error.message,
6770
6788
  stack: error.stack
6771
6789
  });
@@ -6888,9 +6906,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6888
6906
  }, {
6889
6907
  key: "forwardEvent",
6890
6908
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6891
- var _this42 = this;
6909
+ var _this43 = this;
6892
6910
  eventEmitter.on(eventTypeToForward, function (data) {
6893
- return _triggerProxy.default.trigger(_this42, {
6911
+ return _triggerProxy.default.trigger(_this43, {
6894
6912
  file: 'meetings',
6895
6913
  function: 'addMedia'
6896
6914
  }, meetingEventType, data);
@@ -7076,7 +7094,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7076
7094
  key: "waitForRemoteSDPAnswer",
7077
7095
  value: (function () {
7078
7096
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
7079
- var _this43 = this;
7097
+ var _this44 = this;
7080
7098
  var LOG_HEADER, deferSDPAnswer;
7081
7099
  return _regenerator.default.wrap(function _callee25$(_context25) {
7082
7100
  while (1) switch (_context25.prev = _context25.next) {
@@ -7095,18 +7113,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7095
7113
  var error = new Error('Timed out waiting for REMOTE SDP ANSWER');
7096
7114
 
7097
7115
  // @ts-ignore
7098
- _this43.webex.internal.newMetrics.submitClientEvent({
7116
+ _this44.webex.internal.newMetrics.submitClientEvent({
7099
7117
  name: 'client.media-engine.remote-sdp-received',
7100
7118
  payload: {
7101
7119
  canProceed: false,
7102
7120
  errors: [
7103
7121
  // @ts-ignore
7104
- _this43.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7122
+ _this44.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7105
7123
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
7106
7124
  })]
7107
7125
  },
7108
7126
  options: {
7109
- meetingId: _this43.id,
7127
+ meetingId: _this44.id,
7110
7128
  rawError: error
7111
7129
  }
7112
7130
  });
@@ -7613,10 +7631,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7613
7631
  }, {
7614
7632
  key: "addMedia",
7615
7633
  value: function addMedia() {
7616
- var _this44 = this;
7634
+ var _this45 = this;
7617
7635
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7618
7636
  return this.addMediaInternal(function () {
7619
- return _this44.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7637
+ return _this45.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7620
7638
  }, undefined, false, options);
7621
7639
  }
7622
7640
 
@@ -7942,7 +7960,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7942
7960
  * @memberof Meeting
7943
7961
  */
7944
7962
  function enqueueMediaUpdate(mediaUpdateType) {
7945
- var _this45 = this;
7963
+ var _this46 = this;
7946
7964
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7947
7965
  var canUpdateMediaNow = this.canUpdateMedia();
7948
7966
  return new _promise.default(function (resolve, reject) {
@@ -7953,9 +7971,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7953
7971
  options: options
7954
7972
  };
7955
7973
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7956
- _this45.queuedMediaUpdates.push(queueItem);
7974
+ _this46.queuedMediaUpdates.push(queueItem);
7957
7975
  if (canUpdateMediaNow) {
7958
- _this45.processNextQueuedMediaUpdate();
7976
+ _this46.processNextQueuedMediaUpdate();
7959
7977
  }
7960
7978
  });
7961
7979
  }
@@ -8060,7 +8078,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8060
8078
  }, {
8061
8079
  key: "acknowledge",
8062
8080
  value: function acknowledge(type) {
8063
- var _this46 = this;
8081
+ var _this47 = this;
8064
8082
  if (!type) {
8065
8083
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
8066
8084
  }
@@ -8072,12 +8090,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8072
8090
  }).then(function (response) {
8073
8091
  return _promise.default.resolve(response);
8074
8092
  }).then(function (response) {
8075
- _this46.meetingFiniteStateMachine.ring(type);
8093
+ _this47.meetingFiniteStateMachine.ring(type);
8076
8094
  // @ts-ignore
8077
- _this46.webex.internal.newMetrics.submitClientEvent({
8095
+ _this47.webex.internal.newMetrics.submitClientEvent({
8078
8096
  name: 'client.alert.displayed',
8079
8097
  options: {
8080
- meetingId: _this46.id
8098
+ meetingId: _this47.id
8081
8099
  }
8082
8100
  });
8083
8101
  return _promise.default.resolve({
@@ -8102,12 +8120,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8102
8120
  }, {
8103
8121
  key: "decline",
8104
8122
  value: function decline(reason) {
8105
- var _this47 = this;
8123
+ var _this48 = this;
8106
8124
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
8107
- _this47.meetingFiniteStateMachine.decline();
8125
+ _this48.meetingFiniteStateMachine.decline();
8108
8126
  return _promise.default.resolve(decline);
8109
8127
  }).catch(function (error) {
8110
- _this47.meetingFiniteStateMachine.fail(error);
8128
+ _this48.meetingFiniteStateMachine.fail(error);
8111
8129
  return _promise.default.reject(error);
8112
8130
  });
8113
8131
  }
@@ -8158,7 +8176,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8158
8176
  }, {
8159
8177
  key: "leave",
8160
8178
  value: function leave() {
8161
- var _this48 = this;
8179
+ var _this49 = this;
8162
8180
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8163
8181
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
8164
8182
 
@@ -8170,7 +8188,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8170
8188
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8171
8189
  return (
8172
8190
  // @ts-ignore
8173
- _this48.webex.internal.newMetrics.submitClientEvent({
8191
+ _this49.webex.internal.newMetrics.submitClientEvent({
8174
8192
  name: 'client.call.leave',
8175
8193
  payload: _objectSpread({
8176
8194
  trigger: 'user-interaction',
@@ -8178,7 +8196,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8178
8196
  leaveReason: options.clientEventLeaveReason
8179
8197
  }, payload),
8180
8198
  options: {
8181
- meetingId: _this48.id
8199
+ meetingId: _this49.id
8182
8200
  }
8183
8201
  })
8184
8202
  );
@@ -8187,24 +8205,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8187
8205
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
8188
8206
  // CA team recommends submitting this *after* locus /leave
8189
8207
  submitLeaveMetric();
8190
- _this48.meetingFiniteStateMachine.leave();
8191
- _this48.clearMeetingData();
8208
+ _this49.meetingFiniteStateMachine.leave();
8209
+ _this49.clearMeetingData();
8192
8210
 
8193
8211
  // upload logs on leave irrespective of meeting delete
8194
- _triggerProxy.default.trigger(_this48, {
8212
+ _triggerProxy.default.trigger(_this49, {
8195
8213
  file: 'meeting/index',
8196
8214
  function: 'leave'
8197
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
8215
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
8198
8216
 
8199
8217
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
8200
- if (_this48.wirelessShare || _this48.guest) {
8218
+ if (_this49.wirelessShare || _this49.guest) {
8201
8219
  // If screen sharing clean the meeting object
8202
- _triggerProxy.default.trigger(_this48, {
8220
+ _triggerProxy.default.trigger(_this49, {
8203
8221
  file: 'meeting/index',
8204
8222
  function: 'leave'
8205
8223
  }, _constants.EVENTS.DESTROY_MEETING, {
8206
8224
  reason: options.reason,
8207
- meetingId: _this48.id
8225
+ meetingId: _this49.id
8208
8226
  });
8209
8227
  }
8210
8228
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -8221,16 +8239,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8221
8239
  shownToUser: false
8222
8240
  }]
8223
8241
  });
8224
- _this48.meetingFiniteStateMachine.fail(error);
8242
+ _this49.meetingFiniteStateMachine.fail(error);
8225
8243
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
8226
8244
  // upload logs on leave irrespective of meeting delete
8227
- _triggerProxy.default.trigger(_this48, {
8245
+ _triggerProxy.default.trigger(_this49, {
8228
8246
  file: 'meeting/index',
8229
8247
  function: 'leave'
8230
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
8248
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
8231
8249
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
8232
- correlation_id: _this48.correlationId,
8233
- locus_id: _this48.locusUrl.split('/').pop(),
8250
+ correlation_id: _this49.correlationId,
8251
+ locus_id: _this49.locusUrl.split('/').pop(),
8234
8252
  reason: error.message,
8235
8253
  stack: error.stack,
8236
8254
  code: error.code
@@ -8250,7 +8268,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8250
8268
  }, {
8251
8269
  key: "startWhiteboardShare",
8252
8270
  value: function startWhiteboardShare(channelUrl, resourceToken) {
8253
- var _this49 = this;
8271
+ var _this50 = this;
8254
8272
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8255
8273
  return element.name === 'whiteboard';
8256
8274
  });
@@ -8283,13 +8301,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8283
8301
  body.resourceToken = resourceToken;
8284
8302
  }
8285
8303
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
8286
- _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8304
+ _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8287
8305
  return _promise.default.resolve();
8288
8306
  }).catch(function (error) {
8289
8307
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
8290
8308
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
8291
- correlation_id: _this49.correlationId,
8292
- locus_id: _this49.locusUrl.split('/').pop(),
8309
+ correlation_id: _this50.correlationId,
8310
+ locus_id: _this50.locusUrl.split('/').pop(),
8293
8311
  reason: error.message,
8294
8312
  stack: error.stack,
8295
8313
  board: {
@@ -8312,7 +8330,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8312
8330
  }, {
8313
8331
  key: "stopWhiteboardShare",
8314
8332
  value: function stopWhiteboardShare(channelUrl) {
8315
- var _this50 = this;
8333
+ var _this51 = this;
8316
8334
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8317
8335
  return element.name === 'whiteboard';
8318
8336
  });
@@ -8341,8 +8359,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8341
8359
  }).catch(function (error) {
8342
8360
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
8343
8361
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
8344
- correlation_id: _this50.correlationId,
8345
- locus_id: _this50.locusUrl.split('/').pop(),
8362
+ correlation_id: _this51.correlationId,
8363
+ locus_id: _this51.locusUrl.split('/').pop(),
8346
8364
  reason: error.message,
8347
8365
  stack: error.stack,
8348
8366
  board: {
@@ -8364,7 +8382,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8364
8382
  }, {
8365
8383
  key: "requestScreenShareFloor",
8366
8384
  value: function requestScreenShareFloor() {
8367
- var _this51 = this;
8385
+ var _this52 = this;
8368
8386
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
8369
8387
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
8370
8388
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -8395,34 +8413,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8395
8413
  resourceUrl: this.resourceUrl,
8396
8414
  shareInstanceId: this.localShareInstanceId
8397
8415
  }).then(function () {
8398
- _this51.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8416
+ _this52.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8399
8417
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
8400
- correlation_id: _this51.correlationId,
8401
- locus_id: _this51.locusUrl.split('/').pop()
8418
+ correlation_id: _this52.correlationId,
8419
+ locus_id: _this52.locusUrl.split('/').pop()
8402
8420
  });
8403
8421
  return _promise.default.resolve();
8404
8422
  }).catch(function (error) {
8405
8423
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
8406
8424
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
8407
- correlation_id: _this51.correlationId,
8408
- locus_id: _this51.locusUrl.split('/').pop(),
8425
+ correlation_id: _this52.correlationId,
8426
+ locus_id: _this52.locusUrl.split('/').pop(),
8409
8427
  reason: error.message,
8410
8428
  stack: error.stack
8411
8429
  });
8412
8430
 
8413
8431
  // @ts-ignore
8414
- _this51.webex.internal.newMetrics.submitClientEvent({
8432
+ _this52.webex.internal.newMetrics.submitClientEvent({
8415
8433
  name: 'client.share.floor-granted.local',
8416
8434
  payload: {
8417
8435
  mediaType: 'share',
8418
8436
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
8419
- shareInstanceId: _this51.localShareInstanceId
8437
+ shareInstanceId: _this52.localShareInstanceId
8420
8438
  },
8421
8439
  options: {
8422
- meetingId: _this51.id
8440
+ meetingId: _this52.id
8423
8441
  }
8424
8442
  });
8425
- _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8443
+ _this52.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8426
8444
  return _promise.default.reject(error);
8427
8445
  });
8428
8446
  }
@@ -8445,10 +8463,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8445
8463
  }, {
8446
8464
  key: "requestScreenShareFloorIfPending",
8447
8465
  value: function requestScreenShareFloorIfPending() {
8448
- var _this52 = this;
8466
+ var _this53 = this;
8449
8467
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
8450
8468
  this.requestScreenShareFloor().then(function () {
8451
- _this52.floorGrantPending = false;
8469
+ _this53.floorGrantPending = false;
8452
8470
  });
8453
8471
  }
8454
8472
  }
@@ -8462,7 +8480,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8462
8480
  }, {
8463
8481
  key: "releaseScreenShareFloor",
8464
8482
  value: function releaseScreenShareFloor() {
8465
- var _this53 = this;
8483
+ var _this54 = this;
8466
8484
  var content = this.locusInfo.mediaShares.find(function (element) {
8467
8485
  return element.name === _constants.CONTENT;
8468
8486
  });
@@ -8503,8 +8521,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8503
8521
  }).catch(function (error) {
8504
8522
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
8505
8523
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
8506
- correlation_id: _this53.correlationId,
8507
- locus_id: _this53.locusUrl.split('/').pop(),
8524
+ correlation_id: _this54.correlationId,
8525
+ locus_id: _this54.locusUrl.split('/').pop(),
8508
8526
  reason: error.message,
8509
8527
  stack: error.stack
8510
8528
  });
@@ -8684,7 +8702,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8684
8702
  }, {
8685
8703
  key: "changeVideoLayout",
8686
8704
  value: function changeVideoLayout(layoutType) {
8687
- var _this54 = this;
8705
+ var _this55 = this;
8688
8706
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8689
8707
  var main = renderInfo.main,
8690
8708
  content = renderInfo.content;
@@ -8738,7 +8756,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8738
8756
  }
8739
8757
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8740
8758
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8741
- _triggerProxy.default.trigger(_this54, {
8759
+ _triggerProxy.default.trigger(_this55, {
8742
8760
  file: 'meeting/index',
8743
8761
  function: 'changeVideoLayout'
8744
8762
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8854,7 +8872,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8854
8872
  }, {
8855
8873
  key: "endMeetingForAll",
8856
8874
  value: function endMeetingForAll() {
8857
- var _this55 = this;
8875
+ var _this56 = this;
8858
8876
  // @ts-ignore
8859
8877
  this.webex.internal.newMetrics.submitClientEvent({
8860
8878
  name: 'client.call.leave',
@@ -8872,25 +8890,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8872
8890
  locus_id: this.locusId
8873
8891
  });
8874
8892
  return _util2.default.endMeetingForAll(this).then(function (end) {
8875
- _this55.meetingFiniteStateMachine.end();
8876
- _this55.clearMeetingData();
8893
+ _this56.meetingFiniteStateMachine.end();
8894
+ _this56.clearMeetingData();
8877
8895
  // upload logs on leave irrespective of meeting delete
8878
- _triggerProxy.default.trigger(_this55, {
8896
+ _triggerProxy.default.trigger(_this56, {
8879
8897
  file: 'meeting/index',
8880
8898
  function: 'endMeetingForAll'
8881
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8899
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
8882
8900
  return end;
8883
8901
  }).catch(function (error) {
8884
- _this55.meetingFiniteStateMachine.fail(error);
8902
+ _this56.meetingFiniteStateMachine.fail(error);
8885
8903
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8886
8904
  // upload logs on leave irrespective of meeting delete
8887
- _triggerProxy.default.trigger(_this55, {
8905
+ _triggerProxy.default.trigger(_this56, {
8888
8906
  file: 'meeting/index',
8889
8907
  function: 'endMeetingForAll'
8890
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8908
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
8891
8909
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8892
- correlation_id: _this55.correlationId,
8893
- locus_id: _this55.locusUrl.split('/').pop(),
8910
+ correlation_id: _this56.correlationId,
8911
+ locus_id: _this56.locusUrl.split('/').pop(),
8894
8912
  reason: error.message,
8895
8913
  stack: error.stack,
8896
8914
  code: error.code
@@ -9051,7 +9069,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9051
9069
  _this$mediaProperties43,
9052
9070
  _this$mediaProperties44,
9053
9071
  _this$mediaProperties45,
9054
- _this56 = this;
9072
+ _this57 = this;
9055
9073
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
9056
9074
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
9057
9075
  if (!this.canUpdateMedia()) {
@@ -9076,8 +9094,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9076
9094
  }).catch(function (error) {
9077
9095
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
9078
9096
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
9079
- correlation_id: _this56.correlationId,
9080
- locus_id: _this56.locusUrl.split('/').pop(),
9097
+ correlation_id: _this57.correlationId,
9098
+ locus_id: _this57.locusUrl.split('/').pop(),
9081
9099
  reason: error.message,
9082
9100
  stack: error.stack
9083
9101
  });