@webex/plugin-meetings 3.12.0-next.101 → 3.12.0-next.103

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.
@@ -381,7 +381,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
381
381
  throw error;
382
382
  });
383
383
  },
384
- version: "3.12.0-next.101"
384
+ version: "3.12.0-next.103"
385
385
  });
386
386
  var _default = exports.default = SimultaneousInterpretation;
387
387
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.12.0-next.101"
21
+ version: "3.12.0-next.103"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -23,6 +23,7 @@ exports.findMeetingForHashTreeMessage = findMeetingForHashTreeMessage;
23
23
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
24
24
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
25
25
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
26
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
26
27
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
27
28
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
28
29
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
@@ -36,6 +37,8 @@ var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/ar
36
37
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
37
38
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
38
39
  var _lodash = require("lodash");
40
+ var _uuid = _interopRequireDefault(require("uuid"));
41
+ var _webexCore = require("@webex/webex-core");
39
42
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
40
43
  var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
41
44
  var _constants = require("../constants");
@@ -244,12 +247,13 @@ function createLocusFromHashTreeMessage(message) {
244
247
  var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
245
248
  /**
246
249
  * Constructor
247
- * @param {function} updateMeeting callback to update the meeting object from an object
250
+ * @param {Object} callbacks callbacks used by LocusInfo
251
+ * @param {function} callbacks.updateMeeting callback to update the meeting object from an object
248
252
  * @param {object} webex
249
253
  * @param {string} meetingId
250
254
  * @returns {undefined}
251
255
  */
252
- function LocusInfo(updateMeeting, webex, meetingId) {
256
+ function LocusInfo(callbacks, webex, meetingId) {
253
257
  var _this;
254
258
  (0, _classCallCheck2.default)(this, LocusInfo);
255
259
  _this = _callSuper(this, LocusInfo);
@@ -258,7 +262,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
258
262
  (0, _defineProperty2.default)(_this, "locusParser", void 0);
259
263
  (0, _defineProperty2.default)(_this, "meetingId", void 0);
260
264
  (0, _defineProperty2.default)(_this, "parsedLocus", void 0);
261
- (0, _defineProperty2.default)(_this, "updateMeeting", void 0);
262
265
  (0, _defineProperty2.default)(_this, "webex", void 0);
263
266
  (0, _defineProperty2.default)(_this, "aclUrl", void 0);
264
267
  (0, _defineProperty2.default)(_this, "baseSequence", void 0);
@@ -283,15 +286,16 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
283
286
  (0, _defineProperty2.default)(_this, "hashTreeObjectId2ParticipantId", void 0);
284
287
  // mapping of hash tree object ids to participant ids
285
288
  (0, _defineProperty2.default)(_this, "classicVsHashTreeMismatchMetricCounter", 0);
289
+ (0, _defineProperty2.default)(_this, "callbacks", void 0);
286
290
  (0, _defineProperty2.default)(_this, "destroyMeetingSuspended", false);
287
291
  _this.parsedLocus = {
288
292
  states: []
289
293
  };
294
+ _this.callbacks = callbacks;
290
295
  _this.webex = webex;
291
296
  _this.emitChange = false;
292
297
  _this.compareAndUpdateFlags = {};
293
298
  _this.meetingId = meetingId;
294
- _this.updateMeeting = updateMeeting;
295
299
  _this.locusParser = new _parser.default();
296
300
  _this.hashTreeParsers = new _map.default();
297
301
  _this.hashTreeObjectId2ParticipantId = new _map.default();
@@ -514,7 +518,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
514
518
  }, {
515
519
  key: "createHashTreeParser",
516
520
  value: function createHashTreeParser(_ref) {
517
- var _locusUrl$split, _locusUrl$split$pop, _this$webex$config$me;
521
+ var _this4 = this,
522
+ _locusUrl$split,
523
+ _locusUrl$split$pop,
524
+ _this$webex$config$me;
518
525
  var locusUrl = _ref.locusUrl,
519
526
  initialLocus = _ref.initialLocus,
520
527
  metadata = _ref.metadata,
@@ -523,9 +530,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
523
530
  initialLocus: initialLocus,
524
531
  metadata: metadata,
525
532
  webexRequest: this.webex.request.bind(this.webex),
526
- locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
533
+ callbacks: {
534
+ locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
535
+ syncLatencyTracker: this.callbacks.syncLatencyTracker,
536
+ // Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
537
+ // webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
538
+ // ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
539
+ // back to a uuid on the rare chance the interceptor hasn't issued any request yet (and so
540
+ // isn't in the map). The value is opaque to the metrics layer and is forced onto the
541
+ // /hashtree and /sync request headers.
542
+ generateTrackingId: function generateTrackingId() {
543
+ var interceptor = (0, _toConsumableArray2.default)(_webexCore.webexTrackingIdSequenceNumbers.keys()).find(function (candidate) {
544
+ return (candidate === null || candidate === void 0 ? void 0 : candidate.webex) === _this4.webex;
545
+ });
546
+ return "".concat(_this4.webex.sessionId, "_").concat(interceptor ? interceptor.sequence : _uuid.default.v4());
547
+ }
548
+ },
527
549
  debugId: "HT-".concat((_locusUrl$split = locusUrl.split('/')) === null || _locusUrl$split === void 0 ? void 0 : (_locusUrl$split$pop = _locusUrl$split.pop()) === null || _locusUrl$split$pop === void 0 ? void 0 : _locusUrl$split$pop.substring(0, 4)),
528
- excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets
550
+ excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets,
551
+ syncLatencyMeetingId: this.meetingId
529
552
  });
530
553
 
531
554
  // When a new HashTreeParser is created, previous one should be stopped.
@@ -684,10 +707,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
684
707
  }, {
685
708
  key: "getCurrentLocusSnapshot",
686
709
  value: function getCurrentLocusSnapshot() {
687
- var _this4 = this;
710
+ var _this5 = this;
688
711
  var locus = {};
689
712
  LocusDtoTopLevelKeys.forEach(function (key) {
690
- var value = _this4[key];
713
+ var value = _this5[key];
691
714
  if (value !== undefined && value !== null) {
692
715
  locus[key] = (0, _lodash.cloneDeep)(value);
693
716
  }
@@ -753,7 +776,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
753
776
  }, {
754
777
  key: "updateLocusFromHashTreeObject",
755
778
  value: function updateLocusFromHashTreeObject(object, locus) {
756
- var _this5 = this,
779
+ var _this6 = this,
757
780
  _locus$self;
758
781
  var type = object.htMeta.elementId.type.toLowerCase();
759
782
  var addParticipantObject = function addParticipantObject(obj) {
@@ -761,7 +784,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
761
784
  locus.participants = [];
762
785
  }
763
786
  locus.participants.push(obj.data);
764
- _this5.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
787
+ _this6.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
765
788
  };
766
789
  switch (type) {
767
790
  case _types.ObjectType.locus:
@@ -1161,7 +1184,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1161
1184
  }, {
1162
1185
  key: "updateFromHashTree",
1163
1186
  value: function updateFromHashTree(locusUrl, update) {
1164
- var _this6 = this;
1187
+ var _this7 = this;
1165
1188
  switch (update.updateType) {
1166
1189
  case _hashTreeParser2.LocusInfoUpdateType.OBJECTS_UPDATED:
1167
1190
  {
@@ -1185,7 +1208,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1185
1208
  // but these should never happen
1186
1209
  _loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
1187
1210
  _metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
1188
- locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this6.url,
1211
+ locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this7.url,
1189
1212
  message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
1190
1213
  });
1191
1214
  }
@@ -1219,7 +1242,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1219
1242
  // copy over all of existing locus except participants
1220
1243
  LocusDtoTopLevelKeys.forEach(function (key) {
1221
1244
  if (key !== 'participants') {
1222
- locus[key] = (0, _lodash.cloneDeep)(_this6[key]);
1245
+ locus[key] = (0, _lodash.cloneDeep)(_this7[key]);
1223
1246
  }
1224
1247
  });
1225
1248
  } else {
@@ -1227,7 +1250,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1227
1250
  // (except participants, which need to stay empty - that means "no participant changes")
1228
1251
  (0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
1229
1252
  if (locusDtoKey !== 'participants') {
1230
- locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this6[locusDtoKey]);
1253
+ locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this7[locusDtoKey]);
1231
1254
  }
1232
1255
  });
1233
1256
  }
@@ -1240,7 +1263,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1240
1263
  }))));
1241
1264
  // now apply all the updates from the hash tree onto the locus
1242
1265
  update.updatedObjects.forEach(function (object) {
1243
- locus = _this6.updateLocusFromHashTreeObject(object, locus);
1266
+ locus = _this7.updateLocusFromHashTreeObject(object, locus);
1244
1267
  });
1245
1268
 
1246
1269
  // update our locus info with the new locus
@@ -1437,7 +1460,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1437
1460
  key: "onFullLocusCommon",
1438
1461
  value: function onFullLocusCommon(locus, eventType) {
1439
1462
  var _this$participants,
1440
- _this7 = this,
1463
+ _this8 = this,
1441
1464
  _locus$jsSdkMeta;
1442
1465
  this.scheduledMeeting = locus.meeting || null;
1443
1466
  this.participants = locus.participants;
@@ -1445,7 +1468,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1445
1468
  var _participant$htMeta;
1446
1469
  // participant.htMeta is set only for hash tree based locus
1447
1470
  if (typeof ((_participant$htMeta = participant.htMeta) === null || _participant$htMeta === void 0 ? void 0 : _participant$htMeta.elementId.id) === 'number') {
1448
- _this7.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
1471
+ _this8.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
1449
1472
  }
1450
1473
  });
1451
1474
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
@@ -1611,7 +1634,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1611
1634
  if (((_this$parsedLocus$ful3 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful3 === void 0 ? void 0 : _this$parsedLocus$ful3.type) === _constants._CALL_ || ((_this$parsedLocus$ful4 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful4 === void 0 ? void 0 : _this$parsedLocus$ful4.type) === _constants._SIP_BRIDGE_ || ((_this$parsedLocus$ful5 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful5 === void 0 ? void 0 : _this$parsedLocus$ful5.type) === _constants._SPACE_SHARE_) {
1612
1635
  // @ts-ignore
1613
1636
  var partner = this.getLocusPartner(this.participants, this.self);
1614
- this.updateMeeting({
1637
+ this.callbacks.updateMeeting({
1615
1638
  partner: partner
1616
1639
  });
1617
1640
 
@@ -2058,7 +2081,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2058
2081
  }
2059
2082
  if (hasEntryExitToneChanged) {
2060
2083
  var entryExitTone = current.entryExitTone;
2061
- this.updateMeeting({
2084
+ this.callbacks.updateMeeting({
2062
2085
  entryExitTone: entryExitTone
2063
2086
  });
2064
2087
  this.emitScoped({
@@ -2073,7 +2096,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2073
2096
  // to fit with audio mute status logic
2074
2097
  if (hasVideoEnabledChanged) {
2075
2098
  var videoEnabled = current.videoEnabled;
2076
- this.updateMeeting({
2099
+ this.callbacks.updateMeeting({
2077
2100
  unmuteVideoAllowed: videoEnabled
2078
2101
  });
2079
2102
  this.emitScoped({
@@ -2163,12 +2186,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2163
2186
  value: function updateConversationUrl(conversationUrl, info) {
2164
2187
  if (conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, conversationUrl)) {
2165
2188
  this.conversationUrl = conversationUrl;
2166
- this.updateMeeting({
2189
+ this.callbacks.updateMeeting({
2167
2190
  conversationUrl: conversationUrl
2168
2191
  });
2169
2192
  } else if (info && info.conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, info.conversationUrl)) {
2170
2193
  this.conversationUrl = info.conversationUrl;
2171
- this.updateMeeting({
2194
+ this.callbacks.updateMeeting({
2172
2195
  conversationUrl: info.conversationUrl
2173
2196
  });
2174
2197
  }
@@ -2229,7 +2252,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2229
2252
  value: function updateFullState(fullState) {
2230
2253
  if (fullState && !(0, _lodash.isEqual)(this.fullState, fullState)) {
2231
2254
  var result = _fullState.default.getFullState(this.fullState, fullState);
2232
- this.updateMeeting(result.current);
2255
+ this.callbacks.updateMeeting(result.current);
2233
2256
  if (result.updates.meetingStateChangedTo) {
2234
2257
  this.emitScoped({
2235
2258
  file: 'locus-info',
@@ -2264,7 +2287,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2264
2287
  value: function updateHostInfo(host) {
2265
2288
  if (host && !(0, _lodash.isEqual)(this.host, host)) {
2266
2289
  var parsedHosts = _hostUtils.default.getHosts(this.host, host);
2267
- this.updateMeeting(parsedHosts.current);
2290
+ this.callbacks.updateMeeting(parsedHosts.current);
2268
2291
  this.parsedLocus.host = parsedHosts.current;
2269
2292
  if (parsedHosts.updates.isNewHost) {
2270
2293
  this.compareAndUpdateFlags.compareSelfAndHost = true;
@@ -2320,7 +2343,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2320
2343
  this.info = infoToParse;
2321
2344
  this.parsedLocus.info = parsedInfo.current;
2322
2345
  // Parses the info and adds necessary values
2323
- this.updateMeeting(parsedInfo.current);
2346
+ this.callbacks.updateMeeting(parsedInfo.current);
2324
2347
  this.emitScoped({
2325
2348
  file: 'locus-info',
2326
2349
  function: 'updateMeetingInfo'
@@ -2344,7 +2367,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2344
2367
  return;
2345
2368
  }
2346
2369
  var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
2347
- this.updateMeeting({
2370
+ this.callbacks.updateMeeting({
2348
2371
  embeddedApps: parsedEmbeddedApps
2349
2372
  });
2350
2373
  this.emitScoped({
@@ -2368,7 +2391,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2368
2391
  var forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2369
2392
  if (mediaShares && (!(0, _lodash.isEqual)(this.mediaShares, mediaShares) || forceUpdate)) {
2370
2393
  var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
2371
- this.updateMeeting(parsedMediaShares.current);
2394
+ this.callbacks.updateMeeting(parsedMediaShares.current);
2372
2395
  this.parsedLocus.mediaShares = parsedMediaShares.current;
2373
2396
  this.mediaShares = mediaShares;
2374
2397
  this.emitScoped({
@@ -2410,7 +2433,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2410
2433
  // @ts-ignore
2411
2434
  var parsedSelves = _selfUtils.default.getSelves(this.parsedLocus.self, self, this.webex.internal.device.url, this.participants // using this.participants instead of locus.participants here, because with delta DTOs locus.participants will only contain a small subset of participants
2412
2435
  );
2413
- this.updateMeeting(parsedSelves.current);
2436
+ this.callbacks.updateMeeting(parsedSelves.current);
2414
2437
  this.parsedLocus.self = parsedSelves.current;
2415
2438
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
2416
2439
  if (element !== parsedSelves.current.state) {
@@ -2421,7 +2444,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2421
2444
  // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState?.type, this.parsedLocus.info?.sipUri));
2422
2445
  var result = _selfUtils.default.getSipUrl(this.getLocusPartner(this.participants, self), (_this$parsedLocus$ful7 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful7 === void 0 ? void 0 : _this$parsedLocus$ful7.type, (_this$parsedLocus$inf = this.parsedLocus.info) === null || _this$parsedLocus$inf === void 0 ? void 0 : _this$parsedLocus$inf.sipUri);
2423
2446
  if (result !== null && result !== void 0 && result.sipUri) {
2424
- this.updateMeeting(result);
2447
+ this.callbacks.updateMeeting(result);
2425
2448
  }
2426
2449
  if (parsedSelves.updates.moderatorChanged) {
2427
2450
  this.compareAndUpdateFlags.compareHostAndSelf = true;
@@ -2609,7 +2632,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2609
2632
  var isMainLocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2610
2633
  if (url && this.url !== url) {
2611
2634
  this.url = url;
2612
- this.updateMeeting({
2635
+ this.callbacks.updateMeeting({
2613
2636
  locusUrl: url
2614
2637
  });
2615
2638
  this.emitScoped({
@@ -2738,7 +2761,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2738
2761
  }, {
2739
2762
  key: "updateMainSessionLocusCache",
2740
2763
  value: function updateMainSessionLocusCache(mainLocus) {
2741
- var _this8 = this;
2764
+ var _this9 = this;
2742
2765
  if (!mainLocus) {
2743
2766
  return;
2744
2767
  }
@@ -2747,7 +2770,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2747
2770
  // shallow merge and do special merge for participants
2748
2771
  (0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
2749
2772
  if (key === 'participants') {
2750
- return _this8.mergeParticipants(objValue, srcValue);
2773
+ return _this9.mergeParticipants(objValue, srcValue);
2751
2774
  }
2752
2775
  return srcValue || objValue;
2753
2776
  });