@webex/plugin-meetings 3.7.0-next.4 → 3.7.0-next.41

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 (131) hide show
  1. package/dist/annotation/index.js +17 -0
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
  6. package/dist/common/errors/join-webinar-error.js.map +1 -0
  7. package/dist/common/errors/multistream-not-supported-error.js +53 -0
  8. package/dist/common/errors/multistream-not-supported-error.js.map +1 -0
  9. package/dist/config.js +1 -1
  10. package/dist/config.js.map +1 -1
  11. package/dist/constants.js +36 -6
  12. package/dist/constants.js.map +1 -1
  13. package/dist/index.js +16 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/index.js +13 -2
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/selfUtils.js +30 -17
  20. package/dist/locus-info/selfUtils.js.map +1 -1
  21. package/dist/meeting/in-meeting-actions.js +13 -1
  22. package/dist/meeting/in-meeting-actions.js.map +1 -1
  23. package/dist/meeting/index.js +922 -800
  24. package/dist/meeting/index.js.map +1 -1
  25. package/dist/meeting/locusMediaRequest.js +9 -0
  26. package/dist/meeting/locusMediaRequest.js.map +1 -1
  27. package/dist/meeting/request.js +30 -0
  28. package/dist/meeting/request.js.map +1 -1
  29. package/dist/meeting/request.type.js.map +1 -1
  30. package/dist/meeting/util.js +16 -16
  31. package/dist/meeting/util.js.map +1 -1
  32. package/dist/meeting-info/meeting-info-v2.js +29 -17
  33. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  34. package/dist/meetings/index.js +6 -3
  35. package/dist/meetings/index.js.map +1 -1
  36. package/dist/meetings/util.js +1 -1
  37. package/dist/meetings/util.js.map +1 -1
  38. package/dist/member/index.js +9 -0
  39. package/dist/member/index.js.map +1 -1
  40. package/dist/member/types.js.map +1 -1
  41. package/dist/member/util.js +39 -28
  42. package/dist/member/util.js.map +1 -1
  43. package/dist/members/util.js +4 -2
  44. package/dist/members/util.js.map +1 -1
  45. package/dist/metrics/constants.js +1 -1
  46. package/dist/metrics/constants.js.map +1 -1
  47. package/dist/multistream/remoteMedia.js +30 -15
  48. package/dist/multistream/remoteMedia.js.map +1 -1
  49. package/dist/multistream/sendSlotManager.js +24 -0
  50. package/dist/multistream/sendSlotManager.js.map +1 -1
  51. package/dist/recording-controller/enums.js +8 -4
  52. package/dist/recording-controller/enums.js.map +1 -1
  53. package/dist/recording-controller/index.js +18 -9
  54. package/dist/recording-controller/index.js.map +1 -1
  55. package/dist/recording-controller/util.js +13 -9
  56. package/dist/recording-controller/util.js.map +1 -1
  57. package/dist/roap/index.js +10 -8
  58. package/dist/roap/index.js.map +1 -1
  59. package/dist/types/annotation/index.d.ts +5 -0
  60. package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
  61. package/dist/types/common/errors/multistream-not-supported-error.d.ts +17 -0
  62. package/dist/types/constants.d.ts +28 -1
  63. package/dist/types/index.d.ts +3 -3
  64. package/dist/types/locus-info/index.d.ts +2 -1
  65. package/dist/types/meeting/in-meeting-actions.d.ts +12 -0
  66. package/dist/types/meeting/index.d.ts +20 -12
  67. package/dist/types/meeting/locusMediaRequest.d.ts +4 -0
  68. package/dist/types/meeting/request.d.ts +12 -1
  69. package/dist/types/meeting/request.type.d.ts +6 -0
  70. package/dist/types/meeting/util.d.ts +1 -1
  71. package/dist/types/meeting-info/meeting-info-v2.d.ts +4 -4
  72. package/dist/types/meetings/index.d.ts +3 -0
  73. package/dist/types/member/index.d.ts +1 -0
  74. package/dist/types/member/types.d.ts +7 -0
  75. package/dist/types/members/util.d.ts +2 -0
  76. package/dist/types/metrics/constants.d.ts +1 -1
  77. package/dist/types/multistream/sendSlotManager.d.ts +8 -1
  78. package/dist/types/recording-controller/enums.d.ts +5 -2
  79. package/dist/types/recording-controller/index.d.ts +1 -0
  80. package/dist/types/recording-controller/util.d.ts +2 -1
  81. package/dist/webinar/index.js +390 -7
  82. package/dist/webinar/index.js.map +1 -1
  83. package/package.json +23 -22
  84. package/src/annotation/index.ts +16 -0
  85. package/src/common/errors/join-webinar-error.ts +24 -0
  86. package/src/common/errors/multistream-not-supported-error.ts +30 -0
  87. package/src/config.ts +1 -1
  88. package/src/constants.ts +33 -3
  89. package/src/index.ts +5 -3
  90. package/src/locus-info/index.ts +17 -2
  91. package/src/locus-info/selfUtils.ts +19 -6
  92. package/src/meeting/in-meeting-actions.ts +25 -0
  93. package/src/meeting/index.ts +257 -80
  94. package/src/meeting/locusMediaRequest.ts +7 -0
  95. package/src/meeting/request.ts +26 -1
  96. package/src/meeting/request.type.ts +7 -0
  97. package/src/meeting/util.ts +8 -10
  98. package/src/meeting-info/meeting-info-v2.ts +23 -11
  99. package/src/meetings/index.ts +8 -2
  100. package/src/meetings/util.ts +2 -1
  101. package/src/member/index.ts +9 -0
  102. package/src/member/types.ts +8 -0
  103. package/src/member/util.ts +34 -24
  104. package/src/members/util.ts +1 -0
  105. package/src/metrics/constants.ts +1 -1
  106. package/src/multistream/remoteMedia.ts +28 -15
  107. package/src/multistream/sendSlotManager.ts +31 -0
  108. package/src/recording-controller/enums.ts +5 -2
  109. package/src/recording-controller/index.ts +17 -4
  110. package/src/recording-controller/util.ts +20 -5
  111. package/src/roap/index.ts +10 -8
  112. package/src/webinar/index.ts +235 -9
  113. package/test/unit/spec/annotation/index.ts +46 -1
  114. package/test/unit/spec/locus-info/index.js +222 -0
  115. package/test/unit/spec/locus-info/selfConstant.js +7 -0
  116. package/test/unit/spec/locus-info/selfUtils.js +91 -1
  117. package/test/unit/spec/meeting/in-meeting-actions.ts +15 -1
  118. package/test/unit/spec/meeting/index.js +685 -102
  119. package/test/unit/spec/meeting/utils.js +22 -19
  120. package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
  121. package/test/unit/spec/meetings/index.js +9 -5
  122. package/test/unit/spec/meetings/utils.js +10 -0
  123. package/test/unit/spec/member/util.js +52 -11
  124. package/test/unit/spec/members/utils.js +95 -0
  125. package/test/unit/spec/multistream/remoteMedia.ts +11 -7
  126. package/test/unit/spec/recording-controller/index.js +61 -5
  127. package/test/unit/spec/recording-controller/util.js +39 -3
  128. package/test/unit/spec/roap/index.ts +47 -0
  129. package/test/unit/spec/webinar/index.ts +504 -0
  130. package/dist/common/errors/webinar-registration-error.js.map +0 -1
  131. package/src/common/errors/webinar-registration-error.ts +0 -27
@@ -54,6 +54,7 @@ declare const MeetingUtil: {
54
54
  canUserLowerSomeoneElsesHand: (displayHints: any) => any;
55
55
  bothLeaveAndEndMeetingAvailable: (displayHints: any) => any;
56
56
  canManageBreakout: (displayHints: any) => any;
57
+ canStartBreakout: (displayHints: any) => boolean;
57
58
  canBroadcastMessageToBreakout: (displayHints: any, policies?: {}) => boolean;
58
59
  isSuppressBreakoutSupport: (displayHints: any) => any;
59
60
  canAdmitLobbyToBreakout: (displayHints: any) => boolean;
@@ -63,7 +64,6 @@ declare const MeetingUtil: {
63
64
  unlockMeeting: (actions: any, request: any, locusUrl: any) => any;
64
65
  handleAudioLogging: (audioStream?: LocalMicrophoneStream) => void;
65
66
  handleVideoLogging: (videoStream?: LocalCameraStream) => void;
66
- handleDeviceLogging: (devices?: any[]) => void;
67
67
  endMeetingForAll: (meeting: any) => any;
68
68
  canEnableClosedCaption: (displayHints: any) => any;
69
69
  isSaveTranscriptsEnabled: (displayHints: any) => any;
@@ -65,9 +65,9 @@ export declare class MeetingInfoV2CaptchaError extends Error {
65
65
  constructor(wbxAppApiErrorCode?: number, captchaInfo?: object, message?: string);
66
66
  }
67
67
  /**
68
- * Error preventing join because of a webinar registration error
68
+ * Error preventing join because of a webinar have some error
69
69
  */
70
- export declare class MeetingInfoV2WebinarRegistrationError extends Error {
70
+ export declare class MeetingInfoV2JoinWebinarError extends Error {
71
71
  meetingInfo: any;
72
72
  sdkMessage: any;
73
73
  wbxAppApiCode: any;
@@ -107,11 +107,11 @@ export default class MeetingInfoV2 {
107
107
  */
108
108
  handlePolicyError: (err: any) => void;
109
109
  /**
110
- * Raises a handleWebinarRegistrationError for webinar registration error codes
110
+ * Raises a handleJoinWebinarError for join webinar error codes
111
111
  * @param {any} err the error from the request
112
112
  * @returns {void}
113
113
  */
114
- handleWebinarRegistrationError: (err: any) => void;
114
+ handleJoinWebinarError: (err: any) => void;
115
115
  /**
116
116
  * Creates adhoc space meetings for a space by fetching the conversation infomation
117
117
  * @param {String} conversationUrl conversationUrl to start adhoc meeting on
@@ -71,6 +71,9 @@ export type BasicMeetingInformation = {
71
71
  };
72
72
  meetingInfo: any;
73
73
  sessionCorrelationId: string;
74
+ roles: string[];
75
+ getCurUserType: () => string | null;
76
+ callStateForMetrics: CallStateForMetrics;
74
77
  };
75
78
  /**
76
79
  * Maintain a cache of meetings and sync with services.
@@ -21,6 +21,7 @@ export default class Member {
21
21
  isRecording: any;
22
22
  isRemovable: any;
23
23
  isSelf: any;
24
+ isBrb: boolean;
24
25
  isUser: any;
25
26
  isVideoMuted: any;
26
27
  roles: IExternalRoles;
@@ -19,6 +19,13 @@ export type ParticipantWithRoles = {
19
19
  };
20
20
  };
21
21
  };
22
+ export type ParticipantWithBrb = {
23
+ controls: {
24
+ brb?: {
25
+ enabled: boolean;
26
+ };
27
+ };
28
+ };
22
29
  export declare enum MediaStatus {
23
30
  RECVONLY = "RECVONLY",
24
31
  SENDONLY = "SENDONLY",
@@ -26,6 +26,7 @@ declare const MembersUtil: {
26
26
  */
27
27
  getAddMemberBody: (options: any) => {
28
28
  invitees: {
29
+ roles?: any;
29
30
  address: any;
30
31
  }[];
31
32
  alertIfActive: any;
@@ -54,6 +55,7 @@ declare const MembersUtil: {
54
55
  uri: any;
55
56
  body: {
56
57
  invitees: {
58
+ roles?: any;
57
59
  address: any;
58
60
  }[];
59
61
  alertIfActive: any;
@@ -67,7 +67,7 @@ declare const BEHAVIORAL_METRICS: {
67
67
  ROAP_HTTP_RESPONSE_MISSING: string;
68
68
  TURN_DISCOVERY_REQUIRES_OK: string;
69
69
  REACHABILITY_COMPLETED: string;
70
- WEBINAR_REGISTRATION_ERROR: string;
70
+ JOIN_WEBINAR_ERROR: string;
71
71
  GUEST_ENTERED_LOBBY: string;
72
72
  GUEST_EXITED_LOBBY: string;
73
73
  };
@@ -1,4 +1,4 @@
1
- import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup } from '@webex/internal-media-core';
1
+ import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup, StreamState } from '@webex/internal-media-core';
2
2
  export default class SendSlotManager {
3
3
  private readonly slots;
4
4
  private readonly LoggerProxy;
@@ -25,6 +25,13 @@ export default class SendSlotManager {
25
25
  * @returns {void}
26
26
  */
27
27
  setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void;
28
+ /**
29
+ * Sets the source state override for the given media type.
30
+ * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).
31
+ * @param {StreamState | null} state - The state to set or null to clear the override value.
32
+ * @returns {void}
33
+ */
34
+ setSourceStateOverride(mediaType: MediaType, state: StreamState | null): void;
28
35
  /**
29
36
  * This method publishes the given stream to the sendSlot for the given mediaType
30
37
  * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
@@ -1,7 +1,10 @@
1
- declare enum RecordingAction {
1
+ export declare enum RecordingAction {
2
2
  Start = "Start",
3
3
  Stop = "Stop",
4
4
  Pause = "Pause",
5
5
  Resume = "Resume"
6
6
  }
7
- export default RecordingAction;
7
+ export declare enum RecordingType {
8
+ Premise = "premise",
9
+ Cloud = "cloud"
10
+ }
@@ -161,6 +161,7 @@ export default class RecordingController {
161
161
  private extract;
162
162
  /**
163
163
  * @param {RecordingAction} action
164
+ * @param {RecordingType} recordingType
164
165
  * @private
165
166
  * @memberof RecordingController
166
167
  * @returns {Promise}
@@ -1,10 +1,11 @@
1
1
  import { SELF_POLICY } from '../constants';
2
- import RecordingAction from './enums';
2
+ import { RecordingAction } from './enums';
3
3
  declare const _default: {
4
4
  canUserStart: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
5
5
  canUserPause: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
6
6
  canUserResume: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
7
7
  canUserStop: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
8
+ isPremiseRecordingEnabled: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
8
9
  deriveRecordingStates: (action: RecordingAction) => {
9
10
  recording: boolean;
10
11
  paused: boolean;
@@ -6,10 +6,15 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
9
12
  var _webexCore = require("@webex/webex-core");
13
+ var _uuid = _interopRequireDefault(require("uuid"));
10
14
  var _lodash = require("lodash");
11
15
  var _constants = require("../constants");
12
16
  var _collection = _interopRequireDefault(require("./collection"));
17
+ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
13
18
  /*!
14
19
  * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
15
20
  */
@@ -31,7 +36,11 @@ var Webinar = _webexCore.WebexPlugin.extend({
31
36
  // appears the ability to manage webcast
32
37
  selfIsPanelist: 'boolean',
33
38
  // self is panelist
34
- selfIsAttendee: 'boolean' // self is attendee
39
+ selfIsAttendee: 'boolean',
40
+ // self is attendee
41
+ practiceSessionEnabled: 'boolean',
42
+ // practice session enabled
43
+ meetingId: 'string'
35
44
  },
36
45
  /**
37
46
  * Update the current locus url of the webinar
@@ -65,17 +74,391 @@ var Webinar = _webexCore.WebexPlugin.extend({
65
74
  * @returns {{isPromoted: boolean, isDemoted: boolean}} Role transition states
66
75
  */
67
76
  updateRoleChanged: function updateRoleChanged(payload) {
68
- var isPromoted = (0, _lodash.get)(payload, 'oldRoles', []).includes(_constants.SELF_ROLES.ATTENDEE) && (0, _lodash.get)(payload, 'newRoles', []).includes(_constants.SELF_ROLES.PANELIST);
69
- var isDemoted = (0, _lodash.get)(payload, 'oldRoles', []).includes(_constants.SELF_ROLES.PANELIST) && (0, _lodash.get)(payload, 'newRoles', []).includes(_constants.SELF_ROLES.ATTENDEE);
70
- this.set('selfIsPanelist', (0, _lodash.get)(payload, 'newRoles', []).includes(_constants.SELF_ROLES.PANELIST));
71
- this.set('selfIsAttendee', (0, _lodash.get)(payload, 'newRoles', []).includes(_constants.SELF_ROLES.ATTENDEE));
72
- this.updateCanManageWebcast((0, _lodash.get)(payload, 'newRoles', []).includes(_constants.SELF_ROLES.MODERATOR));
77
+ var oldRoles = (0, _lodash.get)(payload, 'oldRoles', []);
78
+ var newRoles = (0, _lodash.get)(payload, 'newRoles', []);
79
+ var isPromoted = oldRoles.includes(_constants.SELF_ROLES.ATTENDEE) && newRoles.includes(_constants.SELF_ROLES.PANELIST);
80
+ var isDemoted = oldRoles.includes(_constants.SELF_ROLES.PANELIST) && newRoles.includes(_constants.SELF_ROLES.ATTENDEE) || !oldRoles.includes(_constants.SELF_ROLES.ATTENDEE) && newRoles.includes(_constants.SELF_ROLES.ATTENDEE); // for attendee just join meeting case
81
+ this.set('selfIsPanelist', newRoles.includes(_constants.SELF_ROLES.PANELIST));
82
+ this.set('selfIsAttendee', newRoles.includes(_constants.SELF_ROLES.ATTENDEE));
83
+ this.updateCanManageWebcast(newRoles.includes(_constants.SELF_ROLES.MODERATOR));
84
+ this.updateStatusByRole({
85
+ isPromoted: isPromoted,
86
+ isDemoted: isDemoted
87
+ });
73
88
  return {
74
89
  isPromoted: isPromoted,
75
90
  isDemoted: isDemoted
76
91
  };
77
92
  },
78
- version: "3.7.0-next.4"
93
+ /**
94
+ * should join practice session data channel or not
95
+ * @param {Object} {isPromoted: boolean, isDemoted: boolean}} Role transition states
96
+ * @returns {void}
97
+ */
98
+ updateStatusByRole: function updateStatusByRole(_ref) {
99
+ var isPromoted = _ref.isPromoted,
100
+ isDemoted = _ref.isDemoted;
101
+ var meeting = this.webex.meetings.getMeetingByType(_constants._ID_, this.meetingId);
102
+ if (isDemoted && (meeting === null || meeting === void 0 ? void 0 : meeting.shareStatus) === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE || isPromoted) {
103
+ var _meeting$locusInfo, _meeting$locusInfo2;
104
+ // attendees in webinar should subscribe streaming for whiteboard sharing
105
+ // while panelist still need subscribe native mode so trigger force update here
106
+ meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.updateMediaShares(meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : _meeting$locusInfo2.mediaShares, true);
107
+ }
108
+ if (this.practiceSessionEnabled) {
109
+ // may need change data channel in practice session
110
+ meeting === null || meeting === void 0 ? void 0 : meeting.updateLLMConnection();
111
+ }
112
+ },
113
+ /**
114
+ * should join practice session data channel or not
115
+ * @returns {boolean}
116
+ */
117
+ isJoinPracticeSessionDataChannel: function isJoinPracticeSessionDataChannel() {
118
+ return this.selfIsPanelist && this.practiceSessionEnabled;
119
+ },
120
+ /**
121
+ * start or stop practice session for webinar
122
+ * @param {boolean} enabled
123
+ * @returns {Promise}
124
+ */
125
+ setPracticeSessionState: function setPracticeSessionState(enabled) {
126
+ return this.request({
127
+ method: _constants.HTTP_VERBS.PATCH,
128
+ uri: "".concat(this.locusUrl, "/controls"),
129
+ body: {
130
+ practiceSession: {
131
+ enabled: enabled
132
+ }
133
+ }
134
+ }).catch(function (error) {
135
+ _loggerProxy.default.logger.error('Meeting:webinar#setPracticeSessionState failed', error);
136
+ throw error;
137
+ });
138
+ },
139
+ /**
140
+ * update practice session status
141
+ * @param {object} payload
142
+ * @returns {void}
143
+ */
144
+ updatePracticeSessionStatus: function updatePracticeSessionStatus(payload) {
145
+ this.set('practiceSessionEnabled', payload.enabled);
146
+ },
147
+ /**
148
+ * start webcast mode for webinar
149
+ * @param {object} meeting
150
+ * @param {object} layout
151
+ * @returns {Promise}
152
+ */
153
+ startWebcast: function startWebcast(meeting, layout) {
154
+ var _this = this;
155
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
156
+ return _regenerator.default.wrap(function _callee$(_context) {
157
+ while (1) switch (_context.prev = _context.next) {
158
+ case 0:
159
+ if (meeting) {
160
+ _context.next = 3;
161
+ break;
162
+ }
163
+ _loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
164
+ throw new Error('Meeting parameter does not meet expectations');
165
+ case 3:
166
+ _context.t0 = _this;
167
+ _context.t1 = _constants.HTTP_VERBS.PUT;
168
+ _context.t2 = "".concat(_this.webcastInstanceUrl, "/streaming");
169
+ _context.t3 = _defineProperty2.default;
170
+ _context.next = 9;
171
+ return _this.webex.credentials.getUserToken();
172
+ case 9:
173
+ _context.t4 = _context.sent;
174
+ _context.t5 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
175
+ _context.t6 = {
176
+ authorization: _context.t4,
177
+ trackingId: _context.t5
178
+ };
179
+ _context.t7 = _constants.HEADERS.CONTENT_TYPE;
180
+ _context.t8 = _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON;
181
+ _context.t9 = (0, _context.t3)(_context.t6, _context.t7, _context.t8);
182
+ _context.t10 = {
183
+ action: 'start',
184
+ meetingInfo: {
185
+ locusId: meeting.locusId,
186
+ correlationId: meeting.correlationId
187
+ },
188
+ layout: layout
189
+ };
190
+ _context.t11 = {
191
+ method: _context.t1,
192
+ uri: _context.t2,
193
+ headers: _context.t9,
194
+ body: _context.t10
195
+ };
196
+ return _context.abrupt("return", _context.t0.request.call(_context.t0, _context.t11).catch(function (error) {
197
+ _loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
198
+ throw error;
199
+ }));
200
+ case 18:
201
+ case "end":
202
+ return _context.stop();
203
+ }
204
+ }, _callee);
205
+ }))();
206
+ },
207
+ /**
208
+ * stop webcast mode for webinar
209
+ * @returns {Promise}
210
+ */
211
+ stopWebcast: function stopWebcast() {
212
+ var _this2 = this;
213
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
214
+ return _regenerator.default.wrap(function _callee2$(_context2) {
215
+ while (1) switch (_context2.prev = _context2.next) {
216
+ case 0:
217
+ _context2.t0 = _this2;
218
+ _context2.t1 = _constants.HTTP_VERBS.PUT;
219
+ _context2.t2 = "".concat(_this2.webcastInstanceUrl, "/streaming");
220
+ _context2.t3 = _defineProperty2.default;
221
+ _context2.next = 6;
222
+ return _this2.webex.credentials.getUserToken();
223
+ case 6:
224
+ _context2.t4 = _context2.sent;
225
+ _context2.t5 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
226
+ _context2.t6 = {
227
+ authorization: _context2.t4,
228
+ trackingId: _context2.t5
229
+ };
230
+ _context2.t7 = _constants.HEADERS.CONTENT_TYPE;
231
+ _context2.t8 = _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON;
232
+ _context2.t9 = (0, _context2.t3)(_context2.t6, _context2.t7, _context2.t8);
233
+ _context2.t10 = {
234
+ action: 'stop'
235
+ };
236
+ _context2.t11 = {
237
+ method: _context2.t1,
238
+ uri: _context2.t2,
239
+ headers: _context2.t9,
240
+ body: _context2.t10
241
+ };
242
+ return _context2.abrupt("return", _context2.t0.request.call(_context2.t0, _context2.t11).catch(function (error) {
243
+ _loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
244
+ throw error;
245
+ }));
246
+ case 15:
247
+ case "end":
248
+ return _context2.stop();
249
+ }
250
+ }, _callee2);
251
+ }))();
252
+ },
253
+ /**
254
+ * query webcast layout for webinar
255
+ * @returns {Promise}
256
+ */
257
+ queryWebcastLayout: function queryWebcastLayout() {
258
+ var _this3 = this;
259
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
260
+ return _regenerator.default.wrap(function _callee3$(_context3) {
261
+ while (1) switch (_context3.prev = _context3.next) {
262
+ case 0:
263
+ _context3.t0 = _this3;
264
+ _context3.t1 = _constants.HTTP_VERBS.GET;
265
+ _context3.t2 = "".concat(_this3.webcastInstanceUrl, "/layout");
266
+ _context3.next = 5;
267
+ return _this3.webex.credentials.getUserToken();
268
+ case 5:
269
+ _context3.t3 = _context3.sent;
270
+ _context3.t4 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
271
+ _context3.t5 = {
272
+ authorization: _context3.t3,
273
+ trackingId: _context3.t4
274
+ };
275
+ _context3.t6 = {
276
+ method: _context3.t1,
277
+ uri: _context3.t2,
278
+ headers: _context3.t5
279
+ };
280
+ return _context3.abrupt("return", _context3.t0.request.call(_context3.t0, _context3.t6).catch(function (error) {
281
+ _loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
282
+ throw error;
283
+ }));
284
+ case 10:
285
+ case "end":
286
+ return _context3.stop();
287
+ }
288
+ }, _callee3);
289
+ }))();
290
+ },
291
+ /**
292
+ * update webcast layout for webinar
293
+ * @param {object} layout
294
+ * @returns {Promise}
295
+ */
296
+ updateWebcastLayout: function updateWebcastLayout(layout) {
297
+ var _this4 = this;
298
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
299
+ return _regenerator.default.wrap(function _callee4$(_context4) {
300
+ while (1) switch (_context4.prev = _context4.next) {
301
+ case 0:
302
+ _context4.t0 = _this4;
303
+ _context4.t1 = _constants.HTTP_VERBS.PUT;
304
+ _context4.t2 = "".concat(_this4.webcastInstanceUrl, "/layout");
305
+ _context4.t3 = _defineProperty2.default;
306
+ _context4.next = 6;
307
+ return _this4.webex.credentials.getUserToken();
308
+ case 6:
309
+ _context4.t4 = _context4.sent;
310
+ _context4.t5 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
311
+ _context4.t6 = {
312
+ authorization: _context4.t4,
313
+ trackingId: _context4.t5
314
+ };
315
+ _context4.t7 = _constants.HEADERS.CONTENT_TYPE;
316
+ _context4.t8 = _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON;
317
+ _context4.t9 = (0, _context4.t3)(_context4.t6, _context4.t7, _context4.t8);
318
+ _context4.t10 = {
319
+ videoLayout: layout.videoLayout,
320
+ contentLayout: layout.contentLayout,
321
+ syncStageLayout: layout.syncStageLayout,
322
+ syncStageInMeeting: layout.syncStageInMeeting
323
+ };
324
+ _context4.t11 = {
325
+ method: _context4.t1,
326
+ uri: _context4.t2,
327
+ headers: _context4.t9,
328
+ body: _context4.t10
329
+ };
330
+ return _context4.abrupt("return", _context4.t0.request.call(_context4.t0, _context4.t11).catch(function (error) {
331
+ _loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
332
+ throw error;
333
+ }));
334
+ case 15:
335
+ case "end":
336
+ return _context4.stop();
337
+ }
338
+ }, _callee4);
339
+ }))();
340
+ },
341
+ /**
342
+ * view all webcast attendees
343
+ * @param {string} queryString
344
+ * @returns {Promise}
345
+ */
346
+ viewAllWebcastAttendees: function viewAllWebcastAttendees() {
347
+ var _this5 = this;
348
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
349
+ return _regenerator.default.wrap(function _callee5$(_context5) {
350
+ while (1) switch (_context5.prev = _context5.next) {
351
+ case 0:
352
+ _context5.t0 = _this5;
353
+ _context5.t1 = _constants.HTTP_VERBS.GET;
354
+ _context5.t2 = "".concat(_this5.webcastInstanceUrl, "/attendees");
355
+ _context5.next = 5;
356
+ return _this5.webex.credentials.getUserToken();
357
+ case 5:
358
+ _context5.t3 = _context5.sent;
359
+ _context5.t4 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
360
+ _context5.t5 = {
361
+ authorization: _context5.t3,
362
+ trackingId: _context5.t4
363
+ };
364
+ _context5.t6 = {
365
+ method: _context5.t1,
366
+ uri: _context5.t2,
367
+ headers: _context5.t5
368
+ };
369
+ return _context5.abrupt("return", _context5.t0.request.call(_context5.t0, _context5.t6).catch(function (error) {
370
+ _loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
371
+ throw error;
372
+ }));
373
+ case 10:
374
+ case "end":
375
+ return _context5.stop();
376
+ }
377
+ }, _callee5);
378
+ }))();
379
+ },
380
+ /**
381
+ * search webcast attendees by query string
382
+ * @param {string} queryString
383
+ * @returns {Promise}
384
+ */
385
+ searchWebcastAttendees: function searchWebcastAttendees() {
386
+ var _arguments = arguments,
387
+ _this6 = this;
388
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
389
+ var queryString;
390
+ return _regenerator.default.wrap(function _callee6$(_context6) {
391
+ while (1) switch (_context6.prev = _context6.next) {
392
+ case 0:
393
+ queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
394
+ _context6.t0 = _this6;
395
+ _context6.t1 = _constants.HTTP_VERBS.GET;
396
+ _context6.t2 = "".concat(_this6.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
397
+ _context6.next = 6;
398
+ return _this6.webex.credentials.getUserToken();
399
+ case 6:
400
+ _context6.t3 = _context6.sent;
401
+ _context6.t4 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
402
+ _context6.t5 = {
403
+ authorization: _context6.t3,
404
+ trackingId: _context6.t4
405
+ };
406
+ _context6.t6 = {
407
+ method: _context6.t1,
408
+ uri: _context6.t2,
409
+ headers: _context6.t5
410
+ };
411
+ return _context6.abrupt("return", _context6.t0.request.call(_context6.t0, _context6.t6).catch(function (error) {
412
+ _loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
413
+ throw error;
414
+ }));
415
+ case 11:
416
+ case "end":
417
+ return _context6.stop();
418
+ }
419
+ }, _callee6);
420
+ }))();
421
+ },
422
+ /**
423
+ * expel webcast attendee by participantId
424
+ * @param {string} participantId
425
+ * @returns {Promise}
426
+ */
427
+ expelWebcastAttendee: function expelWebcastAttendee(participantId) {
428
+ var _this7 = this;
429
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
430
+ return _regenerator.default.wrap(function _callee7$(_context7) {
431
+ while (1) switch (_context7.prev = _context7.next) {
432
+ case 0:
433
+ _context7.t0 = _this7;
434
+ _context7.t1 = _constants.HTTP_VERBS.DELETE;
435
+ _context7.t2 = "".concat(_this7.webcastInstanceUrl, "/attendees/").concat(participantId);
436
+ _context7.next = 5;
437
+ return _this7.webex.credentials.getUserToken();
438
+ case 5:
439
+ _context7.t3 = _context7.sent;
440
+ _context7.t4 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
441
+ _context7.t5 = {
442
+ authorization: _context7.t3,
443
+ trackingId: _context7.t4
444
+ };
445
+ _context7.t6 = {
446
+ method: _context7.t1,
447
+ uri: _context7.t2,
448
+ headers: _context7.t5
449
+ };
450
+ return _context7.abrupt("return", _context7.t0.request.call(_context7.t0, _context7.t6).catch(function (error) {
451
+ _loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
452
+ throw error;
453
+ }));
454
+ case 10:
455
+ case "end":
456
+ return _context7.stop();
457
+ }
458
+ }, _callee7);
459
+ }))();
460
+ },
461
+ version: "3.7.0-next.41"
79
462
  });
80
463
  var _default = exports.default = Webinar;
81
464
  //# sourceMappingURL=index.js.map