@webex/plugin-meetings 1.158.0 → 1.159.0
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.
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +165 -38
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +65 -15
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +16 -6
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +17 -0
- package/dist/meetings/util.js.map +1 -1
- package/package.json +6 -5
- package/src/config.js +2 -1
- package/src/meeting-info/meeting-info-v2.js +82 -3
- package/src/meetings/index.js +43 -0
- package/src/meetings/request.js +15 -6
- package/src/meetings/util.js +19 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +99 -2
- package/test/unit/spec/meetings/index.js +62 -17
- package/test/unit/spec/meetings/utils.js +18 -0
package/dist/config.js
CHANGED
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["config.js"],"names":["meetings","deviceType","WEB","mediaSettings","sendAudio","sendVideo","receiveAudio","receiveVideo","pstn","sendShare","receiveShare","reconnection","enabled","autoRejoin","detection","iceReconnectionTimeout","maxRejoinAttempts","stats","enableStatsAnalyzer","autoDowngradeEnabled","interval","analyzerInterval","historyMax","videoPacketLossRatioThreshold","rttThreshold","jitterThreshold","metrics","clientName","clientType","subClientType","mqaMetricsInterval","autoSendMQA","logging","enable","verboseEvents","resolution","maxWidth","maxHeight","idealWidth","idealHeight","screenResolution","bandwidth","audio","video","startBitrate","screenFrameRate","videoShareFrameRate","aspectRatio","autoUploadLogs","enableRtx","receiveTranscription","enableExtmap","experimental","enableMediaNegotiatedEvent","enableUnifiedMeetings"],"mappings":";;;;;;;;;;AAAA;;eAIe;AACb;AACA;AACA;AACAA,EAAAA,QAAQ,EAAE;AACRC,IAAAA,UAAU,EAAEA,mBAAWC,G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,EAAE,GAFD;AAGVC,MAAAA,UAAU,EAAE,IAHF;AAIVC,MAAAA,WAAW,EAAE;AAJH,KAtDJ;AA4DRC,IAAAA,gBAAgB,EAAE;AAChBJ,MAAAA,QAAQ,EAAE,IADM;AAEhBC,MAAAA,SAAS,EAAE,IAFK;AAGhBC,MAAAA,UAAU,EAAE,IAHI;AAIhBC,MAAAA,WAAW,EAAE;AAJG,KA5DV;AAkERE,IAAAA,SAAS,EAAE;AACT;AACA;AACAC,MAAAA,KAAK,EAAE,KAHE;AAITC,MAAAA,KAAK,EAAE,OAJE;AAKTC,MAAAA,YAAY,EAAE;AALL,KAlEH;AAyERC,IAAAA,eAAe,EAAE,EAzET;AA0ERC,IAAAA,mBAAmB,EAAE,EA1Eb;AA2ERC,IAAAA,WAAW,EAAE,kBA3EL;AA4ER;AACAC,IAAAA,cAAc,EAAE,IA7ER;AA8ERC,IAAAA,SAAS,EAAE,IA9EH;AA+ERC,IAAAA,oBAAoB,EAAE,KA/Ed;AAgFRC,IAAAA,YAAY,EAAE,KAhFN;AAiFRC,IAAAA,YAAY,EAAE;AACZC,MAAAA,0BAA0B,EAAE,KADhB;AAEZC,MAAAA,qBAAqB,EAAE;
|
|
1
|
+
{"version":3,"sources":["config.js"],"names":["meetings","deviceType","WEB","mediaSettings","sendAudio","sendVideo","receiveAudio","receiveVideo","pstn","sendShare","receiveShare","reconnection","enabled","autoRejoin","detection","iceReconnectionTimeout","maxRejoinAttempts","stats","enableStatsAnalyzer","autoDowngradeEnabled","interval","analyzerInterval","historyMax","videoPacketLossRatioThreshold","rttThreshold","jitterThreshold","metrics","clientName","clientType","subClientType","mqaMetricsInterval","autoSendMQA","logging","enable","verboseEvents","resolution","maxWidth","maxHeight","idealWidth","idealHeight","screenResolution","bandwidth","audio","video","startBitrate","screenFrameRate","videoShareFrameRate","aspectRatio","autoUploadLogs","enableRtx","receiveTranscription","enableExtmap","experimental","enableMediaNegotiatedEvent","enableUnifiedMeetings","enableAdhocMeetings"],"mapp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,aAAa,EAAE;AAFR,KAlDD;AAsDRC,IAAAA,UAAU,EAAE;AACVC,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,SAAS,EAAE,GAFD;AAGVC,MAAAA,UAAU,EAAE,IAHF;AAIVC,MAAAA,WAAW,EAAE;AAJH,KAtDJ;AA4DRC,IAAAA,gBAAgB,EAAE;AAChBJ,MAAAA,QAAQ,EAAE,IADM;AAEhBC,MAAAA,SAAS,EAAE,IAFK;AAGhBC,MAAAA,UAAU,EAAE,IAHI;AAIhBC,MAAAA,WAAW,EAAE;AAJG,KA5DV;AAkERE,IAAAA,SAAS,EAAE;AACT;AACA;AACAC,MAAAA,KAAK,EAAE,KAHE;AAITC,MAAAA,KAAK,EAAE,OAJE;AAKTC,MAAAA,YAAY,EAAE;AALL,KAlEH;AAyERC,IAAAA,eAAe,EAAE,EAzET;AA0ERC,IAAAA,mBAAmB,EAAE,EA1Eb;AA2ERC,IAAAA,WAAW,EAAE,kBA3EL;AA4ER;AACAC,IAAAA,cAAc,EAAE,IA7ER;AA8ERC,IAAAA,SAAS,EAAE,IA9EH;AA+ERC,IAAAA,oBAAoB,EAAE,KA/Ed;AAgFRC,IAAAA,YAAY,EAAE,KAhFN;AAiFRC,IAAAA,YAAY,EAAE;AACZC,MAAAA,0BAA0B,EAAE,KADhB;AAEZC,MAAAA,qBAAqB,EAAE,KAFX;AAGZC,MAAAA,mBAAmB,EAAE;AAHT;AAjFN;AAJG,C","sourcesContent":["import {\n deviceType\n} from '@webex/common';\n\nexport default {\n // TODO: this needs to be defaulted\n // to JS_SDK and clients set it to WEB or others\n // see https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-73167\n meetings: {\n deviceType: deviceType.WEB,\n mediaSettings: {\n sendAudio: true,\n sendVideo: true,\n receiveAudio: true,\n receiveVideo: true,\n pstn: false,\n sendShare: false,\n receiveShare: false\n },\n reconnection: {\n enabled: false,\n autoRejoin: true,\n detection: true,\n // Timeout duration to wait for ICE to reconnect if a disconnect is received.\n iceReconnectionTimeout: 10000,\n // Amount of times attempting to rejoin a meeting during reconnect\n maxRejoinAttempts: 3\n },\n stats: {\n // Enable the webrtc stats analyzer that emits quality degradation events\n enableStatsAnalyzer: true,\n // Enable the auto downgrade video quality feature\n autoDowngradeEnabled: false,\n // 1 second intervals to collect stats data\n interval: 1000,\n // we just want to analyze data every 5 sec interval\n analyzerInterval: 5000,\n // hold the last 2 minute of a calls data\n historyMax: 120,\n // Once packet loss hits this ratio, the video will downgrade\n videoPacketLossRatioThreshold: 9, // comparison of packets lost / packets received\n rttThreshold: 500, // 500 ms noticeable quality lag begins based on bandwidth of user\n jitterThreshold: 500 // 500 ms noticeable quality lag begins based on bandwidth of user\n },\n metrics: {\n // change to your client name else data will be muddled\n // you do not need a specific format, and you do not need to register it\n clientName: 'WEBEX_JS_SDK',\n // TODO: for now this line has to be whitelisted, which is problematic for third party\n clientType: 'WEBEX_SDK',\n // Stores the sub client type used when sending metrics\n subClientType: 'WEB_APP',\n // send average values MQA in 60 second intervals\n mqaMetricsInterval: 60000,\n // send to cisco internal MQA data automatically\n // we already send CA\n autoSendMQA: true\n },\n logging: {\n enable: true,\n verboseEvents: true\n },\n resolution: {\n maxWidth: 1280,\n maxHeight: 720,\n idealWidth: 1280,\n idealHeight: 720\n },\n screenResolution: {\n maxWidth: 1920,\n maxHeight: 1080,\n idealWidth: 1920,\n idealHeight: 1080\n },\n bandwidth: {\n // please note, these are the maximum bandwidth values\n // the server supports, minimums have to be tested\n audio: 64000,\n video: 4000000,\n startBitrate: 2000\n },\n screenFrameRate: 10,\n videoShareFrameRate: 30,\n aspectRatio: 1.7695852534562213,\n // When enabled, as calls are ended, it will upload the SDK logs and correlate them\n autoUploadLogs: true,\n enableRtx: true,\n receiveTranscription: false,\n enableExtmap: false,\n experimental: {\n enableMediaNegotiatedEvent: false,\n enableUnifiedMeetings: false,\n enableAdhocMeetings: false\n }\n }\n};\n"]}
|
|
@@ -20,7 +20,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
exports.default = exports.MeetingInfoV2CaptchaError = exports.MeetingInfoV2PasswordError = void 0;
|
|
23
|
+
exports.default = exports.MeetingInfoV2CaptchaError = exports.MeetingInfoV2AdhocMeetingError = exports.MeetingInfoV2PasswordError = void 0;
|
|
24
24
|
|
|
25
25
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
26
26
|
|
|
@@ -54,6 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
54
54
|
|
|
55
55
|
var PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';
|
|
56
56
|
var CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';
|
|
57
|
+
var ADHOC_MEETING_DEFAULT_ERROR = 'Failed starting the adhoc meeting, Please contact support team ';
|
|
57
58
|
/**
|
|
58
59
|
* Error to indicate that wbxappapi requires a password
|
|
59
60
|
*/
|
|
@@ -87,39 +88,72 @@ var MeetingInfoV2PasswordError = /*#__PURE__*/function (_Error) {
|
|
|
87
88
|
return MeetingInfoV2PasswordError;
|
|
88
89
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
89
90
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
* Error generating a adhoc space meeting
|
|
92
|
+
*/
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
exports.MeetingInfoV2PasswordError = MeetingInfoV2PasswordError;
|
|
95
96
|
|
|
96
|
-
var
|
|
97
|
-
(0, _inherits2.default)(
|
|
97
|
+
var MeetingInfoV2AdhocMeetingError = /*#__PURE__*/function (_Error2) {
|
|
98
|
+
(0, _inherits2.default)(MeetingInfoV2AdhocMeetingError, _Error2);
|
|
98
99
|
|
|
99
|
-
var _super2 = _createSuper(
|
|
100
|
+
var _super2 = _createSuper(MeetingInfoV2AdhocMeetingError);
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
*
|
|
103
104
|
* @constructor
|
|
104
105
|
* @param {Number} [wbxAppApiErrorCode]
|
|
105
|
-
* @param {Object} [captchaInfo]
|
|
106
106
|
* @param {String} [message]
|
|
107
107
|
*/
|
|
108
|
-
function
|
|
108
|
+
function MeetingInfoV2AdhocMeetingError(wbxAppApiErrorCode) {
|
|
109
109
|
var _this2;
|
|
110
110
|
|
|
111
|
-
var message = arguments.length >
|
|
112
|
-
(0, _classCallCheck2.default)(this,
|
|
111
|
+
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ADHOC_MEETING_DEFAULT_ERROR;
|
|
112
|
+
(0, _classCallCheck2.default)(this, MeetingInfoV2AdhocMeetingError);
|
|
113
113
|
_this2 = _super2.call(this, "".concat(message, ", code=").concat(wbxAppApiErrorCode));
|
|
114
|
-
_this2.name = '
|
|
114
|
+
_this2.name = 'MeetingInfoV2AdhocMeetingError';
|
|
115
115
|
_this2.sdkMessage = message;
|
|
116
116
|
_this2.stack = new Error().stack;
|
|
117
117
|
_this2.wbxAppApiCode = wbxAppApiErrorCode;
|
|
118
|
-
_this2.isPasswordRequired = wbxAppApiErrorCode === 423005;
|
|
119
|
-
_this2.captchaInfo = captchaInfo;
|
|
120
118
|
return _this2;
|
|
121
119
|
}
|
|
122
120
|
|
|
121
|
+
return MeetingInfoV2AdhocMeetingError;
|
|
122
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
123
|
+
/**
|
|
124
|
+
* Error to indicate that preferred webex site not present to start adhoc meeting
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
exports.MeetingInfoV2AdhocMeetingError = MeetingInfoV2AdhocMeetingError;
|
|
129
|
+
|
|
130
|
+
var MeetingInfoV2CaptchaError = /*#__PURE__*/function (_Error3) {
|
|
131
|
+
(0, _inherits2.default)(MeetingInfoV2CaptchaError, _Error3);
|
|
132
|
+
|
|
133
|
+
var _super3 = _createSuper(MeetingInfoV2CaptchaError);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @constructor
|
|
138
|
+
* @param {Number} [wbxAppApiErrorCode]
|
|
139
|
+
* @param {Object} [captchaInfo]
|
|
140
|
+
* @param {String} [message]
|
|
141
|
+
*/
|
|
142
|
+
function MeetingInfoV2CaptchaError(wbxAppApiErrorCode, captchaInfo) {
|
|
143
|
+
var _this3;
|
|
144
|
+
|
|
145
|
+
var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : CAPTCHA_ERROR_DEFAULT_MESSAGE;
|
|
146
|
+
(0, _classCallCheck2.default)(this, MeetingInfoV2CaptchaError);
|
|
147
|
+
_this3 = _super3.call(this, "".concat(message, ", code=").concat(wbxAppApiErrorCode));
|
|
148
|
+
_this3.name = 'MeetingInfoV2PasswordError';
|
|
149
|
+
_this3.sdkMessage = message;
|
|
150
|
+
_this3.stack = new Error().stack;
|
|
151
|
+
_this3.wbxAppApiCode = wbxAppApiErrorCode;
|
|
152
|
+
_this3.isPasswordRequired = wbxAppApiErrorCode === 423005;
|
|
153
|
+
_this3.captchaInfo = captchaInfo;
|
|
154
|
+
return _this3;
|
|
155
|
+
}
|
|
156
|
+
|
|
123
157
|
return MeetingInfoV2CaptchaError;
|
|
124
158
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
125
159
|
/**
|
|
@@ -142,7 +176,7 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
142
176
|
* converts hydra id into conversation url and persons Id
|
|
143
177
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
144
178
|
* @param {String} [type] to match up with the destination value
|
|
145
|
-
* @returns {Promise}
|
|
179
|
+
* @returns {Promise} destination and type
|
|
146
180
|
* @public
|
|
147
181
|
* @memberof MeetingInfo
|
|
148
182
|
*/
|
|
@@ -158,6 +192,90 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
158
192
|
webex: this.webex
|
|
159
193
|
});
|
|
160
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Creates adhoc space meetings for a space by fetching the conversation infomation
|
|
197
|
+
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
|
198
|
+
* @returns {Promise} returns a meeting info object
|
|
199
|
+
* @public
|
|
200
|
+
* @memberof MeetingInfo
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
}, {
|
|
204
|
+
key: "createAdhocSpaceMeeting",
|
|
205
|
+
value: function () {
|
|
206
|
+
var _createAdhocSpaceMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(conversationUrl) {
|
|
207
|
+
var _this4 = this;
|
|
208
|
+
|
|
209
|
+
var getInvitees;
|
|
210
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
211
|
+
while (1) {
|
|
212
|
+
switch (_context.prev = _context.next) {
|
|
213
|
+
case 0:
|
|
214
|
+
if (this.webex.meetings.preferredWebexSite) {
|
|
215
|
+
_context.next = 2;
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
throw Error('No preferred webex site found');
|
|
220
|
+
|
|
221
|
+
case 2:
|
|
222
|
+
getInvitees = function getInvitees() {
|
|
223
|
+
var particpants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
224
|
+
var invitees = [];
|
|
225
|
+
|
|
226
|
+
if (particpants) {
|
|
227
|
+
particpants.forEach(function (participant) {
|
|
228
|
+
invitees.push({
|
|
229
|
+
email: participant.emailAddress,
|
|
230
|
+
ciUserUuid: participant.entryUUID
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return invitees;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
return _context.abrupt("return", this.webex.internal.conversation.get({
|
|
239
|
+
url: conversationUrl
|
|
240
|
+
}, {
|
|
241
|
+
includeParticipants: true,
|
|
242
|
+
disableTransform: true
|
|
243
|
+
}).then(function (conversation) {
|
|
244
|
+
var _conversation$partici;
|
|
245
|
+
|
|
246
|
+
var body = {
|
|
247
|
+
title: conversation.displayName,
|
|
248
|
+
spaceUrl: conversation.url,
|
|
249
|
+
keyUrl: conversation.encryptionKeyUrl,
|
|
250
|
+
kroUrl: conversation.kmsResourceObjectUrl,
|
|
251
|
+
invitees: getInvitees((_conversation$partici = conversation.participants) === null || _conversation$partici === void 0 ? void 0 : _conversation$partici.items)
|
|
252
|
+
};
|
|
253
|
+
var uri = _this4.webex.meetings.preferredWebexSite ? "https://".concat(_this4.webex.meetings.preferredWebexSite, "/wbxappapi/v2/meetings/spaceInstant") : '';
|
|
254
|
+
return _this4.webex.request({
|
|
255
|
+
method: _constants.HTTP_VERBS.POST,
|
|
256
|
+
uri: uri,
|
|
257
|
+
body: body
|
|
258
|
+
}).catch(function (err) {
|
|
259
|
+
var _err$body, _err$body2;
|
|
260
|
+
|
|
261
|
+
throw new MeetingInfoV2AdhocMeetingError((_err$body = err.body) === null || _err$body === void 0 ? void 0 : _err$body.code, (_err$body2 = err.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.message);
|
|
262
|
+
});
|
|
263
|
+
}));
|
|
264
|
+
|
|
265
|
+
case 4:
|
|
266
|
+
case "end":
|
|
267
|
+
return _context.stop();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}, _callee, this);
|
|
271
|
+
}));
|
|
272
|
+
|
|
273
|
+
function createAdhocSpaceMeeting(_x) {
|
|
274
|
+
return _createAdhocSpaceMeeting.apply(this, arguments);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return createAdhocSpaceMeeting;
|
|
278
|
+
}()
|
|
161
279
|
/**
|
|
162
280
|
* Fetches meeting info from the server
|
|
163
281
|
* @param {String} destination one of many different types of destinations to look up info for
|
|
@@ -174,7 +292,7 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
174
292
|
}, {
|
|
175
293
|
key: "fetchMeetingInfo",
|
|
176
294
|
value: function () {
|
|
177
|
-
var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
295
|
+
var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(destination) {
|
|
178
296
|
var type,
|
|
179
297
|
password,
|
|
180
298
|
captchaInfo,
|
|
@@ -182,15 +300,15 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
182
300
|
body,
|
|
183
301
|
options,
|
|
184
302
|
directURI,
|
|
185
|
-
|
|
186
|
-
return _regenerator.default.wrap(function
|
|
303
|
+
_args2 = arguments;
|
|
304
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
187
305
|
while (1) {
|
|
188
|
-
switch (
|
|
306
|
+
switch (_context2.prev = _context2.next) {
|
|
189
307
|
case 0:
|
|
190
|
-
type =
|
|
191
|
-
password =
|
|
192
|
-
captchaInfo =
|
|
193
|
-
|
|
308
|
+
type = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
|
|
309
|
+
password = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : null;
|
|
310
|
+
captchaInfo = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : null;
|
|
311
|
+
_context2.next = 5;
|
|
194
312
|
return _utilv.default.getDestinationType({
|
|
195
313
|
destination: destination,
|
|
196
314
|
type: type,
|
|
@@ -198,38 +316,47 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
198
316
|
});
|
|
199
317
|
|
|
200
318
|
case 5:
|
|
201
|
-
destinationType =
|
|
202
|
-
|
|
319
|
+
destinationType = _context2.sent;
|
|
320
|
+
|
|
321
|
+
if (!(destinationType.type === _constants._CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings)) {
|
|
322
|
+
_context2.next = 8;
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return _context2.abrupt("return", this.createAdhocSpaceMeeting(destinationType.destination));
|
|
327
|
+
|
|
328
|
+
case 8:
|
|
329
|
+
_context2.next = 10;
|
|
203
330
|
return _utilv.default.getRequestBody(_objectSpread(_objectSpread({}, destinationType), {}, {
|
|
204
331
|
password: password,
|
|
205
332
|
captchaInfo: captchaInfo
|
|
206
333
|
}));
|
|
207
334
|
|
|
208
|
-
case
|
|
209
|
-
body =
|
|
335
|
+
case 10:
|
|
336
|
+
body = _context2.sent;
|
|
210
337
|
options = {
|
|
211
338
|
method: _constants.HTTP_VERBS.POST,
|
|
212
339
|
service: 'webex-appapi-service',
|
|
213
340
|
resource: 'meetingInfo',
|
|
214
341
|
body: body
|
|
215
342
|
};
|
|
216
|
-
|
|
343
|
+
_context2.next = 14;
|
|
217
344
|
return _utilv.default.getDirectMeetingInfoURI(destinationType);
|
|
218
345
|
|
|
219
|
-
case
|
|
220
|
-
directURI =
|
|
346
|
+
case 14:
|
|
347
|
+
directURI = _context2.sent;
|
|
221
348
|
if (directURI) options.directURI = directURI;
|
|
222
|
-
return
|
|
349
|
+
return _context2.abrupt("return", this.webex.request(options).catch(function (err) {
|
|
223
350
|
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 403) {
|
|
224
|
-
var _err$
|
|
351
|
+
var _err$body3, _err$body4, _err$body4$data;
|
|
225
352
|
|
|
226
|
-
throw new MeetingInfoV2PasswordError((_err$
|
|
353
|
+
throw new MeetingInfoV2PasswordError((_err$body3 = err.body) === null || _err$body3 === void 0 ? void 0 : _err$body3.code, (_err$body4 = err.body) === null || _err$body4 === void 0 ? void 0 : (_err$body4$data = _err$body4.data) === null || _err$body4$data === void 0 ? void 0 : _err$body4$data.meetingInfo);
|
|
227
354
|
}
|
|
228
355
|
|
|
229
356
|
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 423) {
|
|
230
|
-
var _err$
|
|
357
|
+
var _err$body5;
|
|
231
358
|
|
|
232
|
-
throw new MeetingInfoV2CaptchaError((_err$
|
|
359
|
+
throw new MeetingInfoV2CaptchaError((_err$body5 = err.body) === null || _err$body5 === void 0 ? void 0 : _err$body5.code, {
|
|
233
360
|
captchaId: err.body.captchaID,
|
|
234
361
|
verificationImageURL: err.body.verificationImageURL,
|
|
235
362
|
verificationAudioURL: err.body.verificationAudioURL,
|
|
@@ -240,15 +367,15 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
240
367
|
throw err;
|
|
241
368
|
}));
|
|
242
369
|
|
|
243
|
-
case
|
|
370
|
+
case 17:
|
|
244
371
|
case "end":
|
|
245
|
-
return
|
|
372
|
+
return _context2.stop();
|
|
246
373
|
}
|
|
247
374
|
}
|
|
248
|
-
},
|
|
375
|
+
}, _callee2, this);
|
|
249
376
|
}));
|
|
250
377
|
|
|
251
|
-
function fetchMeetingInfo(
|
|
378
|
+
function fetchMeetingInfo(_x2) {
|
|
252
379
|
return _fetchMeetingInfo.apply(this, arguments);
|
|
253
380
|
}
|
|
254
381
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["meeting-info-v2.js"],"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","password","destinationType","getRequestBody","body","options","method","HTTP_VERBS","POST","service","resource","getDirectMeetingInfoURI","directURI","request","catch","err","statusCode","code","data","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;;;;;;;;;AAEA,IAAMA,8BAA8B,GAAG,mEAAvC;AACA,IAAMC,6BAA6B,GAAG,qEAAtC;AAEA;AACA;AACA;;IACaC,0B;;;;;AACX;AACF;AACA;AACA;AACA;AACA;AACA;AACE,sCAAYC,kBAAZ,EAAgCC,WA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GAAG,CAACX,IAAnD,kEAA+C,WAAUc,IAAzD,oDAA+C,gBAAgBjC,WAA/D,CAAN;AACD;;AACD,sBAAI,CAAA8B,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEC,UAAL,MAAoB,GAAxB,EAA6B;AAAA;;AAC3B,0BAAM,IAAIxB,yBAAJ,eAA8BuB,GAAG,CAACX,IAAlC,+CAA8B,WAAUa,IAAxC,EAA8C;AAClDE,sBAAAA,SAAS,EAAEJ,GAAG,CAACX,IAAJ,CAASgB,SAD8B;AAElDC,sBAAAA,oBAAoB,EAAEN,GAAG,CAACX,IAAJ,CAASiB,oBAFmB;AAGlDC,sBAAAA,oBAAoB,EAAEP,GAAG,CAACX,IAAJ,CAASkB,oBAHmB;AAIlDC,sBAAAA,UAAU,EAAER,GAAG,CAACX,IAAJ,CAASmB;AAJ6B,qBAA9C,CAAN;AAMD;;AACD,wBAAMR,GAAN;AACD,iBAdI,CAnBT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O","sourcesContent":["\nimport {HTTP_VERBS} from '../constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, meetingInfo, message = PASSWORD_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error to indicate that wbxappapi requires a captcha\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, captchaInfo, message = CAPTCHA_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = wbxAppApiErrorCode === 423005;\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} returns destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination, type = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n const body = await MeetingInfoUtil.getRequestBody({...destinationType, password, captchaInfo});\n\n const options = {\n method: HTTP_VERBS.POST,\n service: 'webex-appapi-service',\n resource: 'meetingInfo',\n body\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) options.directURI = directURI;\n\n return this.webex.request(options)\n .catch((err) => {\n if (err?.statusCode === 403) {\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL\n });\n }\n throw err;\n });\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"sources":["meeting-info-v2.js"],"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","ADHOC_MEETING_DEFAULT_ERROR","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2AdhocMeetingError","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","conversationUrl","meetings","preferredWebexSite","getInvitees","particpants","invitees","forEach","participant","push","email","emailAddress","ciUserUuid","entryUUID","internal","conversation","get","url","includeParticipants","disableTransform","then","body","title","displayName","spaceUrl","keyUrl","encryptionKeyUrl","kroUrl","kmsResourceObjectUrl","participants","items","uri","request","method","HTTP_VERBS","POST","catch","err","code","password","destinationType","_CONVERSATION_URL_","config","experimental","enableAdhocMeetings","createAdhocSpaceMeeting","getRequestBody","options","service","resource","getDirectMeetingInfoURI","directURI","statusCode","data","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;;;;;;;;;AAEA,IAAMA,8BAA8B,GAAG,mEAAvC;AACA,IAAMC,6BAA6B,GAAG,qEAAtC;AACA,IAAMC,2BAA2B,GAAG,iEAApC;AAEA;AACA;AACA;;IACaC,0B;;;;;AACX;AACF;AACA;AACA;AACA;AACA;AACA;AACE,sCAAYC,kBAAZ,EAAgCC,WAAhC,EAAuF;AAAA;;AAAA,QAA1CC,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;AACD;;AACD,sBAAI,CAAAqD,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEe,UAAL,MAAoB,GAAxB,EAA6B;AAAA;;AAC3B,0BAAM,IAAI5D,yBAAJ,eAA8B6C,GAAG,CAAChB,IAAlC,+CAA8B,WAAUiB,IAAxC,EAA8C;AAClDgB,sBAAAA,SAAS,EAAEjB,GAAG,CAAChB,IAAJ,CAASkC,SAD8B;AAElDC,sBAAAA,oBAAoB,EAAEnB,GAAG,CAAChB,IAAJ,CAASmC,oBAFmB;AAGlDC,sBAAAA,oBAAoB,EAAEpB,GAAG,CAAChB,IAAJ,CAASoC,oBAHmB;AAIlDC,sBAAAA,UAAU,EAAErB,GAAG,CAAChB,IAAJ,CAASqC;AAJ6B,qBAA9C,CAAN;AAMD;;AACD,wBAAMrB,GAAN;AACD,iBAdI,CAxBT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O","sourcesContent":["\nimport {HTTP_VERBS, _CONVERSATION_URL_} from '../constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\nconst ADHOC_MEETING_DEFAULT_ERROR = 'Failed starting the adhoc meeting, Please contact support team ';\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, meetingInfo, message = PASSWORD_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error generating a adhoc space meeting\n */\nexport class MeetingInfoV2AdhocMeetingError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, message = ADHOC_MEETING_DEFAULT_ERROR) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2AdhocMeetingError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n }\n}\n\n\n/**\n * Error to indicate that preferred webex site not present to start adhoc meeting\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, captchaInfo, message = CAPTCHA_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = wbxAppApiErrorCode === 423005;\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination, type = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n }\n\n /**\n * Creates adhoc space meetings for a space by fetching the conversation infomation\n * @param {String} conversationUrl conversationUrl to start adhoc meeting on\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async createAdhocSpaceMeeting(conversationUrl) {\n if (!this.webex.meetings.preferredWebexSite) {\n throw Error('No preferred webex site found');\n }\n const getInvitees = (particpants = []) => {\n const invitees = [];\n\n if (particpants) {\n particpants.forEach((participant) => {\n invitees.push({\n email: participant.emailAddress,\n ciUserUuid: participant.entryUUID\n });\n });\n }\n\n return invitees;\n };\n\n return this.webex.internal.conversation.get(\n {url: conversationUrl},\n {includeParticipants: true, disableTransform: true}\n )\n .then((conversation) => {\n const body = {\n title: conversation.displayName,\n spaceUrl: conversation.url,\n keyUrl: conversation.encryptionKeyUrl,\n kroUrl: conversation.kmsResourceObjectUrl,\n invitees: getInvitees(conversation.participants?.items)\n };\n\n const uri = this.webex.meetings.preferredWebexSite ?\n `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant` : '';\n\n return this.webex.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n })\n .catch((err) => {\n throw new MeetingInfoV2AdhocMeetingError(err.body?.code, err.body?.message);\n });\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n\n if (destinationType.type === _CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings) {\n return this.createAdhocSpaceMeeting(destinationType.destination);\n }\n\n const body = await MeetingInfoUtil.getRequestBody({...destinationType, password, captchaInfo});\n\n const options = {\n method: HTTP_VERBS.POST,\n service: 'webex-appapi-service',\n resource: 'meetingInfo',\n body\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) options.directURI = directURI;\n\n return this.webex.request(options)\n .catch((err) => {\n if (err?.statusCode === 403) {\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL\n });\n }\n throw err;\n });\n }\n}\n\n"]}
|
package/dist/meetings/index.js
CHANGED
|
@@ -38,6 +38,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
38
38
|
|
|
39
39
|
require("@webex/internal-plugin-mercury");
|
|
40
40
|
|
|
41
|
+
require("@webex/internal-plugin-conversation");
|
|
42
|
+
|
|
41
43
|
var _webexCore = require("@webex/webex-core");
|
|
42
44
|
|
|
43
45
|
require("webrtc-adapter");
|
|
@@ -217,6 +219,15 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
217
219
|
*/
|
|
218
220
|
|
|
219
221
|
_this.registered = false;
|
|
222
|
+
/**
|
|
223
|
+
* This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}
|
|
224
|
+
* @instance
|
|
225
|
+
* @type {String}
|
|
226
|
+
* @private
|
|
227
|
+
* @memberof Meetings
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
_this.preferredWebexSite = '';
|
|
220
231
|
/**
|
|
221
232
|
* The public interface for the internal Media util files. These are helpful to expose outside the context
|
|
222
233
|
* of a meeting so that a user can access media without creating a meeting instance.
|
|
@@ -473,6 +484,27 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
473
484
|
this.meetingInfo = changeState ? new _meetingInfoV.default(this.webex) : new _meetingInfo.default(this.webex);
|
|
474
485
|
}
|
|
475
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* API to toggle starting adhoc meeting
|
|
489
|
+
* @param {Boolean} changeState
|
|
490
|
+
* @private
|
|
491
|
+
* @memberof Meetings
|
|
492
|
+
* @returns {undefined}
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
}, {
|
|
496
|
+
key: "_toggleAdhocMeetings",
|
|
497
|
+
value: function _toggleAdhocMeetings(changeState) {
|
|
498
|
+
var _this$config2, _this$config2$experim;
|
|
499
|
+
|
|
500
|
+
if (typeof changeState !== 'boolean') {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if (((_this$config2 = this.config) === null || _this$config2 === void 0 ? void 0 : (_this$config2$experim = _this$config2.experimental) === null || _this$config2$experim === void 0 ? void 0 : _this$config2$experim.enableAdhocMeetings) !== changeState) {
|
|
505
|
+
this.config.experimental.enableAdhocMeetings = changeState;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
476
508
|
/**
|
|
477
509
|
* Explicitly sets up the meetings plugin by registering
|
|
478
510
|
* the device, connecting to mercury, and listening for locus events.
|
|
@@ -499,7 +531,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
499
531
|
return _promise.default.resolve();
|
|
500
532
|
}
|
|
501
533
|
|
|
502
|
-
return _promise.default.all([this.getGeoHint(), this.startReachability().catch(function (error) {
|
|
534
|
+
return _promise.default.all([this.fetchUserPreferredWebexSite(), this.getGeoHint(), this.startReachability().catch(function (error) {
|
|
503
535
|
_loggerProxy.default.logger.error("Meetings:index#register --> GDM error, ".concat(error.message));
|
|
504
536
|
}), this.webex.internal.device.register().then(function () {
|
|
505
537
|
return _loggerProxy.default.logger.info("Meetings:index#register --> INFO, Device registered ".concat(_this5.webex.internal.device.url));
|
|
@@ -666,6 +698,24 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
666
698
|
_this8.geoHintInfo = res;
|
|
667
699
|
});
|
|
668
700
|
}
|
|
701
|
+
/**
|
|
702
|
+
* Fetch user preferred webex site information
|
|
703
|
+
* This also has other infomation about the user
|
|
704
|
+
* @returns {Promise}
|
|
705
|
+
* @private
|
|
706
|
+
* @memberof Meetings
|
|
707
|
+
*/
|
|
708
|
+
|
|
709
|
+
}, {
|
|
710
|
+
key: "fetchUserPreferredWebexSite",
|
|
711
|
+
value: function fetchUserPreferredWebexSite() {
|
|
712
|
+
var _this9 = this;
|
|
713
|
+
|
|
714
|
+
return this.request.fetchLoginUserInformation().then(function (res) {
|
|
715
|
+
_this9.preferredWebexSite = _util2.default.parseUserPreferences(res.userPreferences);
|
|
716
|
+
console.error(_this9.preferredWebexSite);
|
|
717
|
+
});
|
|
718
|
+
}
|
|
669
719
|
/**
|
|
670
720
|
* gets the personal meeting room instance, for saved PMR values for this user
|
|
671
721
|
* @returns {PersonalMeetingRoom}
|
|
@@ -714,7 +764,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
714
764
|
}, {
|
|
715
765
|
key: "create",
|
|
716
766
|
value: function create(destination) {
|
|
717
|
-
var
|
|
767
|
+
var _this10 = this;
|
|
718
768
|
|
|
719
769
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
720
770
|
// TODO: type should be from a dictionary
|
|
@@ -733,43 +783,43 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
733
783
|
var meeting = null;
|
|
734
784
|
|
|
735
785
|
if (type === _constants._CONVERSATION_URL_ || options.type === _constants._CONVERSATION_URL_) {
|
|
736
|
-
meeting =
|
|
786
|
+
meeting = _this10.meetingCollection.getByKey(_constants.CONVERSATION_URL, targetDest);
|
|
737
787
|
} // Attempt to collect the meeting if it exists.
|
|
738
788
|
|
|
739
789
|
|
|
740
790
|
if (!meeting) {
|
|
741
|
-
meeting =
|
|
791
|
+
meeting = _this10.meetingCollection.getByKey(_constants.SIP_URI, targetDest);
|
|
742
792
|
} // Validate if a meeting was found.
|
|
743
793
|
|
|
744
794
|
|
|
745
795
|
if (!meeting) {
|
|
746
796
|
// Create a meeting based on the normalized destination and type.
|
|
747
|
-
return
|
|
797
|
+
return _this10.createMeeting(targetDest, type).then(function (createdMeeting) {
|
|
748
798
|
// If the meeting was successfully created.
|
|
749
799
|
if (createdMeeting && createdMeeting.on) {
|
|
750
800
|
// Create a destruction event for the meeting.
|
|
751
801
|
createdMeeting.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
|
|
752
|
-
if (
|
|
802
|
+
if (_this10.config.autoUploadLogs) {
|
|
753
803
|
var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4;
|
|
754
804
|
|
|
755
|
-
|
|
805
|
+
_this10.uploadLogs({
|
|
756
806
|
callStart: (_createdMeeting$locus = createdMeeting.locusInfo) === null || _createdMeeting$locus === void 0 ? void 0 : (_createdMeeting$locus2 = _createdMeeting$locus.fullState) === null || _createdMeeting$locus2 === void 0 ? void 0 : _createdMeeting$locus2.lastActive,
|
|
757
807
|
correlationId: createdMeeting.correlationId,
|
|
758
808
|
feedbackId: createdMeeting.correlationId,
|
|
759
809
|
locusId: createdMeeting.locusId,
|
|
760
810
|
meetingId: (_createdMeeting$locus3 = createdMeeting.locusInfo) === null || _createdMeeting$locus3 === void 0 ? void 0 : (_createdMeeting$locus4 = _createdMeeting$locus3.info) === null || _createdMeeting$locus4 === void 0 ? void 0 : _createdMeeting$locus4.webExMeetingId
|
|
761
811
|
}).then(function () {
|
|
762
|
-
return
|
|
812
|
+
return _this10.destroy(createdMeeting, payload.reason);
|
|
763
813
|
});
|
|
764
814
|
} else {
|
|
765
|
-
|
|
815
|
+
_this10.destroy(createdMeeting, payload.reason);
|
|
766
816
|
}
|
|
767
817
|
});
|
|
768
818
|
createdMeeting.on(_constants.EVENTS.REQUEST_UPLOAD_LOGS, function (meetingInstance) {
|
|
769
|
-
if (
|
|
819
|
+
if (_this10.config.autoUploadLogs) {
|
|
770
820
|
var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4;
|
|
771
821
|
|
|
772
|
-
|
|
822
|
+
_this10.uploadLogs({
|
|
773
823
|
callStart: meetingInstance === null || meetingInstance === void 0 ? void 0 : (_meetingInstance$locu = meetingInstance.locusInfo) === null || _meetingInstance$locu === void 0 ? void 0 : (_meetingInstance$locu2 = _meetingInstance$locu.fullState) === null || _meetingInstance$locu2 === void 0 ? void 0 : _meetingInstance$locu2.lastActive,
|
|
774
824
|
correlationId: meetingInstance.correlationId,
|
|
775
825
|
feedbackId: meetingInstance.correlationId,
|
|
@@ -936,7 +986,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
936
986
|
}, {
|
|
937
987
|
key: "syncMeetings",
|
|
938
988
|
value: function syncMeetings() {
|
|
939
|
-
var
|
|
989
|
+
var _this11 = this;
|
|
940
990
|
|
|
941
991
|
return this.request.getActiveMeetings().then(function (locusArray) {
|
|
942
992
|
var activeLocusUrl = [];
|
|
@@ -945,14 +995,14 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
945
995
|
locusArray.loci.forEach(function (locus) {
|
|
946
996
|
activeLocusUrl.push(locus.url);
|
|
947
997
|
|
|
948
|
-
|
|
998
|
+
_this11.handleLocusEvent({
|
|
949
999
|
locus: locus,
|
|
950
1000
|
locusUrl: locus.url
|
|
951
1001
|
});
|
|
952
1002
|
});
|
|
953
1003
|
}
|
|
954
1004
|
|
|
955
|
-
var meetingsCollection =
|
|
1005
|
+
var meetingsCollection = _this11.meetingCollection.getAll();
|
|
956
1006
|
|
|
957
1007
|
if ((0, _keys.default)(meetingsCollection).length > 0) {
|
|
958
1008
|
// Some time the mercury event is missed after mercury reconnect
|
|
@@ -962,7 +1012,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
962
1012
|
|
|
963
1013
|
if (!activeLocusUrl.includes(meeting.locusUrl)) {
|
|
964
1014
|
// destroy function also uploads logs
|
|
965
|
-
|
|
1015
|
+
_this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
966
1016
|
}
|
|
967
1017
|
}
|
|
968
1018
|
}
|