@webex/plugin-meetings 3.0.0-beta.95 → 3.0.0-beta.96

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.
@@ -488,12 +488,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
488
488
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
489
489
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "transcription", void 0);
490
490
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMediaConnections", void 0);
491
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endCallInitiateJoinReq", void 0);
491
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endCallInitJoinReq", void 0);
492
492
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endJoinReqResp", void 0);
493
493
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endLocalSDPGenRemoteSDPRecvDelay", void 0);
494
494
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "joinedWith", void 0);
495
495
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusId", void 0);
496
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startCallInitiateJoinReq", void 0);
496
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startCallInitJoinReq", void 0);
497
497
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startJoinReqResp", void 0);
498
498
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startLocalSDPGenRemoteSDPRecvDelay", void 0);
499
499
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wirelessShare", void 0);
@@ -508,7 +508,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
508
508
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", void 0);
509
509
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localAudioTrackMuteStateHandler", void 0);
510
510
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localVideoTrackMuteStateHandler", void 0);
511
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webexMeetingId", void 0);
511
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
512
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "environment", void 0);
512
513
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
513
514
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "processRelayEvent", function (e) {
514
515
  switch (e.data.relayType) {
@@ -2172,10 +2173,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2172
2173
  localSDPGenRemoteSDPRecv: localSDPGenRemoteSDPRecv
2173
2174
  });
2174
2175
  }
2175
- var callInitiateJoinReq = this.getCallInitiateJoinReq();
2176
- if (callInitiateJoinReq) {
2176
+ var callInitJoinReq = this.getCallInitJoinReq();
2177
+ if (callInitJoinReq) {
2177
2178
  options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2178
- callInitiateJoinReq: callInitiateJoinReq
2179
+ callInitJoinReq: callInitJoinReq
2179
2180
  });
2180
2181
  }
2181
2182
  var joinReqResp = this.getJoinReqResp();
@@ -2184,12 +2185,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2184
2185
  joinReqResp: joinReqResp
2185
2186
  });
2186
2187
  }
2187
- var getTotalJmt = this.getTotalJmt();
2188
- if (getTotalJmt) {
2188
+ var totalJmt = this.getTotalJmt();
2189
+ if (totalJmt) {
2189
2190
  options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2190
- getTotalJmt: getTotalJmt
2191
+ totalJmt: totalJmt
2191
2192
  });
2192
2193
  }
2194
+ var curUserType = this.getCurUserType();
2195
+ if (curUserType) {
2196
+ options.userType = curUserType;
2197
+ }
2198
+ var curLoginType = this.getCurLoginType();
2199
+ if (curLoginType) {
2200
+ options.loginType = curLoginType;
2201
+ }
2202
+ if (this.environment) {
2203
+ options.environment = this.environment;
2204
+ }
2193
2205
  if (options.type === _constants.MQA_STATS.CA_TYPE) {
2194
2206
  payload = _metrics.default.initMediaPayload(options.event, identifiers, options);
2195
2207
  } else {
@@ -3401,7 +3413,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3401
3413
 
3402
3414
  // MeetingInfo will be undefined for 1:1 calls
3403
3415
  if (locusMeetingObject || webexMeetingInfo && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.errors && (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.errors.length) > 0)) {
3404
- var _locusMeetingObject, _locusMeetingObject2, _locusMeetingObject3, _locusMeetingObject4, _locusMeetingObject6;
3416
+ var _locusMeetingObject, _locusMeetingObject2, _locusMeetingObject3, _locusMeetingObject4, _locusMeetingObject6, _locusMeetingObject7;
3405
3417
  this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
3406
3418
  this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
3407
3419
  // @ts-ignore - config coming from registerPlugin
@@ -3416,6 +3428,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3416
3428
  }
3417
3429
  this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.hostId) || this.owner;
3418
3430
  this.permissionToken = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken;
3431
+ // Need to populate environment when sending CA event
3432
+ this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.channel);
3419
3433
  }
3420
3434
  }
3421
3435
 
@@ -5691,15 +5705,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5691
5705
  value: function leave() {
5692
5706
  var _this48 = this;
5693
5707
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5708
+ var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5694
5709
  _metrics.default.postEvent({
5695
5710
  event: _config.eventType.LEAVE,
5696
5711
  meeting: this,
5697
5712
  data: {
5698
5713
  trigger: _config.trigger.USER_INTERACTION,
5699
- canProceed: false
5714
+ canProceed: false,
5715
+ reason: leaveReason
5700
5716
  }
5701
5717
  });
5702
- var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5703
5718
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
5704
5719
  return _util.default.leaveMeeting(this, options).then(function (leave) {
5705
5720
  _this48.meetingFiniteStateMachine.leave();
@@ -6527,7 +6542,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6527
6542
  var start = this.startLocalSDPGenRemoteSDPRecvDelay;
6528
6543
  var end = this.endLocalSDPGenRemoteSDPRecvDelay;
6529
6544
  if (start && end) {
6530
- var calculatedDelay = end - start;
6545
+ var calculatedDelay = Math.round(end - start);
6531
6546
  return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
6532
6547
  }
6533
6548
  return undefined;
@@ -6538,10 +6553,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6538
6553
  * @returns {undefined}
6539
6554
  */
6540
6555
  }, {
6541
- key: "setStartCallInitiateJoinReq",
6542
- value: function setStartCallInitiateJoinReq() {
6543
- this.startCallInitiateJoinReq = performance.now();
6544
- this.endCallInitiateJoinReq = undefined;
6556
+ key: "setStartCallInitJoinReq",
6557
+ value: function setStartCallInitJoinReq() {
6558
+ this.startCallInitJoinReq = performance.now();
6559
+ this.endCallInitJoinReq = undefined;
6545
6560
  }
6546
6561
 
6547
6562
  /**
@@ -6549,9 +6564,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6549
6564
  * @returns {undefined}
6550
6565
  */
6551
6566
  }, {
6552
- key: "setEndCallInitiateJoinReq",
6553
- value: function setEndCallInitiateJoinReq() {
6554
- this.endCallInitiateJoinReq = performance.now();
6567
+ key: "setEndCallInitJoinReq",
6568
+ value: function setEndCallInitJoinReq() {
6569
+ this.endCallInitJoinReq = performance.now();
6555
6570
  }
6556
6571
 
6557
6572
  /**
@@ -6559,10 +6574,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6559
6574
  * @returns {string} duration between call initiate and sending join request to locus
6560
6575
  */
6561
6576
  }, {
6562
- key: "getCallInitiateJoinReq",
6563
- value: function getCallInitiateJoinReq() {
6564
- var start = this.startCallInitiateJoinReq;
6565
- var end = this.endCallInitiateJoinReq;
6577
+ key: "getCallInitJoinReq",
6578
+ value: function getCallInitJoinReq() {
6579
+ var start = this.startCallInitJoinReq;
6580
+ var end = this.endCallInitJoinReq;
6566
6581
  if (start && end) {
6567
6582
  var calculatedDelay = end - start;
6568
6583
  return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
@@ -6601,7 +6616,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6601
6616
  var start = this.startJoinReqResp;
6602
6617
  var end = this.endJoinReqResp;
6603
6618
  if (start && end) {
6604
- var calculatedDelay = end - start;
6619
+ var calculatedDelay = Math.round(end - start);
6605
6620
  return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
6606
6621
  }
6607
6622
  return undefined;
@@ -6614,9 +6629,46 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6614
6629
  }, {
6615
6630
  key: "getTotalJmt",
6616
6631
  value: function getTotalJmt() {
6617
- var start = this.startCallInitiateJoinReq;
6632
+ var start = this.startCallInitJoinReq;
6618
6633
  var end = this.endJoinReqResp;
6619
- return start && end ? end - start : undefined;
6634
+ return start && end ? Math.round(end - start) : undefined;
6635
+ }
6636
+
6637
+ /**
6638
+ *
6639
+ * @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
6640
+ */
6641
+ }, {
6642
+ key: "getCurUserType",
6643
+ value: function getCurUserType() {
6644
+ var roles = this.roles;
6645
+ if (roles) {
6646
+ if (roles.includes(_constants.SELF_ROLES.MODERATOR)) {
6647
+ return 'host';
6648
+ }
6649
+ if (roles.includes(_constants.SELF_ROLES.COHOST)) {
6650
+ return 'cohost';
6651
+ }
6652
+ if (roles.includes(_constants.SELF_ROLES.ATTENDEE)) {
6653
+ return 'attendee';
6654
+ }
6655
+ }
6656
+ return null;
6657
+ }
6658
+
6659
+ /**
6660
+ *
6661
+ * @returns {string} one of 'login-ci','unverified-guest', returns the login type of the current user
6662
+ */
6663
+ }, {
6664
+ key: "getCurLoginType",
6665
+ value: function getCurLoginType() {
6666
+ // @ts-ignore
6667
+ if (this.webex.canAuthorize) {
6668
+ // @ts-ignore
6669
+ return this.webex.credentials.isUnverifiedGuest ? 'unverified-guest' : 'login-ci';
6670
+ }
6671
+ return null;
6620
6672
  }
6621
6673
 
6622
6674
  /**