@webex/plugin-meetings 3.10.0-next.9 → 3.10.0-webex-services-ready.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 (73) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +11 -3
  4. package/dist/constants.js.map +1 -1
  5. package/dist/hashTree/constants.js +20 -0
  6. package/dist/hashTree/constants.js.map +1 -0
  7. package/dist/hashTree/hashTree.js +515 -0
  8. package/dist/hashTree/hashTree.js.map +1 -0
  9. package/dist/hashTree/hashTreeParser.js +1266 -0
  10. package/dist/hashTree/hashTreeParser.js.map +1 -0
  11. package/dist/hashTree/types.js +22 -0
  12. package/dist/hashTree/types.js.map +1 -0
  13. package/dist/hashTree/utils.js +48 -0
  14. package/dist/hashTree/utils.js.map +1 -0
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/index.js +529 -75
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/types.js +7 -0
  20. package/dist/locus-info/types.js.map +1 -0
  21. package/dist/meeting/index.js +63 -22
  22. package/dist/meeting/index.js.map +1 -1
  23. package/dist/meeting/util.js +1 -0
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meetings/index.js +112 -70
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/metrics/constants.js +3 -1
  28. package/dist/metrics/constants.js.map +1 -1
  29. package/dist/reachability/clusterReachability.js +44 -358
  30. package/dist/reachability/clusterReachability.js.map +1 -1
  31. package/dist/reachability/reachability.types.js +14 -1
  32. package/dist/reachability/reachability.types.js.map +1 -1
  33. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  34. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  35. package/dist/types/constants.d.ts +26 -21
  36. package/dist/types/hashTree/constants.d.ts +8 -0
  37. package/dist/types/hashTree/hashTree.d.ts +129 -0
  38. package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
  39. package/dist/types/hashTree/types.d.ts +27 -0
  40. package/dist/types/hashTree/utils.d.ts +9 -0
  41. package/dist/types/locus-info/index.d.ts +95 -56
  42. package/dist/types/locus-info/types.d.ts +54 -0
  43. package/dist/types/meeting/index.d.ts +22 -9
  44. package/dist/types/meetings/index.d.ts +9 -2
  45. package/dist/types/metrics/constants.d.ts +2 -0
  46. package/dist/types/reachability/clusterReachability.d.ts +10 -88
  47. package/dist/types/reachability/reachability.types.d.ts +12 -1
  48. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  49. package/dist/webinar/index.js +1 -1
  50. package/package.json +22 -21
  51. package/src/constants.ts +13 -1
  52. package/src/hashTree/constants.ts +9 -0
  53. package/src/hashTree/hashTree.ts +463 -0
  54. package/src/hashTree/hashTreeParser.ts +1161 -0
  55. package/src/hashTree/types.ts +32 -0
  56. package/src/hashTree/utils.ts +42 -0
  57. package/src/locus-info/index.ts +571 -106
  58. package/src/locus-info/types.ts +53 -0
  59. package/src/meeting/index.ts +78 -27
  60. package/src/meeting/util.ts +1 -0
  61. package/src/meetings/index.ts +104 -51
  62. package/src/metrics/constants.ts +2 -0
  63. package/src/reachability/clusterReachability.ts +50 -347
  64. package/src/reachability/reachability.types.ts +15 -1
  65. package/src/reachability/reachabilityPeerConnection.ts +416 -0
  66. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  67. package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
  68. package/test/unit/spec/hashTree/utils.ts +103 -0
  69. package/test/unit/spec/locus-info/index.js +722 -4
  70. package/test/unit/spec/meeting/index.js +120 -20
  71. package/test/unit/spec/meeting/utils.js +77 -0
  72. package/test/unit/spec/meetings/index.js +71 -26
  73. package/test/unit/spec/reachability/clusterReachability.ts +281 -138
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {HtMeta} from '../hashTree/types';\n\nexport type LocusFullState = {\n active: boolean;\n count: number;\n lastActive: string;\n locked: boolean;\n sessionId: string;\n seessionIds: string[];\n startTime: number;\n state: string;\n type: string;\n};\n\nexport type Links = {\n services: Record<'breakout' | 'record', {url: string}>; // there exist also other services, but these are the ones we currently use\n resources: Record<'webcastInstance' | 'visibleDataSets', {url: string}>; // there exist also other resources, but these are the ones we currently use\n};\n\nexport type LocusDTO = {\n controls?: any;\n fullState?: LocusFullState;\n host?: {\n id: string;\n incomingCallProtocols: any[];\n isExternal: boolean;\n name: string;\n orgId: string;\n };\n htMeta?: HtMeta;\n info?: any;\n jsSdkMeta?: {\n removedParticipantIds: string[]; // list of ids of participants that are removed in the last update\n };\n links?: Links;\n mediaShares?: any[];\n meetings?: any[];\n participants: any[];\n replaces?: any[];\n self?: any;\n sequence?: {\n dirtyParticipants: number;\n entries: number[];\n rangeEnd: number;\n rangeStart: number;\n sequenceHash: number;\n sessionToken: string;\n since: string;\n totalParticipants: number;\n };\n syncUrl?: string;\n url?: string;\n};\n"],"mappings":"","ignoreList":[]}
@@ -560,6 +560,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
560
560
  (0, _defineProperty3.default)(_this, "uploadLogsTimer", void 0);
561
561
  (0, _defineProperty3.default)(_this, "logUploadIntervalIndex", void 0);
562
562
  (0, _defineProperty3.default)(_this, "mediaServerIp", void 0);
563
+ /** Handles Locus LLM events
564
+ *
565
+ * @param {LocusLLMEvent} event - The Locus LLM event to process
566
+ * @returns {void}
567
+ */
568
+ (0, _defineProperty3.default)(_this, "processLocusLLMEvent", function (event) {
569
+ if (event.data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
570
+ _this.locusInfo.parse(_this, event.data);
571
+ } else {
572
+ _loggerProxy.default.logger.warn("Meeting:index#processLocusLLMEvent --> Unknown event type: ".concat(event.data.eventType));
573
+ }
574
+ });
563
575
  /**
564
576
  * Callback called when a relay event is received from meeting LLM Connection
565
577
  * @param {RelayEvent} e Event object coming from LLM Connection
@@ -1425,6 +1437,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1425
1437
 
1426
1438
  // @ts-ignore - fix types
1427
1439
  _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
1440
+ // @ts-ignore - Fix type
1441
+ _this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this.processLocusLLMEvent);
1428
1442
  });
1429
1443
  /**
1430
1444
  * starts keepAlives being sent
@@ -5000,13 +5014,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5000
5014
  }
5001
5015
 
5002
5016
  /**
5003
- * Set the locus info the class instance
5004
- * @param {Object} locus
5005
- * @param {Array} locus.mediaConnections
5006
- * @param {String} locus.locusUrl
5007
- * @param {String} locus.locusId
5008
- * @param {String} locus.mediaId
5009
- * @param {Object} locus.host
5017
+ * Set the locus info the class instance. Should be called with the parsed locus
5018
+ * we got in the join response.
5019
+ *
5020
+ * @param {Object} data
5021
+ * @param {Array} data.mediaConnections
5022
+ * @param {String} data.locusUrl
5023
+ * @param {String} data.locusId
5024
+ * @param {String} data.mediaId
5025
+ * @param {Object} data.host
5010
5026
  * @todo change name to genertic parser
5011
5027
  * @returns {undefined}
5012
5028
  * @private
@@ -5014,18 +5030,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5014
5030
  */
5015
5031
  }, {
5016
5032
  key: "setLocus",
5017
- value: function setLocus(locus) {
5018
- var mtgLocus = locus.locus || locus;
5033
+ value: function setLocus(data) {
5034
+ var mtgLocus = data.locus;
5019
5035
 
5020
5036
  // LocusInfo object saves the locus object
5021
5037
  // this.locus = mtgLocus;
5022
- this.mediaConnections = locus.mediaConnections;
5023
- this.locusUrl = locus.locusUrl || locus.url;
5024
- this.locusId = locus.locusId;
5025
- this.selfId = locus.selfId;
5026
- this.mediaId = locus.mediaId;
5038
+ this.mediaConnections = data.mediaConnections;
5039
+ this.locusUrl = data.locusUrl;
5040
+ this.locusId = data.locusId;
5041
+ this.selfId = data.selfId;
5042
+ this.mediaId = data.mediaId;
5027
5043
  this.hostId = mtgLocus.host ? mtgLocus.host.id : this.hostId;
5028
- this.locusInfo.initialSetup(mtgLocus);
5044
+ this.locusInfo.initialSetup({
5045
+ trigger: 'join-response',
5046
+ locus: mtgLocus,
5047
+ dataSets: data.dataSets
5048
+ });
5029
5049
  }
5030
5050
 
5031
5051
  /**
@@ -5814,6 +5834,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5814
5834
  _leaveError,
5815
5835
  leaveError,
5816
5836
  shouldRetry,
5837
+ _error2,
5838
+ _error3,
5817
5839
  _args14 = arguments,
5818
5840
  _t9,
5819
5841
  _t0;
@@ -5905,6 +5927,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5905
5927
  // so there is no point doing a retry
5906
5928
  shouldRetry = false;
5907
5929
  }
5930
+ if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t9)) {
5931
+ shouldRetry = false;
5932
+ // eslint-disable-next-line no-ex-assign
5933
+ _t9 = (0, _lodash.merge)({
5934
+ error: {
5935
+ body: {
5936
+ errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t9),
5937
+ message: (_error2 = _t9) === null || _error2 === void 0 ? void 0 : _error2.message,
5938
+ name: (_error3 = _t9) === null || _error3 === void 0 ? void 0 : _error3.name
5939
+ }
5940
+ }
5941
+ });
5942
+ }
5908
5943
 
5909
5944
  // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
5910
5945
  if (!(joined && (isRetry || !shouldRetry))) {
@@ -6253,9 +6288,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6253
6288
  joinFailed,
6254
6289
  joinSuccess,
6255
6290
  _errorMessage2,
6256
- _error2,
6291
+ _error4,
6257
6292
  _errorMessage3,
6258
- _error3,
6293
+ _error5,
6259
6294
  _args17 = arguments,
6260
6295
  _t10;
6261
6296
  return _regenerator.default.wrap(function (_context17) {
@@ -6339,11 +6374,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6339
6374
  break;
6340
6375
  }
6341
6376
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
6342
- _error2 = new Error(_errorMessage2);
6377
+ _error4 = new Error(_errorMessage2);
6343
6378
  _loggerProxy.default.logger.error(_errorMessage2);
6344
- joinFailed(_error2);
6379
+ joinFailed(_error4);
6345
6380
  this.deferJoin = undefined;
6346
- return _context17.abrupt("return", _promise.default.reject(_error2));
6381
+ return _context17.abrupt("return", _promise.default.reject(_error4));
6347
6382
  case 3:
6348
6383
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
6349
6384
  case 4:
@@ -6357,8 +6392,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6357
6392
  }
6358
6393
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
6359
6394
  _loggerProxy.default.logger.error(_errorMessage3);
6360
- _error3 = new Error(_errorMessage3);
6361
- joinFailed(_error3);
6395
+ _error5 = new Error(_errorMessage3);
6396
+ joinFailed(_error5);
6362
6397
  this.deferJoin = undefined;
6363
6398
  return _context17.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6364
6399
  case 5:
@@ -6499,6 +6534,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6499
6534
  case 2:
6500
6535
  // @ts-ignore - Fix type
6501
6536
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
6537
+ // @ts-ignore - Fix type
6538
+ this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
6502
6539
  case 3:
6503
6540
  if (isJoined) {
6504
6541
  _context18.next = 4;
@@ -6511,6 +6548,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6511
6548
  _this35.webex.internal.llm.off('event:relay.event', _this35.processRelayEvent);
6512
6549
  // @ts-ignore - Fix type
6513
6550
  _this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
6551
+ // @ts-ignore - Fix type
6552
+ _this35.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this35.processLocusLLMEvent);
6553
+ // @ts-ignore - Fix type
6554
+ _this35.webex.internal.llm.on(_constants.LOCUS_LLM_EVENT, _this35.processLocusLLMEvent);
6514
6555
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6515
6556
  return _promise.default.resolve(registerAndConnectResult);
6516
6557
  }));