@webex/plugin-meetings 2.60.1-next.1 → 2.60.1-next.10

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 (58) hide show
  1. package/README.md +12 -0
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/constants.d.ts +18 -4
  5. package/dist/constants.js +23 -9
  6. package/dist/constants.js.map +1 -1
  7. package/dist/interpretation/index.js +1 -1
  8. package/dist/interpretation/siLanguage.js +1 -1
  9. package/dist/locus-info/index.d.ts +1 -1
  10. package/dist/locus-info/index.js +8 -8
  11. package/dist/locus-info/index.js.map +1 -1
  12. package/dist/meeting/index.d.ts +119 -31
  13. package/dist/meeting/index.js +1021 -805
  14. package/dist/meeting/index.js.map +1 -1
  15. package/dist/meeting/request.js +25 -18
  16. package/dist/meeting/request.js.map +1 -1
  17. package/dist/meeting/util.d.ts +16 -0
  18. package/dist/meeting/util.js +71 -0
  19. package/dist/meeting/util.js.map +1 -1
  20. package/dist/meeting/voicea-meeting.d.ts +20 -0
  21. package/dist/meeting/voicea-meeting.js +201 -0
  22. package/dist/meeting/voicea-meeting.js.map +1 -0
  23. package/dist/meetings/index.d.ts +25 -3
  24. package/dist/meetings/index.js +83 -32
  25. package/dist/meetings/index.js.map +1 -1
  26. package/dist/reachability/index.js +11 -6
  27. package/dist/reachability/index.js.map +1 -1
  28. package/dist/reconnection-manager/index.js +3 -1
  29. package/dist/reconnection-manager/index.js.map +1 -1
  30. package/dist/roap/index.js +50 -54
  31. package/dist/roap/index.js.map +1 -1
  32. package/dist/statsAnalyzer/index.js +1 -1
  33. package/dist/statsAnalyzer/index.js.map +1 -1
  34. package/dist/statsAnalyzer/mqaUtil.js +13 -10
  35. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  36. package/dist/webinar/index.js +1 -1
  37. package/package.json +22 -21
  38. package/src/constants.ts +22 -4
  39. package/src/locus-info/index.ts +13 -12
  40. package/src/meeting/index.ts +546 -276
  41. package/src/meeting/request.ts +7 -0
  42. package/src/meeting/util.ts +97 -0
  43. package/src/meeting/voicea-meeting.ts +161 -0
  44. package/src/meetings/index.ts +59 -18
  45. package/src/reachability/index.ts +7 -4
  46. package/src/reconnection-manager/index.ts +1 -1
  47. package/src/roap/index.ts +49 -51
  48. package/src/statsAnalyzer/index.ts +2 -2
  49. package/src/statsAnalyzer/mqaUtil.ts +15 -14
  50. package/test/unit/spec/locus-info/index.js +53 -5
  51. package/test/unit/spec/meeting/index.js +1792 -1139
  52. package/test/unit/spec/meeting/request.js +22 -12
  53. package/test/unit/spec/meeting/utils.js +93 -0
  54. package/test/unit/spec/meetings/index.js +180 -21
  55. package/test/unit/spec/reachability/index.ts +2 -1
  56. package/test/unit/spec/reconnection-manager/index.js +1 -0
  57. package/test/unit/spec/roap/index.ts +28 -42
  58. package/test/unit/spec/stats-analyzer/index.js +415 -30
@@ -29,7 +29,7 @@ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-cor
29
29
  var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
30
30
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
31
31
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
32
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
32
+ var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
33
33
  var _uuid = _interopRequireDefault(require("uuid"));
34
34
  var _lodash = require("lodash");
35
35
  var _jwtDecode = _interopRequireDefault(require("jwt-decode"));
@@ -38,6 +38,8 @@ var _common = require("@webex/common");
38
38
  var _internalPluginMetrics = require("@webex/internal-plugin-metrics");
39
39
  var _internalMediaCore = require("@webex/internal-media-core");
40
40
  var _mediaHelpers = require("@webex/media-helpers");
41
+ var _internalPluginVoicea = require("@webex/internal-plugin-voicea");
42
+ var _voiceaMeeting = require("./voicea-meeting");
41
43
  var _webexErrors = require("../common/errors/webex-errors");
42
44
  var _statsAnalyzer = require("../statsAnalyzer");
43
45
  var _networkQualityMonitor = _interopRequireDefault(require("../networkQualityMonitor"));
@@ -58,7 +60,6 @@ var _util2 = _interopRequireDefault(require("../meetings/util"));
58
60
  var _util3 = _interopRequireDefault(require("../recording-controller/util"));
59
61
  var _util4 = _interopRequireDefault(require("../controls-options-manager/util"));
60
62
  var _util5 = _interopRequireDefault(require("../media/util"));
61
- var _transcription = _interopRequireDefault(require("../transcription"));
62
63
  var _reactions = require("../reactions/reactions");
63
64
  var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
64
65
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
@@ -87,7 +88,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol
87
88
  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); }
88
89
  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; }
89
90
  function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
90
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
91
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty3.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
91
92
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
92
93
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @ts-ignore - Fix this
93
94
  // @ts-ignore - Types not available for @webex/common
@@ -383,126 +384,159 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
383
384
  * @private
384
385
  * @memberof Meeting
385
386
  */
386
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "attrs", void 0);
387
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "audio", void 0);
388
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "breakouts", void 0);
389
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "simultaneousInterpretation", void 0);
390
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "annotation", void 0);
391
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webinar", void 0);
392
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
393
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callStateForMetrics", void 0);
394
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destination", void 0);
395
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destinationType", void 0);
396
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deviceUrl", void 0);
397
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hostId", void 0);
398
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "id", void 0);
399
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isMultistream", void 0);
400
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusUrl", void 0);
401
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaConnections", void 0);
402
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaId", void 0);
403
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingFiniteStateMachine", void 0);
404
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfo", void 0);
405
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingRequest", void 0);
406
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "members", void 0);
407
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "options", void 0);
408
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "orgId", void 0);
409
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "owner", void 0);
410
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "partner", void 0);
411
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "policy", void 0);
412
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "reconnectionManager", void 0);
413
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resource", void 0);
414
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roap", void 0);
415
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roapSeq", void 0);
416
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selfUrl", void 0);
387
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "attrs", void 0);
388
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "audio", void 0);
389
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "breakouts", void 0);
390
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "simultaneousInterpretation", void 0);
391
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "annotation", void 0);
392
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "webinar", void 0);
393
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
394
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "callStateForMetrics", void 0);
395
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "destination", void 0);
396
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "destinationType", void 0);
397
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "deviceUrl", void 0);
398
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hostId", void 0);
399
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "id", void 0);
400
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "isMultistream", void 0);
401
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "locusUrl", void 0);
402
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaConnections", void 0);
403
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaId", void 0);
404
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingFiniteStateMachine", void 0);
405
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingInfo", void 0);
406
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingRequest", void 0);
407
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "members", void 0);
408
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "options", void 0);
409
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "orgId", void 0);
410
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "owner", void 0);
411
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "partner", void 0);
412
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "policy", void 0);
413
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "reconnectionManager", void 0);
414
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "resource", void 0);
415
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roap", void 0);
416
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapSeq", void 0);
417
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "selfUrl", void 0);
417
418
  // comes from Locus, initialized by updateMeetingObject()
418
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sipUri", void 0);
419
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
420
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "userId", void 0);
421
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "video", void 0);
422
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callEvents", void 0);
423
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "datachannelUrl", void 0);
424
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deferJoin", void 0);
425
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialInDeviceStatus", void 0);
426
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialInUrl", void 0);
427
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialOutDeviceStatus", void 0);
428
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialOutUrl", void 0);
429
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fetchMeetingInfoTimeoutId", void 0);
430
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "floorGrantPending", void 0);
431
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasJoinedOnce", void 0);
432
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasWebsocketConnected", void 0);
433
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "inMeetingActions", void 0);
434
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isLocalShareLive", void 0);
435
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isRoapInProgress", void 0);
436
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "keepAliveTimerId", void 0);
437
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastVideoLayoutInfo", void 0);
438
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusInfo", void 0);
439
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusMediaRequest", void 0);
440
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaProperties", void 0);
441
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaRequestManagers", void 0);
442
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoFailureReason", void 0);
443
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoFailureCode", void 0);
444
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoExtraParams", void 0);
445
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkQualityMonitor", void 0);
446
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkStatus", void 0);
447
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "passwordStatus", void 0);
448
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "queuedMediaUpdates", void 0);
449
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recording", void 0);
450
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "remoteMediaManager", void 0);
451
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recordingController", void 0);
452
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controlsOptionsManager", void 0);
453
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "requiredCaptcha", void 0);
454
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotManager", void 0);
455
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selfUserPolicies", void 0);
456
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "enforceVBGImagesURL", void 0);
457
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
458
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "screenShareFloorState", void 0);
459
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
460
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "transcription", void 0);
461
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveTranscription", void 0);
462
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMediaConnections", void 0);
463
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "userDisplayHints", void 0);
464
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endCallInitJoinReq", void 0);
465
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endJoinReqResp", void 0);
466
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endLocalSDPGenRemoteSDPRecvDelay", void 0);
467
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "joinedWith", void 0);
468
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusId", void 0);
469
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startCallInitJoinReq", void 0);
470
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startJoinReqResp", void 0);
471
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startLocalSDPGenRemoteSDPRecvDelay", void 0);
472
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wirelessShare", void 0);
473
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "guest", void 0);
474
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingJoinUrl", void 0);
475
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingNumber", void 0);
476
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingState", void 0);
477
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "permissionToken", void 0);
478
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "permissionTokenPayload", void 0);
479
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "permissionTokenReceivedLocalTime", void 0);
480
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resourceId", void 0);
481
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resourceUrl", void 0);
482
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selfId", void 0);
483
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", void 0);
484
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localAudioStreamMuteStateHandler", void 0);
485
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localVideoStreamMuteStateHandler", void 0);
486
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localOutputTrackChangeHandler", void 0);
487
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
488
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "environment", void 0);
489
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
490
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "allowMediaInLobby", void 0);
491
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "turnDiscoverySkippedReason", void 0);
492
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "turnServerUsed", void 0);
493
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "retriedWithTurnServer", void 0);
494
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sendSlotManager", new _sendSlotManager.default(_loggerProxy.default));
495
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deferSDPAnswer", void 0);
419
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "sipUri", void 0);
420
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
421
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "userId", void 0);
422
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "video", void 0);
423
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "callEvents", void 0);
424
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "datachannelUrl", void 0);
425
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "deferJoin", void 0);
426
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "dialInDeviceStatus", void 0);
427
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "dialInUrl", void 0);
428
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "dialOutDeviceStatus", void 0);
429
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "dialOutUrl", void 0);
430
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "fetchMeetingInfoTimeoutId", void 0);
431
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "floorGrantPending", void 0);
432
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hasJoinedOnce", void 0);
433
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hasWebsocketConnected", void 0);
434
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "inMeetingActions", void 0);
435
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "isLocalShareLive", void 0);
436
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "isRoapInProgress", void 0);
437
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "keepAliveTimerId", void 0);
438
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "lastVideoLayoutInfo", void 0);
439
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "locusInfo", void 0);
440
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "locusMediaRequest", void 0);
441
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaProperties", void 0);
442
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaRequestManagers", void 0);
443
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoFailureReason", void 0);
444
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoFailureCode", void 0);
445
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingInfoExtraParams", void 0);
446
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "networkQualityMonitor", void 0);
447
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "networkStatus", void 0);
448
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "passwordStatus", void 0);
449
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "queuedMediaUpdates", void 0);
450
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "recording", void 0);
451
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "remoteMediaManager", void 0);
452
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "recordingController", void 0);
453
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "controlsOptionsManager", void 0);
454
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "requiredCaptcha", void 0);
455
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotManager", void 0);
456
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "selfUserPolicies", void 0);
457
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "enforceVBGImagesURL", void 0);
458
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
459
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "screenShareFloorState", void 0);
460
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
461
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "transcription", void 0);
462
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "updateMediaConnections", void 0);
463
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "userDisplayHints", void 0);
464
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "endCallInitJoinReq", void 0);
465
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "endJoinReqResp", void 0);
466
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "endLocalSDPGenRemoteSDPRecvDelay", void 0);
467
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "joinedWith", void 0);
468
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "locusId", void 0);
469
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "startCallInitJoinReq", void 0);
470
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "startJoinReqResp", void 0);
471
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "startLocalSDPGenRemoteSDPRecvDelay", void 0);
472
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "wirelessShare", void 0);
473
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "guest", void 0);
474
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingJoinUrl", void 0);
475
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingNumber", void 0);
476
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "meetingState", void 0);
477
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "permissionToken", void 0);
478
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "permissionTokenPayload", void 0);
479
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "permissionTokenReceivedLocalTime", void 0);
480
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "resourceId", void 0);
481
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "resourceUrl", void 0);
482
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "selfId", void 0);
483
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "state", void 0);
484
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localAudioStreamMuteStateHandler", void 0);
485
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localVideoStreamMuteStateHandler", void 0);
486
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localOutputTrackChangeHandler", void 0);
487
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
488
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "environment", void 0);
489
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
490
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "allowMediaInLobby", void 0);
491
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localShareInstanceId", void 0);
492
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "remoteShareInstanceId", void 0);
493
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnDiscoverySkippedReason", void 0);
494
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnServerUsed", void 0);
495
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "areVoiceaEventsSetup", false);
496
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "voiceaListenerCallbacks", (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({}, _internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, function (payload) {
497
+ _this.transcription.languageOptions = payload;
498
+ _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
499
+ file: 'meeting/index',
500
+ function: 'setUpVoiceaListeners'
501
+ }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
502
+ }), _internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, function () {
503
+ _this.transcription.status = _internalPluginVoicea.TURN_ON_CAPTION_STATUS.ENABLED;
504
+ }), _internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, function (payload) {
505
+ var _data$text;
506
+ var data = payload.data;
507
+ _this.transcription.isListening = !!data.isListening;
508
+ _this.transcription.commandText = (_data$text = data.text) !== null && _data$text !== void 0 ? _data$text : '';
509
+ }), _internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, function (data) {
510
+ (0, _voiceaMeeting.processNewCaptions)({
511
+ data: data,
512
+ meeting: (0, _assertThisInitialized2.default)(_this)
513
+ });
514
+ _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
515
+ file: 'meeting/index',
516
+ function: 'setUpVoiceaListeners'
517
+ }, _constants.EVENT_TRIGGERS.MEETING_CAPTION_RECEIVED, {
518
+ captions: _this.transcription.captions,
519
+ interimCaptions: _this.transcription.interimCaptions
520
+ });
521
+ }), _internalPluginVoicea.EVENT_TRIGGERS.HIGHLIGHT_CREATED, function (data) {
522
+ (0, _voiceaMeeting.processHighlightCreated)({
523
+ data: data,
524
+ meeting: (0, _assertThisInitialized2.default)(_this)
525
+ });
526
+ }));
527
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "retriedWithTurnServer", void 0);
528
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "sendSlotManager", new _sendSlotManager.default(_loggerProxy.default));
529
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "deferSDPAnswer", void 0);
496
530
  // used for waiting for a response
497
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sdpResponseTimer", void 0);
498
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasMediaConnectionConnectedAtLeastOnce", void 0);
531
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "sdpResponseTimer", void 0);
532
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hasMediaConnectionConnectedAtLeastOnce", void 0);
499
533
  /**
500
534
  * Callback called when a relay event is received from meeting LLM Connection
501
535
  * @param {RelayEvent} e Event object coming from LLM Connection
502
536
  * @private
503
537
  * @returns {void}
504
538
  */
505
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "processRelayEvent", function (e) {
539
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "processRelayEvent", function (e) {
506
540
  switch (e.data.relayType) {
507
541
  case _constants3.REACTION_RELAY_TYPES.REACTION:
508
542
  if (
@@ -533,7 +567,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
533
567
  * @param {Error} error
534
568
  * @returns {void}
535
569
  */
536
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleRoapFailure", function (error) {
570
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleRoapFailure", function (error) {
537
571
  // eslint-disable-next-line @typescript-eslint/no-shadow
538
572
  var sendBehavioralMetric = function sendBehavioralMetric(metricName, error, correlationId) {
539
573
  var _error$cause;
@@ -599,7 +633,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
599
633
  * @param {RoapMessage} roapMessage roap message
600
634
  * @returns {undefined}
601
635
  */
602
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
636
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
603
637
  var mediaServer = _util2.default.getMediaServer(roapMessage.sdp);
604
638
  _this.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
605
639
  if (mediaServer) {
@@ -611,7 +645,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
611
645
  *
612
646
  * @returns {undefined}
613
647
  */
614
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setupSdpListeners", function () {
648
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupSdpListeners", function () {
615
649
  _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.REMOTE_SDP_ANSWER_PROCESSED, function () {
616
650
  // @ts-ignore
617
651
  var cdl = _this.webex.internal.newMetrics.callDiagnosticLatencies;
@@ -657,7 +691,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
657
691
  });
658
692
  });
659
693
  });
660
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setupMediaConnectionListeners", function () {
694
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupMediaConnectionListeners", function () {
661
695
  _this.setupSdpListeners();
662
696
  _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_STARTED, function () {
663
697
  _this.isRoapInProgress = true;
@@ -685,9 +719,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
685
719
  sdp: event.roapMessage.sdp,
686
720
  seq: event.roapMessage.seq,
687
721
  tieBreaker: event.roapMessage.tieBreaker,
688
- meeting: (0, _assertThisInitialized2.default)(_this),
689
- // or can pass meeting ID
690
- reconnect: _this.reconnectionManager.isReconnectInProgress()
722
+ meeting: (0, _assertThisInitialized2.default)(_this) // or can pass meeting ID
691
723
  }).then(function (_ref2) {
692
724
  var roapAnswer = _ref2.roapAnswer;
693
725
  if (roapAnswer) {
@@ -907,7 +939,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
907
939
  * @returns {void}
908
940
  * @memberof Meetings
909
941
  */
910
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setupStatsAnalyzerEventHandlers", function () {
942
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupStatsAnalyzerEventHandlers", function () {
911
943
  _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.MEDIA_QUALITY, function (options) {
912
944
  var _this$webex$meetings$;
913
945
  // TODO: might have to send the same event to the developer
@@ -937,7 +969,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
937
969
  _this.webex.internal.newMetrics.submitClientEvent({
938
970
  name: 'client.media.tx.start',
939
971
  payload: {
940
- mediaType: data.type
972
+ mediaType: data.type,
973
+ shareInstanceId: data.type === 'share' ? _this.localShareInstanceId : undefined
941
974
  },
942
975
  options: {
943
976
  meetingId: _this.id
@@ -949,7 +982,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
949
982
  _this.webex.internal.newMetrics.submitClientEvent({
950
983
  name: 'client.media.tx.stop',
951
984
  payload: {
952
- mediaType: data.type
985
+ mediaType: data.type,
986
+ shareInstanceId: data.type === 'share' ? _this.localShareInstanceId : undefined
953
987
  },
954
988
  options: {
955
989
  meetingId: _this.id
@@ -965,7 +999,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
965
999
  _this.webex.internal.newMetrics.submitClientEvent({
966
1000
  name: 'client.media.rx.start',
967
1001
  payload: {
968
- mediaType: data.type
1002
+ mediaType: data.type,
1003
+ shareInstanceId: data.type === 'share' ? _this.remoteShareInstanceId : undefined
969
1004
  },
970
1005
  options: {
971
1006
  meetingId: _this.id
@@ -977,7 +1012,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
977
1012
  _this.webex.internal.newMetrics.submitClientEvent({
978
1013
  name: 'client.media.rx.stop',
979
1014
  payload: {
980
- mediaType: data.type
1015
+ mediaType: data.type,
1016
+ shareInstanceId: data.type === 'share' ? _this.remoteShareInstanceId : undefined
981
1017
  },
982
1018
  options: {
983
1019
  meetingId: _this.id
@@ -991,7 +1027,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
991
1027
  * @param {String} callFrom - the function calling this function, optional.
992
1028
  * @returns {Promise<void>}
993
1029
  */
994
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "forceSendStatsReport", /*#__PURE__*/function () {
1030
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "forceSendStatsReport", /*#__PURE__*/function () {
995
1031
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
996
1032
  var callFrom, LOG_HEADER, _this$mediaProperties, _this$mediaProperties2;
997
1033
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -1026,7 +1062,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1026
1062
  * @private
1027
1063
  * @memberof Meeting
1028
1064
  */
1029
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaNegotiatedEvent", function () {
1065
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaNegotiatedEvent", function () {
1030
1066
  // @ts-ignore - config coming from registerPlugin
1031
1067
  if (_this.config.experimental.enableMediaNegotiatedEvent) {
1032
1068
  _loggerProxy.default.logger.info('Meeting:mediaNegotiatedEvent --> Media server negotiated');
@@ -1043,7 +1079,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1043
1079
  * @public
1044
1080
  * @memberof Meeting
1045
1081
  */
1046
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "processNextQueuedMediaUpdate", function () {
1082
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "processNextQueuedMediaUpdate", function () {
1047
1083
  if (_this.canUpdateMedia() && _this.queuedMediaUpdates.length > 0) {
1048
1084
  var _this$queuedMediaUpda = _this.queuedMediaUpdates.shift(),
1049
1085
  pendingPromiseResolve = _this$queuedMediaUpda.pendingPromiseResolve,
@@ -1077,7 +1113,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1077
1113
  * @memberof Meeting
1078
1114
  * @returns {undefined}
1079
1115
  */
1080
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleShareAudioStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
1116
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleShareAudioStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
1081
1117
  return _regenerator.default.wrap(function _callee2$(_context2) {
1082
1118
  while (1) switch (_context2.prev = _context2.next) {
1083
1119
  case 0:
@@ -1114,7 +1150,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1114
1150
  * @param {boolean} muted
1115
1151
  * @returns {undefined}
1116
1152
  */
1117
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamMuteStateChange", function (muted) {
1153
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamMuteStateChange", function (muted) {
1118
1154
  _loggerProxy.default.logger.log("Meeting:index#handleShareVideoStreamMuteStateChange --> Share video stream mute state changed to muted ".concat(muted));
1119
1155
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE, {
1120
1156
  correlationId: _this.correlationId,
@@ -1127,7 +1163,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1127
1163
  * @memberof Meeting
1128
1164
  * @returns {undefined}
1129
1165
  */
1130
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
1166
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
1131
1167
  return _regenerator.default.wrap(function _callee3$(_context3) {
1132
1168
  while (1) switch (_context3.prev = _context3.next) {
1133
1169
  case 0:
@@ -1165,7 +1201,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1165
1201
  * @returns {undefined}
1166
1202
  * @memberof Meeting
1167
1203
  */
1168
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "triggerStoppedSharing", function () {
1204
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "triggerStoppedSharing", function () {
1169
1205
  if (!_this.mediaProperties.hasLocalShareStream()) {
1170
1206
  _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
1171
1207
  file: 'meeting/index',
@@ -1181,7 +1217,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1181
1217
  * @public
1182
1218
  * @memberof Meeting
1183
1219
  */
1184
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearMeetingData", function () {
1220
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "clearMeetingData", function () {
1185
1221
  _this.audio = null;
1186
1222
  _this.video = null;
1187
1223
  _this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -1190,8 +1226,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1190
1226
  }
1191
1227
  _this.queuedMediaUpdates = [];
1192
1228
  if (_this.transcription) {
1193
- _this.transcription.closeSocket();
1194
- _this.triggerStopReceivingTranscriptionEvent();
1229
+ _this.stopTranscription();
1195
1230
  _this.transcription = undefined;
1196
1231
  }
1197
1232
  });
@@ -1201,7 +1236,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1201
1236
  * @private
1202
1237
  * @memberof Meeting
1203
1238
  */
1204
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startKeepAlive", function () {
1239
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "startKeepAlive", function () {
1205
1240
  var _this$joinedWith, _this$joinedWith2;
1206
1241
  if (_this.keepAliveTimerId) {
1207
1242
  _loggerProxy.default.logger.warn('Meeting:index#startKeepAlive --> keepAlive not started: keepAliveTimerId already exists');
@@ -1237,7 +1272,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1237
1272
  * @private
1238
1273
  * @memberof Meeting
1239
1274
  */
1240
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "stopKeepAlive", function () {
1275
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "stopKeepAlive", function () {
1241
1276
  if (!_this.keepAliveTimerId) {
1242
1277
  return;
1243
1278
  }
@@ -1796,7 +1831,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1796
1831
  * @private
1797
1832
  * @memberof Meeting
1798
1833
  */
1799
- _this.transcription = undefined;
1834
+ _this.transcription = {
1835
+ captions: [],
1836
+ highlights: [],
1837
+ isListening: false,
1838
+ commandText: '',
1839
+ languageOptions: {},
1840
+ showCaptionBox: false,
1841
+ transcribingRequestStatus: 'INACTIVE',
1842
+ isCaptioning: false,
1843
+ interimCaptions: {},
1844
+ speakerProxy: {}
1845
+ };
1800
1846
 
1801
1847
  /**
1802
1848
  * Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
@@ -1850,6 +1896,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1850
1896
  */
1851
1897
  _this.keepAliveTimerId = null;
1852
1898
 
1899
+ /**
1900
+ * id for tracking Local Share instances in Call Analyzer
1901
+ * @instance
1902
+ * @type {String}
1903
+ * @private
1904
+ * @memberof Meeting
1905
+ */
1906
+ _this.localShareInstanceId = null;
1907
+
1908
+ /**
1909
+ * id for tracking Remote Share instances in Call Analyzer
1910
+ * @instance
1911
+ * @type {String}
1912
+ * @private
1913
+ * @memberof Meeting
1914
+ */
1915
+ _this.remoteShareInstanceId = null;
1916
+
1853
1917
  /**
1854
1918
  * The class that helps to control recording functions: start, stop, pause, resume, etc
1855
1919
  * @instance
@@ -2011,6 +2075,99 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2011
2075
  this.callStateForMetrics.correlationId = correlationId;
2012
2076
  }
2013
2077
 
2078
+ /**
2079
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
2080
+ * @param {any} info
2081
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
2082
+ * @returns {void}
2083
+ */
2084
+ }, {
2085
+ key: "setMeetingInfo",
2086
+ value: function setMeetingInfo(info, meetingLookupUrl) {
2087
+ this.meetingInfo = info ? _objectSpread(_objectSpread({}, info), {}, {
2088
+ meetingLookupUrl: meetingLookupUrl
2089
+ }) : null;
2090
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
2091
+ this.requiredCaptcha = null;
2092
+ if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
2093
+ this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
2094
+ } else {
2095
+ this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
2096
+ }
2097
+ _triggerProxy.default.trigger(this, {
2098
+ file: 'meetings',
2099
+ function: 'fetchMeetingInfo'
2100
+ }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
2101
+ this.updateMeetingActions();
2102
+ }
2103
+
2104
+ /**
2105
+ * Add pre-fetched meeting info
2106
+ *
2107
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
2108
+ *
2109
+ * @param {Object} meetingInfo - Complete meeting info
2110
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
2111
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
2112
+ * @returns {Promise<void>}
2113
+ */
2114
+ }, {
2115
+ key: "injectMeetingInfo",
2116
+ value: (function () {
2117
+ var _injectMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(meetingInfo, fetchParams, meetingLookupUrl) {
2118
+ return _regenerator.default.wrap(function _callee4$(_context4) {
2119
+ while (1) switch (_context4.prev = _context4.next) {
2120
+ case 0:
2121
+ _context4.next = 2;
2122
+ return this.prepForFetchMeetingInfo(fetchParams, 'injectMeetingInfo');
2123
+ case 2:
2124
+ this.parseMeetingInfo(meetingInfo, this.destination);
2125
+ this.setMeetingInfo(meetingInfo, meetingLookupUrl);
2126
+ case 4:
2127
+ case "end":
2128
+ return _context4.stop();
2129
+ }
2130
+ }, _callee4, this);
2131
+ }));
2132
+ function injectMeetingInfo(_x2, _x3, _x4) {
2133
+ return _injectMeetingInfo.apply(this, arguments);
2134
+ }
2135
+ return injectMeetingInfo;
2136
+ }()
2137
+ /**
2138
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
2139
+ *
2140
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
2141
+ * @param {String} caller - Name of the caller for logging
2142
+ *
2143
+ * @returns {Promise<void>}
2144
+ * @private
2145
+ */
2146
+ )
2147
+ }, {
2148
+ key: "prepForFetchMeetingInfo",
2149
+ value: function prepForFetchMeetingInfo(_ref7, caller) {
2150
+ var _ref7$password = _ref7.password,
2151
+ password = _ref7$password === void 0 ? null : _ref7$password,
2152
+ _ref7$captchaCode = _ref7.captchaCode,
2153
+ captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode,
2154
+ _ref7$extraParams = _ref7.extraParams,
2155
+ extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams;
2156
+ // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2157
+ if (this.fetchMeetingInfoTimeoutId) {
2158
+ clearTimeout(this.fetchMeetingInfoTimeoutId);
2159
+ this.fetchMeetingInfoTimeoutId = undefined;
2160
+ }
2161
+ if (captchaCode && !this.requiredCaptcha) {
2162
+ return _promise.default.reject(new Error("".concat(caller, "() called with captchaCode when captcha was not required")));
2163
+ }
2164
+ if (password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN) {
2165
+ return _promise.default.reject(new Error("".concat(caller, "() called with password when password was not required")));
2166
+ }
2167
+ this.meetingInfoExtraParams = (0, _lodash.cloneDeep)(extraParams);
2168
+ return _promise.default.resolve();
2169
+ }
2170
+
2014
2171
  /**
2015
2172
  * Internal method for fetching meeting info
2016
2173
  *
@@ -2019,18 +2176,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2019
2176
  }, {
2020
2177
  key: "fetchMeetingInfoInternal",
2021
2178
  value: (function () {
2022
- var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref7) {
2023
- var destination, destinationType, _ref7$password, password, _ref7$captchaCode, captchaCode, _ref7$extraParams, extraParams, _ref7$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
2024
- return _regenerator.default.wrap(function _callee4$(_context4) {
2025
- while (1) switch (_context4.prev = _context4.next) {
2179
+ var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
2180
+ var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
2181
+ return _regenerator.default.wrap(function _callee5$(_context5) {
2182
+ while (1) switch (_context5.prev = _context5.next) {
2026
2183
  case 0:
2027
- destination = _ref7.destination, destinationType = _ref7.destinationType, _ref7$password = _ref7.password, password = _ref7$password === void 0 ? null : _ref7$password, _ref7$captchaCode = _ref7.captchaCode, captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode, _ref7$extraParams = _ref7.extraParams, extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams, _ref7$sendCAevents = _ref7.sendCAevents, sendCAevents = _ref7$sendCAevents === void 0 ? false : _ref7$sendCAevents;
2028
- _context4.prev = 1;
2184
+ destination = _ref8.destination, destinationType = _ref8.destinationType, _ref8$password = _ref8.password, password = _ref8$password === void 0 ? null : _ref8$password, _ref8$captchaCode = _ref8.captchaCode, captchaCode = _ref8$captchaCode === void 0 ? null : _ref8$captchaCode, _ref8$extraParams = _ref8.extraParams, extraParams = _ref8$extraParams === void 0 ? {} : _ref8$extraParams, _ref8$sendCAevents = _ref8.sendCAevents, sendCAevents = _ref8$sendCAevents === void 0 ? false : _ref8$sendCAevents;
2185
+ _context5.prev = 1;
2029
2186
  captchaInfo = captchaCode ? {
2030
2187
  code: captchaCode,
2031
2188
  id: this.requiredCaptcha.captchaId
2032
2189
  } : null;
2033
- _context4.next = 5;
2190
+ _context5.next = 5;
2034
2191
  return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, destinationType, password, captchaInfo,
2035
2192
  // @ts-ignore - config coming from registerPlugin
2036
2193
  this.config.installedOrgID, this.locusId, extraParams, {
@@ -2038,86 +2195,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2038
2195
  sendCAevents: sendCAevents
2039
2196
  });
2040
2197
  case 5:
2041
- info = _context4.sent;
2042
- this.parseMeetingInfo(info, this.destination);
2043
- this.meetingInfo = info ? _objectSpread(_objectSpread({}, info.body), {}, {
2044
- meetingLookupUrl: info === null || info === void 0 ? void 0 : info.url
2045
- }) : null;
2046
- this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
2047
- this.requiredCaptcha = null;
2048
- if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
2049
- this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
2050
- } else {
2051
- this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
2052
- }
2053
- _triggerProxy.default.trigger(this, {
2054
- file: 'meetings',
2055
- function: 'fetchMeetingInfo'
2056
- }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
2057
- this.updateMeetingActions();
2058
- return _context4.abrupt("return", _promise.default.resolve());
2059
- case 16:
2060
- _context4.prev = 16;
2061
- _context4.t0 = _context4["catch"](1);
2198
+ info = _context5.sent;
2199
+ this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
2200
+ this.setMeetingInfo(info === null || info === void 0 ? void 0 : info.body, info === null || info === void 0 ? void 0 : info.url);
2201
+ return _context5.abrupt("return", _promise.default.resolve());
2202
+ case 11:
2203
+ _context5.prev = 11;
2204
+ _context5.t0 = _context5["catch"](1);
2062
2205
  this.updateMeetingActions();
2063
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2064
- _context4.next = 26;
2206
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2207
+ _context5.next = 21;
2065
2208
  break;
2066
2209
  }
2067
2210
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
2068
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2069
- if (_context4.t0.meetingInfo) {
2070
- this.meetingInfo = _context4.t0.meetingInfo;
2211
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2212
+ if (_context5.t0.meetingInfo) {
2213
+ this.meetingInfo = _context5.t0.meetingInfo;
2071
2214
  }
2072
2215
  throw new _permission.default();
2073
- case 26:
2074
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2075
- _context4.next = 38;
2216
+ case 21:
2217
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2218
+ _context5.next = 33;
2076
2219
  break;
2077
2220
  }
2078
2221
  _loggerProxy.default.logger.info( // @ts-ignore
2079
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_err$body = _context4.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2222
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context5.t0 === null || _context5.t0 === void 0 ? void 0 : (_err$body = _context5.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2080
2223
 
2081
2224
  // when wbxappapi requires password it still populates partial meeting info in the response
2082
- if (_context4.t0.meetingInfo) {
2083
- this.meetingInfo = _context4.t0.meetingInfo;
2084
- this.meetingNumber = _context4.t0.meetingInfo.meetingNumber;
2225
+ if (_context5.t0.meetingInfo) {
2226
+ this.meetingInfo = _context5.t0.meetingInfo;
2227
+ this.meetingNumber = _context5.t0.meetingInfo.meetingNumber;
2085
2228
  }
2086
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2229
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2087
2230
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2088
2231
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2089
2232
  if (!this.requiredCaptcha) {
2090
- _context4.next = 35;
2233
+ _context5.next = 30;
2091
2234
  break;
2092
2235
  }
2093
- _context4.next = 35;
2236
+ _context5.next = 30;
2094
2237
  return this.refreshCaptcha();
2095
- case 35:
2238
+ case 30:
2096
2239
  throw new _passwordError.default();
2097
- case 38:
2098
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2099
- _context4.next = 47;
2240
+ case 33:
2241
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2242
+ _context5.next = 42;
2100
2243
  break;
2101
2244
  }
2102
2245
  _loggerProxy.default.logger.info( // @ts-ignore
2103
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_err$body2 = _context4.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2246
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context5.t0 === null || _context5.t0 === void 0 ? void 0 : (_err$body2 = _context5.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2104
2247
  this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2105
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2106
- if (_context4.t0.isPasswordRequired) {
2248
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2249
+ if (_context5.t0.isPasswordRequired) {
2107
2250
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2108
2251
  }
2109
- this.requiredCaptcha = _context4.t0.captchaInfo;
2252
+ this.requiredCaptcha = _context5.t0.captchaInfo;
2110
2253
  throw new _captchaError.default();
2111
- case 47:
2254
+ case 42:
2112
2255
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
2113
- throw _context4.t0;
2114
- case 49:
2256
+ throw _context5.t0;
2257
+ case 44:
2115
2258
  case "end":
2116
- return _context4.stop();
2259
+ return _context5.stop();
2117
2260
  }
2118
- }, _callee4, this, [[1, 16]]);
2261
+ }, _callee5, this, [[1, 11]]);
2119
2262
  }));
2120
- function fetchMeetingInfoInternal(_x2) {
2263
+ function fetchMeetingInfoInternal(_x5) {
2121
2264
  return _fetchMeetingInfoInternal.apply(this, arguments);
2122
2265
  }
2123
2266
  return fetchMeetingInfoInternal;
@@ -2132,18 +2275,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2132
2275
  }, {
2133
2276
  key: "refreshPermissionToken",
2134
2277
  value: (function () {
2135
- var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(reason) {
2278
+ var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(reason) {
2136
2279
  var _this$meetingInfo;
2137
2280
  var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime;
2138
- return _regenerator.default.wrap(function _callee5$(_context5) {
2139
- while (1) switch (_context5.prev = _context5.next) {
2281
+ return _regenerator.default.wrap(function _callee6$(_context6) {
2282
+ while (1) switch (_context6.prev = _context6.next) {
2140
2283
  case 0:
2141
2284
  if ((_this$meetingInfo = this.meetingInfo) !== null && _this$meetingInfo !== void 0 && _this$meetingInfo.permissionToken) {
2142
- _context5.next = 3;
2285
+ _context6.next = 3;
2143
2286
  break;
2144
2287
  }
2145
2288
  _loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> cannot refresh the permission token, because we don't have it (reason=".concat(reason, ")"));
2146
- return _context5.abrupt("return");
2289
+ return _context6.abrupt("return");
2147
2290
  case 3:
2148
2291
  isStartingSpaceInstantV2Meeting = this.destinationType === _constants._CONVERSATION_URL_ &&
2149
2292
  // @ts-ignore - config coming from registerPlugin
@@ -2165,8 +2308,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2165
2308
  reason: reason,
2166
2309
  destinationType: destinationType
2167
2310
  });
2168
- _context5.prev = 12;
2169
- _context5.next = 15;
2311
+ _context6.prev = 12;
2312
+ _context6.next = 15;
2170
2313
  return this.fetchMeetingInfoInternal({
2171
2314
  destination: destination,
2172
2315
  destinationType: destinationType,
@@ -2176,25 +2319,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2176
2319
  sendCAevents: true // because if we're refreshing the permissionToken, it means that user is intending to join that meeting, so we want CA events
2177
2320
  });
2178
2321
  case 15:
2179
- _context5.next = 22;
2322
+ _context6.next = 22;
2180
2323
  break;
2181
2324
  case 17:
2182
- _context5.prev = 17;
2183
- _context5.t0 = _context5["catch"](12);
2184
- _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context5.t0);
2325
+ _context6.prev = 17;
2326
+ _context6.t0 = _context6["catch"](12);
2327
+ _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context6.t0);
2185
2328
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH_ERROR, {
2186
2329
  correlationId: this.correlationId,
2187
- reason: _context5.t0.message,
2188
- stack: _context5.t0.stack
2330
+ reason: _context6.t0.message,
2331
+ stack: _context6.t0.stack
2189
2332
  });
2190
- throw _context5.t0;
2333
+ throw _context6.t0;
2191
2334
  case 22:
2192
2335
  case "end":
2193
- return _context5.stop();
2336
+ return _context6.stop();
2194
2337
  }
2195
- }, _callee5, this, [[12, 17]]);
2338
+ }, _callee6, this, [[12, 17]]);
2196
2339
  }));
2197
- function refreshPermissionToken(_x3) {
2340
+ function refreshPermissionToken(_x6) {
2198
2341
  return _refreshPermissionToken.apply(this, arguments);
2199
2342
  }
2200
2343
  return refreshPermissionToken;
@@ -2213,45 +2356,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2213
2356
  }, {
2214
2357
  key: "fetchMeetingInfo",
2215
2358
  value: (function () {
2216
- var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref8) {
2217
- var _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents;
2218
- return _regenerator.default.wrap(function _callee6$(_context6) {
2219
- while (1) switch (_context6.prev = _context6.next) {
2359
+ var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
2360
+ return _regenerator.default.wrap(function _callee7$(_context7) {
2361
+ while (1) switch (_context7.prev = _context7.next) {
2220
2362
  case 0:
2221
- _ref8$password = _ref8.password, password = _ref8$password === void 0 ? null : _ref8$password, _ref8$captchaCode = _ref8.captchaCode, captchaCode = _ref8$captchaCode === void 0 ? null : _ref8$captchaCode, _ref8$extraParams = _ref8.extraParams, extraParams = _ref8$extraParams === void 0 ? {} : _ref8$extraParams, _ref8$sendCAevents = _ref8.sendCAevents, sendCAevents = _ref8$sendCAevents === void 0 ? false : _ref8$sendCAevents;
2222
- // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2223
- if (this.fetchMeetingInfoTimeoutId) {
2224
- clearTimeout(this.fetchMeetingInfoTimeoutId);
2225
- this.fetchMeetingInfoTimeoutId = undefined;
2226
- }
2227
- if (!(captchaCode && !this.requiredCaptcha)) {
2228
- _context6.next = 4;
2229
- break;
2230
- }
2231
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required')));
2232
- case 4:
2233
- if (!(password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN)) {
2234
- _context6.next = 6;
2235
- break;
2236
- }
2237
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with password when password was not required')));
2238
- case 6:
2239
- this.meetingInfoExtraParams = (0, _lodash.cloneDeep)(extraParams);
2240
- return _context6.abrupt("return", this.fetchMeetingInfoInternal({
2363
+ _context7.next = 2;
2364
+ return this.prepForFetchMeetingInfo(options, 'fetchMeetingInfo');
2365
+ case 2:
2366
+ return _context7.abrupt("return", this.fetchMeetingInfoInternal(_objectSpread({
2241
2367
  destination: this.destination,
2242
- destinationType: this.destinationType,
2243
- password: password,
2244
- captchaCode: captchaCode,
2245
- extraParams: extraParams,
2246
- sendCAevents: sendCAevents
2247
- }));
2248
- case 8:
2368
+ destinationType: this.destinationType
2369
+ }, options)));
2370
+ case 3:
2249
2371
  case "end":
2250
- return _context6.stop();
2372
+ return _context7.stop();
2251
2373
  }
2252
- }, _callee6, this);
2374
+ }, _callee7, this);
2253
2375
  }));
2254
- function fetchMeetingInfo(_x4) {
2376
+ function fetchMeetingInfo(_x7) {
2255
2377
  return _fetchMeetingInfo.apply(this, arguments);
2256
2378
  }
2257
2379
  return fetchMeetingInfo;
@@ -2443,12 +2565,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2443
2565
  key: "setUpInterpretationListener",
2444
2566
  value: function setUpInterpretationListener() {
2445
2567
  var _this5 = this;
2568
+ // TODO: check if its getting used or not
2446
2569
  this.simultaneousInterpretation.on(_constants.INTERPRETATION.EVENTS.SUPPORT_LANGUAGES_UPDATE, function () {
2447
2570
  _triggerProxy.default.trigger(_this5, {
2448
2571
  file: 'meeting/index',
2449
2572
  function: 'setUpInterpretationListener'
2450
2573
  }, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_SUPPORT_LANGUAGES_UPDATE);
2451
2574
  });
2575
+ // TODO: check if its getting used or not
2452
2576
  this.simultaneousInterpretation.on(_constants.INTERPRETATION.EVENTS.HANDOFF_REQUESTS_ARRIVED, function (payload) {
2453
2577
  _triggerProxy.default.trigger(_this5, {
2454
2578
  file: 'meeting/index',
@@ -2457,6 +2581,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2457
2581
  });
2458
2582
  }
2459
2583
 
2584
+ /**
2585
+ * Set up the listeners for captions
2586
+ * @returns {undefined}
2587
+ * @private
2588
+ * @memberof Meeting
2589
+ */
2590
+ }, {
2591
+ key: "setUpVoiceaListeners",
2592
+ value: function setUpVoiceaListeners() {
2593
+ // @ts-ignore
2594
+ this.webex.internal.voicea.listenToEvents();
2595
+
2596
+ // @ts-ignore
2597
+ this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
2598
+
2599
+ // @ts-ignore
2600
+ this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
2601
+
2602
+ // @ts-ignore
2603
+ this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
2604
+
2605
+ // @ts-ignore
2606
+ this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
2607
+
2608
+ // @ts-ignore
2609
+ this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.HIGHLIGHT_CREATED, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.HIGHLIGHT_CREATED]);
2610
+ this.areVoiceaEventsSetup = true;
2611
+ }
2612
+
2460
2613
  /**
2461
2614
  * Set up the locus info listener for meetings disconnected due to inactivity
2462
2615
  * @returns {undefined}
@@ -2745,17 +2898,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2745
2898
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED, function (_ref11) {
2746
2899
  var caption = _ref11.caption,
2747
2900
  transcribing = _ref11.transcribing;
2748
- // @ts-ignore - config coming from registerPlugin
2749
- if (transcribing && !_this13.transcription && _this13.config.receiveTranscription) {
2750
- _this13.startTranscription();
2751
- } else if (!transcribing && _this13.transcription) {
2752
- _triggerProxy.default.trigger(_this13, {
2753
- file: 'meeting/index',
2754
- function: 'setupLocusControlsListener'
2755
- }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
2756
- caption: caption,
2757
- transcribing: transcribing
2758
- });
2901
+ // user need to be joined to start the llm and receive transcription
2902
+ if (_this13.isJoined()) {
2903
+ // @ts-ignore - config coming from registerPlugin
2904
+ if (transcribing && !_this13.transcription) {
2905
+ _this13.startTranscription();
2906
+ } else if (!transcribing && _this13.transcription) {
2907
+ _triggerProxy.default.trigger(_this13, {
2908
+ file: 'meeting/index',
2909
+ function: 'setupLocusControlsListener'
2910
+ }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
2911
+ caption: caption,
2912
+ transcribing: transcribing
2913
+ });
2914
+ }
2759
2915
  }
2760
2916
  });
2761
2917
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref12) {
@@ -2774,18 +2930,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2774
2930
  function: 'setupLocusControlsListener'
2775
2931
  }, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
2776
2932
  });
2777
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN, function (_ref14) {
2778
- var mainLocusUrl = _ref14.mainLocusUrl;
2779
- _this13.meetingRequest.getLocusStatusByUrl(mainLocusUrl).catch(function (error) {
2780
- // clear main session cache when attendee join into breakout and forbidden to get locus from main locus url,
2781
- // which means main session is not active for the attendee
2782
- if ((error === null || error === void 0 ? void 0 : error.statusCode) === 403) {
2783
- _this13.locusInfo.clearMainSessionLocusCache();
2784
- }
2785
- });
2786
- });
2787
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref15) {
2788
- var entryExitTone = _ref15.entryExitTone;
2933
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref14) {
2934
+ var entryExitTone = _ref14.entryExitTone;
2789
2935
  _triggerProxy.default.trigger(_this13, {
2790
2936
  file: 'meeting/index',
2791
2937
  function: 'setupLocusControlsListener'
@@ -2793,8 +2939,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2793
2939
  entryExitTone: entryExitTone
2794
2940
  });
2795
2941
  });
2796
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref16) {
2797
- var state = _ref16.state;
2942
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref15) {
2943
+ var state = _ref15.state;
2798
2944
  _triggerProxy.default.trigger(_this13, {
2799
2945
  file: 'meeting/index',
2800
2946
  function: 'setupLocusControlsListener'
@@ -2802,8 +2948,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2802
2948
  state: state
2803
2949
  });
2804
2950
  });
2805
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref17) {
2806
- var state = _ref17.state;
2951
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref16) {
2952
+ var state = _ref16.state;
2807
2953
  _triggerProxy.default.trigger(_this13, {
2808
2954
  file: 'meeting/index',
2809
2955
  function: 'setupLocusControlsListener'
@@ -2811,8 +2957,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2811
2957
  state: state
2812
2958
  });
2813
2959
  });
2814
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref18) {
2815
- var state = _ref18.state;
2960
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref17) {
2961
+ var state = _ref17.state;
2816
2962
  _triggerProxy.default.trigger(_this13, {
2817
2963
  file: 'meeting/index',
2818
2964
  function: 'setupLocusControlsListener'
@@ -2820,8 +2966,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2820
2966
  state: state
2821
2967
  });
2822
2968
  });
2823
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref19) {
2824
- var state = _ref19.state;
2969
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref18) {
2970
+ var state = _ref18.state;
2825
2971
  _triggerProxy.default.trigger(_this13, {
2826
2972
  file: 'meeting/index',
2827
2973
  function: 'setupLocusControlsListener'
@@ -2829,8 +2975,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2829
2975
  state: state
2830
2976
  });
2831
2977
  });
2832
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref20) {
2833
- var state = _ref20.state;
2978
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref19) {
2979
+ var state = _ref19.state;
2834
2980
  _triggerProxy.default.trigger(_this13, {
2835
2981
  file: 'meeting/index',
2836
2982
  function: 'setupLocusControlsListener'
@@ -2838,8 +2984,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2838
2984
  state: state
2839
2985
  });
2840
2986
  });
2841
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref21) {
2842
- var state = _ref21.state;
2987
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref20) {
2988
+ var state = _ref20.state;
2843
2989
  _triggerProxy.default.trigger(_this13, {
2844
2990
  file: 'meeting/index',
2845
2991
  function: 'setupLocusControlsListener'
@@ -2847,8 +2993,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2847
2993
  state: state
2848
2994
  });
2849
2995
  });
2850
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref22) {
2851
- var state = _ref22.state;
2996
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref21) {
2997
+ var state = _ref21.state;
2852
2998
  _triggerProxy.default.trigger(_this13, {
2853
2999
  file: 'meeting/index',
2854
3000
  function: 'setupLocusControlsListener'
@@ -2894,21 +3040,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2894
3040
  var _this14 = this;
2895
3041
  // Will get triggered on local and remote share
2896
3042
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
2897
- var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(payload) {
3043
+ var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
2898
3044
  var _payload$previous, _payload$previous2;
2899
3045
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, oldShareStatus, sendStartedSharingRemote, _this14$mediaProperti;
2900
- return _regenerator.default.wrap(function _callee7$(_context7) {
2901
- while (1) switch (_context7.prev = _context7.next) {
3046
+ return _regenerator.default.wrap(function _callee8$(_context8) {
3047
+ while (1) switch (_context8.prev = _context8.next) {
2902
3048
  case 0:
2903
3049
  _payload$current = payload.current, contentShare = _payload$current.content, whiteboardShare = _payload$current.whiteboard;
2904
3050
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
2905
3051
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
2906
3052
  _this14.triggerAnnotationInfoEvent(contentShare, previousContentShare);
2907
3053
  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))) {
2908
- _context7.next = 6;
3054
+ _context8.next = 6;
2909
3055
  break;
2910
3056
  }
2911
- return _context7.abrupt("return");
3057
+ return _context8.abrupt("return");
2912
3058
  case 6:
2913
3059
  newShareStatus = _this14.shareStatus; // REMOTE - check if remote started sharing
2914
3060
  if (_this14.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
@@ -2937,22 +3083,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2937
3083
  newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
2938
3084
  }
2939
3085
  if (!(newShareStatus !== _this14.shareStatus)) {
2940
- _context7.next = 45;
3086
+ _context8.next = 45;
2941
3087
  break;
2942
3088
  }
2943
3089
  oldShareStatus = _this14.shareStatus; // update our state before we send out any notifications
2944
3090
  _this14.shareStatus = newShareStatus;
2945
3091
 
2946
3092
  // send out "stop" notifications for the old state
2947
- _context7.t0 = oldShareStatus;
2948
- _context7.next = _context7.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 14 : _context7.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 16 : _context7.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 18 : _context7.t0 === _constants.SHARE_STATUS.NO_SHARE ? 20 : 21;
3093
+ _context8.t0 = oldShareStatus;
3094
+ _context8.next = _context8.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 14 : _context8.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 16 : _context8.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 18 : _context8.t0 === _constants.SHARE_STATUS.NO_SHARE ? 20 : 21;
2949
3095
  break;
2950
3096
  case 14:
2951
3097
  _triggerProxy.default.trigger(_this14, {
2952
3098
  file: 'meetings/index',
2953
3099
  function: 'remoteShare'
2954
3100
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
2955
- return _context7.abrupt("break", 22);
3101
+ return _context8.abrupt("break", 22);
2956
3102
  case 16:
2957
3103
  _triggerProxy.default.trigger(_this14, {
2958
3104
  file: 'meeting/index',
@@ -2960,46 +3106,47 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2960
3106
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
2961
3107
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
2962
3108
  });
2963
- return _context7.abrupt("break", 22);
3109
+ return _context8.abrupt("break", 22);
2964
3110
  case 18:
2965
3111
  _triggerProxy.default.trigger(_this14, {
2966
3112
  file: 'meeting/index',
2967
3113
  function: 'stopWhiteboardShare'
2968
3114
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
2969
- return _context7.abrupt("break", 22);
3115
+ return _context8.abrupt("break", 22);
2970
3116
  case 20:
2971
- return _context7.abrupt("break", 22);
3117
+ return _context8.abrupt("break", 22);
2972
3118
  case 21:
2973
- return _context7.abrupt("break", 22);
3119
+ return _context8.abrupt("break", 22);
2974
3120
  case 22:
2975
- _context7.t1 = newShareStatus;
2976
- _context7.next = _context7.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 25 : _context7.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 34 : _context7.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 37 : _context7.t1 === _constants.SHARE_STATUS.NO_SHARE ? 40 : 41;
3121
+ _context8.t1 = newShareStatus;
3122
+ _context8.next = _context8.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 25 : _context8.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 34 : _context8.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 37 : _context8.t1 === _constants.SHARE_STATUS.NO_SHARE ? 40 : 41;
2977
3123
  break;
2978
3124
  case 25:
2979
3125
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3126
+ _this14.remoteShareInstanceId = contentShare.shareInstanceId;
2980
3127
  _triggerProxy.default.trigger(_this14, {
2981
3128
  file: 'meetings/index',
2982
3129
  function: 'remoteShare'
2983
3130
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
2984
3131
  memberId: contentShare.beneficiaryId,
2985
3132
  url: contentShare.url,
2986
- shareInstanceId: contentShare.shareInstanceId,
3133
+ shareInstanceId: _this14.remoteShareInstanceId,
2987
3134
  annotationInfo: contentShare.annotation
2988
3135
  });
2989
3136
  };
2990
- _context7.prev = 26;
3137
+ _context8.prev = 26;
2991
3138
  if (!((_this14$mediaProperti = _this14.mediaProperties.mediaDirection) !== null && _this14$mediaProperti !== void 0 && _this14$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
2992
- _context7.next = 30;
3139
+ _context8.next = 30;
2993
3140
  break;
2994
3141
  }
2995
- _context7.next = 30;
3142
+ _context8.next = 30;
2996
3143
  return _this14.unpublishStreams([_this14.mediaProperties.shareVideoStream, _this14.mediaProperties.shareAudioStream]);
2997
3144
  case 30:
2998
- _context7.prev = 30;
3145
+ _context8.prev = 30;
2999
3146
  sendStartedSharingRemote();
3000
- return _context7.finish(30);
3147
+ return _context8.finish(30);
3001
3148
  case 33:
3002
- return _context7.abrupt("break", 42);
3149
+ return _context8.abrupt("break", 42);
3003
3150
  case 34:
3004
3151
  _triggerProxy.default.trigger(_this14, {
3005
3152
  file: 'meeting/index',
@@ -3009,13 +3156,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3009
3156
  _this14.webex.internal.newMetrics.submitClientEvent({
3010
3157
  name: 'client.share.floor-granted.local',
3011
3158
  payload: {
3012
- mediaType: 'share'
3159
+ mediaType: 'share',
3160
+ shareInstanceId: _this14.localShareInstanceId
3013
3161
  },
3014
3162
  options: {
3015
3163
  meetingId: _this14.id
3016
3164
  }
3017
3165
  });
3018
- return _context7.abrupt("break", 42);
3166
+ return _context8.abrupt("break", 42);
3019
3167
  case 37:
3020
3168
  _triggerProxy.default.trigger(_this14, {
3021
3169
  file: 'meeting/index',
@@ -3034,26 +3182,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3034
3182
  meetingId: _this14.id
3035
3183
  }
3036
3184
  });
3037
- return _context7.abrupt("break", 42);
3185
+ return _context8.abrupt("break", 42);
3038
3186
  case 40:
3039
- return _context7.abrupt("break", 42);
3187
+ return _context8.abrupt("break", 42);
3040
3188
  case 41:
3041
- return _context7.abrupt("break", 42);
3189
+ return _context8.abrupt("break", 42);
3042
3190
  case 42:
3043
3191
  _this14.members.locusMediaSharesUpdate(payload);
3044
- _context7.next = 46;
3192
+ _context8.next = 46;
3045
3193
  break;
3046
3194
  case 45:
3047
3195
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
3048
3196
  // if we got here, then some remote participant has stolen
3049
3197
  // the presentation from another remote participant
3198
+ _this14.remoteShareInstanceId = contentShare.shareInstanceId;
3050
3199
  _triggerProxy.default.trigger(_this14, {
3051
3200
  file: 'meetings/index',
3052
3201
  function: 'remoteShare'
3053
3202
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
3054
3203
  memberId: contentShare.beneficiaryId,
3055
3204
  url: contentShare.url,
3056
- shareInstanceId: contentShare.shareInstanceId,
3205
+ shareInstanceId: _this14.remoteShareInstanceId,
3057
3206
  annotationInfo: contentShare.annotation
3058
3207
  });
3059
3208
  _this14.members.locusMediaSharesUpdate(payload);
@@ -3081,12 +3230,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3081
3230
  }
3082
3231
  case 46:
3083
3232
  case "end":
3084
- return _context7.stop();
3233
+ return _context8.stop();
3085
3234
  }
3086
- }, _callee7, null, [[26,, 30, 33]]);
3235
+ }, _callee8, null, [[26,, 30, 33]]);
3087
3236
  }));
3088
- return function (_x5) {
3089
- return _ref23.apply(this, arguments);
3237
+ return function (_x8) {
3238
+ return _ref22.apply(this, arguments);
3090
3239
  };
3091
3240
  }());
3092
3241
  }
@@ -3304,25 +3453,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3304
3453
  }
3305
3454
  });
3306
3455
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
3307
- var _ref24 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3308
- return _regenerator.default.wrap(function _callee8$(_context8) {
3309
- while (1) switch (_context8.prev = _context8.next) {
3456
+ var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3457
+ return _regenerator.default.wrap(function _callee9$(_context9) {
3458
+ while (1) switch (_context9.prev = _context9.next) {
3310
3459
  case 0:
3311
3460
  _this19.stopKeepAlive();
3312
- // @ts-ignore
3313
- if (!(!_this19.transcription && (_this19.config.receiveTranscription || _this19.receiveTranscription))) {
3314
- _context8.next = 6;
3315
- break;
3316
- }
3317
- if (!_this19.isTranscriptionSupported()) {
3318
- _context8.next = 6;
3319
- break;
3320
- }
3321
- _context8.next = 5;
3322
- return _this19.startTranscription();
3323
- case 5:
3324
- _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoSelfListener --> enabled to receive transcription for guest user!');
3325
- case 6:
3326
3461
  if (payload) {
3327
3462
  _triggerProxy.default.trigger(_this19, {
3328
3463
  file: 'meeting/index',
@@ -3339,14 +3474,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3339
3474
  }
3340
3475
  });
3341
3476
  }
3342
- case 7:
3477
+ case 2:
3343
3478
  case "end":
3344
- return _context8.stop();
3479
+ return _context9.stop();
3345
3480
  }
3346
- }, _callee8);
3481
+ }, _callee9);
3347
3482
  }));
3348
- return function (_x6) {
3349
- return _ref24.apply(this, arguments);
3483
+ return function (_x9) {
3484
+ return _ref23.apply(this, arguments);
3350
3485
  };
3351
3486
  }());
3352
3487
 
@@ -3448,48 +3583,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3448
3583
  }
3449
3584
  });
3450
3585
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
3451
- var _ref25 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3452
- return _regenerator.default.wrap(function _callee9$(_context9) {
3453
- while (1) switch (_context9.prev = _context9.next) {
3586
+ var _ref24 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
3587
+ return _regenerator.default.wrap(function _callee10$(_context10) {
3588
+ while (1) switch (_context10.prev = _context10.next) {
3454
3589
  case 0:
3455
3590
  if (!_this20.wirelessShare) {
3456
- _context9.next = 7;
3591
+ _context10.next = 7;
3457
3592
  break;
3458
3593
  }
3459
3594
  if (!_this20.mediaProperties.shareVideoStream) {
3460
- _context9.next = 4;
3595
+ _context10.next = 4;
3461
3596
  break;
3462
3597
  }
3463
- _context9.next = 4;
3598
+ _context10.next = 4;
3464
3599
  return _this20.setLocalShareVideoStream(undefined);
3465
3600
  case 4:
3466
3601
  if (!_this20.mediaProperties.shareAudioStream) {
3467
- _context9.next = 7;
3602
+ _context10.next = 7;
3468
3603
  break;
3469
3604
  }
3470
- _context9.next = 7;
3605
+ _context10.next = 7;
3471
3606
  return _this20.setLocalShareAudioStream(undefined);
3472
3607
  case 7:
3473
3608
  if (!payload.shouldLeave) {
3474
- _context9.next = 19;
3609
+ _context10.next = 19;
3475
3610
  break;
3476
3611
  }
3477
- _context9.prev = 8;
3478
- _context9.next = 11;
3612
+ _context10.prev = 8;
3613
+ _context10.next = 11;
3479
3614
  return _this20.leave({
3480
3615
  reason: payload.reason
3481
3616
  });
3482
3617
  case 11:
3483
3618
  _loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
3484
- _context9.next = 17;
3619
+ _context10.next = 17;
3485
3620
  break;
3486
3621
  case 14:
3487
- _context9.prev = 14;
3488
- _context9.t0 = _context9["catch"](8);
3622
+ _context10.prev = 14;
3623
+ _context10.t0 = _context10["catch"](8);
3489
3624
  // @ts-ignore
3490
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context9.t0));
3625
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context10.t0));
3491
3626
  case 17:
3492
- _context9.next = 22;
3627
+ _context10.next = 22;
3493
3628
  break;
3494
3629
  case 19:
3495
3630
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -3503,12 +3638,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3503
3638
  });
3504
3639
  case 22:
3505
3640
  case "end":
3506
- return _context9.stop();
3641
+ return _context10.stop();
3507
3642
  }
3508
- }, _callee9, null, [[8, 14]]);
3643
+ }, _callee10, null, [[8, 14]]);
3509
3644
  }));
3510
- return function (_x7) {
3511
- return _ref25.apply(this, arguments);
3645
+ return function (_x10) {
3646
+ return _ref24.apply(this, arguments);
3512
3647
  };
3513
3648
  }());
3514
3649
  }
@@ -3657,12 +3792,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3657
3792
  /**
3658
3793
  * Sets the meeting info on the class instance
3659
3794
  * @param {Object} meetingInfo
3660
- * @param {Object} meetingInfo.body
3661
- * @param {String} meetingInfo.body.conversationUrl
3662
- * @param {String} meetingInfo.body.locusUrl
3663
- * @param {String} meetingInfo.body.sipUri
3664
- * @param {Object} meetingInfo.body.owner
3795
+ * @param {String} meetingInfo.conversationUrl
3796
+ * @param {String} meetingInfo.locusUrl
3797
+ * @param {String} meetingInfo.sipUri
3798
+ * @param {String} [meetingInfo.sipUrl]
3799
+ * @param {String} [meetingInfo.sipMeetingUri]
3800
+ * @param {String} [meetingInfo.meetingNumber]
3801
+ * @param {String} [meetingInfo.meetingJoinUrl]
3802
+ * @param {String} [meetingInfo.hostId]
3803
+ * @param {String} [meetingInfo.permissionToken]
3804
+ * @param {String} [meetingInfo.channel]
3805
+ * @param {Object} meetingInfo.owner
3665
3806
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
3807
+ * @param {Object | String} errors Meeting info request error
3666
3808
  * @returns {undefined}
3667
3809
  * @private
3668
3810
  * @memberof Meeting
@@ -3671,7 +3813,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3671
3813
  key: "parseMeetingInfo",
3672
3814
  value: function parseMeetingInfo(meetingInfo) {
3673
3815
  var destination = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
3674
- var webexMeetingInfo = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.body;
3816
+ var errors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
3675
3817
  // We try to use as much info from Locus meeting object, stored in destination
3676
3818
 
3677
3819
  var locusMeetingObject;
@@ -3680,28 +3822,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3680
3822
  }
3681
3823
 
3682
3824
  // MeetingInfo will be undefined for 1:1 calls
3683
- if (locusMeetingObject || webexMeetingInfo && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.errors && (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.errors.length) > 0)) {
3825
+ if (locusMeetingObject || meetingInfo && !((errors === null || errors === void 0 ? void 0 : errors.length) > 0)) {
3684
3826
  var _locusMeetingObject, _locusMeetingObject2, _locusMeetingObject3, _locusMeetingObject4, _locusMeetingObject6, _locusMeetingObject7;
3685
- this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
3686
- this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
3827
+ this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.conversationUrl) || this.conversationUrl;
3828
+ this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.locusUrl) || this.locusUrl;
3687
3829
  // @ts-ignore - config coming from registerPlugin
3688
3830
  this.setSipUri(
3689
3831
  // @ts-ignore
3690
- this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
3832
+ this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.sipMeetingUri) || this.sipUri);
3691
3833
  // @ts-ignore - config coming from registerPlugin
3692
3834
  if (this.config.experimental.enableUnifiedMeetings) {
3693
3835
  var _locusMeetingObject5;
3694
- this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingNumber);
3695
- this.meetingJoinUrl = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingJoinUrl;
3836
+ this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingNumber);
3837
+ this.meetingJoinUrl = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingJoinUrl;
3696
3838
  }
3697
- this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.hostId) || this.owner;
3698
- this.permissionToken = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken;
3699
- this.setPermissionTokenPayload(webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken);
3839
+ this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.hostId) || this.owner;
3840
+ this.permissionToken = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken;
3841
+ this.setPermissionTokenPayload(meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken);
3700
3842
  this.setSelfUserPolicies();
3701
3843
  // Need to populate environment when sending CA event
3702
- this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.channel);
3844
+ this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.channel);
3703
3845
  }
3704
- _util.default.parseInterpretationInfo(this, webexMeetingInfo);
3846
+ _util.default.parseInterpretationInfo(this, meetingInfo);
3705
3847
  }
3706
3848
 
3707
3849
  /**
@@ -4086,10 +4228,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4086
4228
  }, {
4087
4229
  key: "setLocalAudioStream",
4088
4230
  value: (function () {
4089
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(localStream) {
4231
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4090
4232
  var oldStream;
4091
- return _regenerator.default.wrap(function _callee10$(_context10) {
4092
- while (1) switch (_context10.prev = _context10.next) {
4233
+ return _regenerator.default.wrap(function _callee11$(_context11) {
4234
+ while (1) switch (_context11.prev = _context11.next) {
4093
4235
  case 0:
4094
4236
  oldStream = this.mediaProperties.audioStream;
4095
4237
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -4101,21 +4243,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4101
4243
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
4102
4244
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4103
4245
  if (!(!this.isMultistream || !localStream)) {
4104
- _context10.next = 10;
4246
+ _context11.next = 10;
4105
4247
  break;
4106
4248
  }
4107
- _context10.next = 10;
4249
+ _context11.next = 10;
4108
4250
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
4109
4251
  case 10:
4110
- _context10.next = 12;
4252
+ _context11.next = 12;
4111
4253
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
4112
4254
  case 12:
4113
4255
  case "end":
4114
- return _context10.stop();
4256
+ return _context11.stop();
4115
4257
  }
4116
- }, _callee10, this);
4258
+ }, _callee11, this);
4117
4259
  }));
4118
- function setLocalAudioStream(_x8) {
4260
+ function setLocalAudioStream(_x11) {
4119
4261
  return _setLocalAudioStream.apply(this, arguments);
4120
4262
  }
4121
4263
  return setLocalAudioStream;
@@ -4131,10 +4273,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4131
4273
  }, {
4132
4274
  key: "setLocalVideoStream",
4133
4275
  value: (function () {
4134
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4276
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4135
4277
  var oldStream;
4136
- return _regenerator.default.wrap(function _callee11$(_context11) {
4137
- while (1) switch (_context11.prev = _context11.next) {
4278
+ return _regenerator.default.wrap(function _callee12$(_context12) {
4279
+ while (1) switch (_context12.prev = _context12.next) {
4138
4280
  case 0:
4139
4281
  oldStream = this.mediaProperties.videoStream;
4140
4282
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -4146,21 +4288,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4146
4288
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
4147
4289
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4148
4290
  if (!(!this.isMultistream || !localStream)) {
4149
- _context11.next = 10;
4291
+ _context12.next = 10;
4150
4292
  break;
4151
4293
  }
4152
- _context11.next = 10;
4294
+ _context12.next = 10;
4153
4295
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
4154
4296
  case 10:
4155
- _context11.next = 12;
4297
+ _context12.next = 12;
4156
4298
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
4157
4299
  case 12:
4158
4300
  case "end":
4159
- return _context11.stop();
4301
+ return _context12.stop();
4160
4302
  }
4161
- }, _callee11, this);
4303
+ }, _callee12, this);
4162
4304
  }));
4163
- function setLocalVideoStream(_x9) {
4305
+ function setLocalVideoStream(_x12) {
4164
4306
  return _setLocalVideoStream.apply(this, arguments);
4165
4307
  }
4166
4308
  return setLocalVideoStream;
@@ -4177,10 +4319,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4177
4319
  }, {
4178
4320
  key: "setLocalShareVideoStream",
4179
4321
  value: (function () {
4180
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localDisplayStream) {
4322
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
4181
4323
  var oldStream;
4182
- return _regenerator.default.wrap(function _callee12$(_context12) {
4183
- while (1) switch (_context12.prev = _context12.next) {
4324
+ return _regenerator.default.wrap(function _callee13$(_context13) {
4325
+ while (1) switch (_context13.prev = _context13.next) {
4184
4326
  case 0:
4185
4327
  oldStream = this.mediaProperties.shareVideoStream;
4186
4328
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -4192,21 +4334,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4192
4334
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4193
4335
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4194
4336
  if (!(!this.isMultistream || !localDisplayStream)) {
4195
- _context12.next = 12;
4337
+ _context13.next = 12;
4196
4338
  break;
4197
4339
  }
4198
- _context12.next = 12;
4340
+ _context13.next = 12;
4199
4341
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
4200
4342
  case 12:
4201
- _context12.next = 14;
4343
+ _context13.next = 14;
4202
4344
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
4203
4345
  case 14:
4204
4346
  case "end":
4205
- return _context12.stop();
4347
+ return _context13.stop();
4206
4348
  }
4207
- }, _callee12, this);
4349
+ }, _callee13, this);
4208
4350
  }));
4209
- function setLocalShareVideoStream(_x10) {
4351
+ function setLocalShareVideoStream(_x13) {
4210
4352
  return _setLocalShareVideoStream.apply(this, arguments);
4211
4353
  }
4212
4354
  return setLocalShareVideoStream;
@@ -4222,10 +4364,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4222
4364
  }, {
4223
4365
  key: "setLocalShareAudioStream",
4224
4366
  value: (function () {
4225
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localSystemAudioStream) {
4367
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
4226
4368
  var oldStream;
4227
- return _regenerator.default.wrap(function _callee13$(_context13) {
4228
- while (1) switch (_context13.prev = _context13.next) {
4369
+ return _regenerator.default.wrap(function _callee14$(_context14) {
4370
+ while (1) switch (_context14.prev = _context14.next) {
4229
4371
  case 0:
4230
4372
  oldStream = this.mediaProperties.shareAudioStream;
4231
4373
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -4235,21 +4377,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4235
4377
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4236
4378
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4237
4379
  if (!(!this.isMultistream || !localSystemAudioStream)) {
4238
- _context13.next = 10;
4380
+ _context14.next = 10;
4239
4381
  break;
4240
4382
  }
4241
- _context13.next = 10;
4383
+ _context14.next = 10;
4242
4384
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
4243
4385
  case 10:
4244
- _context13.next = 12;
4386
+ _context14.next = 12;
4245
4387
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
4246
4388
  case 12:
4247
4389
  case "end":
4248
- return _context13.stop();
4390
+ return _context14.stop();
4249
4391
  }
4250
- }, _callee13, this);
4392
+ }, _callee14, this);
4251
4393
  }));
4252
- function setLocalShareAudioStream(_x11) {
4394
+ function setLocalShareAudioStream(_x14) {
4253
4395
  return _setLocalShareAudioStream.apply(this, arguments);
4254
4396
  }
4255
4397
  return setLocalShareAudioStream;
@@ -4820,7 +4962,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4820
4962
  if ((_this$locusInfo$contr = this.locusInfo.controls.transcribe) !== null && _this$locusInfo$contr !== void 0 && _this$locusInfo$contr.transcribing) {
4821
4963
  return true;
4822
4964
  }
4823
- _loggerProxy.default.logger.error('Meeting:index#isTranscriptionSupported --> Webex Assistant is not supported');
4965
+ _loggerProxy.default.logger.error('Meeting:index#isTranscriptionSupported --> Webex Assistant is not enabled/supported');
4824
4966
  return false;
4825
4967
  }
4826
4968
 
@@ -4840,109 +4982,164 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4840
4982
  }
4841
4983
 
4842
4984
  /**
4843
- * Monitor the Low-Latency Mercury (LLM) web socket connection on `onError` and `onClose` states
4844
- * @private
4845
- * @returns {void}
4985
+ * sets Caption language for the meeting
4986
+ * @param {string} language
4987
+ * @returns {Promise}
4846
4988
  */
4847
4989
  }, {
4848
- key: "monitorTranscriptionSocketConnection",
4849
- value: function monitorTranscriptionSocketConnection() {
4990
+ key: "setCaptionLanguage",
4991
+ value: function setCaptionLanguage(language) {
4850
4992
  var _this30 = this;
4851
- this.transcription.onCloseSocket(function (event) {
4852
- _loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
4853
- _this30.triggerStopReceivingTranscriptionEvent();
4993
+ return new _promise.default(function (resolve, reject) {
4994
+ if (!_this30.isTranscriptionSupported()) {
4995
+ _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
4996
+ reject(new Error('Webex Assistant is not enabled/supported'));
4997
+ }
4998
+ try {
4999
+ var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5000
+ // @ts-ignore
5001
+ _this30.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5002
+ var statusCode = payload.statusCode;
5003
+ if (statusCode === 200) {
5004
+ _this30.transcription.languageOptions = _objectSpread(_objectSpread({}, _this30.transcription.languageOptions), {}, {
5005
+ currentCaptionLanguage: language
5006
+ });
5007
+ resolve(language);
5008
+ } else {
5009
+ reject(payload);
5010
+ }
5011
+ };
5012
+ // @ts-ignore
5013
+ _this30.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5014
+ // @ts-ignore
5015
+ _this30.webex.internal.voicea.requestLanguage(language);
5016
+ } catch (error) {
5017
+ _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5018
+ reject(error);
5019
+ }
4854
5020
  });
4855
- this.transcription.onErrorSocket(function (event) {
4856
- _loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
4857
- _this30.triggerStopReceivingTranscriptionEvent();
4858
- _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
4859
- correlation_id: _this30.correlationId,
4860
- reason: 'unexpected error: transcription LLM web socket connection error had occured.',
4861
- event: event
4862
- });
5021
+ }
5022
+
5023
+ /**
5024
+ * sets Spoken language for the meeting
5025
+ * @param {string} language
5026
+ * @returns {Promise}
5027
+ */
5028
+ }, {
5029
+ key: "setSpokenLanguage",
5030
+ value: function setSpokenLanguage(language) {
5031
+ var _this31 = this;
5032
+ return new _promise.default(function (resolve, reject) {
5033
+ if (!_this31.isTranscriptionSupported()) {
5034
+ _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5035
+ reject(new Error('Webex Assistant is not enabled/supported'));
5036
+ }
5037
+ try {
5038
+ var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5039
+ // @ts-ignore
5040
+ _this31.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5041
+ var languageCode = payload.languageCode;
5042
+ if (languageCode) {
5043
+ _this31.transcription.languageOptions = _objectSpread(_objectSpread({}, _this31.transcription.languageOptions), {}, {
5044
+ currentSpokenLanguage: languageCode
5045
+ });
5046
+ resolve(languageCode);
5047
+ } else {
5048
+ reject(payload);
5049
+ }
5050
+ };
5051
+ // @ts-ignore
5052
+ _this31.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5053
+ // @ts-ignore
5054
+ _this31.webex.internal.voicea.setSpokenLanguage(language);
5055
+ } catch (error) {
5056
+ _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5057
+ reject(error);
5058
+ }
4863
5059
  });
4864
5060
  }
4865
5061
 
4866
5062
  /**
4867
- * Request for a WebSocket Url, open and monitor the WebSocket connection
4868
- * @private
5063
+ * This method will enable the transcription for the current meeting if the meeting has enabled/supports Webex Assistant
5064
+ * @param {Object} options object with spokenlanguage setting
5065
+ * @public
4869
5066
  * @returns {Promise<void>} a promise to open the WebSocket connection
4870
5067
  */
4871
5068
  }, {
4872
5069
  key: "startTranscription",
4873
5070
  value: (function () {
4874
- var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
4875
- var _this31 = this;
4876
- var datachannelUrl, _yield$this$request, webSocketUrl;
4877
- return _regenerator.default.wrap(function _callee14$(_context14) {
4878
- while (1) switch (_context14.prev = _context14.next) {
5071
+ var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(options) {
5072
+ return _regenerator.default.wrap(function _callee15$(_context15) {
5073
+ while (1) switch (_context15.prev = _context15.next) {
4879
5074
  case 0:
4880
- _loggerProxy.default.logger.info("Meeting:index#startTranscription -->\n Attempting to generate a web socket url.");
4881
- _context14.prev = 1;
4882
- datachannelUrl = this.locusInfo.info.datachannelUrl; // @ts-ignore - fix type
4883
- _context14.next = 5;
4884
- return this.request({
4885
- method: _constants.HTTP_VERBS.POST,
4886
- uri: datachannelUrl,
4887
- body: {
4888
- deviceUrl: this.deviceUrl
4889
- }
4890
- });
4891
- case 5:
4892
- _yield$this$request = _context14.sent;
4893
- webSocketUrl = _yield$this$request.body.webSocketUrl;
4894
- _loggerProxy.default.logger.info("Meeting:index#startTranscription -->\n Generated web socket url succesfully.");
4895
- this.transcription = new _transcription.default(webSocketUrl,
4896
- // @ts-ignore - fix type
4897
- this.webex.sessionId, this.members);
4898
- _loggerProxy.default.logger.info("Meeting:index#startTranscription -->\n opened LLM web socket connection successfully.");
4899
- if (!this.inMeetingActions.isClosedCaptionActive) {
4900
- _loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> Transcription cannot be started until a licensed user enables it");
5075
+ if (!this.isJoined()) {
5076
+ _context15.next = 15;
5077
+ break;
4901
5078
  }
4902
-
4903
- // retrieve and pass the payload
4904
- this.transcription.subscribe(function (payload) {
4905
- _triggerProxy.default.trigger(_this31, {
4906
- file: 'meeting/index',
4907
- function: 'join'
4908
- }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
4909
- });
4910
- this.monitorTranscriptionSocketConnection();
4911
- // @ts-ignore - fix type
4912
- this.transcription.connect(this.webex.credentials.supertoken.access_token);
4913
- _context14.next = 20;
5079
+ _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
5080
+ _context15.prev = 2;
5081
+ if (!this.areVoiceaEventsSetup) {
5082
+ this.setUpVoiceaListeners();
5083
+ }
5084
+ if (!(this.getCurUserType() === 'host')) {
5085
+ _context15.next = 7;
5086
+ break;
5087
+ }
5088
+ _context15.next = 7;
5089
+ return this.webex.internal.voicea.toggleTranscribing(true, options === null || options === void 0 ? void 0 : options.spokenLanguage);
5090
+ case 7:
5091
+ _context15.next = 13;
4914
5092
  break;
4915
- case 16:
4916
- _context14.prev = 16;
4917
- _context14.t0 = _context14["catch"](1);
4918
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context14.t0));
5093
+ case 9:
5094
+ _context15.prev = 9;
5095
+ _context15.t0 = _context15["catch"](2);
5096
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context15.t0));
4919
5097
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
4920
5098
  correlation_id: this.correlationId,
4921
- reason: _context14.t0.message,
4922
- stack: _context14.t0.stack
5099
+ reason: _context15.t0.message,
5100
+ stack: _context15.t0.stack
4923
5101
  });
4924
- case 20:
5102
+ case 13:
5103
+ _context15.next = 16;
5104
+ break;
5105
+ case 15:
5106
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
5107
+ case 16:
4925
5108
  case "end":
4926
- return _context14.stop();
5109
+ return _context15.stop();
4927
5110
  }
4928
- }, _callee14, this, [[1, 16]]);
5111
+ }, _callee15, this, [[2, 9]]);
4929
5112
  }));
4930
- function startTranscription() {
5113
+ function startTranscription(_x15) {
4931
5114
  return _startTranscription.apply(this, arguments);
4932
5115
  }
4933
5116
  return startTranscription;
4934
5117
  }())
4935
5118
  }, {
4936
- key: "stopReceivingTranscription",
5119
+ key: "stopTranscription",
4937
5120
  value:
4938
5121
  /**
4939
- * stop recieving Transcription by closing
4940
- * the web socket connection properly
5122
+ * This method stops receiving transcription for the current meeting
4941
5123
  * @returns {void}
4942
5124
  */
4943
- function stopReceivingTranscription() {
5125
+ function stopTranscription() {
4944
5126
  if (this.transcription) {
4945
- this.transcription.closeSocket();
5127
+ // @ts-ignore
5128
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
5129
+
5130
+ // @ts-ignore
5131
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
5132
+
5133
+ // @ts-ignore
5134
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
5135
+
5136
+ // @ts-ignore
5137
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
5138
+
5139
+ // @ts-ignore
5140
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.HIGHLIGHT_CREATED, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.HIGHLIGHT_CREATED]);
5141
+ this.areVoiceaEventsSetup = false;
5142
+ this.triggerStopReceivingTranscriptionEvent();
4946
5143
  }
4947
5144
  }
4948
5145
 
@@ -4955,7 +5152,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4955
5152
  }, {
4956
5153
  key: "triggerStopReceivingTranscriptionEvent",
4957
5154
  value: function triggerStopReceivingTranscriptionEvent() {
4958
- _loggerProxy.default.logger.info("\n Meeting:index#stopReceivingTranscription -->\n closed transcription LLM web socket connection successfully.");
5155
+ _loggerProxy.default.logger.info("\n Meeting:index#stopReceivingTranscription -->\n closed voicea event listeners successfully.");
4959
5156
  _triggerProxy.default.trigger(this, {
4960
5157
  file: 'meeting',
4961
5158
  function: 'triggerStopReceivingTranscriptionEvent'
@@ -4977,7 +5174,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4977
5174
  }, {
4978
5175
  key: "join",
4979
5176
  value: (function () {
4980
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
5177
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
4981
5178
  var _this32 = this;
4982
5179
  var options,
4983
5180
  errorMessage,
@@ -4988,25 +5185,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4988
5185
  _error,
4989
5186
  _errorMessage2,
4990
5187
  _error2,
4991
- _args15 = arguments;
4992
- return _regenerator.default.wrap(function _callee15$(_context15) {
4993
- while (1) switch (_context15.prev = _context15.next) {
5188
+ _args16 = arguments;
5189
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5190
+ while (1) switch (_context16.prev = _context16.next) {
4994
5191
  case 0:
4995
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
5192
+ options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
4996
5193
  if (this.webex.meetings.registered) {
4997
- _context15.next = 6;
5194
+ _context16.next = 6;
4998
5195
  break;
4999
5196
  }
5000
5197
  errorMessage = 'Meeting:index#join --> Device not registered';
5001
5198
  error = new Error(errorMessage);
5002
5199
  _loggerProxy.default.logger.error(errorMessage);
5003
- return _context15.abrupt("return", _promise.default.reject(error));
5200
+ return _context16.abrupt("return", _promise.default.reject(error));
5004
5201
  case 6:
5005
5202
  if (!this.deferJoin) {
5006
- _context15.next = 8;
5203
+ _context16.next = 8;
5007
5204
  break;
5008
5205
  }
5009
- return _context15.abrupt("return", this.deferJoin);
5206
+ return _context16.abrupt("return", this.deferJoin);
5010
5207
  case 8:
5011
5208
  // Create a deferred promise for a consistent resolve value from utils.
5012
5209
  // This also prevents redundant API calls.
@@ -5055,15 +5252,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5055
5252
  this.wirelessShare = true;
5056
5253
  }
5057
5254
  if (!options.meetingQuality) {
5058
- _context15.next = 36;
5255
+ _context16.next = 36;
5059
5256
  break;
5060
5257
  }
5061
5258
  if (!(typeof options.meetingQuality === 'string')) {
5062
- _context15.next = 27;
5259
+ _context16.next = 27;
5063
5260
  break;
5064
5261
  }
5065
5262
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
5066
- _context15.next = 26;
5263
+ _context16.next = 26;
5067
5264
  break;
5068
5265
  }
5069
5266
  _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -5071,16 +5268,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5071
5268
  _loggerProxy.default.logger.error(_errorMessage);
5072
5269
  joinFailed(_error);
5073
5270
  this.deferJoin = undefined;
5074
- return _context15.abrupt("return", _promise.default.reject(_error));
5271
+ return _context16.abrupt("return", _promise.default.reject(_error));
5075
5272
  case 26:
5076
5273
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
5077
5274
  case 27:
5078
5275
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
5079
- _context15.next = 36;
5276
+ _context16.next = 36;
5080
5277
  break;
5081
5278
  }
5082
5279
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
5083
- _context15.next = 35;
5280
+ _context16.next = 35;
5084
5281
  break;
5085
5282
  }
5086
5283
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -5088,42 +5285,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5088
5285
  _error2 = new Error(_errorMessage2);
5089
5286
  joinFailed(_error2);
5090
5287
  this.deferJoin = undefined;
5091
- return _context15.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5288
+ return _context16.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5092
5289
  case 35:
5093
5290
  if (options.meetingQuality.remote) {
5094
5291
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
5095
5292
  }
5096
5293
  case 36:
5097
5294
  this.isMultistream = !!options.enableMultistream;
5098
- _context15.prev = 37;
5099
- _context15.next = 40;
5295
+ _context16.prev = 37;
5296
+ _context16.next = 40;
5100
5297
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
5101
5298
  case 40:
5102
- _context15.next = 51;
5299
+ _context16.next = 51;
5103
5300
  break;
5104
5301
  case 42:
5105
- _context15.prev = 42;
5106
- _context15.t0 = _context15["catch"](37);
5107
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context15.t0);
5108
- if (!(_context15.t0 instanceof _captchaError.default || _context15.t0 instanceof _passwordError.default || _context15.t0 instanceof _permission.default)) {
5109
- _context15.next = 51;
5302
+ _context16.prev = 42;
5303
+ _context16.t0 = _context16["catch"](37);
5304
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context16.t0);
5305
+ if (!(_context16.t0 instanceof _captchaError.default || _context16.t0 instanceof _passwordError.default || _context16.t0 instanceof _permission.default)) {
5306
+ _context16.next = 51;
5110
5307
  break;
5111
5308
  }
5112
- this.meetingFiniteStateMachine.fail(_context15.t0);
5309
+ this.meetingFiniteStateMachine.fail(_context16.t0);
5113
5310
 
5114
5311
  // Upload logs on refreshpermissionToken refresh Failure
5115
5312
  _triggerProxy.default.trigger(this, {
5116
5313
  file: 'meeting/index',
5117
5314
  function: 'join'
5118
5315
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
5119
- joinFailed(_context15.t0);
5316
+ joinFailed(_context16.t0);
5120
5317
  this.deferJoin = undefined;
5121
5318
 
5122
5319
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
5123
5320
  // and bubble it up to client
5124
- return _context15.abrupt("return", _promise.default.reject(_context15.t0));
5321
+ return _context16.abrupt("return", _promise.default.reject(_context16.t0));
5125
5322
  case 51:
5126
- return _context15.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5323
+ return _context16.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5127
5324
  _this32.meetingFiniteStateMachine.join();
5128
5325
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5129
5326
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
@@ -5131,7 +5328,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5131
5328
  });
5132
5329
  joinSuccess(join);
5133
5330
  _this32.deferJoin = undefined;
5134
- _this32.receiveTranscription = !!options.receiveTranscription;
5135
5331
  return join;
5136
5332
  }).catch(function (error) {
5137
5333
  var _this32$meetingInfo, _error$error;
@@ -5171,41 +5367,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5171
5367
  // @ts-ignore - config coming from registerPlugin
5172
5368
  if (_this32.config.enableAutomaticLLM) {
5173
5369
  _this32.updateLLMConnection().catch(function (error) {
5174
- _loggerProxy.default.logger.error('Meeting:index#join --> Update LLM Connection Failed', error);
5370
+ _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
5175
5371
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
5176
5372
  correlation_id: _this32.correlationId,
5177
5373
  reason: error === null || error === void 0 ? void 0 : error.message,
5178
5374
  stack: error.stack
5179
5375
  });
5376
+ }).then(function () {
5377
+ _loggerProxy.default.logger.info('Meeting:index#join --> Transcription Socket Connection Success');
5378
+ _triggerProxy.default.trigger(_this32, {
5379
+ file: 'meeting/index',
5380
+ function: 'join'
5381
+ }, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_CONNECTED, undefined);
5180
5382
  });
5181
5383
  }
5182
5384
  return join;
5183
- }).then(function (join) {
5184
- if (isBrowser) {
5185
- // @ts-ignore - config coming from registerPlugin
5186
- if (_this32.config.receiveTranscription || options.receiveTranscription) {
5187
- if (_this32.isTranscriptionSupported()) {
5188
- _loggerProxy.default.logger.info('Meeting:index#join --> Attempting to enabled to receive transcription!');
5189
- _this32.startTranscription().catch(function (error) {
5190
- _loggerProxy.default.logger.error('Meeting:index#join --> Receive Transcription Failed', error);
5191
- _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE, {
5192
- correlation_id: _this32.correlationId,
5193
- reason: error === null || error === void 0 ? void 0 : error.message,
5194
- stack: error.stack
5195
- });
5196
- });
5197
- }
5198
- }
5199
- } else {
5200
- _loggerProxy.default.logger.error('Meeting:index#join --> Receving transcription is not supported on this platform');
5201
- }
5202
- return join;
5203
5385
  }));
5204
5386
  case 52:
5205
5387
  case "end":
5206
- return _context15.stop();
5388
+ return _context16.stop();
5207
5389
  }
5208
- }, _callee15, this, [[37, 42]]);
5390
+ }, _callee16, this, [[37, 42]]);
5209
5391
  }));
5210
5392
  function join() {
5211
5393
  return _join.apply(this, arguments);
@@ -5222,38 +5404,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5222
5404
  }, {
5223
5405
  key: "updateLLMConnection",
5224
5406
  value: (function () {
5225
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5407
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5226
5408
  var _this33 = this;
5227
5409
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
5228
- return _regenerator.default.wrap(function _callee16$(_context16) {
5229
- while (1) switch (_context16.prev = _context16.next) {
5410
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5411
+ while (1) switch (_context17.prev = _context17.next) {
5230
5412
  case 0:
5231
5413
  // @ts-ignore - Fix type
5232
5414
  _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;
5233
5415
  isJoined = this.isJoined(); // @ts-ignore - Fix type
5234
5416
  if (!this.webex.internal.llm.isConnected()) {
5235
- _context16.next = 8;
5417
+ _context17.next = 8;
5236
5418
  break;
5237
5419
  }
5238
5420
  if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
5239
- _context16.next = 5;
5421
+ _context17.next = 5;
5240
5422
  break;
5241
5423
  }
5242
- return _context16.abrupt("return", undefined);
5424
+ return _context17.abrupt("return", undefined);
5243
5425
  case 5:
5244
- _context16.next = 7;
5426
+ _context17.next = 7;
5245
5427
  return this.webex.internal.llm.disconnectLLM();
5246
5428
  case 7:
5247
5429
  // @ts-ignore - Fix type
5248
5430
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
5249
5431
  case 8:
5250
5432
  if (isJoined) {
5251
- _context16.next = 10;
5433
+ _context17.next = 10;
5252
5434
  break;
5253
5435
  }
5254
- return _context16.abrupt("return", undefined);
5436
+ return _context17.abrupt("return", undefined);
5255
5437
  case 10:
5256
- return _context16.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5438
+ return _context17.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5257
5439
  // @ts-ignore - Fix type
5258
5440
  _this33.webex.internal.llm.off('event:relay.event', _this33.processRelayEvent);
5259
5441
  // @ts-ignore - Fix type
@@ -5263,9 +5445,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5263
5445
  }));
5264
5446
  case 11:
5265
5447
  case "end":
5266
- return _context16.stop();
5448
+ return _context17.stop();
5267
5449
  }
5268
- }, _callee16, this);
5450
+ }, _callee17, this);
5269
5451
  }));
5270
5452
  function updateLLMConnection() {
5271
5453
  return _updateLLMConnection.apply(this, arguments);
@@ -5437,17 +5619,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5437
5619
  meetingId: this.id
5438
5620
  }
5439
5621
  });
5440
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5622
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5441
5623
  var mediaSettings;
5442
- return _regenerator.default.wrap(function _callee17$(_context17) {
5443
- while (1) switch (_context17.prev = _context17.next) {
5624
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5625
+ while (1) switch (_context18.prev = _context18.next) {
5444
5626
  case 0:
5445
- _context17.prev = 0;
5627
+ _context18.prev = 0;
5446
5628
  if (!(_this36.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
5447
- _context17.next = 4;
5629
+ _context18.next = 4;
5448
5630
  break;
5449
5631
  }
5450
- _context17.next = 4;
5632
+ _context18.next = 4;
5451
5633
  return _this36.releaseScreenShareFloor();
5452
5634
  case 4:
5453
5635
  mediaSettings = {
@@ -5467,28 +5649,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5467
5649
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
5468
5650
  // once the DX answers we establish connection back the media server with only receiveShare enabled
5469
5651
  // @ts-ignore - reconnectMedia does not accept any argument
5470
- _context17.next = 10;
5652
+ _context18.next = 10;
5471
5653
  return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
5472
5654
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
5473
5655
  });
5474
5656
  case 10:
5475
- _context17.next = 16;
5657
+ _context18.next = 16;
5476
5658
  break;
5477
5659
  case 12:
5478
- _context17.prev = 12;
5479
- _context17.t0 = _context17["catch"](0);
5480
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context17.t0);
5660
+ _context18.prev = 12;
5661
+ _context18.t0 = _context18["catch"](0);
5662
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context18.t0);
5481
5663
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
5482
5664
  correlation_id: _this36.correlationId,
5483
5665
  locus_id: _this36.locusUrl.split('/').pop(),
5484
- reason: _context17.t0.message,
5485
- stack: _context17.t0.stack
5666
+ reason: _context18.t0.message,
5667
+ stack: _context18.t0.stack
5486
5668
  });
5487
5669
  case 16:
5488
5670
  case "end":
5489
- return _context17.stop();
5671
+ return _context18.stop();
5490
5672
  }
5491
- }, _callee17, null, [[0, 12]]);
5673
+ }, _callee18, null, [[0, 12]]);
5492
5674
  })));
5493
5675
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
5494
5676
  return _util.default.joinMeetingOptions(this, {
@@ -5571,10 +5753,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5571
5753
  }, {
5572
5754
  key: "createMediaConnection",
5573
5755
  value: (function () {
5574
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(turnServerInfo, bundlePolicy) {
5756
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(turnServerInfo, bundlePolicy) {
5575
5757
  var mc, audioEnabled, videoEnabled, shareEnabled;
5576
- return _regenerator.default.wrap(function _callee18$(_context18) {
5577
- while (1) switch (_context18.prev = _context18.next) {
5758
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5759
+ while (1) switch (_context19.prev = _context19.next) {
5578
5760
  case 0:
5579
5761
  mc = _media.default.createMediaConnection(this.isMultistream, this.getMediaConnectionDebugId(),
5580
5762
  // @ts-ignore
@@ -5600,41 +5782,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5600
5782
 
5601
5783
  // publish the streams
5602
5784
  if (!this.mediaProperties.audioStream) {
5603
- _context18.next = 7;
5785
+ _context19.next = 7;
5604
5786
  break;
5605
5787
  }
5606
- _context18.next = 7;
5788
+ _context19.next = 7;
5607
5789
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5608
5790
  case 7:
5609
5791
  if (!this.mediaProperties.videoStream) {
5610
- _context18.next = 10;
5792
+ _context19.next = 10;
5611
5793
  break;
5612
5794
  }
5613
- _context18.next = 10;
5795
+ _context19.next = 10;
5614
5796
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5615
5797
  case 10:
5616
5798
  if (!this.mediaProperties.shareVideoStream) {
5617
- _context18.next = 13;
5799
+ _context19.next = 13;
5618
5800
  break;
5619
5801
  }
5620
- _context18.next = 13;
5802
+ _context19.next = 13;
5621
5803
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5622
5804
  case 13:
5623
5805
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
5624
- _context18.next = 16;
5806
+ _context19.next = 16;
5625
5807
  break;
5626
5808
  }
5627
- _context18.next = 16;
5809
+ _context19.next = 16;
5628
5810
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5629
5811
  case 16:
5630
- return _context18.abrupt("return", mc);
5812
+ return _context19.abrupt("return", mc);
5631
5813
  case 17:
5632
5814
  case "end":
5633
- return _context18.stop();
5815
+ return _context19.stop();
5634
5816
  }
5635
- }, _callee18, this);
5817
+ }, _callee19, this);
5636
5818
  }));
5637
- function createMediaConnection(_x12, _x13) {
5819
+ function createMediaConnection(_x16, _x17) {
5638
5820
  return _createMediaConnection.apply(this, arguments);
5639
5821
  }
5640
5822
  return createMediaConnection;
@@ -5672,11 +5854,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5672
5854
  }, {
5673
5855
  key: "setUpLocalStreamReferences",
5674
5856
  value: (function () {
5675
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(localStreams) {
5857
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(localStreams) {
5676
5858
  var _localStreams$screenS, _localStreams$screenS2;
5677
5859
  var setUpStreamPromises;
5678
- return _regenerator.default.wrap(function _callee19$(_context19) {
5679
- while (1) switch (_context19.prev = _context19.next) {
5860
+ return _regenerator.default.wrap(function _callee20$(_context20) {
5861
+ while (1) switch (_context20.prev = _context20.next) {
5680
5862
  case 0:
5681
5863
  setUpStreamPromises = [];
5682
5864
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone) {
@@ -5691,24 +5873,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5691
5873
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS2 = localStreams.screenShare) !== null && _localStreams$screenS2 !== void 0 && _localStreams$screenS2.audio) {
5692
5874
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
5693
5875
  }
5694
- _context19.prev = 5;
5695
- _context19.next = 8;
5876
+ _context20.prev = 5;
5877
+ _context20.next = 8;
5696
5878
  return _promise.default.all(setUpStreamPromises);
5697
5879
  case 8:
5698
- _context19.next = 14;
5880
+ _context20.next = 14;
5699
5881
  break;
5700
5882
  case 10:
5701
- _context19.prev = 10;
5702
- _context19.t0 = _context19["catch"](5);
5703
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context19.t0);
5704
- throw _context19.t0;
5883
+ _context20.prev = 10;
5884
+ _context20.t0 = _context20["catch"](5);
5885
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context20.t0);
5886
+ throw _context20.t0;
5705
5887
  case 14:
5706
5888
  case "end":
5707
- return _context19.stop();
5889
+ return _context20.stop();
5708
5890
  }
5709
- }, _callee19, this, [[5, 10]]);
5891
+ }, _callee20, this, [[5, 10]]);
5710
5892
  }));
5711
- function setUpLocalStreamReferences(_x14) {
5893
+ function setUpLocalStreamReferences(_x18) {
5712
5894
  return _setUpLocalStreamReferences.apply(this, arguments);
5713
5895
  }
5714
5896
  return setUpLocalStreamReferences;
@@ -5723,20 +5905,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5723
5905
  }, {
5724
5906
  key: "waitForMediaConnectionConnected",
5725
5907
  value: (function () {
5726
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
5908
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
5727
5909
  var _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, _this$mediaProperties15, _this$mediaProperties16, _this$mediaProperties17, _this$mediaProperties18, _this$mediaProperties19;
5728
- return _regenerator.default.wrap(function _callee20$(_context20) {
5729
- while (1) switch (_context20.prev = _context20.next) {
5910
+ return _regenerator.default.wrap(function _callee21$(_context21) {
5911
+ while (1) switch (_context21.prev = _context21.next) {
5730
5912
  case 0:
5731
- _context20.prev = 0;
5732
- _context20.next = 3;
5913
+ _context21.prev = 0;
5914
+ _context21.next = 3;
5733
5915
  return this.mediaProperties.waitForMediaConnectionConnected();
5734
5916
  case 3:
5735
- _context20.next = 9;
5917
+ _context21.next = 9;
5736
5918
  break;
5737
5919
  case 5:
5738
- _context20.prev = 5;
5739
- _context20.t0 = _context20["catch"](0);
5920
+ _context21.prev = 5;
5921
+ _context21.t0 = _context21["catch"](0);
5740
5922
  if (!this.hasMediaConnectionConnectedAtLeastOnce) {
5741
5923
  // Only send CA event for join flow if we haven't successfully connected media yet
5742
5924
  // @ts-ignore
@@ -5764,9 +5946,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5764
5946
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
5765
5947
  case 9:
5766
5948
  case "end":
5767
- return _context20.stop();
5949
+ return _context21.stop();
5768
5950
  }
5769
- }, _callee20, this, [[0, 5]]);
5951
+ }, _callee21, this, [[0, 5]]);
5770
5952
  }));
5771
5953
  function waitForMediaConnectionConnected() {
5772
5954
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -5816,18 +5998,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5816
5998
  * @returns {Promise<void>}
5817
5999
  */
5818
6000
  function () {
5819
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
6001
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
5820
6002
  var LOG_HEADER, deferSDPAnswer;
5821
- return _regenerator.default.wrap(function _callee21$(_context21) {
5822
- while (1) switch (_context21.prev = _context21.next) {
6003
+ return _regenerator.default.wrap(function _callee22$(_context22) {
6004
+ while (1) switch (_context22.prev = _context22.next) {
5823
6005
  case 0:
5824
6006
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
5825
6007
  if (this.deferSDPAnswer) {
5826
- _context21.next = 4;
6008
+ _context22.next = 4;
5827
6009
  break;
5828
6010
  }
5829
6011
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
5830
- return _context21.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6012
+ return _context22.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
5831
6013
  case 4:
5832
6014
  deferSDPAnswer = this.deferSDPAnswer;
5833
6015
  this.sdpResponseTimer = setTimeout(function () {
@@ -5835,12 +6017,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5835
6017
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
5836
6018
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
5837
6019
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
5838
- return _context21.abrupt("return", deferSDPAnswer.promise);
6020
+ return _context22.abrupt("return", deferSDPAnswer.promise);
5839
6021
  case 8:
5840
6022
  case "end":
5841
- return _context21.stop();
6023
+ return _context22.stop();
5842
6024
  }
5843
- }, _callee21, this);
6025
+ }, _callee22, this);
5844
6026
  }));
5845
6027
  function waitForRemoteSDPAnswer() {
5846
6028
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -5859,30 +6041,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5859
6041
  }, {
5860
6042
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
5861
6043
  value: (function () {
5862
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(remoteMediaManagerConfig, bundlePolicy) {
6044
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(remoteMediaManagerConfig, bundlePolicy) {
5863
6045
  var LOG_HEADER;
5864
- return _regenerator.default.wrap(function _callee22$(_context22) {
5865
- while (1) switch (_context22.prev = _context22.next) {
6046
+ return _regenerator.default.wrap(function _callee23$(_context23) {
6047
+ while (1) switch (_context23.prev = _context23.next) {
5866
6048
  case 0:
5867
6049
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
5868
- _context22.prev = 1;
5869
- _context22.next = 4;
6050
+ _context23.prev = 1;
6051
+ _context23.next = 4;
5870
6052
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
5871
6053
  case 4:
5872
- _context22.next = 10;
6054
+ _context23.next = 10;
5873
6055
  break;
5874
6056
  case 6:
5875
- _context22.prev = 6;
5876
- _context22.t0 = _context22["catch"](1);
5877
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context22.t0);
5878
- throw _context22.t0;
6057
+ _context23.prev = 6;
6058
+ _context23.t0 = _context23["catch"](1);
6059
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context23.t0);
6060
+ throw _context23.t0;
5879
6061
  case 10:
5880
6062
  case "end":
5881
- return _context22.stop();
6063
+ return _context23.stop();
5882
6064
  }
5883
- }, _callee22, this, [[1, 6]]);
6065
+ }, _callee23, this, [[1, 6]]);
5884
6066
  }));
5885
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x15, _x16) {
6067
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
5886
6068
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
5887
6069
  }
5888
6070
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -5900,14 +6082,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5900
6082
  }, {
5901
6083
  key: "retryWithForcedTurnDiscovery",
5902
6084
  value: (function () {
5903
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(remoteMediaManagerConfig, bundlePolicy) {
6085
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy) {
5904
6086
  var LOG_HEADER;
5905
- return _regenerator.default.wrap(function _callee23$(_context23) {
5906
- while (1) switch (_context23.prev = _context23.next) {
6087
+ return _regenerator.default.wrap(function _callee24$(_context24) {
6088
+ while (1) switch (_context24.prev = _context24.next) {
5907
6089
  case 0:
5908
6090
  this.retriedWithTurnServer = true;
5909
6091
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
5910
- _context23.next = 4;
6092
+ _context24.next = 4;
5911
6093
  return this.cleanUpBeforeRetryWithTurnServer();
5912
6094
  case 4:
5913
6095
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -5917,24 +6099,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5917
6099
  reason: 'forcingTurnTls'
5918
6100
  });
5919
6101
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
5920
- _context23.next = 9;
6102
+ _context24.next = 9;
5921
6103
  break;
5922
6104
  }
5923
6105
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
5924
- _context23.next = 9;
6106
+ _context24.next = 9;
5925
6107
  return this.join({
5926
6108
  rejoin: true
5927
6109
  });
5928
6110
  case 9:
5929
- _context23.next = 11;
6111
+ _context24.next = 11;
5930
6112
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
5931
6113
  case 11:
5932
6114
  case "end":
5933
- return _context23.stop();
6115
+ return _context24.stop();
5934
6116
  }
5935
- }, _callee23, this);
6117
+ }, _callee24, this);
5936
6118
  }));
5937
- function retryWithForcedTurnDiscovery(_x17, _x18) {
6119
+ function retryWithForcedTurnDiscovery(_x21, _x22) {
5938
6120
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
5939
6121
  }
5940
6122
  return retryWithForcedTurnDiscovery;
@@ -5954,32 +6136,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5954
6136
  }, {
5955
6137
  key: "handleWaitForMediaConnectionConnectedError",
5956
6138
  value: (function () {
5957
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(error, remoteMediaManagerConfig, bundlePolicy) {
6139
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(error, remoteMediaManagerConfig, bundlePolicy) {
5958
6140
  var LOG_HEADER;
5959
- return _regenerator.default.wrap(function _callee24$(_context24) {
5960
- while (1) switch (_context24.prev = _context24.next) {
6141
+ return _regenerator.default.wrap(function _callee25$(_context25) {
6142
+ while (1) switch (_context25.prev = _context25.next) {
5961
6143
  case 0:
5962
6144
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
5963
6145
  if (this.turnServerUsed) {
5964
- _context24.next = 7;
6146
+ _context25.next = 7;
5965
6147
  break;
5966
6148
  }
5967
6149
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
5968
- _context24.next = 5;
6150
+ _context25.next = 5;
5969
6151
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
5970
6152
  case 5:
5971
- _context24.next = 9;
6153
+ _context25.next = 9;
5972
6154
  break;
5973
6155
  case 7:
5974
6156
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
5975
6157
  throw new _webexErrors.AddMediaFailed();
5976
6158
  case 9:
5977
6159
  case "end":
5978
- return _context24.stop();
6160
+ return _context25.stop();
5979
6161
  }
5980
- }, _callee24, this);
6162
+ }, _callee25, this);
5981
6163
  }));
5982
- function handleWaitForMediaConnectionConnectedError(_x19, _x20, _x21) {
6164
+ function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
5983
6165
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
5984
6166
  }
5985
6167
  return handleWaitForMediaConnectionConnectedError;
@@ -5997,23 +6179,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5997
6179
  }, {
5998
6180
  key: "establishMediaConnection",
5999
6181
  value: (function () {
6000
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy, isForced) {
6182
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy, isForced) {
6001
6183
  var LOG_HEADER, cdl, isRetry, turnDiscoveryObject, turnServerInfo, mc;
6002
- return _regenerator.default.wrap(function _callee25$(_context25) {
6003
- while (1) switch (_context25.prev = _context25.next) {
6184
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6185
+ while (1) switch (_context26.prev = _context26.next) {
6004
6186
  case 0:
6005
6187
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->'; // @ts-ignore
6006
6188
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
6007
6189
  isRetry = this.retriedWithTurnServer;
6008
- _context25.prev = 3;
6190
+ _context26.prev = 3;
6009
6191
  // @ts-ignore
6010
6192
  this.webex.internal.newMetrics.submitInternalEvent({
6011
6193
  name: 'internal.client.add-media.turn-discovery.start'
6012
6194
  });
6013
- _context25.next = 7;
6195
+ _context26.next = 7;
6014
6196
  return this.roap.doTurnDiscovery(this, isRetry, isForced);
6015
6197
  case 7:
6016
- turnDiscoveryObject = _context25.sent;
6198
+ turnDiscoveryObject = _context26.sent;
6017
6199
  this.turnDiscoverySkippedReason = turnDiscoveryObject === null || turnDiscoveryObject === void 0 ? void 0 : turnDiscoveryObject.turnDiscoverySkippedReason;
6018
6200
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
6019
6201
 
@@ -6030,55 +6212,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6030
6212
  retriedWithTurnServer: this.retriedWithTurnServer
6031
6213
  });
6032
6214
  }
6033
- _context25.next = 15;
6215
+ _context26.next = 15;
6034
6216
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6035
6217
  case 15:
6036
- mc = _context25.sent;
6218
+ mc = _context26.sent;
6037
6219
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6038
6220
  if (!this.isMultistream) {
6039
- _context25.next = 24;
6221
+ _context26.next = 24;
6040
6222
  break;
6041
6223
  }
6042
6224
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
6043
6225
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
6044
6226
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
6045
6227
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
6046
- _context25.next = 24;
6228
+ _context26.next = 24;
6047
6229
  return this.remoteMediaManager.start();
6048
6230
  case 24:
6049
- _context25.next = 26;
6231
+ _context26.next = 26;
6050
6232
  return mc.initiateOffer();
6051
6233
  case 26:
6052
- _context25.next = 28;
6234
+ _context26.next = 28;
6053
6235
  return this.waitForRemoteSDPAnswer();
6054
6236
  case 28:
6055
6237
  this.handleMediaLogging(this.mediaProperties);
6056
- _context25.next = 35;
6238
+ _context26.next = 35;
6057
6239
  break;
6058
6240
  case 31:
6059
- _context25.prev = 31;
6060
- _context25.t0 = _context25["catch"](3);
6061
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context25.t0);
6062
- throw _context25.t0;
6241
+ _context26.prev = 31;
6242
+ _context26.t0 = _context26["catch"](3);
6243
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context26.t0);
6244
+ throw _context26.t0;
6063
6245
  case 35:
6064
- _context25.prev = 35;
6065
- _context25.next = 38;
6246
+ _context26.prev = 35;
6247
+ _context26.next = 38;
6066
6248
  return this.waitForMediaConnectionConnected();
6067
6249
  case 38:
6068
- _context25.next = 44;
6250
+ _context26.next = 44;
6069
6251
  break;
6070
6252
  case 40:
6071
- _context25.prev = 40;
6072
- _context25.t1 = _context25["catch"](35);
6073
- _context25.next = 44;
6074
- return this.handleWaitForMediaConnectionConnectedError(_context25.t1, remoteMediaManagerConfig, bundlePolicy);
6253
+ _context26.prev = 40;
6254
+ _context26.t1 = _context26["catch"](35);
6255
+ _context26.next = 44;
6256
+ return this.handleWaitForMediaConnectionConnectedError(_context26.t1, remoteMediaManagerConfig, bundlePolicy);
6075
6257
  case 44:
6076
6258
  case "end":
6077
- return _context25.stop();
6259
+ return _context26.stop();
6078
6260
  }
6079
- }, _callee25, this, [[3, 31], [35, 40]]);
6261
+ }, _callee26, this, [[3, 31], [35, 40]]);
6080
6262
  }));
6081
- function establishMediaConnection(_x22, _x23, _x24) {
6263
+ function establishMediaConnection(_x26, _x27, _x28) {
6082
6264
  return _establishMediaConnection.apply(this, arguments);
6083
6265
  }
6084
6266
  return establishMediaConnection;
@@ -6093,22 +6275,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6093
6275
  }, {
6094
6276
  key: "cleanUpOnAddMediaFailure",
6095
6277
  value: (function () {
6096
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
6097
- return _regenerator.default.wrap(function _callee26$(_context26) {
6098
- while (1) switch (_context26.prev = _context26.next) {
6278
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6279
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6280
+ while (1) switch (_context27.prev = _context27.next) {
6099
6281
  case 0:
6100
6282
  if (!this.statsAnalyzer) {
6101
- _context26.next = 3;
6283
+ _context27.next = 3;
6102
6284
  break;
6103
6285
  }
6104
- _context26.next = 3;
6286
+ _context27.next = 3;
6105
6287
  return this.statsAnalyzer.stopAnalyzer();
6106
6288
  case 3:
6107
6289
  this.statsAnalyzer = null;
6108
6290
 
6109
6291
  // when media fails, we want to upload a webrtc dump to see whats going on
6110
6292
  // this function is async, but returns once the stats have been gathered
6111
- _context26.next = 6;
6293
+ _context27.next = 6;
6112
6294
  return this.forceSendStatsReport({
6113
6295
  callFrom: 'addMedia'
6114
6296
  });
@@ -6119,9 +6301,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6119
6301
  }
6120
6302
  case 7:
6121
6303
  case "end":
6122
- return _context26.stop();
6304
+ return _context27.stop();
6123
6305
  }
6124
- }, _callee26, this);
6306
+ }, _callee27, this);
6125
6307
  }));
6126
6308
  function cleanUpOnAddMediaFailure() {
6127
6309
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -6139,11 +6321,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6139
6321
  }, {
6140
6322
  key: "cleanUpBeforeRetryWithTurnServer",
6141
6323
  value: (function () {
6142
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6143
- return _regenerator.default.wrap(function _callee27$(_context27) {
6144
- while (1) switch (_context27.prev = _context27.next) {
6324
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
6325
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6326
+ while (1) switch (_context28.prev = _context28.next) {
6145
6327
  case 0:
6146
- _context27.next = 2;
6328
+ _context28.next = 2;
6147
6329
  return this.forceSendStatsReport({
6148
6330
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
6149
6331
  });
@@ -6163,9 +6345,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6163
6345
  }
6164
6346
  case 3:
6165
6347
  case "end":
6166
- return _context27.stop();
6348
+ return _context28.stop();
6167
6349
  }
6168
- }, _callee27, this);
6350
+ }, _callee28, this);
6169
6351
  }));
6170
6352
  function cleanUpBeforeRetryWithTurnServer() {
6171
6353
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -6184,7 +6366,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6184
6366
  }, {
6185
6367
  key: "addMedia",
6186
6368
  value: (function () {
6187
- var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
6369
+ var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
6188
6370
  var _this$webex$meetings$2, _this$webex$meetings$3;
6189
6371
  var options,
6190
6372
  LOG_HEADER,
@@ -6225,23 +6407,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6225
6407
  _this$mediaProperties39,
6226
6408
  _this$mediaProperties40,
6227
6409
  reachabilityMetrics,
6228
- _args28 = arguments;
6229
- return _regenerator.default.wrap(function _callee28$(_context28) {
6230
- while (1) switch (_context28.prev = _context28.next) {
6410
+ _args29 = arguments;
6411
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6412
+ while (1) switch (_context29.prev = _context29.next) {
6231
6413
  case 0:
6232
- options = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
6414
+ options = _args29.length > 0 && _args29[0] !== undefined ? _args29[0] : {};
6233
6415
  this.retriedWithTurnServer = false;
6234
6416
  this.hasMediaConnectionConnectedAtLeastOnce = false;
6235
6417
  LOG_HEADER = 'Meeting:index#addMedia -->';
6236
6418
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options)));
6237
6419
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
6238
- _context28.next = 7;
6420
+ _context29.next = 7;
6239
6421
  break;
6240
6422
  }
6241
6423
  throw new _webexErrors.MeetingNotActiveError();
6242
6424
  case 7:
6243
6425
  if (!_util.default.isUserInLeftState(this.locusInfo)) {
6244
- _context28.next = 9;
6426
+ _context29.next = 9;
6245
6427
  break;
6246
6428
  }
6247
6429
  throw new _webexErrors.UserNotJoinedError();
@@ -6252,7 +6434,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6252
6434
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
6253
6435
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
6254
6436
  if (!(this.isUserUnadmitted && !this.wirelessShare && !allowMediaInLobby)) {
6255
- _context28.next = 13;
6437
+ _context29.next = 13;
6256
6438
  break;
6257
6439
  }
6258
6440
  throw new _webexErrors.UserInLobbyError();
@@ -6311,33 +6493,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6311
6493
  });
6312
6494
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
6313
6495
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
6314
- _context28.prev = 18;
6315
- _context28.next = 21;
6496
+ _context29.prev = 18;
6497
+ _context29.next = 21;
6316
6498
  return this.setUpLocalStreamReferences(localStreams);
6317
6499
  case 21:
6318
6500
  this.setMercuryListener();
6319
6501
  this.createStatsAnalyzer();
6320
- _context28.next = 25;
6502
+ _context29.next = 25;
6321
6503
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false);
6322
6504
  case 25:
6323
- _context28.next = 27;
6505
+ _context29.next = 27;
6324
6506
  return Meeting.handleDeviceLogging();
6325
6507
  case 27:
6326
6508
  if (!this.mediaProperties.hasLocalShareStream()) {
6327
- _context28.next = 30;
6509
+ _context29.next = 30;
6328
6510
  break;
6329
6511
  }
6330
- _context28.next = 30;
6512
+ _context29.next = 30;
6331
6513
  return this.enqueueScreenShareFloorRequest();
6332
6514
  case 30:
6333
- _context28.next = 32;
6515
+ _context29.next = 32;
6334
6516
  return this.mediaProperties.getCurrentConnectionType();
6335
6517
  case 32:
6336
- connectionType = _context28.sent;
6337
- _context28.next = 35;
6518
+ connectionType = _context29.sent;
6519
+ _context29.next = 35;
6338
6520
  return this.webex.meetings.reachability.getReachabilityMetrics();
6339
6521
  case 35:
6340
- reachabilityStats = _context28.sent;
6522
+ reachabilityStats = _context29.sent;
6341
6523
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
6342
6524
  correlation_id: this.correlationId,
6343
6525
  locus_id: this.locusUrl.split('/').pop(),
@@ -6356,24 +6538,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6356
6538
 
6357
6539
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
6358
6540
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
6359
- _context28.next = 54;
6541
+ _context29.next = 54;
6360
6542
  break;
6361
6543
  case 42:
6362
- _context28.prev = 42;
6363
- _context28.t0 = _context28["catch"](18);
6364
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context28.t0);
6544
+ _context29.prev = 42;
6545
+ _context29.t0 = _context29["catch"](18);
6546
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context29.t0);
6365
6547
 
6366
6548
  // @ts-ignore
6367
- _context28.next = 47;
6549
+ _context29.next = 47;
6368
6550
  return this.webex.meetings.reachability.getReachabilityMetrics();
6369
6551
  case 47:
6370
- reachabilityMetrics = _context28.sent;
6552
+ reachabilityMetrics = _context29.sent;
6371
6553
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
6372
6554
  correlation_id: this.correlationId,
6373
6555
  locus_id: this.locusUrl.split('/').pop(),
6374
- reason: _context28.t0.message,
6375
- stack: _context28.t0.stack,
6376
- code: _context28.t0.code,
6556
+ reason: _context29.t0.message,
6557
+ stack: _context29.t0.stack,
6558
+ code: _context29.t0.code,
6377
6559
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
6378
6560
  turnServerUsed: this.turnServerUsed,
6379
6561
  retriedWithTurnServer: this.retriedWithTurnServer,
@@ -6382,7 +6564,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6382
6564
  connectionState: ((_this$mediaProperties27 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.multistreamConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.pc) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : _this$mediaProperties30.connectionState) || ((_this$mediaProperties31 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.mediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.pc) === null || _this$mediaProperties33 === void 0 ? void 0 : _this$mediaProperties33.connectionState) || 'unknown',
6383
6565
  iceConnectionState: ((_this$mediaProperties34 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.multistreamConnection) === null || _this$mediaProperties35 === void 0 ? void 0 : (_this$mediaProperties36 = _this$mediaProperties35.pc) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.pc) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.iceConnectionState) || ((_this$mediaProperties38 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.mediaConnection) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.pc) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.iceConnectionState) || 'unknown'
6384
6566
  }, reachabilityMetrics));
6385
- _context28.next = 51;
6567
+ _context29.next = 51;
6386
6568
  return this.cleanUpOnAddMediaFailure();
6387
6569
  case 51:
6388
6570
  // Upload logs on error while adding media
@@ -6390,17 +6572,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6390
6572
  file: 'meeting/index',
6391
6573
  function: 'addMedia'
6392
6574
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6393
- if (_context28.t0 instanceof _internalMediaCore.Errors.SdpError) {
6575
+ if (_context29.t0 instanceof _internalMediaCore.Errors.SdpError) {
6394
6576
  this.leave({
6395
6577
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
6396
6578
  });
6397
6579
  }
6398
- throw _context28.t0;
6580
+ throw _context29.t0;
6399
6581
  case 54:
6400
6582
  case "end":
6401
- return _context28.stop();
6583
+ return _context29.stop();
6402
6584
  }
6403
- }, _callee28, this, [[18, 42]]);
6585
+ }, _callee29, this, [[18, 42]]);
6404
6586
  }));
6405
6587
  function addMedia() {
6406
6588
  return _addMedia.apply(this, arguments);
@@ -6468,35 +6650,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6468
6650
  * @memberof Meeting
6469
6651
  */
6470
6652
  function () {
6471
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(options) {
6653
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(options) {
6472
6654
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled;
6473
- return _regenerator.default.wrap(function _callee29$(_context29) {
6474
- while (1) switch (_context29.prev = _context29.next) {
6655
+ return _regenerator.default.wrap(function _callee30$(_context30) {
6656
+ while (1) switch (_context30.prev = _context30.next) {
6475
6657
  case 0:
6476
6658
  this.checkMediaConnection();
6477
6659
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
6478
6660
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
6479
6661
  if (this.canUpdateMedia()) {
6480
- _context29.next = 5;
6662
+ _context30.next = 5;
6481
6663
  break;
6482
6664
  }
6483
- return _context29.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6665
+ return _context30.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6484
6666
  case 5:
6485
6667
  if (!this.isMultistream) {
6486
- _context29.next = 10;
6668
+ _context30.next = 10;
6487
6669
  break;
6488
6670
  }
6489
6671
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
6490
- _context29.next = 8;
6672
+ _context30.next = 8;
6491
6673
  break;
6492
6674
  }
6493
6675
  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');
6494
6676
  case 8:
6495
- _context29.next = 12;
6677
+ _context30.next = 12;
6496
6678
  break;
6497
6679
  case 10:
6498
6680
  if (!(shareAudioEnabled !== undefined)) {
6499
- _context29.next = 12;
6681
+ _context30.next = 12;
6500
6682
  break;
6501
6683
  }
6502
6684
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -6521,20 +6703,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6521
6703
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
6522
6704
  }
6523
6705
  if (this.isMultistream) {
6524
- _context29.next = 18;
6706
+ _context30.next = 18;
6525
6707
  break;
6526
6708
  }
6527
- _context29.next = 18;
6709
+ _context30.next = 18;
6528
6710
  return this.updateTranscodedMediaConnection();
6529
6711
  case 18:
6530
- return _context29.abrupt("return", undefined);
6712
+ return _context30.abrupt("return", undefined);
6531
6713
  case 19:
6532
6714
  case "end":
6533
- return _context29.stop();
6715
+ return _context30.stop();
6534
6716
  }
6535
- }, _callee29, this);
6717
+ }, _callee30, this);
6536
6718
  }));
6537
- function updateMedia(_x25) {
6719
+ function updateMedia(_x29) {
6538
6720
  return _updateMedia.apply(this, arguments);
6539
6721
  }
6540
6722
  return updateMedia;
@@ -6858,9 +7040,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6858
7040
  if (content && this.shareStatus !== _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
6859
7041
  // @ts-ignore
6860
7042
  this.webex.internal.newMetrics.submitClientEvent({
6861
- name: 'client.share.initiated',
7043
+ name: 'client.share.floor-grant.request',
6862
7044
  payload: {
6863
- mediaType: 'share'
7045
+ mediaType: 'share',
7046
+ shareInstanceId: this.localShareInstanceId
6864
7047
  },
6865
7048
  options: {
6866
7049
  meetingId: this.id
@@ -6887,6 +7070,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6887
7070
  reason: error.message,
6888
7071
  stack: error.stack
6889
7072
  });
7073
+
7074
+ // @ts-ignore
7075
+ _this46.webex.internal.newMetrics.submitClientEvent({
7076
+ name: 'client.share.floor-granted.local',
7077
+ payload: {
7078
+ mediaType: 'share',
7079
+ errors: _util.default.getChangeMeetingFloorErrorPayload(error.message),
7080
+ shareInstanceId: _this46.localShareInstanceId
7081
+ },
7082
+ options: {
7083
+ meetingId: _this46.id
7084
+ }
7085
+ });
6890
7086
  _this46.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
6891
7087
  return _promise.default.reject(error);
6892
7088
  });
@@ -6941,7 +7137,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6941
7137
  this.webex.internal.newMetrics.submitClientEvent({
6942
7138
  name: 'client.share.stopped',
6943
7139
  payload: {
6944
- mediaType: 'share'
7140
+ mediaType: 'share',
7141
+ shareInstanceId: this.localShareInstanceId
6945
7142
  },
6946
7143
  options: {
6947
7144
  meetingId: this.id
@@ -7291,6 +7488,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7291
7488
  if (roles.includes(_constants.SELF_ROLES.COHOST)) {
7292
7489
  return 'cohost';
7293
7490
  }
7491
+ if (roles.includes(_constants.SELF_ROLES.PRESENTER)) {
7492
+ return 'presenter';
7493
+ }
7294
7494
  if (roles.includes(_constants.SELF_ROLES.ATTENDEE)) {
7295
7495
  return 'attendee';
7296
7496
  }
@@ -7432,39 +7632,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7432
7632
  }, {
7433
7633
  key: "enableMusicMode",
7434
7634
  value: (function () {
7435
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(shouldEnableMusicMode) {
7436
- return _regenerator.default.wrap(function _callee30$(_context30) {
7437
- while (1) switch (_context30.prev = _context30.next) {
7635
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(shouldEnableMusicMode) {
7636
+ return _regenerator.default.wrap(function _callee31$(_context31) {
7637
+ while (1) switch (_context31.prev = _context31.next) {
7438
7638
  case 0:
7439
7639
  this.checkMediaConnection();
7440
7640
  if (this.isMultistream) {
7441
- _context30.next = 3;
7641
+ _context31.next = 3;
7442
7642
  break;
7443
7643
  }
7444
7644
  throw new Error('enableMusicMode() only supported with multistream');
7445
7645
  case 3:
7446
7646
  if (!shouldEnableMusicMode) {
7447
- _context30.next = 8;
7647
+ _context31.next = 8;
7448
7648
  break;
7449
7649
  }
7450
- _context30.next = 6;
7650
+ _context31.next = 6;
7451
7651
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
7452
7652
  maxaveragebitrate: '64000',
7453
7653
  maxplaybackrate: '48000'
7454
7654
  });
7455
7655
  case 6:
7456
- _context30.next = 10;
7656
+ _context31.next = 10;
7457
7657
  break;
7458
7658
  case 8:
7459
- _context30.next = 10;
7659
+ _context31.next = 10;
7460
7660
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
7461
7661
  case 10:
7462
7662
  case "end":
7463
- return _context30.stop();
7663
+ return _context31.stop();
7464
7664
  }
7465
- }, _callee30, this);
7665
+ }, _callee31, this);
7466
7666
  }));
7467
- function enableMusicMode(_x26) {
7667
+ function enableMusicMode(_x30) {
7468
7668
  return _enableMusicMode.apply(this, arguments);
7469
7669
  }
7470
7670
  return enableMusicMode;
@@ -7529,25 +7729,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7529
7729
  }, {
7530
7730
  key: "publishStream",
7531
7731
  value: (function () {
7532
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(mediaType, stream) {
7533
- return _regenerator.default.wrap(function _callee31$(_context31) {
7534
- while (1) switch (_context31.prev = _context31.next) {
7732
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaType, stream) {
7733
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7734
+ while (1) switch (_context32.prev = _context32.next) {
7535
7735
  case 0:
7536
7736
  if (stream) {
7537
- _context31.next = 2;
7737
+ _context32.next = 2;
7538
7738
  break;
7539
7739
  }
7540
- return _context31.abrupt("return");
7740
+ return _context32.abrupt("return");
7541
7741
  case 2:
7542
7742
  if (!this.mediaProperties.webrtcMediaConnection) {
7543
- _context31.next = 7;
7743
+ _context32.next = 7;
7544
7744
  break;
7545
7745
  }
7546
7746
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7547
- _context31.next = 6;
7747
+ _context32.next = 6;
7548
7748
  break;
7549
7749
  }
7550
- _context31.next = 6;
7750
+ _context32.next = 6;
7551
7751
  return this.sendSlotManager.publishStream(mediaType, stream);
7552
7752
  case 6:
7553
7753
  this.emitPublishStateChangeEvent({
@@ -7558,11 +7758,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7558
7758
  });
7559
7759
  case 7:
7560
7760
  case "end":
7561
- return _context31.stop();
7761
+ return _context32.stop();
7562
7762
  }
7563
- }, _callee31, this);
7763
+ }, _callee32, this);
7564
7764
  }));
7565
- function publishStream(_x27, _x28) {
7765
+ function publishStream(_x31, _x32) {
7566
7766
  return _publishStream.apply(this, arguments);
7567
7767
  }
7568
7768
  return publishStream;
@@ -7578,21 +7778,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7578
7778
  }, {
7579
7779
  key: "unpublishStream",
7580
7780
  value: (function () {
7581
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaType, stream) {
7582
- return _regenerator.default.wrap(function _callee32$(_context32) {
7583
- while (1) switch (_context32.prev = _context32.next) {
7781
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(mediaType, stream) {
7782
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7783
+ while (1) switch (_context33.prev = _context33.next) {
7584
7784
  case 0:
7585
7785
  if (stream) {
7586
- _context32.next = 2;
7786
+ _context33.next = 2;
7587
7787
  break;
7588
7788
  }
7589
- return _context32.abrupt("return");
7789
+ return _context33.abrupt("return");
7590
7790
  case 2:
7591
7791
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7592
- _context32.next = 5;
7792
+ _context33.next = 5;
7593
7793
  break;
7594
7794
  }
7595
- _context32.next = 5;
7795
+ _context33.next = 5;
7596
7796
  return this.sendSlotManager.unpublishStream(mediaType);
7597
7797
  case 5:
7598
7798
  this.emitPublishStateChangeEvent({
@@ -7603,11 +7803,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7603
7803
  });
7604
7804
  case 6:
7605
7805
  case "end":
7606
- return _context32.stop();
7806
+ return _context33.stop();
7607
7807
  }
7608
- }, _callee32, this);
7808
+ }, _callee33, this);
7609
7809
  }));
7610
- function unpublishStream(_x29, _x30) {
7810
+ function unpublishStream(_x33, _x34) {
7611
7811
  return _unpublishStream.apply(this, arguments);
7612
7812
  }
7613
7813
  return unpublishStream;
@@ -7622,72 +7822,88 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7622
7822
  }, {
7623
7823
  key: "publishStreams",
7624
7824
  value: (function () {
7625
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(streams) {
7825
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(streams) {
7626
7826
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4;
7627
7827
  var floorRequestNeeded, _streams$screenShare5;
7628
- return _regenerator.default.wrap(function _callee33$(_context33) {
7629
- while (1) switch (_context33.prev = _context33.next) {
7828
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7829
+ while (1) switch (_context34.prev = _context34.next) {
7630
7830
  case 0:
7631
7831
  this.checkMediaConnection();
7632
7832
  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))) {
7633
- _context33.next = 3;
7833
+ _context34.next = 3;
7634
7834
  break;
7635
7835
  }
7636
- return _context33.abrupt("return");
7836
+ return _context34.abrupt("return");
7637
7837
  case 3:
7638
7838
  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
7639
7839
  if (!(this.isMultistream && (_streams$screenShare3 = streams.screenShare) !== null && _streams$screenShare3 !== void 0 && _streams$screenShare3.audio)) {
7640
- _context33.next = 8;
7840
+ _context34.next = 8;
7641
7841
  break;
7642
7842
  }
7643
- _context33.next = 7;
7843
+ _context34.next = 7;
7644
7844
  return this.setLocalShareAudioStream(streams.screenShare.audio);
7645
7845
  case 7:
7646
7846
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7647
7847
  case 8:
7648
7848
  if (!((_streams$screenShare4 = streams.screenShare) !== null && _streams$screenShare4 !== void 0 && _streams$screenShare4.video)) {
7649
- _context33.next = 12;
7849
+ _context34.next = 12;
7650
7850
  break;
7651
7851
  }
7652
- _context33.next = 11;
7852
+ _context34.next = 11;
7653
7853
  return this.setLocalShareVideoStream((_streams$screenShare5 = streams.screenShare) === null || _streams$screenShare5 === void 0 ? void 0 : _streams$screenShare5.video);
7654
7854
  case 11:
7655
7855
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7656
7856
  case 12:
7657
7857
  if (!streams.microphone) {
7658
- _context33.next = 15;
7858
+ _context34.next = 15;
7659
7859
  break;
7660
7860
  }
7661
- _context33.next = 15;
7861
+ _context34.next = 15;
7662
7862
  return this.setLocalAudioStream(streams.microphone);
7663
7863
  case 15:
7664
7864
  if (!streams.camera) {
7665
- _context33.next = 18;
7865
+ _context34.next = 18;
7666
7866
  break;
7667
7867
  }
7668
- _context33.next = 18;
7868
+ _context34.next = 18;
7669
7869
  return this.setLocalVideoStream(streams.camera);
7670
7870
  case 18:
7671
7871
  if (this.isMultistream) {
7672
- _context33.next = 21;
7872
+ _context34.next = 21;
7673
7873
  break;
7674
7874
  }
7675
- _context33.next = 21;
7875
+ _context34.next = 21;
7676
7876
  return this.updateTranscodedMediaConnection();
7677
7877
  case 21:
7678
7878
  if (!floorRequestNeeded) {
7679
- _context33.next = 24;
7879
+ _context34.next = 26;
7680
7880
  break;
7681
7881
  }
7682
- _context33.next = 24;
7882
+ this.localShareInstanceId = _uuid.default.v4();
7883
+
7884
+ // @ts-ignore
7885
+ this.webex.internal.newMetrics.submitClientEvent({
7886
+ name: 'client.share.initiated',
7887
+ payload: {
7888
+ mediaType: 'share',
7889
+ shareInstanceId: this.localShareInstanceId
7890
+ },
7891
+ options: {
7892
+ meetingId: this.id
7893
+ }
7894
+ });
7895
+ // we're sending the http request to Locus to request the screen share floor
7896
+ // only after the SDP update, because that's how it's always been done for transcoded meetings
7897
+ // and also if sharing from the start, we need confluence to have been created
7898
+ _context34.next = 26;
7683
7899
  return this.enqueueScreenShareFloorRequest();
7684
- case 24:
7900
+ case 26:
7685
7901
  case "end":
7686
- return _context33.stop();
7902
+ return _context34.stop();
7687
7903
  }
7688
- }, _callee33, this);
7904
+ }, _callee34, this);
7689
7905
  }));
7690
- function publishStreams(_x31) {
7906
+ function publishStreams(_x35) {
7691
7907
  return _publishStreams.apply(this, arguments);
7692
7908
  }
7693
7909
  return publishStreams;
@@ -7702,10 +7918,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7702
7918
  }, {
7703
7919
  key: "unpublishStreams",
7704
7920
  value: (function () {
7705
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(streams) {
7921
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(streams) {
7706
7922
  var promises, _iterator, _step, stream;
7707
- return _regenerator.default.wrap(function _callee34$(_context34) {
7708
- while (1) switch (_context34.prev = _context34.next) {
7923
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7924
+ while (1) switch (_context35.prev = _context35.next) {
7709
7925
  case 0:
7710
7926
  this.checkMediaConnection();
7711
7927
  promises = [];
@@ -7736,7 +7952,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7736
7952
  if (!this.isMultistream) {
7737
7953
  promises.push(this.updateTranscodedMediaConnection());
7738
7954
  }
7739
- _context34.next = 7;
7955
+ _context35.next = 7;
7740
7956
  return _promise.default.all(promises);
7741
7957
  case 7:
7742
7958
  // we're allowing for the SDK to support just audio share as well
@@ -7751,11 +7967,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7751
7967
  }
7752
7968
  case 8:
7753
7969
  case "end":
7754
- return _context34.stop();
7970
+ return _context35.stop();
7755
7971
  }
7756
- }, _callee34, this);
7972
+ }, _callee35, this);
7757
7973
  }));
7758
- function unpublishStreams(_x32) {
7974
+ function unpublishStreams(_x36) {
7759
7975
  return _unpublishStreams.apply(this, arguments);
7760
7976
  }
7761
7977
  return unpublishStreams;
@@ -7815,27 +8031,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7815
8031
  }], [{
7816
8032
  key: "handleDeviceLogging",
7817
8033
  value: (function () {
7818
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
8034
+ var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
7819
8035
  var devices;
7820
- return _regenerator.default.wrap(function _callee35$(_context35) {
7821
- while (1) switch (_context35.prev = _context35.next) {
8036
+ return _regenerator.default.wrap(function _callee36$(_context36) {
8037
+ while (1) switch (_context36.prev = _context36.next) {
7822
8038
  case 0:
7823
- _context35.prev = 0;
7824
- _context35.next = 3;
8039
+ _context36.prev = 0;
8040
+ _context36.next = 3;
7825
8041
  return (0, _mediaHelpers.getDevices)();
7826
8042
  case 3:
7827
- devices = _context35.sent;
8043
+ devices = _context36.sent;
7828
8044
  _util.default.handleDeviceLogging(devices);
7829
- _context35.next = 9;
8045
+ _context36.next = 9;
7830
8046
  break;
7831
8047
  case 7:
7832
- _context35.prev = 7;
7833
- _context35.t0 = _context35["catch"](0);
8048
+ _context36.prev = 7;
8049
+ _context36.t0 = _context36["catch"](0);
7834
8050
  case 9:
7835
8051
  case "end":
7836
- return _context35.stop();
8052
+ return _context36.stop();
7837
8053
  }
7838
- }, _callee35, null, [[0, 7]]);
8054
+ }, _callee36, null, [[0, 7]]);
7839
8055
  }));
7840
8056
  function handleDeviceLogging() {
7841
8057
  return _handleDeviceLogging.apply(this, arguments);