@webex/plugin-meetings 3.0.0-beta.10 → 3.0.0-beta.11

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.
@@ -138,6 +138,8 @@ var _remoteMediaManager = require("../multistream/remoteMediaManager");
138
138
 
139
139
  var _multistreamMedia = require("../multistream/multistreamMedia");
140
140
 
141
+ var _reactions = require("../reactions/reactions");
142
+
141
143
  var _inMeetingActions = _interopRequireDefault(require("./in-meeting-actions"));
142
144
 
143
145
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -6968,6 +6970,45 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6968
6970
  * @memberof Meeting
6969
6971
  */
6970
6972
 
6973
+ }, {
6974
+ key: "sendReaction",
6975
+ value:
6976
+ /**
6977
+ * Send a reaction inside the meeting.
6978
+ *
6979
+ * @param {ReactionType} reactionType - type of reaction to be sent. Example: "thumbs_up"
6980
+ * @param {SkinToneType} skinToneType - skin tone for the reaction. Example: "medium_dark"
6981
+ * @returns {Promise}
6982
+ * @public
6983
+ * @memberof Meeting
6984
+ */
6985
+ function sendReaction(reactionType, skinToneType) {
6986
+ var _this$locusInfo2, _this$locusInfo2$cont, _this$locusInfo2$cont2;
6987
+
6988
+ var reactionChannelUrl = (_this$locusInfo2 = this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$cont = _this$locusInfo2.controls) === null || _this$locusInfo2$cont === void 0 ? void 0 : (_this$locusInfo2$cont2 = _this$locusInfo2$cont.reactions) === null || _this$locusInfo2$cont2 === void 0 ? void 0 : _this$locusInfo2$cont2.reactionChannelUrl;
6989
+ var participantId = this.members.selfId;
6990
+ var reactionData = _reactions.Reactions[reactionType];
6991
+
6992
+ if (!reactionData) {
6993
+ return _promise.default.reject(new Error("".concat(reactionType, " is not a valid reaction.")));
6994
+ }
6995
+
6996
+ var skinToneData = _reactions.SkinTones[skinToneType] || _reactions.SkinTones.normal;
6997
+
6998
+ var reaction = _objectSpread(_objectSpread({}, reactionData), {}, {
6999
+ tone: skinToneData
7000
+ });
7001
+
7002
+ if (reactionChannelUrl) {
7003
+ return this.meetingRequest.sendReaction({
7004
+ reactionChannelUrl: reactionChannelUrl,
7005
+ reaction: reaction,
7006
+ participantId: participantId
7007
+ });
7008
+ }
7009
+
7010
+ return _promise.default.reject(new Error('Error sending reaction, service url not found.'));
7011
+ }
6971
7012
  }]);
6972
7013
  return Meeting;
6973
7014
  }(_webexCore.StatelessWebexPlugin);