@webex/plugin-meetings 3.7.0-next.9 → 3.7.0-web-workers-keepalive.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/annotation/index.js +17 -0
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
  6. package/dist/common/errors/join-webinar-error.js.map +1 -0
  7. package/dist/common/errors/multistream-not-supported-error.js +53 -0
  8. package/dist/common/errors/multistream-not-supported-error.js.map +1 -0
  9. package/dist/config.js +1 -1
  10. package/dist/config.js.map +1 -1
  11. package/dist/constants.js +26 -5
  12. package/dist/constants.js.map +1 -1
  13. package/dist/index.js +16 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/index.js +13 -2
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/selfUtils.js +30 -17
  20. package/dist/locus-info/selfUtils.js.map +1 -1
  21. package/dist/meeting/index.js +903 -800
  22. package/dist/meeting/index.js.map +1 -1
  23. package/dist/meeting/locusMediaRequest.js +9 -0
  24. package/dist/meeting/locusMediaRequest.js.map +1 -1
  25. package/dist/meeting/request.js +30 -0
  26. package/dist/meeting/request.js.map +1 -1
  27. package/dist/meeting/request.type.js.map +1 -1
  28. package/dist/meeting/util.js +16 -16
  29. package/dist/meeting/util.js.map +1 -1
  30. package/dist/meeting-info/meeting-info-v2.js +29 -17
  31. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  32. package/dist/meetings/index.js +2 -2
  33. package/dist/meetings/index.js.map +1 -1
  34. package/dist/meetings/util.js +1 -1
  35. package/dist/meetings/util.js.map +1 -1
  36. package/dist/member/index.js +9 -0
  37. package/dist/member/index.js.map +1 -1
  38. package/dist/member/types.js.map +1 -1
  39. package/dist/member/util.js +39 -28
  40. package/dist/member/util.js.map +1 -1
  41. package/dist/metrics/constants.js +1 -1
  42. package/dist/metrics/constants.js.map +1 -1
  43. package/dist/multistream/remoteMedia.js +30 -15
  44. package/dist/multistream/remoteMedia.js.map +1 -1
  45. package/dist/multistream/sendSlotManager.js +24 -0
  46. package/dist/multistream/sendSlotManager.js.map +1 -1
  47. package/dist/roap/index.js +10 -8
  48. package/dist/roap/index.js.map +1 -1
  49. package/dist/types/annotation/index.d.ts +5 -0
  50. package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
  51. package/dist/types/common/errors/multistream-not-supported-error.d.ts +17 -0
  52. package/dist/types/constants.d.ts +20 -1
  53. package/dist/types/index.d.ts +3 -3
  54. package/dist/types/locus-info/index.d.ts +2 -1
  55. package/dist/types/meeting/index.d.ts +19 -12
  56. package/dist/types/meeting/locusMediaRequest.d.ts +4 -0
  57. package/dist/types/meeting/request.d.ts +12 -1
  58. package/dist/types/meeting/request.type.d.ts +6 -0
  59. package/dist/types/meeting/util.d.ts +1 -1
  60. package/dist/types/meeting-info/meeting-info-v2.d.ts +4 -4
  61. package/dist/types/member/index.d.ts +1 -0
  62. package/dist/types/member/types.d.ts +7 -0
  63. package/dist/types/metrics/constants.d.ts +1 -1
  64. package/dist/types/multistream/sendSlotManager.d.ts +8 -1
  65. package/dist/webinar/index.js +354 -3
  66. package/dist/webinar/index.js.map +1 -1
  67. package/package.json +23 -22
  68. package/src/annotation/index.ts +16 -0
  69. package/src/common/errors/join-webinar-error.ts +24 -0
  70. package/src/common/errors/multistream-not-supported-error.ts +30 -0
  71. package/src/config.ts +1 -1
  72. package/src/constants.ts +23 -3
  73. package/src/index.ts +5 -3
  74. package/src/locus-info/index.ts +17 -2
  75. package/src/locus-info/selfUtils.ts +19 -6
  76. package/src/meeting/index.ts +234 -80
  77. package/src/meeting/locusMediaRequest.ts +7 -0
  78. package/src/meeting/request.ts +26 -1
  79. package/src/meeting/request.type.ts +7 -0
  80. package/src/meeting/util.ts +8 -10
  81. package/src/meeting-info/meeting-info-v2.ts +23 -11
  82. package/src/meetings/index.ts +2 -2
  83. package/src/meetings/util.ts +2 -1
  84. package/src/member/index.ts +9 -0
  85. package/src/member/types.ts +8 -0
  86. package/src/member/util.ts +34 -24
  87. package/src/metrics/constants.ts +1 -1
  88. package/src/multistream/remoteMedia.ts +28 -15
  89. package/src/multistream/sendSlotManager.ts +31 -0
  90. package/src/roap/index.ts +10 -8
  91. package/src/webinar/index.ts +197 -3
  92. package/test/unit/spec/annotation/index.ts +46 -1
  93. package/test/unit/spec/locus-info/index.js +222 -0
  94. package/test/unit/spec/locus-info/selfConstant.js +7 -0
  95. package/test/unit/spec/locus-info/selfUtils.js +91 -1
  96. package/test/unit/spec/meeting/index.js +683 -103
  97. package/test/unit/spec/meeting/utils.js +22 -19
  98. package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
  99. package/test/unit/spec/meetings/utils.js +10 -0
  100. package/test/unit/spec/member/util.js +52 -11
  101. package/test/unit/spec/multistream/remoteMedia.ts +11 -7
  102. package/test/unit/spec/roap/index.ts +47 -0
  103. package/test/unit/spec/webinar/index.ts +457 -0
  104. package/dist/common/errors/webinar-registration-error.js.map +0 -1
  105. package/src/common/errors/webinar-registration-error.ts +0 -27
@@ -18,10 +18,10 @@ _Object$defineProperty(exports, "__esModule", {
18
18
  exports.default = exports.ScreenShareFloorStatus = exports.MEDIA_UPDATE_TYPE = void 0;
19
19
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
20
20
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
21
+ var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
21
22
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
22
23
  var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
23
24
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
24
- var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
25
25
  var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/weak-map"));
26
26
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
27
27
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
@@ -87,7 +87,8 @@ var _controlsOptionsManager = _interopRequireDefault(require("../controls-option
87
87
  var _permission = _interopRequireDefault(require("../common/errors/permission"));
88
88
  var _locusMediaRequest = require("./locusMediaRequest");
89
89
  var _connectionStateHandler = require("./connectionStateHandler");
90
- var _webinarRegistrationError = _interopRequireDefault(require("../common/errors/webinar-registration-error"));
90
+ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-webinar-error"));
91
+ var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
91
92
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
92
93
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
93
94
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -567,8 +568,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
567
568
  if (
568
569
  // @ts-ignore - config coming from registerPlugin
569
570
  (_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
570
- var _this$members$members = _this.members.membersCollection.get(e.data.sender.participantId),
571
- name = _this$members$members.name;
571
+ var member = _this.members.membersCollection.get(e.data.sender.participantId);
572
+ if (!member) {
573
+ // @ts-ignore -- fix type
574
+ _loggerProxy.default.logger.warn("Meeting:index#processRelayEvent --> Skipping handling of ".concat(_constants3.REACTION_RELAY_TYPES.REACTION, " for ").concat(_this.id, ". participantId ").concat(e.data.sender.participantId, " does not exist in membersCollection."));
575
+ break;
576
+ }
577
+ var name = member.name;
572
578
  var processedReaction = {
573
579
  reaction: e.data.reaction,
574
580
  sender: {
@@ -675,6 +681,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
675
681
  */
676
682
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
677
683
  var mediaServer = _util3.default.getMediaServer(roapMessage.sdp);
684
+ if (_this.isMultistream && mediaServer !== 'homer') {
685
+ throw new _multistreamNotSupportedError.default("Client asked for multistream backend (Homer), but got ".concat(mediaServer, " instead"));
686
+ }
678
687
  _this.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
679
688
  if (mediaServer) {
680
689
  _this.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;
@@ -769,15 +778,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
769
778
  }), {
770
779
  logText: "".concat(LOG_HEADER, " Roap Offer")
771
780
  }).catch(function (error) {
781
+ var multistreamNotSupported = error instanceof _multistreamNotSupportedError.default;
782
+
772
783
  // @ts-ignore
773
784
  _this.webex.internal.newMetrics.submitClientEvent({
774
785
  name: 'client.media-engine.remote-sdp-received',
775
786
  payload: {
776
- canProceed: false,
787
+ canProceed: multistreamNotSupported,
777
788
  errors: [
778
789
  // @ts-ignore
779
790
  _this.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
780
- clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
791
+ clientErrorCode: multistreamNotSupported ? _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MULTISTREAM_NOT_AVAILABLE_CLIENT_CODE : _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
781
792
  })]
782
793
  },
783
794
  options: {
@@ -785,7 +796,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
785
796
  rawError: error
786
797
  }
787
798
  });
788
- _this.deferSDPAnswer.reject(new Error('failed to send ROAP SDP offer'));
799
+ _this.deferSDPAnswer.reject(error);
789
800
  clearTimeout(_this.sdpResponseTimer);
790
801
  _this.sdpResponseTimer = undefined;
791
802
  });
@@ -1027,6 +1038,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1027
1038
  options.data.intervalMetadata.peerReflexiveIP =
1028
1039
  // @ts-ignore
1029
1040
  ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
1041
+ var members = _this.getMembers().membersCollection.members;
1042
+
1043
+ // Count members that are in the meeting
1044
+ options.data.intervalMetadata.meetingUserCount = (0, _values.default)(members).filter(function (member) {
1045
+ return member.isInMeeting;
1046
+ }).length;
1047
+
1030
1048
  // @ts-ignore
1031
1049
  _this.webex.internal.newMetrics.submitMQE({
1032
1050
  name: 'client.mediaquality.event',
@@ -1344,6 +1362,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1344
1362
  _this.stopTranscription();
1345
1363
  _this.transcription = undefined;
1346
1364
  }
1365
+ _this.annotation.deregisterEvents();
1366
+
1367
+ // @ts-ignore - fix types
1368
+ _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
1347
1369
  });
1348
1370
  /**
1349
1371
  * starts keepAlives being sent
@@ -1369,10 +1391,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1369
1391
  _loggerProxy.default.logger.warn('Meeting:index#startKeepAlive --> keepAlive not started: keepAliveSecs <= 1');
1370
1392
  return;
1371
1393
  }
1372
- var keepAliveUrl = _this.joinedWith.keepAliveUrl;
1373
1394
  var keepAliveInterval = (_this.joinedWith.keepAliveSecs - 1) * 750; // taken from UCF
1374
1395
 
1375
1396
  _this.keepAliveTimerId = setInterval(function () {
1397
+ var keepAliveUrl = _this.joinedWith.keepAliveUrl;
1376
1398
  _this.meetingRequest.keepAlive({
1377
1399
  keepAliveUrl: keepAliveUrl
1378
1400
  }).catch(function (error) {
@@ -1520,7 +1542,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1520
1542
  * @memberof Meeting
1521
1543
  */
1522
1544
  // @ts-ignore
1523
- _this.webinar = new _webinar.default({}, {
1545
+ _this.webinar = new _webinar.default({
1546
+ meetingId: _this.id
1547
+ }, {
1524
1548
  parent: _this.webex
1525
1549
  });
1526
1550
  /**
@@ -2427,19 +2451,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2427
2451
  }
2428
2452
  throw new _permission.default();
2429
2453
  case 21:
2430
- if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2WebinarRegistrationError)) {
2431
- _context5.next = 28;
2454
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2JoinWebinarError)) {
2455
+ _context5.next = 29;
2432
2456
  break;
2433
2457
  }
2434
2458
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION;
2459
+ if (_constants.WEBINAR_ERROR_WEBCAST.includes(_context5.t0.wbxAppApiCode)) {
2460
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NEED_JOIN_WITH_WEBCAST;
2461
+ } else if (_constants.WEBINAR_ERROR_REGISTRATIONID.includes(_context5.t0.wbxAppApiCode)) {
2462
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_NEED_REGISTRATIONID;
2463
+ }
2435
2464
  this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2436
2465
  if (_context5.t0.meetingInfo) {
2437
2466
  this.meetingInfo = _context5.t0.meetingInfo;
2438
2467
  }
2439
- throw new _webinarRegistrationError.default();
2440
- case 28:
2468
+ throw new _joinWebinarError.default();
2469
+ case 29:
2441
2470
  if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2442
- _context5.next = 40;
2471
+ _context5.next = 41;
2443
2472
  break;
2444
2473
  }
2445
2474
  _loggerProxy.default.logger.info( // @ts-ignore
@@ -2454,16 +2483,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2454
2483
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2455
2484
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2456
2485
  if (!this.requiredCaptcha) {
2457
- _context5.next = 37;
2486
+ _context5.next = 38;
2458
2487
  break;
2459
2488
  }
2460
- _context5.next = 37;
2489
+ _context5.next = 38;
2461
2490
  return this.refreshCaptcha();
2462
- case 37:
2491
+ case 38:
2463
2492
  throw new _passwordError.default();
2464
- case 40:
2493
+ case 41:
2465
2494
  if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2466
- _context5.next = 49;
2495
+ _context5.next = 50;
2467
2496
  break;
2468
2497
  }
2469
2498
  _loggerProxy.default.logger.info( // @ts-ignore
@@ -2475,10 +2504,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2475
2504
  }
2476
2505
  this.requiredCaptcha = _context5.t0.captchaInfo;
2477
2506
  throw new _captchaError.default();
2478
- case 49:
2507
+ case 50:
2479
2508
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
2480
2509
  throw _context5.t0;
2481
- case 51:
2510
+ case 52:
2482
2511
  case "end":
2483
2512
  return _context5.stop();
2484
2513
  }
@@ -3311,7 +3340,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3311
3340
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3312
3341
  var _ref27 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3313
3342
  var _payload$previous, _payload$previous2;
3314
- var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, oldShareStatus, sendStartedSharingRemote, _this14$mediaProperti;
3343
+ var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this14$locusInfo, _this14$locusInfo$inf, _this14$webinar, oldShareStatus, sendStartedSharingRemote, _this14$mediaProperti;
3315
3344
  return _regenerator.default.wrap(function _callee8$(_context8) {
3316
3345
  while (1) switch (_context8.prev = _context8.next) {
3317
3346
  case 0:
@@ -3319,7 +3348,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3319
3348
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
3320
3349
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
3321
3350
  _this14.triggerAnnotationInfoEvent(contentShare, previousContentShare);
3322
- if (!(contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl) && contentShare.resourceType === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.resourceType))) {
3351
+ if (!(!payload.forceUpdate && contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl) && contentShare.resourceType === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.resourceType))) {
3323
3352
  _context8.next = 6;
3324
3353
  break;
3325
3354
  }
@@ -3345,7 +3374,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3345
3374
  // It does not matter who requested to share the whiteboard, everyone gets the same view
3346
3375
  else if (whiteboardShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
3347
3376
  // WHITEBOARD - sharing whiteboard
3348
- newShareStatus = _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3377
+ // Webinar attendee should receive whiteboard as remote share
3378
+ newShareStatus = (_this14$locusInfo = _this14.locusInfo) !== null && _this14$locusInfo !== void 0 && (_this14$locusInfo$inf = _this14$locusInfo.info) !== null && _this14$locusInfo$inf !== void 0 && _this14$locusInfo$inf.isWebinar && (_this14$webinar = _this14.webinar) !== null && _this14$webinar !== void 0 && _this14$webinar.selfIsAttendee ? _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE : _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3349
3379
  }
3350
3380
  // or if content share is either released or null and whiteboard share is either released or null, no one is sharing
3351
3381
  else if ((previousContentShare && contentShare.disposition === _constants.FLOOR_ACTION.RELEASED || contentShare.disposition === null) && (previousWhiteboardShare && whiteboardShare.disposition === _constants.FLOOR_ACTION.RELEASED || whiteboardShare.disposition === null)) {
@@ -3579,7 +3609,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3579
3609
  value: function setUpLocusResourcesListener() {
3580
3610
  var _this17 = this;
3581
3611
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LINKS_RESOURCES, function (payload) {
3582
- _this17.webinar.updateWebcastUrl(payload);
3612
+ if (payload) {
3613
+ _this17.webinar.updateWebcastUrl(payload);
3614
+ _triggerProxy.default.trigger(_this17, {
3615
+ file: 'meeting/index',
3616
+ function: 'setUpLocusInfoMeetingInfoListener'
3617
+ }, _constants.EVENT_TRIGGERS.MEETING_RESOURCE_LINKS_UPDATE, {
3618
+ payload: payload
3619
+ });
3620
+ }
3583
3621
  });
3584
3622
  }
3585
3623
 
@@ -3845,6 +3883,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3845
3883
  _this20.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
3846
3884
  }
3847
3885
  });
3886
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_BRB_CHANGED, function (payload) {
3887
+ _triggerProxy.default.trigger(_this20, {
3888
+ file: 'meeting/index',
3889
+ function: 'setUpLocusInfoSelfListener'
3890
+ }, _constants.EVENT_TRIGGERS.MEETING_SELF_BRB_UPDATE, {
3891
+ payload: payload
3892
+ });
3893
+ });
3848
3894
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, function (payload) {
3849
3895
  var _payload$newRoles, _payload$newRoles2, _payload$newRoles3;
3850
3896
  var isModeratorOrCohost = ((_payload$newRoles = payload.newRoles) === null || _payload$newRoles === void 0 ? void 0 : _payload$newRoles.includes(_constants.SELF_ROLES.MODERATOR)) || ((_payload$newRoles2 = payload.newRoles) === null || _payload$newRoles2 === void 0 ? void 0 : _payload$newRoles2.includes(_constants.SELF_ROLES.COHOST));
@@ -4043,6 +4089,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4043
4089
  return this.members.admitMembers(memberIds, locusUrls);
4044
4090
  }
4045
4091
 
4092
+ /**
4093
+ * Manages be right back status updates for the current participant.
4094
+ *
4095
+ * @param {boolean} enabled - Indicates whether the user enabled brb or not.
4096
+ * @returns {Promise<void>} resolves when the brb status is updated or does nothing if not in a multistream meeting.
4097
+ * @throws {Error} - Throws an error if the request fails.
4098
+ */
4099
+ }, {
4100
+ key: "beRightBack",
4101
+ value: (function () {
4102
+ var _beRightBack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4103
+ var _this23 = this;
4104
+ var errorMessage, error, _errorMessage, _error;
4105
+ return _regenerator.default.wrap(function _callee11$(_context11) {
4106
+ while (1) switch (_context11.prev = _context11.next) {
4107
+ case 0:
4108
+ if (this.isMultistream) {
4109
+ _context11.next = 5;
4110
+ break;
4111
+ }
4112
+ errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
4113
+ error = new Error(errorMessage);
4114
+ _loggerProxy.default.logger.error(error);
4115
+ return _context11.abrupt("return", _promise.default.reject(error));
4116
+ case 5:
4117
+ if (this.mediaProperties.webrtcMediaConnection) {
4118
+ _context11.next = 10;
4119
+ break;
4120
+ }
4121
+ _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
4122
+ _error = new Error(_errorMessage);
4123
+ _loggerProxy.default.logger.error(_error);
4124
+ return _context11.abrupt("return", _promise.default.reject(_error));
4125
+ case 10:
4126
+ return _context11.abrupt("return", this.meetingRequest.setBrb({
4127
+ enabled: enabled,
4128
+ locusUrl: this.locusUrl,
4129
+ deviceUrl: this.deviceUrl,
4130
+ selfId: this.selfId
4131
+ }).then(function () {
4132
+ _this23.sendSlotManager.setSourceStateOverride(_internalMediaCore.MediaType.VideoMain, enabled ? 'away' : null);
4133
+ }).catch(function (error) {
4134
+ _loggerProxy.default.logger.error('Meeting:index#beRightBack --> Error ', error);
4135
+ return _promise.default.reject(error);
4136
+ }));
4137
+ case 11:
4138
+ case "end":
4139
+ return _context11.stop();
4140
+ }
4141
+ }, _callee11, this);
4142
+ }));
4143
+ function beRightBack(_x11) {
4144
+ return _beRightBack.apply(this, arguments);
4145
+ }
4146
+ return beRightBack;
4147
+ }()
4046
4148
  /**
4047
4149
  * Remove the member from the meeting, boot them
4048
4150
  * @param {String} memberId
@@ -4050,6 +4152,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4050
4152
  * @public
4051
4153
  * @memberof Meeting
4052
4154
  */
4155
+ )
4053
4156
  }, {
4054
4157
  key: "remove",
4055
4158
  value: function remove(memberId) {
@@ -4524,25 +4627,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4524
4627
  }, {
4525
4628
  key: "setLogUploadTimer",
4526
4629
  value: function setLogUploadTimer() {
4527
- var _this23 = this;
4630
+ var _this24 = this;
4528
4631
  // start with short timeouts and increase them later on so in case users have very long multi-hour meetings we don't get too fragmented logs
4529
- var LOG_UPLOAD_INTERVALS = [0.1, 1, 15, 15, 30, 30, 30, 60];
4530
- var delay = 1000 *
4632
+ var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
4633
+
4634
+ var delay = 1000 * 60 *
4531
4635
  // @ts-ignore - config coming from registerPlugin
4532
4636
  this.config.logUploadIntervalMultiplicationFactor * LOG_UPLOAD_INTERVALS[this.logUploadIntervalIndex];
4533
4637
  if (this.logUploadIntervalIndex < LOG_UPLOAD_INTERVALS.length - 1) {
4534
4638
  this.logUploadIntervalIndex += 1;
4535
4639
  }
4536
4640
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
4537
- _this23.uploadLogsTimer = undefined;
4538
- _this23.uploadLogs();
4641
+ _this24.uploadLogsTimer = undefined;
4642
+ _this24.uploadLogs();
4539
4643
 
4540
4644
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
4541
4645
  // and the page remains opened, we stop it if there is no media connection
4542
- if (!_this23.mediaProperties.webrtcMediaConnection) {
4646
+ if (!_this24.mediaProperties.webrtcMediaConnection) {
4543
4647
  return;
4544
4648
  }
4545
- _this23.setLogUploadTimer();
4649
+ _this24.setLogUploadTimer();
4546
4650
  }, delay);
4547
4651
  }
4548
4652
 
@@ -4609,7 +4713,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4609
4713
  }, {
4610
4714
  key: "closeRemoteStreams",
4611
4715
  value: function closeRemoteStreams() {
4612
- var _this24 = this;
4716
+ var _this25 = this;
4613
4717
  var _this$mediaProperties4 = this.mediaProperties,
4614
4718
  remoteAudioStream = _this$mediaProperties4.remoteAudioStream,
4615
4719
  remoteVideoStream = _this$mediaProperties4.remoteVideoStream,
@@ -4623,7 +4727,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4623
4727
  */
4624
4728
  // eslint-disable-next-line @typescript-eslint/no-shadow
4625
4729
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
4626
- _triggerProxy.default.trigger(_this24, {
4730
+ _triggerProxy.default.trigger(_this25, {
4627
4731
  file: 'meeting/index',
4628
4732
  function: 'closeRemoteStreams'
4629
4733
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -4657,11 +4761,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4657
4761
  }, {
4658
4762
  key: "setLocalAudioStream",
4659
4763
  value: (function () {
4660
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4764
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4661
4765
  var _this$audio2;
4662
4766
  var oldStream;
4663
- return _regenerator.default.wrap(function _callee11$(_context11) {
4664
- while (1) switch (_context11.prev = _context11.next) {
4767
+ return _regenerator.default.wrap(function _callee12$(_context12) {
4768
+ while (1) switch (_context12.prev = _context12.next) {
4665
4769
  case 0:
4666
4770
  oldStream = this.mediaProperties.audioStream;
4667
4771
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -4675,21 +4779,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4675
4779
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
4676
4780
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4677
4781
  if (!(!this.isMultistream || !localStream)) {
4678
- _context11.next = 12;
4782
+ _context12.next = 12;
4679
4783
  break;
4680
4784
  }
4681
- _context11.next = 12;
4785
+ _context12.next = 12;
4682
4786
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
4683
4787
  case 12:
4684
- _context11.next = 14;
4788
+ _context12.next = 14;
4685
4789
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
4686
4790
  case 14:
4687
4791
  case "end":
4688
- return _context11.stop();
4792
+ return _context12.stop();
4689
4793
  }
4690
- }, _callee11, this);
4794
+ }, _callee12, this);
4691
4795
  }));
4692
- function setLocalAudioStream(_x11) {
4796
+ function setLocalAudioStream(_x12) {
4693
4797
  return _setLocalAudioStream.apply(this, arguments);
4694
4798
  }
4695
4799
  return setLocalAudioStream;
@@ -4705,11 +4809,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4705
4809
  }, {
4706
4810
  key: "setLocalVideoStream",
4707
4811
  value: (function () {
4708
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4812
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
4709
4813
  var _this$video2;
4710
4814
  var oldStream;
4711
- return _regenerator.default.wrap(function _callee12$(_context12) {
4712
- while (1) switch (_context12.prev = _context12.next) {
4815
+ return _regenerator.default.wrap(function _callee13$(_context13) {
4816
+ while (1) switch (_context13.prev = _context13.next) {
4713
4817
  case 0:
4714
4818
  oldStream = this.mediaProperties.videoStream;
4715
4819
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -4723,21 +4827,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4723
4827
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
4724
4828
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4725
4829
  if (!(!this.isMultistream || !localStream)) {
4726
- _context12.next = 12;
4830
+ _context13.next = 12;
4727
4831
  break;
4728
4832
  }
4729
- _context12.next = 12;
4833
+ _context13.next = 12;
4730
4834
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
4731
4835
  case 12:
4732
- _context12.next = 14;
4836
+ _context13.next = 14;
4733
4837
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
4734
4838
  case 14:
4735
4839
  case "end":
4736
- return _context12.stop();
4840
+ return _context13.stop();
4737
4841
  }
4738
- }, _callee12, this);
4842
+ }, _callee13, this);
4739
4843
  }));
4740
- function setLocalVideoStream(_x12) {
4844
+ function setLocalVideoStream(_x13) {
4741
4845
  return _setLocalVideoStream.apply(this, arguments);
4742
4846
  }
4743
4847
  return setLocalVideoStream;
@@ -4754,10 +4858,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4754
4858
  }, {
4755
4859
  key: "setLocalShareVideoStream",
4756
4860
  value: (function () {
4757
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
4861
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localDisplayStream) {
4758
4862
  var oldStream;
4759
- return _regenerator.default.wrap(function _callee13$(_context13) {
4760
- while (1) switch (_context13.prev = _context13.next) {
4863
+ return _regenerator.default.wrap(function _callee14$(_context14) {
4864
+ while (1) switch (_context14.prev = _context14.next) {
4761
4865
  case 0:
4762
4866
  oldStream = this.mediaProperties.shareVideoStream;
4763
4867
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -4769,21 +4873,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4769
4873
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4770
4874
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4771
4875
  if (!(!this.isMultistream || !localDisplayStream)) {
4772
- _context13.next = 12;
4876
+ _context14.next = 12;
4773
4877
  break;
4774
4878
  }
4775
- _context13.next = 12;
4879
+ _context14.next = 12;
4776
4880
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
4777
4881
  case 12:
4778
- _context13.next = 14;
4882
+ _context14.next = 14;
4779
4883
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
4780
4884
  case 14:
4781
4885
  case "end":
4782
- return _context13.stop();
4886
+ return _context14.stop();
4783
4887
  }
4784
- }, _callee13, this);
4888
+ }, _callee14, this);
4785
4889
  }));
4786
- function setLocalShareVideoStream(_x13) {
4890
+ function setLocalShareVideoStream(_x14) {
4787
4891
  return _setLocalShareVideoStream.apply(this, arguments);
4788
4892
  }
4789
4893
  return setLocalShareVideoStream;
@@ -4799,10 +4903,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4799
4903
  }, {
4800
4904
  key: "setLocalShareAudioStream",
4801
4905
  value: (function () {
4802
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
4906
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(localSystemAudioStream) {
4803
4907
  var oldStream;
4804
- return _regenerator.default.wrap(function _callee14$(_context14) {
4805
- while (1) switch (_context14.prev = _context14.next) {
4908
+ return _regenerator.default.wrap(function _callee15$(_context15) {
4909
+ while (1) switch (_context15.prev = _context15.next) {
4806
4910
  case 0:
4807
4911
  oldStream = this.mediaProperties.shareAudioStream;
4808
4912
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -4812,21 +4916,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4812
4916
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4813
4917
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4814
4918
  if (!(!this.isMultistream || !localSystemAudioStream)) {
4815
- _context14.next = 10;
4919
+ _context15.next = 10;
4816
4920
  break;
4817
4921
  }
4818
- _context14.next = 10;
4922
+ _context15.next = 10;
4819
4923
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
4820
4924
  case 10:
4821
- _context14.next = 12;
4925
+ _context15.next = 12;
4822
4926
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
4823
4927
  case 12:
4824
4928
  case "end":
4825
- return _context14.stop();
4929
+ return _context15.stop();
4826
4930
  }
4827
- }, _callee14, this);
4931
+ }, _callee15, this);
4828
4932
  }));
4829
- function setLocalShareAudioStream(_x14) {
4933
+ function setLocalShareAudioStream(_x15) {
4830
4934
  return _setLocalShareAudioStream.apply(this, arguments);
4831
4935
  }
4832
4936
  return setLocalShareAudioStream;
@@ -4931,7 +5035,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4931
5035
  }, {
4932
5036
  key: "setMercuryListener",
4933
5037
  value: function setMercuryListener() {
4934
- var _this25 = this;
5038
+ var _this26 = this;
4935
5039
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
4936
5040
  // if the meeting has active peer connections, it should try to reconnect.
4937
5041
  // @ts-ignore
@@ -4939,33 +5043,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4939
5043
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
4940
5044
 
4941
5045
  // Only send restore event when it was disconnected before and for connected later
4942
- if (!_this25.hasWebsocketConnected) {
5046
+ if (!_this26.hasWebsocketConnected) {
4943
5047
  // @ts-ignore
4944
- _this25.webex.internal.newMetrics.submitClientEvent({
5048
+ _this26.webex.internal.newMetrics.submitClientEvent({
4945
5049
  name: 'client.mercury.connection.restored',
4946
5050
  options: {
4947
- meetingId: _this25.id
5051
+ meetingId: _this26.id
4948
5052
  }
4949
5053
  });
4950
5054
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
4951
- correlation_id: _this25.correlationId
5055
+ correlation_id: _this26.correlationId
4952
5056
  });
4953
5057
  }
4954
- _this25.hasWebsocketConnected = true;
5058
+ _this26.hasWebsocketConnected = true;
4955
5059
  });
4956
5060
 
4957
5061
  // @ts-ignore
4958
5062
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
4959
5063
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
4960
5064
  // @ts-ignore
4961
- _this25.webex.internal.newMetrics.submitClientEvent({
5065
+ _this26.webex.internal.newMetrics.submitClientEvent({
4962
5066
  name: 'client.mercury.connection.lost',
4963
5067
  options: {
4964
- meetingId: _this25.id
5068
+ meetingId: _this26.id
4965
5069
  }
4966
5070
  });
4967
5071
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
4968
- correlation_id: _this25.correlationId
5072
+ correlation_id: _this26.correlationId
4969
5073
  });
4970
5074
  });
4971
5075
  }
@@ -4974,6 +5078,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4974
5078
  * Close the peer connections and remove them from the class.
4975
5079
  * Cleanup any media connection related things.
4976
5080
  *
5081
+ * @param {boolean} resetMuteStates whether to also reset the audio/video mute state information
4977
5082
  * @returns {Promise}
4978
5083
  * @public
4979
5084
  * @memberof Meeting
@@ -4981,6 +5086,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4981
5086
  }, {
4982
5087
  key: "closePeerConnections",
4983
5088
  value: function closePeerConnections() {
5089
+ var resetMuteStates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4984
5090
  if (this.mediaProperties.webrtcMediaConnection) {
4985
5091
  if (this.remoteMediaManager) {
4986
5092
  this.remoteMediaManager.stop();
@@ -4994,8 +5100,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4994
5100
  this.sendSlotManager.reset();
4995
5101
  this.setNetworkStatus(undefined);
4996
5102
  }
4997
- this.audio = null;
4998
- this.video = null;
5103
+ if (resetMuteStates) {
5104
+ this.audio = null;
5105
+ this.video = null;
5106
+ }
4999
5107
  return _promise.default.resolve();
5000
5108
  }
5001
5109
 
@@ -5067,7 +5175,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5067
5175
  }, {
5068
5176
  key: "muteAudio",
5069
5177
  value: function muteAudio() {
5070
- var _this26 = this;
5178
+ var _this27 = this;
5071
5179
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5072
5180
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5073
5181
  }
@@ -5083,22 +5191,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5083
5191
 
5084
5192
  // First, stop sending the local audio media
5085
5193
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
5086
- _util2.default.handleAudioLogging(_this26.mediaProperties.audioStream);
5194
+ _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5087
5195
  // @ts-ignore
5088
- _this26.webex.internal.newMetrics.submitClientEvent({
5196
+ _this27.webex.internal.newMetrics.submitClientEvent({
5089
5197
  name: 'client.muted',
5090
5198
  payload: {
5091
5199
  trigger: 'user-interaction',
5092
5200
  mediaType: 'audio'
5093
5201
  },
5094
5202
  options: {
5095
- meetingId: _this26.id
5203
+ meetingId: _this27.id
5096
5204
  }
5097
5205
  });
5098
5206
  }).catch(function (error) {
5099
5207
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
5100
- correlation_id: _this26.correlationId,
5101
- locus_id: _this26.locusUrl.split('/').pop(),
5208
+ correlation_id: _this27.correlationId,
5209
+ locus_id: _this27.locusUrl.split('/').pop(),
5102
5210
  reason: error.message,
5103
5211
  stack: error.stack
5104
5212
  });
@@ -5117,7 +5225,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5117
5225
  }, {
5118
5226
  key: "unmuteAudio",
5119
5227
  value: function unmuteAudio() {
5120
- var _this27 = this;
5228
+ var _this28 = this;
5121
5229
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5122
5230
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5123
5231
  }
@@ -5133,22 +5241,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5133
5241
 
5134
5242
  // First, send the control to unmute the participant on the server
5135
5243
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
5136
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5244
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5137
5245
  // @ts-ignore
5138
- _this27.webex.internal.newMetrics.submitClientEvent({
5246
+ _this28.webex.internal.newMetrics.submitClientEvent({
5139
5247
  name: 'client.unmuted',
5140
5248
  payload: {
5141
5249
  trigger: 'user-interaction',
5142
5250
  mediaType: 'audio'
5143
5251
  },
5144
5252
  options: {
5145
- meetingId: _this27.id
5253
+ meetingId: _this28.id
5146
5254
  }
5147
5255
  });
5148
5256
  }).catch(function (error) {
5149
5257
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
5150
- correlation_id: _this27.correlationId,
5151
- locus_id: _this27.locusUrl.split('/').pop(),
5258
+ correlation_id: _this28.correlationId,
5259
+ locus_id: _this28.locusUrl.split('/').pop(),
5152
5260
  reason: error.message,
5153
5261
  stack: error.stack
5154
5262
  });
@@ -5167,7 +5275,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5167
5275
  }, {
5168
5276
  key: "muteVideo",
5169
5277
  value: function muteVideo() {
5170
- var _this28 = this;
5278
+ var _this29 = this;
5171
5279
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5172
5280
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5173
5281
  }
@@ -5181,22 +5289,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5181
5289
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
5182
5290
  }
5183
5291
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
5184
- _util2.default.handleVideoLogging(_this28.mediaProperties.videoStream);
5292
+ _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5185
5293
  // @ts-ignore
5186
- _this28.webex.internal.newMetrics.submitClientEvent({
5294
+ _this29.webex.internal.newMetrics.submitClientEvent({
5187
5295
  name: 'client.muted',
5188
5296
  payload: {
5189
5297
  trigger: 'user-interaction',
5190
5298
  mediaType: 'video'
5191
5299
  },
5192
5300
  options: {
5193
- meetingId: _this28.id
5301
+ meetingId: _this29.id
5194
5302
  }
5195
5303
  });
5196
5304
  }).catch(function (error) {
5197
5305
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
5198
- correlation_id: _this28.correlationId,
5199
- locus_id: _this28.locusUrl.split('/').pop(),
5306
+ correlation_id: _this29.correlationId,
5307
+ locus_id: _this29.locusUrl.split('/').pop(),
5200
5308
  reason: error.message,
5201
5309
  stack: error.stack
5202
5310
  });
@@ -5215,7 +5323,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5215
5323
  }, {
5216
5324
  key: "unmuteVideo",
5217
5325
  value: function unmuteVideo() {
5218
- var _this29 = this;
5326
+ var _this30 = this;
5219
5327
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5220
5328
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5221
5329
  }
@@ -5229,22 +5337,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5229
5337
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
5230
5338
  }
5231
5339
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
5232
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5340
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5233
5341
  // @ts-ignore
5234
- _this29.webex.internal.newMetrics.submitClientEvent({
5342
+ _this30.webex.internal.newMetrics.submitClientEvent({
5235
5343
  name: 'client.unmuted',
5236
5344
  payload: {
5237
5345
  trigger: 'user-interaction',
5238
5346
  mediaType: 'video'
5239
5347
  },
5240
5348
  options: {
5241
- meetingId: _this29.id
5349
+ meetingId: _this30.id
5242
5350
  }
5243
5351
  });
5244
5352
  }).catch(function (error) {
5245
5353
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
5246
- correlation_id: _this29.correlationId,
5247
- locus_id: _this29.locusUrl.split('/').pop(),
5354
+ correlation_id: _this30.correlationId,
5355
+ locus_id: _this30.locusUrl.split('/').pop(),
5248
5356
  reason: error.message,
5249
5357
  stack: error.stack
5250
5358
  });
@@ -5259,7 +5367,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5259
5367
  * @param {Object} options - options to join with media
5260
5368
  * @param {JoinOptions} [options.joinOptions] - see #join()
5261
5369
  * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia()
5262
- * @returns {Promise} -- {join: see join(), media: see addMedia()}
5370
+ * @returns {Promise} -- {join: see join(), media: see addMedia(), multistreamEnabled: flag to indicate if we managed to join in multistream mode}
5263
5371
  * @public
5264
5372
  * @memberof Meeting
5265
5373
  * @example
@@ -5273,8 +5381,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5273
5381
  }, {
5274
5382
  key: "joinWithMedia",
5275
5383
  value: (function () {
5276
- var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
5277
- var _this30 = this;
5384
+ var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5385
+ var _this31 = this;
5278
5386
  var options,
5279
5387
  mediaOptions,
5280
5388
  _options$joinOptions,
@@ -5294,51 +5402,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5294
5402
  _leaveError,
5295
5403
  leaveError,
5296
5404
  shouldRetry,
5297
- _args15 = arguments;
5298
- return _regenerator.default.wrap(function _callee15$(_context15) {
5299
- while (1) switch (_context15.prev = _context15.next) {
5405
+ _args16 = arguments;
5406
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5407
+ while (1) switch (_context16.prev = _context16.next) {
5300
5408
  case 0:
5301
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
5409
+ options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
5302
5410
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
5303
5411
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
5304
5412
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
5305
- _context15.next = 5;
5413
+ _context16.next = 5;
5306
5414
  break;
5307
5415
  }
5308
- return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
5416
+ return _context16.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
5309
5417
  case 5:
5310
5418
  this.allowMediaInLobby = true;
5311
5419
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
5312
5420
  joined = false;
5313
5421
  joinResponse = prevJoinResponse;
5314
- _context15.prev = 9;
5422
+ _context16.prev = 9;
5315
5423
  forceTurnDiscovery = false;
5316
5424
  if (joinResponse) {
5317
- _context15.next = 33;
5425
+ _context16.next = 33;
5318
5426
  break;
5319
5427
  }
5320
- _context15.next = 14;
5428
+ _context16.next = 14;
5321
5429
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
5322
5430
  case 14:
5323
- turnDiscoveryRequest = _context15.sent;
5431
+ turnDiscoveryRequest = _context16.sent;
5324
5432
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
5325
5433
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
5326
5434
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
5327
- _context15.next = 20;
5435
+ _context16.next = 20;
5328
5436
  return this.join(joinOptions);
5329
5437
  case 20:
5330
- joinResponse = _context15.sent;
5438
+ joinResponse = _context16.sent;
5331
5439
  joined = true;
5332
5440
 
5333
5441
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
5334
5442
  if (!joinOptions.roapMessage) {
5335
- _context15.next = 31;
5443
+ _context16.next = 31;
5336
5444
  break;
5337
5445
  }
5338
- _context15.next = 25;
5446
+ _context16.next = 25;
5339
5447
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
5340
5448
  case 25:
5341
- _yield$this$roap$hand = _context15.sent;
5449
+ _yield$this$roap$hand = _context16.sent;
5342
5450
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
5343
5451
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
5344
5452
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -5347,7 +5455,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5347
5455
  this.roap.abortTurnDiscovery();
5348
5456
  }
5349
5457
  case 31:
5350
- _context15.next = 35;
5458
+ _context16.next = 35;
5351
5459
  break;
5352
5460
  case 33:
5353
5461
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -5355,82 +5463,85 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5355
5463
  forceTurnDiscovery = true;
5356
5464
  joined = true;
5357
5465
  case 35:
5358
- _context15.next = 37;
5466
+ _context16.next = 37;
5359
5467
  return this.addMediaInternal(function () {
5360
- return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5468
+ return _this31.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5361
5469
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5362
5470
  case 37:
5363
- mediaResponse = _context15.sent;
5471
+ mediaResponse = _context16.sent;
5364
5472
  this.joinWithMediaRetryInfo = {
5365
5473
  isRetry: false,
5366
5474
  prevJoinResponse: undefined
5367
5475
  };
5368
- return _context15.abrupt("return", {
5476
+ return _context16.abrupt("return", {
5369
5477
  join: joinResponse,
5370
- media: mediaResponse
5478
+ media: mediaResponse,
5479
+ multistreamEnabled: this.isMultistream
5371
5480
  });
5372
5481
  case 42:
5373
- _context15.prev = 42;
5374
- _context15.t0 = _context15["catch"](9);
5375
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
5482
+ _context16.prev = 42;
5483
+ _context16.t0 = _context16["catch"](9);
5484
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context16.t0);
5376
5485
  this.roap.abortTurnDiscovery();
5377
- if (!(joined && isRetry)) {
5378
- _context15.next = 56;
5486
+
5487
+ // if this was the first attempt, let's do a retry
5488
+ shouldRetry = !isRetry;
5489
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context16.t0)) {
5490
+ // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5491
+ // so there is no point doing a retry
5492
+ shouldRetry = false;
5493
+ }
5494
+
5495
+ // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
5496
+ if (!(joined && (isRetry || !shouldRetry))) {
5497
+ _context16.next = 58;
5379
5498
  break;
5380
5499
  }
5381
- _context15.prev = 47;
5382
- _context15.next = 50;
5500
+ _context16.prev = 49;
5501
+ _context16.next = 52;
5383
5502
  return this.leave({
5384
5503
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
5385
5504
  reason: 'joinWithMedia failure'
5386
5505
  });
5387
- case 50:
5388
- _context15.next = 56;
5389
- break;
5390
5506
  case 52:
5391
- _context15.prev = 52;
5392
- _context15.t1 = _context15["catch"](47);
5393
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
5394
- leaveError = _context15.t1;
5395
- case 56:
5507
+ _context16.next = 58;
5508
+ break;
5509
+ case 54:
5510
+ _context16.prev = 54;
5511
+ _context16.t1 = _context16["catch"](49);
5512
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context16.t1);
5513
+ leaveError = _context16.t1;
5514
+ case 58:
5396
5515
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
5397
5516
  correlation_id: this.correlationId,
5398
5517
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
5399
5518
  // if join fails, we may end up with no locusUrl
5400
- reason: _context15.t0.message,
5401
- stack: _context15.t0.stack,
5519
+ reason: _context16.t0.message,
5520
+ stack: _context16.t0.stack,
5402
5521
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
5403
5522
  isRetry: isRetry
5404
5523
  }, {
5405
- type: _context15.t0.name
5524
+ type: _context16.t0.name
5406
5525
  });
5407
-
5408
- // if this was the first attempt, let's do a retry
5409
- shouldRetry = !isRetry;
5410
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context15.t0)) {
5411
- // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5412
- // so there is no point doing a retry
5413
- shouldRetry = false;
5414
- }
5415
5526
  if (!shouldRetry) {
5416
- _context15.next = 64;
5527
+ _context16.next = 64;
5417
5528
  break;
5418
5529
  }
5419
5530
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
5420
5531
  this.joinWithMediaRetryInfo.isRetry = true;
5421
5532
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
5422
- return _context15.abrupt("return", this.joinWithMedia(options));
5533
+ return _context16.abrupt("return", this.joinWithMedia(options));
5423
5534
  case 64:
5424
5535
  this.joinWithMediaRetryInfo = {
5425
5536
  isRetry: false,
5426
5537
  prevJoinResponse: undefined
5427
5538
  };
5428
- throw _context15.t0;
5539
+ throw _context16.t0;
5429
5540
  case 66:
5430
5541
  case "end":
5431
- return _context15.stop();
5542
+ return _context16.stop();
5432
5543
  }
5433
- }, _callee15, this, [[9, 42], [47, 52]]);
5544
+ }, _callee16, this, [[9, 42], [49, 54]]);
5434
5545
  }));
5435
5546
  function joinWithMedia() {
5436
5547
  return _joinWithMedia.apply(this, arguments);
@@ -5449,7 +5560,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5449
5560
  }, {
5450
5561
  key: "reconnect",
5451
5562
  value: function reconnect(options) {
5452
- var _this31 = this;
5563
+ var _this32 = this;
5453
5564
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
5454
5565
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
5455
5566
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -5460,20 +5571,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5460
5571
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
5461
5572
  }
5462
5573
  this.cleanUpBeforeReconnection();
5463
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5464
- return _regenerator.default.wrap(function _callee16$(_context16) {
5465
- while (1) switch (_context16.prev = _context16.next) {
5574
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5575
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5576
+ while (1) switch (_context17.prev = _context17.next) {
5466
5577
  case 0:
5467
- _context16.next = 2;
5468
- return _this31.waitForRemoteSDPAnswer();
5578
+ _context17.next = 2;
5579
+ return _this32.waitForRemoteSDPAnswer();
5469
5580
  case 2:
5470
- _context16.next = 4;
5471
- return _this31.waitForMediaConnectionConnected();
5581
+ _context17.next = 4;
5582
+ return _this32.waitForMediaConnectionConnected();
5472
5583
  case 4:
5473
5584
  case "end":
5474
- return _context16.stop();
5585
+ return _context17.stop();
5475
5586
  }
5476
- }, _callee16);
5587
+ }, _callee17);
5477
5588
  }))).then(function () {
5478
5589
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
5479
5590
  }).catch(function (error) {
@@ -5482,7 +5593,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5482
5593
  return _promise.default.resolve();
5483
5594
  }
5484
5595
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5485
- _this31.uploadLogs({
5596
+ _this32.uploadLogs({
5486
5597
  file: 'meeting/index',
5487
5598
  function: 'reconnect'
5488
5599
  });
@@ -5529,19 +5640,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5529
5640
  }, {
5530
5641
  key: "setCaptionLanguage",
5531
5642
  value: function setCaptionLanguage(language) {
5532
- var _this32 = this;
5643
+ var _this33 = this;
5533
5644
  return new _promise.default(function (resolve, reject) {
5534
- if (!_this32.isTranscriptionSupported()) {
5645
+ if (!_this33.isTranscriptionSupported()) {
5535
5646
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5536
5647
  reject(new Error('Webex Assistant is not enabled/supported'));
5537
5648
  }
5538
5649
  try {
5539
5650
  var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5540
5651
  // @ts-ignore
5541
- _this32.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5652
+ _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5542
5653
  var statusCode = payload.statusCode;
5543
5654
  if (statusCode === 200) {
5544
- _this32.transcription.languageOptions = _objectSpread(_objectSpread({}, _this32.transcription.languageOptions), {}, {
5655
+ _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5545
5656
  currentCaptionLanguage: language
5546
5657
  });
5547
5658
  resolve(language);
@@ -5550,9 +5661,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5550
5661
  }
5551
5662
  };
5552
5663
  // @ts-ignore
5553
- _this32.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5664
+ _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5554
5665
  // @ts-ignore
5555
- _this32.webex.internal.voicea.requestLanguage(language);
5666
+ _this33.webex.internal.voicea.requestLanguage(language);
5556
5667
  } catch (error) {
5557
5668
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5558
5669
  reject(error);
@@ -5568,23 +5679,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5568
5679
  }, {
5569
5680
  key: "setSpokenLanguage",
5570
5681
  value: function setSpokenLanguage(language) {
5571
- var _this33 = this;
5682
+ var _this34 = this;
5572
5683
  return new _promise.default(function (resolve, reject) {
5573
- if (!_this33.isTranscriptionSupported()) {
5684
+ if (!_this34.isTranscriptionSupported()) {
5574
5685
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5575
5686
  reject(new Error('Webex Assistant is not enabled/supported'));
5576
5687
  }
5577
- if (_this33.getCurUserType() !== 'host') {
5688
+ if (_this34.getCurUserType() !== 'host') {
5578
5689
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
5579
5690
  reject(new Error('Only host can set spoken language'));
5580
5691
  }
5581
5692
  try {
5582
5693
  var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5583
5694
  // @ts-ignore
5584
- _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5695
+ _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5585
5696
  var languageCode = payload.languageCode;
5586
5697
  if (languageCode) {
5587
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5698
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5588
5699
  currentSpokenLanguage: languageCode
5589
5700
  });
5590
5701
  resolve(languageCode);
@@ -5594,10 +5705,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5594
5705
  };
5595
5706
 
5596
5707
  // @ts-ignore
5597
- _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5708
+ _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5598
5709
 
5599
5710
  // @ts-ignore
5600
- _this33.webex.internal.voicea.setSpokenLanguage(language);
5711
+ _this34.webex.internal.voicea.setSpokenLanguage(language);
5601
5712
  } catch (error) {
5602
5713
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5603
5714
  reject(error);
@@ -5614,48 +5725,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5614
5725
  }, {
5615
5726
  key: "startTranscription",
5616
5727
  value: (function () {
5617
- var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
5618
- return _regenerator.default.wrap(function _callee17$(_context17) {
5619
- while (1) switch (_context17.prev = _context17.next) {
5728
+ var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(options) {
5729
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5730
+ while (1) switch (_context18.prev = _context18.next) {
5620
5731
  case 0:
5621
5732
  if (!this.isJoined()) {
5622
- _context17.next = 14;
5733
+ _context18.next = 14;
5623
5734
  break;
5624
5735
  }
5625
5736
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
5626
- _context17.prev = 2;
5737
+ _context18.prev = 2;
5627
5738
  if (!this.areVoiceaEventsSetup) {
5628
5739
  this.setUpVoiceaListeners();
5629
5740
  }
5630
5741
 
5631
5742
  // @ts-ignore
5632
- _context17.next = 6;
5743
+ _context18.next = 6;
5633
5744
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
5634
5745
  case 6:
5635
- _context17.next = 12;
5746
+ _context18.next = 12;
5636
5747
  break;
5637
5748
  case 8:
5638
- _context17.prev = 8;
5639
- _context17.t0 = _context17["catch"](2);
5640
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context17.t0));
5749
+ _context18.prev = 8;
5750
+ _context18.t0 = _context18["catch"](2);
5751
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context18.t0));
5641
5752
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
5642
5753
  correlation_id: this.correlationId,
5643
- reason: _context17.t0.message,
5644
- stack: _context17.t0.stack
5754
+ reason: _context18.t0.message,
5755
+ stack: _context18.t0.stack
5645
5756
  });
5646
5757
  case 12:
5647
- _context17.next = 16;
5758
+ _context18.next = 16;
5648
5759
  break;
5649
5760
  case 14:
5650
5761
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
5651
5762
  throw new Error('Meeting is not joined');
5652
5763
  case 16:
5653
5764
  case "end":
5654
- return _context17.stop();
5765
+ return _context18.stop();
5655
5766
  }
5656
- }, _callee17, this, [[2, 8]]);
5767
+ }, _callee18, this, [[2, 8]]);
5657
5768
  }));
5658
- function startTranscription(_x15) {
5769
+ function startTranscription(_x16) {
5659
5770
  return _startTranscription.apply(this, arguments);
5660
5771
  }
5661
5772
  return startTranscription;
@@ -5680,6 +5791,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5680
5791
 
5681
5792
  // @ts-ignore
5682
5793
  this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
5794
+
5795
+ // @ts-ignore
5796
+ this.webex.internal.voicea.deregisterEvents();
5683
5797
  this.areVoiceaEventsSetup = false;
5684
5798
  this.triggerStopReceivingTranscriptionEvent();
5685
5799
  }
@@ -5716,36 +5830,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5716
5830
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
5717
5831
  */
5718
5832
  function () {
5719
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5720
- var _this34 = this;
5833
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5834
+ var _this35 = this;
5721
5835
  var options,
5722
5836
  errorMessage,
5723
5837
  error,
5724
5838
  joinFailed,
5725
5839
  joinSuccess,
5726
- _errorMessage,
5727
- _error,
5728
5840
  _errorMessage2,
5729
5841
  _error2,
5730
- _args18 = arguments;
5731
- return _regenerator.default.wrap(function _callee18$(_context18) {
5732
- while (1) switch (_context18.prev = _context18.next) {
5842
+ _errorMessage3,
5843
+ _error3,
5844
+ _args19 = arguments;
5845
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5846
+ while (1) switch (_context19.prev = _context19.next) {
5733
5847
  case 0:
5734
- options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
5848
+ options = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
5735
5849
  if (this.webex.meetings.registered) {
5736
- _context18.next = 6;
5850
+ _context19.next = 6;
5737
5851
  break;
5738
5852
  }
5739
5853
  errorMessage = 'Meeting:index#join --> Device not registered';
5740
5854
  error = new Error(errorMessage);
5741
5855
  _loggerProxy.default.logger.error(errorMessage);
5742
- return _context18.abrupt("return", _promise.default.reject(error));
5856
+ return _context19.abrupt("return", _promise.default.reject(error));
5743
5857
  case 6:
5744
5858
  if (!this.deferJoin) {
5745
- _context18.next = 8;
5859
+ _context19.next = 8;
5746
5860
  break;
5747
5861
  }
5748
- return _context18.abrupt("return", this.deferJoin);
5862
+ return _context19.abrupt("return", this.deferJoin);
5749
5863
  case 8:
5750
5864
  // Create a deferred promise for a consistent resolve value from utils.
5751
5865
  // This also prevents redundant API calls.
@@ -5769,18 +5883,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5769
5883
  this.meetingFiniteStateMachine.reset();
5770
5884
  }
5771
5885
 
5772
- // @ts-ignore
5773
- this.webex.internal.newMetrics.submitClientEvent({
5774
- name: 'client.call.initiated',
5775
- payload: {
5776
- trigger: this.callStateForMetrics.joinTrigger || 'user-interaction',
5777
- isRoapCallEnabled: true,
5778
- pstnAudioType: options === null || options === void 0 ? void 0 : options.pstnAudioType
5779
- },
5780
- options: {
5781
- meetingId: this.id
5782
- }
5783
- });
5886
+ // send client.call.initiated unless told not to
5887
+ if (options.sendCallInitiated !== false) {
5888
+ // @ts-ignore
5889
+ this.webex.internal.newMetrics.submitClientEvent({
5890
+ name: 'client.call.initiated',
5891
+ payload: {
5892
+ trigger: this.callStateForMetrics.joinTrigger || 'user-interaction',
5893
+ isRoapCallEnabled: true,
5894
+ pstnAudioType: options === null || options === void 0 ? void 0 : options.pstnAudioType
5895
+ },
5896
+ options: {
5897
+ meetingId: this.id
5898
+ }
5899
+ });
5900
+ }
5784
5901
  _loggerProxy.default.logger.log('Meeting:index#join --> Joining a meeting');
5785
5902
  if (this.meetingFiniteStateMachine.state === _constants.MEETING_STATE_MACHINE.STATES.ENDED) {
5786
5903
  this.meetingFiniteStateMachine.reset();
@@ -5794,131 +5911,131 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5794
5911
  this.wirelessShare = true;
5795
5912
  }
5796
5913
  if (!options.meetingQuality) {
5797
- _context18.next = 36;
5914
+ _context19.next = 36;
5798
5915
  break;
5799
5916
  }
5800
5917
  if (!(typeof options.meetingQuality === 'string')) {
5801
- _context18.next = 27;
5918
+ _context19.next = 27;
5802
5919
  break;
5803
5920
  }
5804
5921
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
5805
- _context18.next = 26;
5922
+ _context19.next = 26;
5806
5923
  break;
5807
5924
  }
5808
- _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
5809
- _error = new Error(_errorMessage);
5810
- _loggerProxy.default.logger.error(_errorMessage);
5811
- joinFailed(_error);
5925
+ _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
5926
+ _error2 = new Error(_errorMessage2);
5927
+ _loggerProxy.default.logger.error(_errorMessage2);
5928
+ joinFailed(_error2);
5812
5929
  this.deferJoin = undefined;
5813
- return _context18.abrupt("return", _promise.default.reject(_error));
5930
+ return _context19.abrupt("return", _promise.default.reject(_error2));
5814
5931
  case 26:
5815
5932
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
5816
5933
  case 27:
5817
5934
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
5818
- _context18.next = 36;
5935
+ _context19.next = 36;
5819
5936
  break;
5820
5937
  }
5821
5938
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
5822
- _context18.next = 35;
5939
+ _context19.next = 35;
5823
5940
  break;
5824
5941
  }
5825
- _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
5826
- _loggerProxy.default.logger.error(_errorMessage2);
5827
- _error2 = new Error(_errorMessage2);
5828
- joinFailed(_error2);
5942
+ _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
5943
+ _loggerProxy.default.logger.error(_errorMessage3);
5944
+ _error3 = new Error(_errorMessage3);
5945
+ joinFailed(_error3);
5829
5946
  this.deferJoin = undefined;
5830
- return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5947
+ return _context19.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
5831
5948
  case 35:
5832
5949
  if (options.meetingQuality.remote) {
5833
5950
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
5834
5951
  }
5835
5952
  case 36:
5836
5953
  this.isMultistream = !!options.enableMultistream;
5837
- _context18.prev = 37;
5838
- _context18.next = 40;
5954
+ _context19.prev = 37;
5955
+ _context19.next = 40;
5839
5956
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
5840
5957
  case 40:
5841
- _context18.next = 51;
5958
+ _context19.next = 51;
5842
5959
  break;
5843
5960
  case 42:
5844
- _context18.prev = 42;
5845
- _context18.t0 = _context18["catch"](37);
5846
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context18.t0);
5847
- if (!(_context18.t0 instanceof _captchaError.default || _context18.t0 instanceof _passwordError.default || _context18.t0 instanceof _permission.default)) {
5848
- _context18.next = 51;
5961
+ _context19.prev = 42;
5962
+ _context19.t0 = _context19["catch"](37);
5963
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context19.t0);
5964
+ if (!(_context19.t0 instanceof _captchaError.default || _context19.t0 instanceof _passwordError.default || _context19.t0 instanceof _permission.default)) {
5965
+ _context19.next = 51;
5849
5966
  break;
5850
5967
  }
5851
- this.meetingFiniteStateMachine.fail(_context18.t0);
5968
+ this.meetingFiniteStateMachine.fail(_context19.t0);
5852
5969
 
5853
5970
  // Upload logs on refreshpermissionToken refresh Failure
5854
5971
  _triggerProxy.default.trigger(this, {
5855
5972
  file: 'meeting/index',
5856
5973
  function: 'join'
5857
5974
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
5858
- joinFailed(_context18.t0);
5975
+ joinFailed(_context19.t0);
5859
5976
  this.deferJoin = undefined;
5860
5977
 
5861
5978
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
5862
5979
  // and bubble it up to client
5863
- return _context18.abrupt("return", _promise.default.reject(_context18.t0));
5980
+ return _context19.abrupt("return", _promise.default.reject(_context19.t0));
5864
5981
  case 51:
5865
- return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5866
- _this34.meetingFiniteStateMachine.join();
5867
- _this34.setupLocusMediaRequest();
5982
+ return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5983
+ _this35.meetingFiniteStateMachine.join();
5984
+ _this35.setupLocusMediaRequest();
5868
5985
 
5869
5986
  // @ts-ignore
5870
- _this34.webex.internal.device.meetingStarted();
5871
- (0, _classPrivateFieldSet2.default)(_this34, _isoLocalClientMeetingJoinTime, new Date().toISOString());
5987
+ _this35.webex.internal.device.meetingStarted();
5988
+ (0, _classPrivateFieldSet2.default)(_this35, _isoLocalClientMeetingJoinTime, new Date().toISOString());
5872
5989
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5873
5990
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
5874
- correlation_id: _this34.correlationId
5991
+ correlation_id: _this35.correlationId
5875
5992
  });
5876
5993
  joinSuccess(join);
5877
- _this34.deferJoin = undefined;
5994
+ _this35.deferJoin = undefined;
5878
5995
  return join;
5879
5996
  }).catch(function (error) {
5880
- var _this34$meetingInfo, _error$error;
5881
- _this34.meetingFiniteStateMachine.fail(error);
5997
+ var _this35$meetingInfo, _error$error;
5998
+ _this35.meetingFiniteStateMachine.fail(error);
5882
5999
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
5883
6000
 
5884
6001
  // @ts-ignore
5885
- _this34.webex.internal.newMetrics.submitClientEvent({
6002
+ _this35.webex.internal.newMetrics.submitClientEvent({
5886
6003
  name: 'client.locus.join.response',
5887
6004
  payload: {
5888
6005
  identifiers: {
5889
- meetingLookupUrl: (_this34$meetingInfo = _this34.meetingInfo) === null || _this34$meetingInfo === void 0 ? void 0 : _this34$meetingInfo.meetingLookupUrl
6006
+ meetingLookupUrl: (_this35$meetingInfo = _this35.meetingInfo) === null || _this35$meetingInfo === void 0 ? void 0 : _this35$meetingInfo.meetingLookupUrl
5890
6007
  }
5891
6008
  },
5892
6009
  options: {
5893
- meetingId: _this34.id,
6010
+ meetingId: _this35.id,
5894
6011
  rawError: error
5895
6012
  }
5896
6013
  });
5897
6014
 
5898
6015
  // TODO: change this to error codes and pre defined dictionary
5899
6016
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
5900
- correlation_id: _this34.correlationId,
6017
+ correlation_id: _this35.correlationId,
5901
6018
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
5902
6019
  stack: error.stack
5903
6020
  });
5904
6021
 
5905
6022
  // Upload logs on join Failure
5906
- _triggerProxy.default.trigger(_this34, {
6023
+ _triggerProxy.default.trigger(_this35, {
5907
6024
  file: 'meeting/index',
5908
6025
  function: 'join'
5909
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
6026
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
5910
6027
  joinFailed(error);
5911
- _this34.deferJoin = undefined;
6028
+ _this35.deferJoin = undefined;
5912
6029
  return _promise.default.reject(error);
5913
6030
  }).then(function (join) {
5914
6031
  // @ts-ignore - config coming from registerPlugin
5915
- if (_this34.config.enableAutomaticLLM) {
6032
+ if (_this35.config.enableAutomaticLLM) {
5916
6033
  // @ts-ignore
5917
- _this34.webex.internal.llm.on('online', _this34.handleLLMOnline);
5918
- _this34.updateLLMConnection().catch(function (error) {
6034
+ _this35.webex.internal.llm.on('online', _this35.handleLLMOnline);
6035
+ _this35.updateLLMConnection().catch(function (error) {
5919
6036
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
5920
6037
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
5921
- correlation_id: _this34.correlationId,
6038
+ correlation_id: _this35.correlationId,
5922
6039
  reason: error === null || error === void 0 ? void 0 : error.message,
5923
6040
  stack: error.stack
5924
6041
  });
@@ -5930,9 +6047,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5930
6047
  }));
5931
6048
  case 52:
5932
6049
  case "end":
5933
- return _context18.stop();
6050
+ return _context19.stop();
5934
6051
  }
5935
- }, _callee18, this, [[37, 42]]);
6052
+ }, _callee19, this, [[37, 42]]);
5936
6053
  }));
5937
6054
  function join() {
5938
6055
  return _join.apply(this, arguments);
@@ -5949,54 +6066,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5949
6066
  }, {
5950
6067
  key: "updateLLMConnection",
5951
6068
  value: (function () {
5952
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5953
- var _this35 = this;
5954
- var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
5955
- return _regenerator.default.wrap(function _callee19$(_context19) {
5956
- while (1) switch (_context19.prev = _context19.next) {
6069
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6070
+ var _this36 = this;
6071
+ var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
6072
+ return _regenerator.default.wrap(function _callee20$(_context20) {
6073
+ while (1) switch (_context20.prev = _context20.next) {
5957
6074
  case 0:
5958
6075
  // @ts-ignore - Fix type
5959
- _this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl;
5960
- isJoined = this.isJoined(); // @ts-ignore - Fix type
6076
+ _this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl, practiceSessionDatachannelUrl = _this$locusInfo6$info2.practiceSessionDatachannelUrl;
6077
+ isJoined = this.isJoined(); // webinar panelist should use new data channel in practice session
6078
+ dataChannelUrl = this.webinar.isJoinPracticeSessionDataChannel() && practiceSessionDatachannelUrl ? practiceSessionDatachannelUrl : datachannelUrl; // @ts-ignore - Fix type
5961
6079
  if (!this.webex.internal.llm.isConnected()) {
5962
- _context19.next = 8;
6080
+ _context20.next = 9;
5963
6081
  break;
5964
6082
  }
5965
6083
  if (!(
5966
6084
  // @ts-ignore - Fix type
5967
6085
  url === this.webex.internal.llm.getLocusUrl() &&
5968
6086
  // @ts-ignore - Fix type
5969
- datachannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
5970
- _context19.next = 5;
6087
+ dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
6088
+ _context20.next = 6;
5971
6089
  break;
5972
6090
  }
5973
- return _context19.abrupt("return", undefined);
5974
- case 5:
5975
- _context19.next = 7;
6091
+ return _context20.abrupt("return", undefined);
6092
+ case 6:
6093
+ _context20.next = 8;
5976
6094
  return this.webex.internal.llm.disconnectLLM();
5977
- case 7:
6095
+ case 8:
5978
6096
  // @ts-ignore - Fix type
5979
6097
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
5980
- case 8:
6098
+ case 9:
5981
6099
  if (isJoined) {
5982
- _context19.next = 10;
6100
+ _context20.next = 11;
5983
6101
  break;
5984
6102
  }
5985
- return _context19.abrupt("return", undefined);
5986
- case 10:
5987
- return _context19.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
6103
+ return _context20.abrupt("return", undefined);
6104
+ case 11:
6105
+ return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
5988
6106
  // @ts-ignore - Fix type
5989
- _this35.webex.internal.llm.off('event:relay.event', _this35.processRelayEvent);
6107
+ _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
5990
6108
  // @ts-ignore - Fix type
5991
- _this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
6109
+ _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
5992
6110
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
5993
6111
  return _promise.default.resolve(registerAndConnectResult);
5994
6112
  }));
5995
- case 11:
6113
+ case 12:
5996
6114
  case "end":
5997
- return _context19.stop();
6115
+ return _context20.stop();
5998
6116
  }
5999
- }, _callee19, this);
6117
+ }, _callee20, this);
6000
6118
  }));
6001
6119
  function updateLLMConnection() {
6002
6120
  return _updateLLMConnection.apply(this, arguments);
@@ -6042,7 +6160,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6042
6160
  }, {
6043
6161
  key: "dialInPstn",
6044
6162
  value: function dialInPstn() {
6045
- var _this36 = this;
6163
+ var _this37 = this;
6046
6164
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6047
6165
 
6048
6166
  var correlationId = this.correlationId,
@@ -6058,10 +6176,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6058
6176
  }).catch(function (error) {
6059
6177
  var _error$error2;
6060
6178
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6061
- correlation_id: _this36.correlationId,
6062
- dial_in_url: _this36.dialInUrl,
6179
+ correlation_id: _this37.correlationId,
6180
+ dial_in_url: _this37.dialInUrl,
6063
6181
  locus_id: locusUrl.split('/').pop(),
6064
- client_url: _this36.deviceUrl,
6182
+ client_url: _this37.deviceUrl,
6065
6183
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6066
6184
  stack: error.stack
6067
6185
  });
@@ -6079,7 +6197,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6079
6197
  }, {
6080
6198
  key: "dialOutPstn",
6081
6199
  value: function dialOutPstn(phoneNumber) {
6082
- var _this37 = this;
6200
+ var _this38 = this;
6083
6201
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6084
6202
 
6085
6203
  var correlationId = this.correlationId,
@@ -6096,10 +6214,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6096
6214
  }).catch(function (error) {
6097
6215
  var _error$error3;
6098
6216
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6099
- correlation_id: _this37.correlationId,
6100
- dial_out_url: _this37.dialOutUrl,
6217
+ correlation_id: _this38.correlationId,
6218
+ dial_out_url: _this38.dialOutUrl,
6101
6219
  locus_id: locusUrl.split('/').pop(),
6102
- client_url: _this37.deviceUrl,
6220
+ client_url: _this38.deviceUrl,
6103
6221
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6104
6222
  stack: error.stack
6105
6223
  });
@@ -6130,7 +6248,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6130
6248
  }, {
6131
6249
  key: "moveTo",
6132
6250
  value: function moveTo(resourceId) {
6133
- var _this38 = this;
6251
+ var _this39 = this;
6134
6252
  if (!resourceId) {
6135
6253
  throw new _parameter.default('Cannot move call without a resourceId.');
6136
6254
  }
@@ -6168,18 +6286,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6168
6286
  meetingId: this.id
6169
6287
  }
6170
6288
  });
6171
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6289
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
6172
6290
  var mediaSettings;
6173
- return _regenerator.default.wrap(function _callee20$(_context20) {
6174
- while (1) switch (_context20.prev = _context20.next) {
6291
+ return _regenerator.default.wrap(function _callee21$(_context21) {
6292
+ while (1) switch (_context21.prev = _context21.next) {
6175
6293
  case 0:
6176
- _context20.prev = 0;
6177
- if (!(_this38.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6178
- _context20.next = 4;
6294
+ _context21.prev = 0;
6295
+ if (!(_this39.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6296
+ _context21.next = 4;
6179
6297
  break;
6180
6298
  }
6181
- _context20.next = 4;
6182
- return _this38.releaseScreenShareFloor();
6299
+ _context21.next = 4;
6300
+ return _this39.releaseScreenShareFloor();
6183
6301
  case 4:
6184
6302
  mediaSettings = {
6185
6303
  mediaDirection: {
@@ -6191,55 +6309,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6191
6309
  receiveShare: true
6192
6310
  }
6193
6311
  };
6194
- _this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6195
- _this38.mediaProperties.unsetRemoteMedia();
6312
+ _this39.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6313
+ _this39.mediaProperties.unsetRemoteMedia();
6196
6314
 
6197
6315
  // 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
6198
6316
  // once the device answers we close the old connection and create new media server connection with only share enabled
6199
- if (!_this38.statsAnalyzer) {
6200
- _context20.next = 10;
6317
+ if (!_this39.statsAnalyzer) {
6318
+ _context21.next = 10;
6201
6319
  break;
6202
6320
  }
6203
- _context20.next = 10;
6204
- return _this38.statsAnalyzer.stopAnalyzer();
6321
+ _context21.next = 10;
6322
+ return _this39.statsAnalyzer.stopAnalyzer();
6205
6323
  case 10:
6206
- _context20.next = 12;
6207
- return _this38.closeRemoteStreams();
6324
+ _context21.next = 12;
6325
+ return _this39.closeRemoteStreams();
6208
6326
  case 12:
6209
- _context20.next = 14;
6210
- return _this38.closePeerConnections();
6327
+ _context21.next = 14;
6328
+ return _this39.closePeerConnections();
6211
6329
  case 14:
6212
- _this38.cleanupLocalStreams();
6213
- _this38.unsetRemoteStreams();
6214
- _this38.unsetPeerConnections();
6215
- _this38.reconnectionManager.cleanUp();
6216
- _context20.next = 20;
6217
- return _this38.addMedia({
6330
+ _this39.cleanupLocalStreams();
6331
+ _this39.unsetRemoteStreams();
6332
+ _this39.unsetPeerConnections();
6333
+ _this39.reconnectionManager.cleanUp();
6334
+ _context21.next = 20;
6335
+ return _this39.addMedia({
6218
6336
  audioEnabled: false,
6219
6337
  videoEnabled: false,
6220
6338
  shareVideoEnabled: true
6221
6339
  });
6222
6340
  case 20:
6223
6341
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6224
- _this38.isMoveToInProgress = false;
6225
- _context20.next = 29;
6342
+ _this39.isMoveToInProgress = false;
6343
+ _context21.next = 29;
6226
6344
  break;
6227
6345
  case 24:
6228
- _context20.prev = 24;
6229
- _context20.t0 = _context20["catch"](0);
6230
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context20.t0);
6346
+ _context21.prev = 24;
6347
+ _context21.t0 = _context21["catch"](0);
6348
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6231
6349
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6232
- correlation_id: _this38.correlationId,
6233
- locus_id: _this38.locusUrl.split('/').pop(),
6234
- reason: _context20.t0.message,
6235
- stack: _context20.t0.stack
6350
+ correlation_id: _this39.correlationId,
6351
+ locus_id: _this39.locusUrl.split('/').pop(),
6352
+ reason: _context21.t0.message,
6353
+ stack: _context21.t0.stack
6236
6354
  });
6237
- _this38.isMoveToInProgress = false;
6355
+ _this39.isMoveToInProgress = false;
6238
6356
  case 29:
6239
6357
  case "end":
6240
- return _context20.stop();
6358
+ return _context21.stop();
6241
6359
  }
6242
- }, _callee20, null, [[0, 24]]);
6360
+ }, _callee21, null, [[0, 24]]);
6243
6361
  })));
6244
6362
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
6245
6363
 
@@ -6250,17 +6368,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6250
6368
  resourceId: resourceId,
6251
6369
  moveToResource: true
6252
6370
  }).then(function () {
6253
- _this38.meetingFiniteStateMachine.join();
6371
+ _this39.meetingFiniteStateMachine.join();
6254
6372
  }).catch(function (error) {
6255
- _this38.meetingFiniteStateMachine.fail(error);
6373
+ _this39.meetingFiniteStateMachine.fail(error);
6256
6374
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6257
- correlation_id: _this38.correlationId,
6258
- locus_id: _this38.locusUrl.split('/').pop(),
6375
+ correlation_id: _this39.correlationId,
6376
+ locus_id: _this39.locusUrl.split('/').pop(),
6259
6377
  reason: error.message,
6260
6378
  stack: error.stack
6261
6379
  });
6262
6380
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6263
- _this38.isMoveToInProgress = false;
6381
+ _this39.isMoveToInProgress = false;
6264
6382
  return _promise.default.reject(error);
6265
6383
  });
6266
6384
  }
@@ -6275,7 +6393,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6275
6393
  }, {
6276
6394
  key: "moveFrom",
6277
6395
  value: function moveFrom(resourceId) {
6278
- var _this39 = this;
6396
+ var _this40 = this;
6279
6397
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6280
6398
  if (!resourceId) {
6281
6399
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6290,19 +6408,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6290
6408
  }
6291
6409
  });
6292
6410
  return _util2.default.joinMeetingOptions(this).then(function () {
6293
- return _util2.default.leaveMeeting(_this39, {
6411
+ return _util2.default.leaveMeeting(_this40, {
6294
6412
  resourceId: resourceId,
6295
6413
  correlationId: oldCorrelationId,
6296
6414
  moveMeeting: true
6297
6415
  }).then(function () {
6298
- _this39.resourceId = '';
6416
+ _this40.resourceId = '';
6299
6417
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6300
6418
  });
6301
6419
  }).catch(function (error) {
6302
- _this39.meetingFiniteStateMachine.fail(error);
6420
+ _this40.meetingFiniteStateMachine.fail(error);
6303
6421
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6304
- correlation_id: _this39.correlationId,
6305
- locus_id: _this39.locusUrl.split('/').pop(),
6422
+ correlation_id: _this40.correlationId,
6423
+ locus_id: _this40.locusUrl.split('/').pop(),
6306
6424
  reason: error.message,
6307
6425
  stack: error.stack
6308
6426
  });
@@ -6327,10 +6445,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6327
6445
  }, {
6328
6446
  key: "createMediaConnection",
6329
6447
  value: (function () {
6330
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(turnServerInfo, bundlePolicy) {
6448
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(turnServerInfo, bundlePolicy) {
6331
6449
  var mc, audioEnabled, videoEnabled, shareEnabled;
6332
- return _regenerator.default.wrap(function _callee21$(_context21) {
6333
- while (1) switch (_context21.prev = _context21.next) {
6450
+ return _regenerator.default.wrap(function _callee22$(_context22) {
6451
+ while (1) switch (_context22.prev = _context22.next) {
6334
6452
  case 0:
6335
6453
  this.rtcMetrics = this.isMultistream ?
6336
6454
  // @ts-ignore
@@ -6362,42 +6480,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6362
6480
 
6363
6481
  // publish the streams
6364
6482
  if (!this.mediaProperties.audioStream) {
6365
- _context21.next = 9;
6483
+ _context22.next = 9;
6366
6484
  break;
6367
6485
  }
6368
6486
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
6369
- _context21.next = 9;
6487
+ _context22.next = 9;
6370
6488
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
6371
6489
  case 9:
6372
6490
  if (!this.mediaProperties.videoStream) {
6373
- _context21.next = 12;
6491
+ _context22.next = 12;
6374
6492
  break;
6375
6493
  }
6376
- _context21.next = 12;
6494
+ _context22.next = 12;
6377
6495
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
6378
6496
  case 12:
6379
6497
  if (!this.mediaProperties.shareVideoStream) {
6380
- _context21.next = 15;
6498
+ _context22.next = 15;
6381
6499
  break;
6382
6500
  }
6383
- _context21.next = 15;
6501
+ _context22.next = 15;
6384
6502
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
6385
6503
  case 15:
6386
6504
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
6387
- _context21.next = 18;
6505
+ _context22.next = 18;
6388
6506
  break;
6389
6507
  }
6390
- _context21.next = 18;
6508
+ _context22.next = 18;
6391
6509
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
6392
6510
  case 18:
6393
- return _context21.abrupt("return", mc);
6511
+ return _context22.abrupt("return", mc);
6394
6512
  case 19:
6395
6513
  case "end":
6396
- return _context21.stop();
6514
+ return _context22.stop();
6397
6515
  }
6398
- }, _callee21, this);
6516
+ }, _callee22, this);
6399
6517
  }));
6400
- function createMediaConnection(_x16, _x17) {
6518
+ function createMediaConnection(_x17, _x18) {
6401
6519
  return _createMediaConnection.apply(this, arguments);
6402
6520
  }
6403
6521
  return createMediaConnection;
@@ -6415,9 +6533,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6415
6533
  }, {
6416
6534
  key: "forwardEvent",
6417
6535
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6418
- var _this40 = this;
6536
+ var _this41 = this;
6419
6537
  eventEmitter.on(eventTypeToForward, function (data) {
6420
- return _triggerProxy.default.trigger(_this40, {
6538
+ return _triggerProxy.default.trigger(_this41, {
6421
6539
  file: 'meetings',
6422
6540
  function: 'addMedia'
6423
6541
  }, meetingEventType, data);
@@ -6435,11 +6553,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6435
6553
  }, {
6436
6554
  key: "setUpLocalStreamReferences",
6437
6555
  value: (function () {
6438
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(localStreams) {
6556
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(localStreams) {
6439
6557
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
6440
6558
  var setUpStreamPromises;
6441
- return _regenerator.default.wrap(function _callee22$(_context22) {
6442
- while (1) switch (_context22.prev = _context22.next) {
6559
+ return _regenerator.default.wrap(function _callee23$(_context23) {
6560
+ while (1) switch (_context23.prev = _context23.next) {
6443
6561
  case 0:
6444
6562
  setUpStreamPromises = [];
6445
6563
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -6454,24 +6572,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6454
6572
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
6455
6573
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
6456
6574
  }
6457
- _context22.prev = 5;
6458
- _context22.next = 8;
6575
+ _context23.prev = 5;
6576
+ _context23.next = 8;
6459
6577
  return _promise.default.all(setUpStreamPromises);
6460
6578
  case 8:
6461
- _context22.next = 14;
6579
+ _context23.next = 14;
6462
6580
  break;
6463
6581
  case 10:
6464
- _context22.prev = 10;
6465
- _context22.t0 = _context22["catch"](5);
6466
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context22.t0);
6467
- throw _context22.t0;
6582
+ _context23.prev = 10;
6583
+ _context23.t0 = _context23["catch"](5);
6584
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context23.t0);
6585
+ throw _context23.t0;
6468
6586
  case 14:
6469
6587
  case "end":
6470
- return _context22.stop();
6588
+ return _context23.stop();
6471
6589
  }
6472
- }, _callee22, this, [[5, 10]]);
6590
+ }, _callee23, this, [[5, 10]]);
6473
6591
  }));
6474
- function setUpLocalStreamReferences(_x18) {
6592
+ function setUpLocalStreamReferences(_x19) {
6475
6593
  return _setUpLocalStreamReferences.apply(this, arguments);
6476
6594
  }
6477
6595
  return setUpLocalStreamReferences;
@@ -6486,72 +6604,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6486
6604
  }, {
6487
6605
  key: "waitForMediaConnectionConnected",
6488
6606
  value: (function () {
6489
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
6607
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6490
6608
  var iceConnected, _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12;
6491
- return _regenerator.default.wrap(function _callee23$(_context23) {
6492
- while (1) switch (_context23.prev = _context23.next) {
6609
+ return _regenerator.default.wrap(function _callee24$(_context24) {
6610
+ while (1) switch (_context24.prev = _context24.next) {
6493
6611
  case 0:
6494
- _context23.prev = 0;
6495
- _context23.next = 3;
6612
+ _context24.prev = 0;
6613
+ _context24.next = 3;
6496
6614
  return this.mediaProperties.waitForMediaConnectionConnected();
6497
6615
  case 3:
6498
- _context23.next = 30;
6616
+ _context24.next = 30;
6499
6617
  break;
6500
6618
  case 5:
6501
- _context23.prev = 5;
6502
- _context23.t0 = _context23["catch"](0);
6503
- iceConnected = _context23.t0.iceConnected;
6619
+ _context24.prev = 5;
6620
+ _context24.t0 = _context24["catch"](0);
6621
+ iceConnected = _context24.t0.iceConnected;
6504
6622
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
6505
- _context23.next = 29;
6623
+ _context24.next = 29;
6506
6624
  break;
6507
6625
  }
6508
- _context23.t1 = this.webex.internal.newMetrics;
6509
- _context23.t2 = !this.turnServerUsed;
6510
- _context23.t3 = this.addMediaData.icePhaseCallback();
6511
- _context23.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6512
- _context23.t5 = _internalPluginMetrics.CallDiagnosticUtils;
6513
- _context23.t6 = ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
6514
- _context23.t7 = iceConnected;
6515
- _context23.t8 = this.turnServerUsed;
6516
- _context23.next = 19;
6626
+ _context24.t1 = this.webex.internal.newMetrics;
6627
+ _context24.t2 = !this.turnServerUsed;
6628
+ _context24.t3 = this.addMediaData.icePhaseCallback();
6629
+ _context24.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6630
+ _context24.t5 = _internalPluginMetrics.CallDiagnosticUtils;
6631
+ _context24.t6 = ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
6632
+ _context24.t7 = iceConnected;
6633
+ _context24.t8 = this.turnServerUsed;
6634
+ _context24.next = 19;
6517
6635
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
6518
6636
  return false;
6519
6637
  });
6520
6638
  case 19:
6521
- _context23.t9 = _context23.sent;
6522
- _context23.t10 = {
6523
- signalingState: _context23.t6,
6524
- iceConnected: _context23.t7,
6525
- turnServerUsed: _context23.t8,
6526
- unreachable: _context23.t9
6639
+ _context24.t9 = _context24.sent;
6640
+ _context24.t10 = {
6641
+ signalingState: _context24.t6,
6642
+ iceConnected: _context24.t7,
6643
+ turnServerUsed: _context24.t8,
6644
+ unreachable: _context24.t9
6527
6645
  };
6528
- _context23.t11 = _context23.t5.generateClientErrorCodeForIceFailure.call(_context23.t5, _context23.t10);
6529
- _context23.t12 = {
6530
- clientErrorCode: _context23.t11
6646
+ _context24.t11 = _context24.t5.generateClientErrorCodeForIceFailure.call(_context24.t5, _context24.t10);
6647
+ _context24.t12 = {
6648
+ clientErrorCode: _context24.t11
6531
6649
  };
6532
- _context23.t13 = _context23.t4.getErrorPayloadForClientErrorCode.call(_context23.t4, _context23.t12);
6533
- _context23.t14 = [_context23.t13];
6534
- _context23.t15 = {
6535
- canProceed: _context23.t2,
6536
- icePhase: _context23.t3,
6537
- errors: _context23.t14
6650
+ _context24.t13 = _context24.t4.getErrorPayloadForClientErrorCode.call(_context24.t4, _context24.t12);
6651
+ _context24.t14 = [_context24.t13];
6652
+ _context24.t15 = {
6653
+ canProceed: _context24.t2,
6654
+ icePhase: _context24.t3,
6655
+ errors: _context24.t14
6538
6656
  };
6539
- _context23.t16 = {
6657
+ _context24.t16 = {
6540
6658
  meetingId: this.id
6541
6659
  };
6542
- _context23.t17 = {
6660
+ _context24.t17 = {
6543
6661
  name: 'client.ice.end',
6544
- payload: _context23.t15,
6545
- options: _context23.t16
6662
+ payload: _context24.t15,
6663
+ options: _context24.t16
6546
6664
  };
6547
- _context23.t1.submitClientEvent.call(_context23.t1, _context23.t17);
6665
+ _context24.t1.submitClientEvent.call(_context24.t1, _context24.t17);
6548
6666
  case 29:
6549
6667
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6550
6668
  case 30:
6551
6669
  case "end":
6552
- return _context23.stop();
6670
+ return _context24.stop();
6553
6671
  }
6554
- }, _callee23, this, [[0, 5]]);
6672
+ }, _callee24, this, [[0, 5]]);
6555
6673
  }));
6556
6674
  function waitForMediaConnectionConnected() {
6557
6675
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -6583,18 +6701,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6583
6701
  }
6584
6702
  }
6585
6703
 
6586
- /**
6587
- * Handles device logging
6588
- *
6589
- * @private
6590
- * @static
6591
- * @param {boolean} isAudioEnabled
6592
- * @param {boolean} isVideoEnabled
6593
- * @returns {Promise<void>}
6594
- */
6595
- }, {
6596
- key: "waitForRemoteSDPAnswer",
6597
- value: (
6598
6704
  /**
6599
6705
  * Returns a promise. This promise is created once the local sdp offer has been successfully created and is resolved
6600
6706
  * once the remote sdp answer has been received.
@@ -6602,49 +6708,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6602
6708
  * @private
6603
6709
  * @returns {Promise<void>}
6604
6710
  */
6605
- function () {
6606
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6607
- var _this41 = this;
6711
+ }, {
6712
+ key: "waitForRemoteSDPAnswer",
6713
+ value: (function () {
6714
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
6715
+ var _this42 = this;
6608
6716
  var LOG_HEADER, deferSDPAnswer;
6609
- return _regenerator.default.wrap(function _callee24$(_context24) {
6610
- while (1) switch (_context24.prev = _context24.next) {
6717
+ return _regenerator.default.wrap(function _callee25$(_context25) {
6718
+ while (1) switch (_context25.prev = _context25.next) {
6611
6719
  case 0:
6612
6720
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
6613
6721
  if (this.deferSDPAnswer) {
6614
- _context24.next = 4;
6722
+ _context25.next = 4;
6615
6723
  break;
6616
6724
  }
6617
6725
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
6618
- return _context24.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6726
+ return _context25.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6619
6727
  case 4:
6620
6728
  deferSDPAnswer = this.deferSDPAnswer;
6621
6729
  this.sdpResponseTimer = setTimeout(function () {
6622
6730
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " timeout! no REMOTE SDP ANSWER received within ").concat(_constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000, " seconds"));
6623
6731
  // @ts-ignore
6624
- _this41.webex.internal.newMetrics.submitClientEvent({
6732
+ _this42.webex.internal.newMetrics.submitClientEvent({
6625
6733
  name: 'client.media-engine.remote-sdp-received',
6626
6734
  payload: {
6627
6735
  canProceed: false,
6628
6736
  errors: [
6629
6737
  // @ts-ignore
6630
- _this41.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6738
+ _this42.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6631
6739
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
6632
6740
  })]
6633
6741
  },
6634
6742
  options: {
6635
- meetingId: _this41.id,
6743
+ meetingId: _this42.id,
6636
6744
  rawError: new Error('Timeout waiting for SDP answer')
6637
6745
  }
6638
6746
  });
6639
6747
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
6640
6748
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
6641
6749
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
6642
- return _context24.abrupt("return", deferSDPAnswer.promise);
6750
+ return _context25.abrupt("return", deferSDPAnswer.promise);
6643
6751
  case 8:
6644
6752
  case "end":
6645
- return _context24.stop();
6753
+ return _context25.stop();
6646
6754
  }
6647
- }, _callee24, this);
6755
+ }, _callee25, this);
6648
6756
  }));
6649
6757
  function waitForRemoteSDPAnswer() {
6650
6758
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -6663,30 +6771,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6663
6771
  }, {
6664
6772
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
6665
6773
  value: (function () {
6666
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
6774
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
6667
6775
  var LOG_HEADER;
6668
- return _regenerator.default.wrap(function _callee25$(_context25) {
6669
- while (1) switch (_context25.prev = _context25.next) {
6776
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6777
+ while (1) switch (_context26.prev = _context26.next) {
6670
6778
  case 0:
6671
6779
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
6672
- _context25.prev = 1;
6673
- _context25.next = 4;
6780
+ _context26.prev = 1;
6781
+ _context26.next = 4;
6674
6782
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
6675
6783
  case 4:
6676
- _context25.next = 10;
6784
+ _context26.next = 10;
6677
6785
  break;
6678
6786
  case 6:
6679
- _context25.prev = 6;
6680
- _context25.t0 = _context25["catch"](1);
6681
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context25.t0);
6682
- throw _context25.t0;
6787
+ _context26.prev = 6;
6788
+ _context26.t0 = _context26["catch"](1);
6789
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context26.t0);
6790
+ throw _context26.t0;
6683
6791
  case 10:
6684
6792
  case "end":
6685
- return _context25.stop();
6793
+ return _context26.stop();
6686
6794
  }
6687
- }, _callee25, this, [[1, 6]]);
6795
+ }, _callee26, this, [[1, 6]]);
6688
6796
  }));
6689
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
6797
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x20, _x21) {
6690
6798
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
6691
6799
  }
6692
6800
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -6704,14 +6812,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6704
6812
  }, {
6705
6813
  key: "retryWithForcedTurnDiscovery",
6706
6814
  value: (function () {
6707
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
6815
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
6708
6816
  var LOG_HEADER;
6709
- return _regenerator.default.wrap(function _callee26$(_context26) {
6710
- while (1) switch (_context26.prev = _context26.next) {
6817
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6818
+ while (1) switch (_context27.prev = _context27.next) {
6711
6819
  case 0:
6712
6820
  this.addMediaData.retriedWithTurnServer = true;
6713
6821
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
6714
- _context26.next = 4;
6822
+ _context27.next = 4;
6715
6823
  return this.cleanUpBeforeRetryWithTurnServer();
6716
6824
  case 4:
6717
6825
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -6721,24 +6829,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6721
6829
  reason: 'forcingTurnTls'
6722
6830
  });
6723
6831
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
6724
- _context26.next = 9;
6832
+ _context27.next = 9;
6725
6833
  break;
6726
6834
  }
6727
6835
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
6728
- _context26.next = 9;
6836
+ _context27.next = 9;
6729
6837
  return this.join({
6730
6838
  rejoin: true
6731
6839
  });
6732
6840
  case 9:
6733
- _context26.next = 11;
6841
+ _context27.next = 11;
6734
6842
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6735
6843
  case 11:
6736
6844
  case "end":
6737
- return _context26.stop();
6845
+ return _context27.stop();
6738
6846
  }
6739
- }, _callee26, this);
6847
+ }, _callee27, this);
6740
6848
  }));
6741
- function retryWithForcedTurnDiscovery(_x21, _x22) {
6849
+ function retryWithForcedTurnDiscovery(_x22, _x23) {
6742
6850
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
6743
6851
  }
6744
6852
  return retryWithForcedTurnDiscovery;
@@ -6758,32 +6866,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6758
6866
  }, {
6759
6867
  key: "handleWaitForMediaConnectionConnectedError",
6760
6868
  value: (function () {
6761
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(error, remoteMediaManagerConfig, bundlePolicy) {
6869
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
6762
6870
  var LOG_HEADER;
6763
- return _regenerator.default.wrap(function _callee27$(_context27) {
6764
- while (1) switch (_context27.prev = _context27.next) {
6871
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6872
+ while (1) switch (_context28.prev = _context28.next) {
6765
6873
  case 0:
6766
6874
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
6767
6875
  if (this.turnServerUsed) {
6768
- _context27.next = 7;
6876
+ _context28.next = 7;
6769
6877
  break;
6770
6878
  }
6771
6879
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
6772
- _context27.next = 5;
6880
+ _context28.next = 5;
6773
6881
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6774
6882
  case 5:
6775
- _context27.next = 9;
6883
+ _context28.next = 9;
6776
6884
  break;
6777
6885
  case 7:
6778
6886
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6779
6887
  throw new _webexErrors.AddMediaFailed();
6780
6888
  case 9:
6781
6889
  case "end":
6782
- return _context27.stop();
6890
+ return _context28.stop();
6783
6891
  }
6784
- }, _callee27, this);
6892
+ }, _callee28, this);
6785
6893
  }));
6786
- function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
6894
+ function handleWaitForMediaConnectionConnectedError(_x24, _x25, _x26) {
6787
6895
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
6788
6896
  }
6789
6897
  return handleWaitForMediaConnectionConnectedError;
@@ -6799,20 +6907,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6799
6907
  }, {
6800
6908
  key: "doTurnDiscovery",
6801
6909
  value: (function () {
6802
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(isReconnecting, isForced) {
6910
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(isReconnecting, isForced) {
6803
6911
  var cdl, turnDiscoveryResult;
6804
- return _regenerator.default.wrap(function _callee28$(_context28) {
6805
- while (1) switch (_context28.prev = _context28.next) {
6912
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6913
+ while (1) switch (_context29.prev = _context29.next) {
6806
6914
  case 0:
6807
6915
  // @ts-ignore
6808
6916
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
6809
6917
  this.webex.internal.newMetrics.submitInternalEvent({
6810
6918
  name: 'internal.client.add-media.turn-discovery.start'
6811
6919
  });
6812
- _context28.next = 4;
6920
+ _context29.next = 4;
6813
6921
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
6814
6922
  case 4:
6815
- turnDiscoveryResult = _context28.sent;
6923
+ turnDiscoveryResult = _context29.sent;
6816
6924
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
6817
6925
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
6818
6926
 
@@ -6828,14 +6936,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6828
6936
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
6829
6937
  });
6830
6938
  }
6831
- return _context28.abrupt("return", turnDiscoveryResult);
6939
+ return _context29.abrupt("return", turnDiscoveryResult);
6832
6940
  case 10:
6833
6941
  case "end":
6834
- return _context28.stop();
6942
+ return _context29.stop();
6835
6943
  }
6836
- }, _callee28, this);
6944
+ }, _callee29, this);
6837
6945
  }));
6838
- function doTurnDiscovery(_x26, _x27) {
6946
+ function doTurnDiscovery(_x27, _x28) {
6839
6947
  return _doTurnDiscovery.apply(this, arguments);
6840
6948
  }
6841
6949
  return doTurnDiscovery;
@@ -6854,35 +6962,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6854
6962
  }, {
6855
6963
  key: "establishMediaConnection",
6856
6964
  value: (function () {
6857
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6965
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6858
6966
  var _this$locusMediaReque;
6859
6967
  var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc;
6860
- return _regenerator.default.wrap(function _callee29$(_context29) {
6861
- while (1) switch (_context29.prev = _context29.next) {
6968
+ return _regenerator.default.wrap(function _callee30$(_context30) {
6969
+ while (1) switch (_context30.prev = _context30.next) {
6862
6970
  case 0:
6863
6971
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
6864
6972
  isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
6865
6973
  if (this.isMoveToInProgress && this.turnServerUsed) {
6866
6974
  isForced = true;
6867
6975
  }
6868
- _context29.prev = 3;
6976
+ _context30.prev = 3;
6869
6977
  if (turnServerInfo) {
6870
- _context29.next = 9;
6978
+ _context30.next = 9;
6871
6979
  break;
6872
6980
  }
6873
- _context29.next = 7;
6981
+ _context30.next = 7;
6874
6982
  return this.doTurnDiscovery(isReconnecting, isForced);
6875
6983
  case 7:
6876
- _yield$this$doTurnDis = _context29.sent;
6984
+ _yield$this$doTurnDis = _context30.sent;
6877
6985
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
6878
6986
  case 9:
6879
- _context29.next = 11;
6987
+ _context30.next = 11;
6880
6988
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6881
6989
  case 11:
6882
- mc = _context29.sent;
6883
- _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6990
+ mc = _context30.sent;
6991
+ _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
6884
6992
  if (!this.isMultistream) {
6885
- _context29.next = 21;
6993
+ _context30.next = 21;
6886
6994
  break;
6887
6995
  }
6888
6996
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -6890,42 +6998,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6890
6998
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
6891
6999
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
6892
7000
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
6893
- _context29.next = 21;
7001
+ _context30.next = 21;
6894
7002
  return this.remoteMediaManager.start();
6895
7003
  case 21:
6896
- _context29.next = 23;
7004
+ _context30.next = 23;
6897
7005
  return mc.initiateOffer();
6898
7006
  case 23:
6899
- _context29.next = 25;
7007
+ _context30.next = 25;
6900
7008
  return this.waitForRemoteSDPAnswer();
6901
7009
  case 25:
6902
7010
  this.handleMediaLogging(this.mediaProperties);
6903
- _context29.next = 32;
7011
+ _context30.next = 32;
6904
7012
  break;
6905
7013
  case 28:
6906
- _context29.prev = 28;
6907
- _context29.t0 = _context29["catch"](3);
6908
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context29.t0);
6909
- throw _context29.t0;
7014
+ _context30.prev = 28;
7015
+ _context30.t0 = _context30["catch"](3);
7016
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context30.t0);
7017
+ throw _context30.t0;
6910
7018
  case 32:
6911
- _context29.prev = 32;
6912
- _context29.next = 35;
7019
+ _context30.prev = 32;
7020
+ _context30.next = 35;
6913
7021
  return this.waitForMediaConnectionConnected();
6914
7022
  case 35:
6915
- _context29.next = 41;
7023
+ _context30.next = 41;
6916
7024
  break;
6917
7025
  case 37:
6918
- _context29.prev = 37;
6919
- _context29.t1 = _context29["catch"](32);
6920
- _context29.next = 41;
6921
- return this.handleWaitForMediaConnectionConnectedError(_context29.t1, remoteMediaManagerConfig, bundlePolicy);
7026
+ _context30.prev = 37;
7027
+ _context30.t1 = _context30["catch"](32);
7028
+ _context30.next = 41;
7029
+ return this.handleWaitForMediaConnectionConnectedError(_context30.t1, remoteMediaManagerConfig, bundlePolicy);
6922
7030
  case 41:
6923
7031
  case "end":
6924
- return _context29.stop();
7032
+ return _context30.stop();
6925
7033
  }
6926
- }, _callee29, this, [[3, 28], [32, 37]]);
7034
+ }, _callee30, this, [[3, 28], [32, 37]]);
6927
7035
  }));
6928
- function establishMediaConnection(_x28, _x29, _x30, _x31) {
7036
+ function establishMediaConnection(_x29, _x30, _x31, _x32) {
6929
7037
  return _establishMediaConnection.apply(this, arguments);
6930
7038
  }
6931
7039
  return establishMediaConnection;
@@ -6940,22 +7048,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6940
7048
  }, {
6941
7049
  key: "cleanUpOnAddMediaFailure",
6942
7050
  value: (function () {
6943
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
6944
- return _regenerator.default.wrap(function _callee30$(_context30) {
6945
- while (1) switch (_context30.prev = _context30.next) {
7051
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
7052
+ return _regenerator.default.wrap(function _callee31$(_context31) {
7053
+ while (1) switch (_context31.prev = _context31.next) {
6946
7054
  case 0:
6947
7055
  if (!this.statsAnalyzer) {
6948
- _context30.next = 3;
7056
+ _context31.next = 3;
6949
7057
  break;
6950
7058
  }
6951
- _context30.next = 3;
7059
+ _context31.next = 3;
6952
7060
  return this.statsAnalyzer.stopAnalyzer();
6953
7061
  case 3:
6954
7062
  this.statsAnalyzer = null;
6955
7063
 
6956
7064
  // when media fails, we want to upload a webrtc dump to see whats going on
6957
7065
  // this function is async, but returns once the stats have been gathered
6958
- _context30.next = 6;
7066
+ _context31.next = 6;
6959
7067
  return this.forceSendStatsReport({
6960
7068
  callFrom: 'addMedia'
6961
7069
  });
@@ -6966,15 +7074,58 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6966
7074
  }
6967
7075
  case 7:
6968
7076
  case "end":
6969
- return _context30.stop();
7077
+ return _context31.stop();
6970
7078
  }
6971
- }, _callee30, this);
7079
+ }, _callee31, this);
6972
7080
  }));
6973
7081
  function cleanUpOnAddMediaFailure() {
6974
7082
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
6975
7083
  }
6976
7084
  return cleanUpOnAddMediaFailure;
6977
7085
  }()
7086
+ /**
7087
+ * Cleans up stats analyzer, peer connection and other things before
7088
+ * we can create a new transcoded media connection
7089
+ *
7090
+ * @private
7091
+ * @returns {Promise<void>}
7092
+ */
7093
+ )
7094
+ }, {
7095
+ key: "downgradeFromMultistreamToTranscoded",
7096
+ value: (function () {
7097
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7098
+ var _this$locusMediaReque2;
7099
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7100
+ while (1) switch (_context32.prev = _context32.next) {
7101
+ case 0:
7102
+ if (!this.statsAnalyzer) {
7103
+ _context32.next = 3;
7104
+ break;
7105
+ }
7106
+ _context32.next = 3;
7107
+ return this.statsAnalyzer.stopAnalyzer();
7108
+ case 3:
7109
+ this.statsAnalyzer = null;
7110
+ this.isMultistream = false;
7111
+ if (this.mediaProperties.webrtcMediaConnection) {
7112
+ // close peer connection, but don't reset mute state information, because we will want to use it on the retry
7113
+ this.closePeerConnections(false);
7114
+ this.mediaProperties.unsetPeerConnection();
7115
+ }
7116
+ (_this$locusMediaReque2 = this.locusMediaRequest) === null || _this$locusMediaReque2 === void 0 ? void 0 : _this$locusMediaReque2.downgradeFromMultistreamToTranscoded();
7117
+ this.createStatsAnalyzer();
7118
+ case 8:
7119
+ case "end":
7120
+ return _context32.stop();
7121
+ }
7122
+ }, _callee32, this);
7123
+ }));
7124
+ function downgradeFromMultistreamToTranscoded() {
7125
+ return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
7126
+ }
7127
+ return downgradeFromMultistreamToTranscoded;
7128
+ }()
6978
7129
  /**
6979
7130
  * Sends stats report, closes peer connection and cleans up any media connection
6980
7131
  * related things before trying to establish media connection again with turn server
@@ -6986,11 +7137,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6986
7137
  }, {
6987
7138
  key: "cleanUpBeforeRetryWithTurnServer",
6988
7139
  value: (function () {
6989
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
6990
- return _regenerator.default.wrap(function _callee31$(_context31) {
6991
- while (1) switch (_context31.prev = _context31.next) {
7140
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
7141
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7142
+ while (1) switch (_context33.prev = _context33.next) {
6992
7143
  case 0:
6993
- _context31.next = 2;
7144
+ _context33.next = 2;
6994
7145
  return this.forceSendStatsReport({
6995
7146
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
6996
7147
  });
@@ -7010,9 +7161,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7010
7161
  }
7011
7162
  case 3:
7012
7163
  case "end":
7013
- return _context31.stop();
7164
+ return _context33.stop();
7014
7165
  }
7015
- }, _callee31, this);
7166
+ }, _callee33, this);
7016
7167
  }));
7017
7168
  function cleanUpBeforeRetryWithTurnServer() {
7018
7169
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -7022,34 +7173,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7022
7173
  }, {
7023
7174
  key: "cleanUpBeforeReconnection",
7024
7175
  value: function () {
7025
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7026
- return _regenerator.default.wrap(function _callee32$(_context32) {
7027
- while (1) switch (_context32.prev = _context32.next) {
7176
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
7177
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7178
+ while (1) switch (_context34.prev = _context34.next) {
7028
7179
  case 0:
7029
- _context32.prev = 0;
7030
- _context32.next = 3;
7180
+ _context34.prev = 0;
7181
+ _context34.next = 3;
7031
7182
  return this.forceSendStatsReport({
7032
7183
  callFrom: 'cleanUpBeforeReconnection'
7033
7184
  });
7034
7185
  case 3:
7035
7186
  if (!this.statsAnalyzer) {
7036
- _context32.next = 6;
7187
+ _context34.next = 6;
7037
7188
  break;
7038
7189
  }
7039
- _context32.next = 6;
7190
+ _context34.next = 6;
7040
7191
  return this.statsAnalyzer.stopAnalyzer();
7041
7192
  case 6:
7042
- _context32.next = 11;
7193
+ _context34.next = 11;
7043
7194
  break;
7044
7195
  case 8:
7045
- _context32.prev = 8;
7046
- _context32.t0 = _context32["catch"](0);
7047
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context32.t0);
7196
+ _context34.prev = 8;
7197
+ _context34.t0 = _context34["catch"](0);
7198
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context34.t0);
7048
7199
  case 11:
7049
7200
  case "end":
7050
- return _context32.stop();
7201
+ return _context34.stop();
7051
7202
  }
7052
- }, _callee32, this, [[0, 8]]);
7203
+ }, _callee34, this, [[0, 8]]);
7053
7204
  }));
7054
7205
  function cleanUpBeforeReconnection() {
7055
7206
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -7096,10 +7247,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7096
7247
  }, {
7097
7248
  key: "addMedia",
7098
7249
  value: function addMedia() {
7099
- var _this42 = this;
7250
+ var _this43 = this;
7100
7251
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7101
7252
  return this.addMediaInternal(function () {
7102
- return _this42.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7253
+ return _this43.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7103
7254
  }, undefined, false, options);
7104
7255
  }
7105
7256
 
@@ -7117,7 +7268,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7117
7268
  }, {
7118
7269
  key: "addMediaInternal",
7119
7270
  value: (function () {
7120
- var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7271
+ var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7121
7272
  var options,
7122
7273
  LOG_HEADER,
7123
7274
  localStreams,
@@ -7165,24 +7316,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7165
7316
  _selectedCandidatePairChanges,
7166
7317
  _numTransports,
7167
7318
  _iceCandidateErrors,
7168
- _args33 = arguments;
7169
- return _regenerator.default.wrap(function _callee33$(_context33) {
7170
- while (1) switch (_context33.prev = _context33.next) {
7319
+ _args35 = arguments;
7320
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7321
+ while (1) switch (_context35.prev = _context35.next) {
7171
7322
  case 0:
7172
- options = _args33.length > 3 && _args33[3] !== undefined ? _args33[3] : {};
7323
+ options = _args35.length > 3 && _args35[3] !== undefined ? _args35[3] : {};
7173
7324
  this.addMediaData.retriedWithTurnServer = false;
7174
7325
  this.addMediaData.icePhaseCallback = icePhaseCallback;
7175
7326
  this.hasMediaConnectionConnectedAtLeastOnce = false;
7176
7327
  LOG_HEADER = 'Meeting:index#addMedia -->';
7177
7328
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
7178
7329
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
7179
- _context33.next = 8;
7330
+ _context35.next = 8;
7180
7331
  break;
7181
7332
  }
7182
7333
  throw new _webexErrors.MeetingNotActiveError();
7183
7334
  case 8:
7184
7335
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
7185
- _context33.next = 10;
7336
+ _context35.next = 10;
7186
7337
  break;
7187
7338
  }
7188
7339
  throw new _webexErrors.UserNotJoinedError();
@@ -7193,7 +7344,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7193
7344
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7194
7345
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7195
7346
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7196
- _context33.next = 14;
7347
+ _context35.next = 14;
7197
7348
  break;
7198
7349
  }
7199
7350
  throw new _webexErrors.UserInLobbyError();
@@ -7236,45 +7387,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7236
7387
  });
7237
7388
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7238
7389
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7239
- _context33.prev = 18;
7240
- _context33.next = 21;
7390
+ _context35.prev = 18;
7391
+ _context35.next = 21;
7241
7392
  return this.setUpLocalStreamReferences(localStreams);
7242
7393
  case 21:
7243
7394
  this.setMercuryListener();
7244
7395
  this.createStatsAnalyzer();
7245
- _context33.next = 25;
7396
+ _context35.prev = 23;
7397
+ _context35.next = 26;
7246
7398
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7247
- case 25:
7248
- if (!(audioEnabled || videoEnabled)) {
7249
- _context33.next = 30;
7399
+ case 26:
7400
+ _context35.next = 39;
7401
+ break;
7402
+ case 28:
7403
+ _context35.prev = 28;
7404
+ _context35.t0 = _context35["catch"](23);
7405
+ if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7406
+ _context35.next = 38;
7250
7407
  break;
7251
7408
  }
7252
- _context33.next = 28;
7253
- return Meeting.handleDeviceLogging(audioEnabled, videoEnabled);
7254
- case 28:
7255
- _context33.next = 31;
7409
+ _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7410
+ _context35.next = 34;
7411
+ return this.downgradeFromMultistreamToTranscoded();
7412
+ case 34:
7413
+ _context35.next = 36;
7414
+ return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7415
+ case 36:
7416
+ _context35.next = 39;
7256
7417
  break;
7257
- case 30:
7258
- _loggerProxy.default.logger.info("".concat(LOG_HEADER, " device logging not required"));
7259
- case 31:
7418
+ case 38:
7419
+ throw _context35.t0;
7420
+ case 39:
7260
7421
  if (!this.mediaProperties.hasLocalShareStream()) {
7261
- _context33.next = 34;
7422
+ _context35.next = 42;
7262
7423
  break;
7263
7424
  }
7264
- _context33.next = 34;
7425
+ _context35.next = 42;
7265
7426
  return this.enqueueScreenShareFloorRequest();
7266
- case 34:
7267
- _context33.next = 36;
7427
+ case 42:
7428
+ _context35.next = 44;
7268
7429
  return this.mediaProperties.getCurrentConnectionInfo();
7269
- case 36:
7270
- _yield$this$mediaProp = _context33.sent;
7430
+ case 44:
7431
+ _yield$this$mediaProp = _context35.sent;
7271
7432
  connectionType = _yield$this$mediaProp.connectionType;
7272
7433
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7273
7434
  numTransports = _yield$this$mediaProp.numTransports;
7274
- _context33.next = 42;
7435
+ _context35.next = 50;
7275
7436
  return this.webex.meetings.reachability.getReachabilityMetrics();
7276
- case 42:
7277
- reachabilityStats = _context33.sent;
7437
+ case 50:
7438
+ reachabilityStats = _context35.sent;
7278
7439
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7279
7440
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7280
7441
  correlation_id: this.correlationId,
@@ -7300,31 +7461,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7300
7461
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7301
7462
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7302
7463
  this.startPeriodicLogUpload();
7303
- _context33.next = 69;
7464
+ _context35.next = 77;
7304
7465
  break;
7305
- case 51:
7306
- _context33.prev = 51;
7307
- _context33.t0 = _context33["catch"](18);
7308
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context33.t0);
7466
+ case 59:
7467
+ _context35.prev = 59;
7468
+ _context35.t1 = _context35["catch"](18);
7469
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7309
7470
 
7310
7471
  // @ts-ignore
7311
- _context33.next = 56;
7472
+ _context35.next = 64;
7312
7473
  return this.webex.meetings.reachability.getReachabilityMetrics();
7313
- case 56:
7314
- reachabilityMetrics = _context33.sent;
7315
- _context33.next = 59;
7474
+ case 64:
7475
+ reachabilityMetrics = _context35.sent;
7476
+ _context35.next = 67;
7316
7477
  return this.mediaProperties.getCurrentConnectionInfo();
7317
- case 59:
7318
- _yield$this$mediaProp2 = _context33.sent;
7478
+ case 67:
7479
+ _yield$this$mediaProp2 = _context35.sent;
7319
7480
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7320
7481
  _numTransports = _yield$this$mediaProp2.numTransports;
7321
7482
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7322
7483
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
7323
7484
  correlation_id: this.correlationId,
7324
7485
  locus_id: this.locusUrl.split('/').pop(),
7325
- reason: _context33.t0.message,
7326
- stack: _context33.t0.stack,
7327
- code: _context33.t0.code,
7486
+ reason: _context35.t1.message,
7487
+ stack: _context35.t1.stack,
7488
+ code: _context35.t1.code,
7328
7489
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
7329
7490
  numTransports: _numTransports,
7330
7491
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -7338,31 +7499,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7338
7499
  }, reachabilityMetrics), _iceCandidateErrors), {}, {
7339
7500
  iceCandidatesCount: this.iceCandidatesCount
7340
7501
  }));
7341
- _context33.next = 66;
7502
+ _context35.next = 74;
7342
7503
  return this.cleanUpOnAddMediaFailure();
7343
- case 66:
7504
+ case 74:
7344
7505
  // Upload logs on error while adding media
7345
7506
  _triggerProxy.default.trigger(this, {
7346
7507
  file: 'meeting/index',
7347
7508
  function: 'addMedia'
7348
7509
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
7349
- if (_context33.t0 instanceof _internalMediaCore.Errors.SdpError) {
7510
+ if (_context35.t1 instanceof _internalMediaCore.Errors.SdpError) {
7350
7511
  this.leave({
7351
7512
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
7352
7513
  });
7353
7514
  }
7354
- throw _context33.t0;
7355
- case 69:
7356
- _context33.prev = 69;
7515
+ throw _context35.t1;
7516
+ case 77:
7517
+ _context35.prev = 77;
7357
7518
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7358
- return _context33.finish(69);
7359
- case 72:
7519
+ return _context35.finish(77);
7520
+ case 80:
7360
7521
  case "end":
7361
- return _context33.stop();
7522
+ return _context35.stop();
7362
7523
  }
7363
- }, _callee33, this, [[18, 51, 69, 72]]);
7524
+ }, _callee35, this, [[18, 59, 77, 80], [23, 28]]);
7364
7525
  }));
7365
- function addMediaInternal(_x32, _x33, _x34) {
7526
+ function addMediaInternal(_x33, _x34, _x35) {
7366
7527
  return _addMediaInternal.apply(this, arguments);
7367
7528
  }
7368
7529
  return addMediaInternal;
@@ -7392,7 +7553,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7392
7553
  * @memberof Meeting
7393
7554
  */
7394
7555
  function enqueueMediaUpdate(mediaUpdateType) {
7395
- var _this43 = this;
7556
+ var _this44 = this;
7396
7557
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7397
7558
  var canUpdateMediaNow = this.canUpdateMedia();
7398
7559
  return new _promise.default(function (resolve, reject) {
@@ -7403,9 +7564,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7403
7564
  options: options
7404
7565
  };
7405
7566
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7406
- _this43.queuedMediaUpdates.push(queueItem);
7567
+ _this44.queuedMediaUpdates.push(queueItem);
7407
7568
  if (canUpdateMediaNow) {
7408
- _this43.processNextQueuedMediaUpdate();
7569
+ _this44.processNextQueuedMediaUpdate();
7409
7570
  }
7410
7571
  });
7411
7572
  }
@@ -7428,35 +7589,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7428
7589
  * @memberof Meeting
7429
7590
  */
7430
7591
  function () {
7431
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(options) {
7592
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(options) {
7432
7593
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
7433
- return _regenerator.default.wrap(function _callee34$(_context34) {
7434
- while (1) switch (_context34.prev = _context34.next) {
7594
+ return _regenerator.default.wrap(function _callee36$(_context36) {
7595
+ while (1) switch (_context36.prev = _context36.next) {
7435
7596
  case 0:
7436
7597
  this.checkMediaConnection();
7437
7598
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
7438
7599
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
7439
7600
  if (this.canUpdateMedia()) {
7440
- _context34.next = 5;
7601
+ _context36.next = 5;
7441
7602
  break;
7442
7603
  }
7443
- return _context34.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7604
+ return _context36.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7444
7605
  case 5:
7445
7606
  if (!this.isMultistream) {
7446
- _context34.next = 10;
7607
+ _context36.next = 10;
7447
7608
  break;
7448
7609
  }
7449
7610
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
7450
- _context34.next = 8;
7611
+ _context36.next = 8;
7451
7612
  break;
7452
7613
  }
7453
7614
  throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
7454
7615
  case 8:
7455
- _context34.next = 12;
7616
+ _context36.next = 12;
7456
7617
  break;
7457
7618
  case 10:
7458
7619
  if (!(shareAudioEnabled !== undefined)) {
7459
- _context34.next = 12;
7620
+ _context36.next = 12;
7460
7621
  break;
7461
7622
  }
7462
7623
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -7481,20 +7642,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7481
7642
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
7482
7643
  }
7483
7644
  if (this.isMultistream) {
7484
- _context34.next = 18;
7645
+ _context36.next = 18;
7485
7646
  break;
7486
7647
  }
7487
- _context34.next = 18;
7648
+ _context36.next = 18;
7488
7649
  return this.updateTranscodedMediaConnection();
7489
7650
  case 18:
7490
- return _context34.abrupt("return", undefined);
7651
+ return _context36.abrupt("return", undefined);
7491
7652
  case 19:
7492
7653
  case "end":
7493
- return _context34.stop();
7654
+ return _context36.stop();
7494
7655
  }
7495
- }, _callee34, this);
7656
+ }, _callee36, this);
7496
7657
  }));
7497
- function updateMedia(_x35) {
7658
+ function updateMedia(_x36) {
7498
7659
  return _updateMedia.apply(this, arguments);
7499
7660
  }
7500
7661
  return updateMedia;
@@ -7510,7 +7671,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7510
7671
  }, {
7511
7672
  key: "acknowledge",
7512
7673
  value: function acknowledge(type) {
7513
- var _this44 = this;
7674
+ var _this45 = this;
7514
7675
  if (!type) {
7515
7676
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
7516
7677
  }
@@ -7522,12 +7683,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7522
7683
  }).then(function (response) {
7523
7684
  return _promise.default.resolve(response);
7524
7685
  }).then(function (response) {
7525
- _this44.meetingFiniteStateMachine.ring(type);
7686
+ _this45.meetingFiniteStateMachine.ring(type);
7526
7687
  // @ts-ignore
7527
- _this44.webex.internal.newMetrics.submitClientEvent({
7688
+ _this45.webex.internal.newMetrics.submitClientEvent({
7528
7689
  name: 'client.alert.displayed',
7529
7690
  options: {
7530
- meetingId: _this44.id
7691
+ meetingId: _this45.id
7531
7692
  }
7532
7693
  });
7533
7694
  return _promise.default.resolve({
@@ -7552,12 +7713,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7552
7713
  }, {
7553
7714
  key: "decline",
7554
7715
  value: function decline(reason) {
7555
- var _this45 = this;
7716
+ var _this46 = this;
7556
7717
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
7557
- _this45.meetingFiniteStateMachine.decline();
7718
+ _this46.meetingFiniteStateMachine.decline();
7558
7719
  return _promise.default.resolve(decline);
7559
7720
  }).catch(function (error) {
7560
- _this45.meetingFiniteStateMachine.fail(error);
7721
+ _this46.meetingFiniteStateMachine.fail(error);
7561
7722
  return _promise.default.reject(error);
7562
7723
  });
7563
7724
  }
@@ -7608,7 +7769,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7608
7769
  }, {
7609
7770
  key: "leave",
7610
7771
  value: function leave() {
7611
- var _this46 = this;
7772
+ var _this47 = this;
7612
7773
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7613
7774
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
7614
7775
 
@@ -7620,7 +7781,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7620
7781
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7621
7782
  return (
7622
7783
  // @ts-ignore
7623
- _this46.webex.internal.newMetrics.submitClientEvent({
7784
+ _this47.webex.internal.newMetrics.submitClientEvent({
7624
7785
  name: 'client.call.leave',
7625
7786
  payload: _objectSpread({
7626
7787
  trigger: 'user-interaction',
@@ -7628,7 +7789,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7628
7789
  leaveReason: options.clientEventLeaveReason
7629
7790
  }, payload),
7630
7791
  options: {
7631
- meetingId: _this46.id
7792
+ meetingId: _this47.id
7632
7793
  }
7633
7794
  })
7634
7795
  );
@@ -7637,24 +7798,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7637
7798
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
7638
7799
  // CA team recommends submitting this *after* locus /leave
7639
7800
  submitLeaveMetric();
7640
- _this46.meetingFiniteStateMachine.leave();
7641
- _this46.clearMeetingData();
7801
+ _this47.meetingFiniteStateMachine.leave();
7802
+ _this47.clearMeetingData();
7642
7803
 
7643
7804
  // upload logs on leave irrespective of meeting delete
7644
- _triggerProxy.default.trigger(_this46, {
7805
+ _triggerProxy.default.trigger(_this47, {
7645
7806
  file: 'meeting/index',
7646
7807
  function: 'leave'
7647
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
7808
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
7648
7809
 
7649
7810
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
7650
- if (_this46.wirelessShare || _this46.guest) {
7811
+ if (_this47.wirelessShare || _this47.guest) {
7651
7812
  // If screen sharing clean the meeting object
7652
- _triggerProxy.default.trigger(_this46, {
7813
+ _triggerProxy.default.trigger(_this47, {
7653
7814
  file: 'meeting/index',
7654
7815
  function: 'leave'
7655
7816
  }, _constants.EVENTS.DESTROY_MEETING, {
7656
7817
  reason: options.reason,
7657
- meetingId: _this46.id
7818
+ meetingId: _this47.id
7658
7819
  });
7659
7820
  }
7660
7821
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -7671,16 +7832,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7671
7832
  shownToUser: false
7672
7833
  }]
7673
7834
  });
7674
- _this46.meetingFiniteStateMachine.fail(error);
7835
+ _this47.meetingFiniteStateMachine.fail(error);
7675
7836
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
7676
7837
  // upload logs on leave irrespective of meeting delete
7677
- _triggerProxy.default.trigger(_this46, {
7838
+ _triggerProxy.default.trigger(_this47, {
7678
7839
  file: 'meeting/index',
7679
7840
  function: 'leave'
7680
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
7841
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
7681
7842
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
7682
- correlation_id: _this46.correlationId,
7683
- locus_id: _this46.locusUrl.split('/').pop(),
7843
+ correlation_id: _this47.correlationId,
7844
+ locus_id: _this47.locusUrl.split('/').pop(),
7684
7845
  reason: error.message,
7685
7846
  stack: error.stack,
7686
7847
  code: error.code
@@ -7700,7 +7861,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7700
7861
  }, {
7701
7862
  key: "startWhiteboardShare",
7702
7863
  value: function startWhiteboardShare(channelUrl, resourceToken) {
7703
- var _this47 = this;
7864
+ var _this48 = this;
7704
7865
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7705
7866
  return element.name === 'whiteboard';
7706
7867
  });
@@ -7729,13 +7890,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7729
7890
  body.resourceToken = resourceToken;
7730
7891
  }
7731
7892
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
7732
- _this47.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7893
+ _this48.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7733
7894
  return _promise.default.resolve();
7734
7895
  }).catch(function (error) {
7735
7896
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
7736
7897
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
7737
- correlation_id: _this47.correlationId,
7738
- locus_id: _this47.locusUrl.split('/').pop(),
7898
+ correlation_id: _this48.correlationId,
7899
+ locus_id: _this48.locusUrl.split('/').pop(),
7739
7900
  reason: error.message,
7740
7901
  stack: error.stack,
7741
7902
  board: {
@@ -7758,7 +7919,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7758
7919
  }, {
7759
7920
  key: "stopWhiteboardShare",
7760
7921
  value: function stopWhiteboardShare(channelUrl) {
7761
- var _this48 = this;
7922
+ var _this49 = this;
7762
7923
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7763
7924
  return element.name === 'whiteboard';
7764
7925
  });
@@ -7781,8 +7942,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7781
7942
  }).catch(function (error) {
7782
7943
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
7783
7944
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
7784
- correlation_id: _this48.correlationId,
7785
- locus_id: _this48.locusUrl.split('/').pop(),
7945
+ correlation_id: _this49.correlationId,
7946
+ locus_id: _this49.locusUrl.split('/').pop(),
7786
7947
  reason: error.message,
7787
7948
  stack: error.stack,
7788
7949
  board: {
@@ -7804,7 +7965,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7804
7965
  }, {
7805
7966
  key: "requestScreenShareFloor",
7806
7967
  value: function requestScreenShareFloor() {
7807
- var _this49 = this;
7968
+ var _this50 = this;
7808
7969
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
7809
7970
  _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, ")"));
7810
7971
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -7835,34 +7996,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7835
7996
  resourceUrl: this.resourceUrl,
7836
7997
  shareInstanceId: this.localShareInstanceId
7837
7998
  }).then(function () {
7838
- _this49.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
7999
+ _this50.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
7839
8000
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
7840
- correlation_id: _this49.correlationId,
7841
- locus_id: _this49.locusUrl.split('/').pop()
8001
+ correlation_id: _this50.correlationId,
8002
+ locus_id: _this50.locusUrl.split('/').pop()
7842
8003
  });
7843
8004
  return _promise.default.resolve();
7844
8005
  }).catch(function (error) {
7845
8006
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
7846
8007
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
7847
- correlation_id: _this49.correlationId,
7848
- locus_id: _this49.locusUrl.split('/').pop(),
8008
+ correlation_id: _this50.correlationId,
8009
+ locus_id: _this50.locusUrl.split('/').pop(),
7849
8010
  reason: error.message,
7850
8011
  stack: error.stack
7851
8012
  });
7852
8013
 
7853
8014
  // @ts-ignore
7854
- _this49.webex.internal.newMetrics.submitClientEvent({
8015
+ _this50.webex.internal.newMetrics.submitClientEvent({
7855
8016
  name: 'client.share.floor-granted.local',
7856
8017
  payload: {
7857
8018
  mediaType: 'share',
7858
8019
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
7859
- shareInstanceId: _this49.localShareInstanceId
8020
+ shareInstanceId: _this50.localShareInstanceId
7860
8021
  },
7861
8022
  options: {
7862
- meetingId: _this49.id
8023
+ meetingId: _this50.id
7863
8024
  }
7864
8025
  });
7865
- _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8026
+ _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7866
8027
  return _promise.default.reject(error);
7867
8028
  });
7868
8029
  }
@@ -7885,10 +8046,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7885
8046
  }, {
7886
8047
  key: "requestScreenShareFloorIfPending",
7887
8048
  value: function requestScreenShareFloorIfPending() {
7888
- var _this50 = this;
8049
+ var _this51 = this;
7889
8050
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
7890
8051
  this.requestScreenShareFloor().then(function () {
7891
- _this50.floorGrantPending = false;
8052
+ _this51.floorGrantPending = false;
7892
8053
  });
7893
8054
  }
7894
8055
  }
@@ -7902,7 +8063,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7902
8063
  }, {
7903
8064
  key: "releaseScreenShareFloor",
7904
8065
  value: function releaseScreenShareFloor() {
7905
- var _this51 = this;
8066
+ var _this52 = this;
7906
8067
  var content = this.locusInfo.mediaShares.find(function (element) {
7907
8068
  return element.name === _constants.CONTENT;
7908
8069
  });
@@ -7937,8 +8098,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7937
8098
  }).catch(function (error) {
7938
8099
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
7939
8100
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
7940
- correlation_id: _this51.correlationId,
7941
- locus_id: _this51.locusUrl.split('/').pop(),
8101
+ correlation_id: _this52.correlationId,
8102
+ locus_id: _this52.locusUrl.split('/').pop(),
7942
8103
  reason: error.message,
7943
8104
  stack: error.stack
7944
8105
  });
@@ -8118,7 +8279,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8118
8279
  }, {
8119
8280
  key: "changeVideoLayout",
8120
8281
  value: function changeVideoLayout(layoutType) {
8121
- var _this52 = this;
8282
+ var _this53 = this;
8122
8283
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8123
8284
  var main = renderInfo.main,
8124
8285
  content = renderInfo.content;
@@ -8134,7 +8295,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8134
8295
  }
8135
8296
  if (layoutType) {
8136
8297
  if (!_constants.LAYOUT_TYPES.includes(layoutType)) {
8137
- return this.rejectWithErrorLog('Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType received.');
8298
+ return this.rejectWithErrorLog("Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType \"".concat(layoutType, "\" received."));
8138
8299
  }
8139
8300
  layoutInfo.layoutType = layoutType;
8140
8301
  }
@@ -8172,7 +8333,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8172
8333
  }
8173
8334
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8174
8335
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8175
- _triggerProxy.default.trigger(_this52, {
8336
+ _triggerProxy.default.trigger(_this53, {
8176
8337
  file: 'meeting/index',
8177
8338
  function: 'changeVideoLayout'
8178
8339
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8288,7 +8449,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8288
8449
  }, {
8289
8450
  key: "endMeetingForAll",
8290
8451
  value: function endMeetingForAll() {
8291
- var _this53 = this;
8452
+ var _this54 = this;
8292
8453
  // @ts-ignore
8293
8454
  this.webex.internal.newMetrics.submitClientEvent({
8294
8455
  name: 'client.call.leave',
@@ -8306,25 +8467,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8306
8467
  locus_id: this.locusId
8307
8468
  });
8308
8469
  return _util2.default.endMeetingForAll(this).then(function (end) {
8309
- _this53.meetingFiniteStateMachine.end();
8310
- _this53.clearMeetingData();
8470
+ _this54.meetingFiniteStateMachine.end();
8471
+ _this54.clearMeetingData();
8311
8472
  // upload logs on leave irrespective of meeting delete
8312
- _triggerProxy.default.trigger(_this53, {
8473
+ _triggerProxy.default.trigger(_this54, {
8313
8474
  file: 'meeting/index',
8314
8475
  function: 'endMeetingForAll'
8315
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this53);
8476
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8316
8477
  return end;
8317
8478
  }).catch(function (error) {
8318
- _this53.meetingFiniteStateMachine.fail(error);
8479
+ _this54.meetingFiniteStateMachine.fail(error);
8319
8480
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8320
8481
  // upload logs on leave irrespective of meeting delete
8321
- _triggerProxy.default.trigger(_this53, {
8482
+ _triggerProxy.default.trigger(_this54, {
8322
8483
  file: 'meeting/index',
8323
8484
  function: 'endMeetingForAll'
8324
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this53);
8485
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8325
8486
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8326
- correlation_id: _this53.correlationId,
8327
- locus_id: _this53.locusUrl.split('/').pop(),
8487
+ correlation_id: _this54.correlationId,
8488
+ locus_id: _this54.locusUrl.split('/').pop(),
8328
8489
  reason: error.message,
8329
8490
  stack: error.stack,
8330
8491
  code: error.code
@@ -8413,39 +8574,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8413
8574
  }, {
8414
8575
  key: "enableMusicMode",
8415
8576
  value: (function () {
8416
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(shouldEnableMusicMode) {
8417
- return _regenerator.default.wrap(function _callee35$(_context35) {
8418
- while (1) switch (_context35.prev = _context35.next) {
8577
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(shouldEnableMusicMode) {
8578
+ return _regenerator.default.wrap(function _callee37$(_context37) {
8579
+ while (1) switch (_context37.prev = _context37.next) {
8419
8580
  case 0:
8420
8581
  this.checkMediaConnection();
8421
8582
  if (this.isMultistream) {
8422
- _context35.next = 3;
8583
+ _context37.next = 3;
8423
8584
  break;
8424
8585
  }
8425
8586
  throw new Error('enableMusicMode() only supported with multistream');
8426
8587
  case 3:
8427
8588
  if (!shouldEnableMusicMode) {
8428
- _context35.next = 8;
8589
+ _context37.next = 8;
8429
8590
  break;
8430
8591
  }
8431
- _context35.next = 6;
8592
+ _context37.next = 6;
8432
8593
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
8433
8594
  maxaveragebitrate: '64000',
8434
8595
  maxplaybackrate: '48000'
8435
8596
  });
8436
8597
  case 6:
8437
- _context35.next = 10;
8598
+ _context37.next = 10;
8438
8599
  break;
8439
8600
  case 8:
8440
- _context35.next = 10;
8601
+ _context37.next = 10;
8441
8602
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
8442
8603
  case 10:
8443
8604
  case "end":
8444
- return _context35.stop();
8605
+ return _context37.stop();
8445
8606
  }
8446
- }, _callee35, this);
8607
+ }, _callee37, this);
8447
8608
  }));
8448
- function enableMusicMode(_x36) {
8609
+ function enableMusicMode(_x37) {
8449
8610
  return _enableMusicMode.apply(this, arguments);
8450
8611
  }
8451
8612
  return enableMusicMode;
@@ -8466,7 +8627,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8466
8627
  _this$mediaProperties41,
8467
8628
  _this$mediaProperties42,
8468
8629
  _this$mediaProperties43,
8469
- _this54 = this;
8630
+ _this55 = this;
8470
8631
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
8471
8632
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
8472
8633
  if (!this.canUpdateMedia()) {
@@ -8491,8 +8652,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8491
8652
  }).catch(function (error) {
8492
8653
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
8493
8654
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
8494
- correlation_id: _this54.correlationId,
8495
- locus_id: _this54.locusUrl.split('/').pop(),
8655
+ correlation_id: _this55.correlationId,
8656
+ locus_id: _this55.locusUrl.split('/').pop(),
8496
8657
  reason: error.message,
8497
8658
  stack: error.stack
8498
8659
  });
@@ -8536,25 +8697,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8536
8697
  }, {
8537
8698
  key: "publishStream",
8538
8699
  value: (function () {
8539
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
8540
- return _regenerator.default.wrap(function _callee36$(_context36) {
8541
- while (1) switch (_context36.prev = _context36.next) {
8700
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(mediaType, stream) {
8701
+ return _regenerator.default.wrap(function _callee38$(_context38) {
8702
+ while (1) switch (_context38.prev = _context38.next) {
8542
8703
  case 0:
8543
8704
  if (stream) {
8544
- _context36.next = 2;
8705
+ _context38.next = 2;
8545
8706
  break;
8546
8707
  }
8547
- return _context36.abrupt("return");
8708
+ return _context38.abrupt("return");
8548
8709
  case 2:
8549
8710
  if (!this.mediaProperties.webrtcMediaConnection) {
8550
- _context36.next = 7;
8711
+ _context38.next = 7;
8551
8712
  break;
8552
8713
  }
8553
8714
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8554
- _context36.next = 6;
8715
+ _context38.next = 6;
8555
8716
  break;
8556
8717
  }
8557
- _context36.next = 6;
8718
+ _context38.next = 6;
8558
8719
  return this.sendSlotManager.publishStream(mediaType, stream);
8559
8720
  case 6:
8560
8721
  this.emitPublishStateChangeEvent({
@@ -8565,11 +8726,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8565
8726
  });
8566
8727
  case 7:
8567
8728
  case "end":
8568
- return _context36.stop();
8729
+ return _context38.stop();
8569
8730
  }
8570
- }, _callee36, this);
8731
+ }, _callee38, this);
8571
8732
  }));
8572
- function publishStream(_x37, _x38) {
8733
+ function publishStream(_x38, _x39) {
8573
8734
  return _publishStream.apply(this, arguments);
8574
8735
  }
8575
8736
  return publishStream;
@@ -8585,21 +8746,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8585
8746
  }, {
8586
8747
  key: "unpublishStream",
8587
8748
  value: (function () {
8588
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
8589
- return _regenerator.default.wrap(function _callee37$(_context37) {
8590
- while (1) switch (_context37.prev = _context37.next) {
8749
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(mediaType, stream) {
8750
+ return _regenerator.default.wrap(function _callee39$(_context39) {
8751
+ while (1) switch (_context39.prev = _context39.next) {
8591
8752
  case 0:
8592
8753
  if (stream) {
8593
- _context37.next = 2;
8754
+ _context39.next = 2;
8594
8755
  break;
8595
8756
  }
8596
- return _context37.abrupt("return");
8757
+ return _context39.abrupt("return");
8597
8758
  case 2:
8598
8759
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8599
- _context37.next = 5;
8760
+ _context39.next = 5;
8600
8761
  break;
8601
8762
  }
8602
- _context37.next = 5;
8763
+ _context39.next = 5;
8603
8764
  return this.sendSlotManager.unpublishStream(mediaType);
8604
8765
  case 5:
8605
8766
  this.emitPublishStateChangeEvent({
@@ -8610,11 +8771,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8610
8771
  });
8611
8772
  case 6:
8612
8773
  case "end":
8613
- return _context37.stop();
8774
+ return _context39.stop();
8614
8775
  }
8615
- }, _callee37, this);
8776
+ }, _callee39, this);
8616
8777
  }));
8617
- function unpublishStream(_x39, _x40) {
8778
+ function unpublishStream(_x40, _x41) {
8618
8779
  return _unpublishStream.apply(this, arguments);
8619
8780
  }
8620
8781
  return unpublishStream;
@@ -8629,19 +8790,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8629
8790
  }, {
8630
8791
  key: "publishStreams",
8631
8792
  value: (function () {
8632
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
8793
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(streams) {
8633
8794
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
8634
8795
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
8635
- return _regenerator.default.wrap(function _callee38$(_context38) {
8636
- while (1) switch (_context38.prev = _context38.next) {
8796
+ return _regenerator.default.wrap(function _callee40$(_context40) {
8797
+ while (1) switch (_context40.prev = _context40.next) {
8637
8798
  case 0:
8638
8799
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8639
8800
  this.checkMediaConnection();
8640
8801
  if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
8641
- _context38.next = 4;
8802
+ _context40.next = 4;
8642
8803
  break;
8643
8804
  }
8644
- return _context38.abrupt("return");
8805
+ return _context40.abrupt("return");
8645
8806
  case 4:
8646
8807
  streamChecks = [{
8647
8808
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -8659,62 +8820,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8659
8820
  _i = 0, _streamChecks = streamChecks;
8660
8821
  case 6:
8661
8822
  if (!(_i < _streamChecks.length)) {
8662
- _context38.next = 13;
8823
+ _context40.next = 13;
8663
8824
  break;
8664
8825
  }
8665
8826
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
8666
8827
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
8667
- _context38.next = 10;
8828
+ _context40.next = 10;
8668
8829
  break;
8669
8830
  }
8670
8831
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
8671
8832
  case 10:
8672
8833
  _i++;
8673
- _context38.next = 6;
8834
+ _context40.next = 6;
8674
8835
  break;
8675
8836
  case 13:
8676
8837
  floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
8677
8838
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
8678
- _context38.next = 18;
8839
+ _context40.next = 18;
8679
8840
  break;
8680
8841
  }
8681
- _context38.next = 17;
8842
+ _context40.next = 17;
8682
8843
  return this.setLocalShareAudioStream(streams.screenShare.audio);
8683
8844
  case 17:
8684
8845
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8685
8846
  case 18:
8686
8847
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
8687
- _context38.next = 22;
8848
+ _context40.next = 22;
8688
8849
  break;
8689
8850
  }
8690
- _context38.next = 21;
8851
+ _context40.next = 21;
8691
8852
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
8692
8853
  case 21:
8693
8854
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8694
8855
  case 22:
8695
8856
  if (!streams.microphone) {
8696
- _context38.next = 25;
8857
+ _context40.next = 25;
8697
8858
  break;
8698
8859
  }
8699
- _context38.next = 25;
8860
+ _context40.next = 25;
8700
8861
  return this.setLocalAudioStream(streams.microphone);
8701
8862
  case 25:
8702
8863
  if (!streams.camera) {
8703
- _context38.next = 28;
8864
+ _context40.next = 28;
8704
8865
  break;
8705
8866
  }
8706
- _context38.next = 28;
8867
+ _context40.next = 28;
8707
8868
  return this.setLocalVideoStream(streams.camera);
8708
8869
  case 28:
8709
8870
  if (this.isMultistream) {
8710
- _context38.next = 31;
8871
+ _context40.next = 31;
8711
8872
  break;
8712
8873
  }
8713
- _context38.next = 31;
8874
+ _context40.next = 31;
8714
8875
  return this.updateTranscodedMediaConnection();
8715
8876
  case 31:
8716
8877
  if (!floorRequestNeeded) {
8717
- _context38.next = 37;
8878
+ _context40.next = 37;
8718
8879
  break;
8719
8880
  }
8720
8881
  this.localShareInstanceId = _uuid.default.v4();
@@ -8738,15 +8899,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8738
8899
  // we're sending the http request to Locus to request the screen share floor
8739
8900
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8740
8901
  // and also if sharing from the start, we need confluence to have been created
8741
- _context38.next = 37;
8902
+ _context40.next = 37;
8742
8903
  return this.enqueueScreenShareFloorRequest();
8743
8904
  case 37:
8744
8905
  case "end":
8745
- return _context38.stop();
8906
+ return _context40.stop();
8746
8907
  }
8747
- }, _callee38, this);
8908
+ }, _callee40, this);
8748
8909
  }));
8749
- function publishStreams(_x41) {
8910
+ function publishStreams(_x42) {
8750
8911
  return _publishStreams.apply(this, arguments);
8751
8912
  }
8752
8913
  return publishStreams;
@@ -8761,10 +8922,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8761
8922
  }, {
8762
8923
  key: "unpublishStreams",
8763
8924
  value: (function () {
8764
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
8925
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(streams) {
8765
8926
  var promises, _iterator, _step, stream;
8766
- return _regenerator.default.wrap(function _callee39$(_context39) {
8767
- while (1) switch (_context39.prev = _context39.next) {
8927
+ return _regenerator.default.wrap(function _callee41$(_context41) {
8928
+ while (1) switch (_context41.prev = _context41.next) {
8768
8929
  case 0:
8769
8930
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8770
8931
  this.checkMediaConnection();
@@ -8796,7 +8957,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8796
8957
  if (!this.isMultistream) {
8797
8958
  promises.push(this.updateTranscodedMediaConnection());
8798
8959
  }
8799
- _context39.next = 8;
8960
+ _context41.next = 8;
8800
8961
  return _promise.default.all(promises);
8801
8962
  case 8:
8802
8963
  // we're allowing for the SDK to support just audio share as well
@@ -8817,11 +8978,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8817
8978
  }
8818
8979
  case 9:
8819
8980
  case "end":
8820
- return _context39.stop();
8981
+ return _context41.stop();
8821
8982
  }
8822
- }, _callee39, this);
8983
+ }, _callee41, this);
8823
8984
  }));
8824
- function unpublishStreams(_x42) {
8985
+ function unpublishStreams(_x43) {
8825
8986
  return _unpublishStreams.apply(this, arguments);
8826
8987
  }
8827
8988
  return unpublishStreams;
@@ -8878,64 +9039,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8878
9039
  }
8879
9040
  return _promise.default.resolve();
8880
9041
  }
8881
- }], [{
8882
- key: "handleDeviceLogging",
8883
- value: (function () {
8884
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(isAudioEnabled, isVideoEnabled) {
8885
- var devices;
8886
- return _regenerator.default.wrap(function _callee40$(_context40) {
8887
- while (1) switch (_context40.prev = _context40.next) {
8888
- case 0:
8889
- _context40.prev = 0;
8890
- devices = [];
8891
- if (!(isVideoEnabled && isAudioEnabled)) {
8892
- _context40.next = 8;
8893
- break;
8894
- }
8895
- _context40.next = 5;
8896
- return (0, _mediaHelpers.getDevices)();
8897
- case 5:
8898
- devices = _context40.sent;
8899
- _context40.next = 18;
8900
- break;
8901
- case 8:
8902
- if (!isVideoEnabled) {
8903
- _context40.next = 14;
8904
- break;
8905
- }
8906
- _context40.next = 11;
8907
- return (0, _mediaHelpers.getDevices)(_media.default.DeviceKind.VIDEO_INPUT);
8908
- case 11:
8909
- devices = _context40.sent;
8910
- _context40.next = 18;
8911
- break;
8912
- case 14:
8913
- if (!isAudioEnabled) {
8914
- _context40.next = 18;
8915
- break;
8916
- }
8917
- _context40.next = 17;
8918
- return (0, _mediaHelpers.getDevices)(_media.default.DeviceKind.AUDIO_INPUT);
8919
- case 17:
8920
- devices = _context40.sent;
8921
- case 18:
8922
- _util2.default.handleDeviceLogging(devices);
8923
- _context40.next = 23;
8924
- break;
8925
- case 21:
8926
- _context40.prev = 21;
8927
- _context40.t0 = _context40["catch"](0);
8928
- case 23:
8929
- case "end":
8930
- return _context40.stop();
8931
- }
8932
- }, _callee40, null, [[0, 21]]);
8933
- }));
8934
- function handleDeviceLogging(_x43, _x44) {
8935
- return _handleDeviceLogging.apply(this, arguments);
8936
- }
8937
- return handleDeviceLogging;
8938
- }())
8939
9042
  }]);
8940
9043
  return Meeting;
8941
9044
  }(_webexCore.StatelessWebexPlugin);