@webex/plugin-meetings 3.0.0-beta.201 → 3.0.0-beta.203

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 (33) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +10 -4
  4. package/dist/constants.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/index.js +5 -8
  8. package/dist/locus-info/index.js.map +1 -1
  9. package/dist/locus-info/infoUtils.js +7 -1
  10. package/dist/locus-info/infoUtils.js.map +1 -1
  11. package/dist/meeting/in-meeting-actions.js +3 -1
  12. package/dist/meeting/in-meeting-actions.js.map +1 -1
  13. package/dist/meeting/index.js +502 -453
  14. package/dist/meeting/index.js.map +1 -1
  15. package/dist/recording-controller/index.js +0 -1
  16. package/dist/recording-controller/index.js.map +1 -1
  17. package/dist/types/constants.d.ts +3 -0
  18. package/dist/types/locus-info/index.d.ts +1 -1
  19. package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
  20. package/dist/types/meeting/index.d.ts +14 -0
  21. package/dist/types/recording-controller/index.d.ts +0 -1
  22. package/package.json +19 -19
  23. package/src/constants.ts +7 -0
  24. package/src/locus-info/index.ts +9 -10
  25. package/src/locus-info/infoUtils.ts +10 -2
  26. package/src/meeting/in-meeting-actions.ts +4 -0
  27. package/src/meeting/index.ts +268 -231
  28. package/src/recording-controller/index.ts +0 -1
  29. package/test/unit/spec/locus-info/index.js +80 -3
  30. package/test/unit/spec/locus-info/infoUtils.js +37 -15
  31. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
  32. package/test/unit/spec/meeting/index.js +284 -148
  33. package/test/unit/spec/meetings/index.js +2 -2
@@ -31,7 +31,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
31
31
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
32
32
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
33
33
  var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
34
- var _defer2 = _interopRequireDefault(require("lodash/defer"));
35
34
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
36
35
  var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
37
36
  var _uuid = _interopRequireDefault(require("uuid"));
@@ -420,6 +419,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
420
419
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "userId", void 0);
421
420
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "video", void 0);
422
421
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callEvents", void 0);
422
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "datachannelUrl", void 0);
423
423
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deferJoin", void 0);
424
424
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialInDeviceStatus", void 0);
425
425
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dialInUrl", void 0);
@@ -456,6 +456,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
456
456
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
457
457
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "transcription", void 0);
458
458
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMediaConnections", void 0);
459
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "userDisplayHints", void 0);
459
460
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endCallInitJoinReq", void 0);
460
461
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endJoinReqResp", void 0);
461
462
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "endLocalSDPGenRemoteSDPRecvDelay", void 0);
@@ -1805,12 +1806,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1805
1806
  file: 'meetings',
1806
1807
  function: 'fetchMeetingInfo'
1807
1808
  }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
1809
+ this.updateMeetingActions();
1808
1810
  return _context3.abrupt("return", _promise.default.resolve());
1809
- case 20:
1810
- _context3.prev = 20;
1811
+ case 21:
1812
+ _context3.prev = 21;
1811
1813
  _context3.t0 = _context3["catch"](6);
1814
+ this.updateMeetingActions();
1812
1815
  if (!(_context3.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
1813
- _context3.next = 29;
1816
+ _context3.next = 31;
1814
1817
  break;
1815
1818
  }
1816
1819
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
@@ -1819,9 +1822,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1819
1822
  this.meetingInfo = _context3.t0.meetingInfo;
1820
1823
  }
1821
1824
  throw new _permission.default();
1822
- case 29:
1825
+ case 31:
1823
1826
  if (!(_context3.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
1824
- _context3.next = 41;
1827
+ _context3.next = 43;
1825
1828
  break;
1826
1829
  }
1827
1830
  _loggerProxy.default.logger.info( // @ts-ignore
@@ -1836,16 +1839,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1836
1839
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
1837
1840
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
1838
1841
  if (!this.requiredCaptcha) {
1839
- _context3.next = 38;
1842
+ _context3.next = 40;
1840
1843
  break;
1841
1844
  }
1842
- _context3.next = 38;
1845
+ _context3.next = 40;
1843
1846
  return this.refreshCaptcha();
1844
- case 38:
1847
+ case 40:
1845
1848
  throw new _passwordError.default();
1846
- case 41:
1849
+ case 43:
1847
1850
  if (!(_context3.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
1848
- _context3.next = 50;
1851
+ _context3.next = 52;
1849
1852
  break;
1850
1853
  }
1851
1854
  _loggerProxy.default.logger.info( // @ts-ignore
@@ -1857,14 +1860,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1857
1860
  }
1858
1861
  this.requiredCaptcha = _context3.t0.captchaInfo;
1859
1862
  throw new _captchaError.default();
1860
- case 50:
1863
+ case 52:
1861
1864
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
1862
1865
  throw _context3.t0;
1863
- case 52:
1866
+ case 54:
1864
1867
  case "end":
1865
1868
  return _context3.stop();
1866
1869
  }
1867
- }, _callee3, this, [[6, 20]]);
1870
+ }, _callee3, this, [[6, 21]]);
1868
1871
  }));
1869
1872
  function fetchMeetingInfo(_x) {
1870
1873
  return _fetchMeetingInfo.apply(this, arguments);
@@ -2718,6 +2721,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2718
2721
  _this15.locusId = (_this15$locusUrl = _this15.locusUrl) === null || _this15$locusUrl === void 0 ? void 0 : _this15$locusUrl.split('/').pop();
2719
2722
  _this15.recordingController.setLocusUrl(_this15.locusUrl);
2720
2723
  _this15.controlsOptionsManager.setLocusUrl(_this15.locusUrl);
2724
+ _triggerProxy.default.trigger(_this15, {
2725
+ file: 'meeting/index',
2726
+ function: 'setUpLocusSelfListener'
2727
+ }, _constants.EVENT_TRIGGERS.MEETING_LOCUS_URL_UPDATE, {
2728
+ locusUrl: payload
2729
+ });
2721
2730
  });
2722
2731
  }
2723
2732
 
@@ -2774,169 +2783,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2774
2783
  });
2775
2784
  }
2776
2785
  });
2777
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (payload) {
2778
- if (payload && payload.info) {
2779
- var changed = _this17.inMeetingActions.set({
2780
- canInviteNewParticipants: _util.default.canInviteNewParticipants(payload.info.userDisplayHints),
2781
- canAdmitParticipant: _util.default.canAdmitParticipant(payload.info.userDisplayHints),
2782
- canLock: _util.default.canUserLock(payload.info.userDisplayHints),
2783
- canUnlock: _util.default.canUserUnlock(payload.info.userDisplayHints),
2784
- canSetDisallowUnmute: _util3.default.canSetDisallowUnmute(payload.info.userDisplayHints),
2785
- canUnsetDisallowUnmute: _util3.default.canUnsetDisallowUnmute(payload.info.userDisplayHints),
2786
- canSetMuteOnEntry: _util3.default.canSetMuteOnEntry(payload.info.userDisplayHints),
2787
- canUnsetMuteOnEntry: _util3.default.canUnsetMuteOnEntry(payload.info.userDisplayHints),
2788
- canSetMuted: _util3.default.canSetMuted(payload.info.userDisplayHints),
2789
- canUnsetMuted: _util3.default.canUnsetMuted(payload.info.userDisplayHints),
2790
- canStartRecording: _util2.default.canUserStart(payload.info.userDisplayHints, _this17.selfUserPolicies),
2791
- canStopRecording: _util2.default.canUserStop(payload.info.userDisplayHints, _this17.selfUserPolicies),
2792
- canPauseRecording: _util2.default.canUserPause(payload.info.userDisplayHints, _this17.selfUserPolicies),
2793
- canResumeRecording: _util2.default.canUserResume(payload.info.userDisplayHints, _this17.selfUserPolicies),
2794
- canRaiseHand: _util.default.canUserRaiseHand(payload.info.userDisplayHints),
2795
- canLowerAllHands: _util.default.canUserLowerAllHands(payload.info.userDisplayHints),
2796
- canLowerSomeoneElsesHand: _util.default.canUserLowerSomeoneElsesHand(payload.info.userDisplayHints),
2797
- bothLeaveAndEndMeetingAvailable: _util.default.bothLeaveAndEndMeetingAvailable(payload.info.userDisplayHints),
2798
- canEnableClosedCaption: _util.default.canEnableClosedCaption(payload.info.userDisplayHints),
2799
- canStartTranscribing: _util.default.canStartTranscribing(payload.info.userDisplayHints),
2800
- canStopTranscribing: _util.default.canStopTranscribing(payload.info.userDisplayHints),
2801
- isClosedCaptionActive: _util.default.isClosedCaptionActive(payload.info.userDisplayHints),
2802
- isSaveTranscriptsEnabled: _util.default.isSaveTranscriptsEnabled(payload.info.userDisplayHints),
2803
- isWebexAssistantActive: _util.default.isWebexAssistantActive(payload.info.userDisplayHints),
2804
- canViewCaptionPanel: _util.default.canViewCaptionPanel(payload.info.userDisplayHints),
2805
- isRealTimeTranslationEnabled: _util.default.isRealTimeTranslationEnabled(payload.info.userDisplayHints),
2806
- canSelectSpokenLanguages: _util.default.canSelectSpokenLanguages(payload.info.userDisplayHints),
2807
- waitingForOthersToJoin: _util.default.waitingForOthersToJoin(payload.info.userDisplayHints),
2808
- canSendReactions: _util.default.canSendReactions(_this17.inMeetingActions.canSendReactions, payload.info.userDisplayHints),
2809
- canManageBreakout: _util.default.canManageBreakout(payload.info.userDisplayHints),
2810
- canBroadcastMessageToBreakout: _util.default.canBroadcastMessageToBreakout(payload.info.userDisplayHints, _this17.selfUserPolicies),
2811
- canAdmitLobbyToBreakout: _util.default.canAdmitLobbyToBreakout(payload.info.userDisplayHints),
2812
- isBreakoutPreassignmentsEnabled: _util.default.isBreakoutPreassignmentsEnabled(payload.info.userDisplayHints),
2813
- canUserAskForHelp: _util.default.canUserAskForHelp(payload.info.userDisplayHints),
2814
- canUserRenameSelfAndObserved: _util.default.canUserRenameSelfAndObserved(payload.info.userDisplayHints),
2815
- canUserRenameOthers: _util.default.canUserRenameOthers(payload.info.userDisplayHints),
2816
- canMuteAll: _util3.default.hasHints({
2817
- requiredHints: [_constants.DISPLAY_HINTS.MUTE_ALL],
2818
- displayHints: payload.info.userDisplayHints
2819
- }),
2820
- canUnmuteAll: _util3.default.hasHints({
2821
- requiredHints: [_constants.DISPLAY_HINTS.UNMUTE_ALL],
2822
- displayHints: payload.info.userDisplayHints
2823
- }),
2824
- canEnableHardMute: _util3.default.hasHints({
2825
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_HARD_MUTE],
2826
- displayHints: payload.info.userDisplayHints
2827
- }),
2828
- canDisableHardMute: _util3.default.hasHints({
2829
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_HARD_MUTE],
2830
- displayHints: payload.info.userDisplayHints
2831
- }),
2832
- canEnableMuteOnEntry: _util3.default.hasHints({
2833
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY],
2834
- displayHints: payload.info.userDisplayHints
2835
- }),
2836
- canDisableMuteOnEntry: _util3.default.hasHints({
2837
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY],
2838
- displayHints: payload.info.userDisplayHints
2839
- }),
2840
- canEnableReactions: _util3.default.hasHints({
2841
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_REACTIONS],
2842
- displayHints: payload.info.userDisplayHints
2843
- }),
2844
- canDisableReactions: _util3.default.hasHints({
2845
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_REACTIONS],
2846
- displayHints: payload.info.userDisplayHints
2847
- }),
2848
- canEnableReactionDisplayNames: _util3.default.hasHints({
2849
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME],
2850
- displayHints: payload.info.userDisplayHints
2851
- }),
2852
- canDisableReactionDisplayNames: _util3.default.hasHints({
2853
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME],
2854
- displayHints: payload.info.userDisplayHints
2855
- }),
2856
- canUpdateShareControl: _util3.default.hasHints({
2857
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_CONTROL],
2858
- displayHints: payload.info.userDisplayHints
2859
- }),
2860
- canEnableViewTheParticipantsList: _util3.default.hasHints({
2861
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST],
2862
- displayHints: payload.info.userDisplayHints
2863
- }),
2864
- canDisableViewTheParticipantsList: _util3.default.hasHints({
2865
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST],
2866
- displayHints: payload.info.userDisplayHints
2867
- }),
2868
- canEnableRaiseHand: _util3.default.hasHints({
2869
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_RAISE_HAND],
2870
- displayHints: payload.info.userDisplayHints
2871
- }),
2872
- canDisableRaiseHand: _util3.default.hasHints({
2873
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_RAISE_HAND],
2874
- displayHints: payload.info.userDisplayHints
2875
- }),
2876
- canEnableVideo: _util3.default.hasHints({
2877
- requiredHints: [_constants.DISPLAY_HINTS.ENABLE_VIDEO],
2878
- displayHints: payload.info.userDisplayHints
2879
- }),
2880
- canDisableVideo: _util3.default.hasHints({
2881
- requiredHints: [_constants.DISPLAY_HINTS.DISABLE_VIDEO],
2882
- displayHints: payload.info.userDisplayHints
2883
- }),
2884
- canShareFile: _util3.default.hasHints({
2885
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_FILE],
2886
- displayHints: payload.info.userDisplayHints
2887
- }) && _util3.default.hasPolicies({
2888
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_SHARE],
2889
- policies: _this17.selfUserPolicies
2890
- }),
2891
- canTransferFile: _util3.default.hasPolicies({
2892
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_TRANSFER],
2893
- policies: _this17.selfUserPolicies
2894
- }),
2895
- canShareApplication: _util3.default.hasHints({
2896
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_APPLICATION],
2897
- displayHints: payload.info.userDisplayHints
2898
- }) && (_util3.default.hasPolicies({
2899
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_APP_SHARE],
2900
- policies: _this17.selfUserPolicies
2901
- }) ||
2902
- // @ts-ignore
2903
- !_this17.config.experimental.enableUnifiedMeetings) || _this17.isLocusCall(),
2904
- canShareCamera: _util3.default.hasHints({
2905
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_CAMERA],
2906
- displayHints: payload.info.userDisplayHints
2907
- }) && _util3.default.hasPolicies({
2908
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_CAMERA_SHARE],
2909
- policies: _this17.selfUserPolicies
2910
- }),
2911
- canShareDesktop: _util3.default.hasHints({
2912
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_DESKTOP],
2913
- displayHints: payload.info.userDisplayHints
2914
- }) && (_util3.default.hasPolicies({
2915
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_DESKTOP_SHARE],
2916
- policies: _this17.selfUserPolicies
2917
- }) ||
2918
- // @ts-ignore
2919
- !_this17.config.experimental.enableUnifiedMeetings) || _this17.isLocusCall(),
2920
- canShareContent: _util3.default.hasHints({
2921
- requiredHints: [_constants.DISPLAY_HINTS.SHARE_CONTENT],
2922
- displayHints: payload.info.userDisplayHints
2923
- }) || _this17.isLocusCall(),
2924
- canAnnotate: _util3.default.hasPolicies({
2925
- requiredPolicies: [_constants.SELF_POLICY.SUPPORT_ANNOTATION],
2926
- policies: _this17.selfUserPolicies
2927
- })
2928
- });
2929
- _this17.recordingController.setDisplayHints(payload.info.userDisplayHints);
2930
- _this17.recordingController.setUserPolicy(_this17.selfUserPolicies);
2931
- _this17.controlsOptionsManager.setDisplayHints(payload.info.userDisplayHints);
2932
- if (changed) {
2933
- _triggerProxy.default.trigger(_this17, {
2934
- file: 'meeting/index',
2935
- function: 'setUpLocusInfoMeetingInfoListener'
2936
- }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this17.inMeetingActions.get());
2937
- }
2938
- _this17.handleDataChannelUrlChange(payload.info.datachannelUrl);
2939
- }
2786
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function () {
2787
+ _this17.updateMeetingActions();
2788
+ _this17.recordingController.setDisplayHints(_this17.userDisplayHints);
2789
+ _this17.recordingController.setUserPolicy(_this17.selfUserPolicies);
2790
+ _this17.controlsOptionsManager.setDisplayHints(_this17.userDisplayHints);
2791
+ _this17.handleDataChannelUrlChange(_this17.datachannelUrl);
2940
2792
  });
2941
2793
  }
2942
2794
 
@@ -2948,14 +2800,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2948
2800
  }, {
2949
2801
  key: "handleDataChannelUrlChange",
2950
2802
  value: function handleDataChannelUrlChange(datachannelUrl) {
2951
- var _this18 = this;
2952
2803
  // @ts-ignore - config coming from registerPlugin
2953
2804
  if (datachannelUrl && this.config.enableAutomaticLLM) {
2954
- // Defer this as updateLLMConnection relies upon this.locusInfo.url which is only set
2955
- // after the MEETING_INFO_UPDATED callback finishes
2956
- (0, _defer2.default)(function () {
2957
- _this18.updateLLMConnection();
2958
- });
2805
+ this.updateLLMConnection();
2959
2806
  }
2960
2807
  }
2961
2808
 
@@ -2968,10 +2815,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2968
2815
  }, {
2969
2816
  key: "setUpLocusEmbeddedAppsListener",
2970
2817
  value: function setUpLocusEmbeddedAppsListener() {
2971
- var _this19 = this;
2818
+ var _this18 = this;
2972
2819
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, function (embeddedApps) {
2973
2820
  if (embeddedApps) {
2974
- _triggerProxy.default.trigger(_this19, {
2821
+ _triggerProxy.default.trigger(_this18, {
2975
2822
  file: 'meeting/index',
2976
2823
  function: 'setUpLocusEmbeddedAppsListener'
2977
2824
  }, _constants.EVENT_TRIGGERS.MEETING_EMBEDDED_APPS_UPDATE, embeddedApps);
@@ -2988,11 +2835,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2988
2835
  }, {
2989
2836
  key: "setUpLocusInfoSelfListener",
2990
2837
  value: function setUpLocusInfoSelfListener() {
2991
- var _this20 = this;
2838
+ var _this19 = this;
2992
2839
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
2993
- if (_this20.audio) {
2994
- _this20.audio.handleServerLocalUnmuteRequired(_this20);
2995
- _triggerProxy.default.trigger(_this20, {
2840
+ if (_this19.audio) {
2841
+ _this19.audio.handleServerLocalUnmuteRequired(_this19);
2842
+ _triggerProxy.default.trigger(_this19, {
2996
2843
  file: 'meeting/index',
2997
2844
  function: 'setUpLocusInfoSelfListener'
2998
2845
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -3002,13 +2849,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3002
2849
  });
3003
2850
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, function (payload) {
3004
2851
  if (payload) {
3005
- if (_this20.video) {
2852
+ if (_this19.video) {
3006
2853
  var _payload$muted, _payload$unmuteAllowe;
3007
- payload.muted = (_payload$muted = payload.muted) !== null && _payload$muted !== void 0 ? _payload$muted : _this20.video.isRemotelyMuted();
3008
- payload.unmuteAllowed = (_payload$unmuteAllowe = payload.unmuteAllowed) !== null && _payload$unmuteAllowe !== void 0 ? _payload$unmuteAllowe : _this20.video.isUnmuteAllowed();
3009
- _this20.video.handleServerRemoteMuteUpdate(_this20, payload.muted, payload.unmuteAllowed);
2854
+ payload.muted = (_payload$muted = payload.muted) !== null && _payload$muted !== void 0 ? _payload$muted : _this19.video.isRemotelyMuted();
2855
+ payload.unmuteAllowed = (_payload$unmuteAllowe = payload.unmuteAllowed) !== null && _payload$unmuteAllowe !== void 0 ? _payload$unmuteAllowe : _this19.video.isUnmuteAllowed();
2856
+ _this19.video.handleServerRemoteMuteUpdate(_this19, payload.muted, payload.unmuteAllowed);
3010
2857
  }
3011
- _triggerProxy.default.trigger(_this20, {
2858
+ _triggerProxy.default.trigger(_this19, {
3012
2859
  file: 'meeting/index',
3013
2860
  function: 'setUpLocusInfoSelfListener'
3014
2861
  }, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_VIDEO_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_VIDEO_UNMUTED_BY_OTHERS, {
@@ -3018,15 +2865,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3018
2865
  });
3019
2866
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
3020
2867
  if (payload) {
3021
- var _this20$audio;
3022
- if (_this20.audio) {
3023
- _this20.audio.handleServerRemoteMuteUpdate(_this20, payload.muted, payload.unmuteAllowed);
2868
+ var _this19$audio;
2869
+ if (_this19.audio) {
2870
+ _this19.audio.handleServerRemoteMuteUpdate(_this19, payload.muted, payload.unmuteAllowed);
3024
2871
  }
3025
2872
  // with "mute on entry" server will send us remote mute even if we don't have media configured,
3026
2873
  // so if being muted by others, always send the notification,
3027
2874
  // but if being unmuted, only send it if we are also locally unmuted
3028
- if (payload.muted || !((_this20$audio = _this20.audio) !== null && _this20$audio !== void 0 && _this20$audio.isMuted())) {
3029
- _triggerProxy.default.trigger(_this20, {
2875
+ if (payload.muted || !((_this19$audio = _this19.audio) !== null && _this19$audio !== void 0 && _this19$audio.isMuted())) {
2876
+ _triggerProxy.default.trigger(_this19, {
3030
2877
  file: 'meeting/index',
3031
2878
  function: 'setUpLocusInfoSelfListener'
3032
2879
  }, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -3036,7 +2883,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3036
2883
  }
3037
2884
  });
3038
2885
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
3039
- _triggerProxy.default.trigger(_this20, {
2886
+ _triggerProxy.default.trigger(_this19, {
3040
2887
  file: 'meeting/index',
3041
2888
  function: 'setUpLocusInfoSelfListener'
3042
2889
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
@@ -3045,8 +2892,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3045
2892
  });
3046
2893
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
3047
2894
  if (payload) {
3048
- _this20.startKeepAlive();
3049
- _triggerProxy.default.trigger(_this20, {
2895
+ _this19.startKeepAlive();
2896
+ _triggerProxy.default.trigger(_this19, {
3050
2897
  file: 'meeting/index',
3051
2898
  function: 'setUpLocusInfoSelfListener'
3052
2899
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
@@ -3054,18 +2901,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3054
2901
  });
3055
2902
 
3056
2903
  // @ts-ignore
3057
- _this20.webex.internal.newMetrics.submitClientEvent({
2904
+ _this19.webex.internal.newMetrics.submitClientEvent({
3058
2905
  name: 'client.lobby.entered',
3059
2906
  options: {
3060
- meetingId: _this20.id
2907
+ meetingId: _this19.id
3061
2908
  }
3062
2909
  });
3063
2910
  }
3064
2911
  });
3065
2912
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
3066
- _this20.stopKeepAlive();
2913
+ _this19.stopKeepAlive();
3067
2914
  if (payload) {
3068
- _triggerProxy.default.trigger(_this20, {
2915
+ _triggerProxy.default.trigger(_this19, {
3069
2916
  file: 'meeting/index',
3070
2917
  function: 'setUpLocusInfoSelfListener'
3071
2918
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
@@ -3073,10 +2920,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3073
2920
  });
3074
2921
 
3075
2922
  // @ts-ignore
3076
- _this20.webex.internal.newMetrics.submitClientEvent({
2923
+ _this19.webex.internal.newMetrics.submitClientEvent({
3077
2924
  name: 'client.lobby.exited',
3078
2925
  options: {
3079
- meetingId: _this20.id
2926
+ meetingId: _this19.id
3080
2927
  }
3081
2928
  });
3082
2929
  }
@@ -3085,34 +2932,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3085
2932
  // @ts-ignore - check if MEDIA_INACTIVITY exists
3086
2933
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
3087
2934
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MEDIA_INACTIVE, {
3088
- correlation_id: _this20.correlationId,
3089
- locus_id: _this20.locusId
2935
+ correlation_id: _this19.correlationId,
2936
+ locus_id: _this19.locusId
3090
2937
  });
3091
- _this20.reconnect();
2938
+ _this19.reconnect();
3092
2939
  });
3093
2940
 
3094
2941
  // There is two stats for mute one is the actual media being sent or received
3095
2942
  // The second on is if the audio is muted, we need to tell the statsAnalyzer when
3096
2943
  // the audio is muted or the user is not willing to send media
3097
2944
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
3098
- if (_this20.statsAnalyzer) {
3099
- var _this20$mediaProperti, _this20$audio2, _this20$mediaProperti2, _this20$video, _this20$mediaProperti3, _this20$mediaProperti4, _this20$mediaProperti5, _this20$mediaProperti6;
3100
- _this20.statsAnalyzer.updateMediaStatus({
2945
+ if (_this19.statsAnalyzer) {
2946
+ var _this19$mediaProperti, _this19$audio2, _this19$mediaProperti2, _this19$video, _this19$mediaProperti3, _this19$mediaProperti4, _this19$mediaProperti5, _this19$mediaProperti6;
2947
+ _this19.statsAnalyzer.updateMediaStatus({
3101
2948
  actual: status,
3102
2949
  expected: {
3103
2950
  // We need to check what should be the actual direction of media
3104
- sendAudio: ((_this20$mediaProperti = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti === void 0 ? void 0 : _this20$mediaProperti.sendAudio) && !((_this20$audio2 = _this20.audio) !== null && _this20$audio2 !== void 0 && _this20$audio2.isMuted()),
3105
- sendVideo: ((_this20$mediaProperti2 = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti2 === void 0 ? void 0 : _this20$mediaProperti2.sendVideo) && !((_this20$video = _this20.video) !== null && _this20$video !== void 0 && _this20$video.isMuted()),
3106
- sendShare: (_this20$mediaProperti3 = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti3 === void 0 ? void 0 : _this20$mediaProperti3.sendShare,
3107
- receiveAudio: (_this20$mediaProperti4 = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti4 === void 0 ? void 0 : _this20$mediaProperti4.receiveAudio,
3108
- receiveVideo: (_this20$mediaProperti5 = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti5 === void 0 ? void 0 : _this20$mediaProperti5.receiveVideo,
3109
- receiveShare: (_this20$mediaProperti6 = _this20.mediaProperties.mediaDirection) === null || _this20$mediaProperti6 === void 0 ? void 0 : _this20$mediaProperti6.receiveShare
2951
+ sendAudio: ((_this19$mediaProperti = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti === void 0 ? void 0 : _this19$mediaProperti.sendAudio) && !((_this19$audio2 = _this19.audio) !== null && _this19$audio2 !== void 0 && _this19$audio2.isMuted()),
2952
+ sendVideo: ((_this19$mediaProperti2 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti2 === void 0 ? void 0 : _this19$mediaProperti2.sendVideo) && !((_this19$video = _this19.video) !== null && _this19$video !== void 0 && _this19$video.isMuted()),
2953
+ sendShare: (_this19$mediaProperti3 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti3 === void 0 ? void 0 : _this19$mediaProperti3.sendShare,
2954
+ receiveAudio: (_this19$mediaProperti4 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti4 === void 0 ? void 0 : _this19$mediaProperti4.receiveAudio,
2955
+ receiveVideo: (_this19$mediaProperti5 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti5 === void 0 ? void 0 : _this19$mediaProperti5.receiveVideo,
2956
+ receiveShare: (_this19$mediaProperti6 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti6 === void 0 ? void 0 : _this19$mediaProperti6.receiveShare
3110
2957
  }
3111
2958
  });
3112
2959
  }
3113
2960
  });
3114
2961
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, function (payload) {
3115
- _triggerProxy.default.trigger(_this20, {
2962
+ _triggerProxy.default.trigger(_this19, {
3116
2963
  file: 'meeting/index',
3117
2964
  function: 'setUpLocusInfoSelfListener'
3118
2965
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST, {
@@ -3120,15 +2967,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3120
2967
  });
3121
2968
  });
3122
2969
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, function (payload) {
3123
- _this20.breakouts.updateBreakoutSessions(payload);
3124
- _triggerProxy.default.trigger(_this20, {
2970
+ _this19.breakouts.updateBreakoutSessions(payload);
2971
+ _triggerProxy.default.trigger(_this19, {
3125
2972
  file: 'meeting/index',
3126
2973
  function: 'setUpLocusInfoSelfListener'
3127
2974
  }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
3128
2975
  });
3129
2976
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED, function (payload) {
3130
- _this20.simultaneousInterpretation.updateSelfInterpretation(payload);
3131
- _triggerProxy.default.trigger(_this20, {
2977
+ _this19.simultaneousInterpretation.updateSelfInterpretation(payload);
2978
+ _triggerProxy.default.trigger(_this19, {
3132
2979
  file: 'meeting/index',
3133
2980
  function: 'setUpLocusInfoSelfListener'
3134
2981
  }, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
@@ -3136,9 +2983,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3136
2983
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, function (payload) {
3137
2984
  var _payload$newRoles, _payload$newRoles2, _payload$newRoles3;
3138
2985
  var isModeratorOrCohost = ((_payload$newRoles = payload.newRoles) === null || _payload$newRoles === void 0 ? void 0 : _payload$newRoles.includes(_constants.SELF_ROLES.MODERATOR)) || ((_payload$newRoles2 = payload.newRoles) === null || _payload$newRoles2 === void 0 ? void 0 : _payload$newRoles2.includes(_constants.SELF_ROLES.COHOST));
3139
- _this20.breakouts.updateCanManageBreakouts(isModeratorOrCohost);
3140
- _this20.simultaneousInterpretation.updateCanManageInterpreters((_payload$newRoles3 = payload.newRoles) === null || _payload$newRoles3 === void 0 ? void 0 : _payload$newRoles3.includes(_constants.SELF_ROLES.MODERATOR));
3141
- _triggerProxy.default.trigger(_this20, {
2986
+ _this19.breakouts.updateCanManageBreakouts(isModeratorOrCohost);
2987
+ _this19.simultaneousInterpretation.updateCanManageInterpreters((_payload$newRoles3 = payload.newRoles) === null || _payload$newRoles3 === void 0 ? void 0 : _payload$newRoles3.includes(_constants.SELF_ROLES.MODERATOR));
2988
+ _triggerProxy.default.trigger(_this19, {
3142
2989
  file: 'meeting/index',
3143
2990
  function: 'setUpLocusInfoSelfListener'
3144
2991
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_ROLES_CHANGED, {
@@ -3146,7 +2993,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3146
2993
  });
3147
2994
  });
3148
2995
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE, function (payload) {
3149
- _triggerProxy.default.trigger(_this20, {
2996
+ _triggerProxy.default.trigger(_this19, {
3150
2997
  file: 'meeting/index',
3151
2998
  function: 'setUpLocusInfoSelfListener'
3152
2999
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_IS_SHARING_BLOCKED, {
@@ -3164,17 +3011,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3164
3011
  }, {
3165
3012
  key: "setUpLocusInfoMeetingListener",
3166
3013
  value: function setUpLocusInfoMeetingListener() {
3167
- var _this21 = this;
3014
+ var _this20 = this;
3168
3015
  this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
3169
- _this21.meetingFiniteStateMachine.remote(payload);
3016
+ _this20.meetingFiniteStateMachine.remote(payload);
3170
3017
  if (payload.remoteDeclined) {
3171
- _this21.leave({
3018
+ _this20.leave({
3172
3019
  reason: payload.reason
3173
3020
  }).then(function () {
3174
3021
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
3175
3022
  }).catch(function (error) {
3176
3023
  // @ts-ignore
3177
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this21, ", error: ").concat(error));
3024
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(error));
3178
3025
  });
3179
3026
  }
3180
3027
  });
@@ -3183,23 +3030,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3183
3030
  return _regenerator.default.wrap(function _callee5$(_context5) {
3184
3031
  while (1) switch (_context5.prev = _context5.next) {
3185
3032
  case 0:
3186
- if (!_this21.wirelessShare) {
3033
+ if (!_this20.wirelessShare) {
3187
3034
  _context5.next = 7;
3188
3035
  break;
3189
3036
  }
3190
- if (!_this21.mediaProperties.shareVideoTrack) {
3037
+ if (!_this20.mediaProperties.shareVideoTrack) {
3191
3038
  _context5.next = 4;
3192
3039
  break;
3193
3040
  }
3194
3041
  _context5.next = 4;
3195
- return _this21.setLocalShareVideoTrack(undefined);
3042
+ return _this20.setLocalShareVideoTrack(undefined);
3196
3043
  case 4:
3197
- if (!_this21.mediaProperties.shareAudioTrack) {
3044
+ if (!_this20.mediaProperties.shareAudioTrack) {
3198
3045
  _context5.next = 7;
3199
3046
  break;
3200
3047
  }
3201
3048
  _context5.next = 7;
3202
- return _this21.setLocalShareAudioTrack(undefined);
3049
+ return _this20.setLocalShareAudioTrack(undefined);
3203
3050
  case 7:
3204
3051
  if (!payload.shouldLeave) {
3205
3052
  _context5.next = 19;
@@ -3207,7 +3054,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3207
3054
  }
3208
3055
  _context5.prev = 8;
3209
3056
  _context5.next = 11;
3210
- return _this21.leave({
3057
+ return _this20.leave({
3211
3058
  reason: payload.reason
3212
3059
  });
3213
3060
  case 11:
@@ -3218,19 +3065,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3218
3065
  _context5.prev = 14;
3219
3066
  _context5.t0 = _context5["catch"](8);
3220
3067
  // @ts-ignore
3221
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this21, ", error: ").concat(_context5.t0));
3068
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context5.t0));
3222
3069
  case 17:
3223
3070
  _context5.next = 22;
3224
3071
  break;
3225
3072
  case 19:
3226
3073
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
3227
- _util.default.cleanUp(_this21);
3228
- _triggerProxy.default.trigger(_this21, {
3074
+ _util.default.cleanUp(_this20);
3075
+ _triggerProxy.default.trigger(_this20, {
3229
3076
  file: 'meeting/index',
3230
3077
  function: 'setUpLocusInfoMeetingListener'
3231
3078
  }, _constants.EVENTS.DESTROY_MEETING, {
3232
3079
  reason: payload.reason,
3233
- meetingId: _this21.id
3080
+ meetingId: _this20.id
3234
3081
  });
3235
3082
  case 22:
3236
3083
  case "end":
@@ -3255,13 +3102,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3255
3102
  }, {
3256
3103
  key: "updateMeetingObject",
3257
3104
  value: function updateMeetingObject(object) {
3258
- var _this22 = this;
3105
+ var _this21 = this;
3259
3106
  // Validate if these are valid meeting object property
3260
3107
  // TODO: add a check to make sure the value passed in the constructor
3261
3108
  // is not changed by any delta event
3262
3109
  if (object && (0, _keys.default)(object).length) {
3263
3110
  (0, _keys.default)(object).forEach(function (key) {
3264
- _this22[key] = object[key];
3111
+ _this21[key] = object[key];
3265
3112
  });
3266
3113
  }
3267
3114
  }
@@ -3434,6 +3281,208 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3434
3281
  _util.default.parseInterpretationInfo(this, webexMeetingInfo);
3435
3282
  }
3436
3283
 
3284
+ /**
3285
+ * Indicates whether policy can be applied
3286
+ * @returns {boolean}
3287
+ */
3288
+ }, {
3289
+ key: "arePolicyRestrictionsSupported",
3290
+ value: function arePolicyRestrictionsSupported() {
3291
+ // Locus calls do not return the correct display hints
3292
+ if (this.isLocusCall()) {
3293
+ return false;
3294
+ }
3295
+
3296
+ // 1-2-1 calls and SIP dialling will have no meeting info
3297
+ // so cannot support policy information
3298
+ if ((0, _isEmpty2.default)(this.meetingInfo)) {
3299
+ return false;
3300
+ }
3301
+
3302
+ // Old locus info api does not return policy information
3303
+ // @ts-ignore
3304
+ if (!this.config.experimental.enableUnifiedMeetings) {
3305
+ return false;
3306
+ }
3307
+ return true;
3308
+ }
3309
+
3310
+ /**
3311
+ * Updates the meeting actions (display hints), depends on locus display hints, user policy and app api info
3312
+ * @returns {undefined}
3313
+ * @private
3314
+ * @memberof Meeting
3315
+ */
3316
+ }, {
3317
+ key: "updateMeetingActions",
3318
+ value: function updateMeetingActions() {
3319
+ var _this$meetingInfo;
3320
+ var changed = false;
3321
+ changed = this.inMeetingActions.set({
3322
+ canUseVoip: (this.userDisplayHints !== undefined ? _util3.default.hasHints({
3323
+ requiredHints: [_constants.DISPLAY_HINTS.VOIP_IS_ENABLED],
3324
+ displayHints: this.userDisplayHints
3325
+ }) : ((_this$meetingInfo = this.meetingInfo) === null || _this$meetingInfo === void 0 ? void 0 : _this$meetingInfo.supportVoIP) === true) && _util3.default.hasPolicies({
3326
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_VOIP],
3327
+ policies: this.selfUserPolicies
3328
+ }) || !this.arePolicyRestrictionsSupported()
3329
+ });
3330
+ if (this.userDisplayHints !== undefined) {
3331
+ changed = this.inMeetingActions.set({
3332
+ canInviteNewParticipants: _util.default.canInviteNewParticipants(this.userDisplayHints),
3333
+ canAdmitParticipant: _util.default.canAdmitParticipant(this.userDisplayHints),
3334
+ canLock: _util.default.canUserLock(this.userDisplayHints),
3335
+ canUnlock: _util.default.canUserUnlock(this.userDisplayHints),
3336
+ canSetDisallowUnmute: _util3.default.canSetDisallowUnmute(this.userDisplayHints),
3337
+ canUnsetDisallowUnmute: _util3.default.canUnsetDisallowUnmute(this.userDisplayHints),
3338
+ canSetMuteOnEntry: _util3.default.canSetMuteOnEntry(this.userDisplayHints),
3339
+ canUnsetMuteOnEntry: _util3.default.canUnsetMuteOnEntry(this.userDisplayHints),
3340
+ canSetMuted: _util3.default.canSetMuted(this.userDisplayHints),
3341
+ canUnsetMuted: _util3.default.canUnsetMuted(this.userDisplayHints),
3342
+ canStartRecording: _util2.default.canUserStart(this.userDisplayHints, this.selfUserPolicies),
3343
+ canStopRecording: _util2.default.canUserStop(this.userDisplayHints, this.selfUserPolicies),
3344
+ canPauseRecording: _util2.default.canUserPause(this.userDisplayHints, this.selfUserPolicies),
3345
+ canResumeRecording: _util2.default.canUserResume(this.userDisplayHints, this.selfUserPolicies),
3346
+ canRaiseHand: _util.default.canUserRaiseHand(this.userDisplayHints),
3347
+ canLowerAllHands: _util.default.canUserLowerAllHands(this.userDisplayHints),
3348
+ canLowerSomeoneElsesHand: _util.default.canUserLowerSomeoneElsesHand(this.userDisplayHints),
3349
+ bothLeaveAndEndMeetingAvailable: _util.default.bothLeaveAndEndMeetingAvailable(this.userDisplayHints),
3350
+ canEnableClosedCaption: _util.default.canEnableClosedCaption(this.userDisplayHints),
3351
+ canStartTranscribing: _util.default.canStartTranscribing(this.userDisplayHints),
3352
+ canStopTranscribing: _util.default.canStopTranscribing(this.userDisplayHints),
3353
+ isClosedCaptionActive: _util.default.isClosedCaptionActive(this.userDisplayHints),
3354
+ isSaveTranscriptsEnabled: _util.default.isSaveTranscriptsEnabled(this.userDisplayHints),
3355
+ isWebexAssistantActive: _util.default.isWebexAssistantActive(this.userDisplayHints),
3356
+ canViewCaptionPanel: _util.default.canViewCaptionPanel(this.userDisplayHints),
3357
+ isRealTimeTranslationEnabled: _util.default.isRealTimeTranslationEnabled(this.userDisplayHints),
3358
+ canSelectSpokenLanguages: _util.default.canSelectSpokenLanguages(this.userDisplayHints),
3359
+ waitingForOthersToJoin: _util.default.waitingForOthersToJoin(this.userDisplayHints),
3360
+ canSendReactions: _util.default.canSendReactions(this.inMeetingActions.canSendReactions, this.userDisplayHints),
3361
+ canManageBreakout: _util.default.canManageBreakout(this.userDisplayHints),
3362
+ canBroadcastMessageToBreakout: _util.default.canBroadcastMessageToBreakout(this.userDisplayHints, this.selfUserPolicies),
3363
+ canAdmitLobbyToBreakout: _util.default.canAdmitLobbyToBreakout(this.userDisplayHints),
3364
+ isBreakoutPreassignmentsEnabled: _util.default.isBreakoutPreassignmentsEnabled(this.userDisplayHints),
3365
+ canUserAskForHelp: _util.default.canUserAskForHelp(this.userDisplayHints),
3366
+ canUserRenameSelfAndObserved: _util.default.canUserRenameSelfAndObserved(this.userDisplayHints),
3367
+ canUserRenameOthers: _util.default.canUserRenameOthers(this.userDisplayHints),
3368
+ canMuteAll: _util3.default.hasHints({
3369
+ requiredHints: [_constants.DISPLAY_HINTS.MUTE_ALL],
3370
+ displayHints: this.userDisplayHints
3371
+ }),
3372
+ canUnmuteAll: _util3.default.hasHints({
3373
+ requiredHints: [_constants.DISPLAY_HINTS.UNMUTE_ALL],
3374
+ displayHints: this.userDisplayHints
3375
+ }),
3376
+ canEnableHardMute: _util3.default.hasHints({
3377
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_HARD_MUTE],
3378
+ displayHints: this.userDisplayHints
3379
+ }),
3380
+ canDisableHardMute: _util3.default.hasHints({
3381
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_HARD_MUTE],
3382
+ displayHints: this.userDisplayHints
3383
+ }),
3384
+ canEnableMuteOnEntry: _util3.default.hasHints({
3385
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY],
3386
+ displayHints: this.userDisplayHints
3387
+ }),
3388
+ canDisableMuteOnEntry: _util3.default.hasHints({
3389
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY],
3390
+ displayHints: this.userDisplayHints
3391
+ }),
3392
+ canEnableReactions: _util3.default.hasHints({
3393
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_REACTIONS],
3394
+ displayHints: this.userDisplayHints
3395
+ }),
3396
+ canDisableReactions: _util3.default.hasHints({
3397
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_REACTIONS],
3398
+ displayHints: this.userDisplayHints
3399
+ }),
3400
+ canEnableReactionDisplayNames: _util3.default.hasHints({
3401
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME],
3402
+ displayHints: this.userDisplayHints
3403
+ }),
3404
+ canDisableReactionDisplayNames: _util3.default.hasHints({
3405
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME],
3406
+ displayHints: this.userDisplayHints
3407
+ }),
3408
+ canUpdateShareControl: _util3.default.hasHints({
3409
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_CONTROL],
3410
+ displayHints: this.userDisplayHints
3411
+ }),
3412
+ canEnableViewTheParticipantsList: _util3.default.hasHints({
3413
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST],
3414
+ displayHints: this.userDisplayHints
3415
+ }),
3416
+ canDisableViewTheParticipantsList: _util3.default.hasHints({
3417
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST],
3418
+ displayHints: this.userDisplayHints
3419
+ }),
3420
+ canEnableRaiseHand: _util3.default.hasHints({
3421
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_RAISE_HAND],
3422
+ displayHints: this.userDisplayHints
3423
+ }),
3424
+ canDisableRaiseHand: _util3.default.hasHints({
3425
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_RAISE_HAND],
3426
+ displayHints: this.userDisplayHints
3427
+ }),
3428
+ canEnableVideo: _util3.default.hasHints({
3429
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_VIDEO],
3430
+ displayHints: this.userDisplayHints
3431
+ }),
3432
+ canDisableVideo: _util3.default.hasHints({
3433
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_VIDEO],
3434
+ displayHints: this.userDisplayHints
3435
+ }),
3436
+ canShareFile: _util3.default.hasHints({
3437
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_FILE],
3438
+ displayHints: this.userDisplayHints
3439
+ }) && _util3.default.hasPolicies({
3440
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_SHARE],
3441
+ policies: this.selfUserPolicies
3442
+ }) || !this.arePolicyRestrictionsSupported,
3443
+ canTransferFile: _util3.default.hasPolicies({
3444
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_TRANSFER],
3445
+ policies: this.selfUserPolicies
3446
+ }),
3447
+ canShareApplication: _util3.default.hasHints({
3448
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_APPLICATION],
3449
+ displayHints: this.userDisplayHints
3450
+ }) && _util3.default.hasPolicies({
3451
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_APP_SHARE],
3452
+ policies: this.selfUserPolicies
3453
+ }) || !this.arePolicyRestrictionsSupported(),
3454
+ canShareCamera: _util3.default.hasHints({
3455
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_CAMERA],
3456
+ displayHints: this.userDisplayHints
3457
+ }) && _util3.default.hasPolicies({
3458
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_CAMERA_SHARE],
3459
+ policies: this.selfUserPolicies
3460
+ }),
3461
+ canShareDesktop: _util3.default.hasHints({
3462
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_DESKTOP],
3463
+ displayHints: this.userDisplayHints
3464
+ }) && _util3.default.hasPolicies({
3465
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_DESKTOP_SHARE],
3466
+ policies: this.selfUserPolicies
3467
+ }) || !this.arePolicyRestrictionsSupported(),
3468
+ canShareContent: _util3.default.hasHints({
3469
+ requiredHints: [_constants.DISPLAY_HINTS.SHARE_CONTENT],
3470
+ displayHints: this.userDisplayHints
3471
+ }) || !this.arePolicyRestrictionsSupported(),
3472
+ canAnnotate: _util3.default.hasPolicies({
3473
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_ANNOTATION],
3474
+ policies: this.selfUserPolicies
3475
+ })
3476
+ }) || changed;
3477
+ }
3478
+ if (changed) {
3479
+ _triggerProxy.default.trigger(this, {
3480
+ file: 'meeting/index',
3481
+ function: 'updateMeetingActions'
3482
+ }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, this.inMeetingActions.get());
3483
+ }
3484
+ }
3485
+
3437
3486
  /**
3438
3487
  * Sets the self user policies based on the contents of the permission token
3439
3488
  * @param {String} permissionToken
@@ -3541,7 +3590,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3541
3590
  }, {
3542
3591
  key: "closeRemoteTracks",
3543
3592
  value: function closeRemoteTracks() {
3544
- var _this23 = this;
3593
+ var _this22 = this;
3545
3594
  var _this$mediaProperties2 = this.mediaProperties,
3546
3595
  remoteAudioTrack = _this$mediaProperties2.remoteAudioTrack,
3547
3596
  remoteVideoTrack = _this$mediaProperties2.remoteVideoTrack,
@@ -3555,7 +3604,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3555
3604
  */
3556
3605
  // eslint-disable-next-line @typescript-eslint/no-shadow
3557
3606
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
3558
- _triggerProxy.default.trigger(_this23, {
3607
+ _triggerProxy.default.trigger(_this22, {
3559
3608
  file: 'meeting/index',
3560
3609
  function: 'closeRemoteTracks'
3561
3610
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3805,7 +3854,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3805
3854
  }, {
3806
3855
  key: "setMercuryListener",
3807
3856
  value: function setMercuryListener() {
3808
- var _this24 = this;
3857
+ var _this23 = this;
3809
3858
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
3810
3859
  // if the meeting has active peer connections, it should try to reconnect.
3811
3860
  // @ts-ignore
@@ -3813,33 +3862,33 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3813
3862
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
3814
3863
 
3815
3864
  // Only send restore event when it was disconnected before and for connected later
3816
- if (!_this24.hasWebsocketConnected) {
3865
+ if (!_this23.hasWebsocketConnected) {
3817
3866
  // @ts-ignore
3818
- _this24.webex.internal.newMetrics.submitClientEvent({
3867
+ _this23.webex.internal.newMetrics.submitClientEvent({
3819
3868
  name: 'client.mercury.connection.restored',
3820
3869
  options: {
3821
- meetingId: _this24.id
3870
+ meetingId: _this23.id
3822
3871
  }
3823
3872
  });
3824
3873
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
3825
- correlation_id: _this24.correlationId
3874
+ correlation_id: _this23.correlationId
3826
3875
  });
3827
3876
  }
3828
- _this24.hasWebsocketConnected = true;
3877
+ _this23.hasWebsocketConnected = true;
3829
3878
  });
3830
3879
 
3831
3880
  // @ts-ignore
3832
3881
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
3833
3882
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3834
3883
  // @ts-ignore
3835
- _this24.webex.internal.newMetrics.submitClientEvent({
3884
+ _this23.webex.internal.newMetrics.submitClientEvent({
3836
3885
  name: 'client.mercury.connection.lost',
3837
3886
  options: {
3838
- meetingId: _this24.id
3887
+ meetingId: _this23.id
3839
3888
  }
3840
3889
  });
3841
3890
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
3842
- correlation_id: _this24.correlationId
3891
+ correlation_id: _this23.correlationId
3843
3892
  });
3844
3893
  });
3845
3894
  }
@@ -3925,7 +3974,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3925
3974
  }, {
3926
3975
  key: "muteAudio",
3927
3976
  value: function muteAudio() {
3928
- var _this25 = this;
3977
+ var _this24 = this;
3929
3978
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3930
3979
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3931
3980
  }
@@ -3941,22 +3990,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3941
3990
 
3942
3991
  // First, stop sending the local audio media
3943
3992
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3944
- _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3993
+ _util.default.handleAudioLogging(_this24.mediaProperties.audioTrack);
3945
3994
  // @ts-ignore
3946
- _this25.webex.internal.newMetrics.submitClientEvent({
3995
+ _this24.webex.internal.newMetrics.submitClientEvent({
3947
3996
  name: 'client.muted',
3948
3997
  payload: {
3949
3998
  trigger: 'user-interaction',
3950
3999
  mediaType: 'audio'
3951
4000
  },
3952
4001
  options: {
3953
- meetingId: _this25.id
4002
+ meetingId: _this24.id
3954
4003
  }
3955
4004
  });
3956
4005
  }).catch(function (error) {
3957
4006
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
3958
- correlation_id: _this25.correlationId,
3959
- locus_id: _this25.locusUrl.split('/').pop(),
4007
+ correlation_id: _this24.correlationId,
4008
+ locus_id: _this24.locusUrl.split('/').pop(),
3960
4009
  reason: error.message,
3961
4010
  stack: error.stack
3962
4011
  });
@@ -3975,7 +4024,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3975
4024
  }, {
3976
4025
  key: "unmuteAudio",
3977
4026
  value: function unmuteAudio() {
3978
- var _this26 = this;
4027
+ var _this25 = this;
3979
4028
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3980
4029
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3981
4030
  }
@@ -3991,22 +4040,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3991
4040
 
3992
4041
  // First, send the control to unmute the participant on the server
3993
4042
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3994
- _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
4043
+ _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3995
4044
  // @ts-ignore
3996
- _this26.webex.internal.newMetrics.submitClientEvent({
4045
+ _this25.webex.internal.newMetrics.submitClientEvent({
3997
4046
  name: 'client.unmuted',
3998
4047
  payload: {
3999
4048
  trigger: 'user-interaction',
4000
4049
  mediaType: 'audio'
4001
4050
  },
4002
4051
  options: {
4003
- meetingId: _this26.id
4052
+ meetingId: _this25.id
4004
4053
  }
4005
4054
  });
4006
4055
  }).catch(function (error) {
4007
4056
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
4008
- correlation_id: _this26.correlationId,
4009
- locus_id: _this26.locusUrl.split('/').pop(),
4057
+ correlation_id: _this25.correlationId,
4058
+ locus_id: _this25.locusUrl.split('/').pop(),
4010
4059
  reason: error.message,
4011
4060
  stack: error.stack
4012
4061
  });
@@ -4025,7 +4074,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4025
4074
  }, {
4026
4075
  key: "muteVideo",
4027
4076
  value: function muteVideo() {
4028
- var _this27 = this;
4077
+ var _this26 = this;
4029
4078
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
4030
4079
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
4031
4080
  }
@@ -4039,22 +4088,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4039
4088
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
4040
4089
  }
4041
4090
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
4042
- _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
4091
+ _util.default.handleVideoLogging(_this26.mediaProperties.videoTrack);
4043
4092
  // @ts-ignore
4044
- _this27.webex.internal.newMetrics.submitClientEvent({
4093
+ _this26.webex.internal.newMetrics.submitClientEvent({
4045
4094
  name: 'client.muted',
4046
4095
  payload: {
4047
4096
  trigger: 'user-interaction',
4048
4097
  mediaType: 'video'
4049
4098
  },
4050
4099
  options: {
4051
- meetingId: _this27.id
4100
+ meetingId: _this26.id
4052
4101
  }
4053
4102
  });
4054
4103
  }).catch(function (error) {
4055
4104
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
4056
- correlation_id: _this27.correlationId,
4057
- locus_id: _this27.locusUrl.split('/').pop(),
4105
+ correlation_id: _this26.correlationId,
4106
+ locus_id: _this26.locusUrl.split('/').pop(),
4058
4107
  reason: error.message,
4059
4108
  stack: error.stack
4060
4109
  });
@@ -4073,7 +4122,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4073
4122
  }, {
4074
4123
  key: "unmuteVideo",
4075
4124
  value: function unmuteVideo() {
4076
- var _this28 = this;
4125
+ var _this27 = this;
4077
4126
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
4078
4127
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
4079
4128
  }
@@ -4087,22 +4136,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4087
4136
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
4088
4137
  }
4089
4138
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
4090
- _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
4139
+ _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
4091
4140
  // @ts-ignore
4092
- _this28.webex.internal.newMetrics.submitClientEvent({
4141
+ _this27.webex.internal.newMetrics.submitClientEvent({
4093
4142
  name: 'client.unmuted',
4094
4143
  payload: {
4095
4144
  trigger: 'user-interaction',
4096
4145
  mediaType: 'video'
4097
4146
  },
4098
4147
  options: {
4099
- meetingId: _this28.id
4148
+ meetingId: _this27.id
4100
4149
  }
4101
4150
  });
4102
4151
  }).catch(function (error) {
4103
4152
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
4104
- correlation_id: _this28.correlationId,
4105
- locus_id: _this28.locusUrl.split('/').pop(),
4153
+ correlation_id: _this27.correlationId,
4154
+ locus_id: _this27.locusUrl.split('/').pop(),
4106
4155
  reason: error.message,
4107
4156
  stack: error.stack
4108
4157
  });
@@ -4131,12 +4180,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4131
4180
  }, {
4132
4181
  key: "joinWithMedia",
4133
4182
  value: function joinWithMedia() {
4134
- var _this29 = this;
4183
+ var _this28 = this;
4135
4184
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4136
4185
  var mediaOptions = options.mediaOptions,
4137
4186
  joinOptions = options.joinOptions;
4138
4187
  return this.join(joinOptions).then(function (joinResponse) {
4139
- return _this29.addMedia(mediaOptions).then(function (mediaResponse) {
4188
+ return _this28.addMedia(mediaOptions).then(function (mediaResponse) {
4140
4189
  return {
4141
4190
  join: joinResponse,
4142
4191
  media: mediaResponse
@@ -4145,8 +4194,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4145
4194
  }).catch(function (error) {
4146
4195
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
4147
4196
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
4148
- correlation_id: _this29.correlationId,
4149
- locus_id: _this29.locusUrl.split('/').pop(),
4197
+ correlation_id: _this28.correlationId,
4198
+ locus_id: _this28.locusUrl.split('/').pop(),
4150
4199
  reason: error.message,
4151
4200
  stack: error.stack
4152
4201
  }, {
@@ -4167,7 +4216,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4167
4216
  }, {
4168
4217
  key: "reconnect",
4169
4218
  value: function reconnect(options) {
4170
- var _this30 = this;
4219
+ var _this29 = this;
4171
4220
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
4172
4221
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
4173
4222
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -4195,13 +4244,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4195
4244
  function: 'reconnect'
4196
4245
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
4197
4246
  return this.reconnectionManager.reconnect(options).then(function () {
4198
- _triggerProxy.default.trigger(_this30, {
4247
+ _triggerProxy.default.trigger(_this29, {
4199
4248
  file: 'meeting/index',
4200
4249
  function: 'reconnect'
4201
4250
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
4202
4251
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
4203
4252
  }).catch(function (error) {
4204
- _triggerProxy.default.trigger(_this30, {
4253
+ _triggerProxy.default.trigger(_this29, {
4205
4254
  file: 'meeting/index',
4206
4255
  function: 'reconnect'
4207
4256
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -4209,18 +4258,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4209
4258
  });
4210
4259
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
4211
4260
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
4212
- correlation_id: _this30.correlationId,
4213
- locus_id: _this30.locusUrl.split('/').pop(),
4261
+ correlation_id: _this29.correlationId,
4262
+ locus_id: _this29.locusUrl.split('/').pop(),
4214
4263
  reason: error.message,
4215
4264
  stack: error.stack
4216
4265
  });
4217
- _this30.uploadLogs({
4266
+ _this29.uploadLogs({
4218
4267
  file: 'meeting/index',
4219
4268
  function: 'reconnect'
4220
4269
  });
4221
4270
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
4222
4271
  }).finally(function () {
4223
- _this30.reconnectionManager.reset();
4272
+ _this29.reconnectionManager.reset();
4224
4273
  });
4225
4274
  }
4226
4275
 
@@ -4263,16 +4312,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4263
4312
  }, {
4264
4313
  key: "monitorTranscriptionSocketConnection",
4265
4314
  value: function monitorTranscriptionSocketConnection() {
4266
- var _this31 = this;
4315
+ var _this30 = this;
4267
4316
  this.transcription.onCloseSocket(function (event) {
4268
4317
  _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));
4269
- _this31.triggerStopReceivingTranscriptionEvent();
4318
+ _this30.triggerStopReceivingTranscriptionEvent();
4270
4319
  });
4271
4320
  this.transcription.onErrorSocket(function (event) {
4272
4321
  _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));
4273
- _this31.triggerStopReceivingTranscriptionEvent();
4322
+ _this30.triggerStopReceivingTranscriptionEvent();
4274
4323
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
4275
- correlation_id: _this31.correlationId,
4324
+ correlation_id: _this30.correlationId,
4276
4325
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
4277
4326
  event: event
4278
4327
  });
@@ -4288,7 +4337,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4288
4337
  key: "receiveTranscription",
4289
4338
  value: function () {
4290
4339
  var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
4291
- var _this32 = this;
4340
+ var _this31 = this;
4292
4341
  var datachannelUrl, _yield$this$request, webSocketUrl;
4293
4342
  return _regenerator.default.wrap(function _callee10$(_context10) {
4294
4343
  while (1) switch (_context10.prev = _context10.next) {
@@ -4318,7 +4367,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4318
4367
 
4319
4368
  // retrieve and pass the payload
4320
4369
  this.transcription.subscribe(function (payload) {
4321
- _triggerProxy.default.trigger(_this32, {
4370
+ _triggerProxy.default.trigger(_this31, {
4322
4371
  file: 'meeting/index',
4323
4372
  function: 'join'
4324
4373
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
@@ -4399,7 +4448,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4399
4448
  }, {
4400
4449
  key: "join",
4401
4450
  value: function join() {
4402
- var _this33 = this;
4451
+ var _this32 = this;
4403
4452
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4404
4453
  // @ts-ignore - fix type
4405
4454
  if (!this.webex.meetings.registered) {
@@ -4452,7 +4501,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4452
4501
  }
4453
4502
  });
4454
4503
  if (!(0, _isEmpty2.default)(this.meetingInfo)) {
4455
- var _this$meetingInfo;
4504
+ var _this$meetingInfo2;
4456
4505
  // @ts-ignore
4457
4506
  this.webex.internal.newMetrics.submitClientEvent({
4458
4507
  name: 'client.meetinginfo.request',
@@ -4466,7 +4515,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4466
4515
  name: 'client.meetinginfo.response',
4467
4516
  payload: {
4468
4517
  identifiers: {
4469
- meetingLookupUrl: (_this$meetingInfo = this.meetingInfo) === null || _this$meetingInfo === void 0 ? void 0 : _this$meetingInfo.meetingLookupUrl
4518
+ meetingLookupUrl: (_this$meetingInfo2 = this.meetingInfo) === null || _this$meetingInfo2 === void 0 ? void 0 : _this$meetingInfo2.meetingLookupUrl
4470
4519
  }
4471
4520
  },
4472
4521
  options: {
@@ -4514,14 +4563,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4514
4563
  }
4515
4564
  this.isMultistream = !!options.enableMultistream;
4516
4565
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
4517
- _this33.meetingFiniteStateMachine.join();
4566
+ _this32.meetingFiniteStateMachine.join();
4518
4567
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
4519
4568
  return join;
4520
4569
  }).then(function (join) {
4521
4570
  joinSuccess(join);
4522
- _this33.deferJoin = undefined;
4571
+ _this32.deferJoin = undefined;
4523
4572
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
4524
- correlation_id: _this33.correlationId
4573
+ correlation_id: _this32.correlationId
4525
4574
  });
4526
4575
  return join;
4527
4576
  }).then( /*#__PURE__*/function () {
@@ -4529,12 +4578,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4529
4578
  return _regenerator.default.wrap(function _callee11$(_context11) {
4530
4579
  while (1) switch (_context11.prev = _context11.next) {
4531
4580
  case 0:
4532
- if (!_this33.config.enableAutomaticLLM) {
4581
+ if (!_this32.config.enableAutomaticLLM) {
4533
4582
  _context11.next = 3;
4534
4583
  break;
4535
4584
  }
4536
4585
  _context11.next = 3;
4537
- return _this33.updateLLMConnection();
4586
+ return _this32.updateLLMConnection();
4538
4587
  case 3:
4539
4588
  return _context11.abrupt("return", join);
4540
4589
  case 4:
@@ -4555,16 +4604,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4555
4604
  _context12.next = 8;
4556
4605
  break;
4557
4606
  }
4558
- if (!(_this33.config.receiveTranscription || options.receiveTranscription)) {
4607
+ if (!(_this32.config.receiveTranscription || options.receiveTranscription)) {
4559
4608
  _context12.next = 6;
4560
4609
  break;
4561
4610
  }
4562
- if (!_this33.isTranscriptionSupported()) {
4611
+ if (!_this32.isTranscriptionSupported()) {
4563
4612
  _context12.next = 6;
4564
4613
  break;
4565
4614
  }
4566
4615
  _context12.next = 5;
4567
- return _this33.receiveTranscription();
4616
+ return _this32.receiveTranscription();
4568
4617
  case 5:
4569
4618
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
4570
4619
  case 6:
@@ -4584,20 +4633,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4584
4633
  return _ref22.apply(this, arguments);
4585
4634
  };
4586
4635
  }()).catch(function (error) {
4587
- var _this33$meetingInfo, _error$error;
4588
- _this33.meetingFiniteStateMachine.fail(error);
4636
+ var _this32$meetingInfo, _error$error;
4637
+ _this32.meetingFiniteStateMachine.fail(error);
4589
4638
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
4590
4639
 
4591
4640
  // @ts-ignore
4592
- _this33.webex.internal.newMetrics.submitClientEvent({
4641
+ _this32.webex.internal.newMetrics.submitClientEvent({
4593
4642
  name: 'client.locus.join.response',
4594
4643
  payload: {
4595
4644
  identifiers: {
4596
- meetingLookupUrl: (_this33$meetingInfo = _this33.meetingInfo) === null || _this33$meetingInfo === void 0 ? void 0 : _this33$meetingInfo.meetingLookupUrl
4645
+ meetingLookupUrl: (_this32$meetingInfo = _this32.meetingInfo) === null || _this32$meetingInfo === void 0 ? void 0 : _this32$meetingInfo.meetingLookupUrl
4597
4646
  }
4598
4647
  },
4599
4648
  options: {
4600
- meetingId: _this33.id,
4649
+ meetingId: _this32.id,
4601
4650
  rawError: error,
4602
4651
  showToUser: true
4603
4652
  }
@@ -4605,18 +4654,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4605
4654
 
4606
4655
  // TODO: change this to error codes and pre defined dictionary
4607
4656
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
4608
- correlation_id: _this33.correlationId,
4657
+ correlation_id: _this32.correlationId,
4609
4658
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
4610
4659
  stack: error.stack
4611
4660
  });
4612
4661
 
4613
4662
  // Upload logs on join Failure
4614
- _triggerProxy.default.trigger(_this33, {
4663
+ _triggerProxy.default.trigger(_this32, {
4615
4664
  file: 'meeting/index',
4616
4665
  function: 'join'
4617
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this33);
4666
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this32);
4618
4667
  joinFailed(error);
4619
- _this33.deferJoin = undefined;
4668
+ _this32.deferJoin = undefined;
4620
4669
  return _promise.default.reject(error);
4621
4670
  });
4622
4671
  }
@@ -4631,7 +4680,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4631
4680
  key: "updateLLMConnection",
4632
4681
  value: function () {
4633
4682
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
4634
- var _this34 = this;
4683
+ var _this33 = this;
4635
4684
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
4636
4685
  return _regenerator.default.wrap(function _callee13$(_context13) {
4637
4686
  while (1) switch (_context13.prev = _context13.next) {
@@ -4663,9 +4712,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4663
4712
  case 10:
4664
4713
  return _context13.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
4665
4714
  // @ts-ignore - Fix type
4666
- _this34.webex.internal.llm.off('event:relay.event', _this34.processRelayEvent);
4715
+ _this33.webex.internal.llm.off('event:relay.event', _this33.processRelayEvent);
4667
4716
  // @ts-ignore - Fix type
4668
- _this34.webex.internal.llm.on('event:relay.event', _this34.processRelayEvent);
4717
+ _this33.webex.internal.llm.on('event:relay.event', _this33.processRelayEvent);
4669
4718
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
4670
4719
  return _promise.default.resolve(registerAndConnectResult);
4671
4720
  }));
@@ -4718,7 +4767,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4718
4767
  }, {
4719
4768
  key: "dialInPstn",
4720
4769
  value: function dialInPstn() {
4721
- var _this35 = this;
4770
+ var _this34 = this;
4722
4771
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
4723
4772
 
4724
4773
  var correlationId = this.correlationId,
@@ -4734,10 +4783,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4734
4783
  }).catch(function (error) {
4735
4784
  var _error$error2;
4736
4785
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
4737
- correlation_id: _this35.correlationId,
4738
- dial_in_url: _this35.dialInUrl,
4786
+ correlation_id: _this34.correlationId,
4787
+ dial_in_url: _this34.dialInUrl,
4739
4788
  locus_id: locusUrl.split('/').pop(),
4740
- client_url: _this35.deviceUrl,
4789
+ client_url: _this34.deviceUrl,
4741
4790
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
4742
4791
  stack: error.stack
4743
4792
  });
@@ -4755,7 +4804,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4755
4804
  }, {
4756
4805
  key: "dialOutPstn",
4757
4806
  value: function dialOutPstn(phoneNumber) {
4758
- var _this36 = this;
4807
+ var _this35 = this;
4759
4808
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
4760
4809
 
4761
4810
  var correlationId = this.correlationId,
@@ -4772,10 +4821,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4772
4821
  }).catch(function (error) {
4773
4822
  var _error$error3;
4774
4823
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
4775
- correlation_id: _this36.correlationId,
4776
- dial_out_url: _this36.dialOutUrl,
4824
+ correlation_id: _this35.correlationId,
4825
+ dial_out_url: _this35.dialOutUrl,
4777
4826
  locus_id: locusUrl.split('/').pop(),
4778
- client_url: _this36.deviceUrl,
4827
+ client_url: _this35.deviceUrl,
4779
4828
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
4780
4829
  stack: error.stack
4781
4830
  });
@@ -4806,7 +4855,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4806
4855
  }, {
4807
4856
  key: "moveTo",
4808
4857
  value: function moveTo(resourceId) {
4809
- var _this37 = this;
4858
+ var _this36 = this;
4810
4859
  if (!resourceId) {
4811
4860
  throw new _parameter.default('Cannot move call without a resourceId.');
4812
4861
  }
@@ -4850,12 +4899,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4850
4899
  while (1) switch (_context14.prev = _context14.next) {
4851
4900
  case 0:
4852
4901
  _context14.prev = 0;
4853
- if (!(_this37.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
4902
+ if (!(_this36.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
4854
4903
  _context14.next = 4;
4855
4904
  break;
4856
4905
  }
4857
4906
  _context14.next = 4;
4858
- return _this37.releaseScreenShareFloor();
4907
+ return _this36.releaseScreenShareFloor();
4859
4908
  case 4:
4860
4909
  mediaSettings = {
4861
4910
  mediaDirection: {
@@ -4867,15 +4916,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4867
4916
  receiveShare: true
4868
4917
  }
4869
4918
  };
4870
- _this37.cleanupLocalTracks();
4871
- _this37.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4872
- _this37.mediaProperties.unsetRemoteMedia();
4919
+ _this36.cleanupLocalTracks();
4920
+ _this36.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4921
+ _this36.mediaProperties.unsetRemoteMedia();
4873
4922
 
4874
4923
  // 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
4875
4924
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4876
4925
  // @ts-ignore - reconnectMedia does not accept any argument
4877
4926
  _context14.next = 10;
4878
- return _this37.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4927
+ return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4879
4928
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4880
4929
  });
4881
4930
  case 10:
@@ -4886,8 +4935,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4886
4935
  _context14.t0 = _context14["catch"](0);
4887
4936
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context14.t0);
4888
4937
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4889
- correlation_id: _this37.correlationId,
4890
- locus_id: _this37.locusUrl.split('/').pop(),
4938
+ correlation_id: _this36.correlationId,
4939
+ locus_id: _this36.locusUrl.split('/').pop(),
4891
4940
  reason: _context14.t0.message,
4892
4941
  stack: _context14.t0.stack
4893
4942
  });
@@ -4902,12 +4951,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4902
4951
  resourceId: resourceId,
4903
4952
  moveToResource: true
4904
4953
  }).then(function () {
4905
- _this37.meetingFiniteStateMachine.join();
4954
+ _this36.meetingFiniteStateMachine.join();
4906
4955
  }).catch(function (error) {
4907
- _this37.meetingFiniteStateMachine.fail(error);
4956
+ _this36.meetingFiniteStateMachine.fail(error);
4908
4957
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4909
- correlation_id: _this37.correlationId,
4910
- locus_id: _this37.locusUrl.split('/').pop(),
4958
+ correlation_id: _this36.correlationId,
4959
+ locus_id: _this36.locusUrl.split('/').pop(),
4911
4960
  reason: error.message,
4912
4961
  stack: error.stack
4913
4962
  });
@@ -4926,7 +4975,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4926
4975
  }, {
4927
4976
  key: "moveFrom",
4928
4977
  value: function moveFrom(resourceId) {
4929
- var _this38 = this;
4978
+ var _this37 = this;
4930
4979
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4931
4980
  if (!resourceId) {
4932
4981
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4941,19 +4990,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4941
4990
  }
4942
4991
  });
4943
4992
  return _util.default.joinMeetingOptions(this).then(function () {
4944
- return _util.default.leaveMeeting(_this38, {
4993
+ return _util.default.leaveMeeting(_this37, {
4945
4994
  resourceId: resourceId,
4946
4995
  correlationId: oldCorrelationId,
4947
4996
  moveMeeting: true
4948
4997
  }).then(function () {
4949
- _this38.resourceId = '';
4998
+ _this37.resourceId = '';
4950
4999
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4951
5000
  });
4952
5001
  }).catch(function (error) {
4953
- _this38.meetingFiniteStateMachine.fail(error);
5002
+ _this37.meetingFiniteStateMachine.fail(error);
4954
5003
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4955
- correlation_id: _this38.correlationId,
4956
- locus_id: _this38.locusUrl.split('/').pop(),
5004
+ correlation_id: _this37.correlationId,
5005
+ locus_id: _this37.locusUrl.split('/').pop(),
4957
5006
  reason: error.message,
4958
5007
  stack: error.stack
4959
5008
  });
@@ -5057,9 +5106,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5057
5106
  }, {
5058
5107
  key: "forwardEvent",
5059
5108
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
5060
- var _this39 = this;
5109
+ var _this38 = this;
5061
5110
  eventEmitter.on(eventTypeToForward, function (data) {
5062
- return _triggerProxy.default.trigger(_this39, {
5111
+ return _triggerProxy.default.trigger(_this38, {
5063
5112
  file: 'meetings',
5064
5113
  function: 'addMedia'
5065
5114
  }, meetingEventType, data);
@@ -5079,7 +5128,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5079
5128
  value: function addMedia() {
5080
5129
  var _localTracks$screenSh,
5081
5130
  _localTracks$screenSh2,
5082
- _this40 = this;
5131
+ _this39 = this;
5083
5132
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5084
5133
  var LOG_HEADER = 'Meeting:index#addMedia -->';
5085
5134
  var turnDiscoverySkippedReason;
@@ -5177,7 +5226,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5177
5226
  promises.push(this.setLocalShareAudioTrack(localTracks.screenShare.audio));
5178
5227
  }
5179
5228
  return _promise.default.all(promises).then(function () {
5180
- return _this40.roap.doTurnDiscovery(_this40, false);
5229
+ return _this39.roap.doTurnDiscovery(_this39, false);
5181
5230
  }).then( /*#__PURE__*/function () {
5182
5231
  var _ref24 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(turnDiscoveryObject) {
5183
5232
  var turnServerInfo, mc;
@@ -5188,19 +5237,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5188
5237
  turnServerUsed = !turnDiscoverySkippedReason;
5189
5238
  turnServerInfo = turnDiscoveryObject.turnServerInfo;
5190
5239
  _context16.next = 5;
5191
- return _this40.createMediaConnection(turnServerInfo, bundlePolicy);
5240
+ return _this39.createMediaConnection(turnServerInfo, bundlePolicy);
5192
5241
  case 5:
5193
5242
  mc = _context16.sent;
5194
- if (!_this40.isMultistream) {
5243
+ if (!_this39.isMultistream) {
5195
5244
  _context16.next = 13;
5196
5245
  break;
5197
5246
  }
5198
- _this40.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this40.receiveSlotManager, _this40.mediaRequestManagers, remoteMediaManagerConfig);
5199
- _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
5200
- _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
5201
- _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
5247
+ _this39.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this39.receiveSlotManager, _this39.mediaRequestManagers, remoteMediaManagerConfig);
5248
+ _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
5249
+ _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
5250
+ _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
5202
5251
  _context16.next = 13;
5203
- return _this40.remoteMediaManager.start();
5252
+ return _this39.remoteMediaManager.start();
5204
5253
  case 13:
5205
5254
  _context16.next = 15;
5206
5255
  return mc.initiateOffer();
@@ -5214,27 +5263,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5214
5263
  return _ref24.apply(this, arguments);
5215
5264
  };
5216
5265
  }()).then(function () {
5217
- _this40.setMercuryListener();
5266
+ _this39.setMercuryListener();
5218
5267
  }).then(function () {
5219
5268
  return (0, _mediaHelpers.getDevices)().then(function (devices) {
5220
5269
  _util.default.handleDeviceLogging(devices);
5221
5270
  }).catch(function () {});
5222
5271
  } // getDevices may fail if we don't have browser permissions, that's ok, we still can have a media connection
5223
5272
  ).then(function () {
5224
- _this40.handleMediaLogging(_this40.mediaProperties);
5273
+ _this39.handleMediaLogging(_this39.mediaProperties);
5225
5274
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
5226
5275
 
5227
5276
  // @ts-ignore - config coming from registerPlugin
5228
- if (_this40.config.stats.enableStatsAnalyzer) {
5277
+ if (_this39.config.stats.enableStatsAnalyzer) {
5229
5278
  // @ts-ignore - config coming from registerPlugin
5230
- _this40.networkQualityMonitor = new _networkQualityMonitor.default(_this40.config.stats);
5231
- _this40.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
5279
+ _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
5280
+ _this39.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
5232
5281
  // @ts-ignore - config coming from registerPlugin
5233
- _this40.config.stats, function (ssrc) {
5234
- return _this40.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
5235
- }, _this40.networkQualityMonitor);
5236
- _this40.setupStatsAnalyzerEventHandlers();
5237
- _this40.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this40.sendNetworkQualityEvent.bind(_this40));
5282
+ _this39.config.stats, function (ssrc) {
5283
+ return _this39.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
5284
+ }, _this39.networkQualityMonitor);
5285
+ _this39.setupStatsAnalyzerEventHandlers();
5286
+ _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
5238
5287
  }
5239
5288
  }).catch(function (error) {
5240
5289
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
@@ -5245,12 +5294,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5245
5294
 
5246
5295
  // eslint-disable-next-line func-names
5247
5296
  // eslint-disable-next-line prefer-arrow-callback
5248
- if (_this40.type === _constants._CALL_ || _this40.meetingState === _constants.FULL_STATE.ACTIVE) {
5297
+ if (_this39.type === _constants._CALL_ || _this39.meetingState === _constants.FULL_STATE.ACTIVE) {
5249
5298
  resolve();
5250
5299
  }
5251
5300
  var joiningTimer = setInterval(function () {
5252
5301
  timerCount += 1;
5253
- if (_this40.meetingState === _constants.FULL_STATE.ACTIVE) {
5302
+ if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
5254
5303
  clearInterval(joiningTimer);
5255
5304
  resolve();
5256
5305
  }
@@ -5261,77 +5310,77 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5261
5310
  }, 1000);
5262
5311
  });
5263
5312
  }).then(function () {
5264
- return _this40.mediaProperties.waitForMediaConnectionConnected().catch(function () {
5313
+ return _this39.mediaProperties.waitForMediaConnectionConnected().catch(function () {
5265
5314
  // @ts-ignore
5266
- _this40.webex.internal.newMetrics.submitClientEvent({
5315
+ _this39.webex.internal.newMetrics.submitClientEvent({
5267
5316
  name: 'client.ice.end',
5268
5317
  payload: {
5269
5318
  canProceed: false,
5270
5319
  icePhase: 'JOIN_MEETING_FINAL',
5271
5320
  errors: [
5272
5321
  // @ts-ignore
5273
- _this40.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode(_internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.ICE_FAILURE_CLIENT_CODE)]
5322
+ _this39.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode(_internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.ICE_FAILURE_CLIENT_CODE)]
5274
5323
  },
5275
5324
  options: {
5276
- meetingId: _this40.id
5325
+ meetingId: _this39.id
5277
5326
  }
5278
5327
  });
5279
- throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(_this40.correlationId));
5328
+ throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(_this39.correlationId));
5280
5329
  });
5281
5330
  }).then(function () {
5282
- if (_this40.mediaProperties.hasLocalShareTrack()) {
5283
- return _this40.enqueueScreenShareFloorRequest();
5331
+ if (_this39.mediaProperties.hasLocalShareTrack()) {
5332
+ return _this39.enqueueScreenShareFloorRequest();
5284
5333
  }
5285
5334
  return _promise.default.resolve();
5286
5335
  }).then(function () {
5287
- return _this40.mediaProperties.getCurrentConnectionType();
5336
+ return _this39.mediaProperties.getCurrentConnectionType();
5288
5337
  }).then(function (connectionType) {
5289
5338
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
5290
- correlation_id: _this40.correlationId,
5291
- locus_id: _this40.locusUrl.split('/').pop(),
5339
+ correlation_id: _this39.correlationId,
5340
+ locus_id: _this39.locusUrl.split('/').pop(),
5292
5341
  connectionType: connectionType,
5293
- isMultistream: _this40.isMultistream
5342
+ isMultistream: _this39.isMultistream
5294
5343
  });
5295
5344
  // @ts-ignore
5296
- _this40.webex.internal.newMetrics.submitClientEvent({
5345
+ _this39.webex.internal.newMetrics.submitClientEvent({
5297
5346
  name: 'client.media-engine.ready',
5298
5347
  options: {
5299
- meetingId: _this40.id
5348
+ meetingId: _this39.id
5300
5349
  }
5301
5350
  });
5302
5351
  }).catch(function (error) {
5303
- var _this40$mediaProperti, _this40$mediaProperti2, _this40$mediaProperti3, _this40$mediaProperti4, _this40$mediaProperti5, _this40$mediaProperti6, _this40$mediaProperti7, _this40$mediaProperti8, _this40$mediaProperti9, _this40$mediaProperti10, _this40$mediaProperti11, _this40$mediaProperti12, _this40$mediaProperti13, _this40$mediaProperti14, _this40$mediaProperti15, _this40$mediaProperti16, _this40$mediaProperti17, _this40$mediaProperti18, _this40$mediaProperti19, _this40$mediaProperti20, _this40$mediaProperti21;
5352
+ var _this39$mediaProperti, _this39$mediaProperti2, _this39$mediaProperti3, _this39$mediaProperti4, _this39$mediaProperti5, _this39$mediaProperti6, _this39$mediaProperti7, _this39$mediaProperti8, _this39$mediaProperti9, _this39$mediaProperti10, _this39$mediaProperti11, _this39$mediaProperti12, _this39$mediaProperti13, _this39$mediaProperti14, _this39$mediaProperti15, _this39$mediaProperti16, _this39$mediaProperti17, _this39$mediaProperti18, _this39$mediaProperti19, _this39$mediaProperti20, _this39$mediaProperti21;
5304
5353
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
5305
- correlation_id: _this40.correlationId,
5306
- locus_id: _this40.locusUrl.split('/').pop(),
5354
+ correlation_id: _this39.correlationId,
5355
+ locus_id: _this39.locusUrl.split('/').pop(),
5307
5356
  reason: error.message,
5308
5357
  stack: error.stack,
5309
5358
  code: error.code,
5310
5359
  turnDiscoverySkippedReason: turnDiscoverySkippedReason,
5311
5360
  turnServerUsed: turnServerUsed,
5312
- isMultistream: _this40.isMultistream,
5313
- signalingState: ((_this40$mediaProperti = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti === void 0 ? void 0 : (_this40$mediaProperti2 = _this40$mediaProperti.multistreamConnection) === null || _this40$mediaProperti2 === void 0 ? void 0 : (_this40$mediaProperti3 = _this40$mediaProperti2.pc) === null || _this40$mediaProperti3 === void 0 ? void 0 : (_this40$mediaProperti4 = _this40$mediaProperti3.pc) === null || _this40$mediaProperti4 === void 0 ? void 0 : _this40$mediaProperti4.signalingState) || ((_this40$mediaProperti5 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti5 === void 0 ? void 0 : (_this40$mediaProperti6 = _this40$mediaProperti5.mediaConnection) === null || _this40$mediaProperti6 === void 0 ? void 0 : (_this40$mediaProperti7 = _this40$mediaProperti6.pc) === null || _this40$mediaProperti7 === void 0 ? void 0 : _this40$mediaProperti7.signalingState) || 'unknown',
5314
- connectionState: ((_this40$mediaProperti8 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti8 === void 0 ? void 0 : (_this40$mediaProperti9 = _this40$mediaProperti8.multistreamConnection) === null || _this40$mediaProperti9 === void 0 ? void 0 : (_this40$mediaProperti10 = _this40$mediaProperti9.pc) === null || _this40$mediaProperti10 === void 0 ? void 0 : (_this40$mediaProperti11 = _this40$mediaProperti10.pc) === null || _this40$mediaProperti11 === void 0 ? void 0 : _this40$mediaProperti11.connectionState) || ((_this40$mediaProperti12 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti12 === void 0 ? void 0 : (_this40$mediaProperti13 = _this40$mediaProperti12.mediaConnection) === null || _this40$mediaProperti13 === void 0 ? void 0 : (_this40$mediaProperti14 = _this40$mediaProperti13.pc) === null || _this40$mediaProperti14 === void 0 ? void 0 : _this40$mediaProperti14.connectionState) || 'unknown',
5315
- iceConnectionState: ((_this40$mediaProperti15 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti15 === void 0 ? void 0 : (_this40$mediaProperti16 = _this40$mediaProperti15.multistreamConnection) === null || _this40$mediaProperti16 === void 0 ? void 0 : (_this40$mediaProperti17 = _this40$mediaProperti16.pc) === null || _this40$mediaProperti17 === void 0 ? void 0 : (_this40$mediaProperti18 = _this40$mediaProperti17.pc) === null || _this40$mediaProperti18 === void 0 ? void 0 : _this40$mediaProperti18.iceConnectionState) || ((_this40$mediaProperti19 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti19 === void 0 ? void 0 : (_this40$mediaProperti20 = _this40$mediaProperti19.mediaConnection) === null || _this40$mediaProperti20 === void 0 ? void 0 : (_this40$mediaProperti21 = _this40$mediaProperti20.pc) === null || _this40$mediaProperti21 === void 0 ? void 0 : _this40$mediaProperti21.iceConnectionState) || 'unknown'
5361
+ isMultistream: _this39.isMultistream,
5362
+ signalingState: ((_this39$mediaProperti = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti === void 0 ? void 0 : (_this39$mediaProperti2 = _this39$mediaProperti.multistreamConnection) === null || _this39$mediaProperti2 === void 0 ? void 0 : (_this39$mediaProperti3 = _this39$mediaProperti2.pc) === null || _this39$mediaProperti3 === void 0 ? void 0 : (_this39$mediaProperti4 = _this39$mediaProperti3.pc) === null || _this39$mediaProperti4 === void 0 ? void 0 : _this39$mediaProperti4.signalingState) || ((_this39$mediaProperti5 = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti5 === void 0 ? void 0 : (_this39$mediaProperti6 = _this39$mediaProperti5.mediaConnection) === null || _this39$mediaProperti6 === void 0 ? void 0 : (_this39$mediaProperti7 = _this39$mediaProperti6.pc) === null || _this39$mediaProperti7 === void 0 ? void 0 : _this39$mediaProperti7.signalingState) || 'unknown',
5363
+ connectionState: ((_this39$mediaProperti8 = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti8 === void 0 ? void 0 : (_this39$mediaProperti9 = _this39$mediaProperti8.multistreamConnection) === null || _this39$mediaProperti9 === void 0 ? void 0 : (_this39$mediaProperti10 = _this39$mediaProperti9.pc) === null || _this39$mediaProperti10 === void 0 ? void 0 : (_this39$mediaProperti11 = _this39$mediaProperti10.pc) === null || _this39$mediaProperti11 === void 0 ? void 0 : _this39$mediaProperti11.connectionState) || ((_this39$mediaProperti12 = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti12 === void 0 ? void 0 : (_this39$mediaProperti13 = _this39$mediaProperti12.mediaConnection) === null || _this39$mediaProperti13 === void 0 ? void 0 : (_this39$mediaProperti14 = _this39$mediaProperti13.pc) === null || _this39$mediaProperti14 === void 0 ? void 0 : _this39$mediaProperti14.connectionState) || 'unknown',
5364
+ iceConnectionState: ((_this39$mediaProperti15 = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti15 === void 0 ? void 0 : (_this39$mediaProperti16 = _this39$mediaProperti15.multistreamConnection) === null || _this39$mediaProperti16 === void 0 ? void 0 : (_this39$mediaProperti17 = _this39$mediaProperti16.pc) === null || _this39$mediaProperti17 === void 0 ? void 0 : (_this39$mediaProperti18 = _this39$mediaProperti17.pc) === null || _this39$mediaProperti18 === void 0 ? void 0 : _this39$mediaProperti18.iceConnectionState) || ((_this39$mediaProperti19 = _this39.mediaProperties.webrtcMediaConnection) === null || _this39$mediaProperti19 === void 0 ? void 0 : (_this39$mediaProperti20 = _this39$mediaProperti19.mediaConnection) === null || _this39$mediaProperti20 === void 0 ? void 0 : (_this39$mediaProperti21 = _this39$mediaProperti20.pc) === null || _this39$mediaProperti21 === void 0 ? void 0 : _this39$mediaProperti21.iceConnectionState) || 'unknown'
5316
5365
  });
5317
5366
 
5318
5367
  // Clean up stats analyzer, peer connection, and turn off listeners
5319
- var stopStatsAnalyzer = _this40.statsAnalyzer ? _this40.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
5368
+ var stopStatsAnalyzer = _this39.statsAnalyzer ? _this39.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
5320
5369
  return stopStatsAnalyzer.then(function () {
5321
- _this40.statsAnalyzer = null;
5322
- if (_this40.mediaProperties.webrtcMediaConnection) {
5323
- _this40.closePeerConnections();
5324
- _this40.unsetPeerConnections();
5370
+ _this39.statsAnalyzer = null;
5371
+ if (_this39.mediaProperties.webrtcMediaConnection) {
5372
+ _this39.closePeerConnections();
5373
+ _this39.unsetPeerConnections();
5325
5374
  }
5326
5375
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
5327
5376
 
5328
5377
  // Upload logs on error while adding media
5329
- _triggerProxy.default.trigger(_this40, {
5378
+ _triggerProxy.default.trigger(_this39, {
5330
5379
  file: 'meeting/index',
5331
5380
  function: 'addMedia'
5332
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this40);
5381
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39);
5333
5382
  if (error instanceof _internalMediaCore.Errors.SdpError) {
5334
- _this40.leave({
5383
+ _this39.leave({
5335
5384
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
5336
5385
  });
5337
5386
  }
@@ -5364,7 +5413,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5364
5413
  }, {
5365
5414
  key: "enqueueMediaUpdate",
5366
5415
  value: function enqueueMediaUpdate(mediaUpdateType) {
5367
- var _this41 = this;
5416
+ var _this40 = this;
5368
5417
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5369
5418
  var canUpdateMediaNow = this.canUpdateMedia();
5370
5419
  return new _promise.default(function (resolve, reject) {
@@ -5375,9 +5424,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5375
5424
  options: options
5376
5425
  };
5377
5426
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
5378
- _this41.queuedMediaUpdates.push(queueItem);
5427
+ _this40.queuedMediaUpdates.push(queueItem);
5379
5428
  if (canUpdateMediaNow) {
5380
- _this41.processNextQueuedMediaUpdate();
5429
+ _this40.processNextQueuedMediaUpdate();
5381
5430
  }
5382
5431
  });
5383
5432
  }
@@ -5489,7 +5538,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5489
5538
  }, {
5490
5539
  key: "acknowledge",
5491
5540
  value: function acknowledge(type) {
5492
- var _this42 = this;
5541
+ var _this41 = this;
5493
5542
  if (!type) {
5494
5543
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
5495
5544
  }
@@ -5501,12 +5550,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5501
5550
  }).then(function (response) {
5502
5551
  return _promise.default.resolve(response);
5503
5552
  }).then(function (response) {
5504
- _this42.meetingFiniteStateMachine.ring(type);
5553
+ _this41.meetingFiniteStateMachine.ring(type);
5505
5554
  // @ts-ignore
5506
- _this42.webex.internal.newMetrics.submitClientEvent({
5555
+ _this41.webex.internal.newMetrics.submitClientEvent({
5507
5556
  name: 'client.alert.displayed',
5508
5557
  options: {
5509
- meetingId: _this42.id
5558
+ meetingId: _this41.id
5510
5559
  }
5511
5560
  });
5512
5561
  return _promise.default.resolve({
@@ -5531,12 +5580,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5531
5580
  }, {
5532
5581
  key: "decline",
5533
5582
  value: function decline(reason) {
5534
- var _this43 = this;
5583
+ var _this42 = this;
5535
5584
  return _util.default.declineMeeting(this, reason).then(function (decline) {
5536
- _this43.meetingFiniteStateMachine.decline();
5585
+ _this42.meetingFiniteStateMachine.decline();
5537
5586
  return _promise.default.resolve(decline);
5538
5587
  }).catch(function (error) {
5539
- _this43.meetingFiniteStateMachine.fail(error);
5588
+ _this42.meetingFiniteStateMachine.fail(error);
5540
5589
  return _promise.default.reject(error);
5541
5590
  });
5542
5591
  }
@@ -5552,7 +5601,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5552
5601
  }, {
5553
5602
  key: "leave",
5554
5603
  value: function leave() {
5555
- var _this44 = this;
5604
+ var _this43 = this;
5556
5605
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5557
5606
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5558
5607
  /// @ts-ignore
@@ -5574,39 +5623,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5574
5623
  });
5575
5624
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
5576
5625
  return _util.default.leaveMeeting(this, options).then(function (leave) {
5577
- _this44.meetingFiniteStateMachine.leave();
5578
- _this44.clearMeetingData();
5626
+ _this43.meetingFiniteStateMachine.leave();
5627
+ _this43.clearMeetingData();
5579
5628
 
5580
5629
  // upload logs on leave irrespective of meeting delete
5581
- _triggerProxy.default.trigger(_this44, {
5630
+ _triggerProxy.default.trigger(_this43, {
5582
5631
  file: 'meeting/index',
5583
5632
  function: 'leave'
5584
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
5633
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this43);
5585
5634
 
5586
5635
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5587
- if (_this44.wirelessShare || _this44.guest) {
5636
+ if (_this43.wirelessShare || _this43.guest) {
5588
5637
  // If screen sharing clean the meeting object
5589
- _triggerProxy.default.trigger(_this44, {
5638
+ _triggerProxy.default.trigger(_this43, {
5590
5639
  file: 'meeting/index',
5591
5640
  function: 'leave'
5592
5641
  }, _constants.EVENTS.DESTROY_MEETING, {
5593
5642
  reason: options.reason,
5594
- meetingId: _this44.id
5643
+ meetingId: _this43.id
5595
5644
  });
5596
5645
  }
5597
5646
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
5598
5647
  return leave;
5599
5648
  }).catch(function (error) {
5600
- _this44.meetingFiniteStateMachine.fail(error);
5649
+ _this43.meetingFiniteStateMachine.fail(error);
5601
5650
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
5602
5651
  // upload logs on leave irrespective of meeting delete
5603
- _triggerProxy.default.trigger(_this44, {
5652
+ _triggerProxy.default.trigger(_this43, {
5604
5653
  file: 'meeting/index',
5605
5654
  function: 'leave'
5606
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
5655
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this43);
5607
5656
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
5608
- correlation_id: _this44.correlationId,
5609
- locus_id: _this44.locusUrl.split('/').pop(),
5657
+ correlation_id: _this43.correlationId,
5658
+ locus_id: _this43.locusUrl.split('/').pop(),
5610
5659
  reason: error.message,
5611
5660
  stack: error.stack,
5612
5661
  code: error.code
@@ -5626,7 +5675,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5626
5675
  }, {
5627
5676
  key: "startWhiteboardShare",
5628
5677
  value: function startWhiteboardShare(channelUrl, resourceToken) {
5629
- var _this45 = this;
5678
+ var _this44 = this;
5630
5679
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5631
5680
  return element.name === 'whiteboard';
5632
5681
  });
@@ -5655,13 +5704,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5655
5704
  body.resourceToken = resourceToken;
5656
5705
  }
5657
5706
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
5658
- _this45.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
5707
+ _this44.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
5659
5708
  return _promise.default.resolve();
5660
5709
  }).catch(function (error) {
5661
5710
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
5662
5711
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
5663
- correlation_id: _this45.correlationId,
5664
- locus_id: _this45.locusUrl.split('/').pop(),
5712
+ correlation_id: _this44.correlationId,
5713
+ locus_id: _this44.locusUrl.split('/').pop(),
5665
5714
  reason: error.message,
5666
5715
  stack: error.stack,
5667
5716
  board: {
@@ -5684,7 +5733,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5684
5733
  }, {
5685
5734
  key: "stopWhiteboardShare",
5686
5735
  value: function stopWhiteboardShare(channelUrl) {
5687
- var _this46 = this;
5736
+ var _this45 = this;
5688
5737
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5689
5738
  return element.name === 'whiteboard';
5690
5739
  });
@@ -5709,8 +5758,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5709
5758
  _metrics.default.sendBehavioralMetric(
5710
5759
  // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
5711
5760
  _constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
5712
- correlation_id: _this46.correlationId,
5713
- locus_id: _this46.locusUrl.split('/').pop(),
5761
+ correlation_id: _this45.correlationId,
5762
+ locus_id: _this45.locusUrl.split('/').pop(),
5714
5763
  reason: error.message,
5715
5764
  stack: error.stack,
5716
5765
  board: {
@@ -5732,7 +5781,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5732
5781
  }, {
5733
5782
  key: "requestScreenShareFloor",
5734
5783
  value: function requestScreenShareFloor() {
5735
- var _this47 = this;
5784
+ var _this46 = this;
5736
5785
  if (!this.mediaProperties.hasLocalShareTrack() || !this.mediaProperties.mediaDirection.sendShare) {
5737
5786
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share track anymore (shareVideoTrack=".concat(this.mediaProperties.shareVideoTrack ? 'yes' : 'no', ", shareAudioTrack=").concat(this.mediaProperties.shareAudioTrack ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
5738
5787
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -5762,17 +5811,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5762
5811
  resourceUrl: this.resourceUrl,
5763
5812
  annotationInfo: this.annotationInfo
5764
5813
  }).then(function () {
5765
- _this47.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
5814
+ _this46.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
5766
5815
  return _promise.default.resolve();
5767
5816
  }).catch(function (error) {
5768
5817
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5769
5818
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5770
- correlation_id: _this47.correlationId,
5771
- locus_id: _this47.locusUrl.split('/').pop(),
5819
+ correlation_id: _this46.correlationId,
5820
+ locus_id: _this46.locusUrl.split('/').pop(),
5772
5821
  reason: error.message,
5773
5822
  stack: error.stack
5774
5823
  });
5775
- _this47.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
5824
+ _this46.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
5776
5825
  return _promise.default.reject(error);
5777
5826
  });
5778
5827
  }
@@ -5795,10 +5844,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5795
5844
  }, {
5796
5845
  key: "requestScreenShareFloorIfPending",
5797
5846
  value: function requestScreenShareFloorIfPending() {
5798
- var _this48 = this;
5847
+ var _this47 = this;
5799
5848
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
5800
5849
  this.requestScreenShareFloor().then(function () {
5801
- _this48.floorGrantPending = false;
5850
+ _this47.floorGrantPending = false;
5802
5851
  });
5803
5852
  }
5804
5853
  }
@@ -5812,7 +5861,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5812
5861
  }, {
5813
5862
  key: "releaseScreenShareFloor",
5814
5863
  value: function releaseScreenShareFloor() {
5815
- var _this49 = this;
5864
+ var _this48 = this;
5816
5865
  var content = this.locusInfo.mediaShares.find(function (element) {
5817
5866
  return element.name === _constants.CONTENT;
5818
5867
  });
@@ -5845,8 +5894,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5845
5894
  }).catch(function (error) {
5846
5895
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5847
5896
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5848
- correlation_id: _this49.correlationId,
5849
- locus_id: _this49.locusUrl.split('/').pop(),
5897
+ correlation_id: _this48.correlationId,
5898
+ locus_id: _this48.locusUrl.split('/').pop(),
5850
5899
  reason: error.message,
5851
5900
  stack: error.stack
5852
5901
  });
@@ -6025,7 +6074,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6025
6074
  }, {
6026
6075
  key: "changeVideoLayout",
6027
6076
  value: function changeVideoLayout(layoutType) {
6028
- var _this50 = this;
6077
+ var _this49 = this;
6029
6078
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6030
6079
  var main = renderInfo.main,
6031
6080
  content = renderInfo.content;
@@ -6079,7 +6128,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6079
6128
  }
6080
6129
  this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
6081
6130
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
6082
- _triggerProxy.default.trigger(_this50, {
6131
+ _triggerProxy.default.trigger(_this49, {
6083
6132
  file: 'meeting/index',
6084
6133
  function: 'changeVideoLayout'
6085
6134
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -6199,7 +6248,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6199
6248
  }, {
6200
6249
  key: "endMeetingForAll",
6201
6250
  value: function endMeetingForAll() {
6202
- var _this51 = this;
6251
+ var _this50 = this;
6203
6252
  // @ts-ignore
6204
6253
  this.webex.internal.newMetrics.submitClientEvent({
6205
6254
  name: 'client.call.leave',
@@ -6217,25 +6266,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6217
6266
  locus_id: this.locusId
6218
6267
  });
6219
6268
  return _util.default.endMeetingForAll(this).then(function (end) {
6220
- _this51.meetingFiniteStateMachine.end();
6221
- _this51.clearMeetingData();
6269
+ _this50.meetingFiniteStateMachine.end();
6270
+ _this50.clearMeetingData();
6222
6271
  // upload logs on leave irrespective of meeting delete
6223
- _triggerProxy.default.trigger(_this51, {
6272
+ _triggerProxy.default.trigger(_this50, {
6224
6273
  file: 'meeting/index',
6225
6274
  function: 'endMeetingForAll'
6226
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
6275
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this50);
6227
6276
  return end;
6228
6277
  }).catch(function (error) {
6229
- _this51.meetingFiniteStateMachine.fail(error);
6278
+ _this50.meetingFiniteStateMachine.fail(error);
6230
6279
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
6231
6280
  // upload logs on leave irrespective of meeting delete
6232
- _triggerProxy.default.trigger(_this51, {
6281
+ _triggerProxy.default.trigger(_this50, {
6233
6282
  file: 'meeting/index',
6234
6283
  function: 'endMeetingForAll'
6235
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
6284
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this50);
6236
6285
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
6237
- correlation_id: _this51.correlationId,
6238
- locus_id: _this51.locusUrl.split('/').pop(),
6286
+ correlation_id: _this50.correlationId,
6287
+ locus_id: _this50.locusUrl.split('/').pop(),
6239
6288
  reason: error.message,
6240
6289
  stack: error.stack,
6241
6290
  code: error.code
@@ -6378,7 +6427,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6378
6427
  var _this$mediaProperties6,
6379
6428
  _this$mediaProperties7,
6380
6429
  _this$mediaProperties8,
6381
- _this52 = this;
6430
+ _this51 = this;
6382
6431
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
6383
6432
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
6384
6433
  if (!this.canUpdateMedia()) {
@@ -6401,8 +6450,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6401
6450
  }).catch(function (error) {
6402
6451
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
6403
6452
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
6404
- correlation_id: _this52.correlationId,
6405
- locus_id: _this52.locusUrl.split('/').pop(),
6453
+ correlation_id: _this51.correlationId,
6454
+ locus_id: _this51.locusUrl.split('/').pop(),
6406
6455
  reason: error.message,
6407
6456
  stack: error.stack
6408
6457
  });