@webex/plugin-meetings 3.10.0-next.16 → 3.10.0-next.18

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.10.0-next.16"
212
+ version: "3.10.0-next.18"
213
213
  });
214
214
  var _default = exports.default = Breakout;
215
215
  //# sourceMappingURL=breakout.js.map
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1109
1109
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1110
1110
  }
1111
1111
  },
1112
- version: "3.10.0-next.16"
1112
+ version: "3.10.0-next.18"
1113
1113
  });
1114
1114
  var _default = exports.default = Breakouts;
1115
1115
  //# sourceMappingURL=index.js.map
@@ -372,7 +372,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
372
372
  throw error;
373
373
  });
374
374
  },
375
- version: "3.10.0-next.16"
375
+ version: "3.10.0-next.18"
376
376
  });
377
377
  var _default = exports.default = SimultaneousInterpretation;
378
378
  //# 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.10.0-next.16"
21
+ version: "3.10.0-next.18"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -496,7 +496,15 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
496
496
  }, {
497
497
  key: "updateLocusFromHashTreeObject",
498
498
  value: function updateLocusFromHashTreeObject(object, locus) {
499
+ var _this4 = this;
499
500
  var type = object.htMeta.elementId.type.toLowerCase();
501
+ var addParticipantObject = function addParticipantObject(obj) {
502
+ if (!locus.participants) {
503
+ locus.participants = [];
504
+ }
505
+ locus.participants.push(obj.data);
506
+ _this4.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
507
+ };
500
508
  switch (type) {
501
509
  case _types.ObjectType.locus:
502
510
  {
@@ -543,13 +551,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
543
551
  case _types.ObjectType.participant:
544
552
  _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> participant id=".concat(object.htMeta.elementId.id, " ").concat(object.data ? 'updated' : 'removed', " version=").concat(object.htMeta.elementId.version));
545
553
  if (object.data) {
546
- if (!locus.participants) {
547
- locus.participants = [];
548
- }
549
- var participantObject = object.data;
550
- participantObject.htMeta = object.htMeta;
551
- locus.participants.push(participantObject);
552
- this.hashTreeObjectId2ParticipantId.set(object.htMeta.elementId.id, participantObject.id);
554
+ addParticipantObject(object);
553
555
  } else {
554
556
  var participantId = this.hashTreeObjectId2ParticipantId.get(object.htMeta.elementId.id);
555
557
  if (!locus.jsSdkMeta) {
@@ -570,9 +572,22 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
570
572
  // all other types info, fullstate, etc - Locus should never send them without data
571
573
  _loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received ".concat(type, " object without data, this is not expected! version=").concat(object.htMeta.elementId.version));
572
574
  } else {
575
+ var _locus$info, _object$data$controls, _object$data$controls2, _object$data$controls3;
573
576
  _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> ".concat(type, " object updated to version ").concat(object.htMeta.elementId.version));
574
577
  var locusDtoKey = _types.ObjectTypeToLocusKeyMap[type];
575
578
  locus[locusDtoKey] = object.data;
579
+
580
+ /* Hash tree based webinar attendees don't receive a Participant object for themselves from Locus,
581
+ but a lot of existing code in SDK and web app expects a member object for self to exist,
582
+ so whenever SELF changes for a webinar attendee, we copy it into a participant object.
583
+ We can do it, because SELF has always all the same properties as a participant object.
584
+ */
585
+ if (type === _types.ObjectType.self && (_locus$info = locus.info) !== null && _locus$info !== void 0 && _locus$info.isWebinar && (_object$data$controls = object.data.controls) !== null && _object$data$controls !== void 0 && (_object$data$controls2 = _object$data$controls.role) !== null && _object$data$controls2 !== void 0 && (_object$data$controls3 = _object$data$controls2.roles) !== null && _object$data$controls3 !== void 0 && _object$data$controls3.find(function (r) {
586
+ return r.type === _constants.SELF_ROLES.ATTENDEE && r.hasRole;
587
+ })) {
588
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> webinar attendee: creating participant object from self");
589
+ addParticipantObject(object);
590
+ }
576
591
  }
577
592
  break;
578
593
  default:
@@ -633,7 +648,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
633
648
  }, {
634
649
  key: "updateFromHashTree",
635
650
  value: function updateFromHashTree(updateType, data) {
636
- var _this4 = this;
651
+ var _this5 = this;
637
652
  switch (updateType) {
638
653
  case _hashTreeParser.LocusInfoUpdateType.OBJECTS_UPDATED:
639
654
  {
@@ -656,7 +671,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
656
671
  // but these should never happen
657
672
  _loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
658
673
  _metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
659
- locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this4.url,
674
+ locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this5.url,
660
675
  message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
661
676
  });
662
677
  }
@@ -677,7 +692,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
677
692
  // copy over all of existing locus except participants
678
693
  LocusDtoTopLevelKeys.forEach(function (key) {
679
694
  if (key !== 'participants') {
680
- locus[key] = (0, _lodash.cloneDeep)(_this4[key]);
695
+ locus[key] = (0, _lodash.cloneDeep)(_this5[key]);
681
696
  }
682
697
  });
683
698
  } else {
@@ -685,7 +700,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
685
700
  // (except participants, which need to stay empty - that means "no participant changes")
686
701
  (0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
687
702
  if (locusDtoKey !== 'participants') {
688
- locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this4[locusDtoKey]);
703
+ locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this5[locusDtoKey]);
689
704
  }
690
705
  });
691
706
  }
@@ -698,7 +713,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
698
713
  }))));
699
714
  // now apply all the updates from the hash tree onto the locus
700
715
  data.updatedObjects.forEach(function (object) {
701
- locus = _this4.updateLocusFromHashTreeObject(object, locus);
716
+ locus = _this5.updateLocusFromHashTreeObject(object, locus);
702
717
  });
703
718
 
704
719
  // update our locus info with the new locus
@@ -859,7 +874,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
859
874
  key: "onFullLocusCommon",
860
875
  value: function onFullLocusCommon(locus, eventType) {
861
876
  var _this$participants,
862
- _this5 = this,
877
+ _this6 = this,
863
878
  _locus$jsSdkMeta;
864
879
  this.scheduledMeeting = locus.meeting || null;
865
880
  this.participants = locus.participants;
@@ -867,7 +882,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
867
882
  var _participant$htMeta;
868
883
  // participant.htMeta is set only for hash tree based locus
869
884
  if ((_participant$htMeta = participant.htMeta) !== null && _participant$htMeta !== void 0 && _participant$htMeta.elementId.id) {
870
- _this5.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
885
+ _this6.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
871
886
  }
872
887
  });
873
888
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
@@ -2082,7 +2097,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2082
2097
  }, {
2083
2098
  key: "updateMainSessionLocusCache",
2084
2099
  value: function updateMainSessionLocusCache(mainLocus) {
2085
- var _this6 = this;
2100
+ var _this7 = this;
2086
2101
  if (!mainLocus) {
2087
2102
  return;
2088
2103
  }
@@ -2091,7 +2106,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2091
2106
  // shallow merge and do special merge for participants
2092
2107
  (0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
2093
2108
  if (key === 'participants') {
2094
- return _this6.mergeParticipants(objValue, srcValue);
2109
+ return _this7.mergeParticipants(objValue, srcValue);
2095
2110
  }
2096
2111
  return srcValue || objValue;
2097
2112
  });