@webex/plugin-meetings 3.0.0-beta.213 → 3.0.0-beta.215

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.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.0.0-beta.213"
212
+ version: "3.0.0-beta.215"
213
213
  });
214
214
  var _default = Breakout;
215
215
  exports.default = _default;
@@ -1041,7 +1041,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1041
1041
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1042
1042
  }
1043
1043
  },
1044
- version: "3.0.0-beta.213"
1044
+ version: "3.0.0-beta.215"
1045
1045
  });
1046
1046
  var _default = Breakouts;
1047
1047
  exports.default = _default;
@@ -359,7 +359,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
359
359
  throw error;
360
360
  });
361
361
  },
362
- version: "3.0.0-beta.213"
362
+ version: "3.0.0-beta.215"
363
363
  });
364
364
  var _default = SimultaneousInterpretation;
365
365
  exports.default = _default;
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.0.0-beta.213"
21
+ version: "3.0.0-beta.215"
22
22
  });
23
23
  var _default = SILanguage;
24
24
  exports.default = _default;
@@ -5602,9 +5602,44 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5602
5602
  }
5603
5603
 
5604
5604
  /**
5605
- * Leave the current meeting
5605
+ * Returns a promise that will resolve to fetch options for leaving a meeting.
5606
+ *
5607
+ * This is to support quickly submitting a leave request when the browser/tab is closing.
5608
+ * Calling meeting.leave will not work because there are some async steps that will
5609
+ * not complete before the browser is closed. Instead, we pre-gather all the
5610
+ * information/options needed for the request(s), and then simply and quickly
5611
+ * fire the fetch(es) when pagehide is triggered.
5612
+ *
5613
+ * We must use fetch instead of request because fetch has a keepalive option that
5614
+ * allows the request it to outlive the page.
5615
+ *
5616
+ * Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will
5617
+ * properly adjust them before submitting.
5618
+ *
5619
+ * @public
5606
5620
  * @param {Object} options leave options
5607
5621
  * @param {String} options.resourceId the device with which to leave from, empty if just the computer
5622
+ * @param {any} options.reason the reason for leaving
5623
+ * @returns {Promise} resolves to options to be used with fetch
5624
+ */
5625
+ }, {
5626
+ key: "buildLeaveFetchRequestOptions",
5627
+ value: function buildLeaveFetchRequestOptions() {
5628
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5629
+ var requestOptions = _util.default.buildLeaveFetchRequestOptions(this, options);
5630
+
5631
+ // @ts-ignore
5632
+ return this.webex.prepareFetchOptions(requestOptions);
5633
+ }
5634
+
5635
+ /**
5636
+ * Leave the current meeting
5637
+ * @param {Object} options - leave options
5638
+ * @param {String} [options.resourceId] - the device with which to leave from, empty if just the computer
5639
+ * @param {String} [options.clientEventLeaveReason] - the leaveReason to include in the Call Analyzer event.
5640
+ * Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason)
5641
+ * https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796
5642
+ * @param {String} [options.reason] - only used for logging
5608
5643
  * @returns {Promise}
5609
5644
  * @public
5610
5645
  * @memberof Meeting
@@ -5615,6 +5650,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5615
5650
  var _this43 = this;
5616
5651
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5617
5652
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5653
+
5618
5654
  /// @ts-ignore
5619
5655
  this.webex.internal.newMetrics.submitInternalEvent({
5620
5656
  name: 'internal.reset.join.latencies'
@@ -5628,7 +5664,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5628
5664
  payload: _objectSpread({
5629
5665
  trigger: 'user-interaction',
5630
5666
  canProceed: false,
5631
- leaveReason: leaveReason
5667
+ leaveReason: options.clientEventLeaveReason
5632
5668
  }, payload),
5633
5669
  options: {
5634
5670
  meetingId: _this43.id