@webex/plugin-meetings 2.18.0 → 2.19.2

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 (64) hide show
  1. package/README.md +0 -300
  2. package/dist/constants.js +3 -206
  3. package/dist/constants.js.map +1 -1
  4. package/dist/meeting/effectsState.js +1 -2
  5. package/dist/meeting/effectsState.js.map +1 -1
  6. package/dist/meeting/index.js +366 -496
  7. package/dist/meeting/index.js.map +1 -1
  8. package/dist/meeting/util.js +4 -213
  9. package/dist/meeting/util.js.map +1 -1
  10. package/dist/meetings/index.js +0 -28
  11. package/dist/meetings/index.js.map +1 -1
  12. package/dist/statsAnalyzer/index.js +145 -86
  13. package/dist/statsAnalyzer/index.js.map +1 -1
  14. package/package.json +6 -8
  15. package/src/constants.ts +1 -214
  16. package/src/meeting/effectsState.js +1 -2
  17. package/src/meeting/index.js +120 -213
  18. package/src/meeting/util.js +4 -252
  19. package/src/meetings/index.js +0 -22
  20. package/src/statsAnalyzer/index.js +164 -99
  21. package/test/integration/spec/journey.js +2 -67
  22. package/test/unit/spec/meeting/effectsState.js +2 -1
  23. package/test/unit/spec/meeting/index.js +88 -29
  24. package/test/unit/spec/meeting/utils.js +0 -2
  25. package/test/unit/spec/stats-analyzer/index.js +209 -1
  26. package/dist/analyzer/analyzer.js +0 -113
  27. package/dist/analyzer/analyzer.js.map +0 -1
  28. package/dist/analyzer/calculator.js +0 -87
  29. package/dist/analyzer/calculator.js.map +0 -1
  30. package/dist/metrics/mqa-processor.js +0 -170
  31. package/dist/metrics/mqa-processor.js.map +0 -1
  32. package/dist/stats/data.js +0 -93
  33. package/dist/stats/data.js.map +0 -1
  34. package/dist/stats/events.js +0 -222
  35. package/dist/stats/events.js.map +0 -1
  36. package/dist/stats/filter.js +0 -84
  37. package/dist/stats/filter.js.map +0 -1
  38. package/dist/stats/history.js +0 -147
  39. package/dist/stats/history.js.map +0 -1
  40. package/dist/stats/index.js +0 -425
  41. package/dist/stats/index.js.map +0 -1
  42. package/dist/stats/metrics.js +0 -112
  43. package/dist/stats/metrics.js.map +0 -1
  44. package/dist/stats/stats.js +0 -592
  45. package/dist/stats/stats.js.map +0 -1
  46. package/dist/stats/stream.js +0 -156
  47. package/dist/stats/stream.js.map +0 -1
  48. package/dist/stats/transformer.js +0 -126
  49. package/dist/stats/transformer.js.map +0 -1
  50. package/dist/stats/util.js +0 -64
  51. package/dist/stats/util.js.map +0 -1
  52. package/src/analyzer/analyzer.js +0 -78
  53. package/src/analyzer/calculator.js +0 -77
  54. package/src/metrics/mqa-processor.js +0 -118
  55. package/src/stats/data.js +0 -56
  56. package/src/stats/events.js +0 -185
  57. package/src/stats/filter.js +0 -40
  58. package/src/stats/history.js +0 -107
  59. package/src/stats/index.js +0 -320
  60. package/src/stats/metrics.js +0 -95
  61. package/src/stats/stats.js +0 -477
  62. package/src/stats/stream.js +0 -108
  63. package/src/stats/transformer.js +0 -109
  64. package/src/stats/util.js +0 -44
@@ -68,7 +68,7 @@ var _internalMediaCore = require("@webex/internal-media-core");
68
68
 
69
69
  var _webexErrors = require("../common/errors/webex-errors");
70
70
 
71
- var _statsAnalyzer = _interopRequireDefault(require("../statsAnalyzer"));
71
+ var _statsAnalyzer = require("../statsAnalyzer");
72
72
 
73
73
  var _networkQualityMonitor = _interopRequireDefault(require("../networkQualityMonitor"));
74
74
 
@@ -106,12 +106,6 @@ var _util = _interopRequireDefault(require("../meeting/util"));
106
106
 
107
107
  var _util2 = _interopRequireDefault(require("../media/util"));
108
108
 
109
- var _index3 = _interopRequireDefault(require("../stats/index"));
110
-
111
- var _metrics2 = _interopRequireDefault(require("../stats/metrics"));
112
-
113
- var _util3 = _interopRequireDefault(require("../stats/util"));
114
-
115
109
  var _transcription = _interopRequireDefault(require("../transcription"));
116
110
 
117
111
  var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
@@ -132,8 +126,6 @@ var _media2 = _interopRequireDefault(require("../common/errors/media"));
132
126
 
133
127
  var _meetingInfoV = require("../meeting-info/meeting-info-v2");
134
128
 
135
- var _mqaProcessor = _interopRequireDefault(require("../metrics/mqa-processor"));
136
-
137
129
  var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
138
130
 
139
131
  var _collection = _interopRequireDefault(require("../roap/collection"));
@@ -578,6 +570,74 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
578
570
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "getDevices", function () {
579
571
  return _media.default.getDevices();
580
572
  });
573
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupStatsAnalyzerEventHandlers", function () {
574
+ _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.MEDIA_QUALITY, function (options) {
575
+ var _this$webex$meetings$;
576
+
577
+ // TODO: might have to send the same event to the developer
578
+ // Add ip address info if geo hint is present
579
+ options.data.intervalMetadata.peerReflexiveIP = ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
580
+
581
+ _metrics.default.postEvent({
582
+ event: _config.eventType.MEDIA_QUALITY,
583
+ meeting: (0, _assertThisInitialized2.default)(_this),
584
+ data: {
585
+ intervalData: options.data,
586
+ networkType: options.networkType
587
+ }
588
+ });
589
+ });
590
+
591
+ _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.LOCAL_MEDIA_STARTED, function (data) {
592
+ _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
593
+ file: 'meeting/index',
594
+ function: 'addMedia'
595
+ }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_LOCAL_STARTED, data);
596
+
597
+ _metrics.default.postEvent({
598
+ event: _config.eventType.SENDING_MEDIA_START,
599
+ meeting: (0, _assertThisInitialized2.default)(_this),
600
+ data: {
601
+ mediaType: data.type
602
+ }
603
+ });
604
+ });
605
+
606
+ _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.LOCAL_MEDIA_STOPPED, function (data) {
607
+ _metrics.default.postEvent({
608
+ event: _config.eventType.SENDING_MEDIA_STOP,
609
+ meeting: (0, _assertThisInitialized2.default)(_this),
610
+ data: {
611
+ mediaType: data.type
612
+ }
613
+ });
614
+ });
615
+
616
+ _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STARTED, function (data) {
617
+ _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
618
+ file: 'meeting/index',
619
+ function: 'addMedia'
620
+ }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_REMOTE_STARTED, data);
621
+
622
+ _metrics.default.postEvent({
623
+ event: _config.eventType.RECEIVING_MEDIA_START,
624
+ meeting: (0, _assertThisInitialized2.default)(_this),
625
+ data: {
626
+ mediaType: data.type
627
+ }
628
+ });
629
+ });
630
+
631
+ _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STOPPED, function (data) {
632
+ _metrics.default.postEvent({
633
+ event: _config.eventType.RECEIVING_MEDIA_STOP,
634
+ meeting: (0, _assertThisInitialized2.default)(_this),
635
+ data: {
636
+ mediaType: data.type
637
+ }
638
+ });
639
+ });
640
+ });
581
641
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaNegotiatedEvent", function () {
582
642
  if (_this.config.experimental.enableMediaNegotiatedEvent) {
583
643
  _loggerProxy.default.logger.info('Meeting:mediaNegotiatedEvent --> Media server negotiated');
@@ -800,23 +860,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
800
860
  */
801
861
 
802
862
  _this.meetingFiniteStateMachine = _state.default.create((0, _assertThisInitialized2.default)(_this));
803
- /**
804
- * @instance
805
- * @type {WebRTCStats}
806
- * @public
807
- * @memberof Meeting
808
- */
809
-
810
- _this.stats = null;
811
- /**
812
- * @instance
813
- * @type {WebRTCStats}
814
- * @readonly
815
- * @private
816
- * @memberof Meeting
817
- */
818
-
819
- _this.internalStats = null;
820
863
  /**
821
864
  * @instance
822
865
  * @type {String}
@@ -1069,15 +1112,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1069
1112
  */
1070
1113
 
1071
1114
  _this.dialOutUrl = '';
1072
- /**
1073
- * @instance
1074
- * @type {MediaMetrics}
1075
- * @readonly
1076
- * @private
1077
- * @memberof Meeting
1078
- */
1079
-
1080
- _this.mediaQualityMetrics = null;
1081
1115
  /**
1082
1116
  * @instance
1083
1117
  * @type {StatsAnalyzer}
@@ -1094,15 +1128,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1094
1128
  */
1095
1129
 
1096
1130
  _this.networkQualityMonitor = null;
1097
- /**
1098
- * @instance
1099
- * @type {MQAProcessor}
1100
- * @readonly
1101
- * @private
1102
- * @memberof Meeting
1103
- */
1104
-
1105
- _this.mqaProcessor = null;
1106
1131
  /**
1107
1132
  * @instance
1108
1133
  * @type {String}
@@ -2544,146 +2569,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2544
2569
  value: function getMembers() {
2545
2570
  return this.members;
2546
2571
  }
2547
- /**
2548
- * If this gets turned off mid meeting after attaching media, it will shut down the MQA metrics and they will
2549
- * not restart unless the start function is called again
2550
- * @returns {undefined}
2551
- * @public
2552
- * @memberof Meeting
2553
- */
2554
-
2555
- }, {
2556
- key: "cleanMQAInterval",
2557
- value: function cleanMQAInterval() {
2558
- if (this.mqaInterval) {
2559
- clearInterval(this.mqaInterval);
2560
- }
2561
- }
2562
- /**
2563
- * Automatically publishes media metrics data and on a config interval
2564
- * uses the existing getStats data filter, so no new streams are created
2565
- * but it is separate than history, so history will not be available
2566
- * @returns {MediaMetrics}
2567
- * @public
2568
- * @memberof Meeting
2569
- */
2570
-
2571
- }, {
2572
- key: "startMediaQualityMetrics",
2573
- value: function startMediaQualityMetrics() {
2574
- var _this18 = this;
2575
-
2576
- var automaticMetrics = new _metrics2.default({
2577
- config: this.config
2578
- });
2579
- var stats = this.getStats(automaticMetrics.initialize(), true);
2580
- this.mediaQualityMetrics = automaticMetrics;
2581
- this.mediaQualityMetrics.setStats(stats);
2582
- this.mqaInterval = setInterval(function () {
2583
- return _this18.processMQAData();
2584
- }, this.config.metrics.mqaMetricsInterval);
2585
- return automaticMetrics;
2586
- }
2587
- /**
2588
- * @private
2589
- * @returns {undefined}
2590
- * @memberof Meeting
2591
- */
2592
-
2593
- }, {
2594
- key: "processMQAData",
2595
- value: function processMQAData() {
2596
- var _this19 = this;
2597
-
2598
- if (!this.mqaProcessor) {
2599
- this.mqaProcessor = new _mqaProcessor.default();
2600
- }
2601
-
2602
- _constants.MQA_STATS.DATA_PLACEMENTS.forEach(function (key) {
2603
- if (_this19.mediaQualityMetrics && _this19.mediaQualityMetrics.stats) {
2604
- var sendRecvData;
2605
-
2606
- if (key.toLowerCase().endsWith(_constants.STATS.SENDER)) {
2607
- sendRecvData = _this19.mediaQualityMetrics.stats.getSender(key);
2608
- } else if (key.toLowerCase().endsWith(_constants.STATS.RECEIVER)) {
2609
- sendRecvData = _this19.mediaQualityMetrics.stats.getReceiver(key);
2610
- }
2611
-
2612
- var mqa;
2613
-
2614
- if (sendRecvData) {
2615
- mqa = sendRecvData.getMQA();
2616
- }
2617
-
2618
- if (mqa) {
2619
- var interval = mqa.getSlice(_this19.config.metrics.mqaMetricsInterval / 1000); // milliseconds -> second based intervals
2620
-
2621
- _this19.mqaProcessor.process(key, interval);
2622
- }
2623
- }
2624
- });
2625
- }
2626
- /**
2627
- * Reference to the stats builder object
2628
- * @param {Object} options - see #createStats
2629
- * @param {Boolean} override - override the previous getStats
2630
- * @returns {WebRTCStats}
2631
- * @public
2632
- * @memberof Meeting
2633
- */
2634
-
2635
- }, {
2636
- key: "getStats",
2637
- value: function getStats(options, override) {
2638
- if (!this.stats) {
2639
- return this.createStats(options);
2640
- }
2641
-
2642
- if (override) {
2643
- if (this.stats) {
2644
- _loggerProxy.default.logger.log('Meeting:index#getStats --> Overriding the previous stats object without destroying first can result in memory leaks.');
2645
- }
2646
-
2647
- return this.createStats(options);
2648
- }
2649
-
2650
- return this.stats;
2651
- }
2652
- /**
2653
- * write the stats builder object and assign to meeting property
2654
- * @param {Object} options
2655
- * @returns {WebRTCStats}
2656
- * @public
2657
- * @memberof Meeting
2658
- */
2659
-
2660
- }, {
2661
- key: "createStats",
2662
- value: function createStats() {
2663
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2664
-
2665
- _util3.default.generateOptions(options, _constants.STATS.CONFIG, this);
2666
-
2667
- options.config = _constants.STATS.CONFIG;
2668
- this.stats = new _index3.default(this.attrs, this.options, options);
2669
- return this.stats;
2670
- }
2671
- /**
2672
- * if you have started a stats instance, here's how you can stop it
2673
- * @returns {undefined}
2674
- * @public
2675
- * @memberof Meeting
2676
- */
2677
-
2678
- }, {
2679
- key: "stopStats",
2680
- value: function stopStats() {
2681
- if (this.stats) {
2682
- this.stats.destroySenders();
2683
- this.stats.destroyReceivers();
2684
- this.stats = null;
2685
- }
2686
- }
2687
2572
  /**
2688
2573
  * Truthy when a meeting has an audio connection established
2689
2574
  * @returns {Boolean} true if meeting audio is connected otherwise false
@@ -2901,7 +2786,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2901
2786
  }, {
2902
2787
  key: "setRemoteStream",
2903
2788
  value: function setRemoteStream(pc) {
2904
- var _this20 = this;
2789
+ var _this18 = this;
2905
2790
 
2906
2791
  if (!pc) {
2907
2792
  return;
@@ -2944,8 +2829,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2944
2829
  trackMediaID = null;
2945
2830
 
2946
2831
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
2947
- correlation_id: _this20.correlationId,
2948
- locus_id: _this20.locusUrl.split('/').pop()
2832
+ correlation_id: _this18.correlationId,
2833
+ locus_id: _this18.locusUrl.split('/').pop()
2949
2834
  });
2950
2835
  }
2951
2836
  }
@@ -2954,14 +2839,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2954
2839
  case MEDIA_ID.AUDIO_TRACK:
2955
2840
  eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
2956
2841
 
2957
- _this20.mediaProperties.setRemoteAudioTrack(mediaTrack);
2842
+ _this18.mediaProperties.setRemoteAudioTrack(mediaTrack);
2958
2843
 
2959
2844
  break;
2960
2845
 
2961
2846
  case MEDIA_ID.VIDEO_TRACK:
2962
2847
  eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
2963
2848
 
2964
- _this20.mediaProperties.setRemoteVideoTrack(mediaTrack);
2849
+ _this18.mediaProperties.setRemoteVideoTrack(mediaTrack);
2965
2850
 
2966
2851
  break;
2967
2852
 
@@ -2969,7 +2854,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2969
2854
  if (event.track) {
2970
2855
  eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
2971
2856
 
2972
- _this20.mediaProperties.setRemoteShare(mediaTrack);
2857
+ _this18.mediaProperties.setRemoteShare(mediaTrack);
2973
2858
  }
2974
2859
 
2975
2860
  break;
@@ -2981,10 +2866,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2981
2866
  } // start stats here the stats are coming null if you dont receive streams
2982
2867
 
2983
2868
 
2984
- _this20.statsAnalyzer.startAnalyzer(_this20.mediaProperties.peerConnection);
2869
+ _this18.statsAnalyzer.startAnalyzer(_this18.mediaProperties.peerConnection);
2985
2870
 
2986
2871
  if (eventType && mediaTrack) {
2987
- _triggerProxy.default.trigger(_this20, {
2872
+ _triggerProxy.default.trigger(_this18, {
2988
2873
  file: 'meeting/index',
2989
2874
  function: 'setRemoteStream:pc.ontrack'
2990
2875
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
@@ -3064,7 +2949,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3064
2949
  }, {
3065
2950
  key: "closeRemoteTracks",
3066
2951
  value: function closeRemoteTracks() {
3067
- var _this21 = this;
2952
+ var _this19 = this;
3068
2953
 
3069
2954
  var _this$mediaProperties = this.mediaProperties,
3070
2955
  remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
@@ -3078,7 +2963,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3078
2963
  */
3079
2964
 
3080
2965
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
3081
- _triggerProxy.default.trigger(_this21, {
2966
+ _triggerProxy.default.trigger(_this19, {
3082
2967
  file: 'meeting/index',
3083
2968
  function: 'closeRemoteTracks'
3084
2969
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3233,7 +3118,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3233
3118
  }, {
3234
3119
  key: "setLocalShareTrack",
3235
3120
  value: function setLocalShareTrack(localShare) {
3236
- var _this22 = this;
3121
+ var _this20 = this;
3237
3122
 
3238
3123
  var settings = null;
3239
3124
 
@@ -3256,7 +3141,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3256
3141
  }
3257
3142
 
3258
3143
  contentTracks.onended = function () {
3259
- return _this22.handleShareTrackEnded(localShare);
3144
+ return _this20.handleShareTrackEnded(localShare);
3260
3145
  };
3261
3146
 
3262
3147
  _triggerProxy.default.trigger(this, {
@@ -3279,7 +3164,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3279
3164
  }, {
3280
3165
  key: "closeLocalStream",
3281
3166
  value: function closeLocalStream() {
3282
- var _this23 = this;
3167
+ var _this21 = this;
3283
3168
 
3284
3169
  var _this$mediaProperties2 = this.mediaProperties,
3285
3170
  audioTrack = _this$mediaProperties2.audioTrack,
@@ -3291,7 +3176,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3291
3176
  var videoStopped = videoTrack && videoTrack.readyState === _constants.ENDED; // triggers event for audio and video stop , sometime either audio or video one of them exists
3292
3177
 
3293
3178
  if (audioStopped || videoStopped) {
3294
- _triggerProxy.default.trigger(_this23, {
3179
+ _triggerProxy.default.trigger(_this21, {
3295
3180
  file: 'meeting/index',
3296
3181
  function: 'closeLocalStream'
3297
3182
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3313,12 +3198,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3313
3198
  }, {
3314
3199
  key: "closeLocalShare",
3315
3200
  value: function closeLocalShare() {
3316
- var _this24 = this;
3201
+ var _this22 = this;
3317
3202
 
3318
3203
  var track = this.mediaProperties.shareTrack;
3319
3204
  return _media.default.stopTracks(track).then(function () {
3320
3205
  if (track && track.readyState === _constants.ENDED) {
3321
- _triggerProxy.default.trigger(_this24, {
3206
+ _triggerProxy.default.trigger(_this22, {
3322
3207
  file: 'meeting/index',
3323
3208
  function: 'closeLocalShare'
3324
3209
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3364,7 +3249,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3364
3249
  }, {
3365
3250
  key: "setMercuryListener",
3366
3251
  value: function setMercuryListener() {
3367
- var _this25 = this;
3252
+ var _this23 = this;
3368
3253
 
3369
3254
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
3370
3255
  // if the meeting has active peer connections, it should try to reconnect.
@@ -3372,29 +3257,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3372
3257
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online'); // Only send restore event when it was disconnected before and for connected later
3373
3258
 
3374
3259
 
3375
- if (!_this25.hasWebsocketConnected) {
3260
+ if (!_this23.hasWebsocketConnected) {
3376
3261
  _metrics.default.postEvent({
3377
3262
  event: _config.eventType.MERCURY_CONNECTION_RESTORED,
3378
- meeting: _this25
3263
+ meeting: _this23
3379
3264
  });
3380
3265
 
3381
3266
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
3382
- correlation_id: _this25.correlationId
3267
+ correlation_id: _this23.correlationId
3383
3268
  });
3384
3269
  }
3385
3270
 
3386
- _this25.hasWebsocketConnected = true;
3271
+ _this23.hasWebsocketConnected = true;
3387
3272
  });
3388
3273
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
3389
3274
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3390
3275
 
3391
3276
  _metrics.default.postEvent({
3392
3277
  event: _config.eventType.MERCURY_CONNECTION_LOST,
3393
- meeting: _this25
3278
+ meeting: _this23
3394
3279
  });
3395
3280
 
3396
3281
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
3397
- correlation_id: _this25.correlationId
3282
+ correlation_id: _this23.correlationId
3398
3283
  });
3399
3284
  });
3400
3285
  }
@@ -3452,7 +3337,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3452
3337
  }, {
3453
3338
  key: "muteAudio",
3454
3339
  value: function muteAudio() {
3455
- var _this26 = this;
3340
+ var _this24 = this;
3456
3341
 
3457
3342
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3458
3343
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3470,11 +3355,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3470
3355
  var LOG_HEADER = 'Meeting:index#muteAudio -->'; // First, stop sending the local audio media
3471
3356
 
3472
3357
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3473
- _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3358
+ _util.default.handleAudioLogging(_this24.mediaProperties.audioTrack);
3474
3359
 
3475
3360
  _metrics.default.postEvent({
3476
3361
  event: _config.eventType.MUTED,
3477
- meeting: _this26,
3362
+ meeting: _this24,
3478
3363
  data: {
3479
3364
  trigger: _config.trigger.USER_INTERACTION,
3480
3365
  mediaType: _config.mediaType.AUDIO
@@ -3482,8 +3367,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3482
3367
  });
3483
3368
  }).catch(function (error) {
3484
3369
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
3485
- correlation_id: _this26.correlationId,
3486
- locus_id: _this26.locusUrl.split('/').pop(),
3370
+ correlation_id: _this24.correlationId,
3371
+ locus_id: _this24.locusUrl.split('/').pop(),
3487
3372
  reason: error.message,
3488
3373
  stack: error.stack
3489
3374
  });
@@ -3505,7 +3390,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3505
3390
  }, {
3506
3391
  key: "unmuteAudio",
3507
3392
  value: function unmuteAudio() {
3508
- var _this27 = this;
3393
+ var _this25 = this;
3509
3394
 
3510
3395
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3511
3396
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3523,11 +3408,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3523
3408
  var LOG_HEADER = 'Meeting:index#unmuteAudio -->'; // First, send the control to unmute the participant on the server
3524
3409
 
3525
3410
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3526
- _util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
3411
+ _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3527
3412
 
3528
3413
  _metrics.default.postEvent({
3529
3414
  event: _config.eventType.UNMUTED,
3530
- meeting: _this27,
3415
+ meeting: _this25,
3531
3416
  data: {
3532
3417
  trigger: _config.trigger.USER_INTERACTION,
3533
3418
  mediaType: _config.mediaType.AUDIO
@@ -3535,8 +3420,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3535
3420
  });
3536
3421
  }).catch(function (error) {
3537
3422
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
3538
- correlation_id: _this27.correlationId,
3539
- locus_id: _this27.locusUrl.split('/').pop(),
3423
+ correlation_id: _this25.correlationId,
3424
+ locus_id: _this25.locusUrl.split('/').pop(),
3540
3425
  reason: error.message,
3541
3426
  stack: error.stack
3542
3427
  });
@@ -3558,7 +3443,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3558
3443
  }, {
3559
3444
  key: "muteVideo",
3560
3445
  value: function muteVideo() {
3561
- var _this28 = this;
3446
+ var _this26 = this;
3562
3447
 
3563
3448
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3564
3449
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3575,11 +3460,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3575
3460
 
3576
3461
  var LOG_HEADER = 'Meeting:index#muteVideo -->';
3577
3462
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
3578
- _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3463
+ _util.default.handleVideoLogging(_this26.mediaProperties.videoTrack);
3579
3464
 
3580
3465
  _metrics.default.postEvent({
3581
3466
  event: _config.eventType.MUTED,
3582
- meeting: _this28,
3467
+ meeting: _this26,
3583
3468
  data: {
3584
3469
  trigger: _config.trigger.USER_INTERACTION,
3585
3470
  mediaType: _config.mediaType.VIDEO
@@ -3587,8 +3472,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3587
3472
  });
3588
3473
  }).catch(function (error) {
3589
3474
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
3590
- correlation_id: _this28.correlationId,
3591
- locus_id: _this28.locusUrl.split('/').pop(),
3475
+ correlation_id: _this26.correlationId,
3476
+ locus_id: _this26.locusUrl.split('/').pop(),
3592
3477
  reason: error.message,
3593
3478
  stack: error.stack
3594
3479
  });
@@ -3610,7 +3495,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3610
3495
  }, {
3611
3496
  key: "unmuteVideo",
3612
3497
  value: function unmuteVideo() {
3613
- var _this29 = this;
3498
+ var _this27 = this;
3614
3499
 
3615
3500
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3616
3501
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3627,11 +3512,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3627
3512
 
3628
3513
  var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
3629
3514
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
3630
- _util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
3515
+ _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
3631
3516
 
3632
3517
  _metrics.default.postEvent({
3633
3518
  event: _config.eventType.UNMUTED,
3634
- meeting: _this29,
3519
+ meeting: _this27,
3635
3520
  data: {
3636
3521
  trigger: _config.trigger.USER_INTERACTION,
3637
3522
  mediaType: _config.mediaType.VIDEO
@@ -3639,8 +3524,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3639
3524
  });
3640
3525
  }).catch(function (error) {
3641
3526
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
3642
- correlation_id: _this29.correlationId,
3643
- locus_id: _this29.locusUrl.split('/').pop(),
3527
+ correlation_id: _this27.correlationId,
3528
+ locus_id: _this27.locusUrl.split('/').pop(),
3644
3529
  reason: error.message,
3645
3530
  stack: error.stack
3646
3531
  });
@@ -3681,7 +3566,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3681
3566
  }, {
3682
3567
  key: "joinWithMedia",
3683
3568
  value: function joinWithMedia() {
3684
- var _this30 = this;
3569
+ var _this28 = this;
3685
3570
 
3686
3571
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3687
3572
  // TODO: add validations for parameters
@@ -3689,12 +3574,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3689
3574
  joinOptions = options.joinOptions,
3690
3575
  audioVideoOptions = options.audioVideoOptions;
3691
3576
  return this.join(joinOptions).then(function (joinResponse) {
3692
- return _this30.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref8) {
3577
+ return _this28.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref8) {
3693
3578
  var _ref9 = (0, _slicedToArray2.default)(_ref8, 2),
3694
3579
  localStream = _ref9[0],
3695
3580
  localShare = _ref9[1];
3696
3581
 
3697
- return _this30.addMedia({
3582
+ return _this28.addMedia({
3698
3583
  mediaSettings: mediaSettings,
3699
3584
  localShare: localShare,
3700
3585
  localStream: localStream
@@ -3710,8 +3595,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3710
3595
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
3711
3596
 
3712
3597
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
3713
- correlation_id: _this30.correlationId,
3714
- locus_id: _this30.locusUrl.split('/').pop(),
3598
+ correlation_id: _this28.correlationId,
3599
+ locus_id: _this28.locusUrl.split('/').pop(),
3715
3600
  reason: error.message,
3716
3601
  stack: error.stack
3717
3602
  }, {
@@ -3733,7 +3618,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3733
3618
  }, {
3734
3619
  key: "reconnect",
3735
3620
  value: function reconnect(options) {
3736
- var _this31 = this;
3621
+ var _this29 = this;
3737
3622
 
3738
3623
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
3739
3624
 
@@ -3766,14 +3651,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3766
3651
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
3767
3652
 
3768
3653
  return this.reconnectionManager.reconnect(options).then(function () {
3769
- _triggerProxy.default.trigger(_this31, {
3654
+ _triggerProxy.default.trigger(_this29, {
3770
3655
  file: 'meeting/index',
3771
3656
  function: 'reconnect'
3772
3657
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
3773
3658
 
3774
3659
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
3775
3660
  }).catch(function (error) {
3776
- _triggerProxy.default.trigger(_this31, {
3661
+ _triggerProxy.default.trigger(_this29, {
3777
3662
  file: 'meeting/index',
3778
3663
  function: 'reconnect'
3779
3664
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -3783,20 +3668,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3783
3668
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3784
3669
 
3785
3670
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
3786
- correlation_id: _this31.correlationId,
3787
- locus_id: _this31.locusUrl.split('/').pop(),
3671
+ correlation_id: _this29.correlationId,
3672
+ locus_id: _this29.locusUrl.split('/').pop(),
3788
3673
  reason: error.message,
3789
3674
  stack: error.stack
3790
3675
  });
3791
3676
 
3792
- _this31.uploadLogs({
3677
+ _this29.uploadLogs({
3793
3678
  file: 'meeting/index',
3794
3679
  function: 'reconnect'
3795
3680
  });
3796
3681
 
3797
3682
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
3798
3683
  }).finally(function () {
3799
- _this31.reconnectionManager.reset();
3684
+ _this29.reconnectionManager.reset();
3800
3685
  });
3801
3686
  }
3802
3687
  /**
@@ -3827,20 +3712,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3827
3712
  }, {
3828
3713
  key: "monitorTranscriptionSocketConnection",
3829
3714
  value: function monitorTranscriptionSocketConnection() {
3830
- var _this32 = this;
3715
+ var _this30 = this;
3831
3716
 
3832
3717
  this.transcription.onCloseSocket(function (event) {
3833
3718
  _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));
3834
3719
 
3835
- _this32.triggerStopReceivingTranscriptionEvent();
3720
+ _this30.triggerStopReceivingTranscriptionEvent();
3836
3721
  });
3837
3722
  this.transcription.onErrorSocket(function (event) {
3838
3723
  _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));
3839
3724
 
3840
- _this32.triggerStopReceivingTranscriptionEvent();
3725
+ _this30.triggerStopReceivingTranscriptionEvent();
3841
3726
 
3842
3727
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
3843
- correlation_id: _this32.correlationId,
3728
+ correlation_id: _this30.correlationId,
3844
3729
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
3845
3730
  event: event
3846
3731
  });
@@ -3856,7 +3741,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3856
3741
  key: "receiveTranscription",
3857
3742
  value: function () {
3858
3743
  var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
3859
- var _this33 = this;
3744
+ var _this31 = this;
3860
3745
 
3861
3746
  var datachannelUrl, _yield$this$request, webSocketUrl;
3862
3747
 
@@ -3889,7 +3774,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3889
3774
 
3890
3775
 
3891
3776
  this.transcription.subscribe(function (payload) {
3892
- _triggerProxy.default.trigger(_this33, {
3777
+ _triggerProxy.default.trigger(_this31, {
3893
3778
  file: 'meeting/index',
3894
3779
  function: 'join'
3895
3780
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
@@ -3971,7 +3856,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3971
3856
  }, {
3972
3857
  key: "join",
3973
3858
  value: function join() {
3974
- var _this34 = this;
3859
+ var _this32 = this;
3975
3860
 
3976
3861
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3977
3862
 
@@ -4080,17 +3965,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4080
3965
  }
4081
3966
 
4082
3967
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
4083
- _this34.meetingFiniteStateMachine.join();
3968
+ _this32.meetingFiniteStateMachine.join();
4084
3969
 
4085
3970
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
4086
3971
 
4087
3972
  return join;
4088
3973
  }).then(function (join) {
4089
3974
  joinSuccess(join);
4090
- _this34.deferJoin = undefined;
3975
+ _this32.deferJoin = undefined;
4091
3976
 
4092
3977
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
4093
- correlation_id: _this34.correlationId
3978
+ correlation_id: _this32.correlationId
4094
3979
  });
4095
3980
 
4096
3981
  return join;
@@ -4105,18 +3990,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4105
3990
  break;
4106
3991
  }
4107
3992
 
4108
- if (!(_this34.config.receiveTranscription || options.receiveTranscription)) {
3993
+ if (!(_this32.config.receiveTranscription || options.receiveTranscription)) {
4109
3994
  _context3.next = 6;
4110
3995
  break;
4111
3996
  }
4112
3997
 
4113
- if (!_this34.isTranscriptionSupported()) {
3998
+ if (!_this32.isTranscriptionSupported()) {
4114
3999
  _context3.next = 6;
4115
4000
  break;
4116
4001
  }
4117
4002
 
4118
4003
  _context3.next = 5;
4119
- return _this34.receiveTranscription();
4004
+ return _this32.receiveTranscription();
4120
4005
 
4121
4006
  case 5:
4122
4007
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
@@ -4145,14 +4030,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4145
4030
  }()).catch(function (error) {
4146
4031
  var _error$error;
4147
4032
 
4148
- _this34.meetingFiniteStateMachine.fail(error);
4033
+ _this32.meetingFiniteStateMachine.fail(error);
4149
4034
 
4150
4035
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
4151
4036
 
4152
4037
  _metrics.default.postEvent({
4153
4038
  event: _config.eventType.LOCUS_JOIN_RESPONSE,
4154
- meeting: _this34,
4155
- meetingId: _this34.id,
4039
+ meeting: _this32,
4040
+ meetingId: _this32.id,
4156
4041
  data: {
4157
4042
  errors: [_metrics.default.parseLocusError(error.error, true)]
4158
4043
  }
@@ -4160,19 +4045,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4160
4045
 
4161
4046
 
4162
4047
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
4163
- correlation_id: _this34.correlationId,
4048
+ correlation_id: _this32.correlationId,
4164
4049
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
4165
4050
  stack: error.stack
4166
4051
  }); // Upload logs on join Failure
4167
4052
 
4168
4053
 
4169
- _triggerProxy.default.trigger(_this34, {
4054
+ _triggerProxy.default.trigger(_this32, {
4170
4055
  file: 'meeting/index',
4171
4056
  function: 'join'
4172
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
4057
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this32);
4173
4058
 
4174
4059
  joinFailed(error);
4175
- _this34.deferJoin = undefined;
4060
+ _this32.deferJoin = undefined;
4176
4061
  return _promise.default.reject(error);
4177
4062
  });
4178
4063
  }
@@ -4216,7 +4101,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4216
4101
  }, {
4217
4102
  key: "dialInPstn",
4218
4103
  value: function dialInPstn() {
4219
- var _this35 = this;
4104
+ var _this33 = this;
4220
4105
 
4221
4106
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
4222
4107
 
@@ -4229,15 +4114,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4229
4114
  locusUrl: locusUrl,
4230
4115
  clientUrl: this.deviceUrl
4231
4116
  }).then(function (res) {
4232
- _this35.locusInfo.onFullLocus(res.body.locus);
4117
+ _this33.locusInfo.onFullLocus(res.body.locus);
4233
4118
  }).catch(function (error) {
4234
4119
  var _error$error2;
4235
4120
 
4236
4121
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
4237
- correlation_id: _this35.correlationId,
4238
- dial_in_url: _this35.dialInUrl,
4122
+ correlation_id: _this33.correlationId,
4123
+ dial_in_url: _this33.dialInUrl,
4239
4124
  locus_id: locusUrl.split('/').pop(),
4240
- client_url: _this35.deviceUrl,
4125
+ client_url: _this33.deviceUrl,
4241
4126
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
4242
4127
  stack: error.stack
4243
4128
  });
@@ -4256,7 +4141,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4256
4141
  }, {
4257
4142
  key: "dialOutPstn",
4258
4143
  value: function dialOutPstn(phoneNumber) {
4259
- var _this36 = this;
4144
+ var _this34 = this;
4260
4145
 
4261
4146
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
4262
4147
 
@@ -4270,15 +4155,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4270
4155
  locusUrl: locusUrl,
4271
4156
  clientUrl: this.deviceUrl
4272
4157
  }).then(function (res) {
4273
- _this36.locusInfo.onFullLocus(res.body.locus);
4158
+ _this34.locusInfo.onFullLocus(res.body.locus);
4274
4159
  }).catch(function (error) {
4275
4160
  var _error$error3;
4276
4161
 
4277
4162
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
4278
- correlation_id: _this36.correlationId,
4279
- dial_out_url: _this36.dialOutUrl,
4163
+ correlation_id: _this34.correlationId,
4164
+ dial_out_url: _this34.dialOutUrl,
4280
4165
  locus_id: locusUrl.split('/').pop(),
4281
- client_url: _this36.deviceUrl,
4166
+ client_url: _this34.deviceUrl,
4282
4167
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
4283
4168
  stack: error.stack
4284
4169
  });
@@ -4310,7 +4195,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4310
4195
  }, {
4311
4196
  key: "moveTo",
4312
4197
  value: function moveTo(resourceId) {
4313
- var _this37 = this;
4198
+ var _this35 = this;
4314
4199
 
4315
4200
  if (!resourceId) {
4316
4201
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4352,13 +4237,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4352
4237
  case 0:
4353
4238
  _context4.prev = 0;
4354
4239
 
4355
- if (!_this37.isSharing) {
4240
+ if (!_this35.isSharing) {
4356
4241
  _context4.next = 4;
4357
4242
  break;
4358
4243
  }
4359
4244
 
4360
4245
  _context4.next = 4;
4361
- return _this37.stopFloorRequest();
4246
+ return _this35.stopFloorRequest();
4362
4247
 
4363
4248
  case 4:
4364
4249
  mediaSettings = {
@@ -4372,23 +4257,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4372
4257
  }
4373
4258
  }; // clean up the local tracks
4374
4259
 
4375
- _this37.mediaProperties.setMediaDirection(mediaSettings.mediaDirection); // close the existing local tracks
4260
+ _this35.mediaProperties.setMediaDirection(mediaSettings.mediaDirection); // close the existing local tracks
4376
4261
 
4377
4262
 
4378
4263
  _context4.next = 8;
4379
- return _this37.closeLocalStream();
4264
+ return _this35.closeLocalStream();
4380
4265
 
4381
4266
  case 8:
4382
4267
  _context4.next = 10;
4383
- return _this37.closeLocalShare();
4268
+ return _this35.closeLocalShare();
4384
4269
 
4385
4270
  case 10:
4386
- _this37.mediaProperties.unsetMediaTracks(); // 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
4271
+ _this35.mediaProperties.unsetMediaTracks(); // 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
4387
4272
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4388
4273
 
4389
4274
 
4390
4275
  _context4.next = 13;
4391
- return _this37.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4276
+ return _this35.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4392
4277
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4393
4278
  });
4394
4279
 
@@ -4403,8 +4288,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4403
4288
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context4.t0);
4404
4289
 
4405
4290
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4406
- correlation_id: _this37.correlationId,
4407
- locus_id: _this37.locusUrl.split('/').pop(),
4291
+ correlation_id: _this35.correlationId,
4292
+ locus_id: _this35.locusUrl.split('/').pop(),
4408
4293
  reason: _context4.t0.message,
4409
4294
  stack: _context4.t0.stack
4410
4295
  });
@@ -4423,13 +4308,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4423
4308
  resourceId: resourceId,
4424
4309
  moveToResource: true
4425
4310
  }).then(function () {
4426
- _this37.meetingFiniteStateMachine.join();
4311
+ _this35.meetingFiniteStateMachine.join();
4427
4312
  }).catch(function (error) {
4428
- _this37.meetingFiniteStateMachine.fail(error);
4313
+ _this35.meetingFiniteStateMachine.fail(error);
4429
4314
 
4430
4315
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4431
- correlation_id: _this37.correlationId,
4432
- locus_id: _this37.locusUrl.split('/').pop(),
4316
+ correlation_id: _this35.correlationId,
4317
+ locus_id: _this35.locusUrl.split('/').pop(),
4433
4318
  reason: error.message,
4434
4319
  stack: error.stack
4435
4320
  });
@@ -4450,7 +4335,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4450
4335
  }, {
4451
4336
  key: "moveFrom",
4452
4337
  value: function moveFrom(resourceId) {
4453
- var _this38 = this;
4338
+ var _this36 = this;
4454
4339
 
4455
4340
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4456
4341
  if (!resourceId) {
@@ -4465,21 +4350,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4465
4350
  });
4466
4351
 
4467
4352
  return _util.default.joinMeetingOptions(this).then(function () {
4468
- return _util.default.leaveMeeting(_this38, {
4353
+ return _util.default.leaveMeeting(_this36, {
4469
4354
  resourceId: resourceId,
4470
4355
  correlationId: oldCorrelationId,
4471
4356
  moveMeeting: true
4472
4357
  }).then(function () {
4473
- _this38.resourceId = '';
4358
+ _this36.resourceId = '';
4474
4359
 
4475
4360
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4476
4361
  });
4477
4362
  }).catch(function (error) {
4478
- _this38.meetingFiniteStateMachine.fail(error);
4363
+ _this36.meetingFiniteStateMachine.fail(error);
4479
4364
 
4480
4365
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4481
- correlation_id: _this38.correlationId,
4482
- locus_id: _this38.locusUrl.split('/').pop(),
4366
+ correlation_id: _this36.correlationId,
4367
+ locus_id: _this36.locusUrl.split('/').pop(),
4483
4368
  reason: error.message,
4484
4369
  stack: error.stack
4485
4370
  });
@@ -4515,7 +4400,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4515
4400
  * @memberof Meeting
4516
4401
  */
4517
4402
  function addMedia() {
4518
- var _this39 = this;
4403
+ var _this37 = this;
4519
4404
 
4520
4405
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4521
4406
  var LOG_HEADER = 'Meeting:index#addMedia -->';
@@ -4563,69 +4448,48 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4563
4448
  });
4564
4449
 
4565
4450
  return _util.default.validateOptions(options).then(function () {
4566
- _this39.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4451
+ _this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4567
4452
 
4568
- _this39.setMercuryListener();
4453
+ _this37.setMercuryListener();
4569
4454
 
4570
- _peerConnectionManager.default.setPeerConnectionEvents(_this39);
4455
+ _peerConnectionManager.default.setPeerConnectionEvents(_this37);
4571
4456
 
4572
- return _this39.preMedia(localStream, localShare, mediaSettings);
4457
+ return _this37.preMedia(localStream, localShare, mediaSettings);
4573
4458
  }).then(function () {
4574
- return _media.default.attachMedia(_this39.mediaProperties, {
4575
- meetingId: _this39.id,
4576
- remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4577
- enableRtx: _this39.config.enableRtx,
4578
- enableExtmap: _this39.config.enableExtmap,
4579
- setStartLocalSDPGenRemoteSDPRecvDelay: _this39.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this39)
4459
+ return _media.default.attachMedia(_this37.mediaProperties, {
4460
+ meetingId: _this37.id,
4461
+ remoteQualityLevel: _this37.mediaProperties.remoteQualityLevel,
4462
+ enableRtx: _this37.config.enableRtx,
4463
+ enableExtmap: _this37.config.enableExtmap,
4464
+ setStartLocalSDPGenRemoteSDPRecvDelay: _this37.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this37)
4580
4465
  }).then(function (peerConnection) {
4581
- return _this39.getDevices().then(function (devices) {
4466
+ return _this37.getDevices().then(function (devices) {
4582
4467
  _util.default.handleDeviceLogging(devices);
4583
4468
 
4584
4469
  return peerConnection;
4585
4470
  });
4586
4471
  }).then(function (peerConnection) {
4587
- _this39.handleMediaLogging(_this39.mediaProperties);
4472
+ _this37.handleMediaLogging(_this37.mediaProperties);
4588
4473
 
4589
4474
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
4590
4475
 
4591
- _this39.setRemoteStream(peerConnection);
4592
-
4593
- _util.default.startInternalStats(_this39);
4594
-
4595
- if (_this39.config.metrics.autoSendMQA) {
4596
- _this39.startMediaQualityMetrics();
4597
- }
4476
+ _this37.setRemoteStream(peerConnection);
4598
4477
 
4599
- if (_this39.config.stats.enableStatsAnalyzer) {
4478
+ if (_this37.config.stats.enableStatsAnalyzer) {
4600
4479
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
4601
- _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
4602
- _this39.statsAnalyzer = new _statsAnalyzer.default(_this39.config.stats, _this39.networkQualityMonitor);
4480
+ _this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
4481
+ _this37.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this37.config.stats, _this37.networkQualityMonitor);
4603
4482
 
4604
- _this39.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
4605
- var _this39$webex$meeting;
4483
+ _this37.setupStatsAnalyzerEventHandlers();
4606
4484
 
4607
- // TODO: might have to send the same event to the developer
4608
- // Add ip address info if geo hint is present
4609
- options.data.intervalMetadata.peerReflexiveIP = ((_this39$webex$meeting = _this39.webex.meetings.geoHintInfo) === null || _this39$webex$meeting === void 0 ? void 0 : _this39$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
4610
-
4611
- _metrics.default.postEvent({
4612
- event: _config.eventType.MEDIA_QUALITY,
4613
- meeting: _this39,
4614
- data: {
4615
- intervalData: options.data,
4616
- networkType: options.networkType
4617
- }
4618
- });
4619
- });
4620
-
4621
- _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
4485
+ _this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
4622
4486
  }
4623
4487
  }).catch(function (error) {
4624
4488
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
4625
4489
 
4626
4490
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4627
- correlation_id: _this39.correlationId,
4628
- locus_id: _this39.locusUrl.split('/').pop(),
4491
+ correlation_id: _this37.correlationId,
4492
+ locus_id: _this37.locusUrl.split('/').pop(),
4629
4493
  reason: error.message,
4630
4494
  stack: error.stack
4631
4495
  });
@@ -4636,14 +4500,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4636
4500
  var timerCount = 0; // eslint-disable-next-line func-names
4637
4501
  // eslint-disable-next-line prefer-arrow-callback
4638
4502
 
4639
- if (_this39.type === _constants._CALL_) {
4503
+ if (_this37.type === _constants._CALL_) {
4640
4504
  resolve();
4641
4505
  }
4642
4506
 
4643
4507
  var joiningTimer = setInterval(function () {
4644
4508
  timerCount += 1;
4645
4509
 
4646
- if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
4510
+ if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
4647
4511
  clearInterval(joiningTimer);
4648
4512
  resolve();
4649
4513
  }
@@ -4655,10 +4519,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4655
4519
  }, 1000);
4656
4520
  });
4657
4521
  }).then(function () {
4658
- return logRequest(_this39.roap.sendRoapMediaRequest({
4659
- sdp: _this39.mediaProperties.peerConnection.sdp,
4660
- roapSeq: _this39.roapSeq,
4661
- meeting: _this39 // or can pass meeting ID
4522
+ return logRequest(_this37.roap.sendRoapMediaRequest({
4523
+ sdp: _this37.mediaProperties.peerConnection.sdp,
4524
+ roapSeq: _this37.roapSeq,
4525
+ meeting: _this37 // or can pass meeting ID
4662
4526
 
4663
4527
  }), {
4664
4528
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
@@ -4666,7 +4530,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4666
4530
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4667
4531
  });
4668
4532
  }).then(function () {
4669
- var peerConnection = _this39.mediaProperties.peerConnection;
4533
+ var peerConnection = _this37.mediaProperties.peerConnection;
4670
4534
  return new _promise.default(function (resolve, reject) {
4671
4535
  if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
4672
4536
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
@@ -4687,7 +4551,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4687
4551
  }
4688
4552
  }, _constants.PC_BAIL_TIMEOUT);
4689
4553
 
4690
- _this39.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4554
+ _this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4691
4555
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
4692
4556
 
4693
4557
  clearTimeout(stabilityTimeout);
@@ -4696,61 +4560,60 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4696
4560
  });
4697
4561
  }).then(function () {
4698
4562
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4699
- if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
4700
- return _this39.share();
4563
+ if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
4564
+ return _this37.share();
4701
4565
  } // When the self state changes to JOINED then request the floor
4702
4566
 
4703
4567
 
4704
- _this39.floorGrantPending = true;
4568
+ _this37.floorGrantPending = true;
4705
4569
  }
4706
4570
 
4707
4571
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
4708
- correlation_id: _this39.correlationId,
4709
- locus_id: _this39.locusUrl.split('/').pop()
4572
+ correlation_id: _this37.correlationId,
4573
+ locus_id: _this37.locusUrl.split('/').pop()
4710
4574
  });
4711
4575
 
4712
4576
  return _promise.default.resolve();
4713
4577
  });
4714
4578
  }).catch(function (error) {
4715
4579
  // Clean up stats analyzer, peer connection, and turn off listeners
4716
- if (_this39.statsAnalyzer) {
4717
- _this39.statsAnalyzer.stopAnalyzer();
4580
+ var stopStatsAnalyzer = _this37.statsAnalyzer ? _this37.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4581
+ stopStatsAnalyzer.then(function () {
4582
+ _this37.statsAnalyzer = null;
4718
4583
 
4719
- _this39.statsAnalyzer = null;
4720
- }
4584
+ if (_this37.mediaProperties.peerConnection) {
4585
+ _this37.closePeerConnections();
4721
4586
 
4722
- if (_this39.mediaProperties.peerConnection) {
4723
- _this39.closePeerConnections();
4724
-
4725
- _this39.unsetPeerConnections();
4726
- }
4587
+ _this37.unsetPeerConnections();
4588
+ }
4727
4589
 
4728
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4590
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4729
4591
 
4730
- _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4731
- correlation_id: _this39.correlationId,
4732
- locus_id: _this39.locusUrl.split('/').pop(),
4733
- reason: error.message,
4734
- stack: error.stack,
4735
- code: error.code
4736
- }); // Upload logs on error while adding media
4592
+ _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4593
+ correlation_id: _this37.correlationId,
4594
+ locus_id: _this37.locusUrl.split('/').pop(),
4595
+ reason: error.message,
4596
+ stack: error.stack,
4597
+ code: error.code
4598
+ }); // Upload logs on error while adding media
4737
4599
 
4738
4600
 
4739
- _triggerProxy.default.trigger(_this39, {
4740
- file: 'meeting/index',
4741
- function: 'addMedia'
4742
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39); // If addMedia failes for not establishing connection then
4743
- // leave the meeting with reson connection failed as meeting anyways will end
4744
- // and cannot be connected unless network condition is checked for firewall
4601
+ _triggerProxy.default.trigger(_this37, {
4602
+ file: 'meeting/index',
4603
+ function: 'addMedia'
4604
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
4605
+ // leave the meeting with reson connection failed as meeting anyways will end
4606
+ // and cannot be connected unless network condition is checked for firewall
4745
4607
 
4746
4608
 
4747
- if (error.code === _webexErrors.InvalidSdpError.CODE) {
4748
- _this39.leave({
4749
- reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4750
- });
4751
- }
4609
+ if (error.code === _webexErrors.InvalidSdpError.CODE) {
4610
+ _this37.leave({
4611
+ reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4612
+ });
4613
+ }
4752
4614
 
4753
- throw error;
4615
+ throw error;
4616
+ });
4754
4617
  });
4755
4618
  }
4756
4619
  /**
@@ -4775,7 +4638,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4775
4638
  }, {
4776
4639
  key: "enqueueMediaUpdate",
4777
4640
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4778
- var _this40 = this;
4641
+ var _this38 = this;
4779
4642
 
4780
4643
  return new _promise.default(function (resolve, reject) {
4781
4644
  var queueItem = {
@@ -4787,7 +4650,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4787
4650
 
4788
4651
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4789
4652
 
4790
- _this40.queuedMediaUpdates.push(queueItem);
4653
+ _this38.queuedMediaUpdates.push(queueItem);
4791
4654
  });
4792
4655
  }
4793
4656
  /**
@@ -4813,7 +4676,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4813
4676
  * @memberof Meeting
4814
4677
  */
4815
4678
  function updateMedia() {
4816
- var _this41 = this;
4679
+ var _this39 = this;
4817
4680
 
4818
4681
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4819
4682
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
@@ -4827,17 +4690,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4827
4690
  mediaSettings = options.mediaSettings;
4828
4691
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4829
4692
  return _util.default.validateOptions(options).then(function () {
4830
- return _this41.preMedia(localStream, localShare, mediaSettings);
4693
+ return _this39.preMedia(localStream, localShare, mediaSettings);
4831
4694
  }).then(function () {
4832
- return _media.default.updateMedia(_this41.mediaProperties, {
4833
- meetingId: _this41.id,
4834
- remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel,
4835
- enableRtx: _this41.config.enableRtx,
4836
- enableExtmap: _this41.config.enableExtmap
4695
+ return _media.default.updateMedia(_this39.mediaProperties, {
4696
+ meetingId: _this39.id,
4697
+ remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4698
+ enableRtx: _this39.config.enableRtx,
4699
+ enableExtmap: _this39.config.enableExtmap
4837
4700
  }).then(function (peerConnection) {
4838
4701
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4839
4702
 
4840
- _this41.setRemoteStream(peerConnection);
4703
+ _this39.setRemoteStream(peerConnection);
4841
4704
 
4842
4705
  if (mediaSettings.receiveShare || localShare) {
4843
4706
  _peerConnectionManager.default.setContentSlides(peerConnection);
@@ -4846,18 +4709,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4846
4709
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4847
4710
 
4848
4711
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
4849
- correlation_id: _this41.correlationId,
4850
- locus_id: _this41.locusUrl.split('/').pop(),
4712
+ correlation_id: _this39.correlationId,
4713
+ locus_id: _this39.locusUrl.split('/').pop(),
4851
4714
  reason: error.message,
4852
4715
  stack: error.stack
4853
4716
  });
4854
4717
 
4855
4718
  throw error;
4856
4719
  }).then(function () {
4857
- return logRequest(_this41.roap.sendRoapMediaRequest({
4858
- sdp: _this41.mediaProperties.peerConnection.sdp,
4859
- roapSeq: _this41.roapSeq,
4860
- meeting: _this41 // or can pass meeting ID
4720
+ return logRequest(_this39.roap.sendRoapMediaRequest({
4721
+ sdp: _this39.mediaProperties.peerConnection.sdp,
4722
+ roapSeq: _this39.roapSeq,
4723
+ meeting: _this39 // or can pass meeting ID
4861
4724
 
4862
4725
  }), {
4863
4726
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
@@ -4865,13 +4728,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4865
4728
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4866
4729
  });
4867
4730
  }).then(function () {
4868
- return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4731
+ return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4869
4732
  }).then(function (startShare) {
4870
4733
  // This is a special case if we do an /floor grant followed by /media
4871
4734
  // we actually get a OFFER from the server and a GLAR condition happens
4872
4735
  if (startShare) {
4873
4736
  // We are assuming that the clients are connected when doing an update
4874
- return _this41.share();
4737
+ return _this39.share();
4875
4738
  }
4876
4739
 
4877
4740
  return _promise.default.resolve();
@@ -4893,9 +4756,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4893
4756
  key: "updateAudio",
4894
4757
  value: function () {
4895
4758
  var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(options) {
4896
- var _this42 = this;
4759
+ var _this40 = this;
4897
4760
 
4898
- var sendAudio, receiveAudio, stream, bnrEnabled, audioTransceiver, track;
4761
+ var sendAudio, receiveAudio, stream, audioTransceiver, track, bnrEnabled;
4899
4762
  return _regenerator.default.wrap(function _callee5$(_context5) {
4900
4763
  while (1) {
4901
4764
  switch (_context5.prev = _context5.next) {
@@ -4908,7 +4771,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4908
4771
  return _context5.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options));
4909
4772
 
4910
4773
  case 2:
4911
- sendAudio = options.sendAudio, receiveAudio = options.receiveAudio, stream = options.stream, bnrEnabled = options.bnrEnabled;
4774
+ sendAudio = options.sendAudio, receiveAudio = options.receiveAudio, stream = options.stream;
4912
4775
  audioTransceiver = this.mediaProperties.peerConnection.audioTransceiver;
4913
4776
  track = _util.default.getTrack(stream).audioTrack;
4914
4777
 
@@ -4920,35 +4783,42 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4920
4783
  return _context5.abrupt("return", _promise.default.reject(new _parameter.default('Pass sendAudio and receiveAudio parameter')));
4921
4784
 
4922
4785
  case 7:
4786
+ if (!(this.effects && this.effects.state)) {
4787
+ _context5.next = 15;
4788
+ break;
4789
+ }
4790
+
4791
+ bnrEnabled = this.effects.state.bnr.enabled;
4792
+
4923
4793
  if (!(sendAudio && !this.isAudioMuted() && (bnrEnabled === _constants.BNR_STATUS.ENABLED || bnrEnabled === _constants.BNR_STATUS.SHOULD_ENABLE))) {
4924
- _context5.next = 13;
4794
+ _context5.next = 15;
4925
4795
  break;
4926
4796
  }
4927
4797
 
4928
4798
  _loggerProxy.default.logger.info('Meeting:index#updateAudio. Calling WebRTC enable bnr method');
4929
4799
 
4930
- _context5.next = 11;
4800
+ _context5.next = 13;
4931
4801
  return this.internal_enableBNR(track);
4932
4802
 
4933
- case 11:
4803
+ case 13:
4934
4804
  track = _context5.sent;
4935
4805
 
4936
4806
  _loggerProxy.default.logger.info('Meeting:index#updateAudio. WebRTC enable bnr request completed');
4937
4807
 
4938
- case 13:
4808
+ case 15:
4939
4809
  return _context5.abrupt("return", _util.default.validateOptions({
4940
4810
  sendAudio: sendAudio,
4941
4811
  localStream: stream
4942
4812
  }).then(function () {
4943
4813
  var previousMediaDirection = {};
4944
4814
 
4945
- if (_this42.mediaProperties.mediaDirection) {
4815
+ if (_this40.mediaProperties.mediaDirection) {
4946
4816
  previousMediaDirection = {
4947
- sendTrack: _this42.mediaProperties.mediaDirection.sendAudio,
4948
- receiveTrack: _this42.mediaProperties.mediaDirection.receiveAudio
4817
+ sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
4818
+ receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
4949
4819
  };
4950
4820
  } else {
4951
- _this42.mediaProperties.mediaDirection = {};
4821
+ _this40.mediaProperties.mediaDirection = {};
4952
4822
  }
4953
4823
 
4954
4824
  return _util.default.updateTransceiver({
@@ -4957,23 +4827,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4957
4827
  receiveTrack: options.receiveAudio,
4958
4828
  track: track,
4959
4829
  transceiver: audioTransceiver,
4960
- peerConnection: _this42.mediaProperties.peerConnection,
4830
+ peerConnection: _this40.mediaProperties.peerConnection,
4961
4831
  previousMediaDirection: previousMediaDirection
4962
4832
  }, {
4963
- mediaProperties: _this42.mediaProperties,
4964
- meeting: _this42,
4965
- id: _this42.id
4833
+ mediaProperties: _this40.mediaProperties,
4834
+ meeting: _this40,
4835
+ id: _this40.id
4966
4836
  });
4967
4837
  }).then(function () {
4968
- _this42.setLocalAudioTrack(track);
4838
+ _this40.setLocalAudioTrack(track);
4969
4839
 
4970
- _this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
4971
- _this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4840
+ _this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
4841
+ _this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4972
4842
 
4973
- _this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
4843
+ _this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
4974
4844
  }));
4975
4845
 
4976
- case 14:
4846
+ case 16:
4977
4847
  case "end":
4978
4848
  return _context5.stop();
4979
4849
  }
@@ -5001,7 +4871,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5001
4871
  }, {
5002
4872
  key: "updateVideo",
5003
4873
  value: function updateVideo(options) {
5004
- var _this43 = this;
4874
+ var _this41 = this;
5005
4875
 
5006
4876
  if (!this.canUpdateMedia()) {
5007
4877
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
@@ -5028,23 +4898,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5028
4898
  receiveTrack: options.receiveVideo,
5029
4899
  track: track,
5030
4900
  transceiver: videoTransceiver,
5031
- peerConnection: _this43.mediaProperties.peerConnection,
4901
+ peerConnection: _this41.mediaProperties.peerConnection,
5032
4902
  previousMediaDirection: {
5033
- sendTrack: _this43.mediaProperties.mediaDirection.sendVideo,
5034
- receiveTrack: _this43.mediaProperties.mediaDirection.receiveVideo
4903
+ sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
4904
+ receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
5035
4905
  }
5036
4906
  }, {
5037
- mediaProperties: _this43.mediaProperties,
5038
- meeting: _this43,
5039
- id: _this43.id
4907
+ mediaProperties: _this41.mediaProperties,
4908
+ meeting: _this41,
4909
+ id: _this41.id
5040
4910
  });
5041
4911
  }).then(function () {
5042
- _this43.setLocalVideoTrack(track);
4912
+ _this41.setLocalVideoTrack(track);
5043
4913
 
5044
- _this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
5045
- _this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4914
+ _this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
4915
+ _this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
5046
4916
 
5047
- _this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
4917
+ _this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
5048
4918
  });
5049
4919
  }
5050
4920
  /**
@@ -5086,7 +4956,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5086
4956
  }, {
5087
4957
  key: "updateShare",
5088
4958
  value: function updateShare(options) {
5089
- var _this44 = this;
4959
+ var _this42 = this;
5090
4960
 
5091
4961
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
5092
4962
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
@@ -5109,7 +4979,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5109
4979
  sendShare: sendShare,
5110
4980
  localShare: stream
5111
4981
  }).then(function () {
5112
- return _this44.checkForStopShare(sendShare, previousSendShareStatus);
4982
+ return _this42.checkForStopShare(sendShare, previousSendShareStatus);
5113
4983
  }).then(function (startShare) {
5114
4984
  return _util.default.updateTransceiver({
5115
4985
  type: 'video',
@@ -5117,41 +4987,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5117
4987
  receiveTrack: receiveShare,
5118
4988
  track: track,
5119
4989
  transceiver: shareTransceiver,
5120
- peerConnection: _this44.mediaProperties.peerConnection,
4990
+ peerConnection: _this42.mediaProperties.peerConnection,
5121
4991
  previousMediaDirection: {
5122
- sendTrack: _this44.mediaProperties.mediaDirection.sendShare,
5123
- receiveTrack: _this44.mediaProperties.mediaDirection.receiveShare
4992
+ sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
4993
+ receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
5124
4994
  }
5125
4995
  }, {
5126
- mediaProperties: _this44.mediaProperties,
5127
- meeting: _this44,
5128
- id: _this44.id
4996
+ mediaProperties: _this42.mediaProperties,
4997
+ meeting: _this42,
4998
+ id: _this42.id
5129
4999
  }).then(function () {
5130
5000
  if (startShare) {
5131
- return _this44.share();
5001
+ return _this42.share();
5132
5002
  }
5133
5003
 
5134
5004
  return _promise.default.resolve();
5135
5005
  });
5136
5006
  }).then(function () {
5137
- _this44.mediaProperties.mediaDirection.sendShare = sendShare;
5138
- _this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
5007
+ _this42.mediaProperties.mediaDirection.sendShare = sendShare;
5008
+ _this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
5139
5009
  }).catch(function (error) {
5140
- _this44.unsetLocalShareTrack(stream);
5010
+ _this42.unsetLocalShareTrack(stream);
5141
5011
 
5142
5012
  throw error;
5143
5013
  }).finally(function () {
5144
5014
  var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
5145
5015
 
5146
- var sharingModeIsActive = _this44.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
5147
- var isSharingOutOfSync = sharingModeIsActive && !_this44.isLocalShareLive;
5016
+ var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
5017
+ var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
5148
5018
 
5149
5019
  if (isSharingOutOfSync) {
5150
5020
  // Adding a delay to avoid a 409 from server
5151
5021
  // which results in user still appearing as if sharing.
5152
5022
  // Also delay give time for changes to peerConnection.
5153
5023
  setTimeout(function () {
5154
- return _this44.handleShareTrackEnded(stream);
5024
+ return _this42.handleShareTrackEnded(stream);
5155
5025
  }, delay);
5156
5026
  }
5157
5027
  });
@@ -5191,7 +5061,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5191
5061
  }, {
5192
5062
  key: "acknowledge",
5193
5063
  value: function acknowledge(type) {
5194
- var _this45 = this;
5064
+ var _this43 = this;
5195
5065
 
5196
5066
  if (!type) {
5197
5067
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
@@ -5205,11 +5075,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5205
5075
  }).then(function (response) {
5206
5076
  return _promise.default.resolve(response);
5207
5077
  }).then(function (response) {
5208
- _this45.meetingFiniteStateMachine.ring(type);
5078
+ _this43.meetingFiniteStateMachine.ring(type);
5209
5079
 
5210
5080
  _metrics.default.postEvent({
5211
5081
  event: _config.eventType.ALERT_DISPLAYED,
5212
- meeting: _this45
5082
+ meeting: _this43
5213
5083
  });
5214
5084
 
5215
5085
  return _promise.default.resolve({
@@ -5234,14 +5104,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5234
5104
  }, {
5235
5105
  key: "decline",
5236
5106
  value: function decline(reason) {
5237
- var _this46 = this;
5107
+ var _this44 = this;
5238
5108
 
5239
5109
  return _util.default.declineMeeting(this, reason).then(function (decline) {
5240
- _this46.meetingFiniteStateMachine.decline();
5110
+ _this44.meetingFiniteStateMachine.decline();
5241
5111
 
5242
5112
  return _promise.default.resolve(decline);
5243
5113
  }).catch(function (error) {
5244
- _this46.meetingFiniteStateMachine.fail(error);
5114
+ _this44.meetingFiniteStateMachine.fail(error);
5245
5115
 
5246
5116
  return _promise.default.reject(error);
5247
5117
  });
@@ -5258,7 +5128,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5258
5128
  }, {
5259
5129
  key: "leave",
5260
5130
  value: function leave() {
5261
- var _this47 = this;
5131
+ var _this45 = this;
5262
5132
 
5263
5133
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5264
5134
 
@@ -5276,25 +5146,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5276
5146
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
5277
5147
 
5278
5148
  return _util.default.leaveMeeting(this, options).then(function (leave) {
5279
- _this47.meetingFiniteStateMachine.leave();
5149
+ _this45.meetingFiniteStateMachine.leave();
5280
5150
 
5281
- _this47.clearMeetingData(); // upload logs on leave irrespective of meeting delete
5151
+ _this45.clearMeetingData(); // upload logs on leave irrespective of meeting delete
5282
5152
 
5283
5153
 
5284
- _triggerProxy.default.trigger(_this47, {
5154
+ _triggerProxy.default.trigger(_this45, {
5285
5155
  file: 'meeting/index',
5286
5156
  function: 'leave'
5287
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5157
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5288
5158
 
5289
5159
 
5290
- if (_this47.wirelessShare || _this47.guest) {
5160
+ if (_this45.wirelessShare || _this45.guest) {
5291
5161
  // If screen sharing clean the meeting object
5292
- _triggerProxy.default.trigger(_this47, {
5162
+ _triggerProxy.default.trigger(_this45, {
5293
5163
  file: 'meeting/index',
5294
5164
  function: 'leave'
5295
5165
  }, _constants.EVENTS.DESTROY_MEETING, {
5296
5166
  reason: options.reason,
5297
- meetingId: _this47.id
5167
+ meetingId: _this45.id
5298
5168
  });
5299
5169
  }
5300
5170
 
@@ -5302,19 +5172,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5302
5172
 
5303
5173
  return leave;
5304
5174
  }).catch(function (error) {
5305
- _this47.meetingFiniteStateMachine.fail(error);
5175
+ _this45.meetingFiniteStateMachine.fail(error);
5306
5176
 
5307
5177
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
5308
5178
 
5309
5179
 
5310
- _triggerProxy.default.trigger(_this47, {
5180
+ _triggerProxy.default.trigger(_this45, {
5311
5181
  file: 'meeting/index',
5312
5182
  function: 'leave'
5313
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
5183
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
5314
5184
 
5315
5185
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
5316
- correlation_id: _this47.correlationId,
5317
- locus_id: _this47.locusUrl.split('/').pop(),
5186
+ correlation_id: _this45.correlationId,
5187
+ locus_id: _this45.locusUrl.split('/').pop(),
5318
5188
  reason: error.message,
5319
5189
  stack: error.stack,
5320
5190
  code: error.code
@@ -5335,7 +5205,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5335
5205
  }, {
5336
5206
  key: "startWhiteboardShare",
5337
5207
  value: function startWhiteboardShare(channelUrl, resourceToken) {
5338
- var _this48 = this;
5208
+ var _this46 = this;
5339
5209
 
5340
5210
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5341
5211
  return element.name === 'whiteboard';
@@ -5364,14 +5234,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5364
5234
  }
5365
5235
 
5366
5236
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
5367
- _this48.isSharing = false;
5237
+ _this46.isSharing = false;
5368
5238
  return _promise.default.resolve();
5369
5239
  }).catch(function (error) {
5370
5240
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
5371
5241
 
5372
5242
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
5373
- correlation_id: _this48.correlationId,
5374
- locus_id: _this48.locusUrl.split('/').pop(),
5243
+ correlation_id: _this46.correlationId,
5244
+ locus_id: _this46.locusUrl.split('/').pop(),
5375
5245
  reason: error.message,
5376
5246
  stack: error.stack,
5377
5247
  board: {
@@ -5396,7 +5266,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5396
5266
  }, {
5397
5267
  key: "stopWhiteboardShare",
5398
5268
  value: function stopWhiteboardShare(channelUrl) {
5399
- var _this49 = this;
5269
+ var _this47 = this;
5400
5270
 
5401
5271
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5402
5272
  return element.name === 'whiteboard';
@@ -5417,8 +5287,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5417
5287
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
5418
5288
 
5419
5289
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
5420
- correlation_id: _this49.correlationId,
5421
- locus_id: _this49.locusUrl.split('/').pop(),
5290
+ correlation_id: _this47.correlationId,
5291
+ locus_id: _this47.locusUrl.split('/').pop(),
5422
5292
  reason: error.message,
5423
5293
  stack: error.stack,
5424
5294
  board: {
@@ -5442,7 +5312,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5442
5312
  }, {
5443
5313
  key: "share",
5444
5314
  value: function share() {
5445
- var _this50 = this;
5315
+ var _this48 = this;
5446
5316
 
5447
5317
  var content = this.locusInfo.mediaShares.find(function (element) {
5448
5318
  return element.name === _constants.CONTENT;
@@ -5461,14 +5331,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5461
5331
  uri: content.url,
5462
5332
  resourceUrl: this.resourceUrl
5463
5333
  }).then(function () {
5464
- _this50.isSharing = true;
5334
+ _this48.isSharing = true;
5465
5335
  return _promise.default.resolve();
5466
5336
  }).catch(function (error) {
5467
5337
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5468
5338
 
5469
5339
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5470
- correlation_id: _this50.correlationId,
5471
- locus_id: _this50.locusUrl.split('/').pop(),
5340
+ correlation_id: _this48.correlationId,
5341
+ locus_id: _this48.locusUrl.split('/').pop(),
5472
5342
  reason: error.message,
5473
5343
  stack: error.stack
5474
5344
  });
@@ -5507,7 +5377,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5507
5377
  }, {
5508
5378
  key: "stopFloorRequest",
5509
5379
  value: function stopFloorRequest() {
5510
- var _this51 = this;
5380
+ var _this49 = this;
5511
5381
 
5512
5382
  var content = this.locusInfo.mediaShares.find(function (element) {
5513
5383
  return element.name === _constants.CONTENT;
@@ -5537,15 +5407,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5537
5407
  _loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
5538
5408
 
5539
5409
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5540
- correlation_id: _this51.correlationId,
5541
- locus_id: _this51.locusUrl.split('/').pop(),
5410
+ correlation_id: _this49.correlationId,
5411
+ locus_id: _this49.locusUrl.split('/').pop(),
5542
5412
  reason: error.message,
5543
5413
  stack: error.stack
5544
5414
  });
5545
5415
 
5546
5416
  return _promise.default.reject(error);
5547
5417
  }).finally(function () {
5548
- _this51.isSharing = false;
5418
+ _this49.isSharing = false;
5549
5419
  });
5550
5420
  }
5551
5421
 
@@ -5681,7 +5551,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5681
5551
  }, {
5682
5552
  key: "changeVideoLayout",
5683
5553
  value: function changeVideoLayout(layoutType) {
5684
- var _this52 = this;
5554
+ var _this50 = this;
5685
5555
 
5686
5556
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5687
5557
  var main = renderInfo.main,
@@ -5744,7 +5614,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5744
5614
  content: layoutInfo.content
5745
5615
  }).then(function (response) {
5746
5616
  if (response && response.body && response.body.locus) {
5747
- _this52.locusInfo.onFullLocus(response.body.locus);
5617
+ _this50.locusInfo.onFullLocus(response.body.locus);
5748
5618
  }
5749
5619
  }).catch(function (error) {
5750
5620
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5761,7 +5631,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5761
5631
  }, {
5762
5632
  key: "setLocalVideoQuality",
5763
5633
  value: function setLocalVideoQuality(level) {
5764
- var _this53 = this;
5634
+ var _this51 = this;
5765
5635
 
5766
5636
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5767
5637
 
@@ -5791,7 +5661,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5791
5661
  var _ref13 = (0, _slicedToArray2.default)(_ref12, 1),
5792
5662
  localStream = _ref13[0];
5793
5663
 
5794
- return _this53.updateVideo({
5664
+ return _this51.updateVideo({
5795
5665
  sendVideo: true,
5796
5666
  receiveVideo: true,
5797
5667
  stream: localStream
@@ -5839,7 +5709,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5839
5709
  }, {
5840
5710
  key: "setMeetingQuality",
5841
5711
  value: function setMeetingQuality(level) {
5842
- var _this54 = this;
5712
+ var _this52 = this;
5843
5713
 
5844
5714
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5845
5715
 
@@ -5864,18 +5734,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5864
5734
  receiveVideo = _this$mediaProperties4.receiveVideo,
5865
5735
  sendVideo = _this$mediaProperties4.sendVideo;
5866
5736
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5867
- return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
5737
+ return receiveAudio || receiveVideo ? _this52.setRemoteQualityLevel(level) : _promise.default.resolve();
5868
5738
  }).catch(function (error) {
5869
5739
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5870
- _this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
5740
+ _this52.mediaProperties.setLocalQualityLevel(previousLevel.local);
5871
5741
 
5872
- _this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5742
+ _this52.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5873
5743
 
5874
5744
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5875
5745
 
5876
5746
  _metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
5877
- correlation_id: _this54.correlationId,
5878
- locus_id: _this54.locusUrl.split('/').pop(),
5747
+ correlation_id: _this52.correlationId,
5748
+ locus_id: _this52.locusUrl.split('/').pop(),
5879
5749
  reason: error.message,
5880
5750
  stack: error.stack
5881
5751
  }, {
@@ -5899,7 +5769,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5899
5769
  }, {
5900
5770
  key: "shareScreen",
5901
5771
  value: function shareScreen() {
5902
- var _this55 = this;
5772
+ var _this53 = this;
5903
5773
 
5904
5774
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5905
5775
 
@@ -5911,9 +5781,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5911
5781
  }, options);
5912
5782
 
5913
5783
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5914
- return _this55.updateShare({
5784
+ return _this53.updateShare({
5915
5785
  sendShare: true,
5916
- receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
5786
+ receiveShare: _this53.mediaProperties.mediaDirection.receiveShare,
5917
5787
  stream: shareStream
5918
5788
  });
5919
5789
  }).catch(function (error) {
@@ -5925,8 +5795,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5925
5795
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5926
5796
  var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
5927
5797
  var data = {
5928
- correlation_id: _this55.correlationId,
5929
- locus_id: _this55.locusUrl.split('/').pop(),
5798
+ correlation_id: _this53.correlationId,
5799
+ locus_id: _this53.locusUrl.split('/').pop(),
5930
5800
  reason: error.message,
5931
5801
  stack: error.stack
5932
5802
  };
@@ -6222,7 +6092,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6222
6092
  }, {
6223
6093
  key: "endMeetingForAll",
6224
6094
  value: function endMeetingForAll() {
6225
- var _this56 = this;
6095
+ var _this54 = this;
6226
6096
 
6227
6097
  _metrics.default.postEvent({
6228
6098
  event: _config.eventType.LEAVE,
@@ -6241,31 +6111,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6241
6111
  });
6242
6112
 
6243
6113
  return _util.default.endMeetingForAll(this).then(function (end) {
6244
- _this56.meetingFiniteStateMachine.end();
6114
+ _this54.meetingFiniteStateMachine.end();
6245
6115
 
6246
- _this56.clearMeetingData(); // upload logs on leave irrespective of meeting delete
6116
+ _this54.clearMeetingData(); // upload logs on leave irrespective of meeting delete
6247
6117
 
6248
6118
 
6249
- _triggerProxy.default.trigger(_this56, {
6119
+ _triggerProxy.default.trigger(_this54, {
6250
6120
  file: 'meeting/index',
6251
6121
  function: 'endMeetingForAll'
6252
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
6122
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
6253
6123
 
6254
6124
  return end;
6255
6125
  }).catch(function (error) {
6256
- _this56.meetingFiniteStateMachine.fail(error);
6126
+ _this54.meetingFiniteStateMachine.fail(error);
6257
6127
 
6258
6128
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error); // upload logs on leave irrespective of meeting delete
6259
6129
 
6260
6130
 
6261
- _triggerProxy.default.trigger(_this56, {
6131
+ _triggerProxy.default.trigger(_this54, {
6262
6132
  file: 'meeting/index',
6263
6133
  function: 'endMeetingForAll'
6264
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
6134
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
6265
6135
 
6266
6136
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
6267
- correlation_id: _this56.correlationId,
6268
- locus_id: _this56.locusUrl.split('/').pop(),
6137
+ correlation_id: _this54.correlationId,
6138
+ locus_id: _this54.locusUrl.split('/').pop(),
6269
6139
  reason: error.message,
6270
6140
  stack: error.stack,
6271
6141
  code: error.code