@webex/plugin-meetings 1.151.7 → 1.153.1
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/common/errors/captcha-error.js +64 -0
- package/dist/common/errors/captcha-error.js.map +1 -0
- package/dist/common/errors/password-error.js +64 -0
- package/dist/common/errors/password-error.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +33 -1
- package/dist/constants.js.map +1 -1
- package/dist/meeting/index.js +668 -432
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +59 -32
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +12 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +142 -8
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +12 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +47 -19
- package/dist/meetings/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +16 -1
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/peer-connection-manager/util.js +28 -0
- package/dist/peer-connection-manager/util.js.map +1 -0
- package/package.json +5 -5
- package/src/common/errors/captcha-error.js +21 -0
- package/src/common/errors/password-error.js +21 -0
- package/src/config.js +2 -1
- package/src/constants.js +24 -0
- package/src/meeting/index.js +173 -3
- package/src/meeting/request.js +27 -0
- package/src/meeting/util.js +15 -4
- package/src/meeting-info/meeting-info-v2.js +67 -3
- package/src/meeting-info/utilv2.js +12 -1
- package/src/meetings/index.js +27 -8
- package/src/peer-connection-manager/index.js +19 -2
- package/src/peer-connection-manager/util.js +19 -0
- package/test/unit/spec/meeting/index.js +294 -3
- package/test/unit/spec/meeting-info/meetinginfov2.js +74 -1
- package/test/unit/spec/meetings/index.js +29 -0
- package/test/unit/spec/peerconnection-manager/index.js +66 -0
- package/test/unit/spec/peerconnection-manager/utils.js +25 -0
package/dist/meeting/index.js
CHANGED
|
@@ -36,10 +36,10 @@ var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/obj
|
|
|
36
36
|
|
|
37
37
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
|
|
38
38
|
|
|
39
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
40
|
-
|
|
41
39
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
42
40
|
|
|
41
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
42
|
+
|
|
43
43
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
44
44
|
|
|
45
45
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
@@ -110,6 +110,10 @@ var _util3 = _interopRequireDefault(require("../stats/util"));
|
|
|
110
110
|
|
|
111
111
|
var _transcription = _interopRequireDefault(require("../transcription"));
|
|
112
112
|
|
|
113
|
+
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
114
|
+
|
|
115
|
+
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
116
|
+
|
|
113
117
|
var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
|
|
114
118
|
|
|
115
119
|
var _reconnectionInProgress = _interopRequireDefault(require("../common/errors/reconnection-in-progress"));
|
|
@@ -120,6 +124,8 @@ var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
|
120
124
|
|
|
121
125
|
var _media2 = _interopRequireDefault(require("../common/errors/media"));
|
|
122
126
|
|
|
127
|
+
var _meetingInfoV = require("../meeting-info/meeting-info-v2");
|
|
128
|
+
|
|
123
129
|
var _mqaProcessor = _interopRequireDefault(require("../metrics/mqa-processor"));
|
|
124
130
|
|
|
125
131
|
var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
|
|
@@ -1111,23 +1117,253 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1111
1117
|
*/
|
|
1112
1118
|
|
|
1113
1119
|
_this.transcription = undefined;
|
|
1120
|
+
/**
|
|
1121
|
+
* Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
|
|
1122
|
+
* with the correct password before calling join()
|
|
1123
|
+
* @instance
|
|
1124
|
+
* @type {PASSWORD_STATUS}
|
|
1125
|
+
* @public
|
|
1126
|
+
* @memberof Meeting
|
|
1127
|
+
*/
|
|
1128
|
+
|
|
1129
|
+
_this.passwordStatus = _constants.PASSWORD_STATUS.UNKNOWN;
|
|
1130
|
+
/**
|
|
1131
|
+
* Information about required captcha. If null, then no captcha is required. status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
|
|
1132
|
+
* with the correct password before calling join()
|
|
1133
|
+
* @instance
|
|
1134
|
+
* @type {Object}
|
|
1135
|
+
* @property {string} captchaId captcha id
|
|
1136
|
+
* @property {string} verificationImageURL Url of the captcha image
|
|
1137
|
+
* @property {string} verificationAudioURL Url of the captcha audio file
|
|
1138
|
+
* @property {string} refreshURL Url used for refreshing the captcha (don't use it directly, call refreshCaptcha() instead)
|
|
1139
|
+
* @public
|
|
1140
|
+
* @memberof Meeting
|
|
1141
|
+
*/
|
|
1142
|
+
|
|
1143
|
+
_this.requiredCaptcha = null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Indicates the reason for last failure to obtain meeting.meetingInfo. MEETING_INFO_FAILURE_REASON.NONE if meeting info was
|
|
1146
|
+
* retrieved successfully
|
|
1147
|
+
* @instance
|
|
1148
|
+
* @type {MEETING_INFO_FAILURE_REASON}
|
|
1149
|
+
* @private
|
|
1150
|
+
* @memberof Meeting
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
1153
|
+
_this.meetingInfoFailureReason = undefined;
|
|
1114
1154
|
|
|
1115
1155
|
_this.setUpLocusInfoListeners();
|
|
1116
1156
|
|
|
1117
1157
|
_this.locusInfo.init(attrs.locus ? attrs.locus : {});
|
|
1118
1158
|
|
|
1119
|
-
_this.
|
|
1159
|
+
_this.hasJoinedOnce = false;
|
|
1120
1160
|
return _this;
|
|
1121
1161
|
}
|
|
1122
1162
|
/**
|
|
1123
|
-
*
|
|
1124
|
-
* @
|
|
1163
|
+
* Fetches meeting information.
|
|
1164
|
+
* @param {Object} options
|
|
1165
|
+
* @param {String} options.destination
|
|
1166
|
+
* @param {String} options.type
|
|
1125
1167
|
* @private
|
|
1126
1168
|
* @memberof Meeting
|
|
1169
|
+
* @returns {Promise}
|
|
1127
1170
|
*/
|
|
1128
1171
|
|
|
1129
1172
|
|
|
1130
1173
|
(0, _createClass2.default)(Meeting, [{
|
|
1174
|
+
key: "fetchMeetingInfo",
|
|
1175
|
+
value: function () {
|
|
1176
|
+
var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref4) {
|
|
1177
|
+
var destination, type, _ref4$password, password, _ref4$captchaCode, captchaCode, captchaInfo, info, _err$body, _err$body2;
|
|
1178
|
+
|
|
1179
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
1180
|
+
while (1) {
|
|
1181
|
+
switch (_context.prev = _context.next) {
|
|
1182
|
+
case 0:
|
|
1183
|
+
destination = _ref4.destination, type = _ref4.type, _ref4$password = _ref4.password, password = _ref4$password === void 0 ? null : _ref4$password, _ref4$captchaCode = _ref4.captchaCode, captchaCode = _ref4$captchaCode === void 0 ? null : _ref4$captchaCode;
|
|
1184
|
+
|
|
1185
|
+
if (!(captchaCode && !this.requiredCaptcha)) {
|
|
1186
|
+
_context.next = 3;
|
|
1187
|
+
break;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
return _context.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required')));
|
|
1191
|
+
|
|
1192
|
+
case 3:
|
|
1193
|
+
if (!(password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN)) {
|
|
1194
|
+
_context.next = 5;
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
return _context.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with password when password was not required')));
|
|
1199
|
+
|
|
1200
|
+
case 5:
|
|
1201
|
+
_context.prev = 5;
|
|
1202
|
+
captchaInfo = captchaCode ? {
|
|
1203
|
+
code: captchaCode,
|
|
1204
|
+
id: this.requiredCaptcha.captchaId
|
|
1205
|
+
} : null;
|
|
1206
|
+
_context.next = 9;
|
|
1207
|
+
return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, type, password, captchaInfo);
|
|
1208
|
+
|
|
1209
|
+
case 9:
|
|
1210
|
+
info = _context.sent;
|
|
1211
|
+
this.parseMeetingInfo(info);
|
|
1212
|
+
this.meetingInfo = info ? info.body : null;
|
|
1213
|
+
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
|
|
1214
|
+
this.requiredCaptcha = null;
|
|
1215
|
+
|
|
1216
|
+
if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
|
|
1217
|
+
this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
|
|
1218
|
+
} else {
|
|
1219
|
+
this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
return _context.abrupt("return", _promise.default.resolve());
|
|
1223
|
+
|
|
1224
|
+
case 18:
|
|
1225
|
+
_context.prev = 18;
|
|
1226
|
+
_context.t0 = _context["catch"](5);
|
|
1227
|
+
|
|
1228
|
+
if (!(_context.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
|
|
1229
|
+
_context.next = 31;
|
|
1230
|
+
break;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
_loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(destination, " - password required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body = _context.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ").")); // when wbxappapi requires password it still populates partial meeting info in the response
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
if (_context.t0.meetingInfo) {
|
|
1237
|
+
this.meetingInfo = _context.t0.meetingInfo;
|
|
1238
|
+
this.meetingNumber = _context.t0.meetingInfo.meetingNumber;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
|
|
1242
|
+
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
|
|
1243
|
+
|
|
1244
|
+
if (!this.requiredCaptcha) {
|
|
1245
|
+
_context.next = 28;
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
_context.next = 28;
|
|
1250
|
+
return this.refreshCaptcha();
|
|
1251
|
+
|
|
1252
|
+
case 28:
|
|
1253
|
+
throw new _passwordError.default();
|
|
1254
|
+
|
|
1255
|
+
case 31:
|
|
1256
|
+
if (!(_context.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
|
|
1257
|
+
_context.next = 39;
|
|
1258
|
+
break;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
_loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(destination, " - captcha required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body2 = _context.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
|
|
1262
|
+
|
|
1263
|
+
this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
|
|
1264
|
+
|
|
1265
|
+
if (_context.t0.isPasswordRequired) {
|
|
1266
|
+
this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
this.requiredCaptcha = _context.t0.captchaInfo;
|
|
1270
|
+
throw new _captchaError.default();
|
|
1271
|
+
|
|
1272
|
+
case 39:
|
|
1273
|
+
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
|
|
1274
|
+
throw _context.t0;
|
|
1275
|
+
|
|
1276
|
+
case 41:
|
|
1277
|
+
case "end":
|
|
1278
|
+
return _context.stop();
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}, _callee, this, [[5, 18]]);
|
|
1282
|
+
}));
|
|
1283
|
+
|
|
1284
|
+
function fetchMeetingInfo(_x) {
|
|
1285
|
+
return _fetchMeetingInfo.apply(this, arguments);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
return fetchMeetingInfo;
|
|
1289
|
+
}()
|
|
1290
|
+
/**
|
|
1291
|
+
* Checks if the supplied password/host key is correct. It returns a promise with information whether the
|
|
1292
|
+
* password and captcha code were correct or not.
|
|
1293
|
+
* @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
|
|
1294
|
+
* @param {String} captchaCode - can be undefined if captcha was not required by the server
|
|
1295
|
+
* @public
|
|
1296
|
+
* @memberof Meeting
|
|
1297
|
+
* @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
|
|
1298
|
+
*/
|
|
1299
|
+
|
|
1300
|
+
}, {
|
|
1301
|
+
key: "verifyPassword",
|
|
1302
|
+
value: function verifyPassword(password, captchaCode) {
|
|
1303
|
+
var _this2 = this;
|
|
1304
|
+
|
|
1305
|
+
return this.fetchMeetingInfo({
|
|
1306
|
+
destination: this.sipUri,
|
|
1307
|
+
type: _constants._SIP_URI_,
|
|
1308
|
+
password: password,
|
|
1309
|
+
captchaCode: captchaCode
|
|
1310
|
+
}).then(function () {
|
|
1311
|
+
return {
|
|
1312
|
+
isPasswordValid: true,
|
|
1313
|
+
requiredCaptcha: null,
|
|
1314
|
+
failureReason: _constants.MEETING_INFO_FAILURE_REASON.NONE
|
|
1315
|
+
};
|
|
1316
|
+
}).catch(function (error) {
|
|
1317
|
+
if (error instanceof _passwordError.default || error instanceof _captchaError.default) {
|
|
1318
|
+
return {
|
|
1319
|
+
isPasswordValid: _this2.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED,
|
|
1320
|
+
requiredCaptcha: _this2.requiredCaptcha,
|
|
1321
|
+
failureReason: _this2.meetingInfoFailureReason
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
throw error;
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Refreshes the captcha. As a result the meeting will have new captcha id, image and audio.
|
|
1330
|
+
* If the refresh operation fails, meeting remains with the old captcha properties.
|
|
1331
|
+
* @public
|
|
1332
|
+
* @memberof Meeting
|
|
1333
|
+
* @returns {Promise}
|
|
1334
|
+
*/
|
|
1335
|
+
|
|
1336
|
+
}, {
|
|
1337
|
+
key: "refreshCaptcha",
|
|
1338
|
+
value: function refreshCaptcha() {
|
|
1339
|
+
var _this3 = this;
|
|
1340
|
+
|
|
1341
|
+
if (!this.requiredCaptcha) {
|
|
1342
|
+
return _promise.default.reject(new Error('There is no captcha to refresh'));
|
|
1343
|
+
} // in order to get fully populated uris for captcha audio and image in response to refresh captcha request
|
|
1344
|
+
// we have to pass the wbxappapi hostname as the siteFullName parameter
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
var _URL = new URL(this.requiredCaptcha.refreshURL),
|
|
1348
|
+
hostname = _URL.hostname;
|
|
1349
|
+
|
|
1350
|
+
return this.meetingRequest.refreshCaptcha({
|
|
1351
|
+
captchaRefreshUrl: "".concat(this.requiredCaptcha.refreshURL, "&siteFullName=").concat(hostname),
|
|
1352
|
+
captchaId: this.requiredCaptcha.captchaId
|
|
1353
|
+
}).then(function (response) {
|
|
1354
|
+
_this3.requiredCaptcha.captchaId = response.body.captchaID;
|
|
1355
|
+
_this3.requiredCaptcha.verificationImageURL = response.body.verificationImageURL;
|
|
1356
|
+
_this3.requiredCaptcha.verificationAudioURL = response.body.verificationAudioURL;
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Proxy function for all the listener set ups
|
|
1361
|
+
* @returns {undefined}
|
|
1362
|
+
* @private
|
|
1363
|
+
* @memberof Meeting
|
|
1364
|
+
*/
|
|
1365
|
+
|
|
1366
|
+
}, {
|
|
1131
1367
|
key: "setUpLocusInfoListeners",
|
|
1132
1368
|
value: function setUpLocusInfoListeners() {
|
|
1133
1369
|
// meeting update listeners
|
|
@@ -1155,7 +1391,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1155
1391
|
}, {
|
|
1156
1392
|
key: "setUpLocusInfoMediaInactiveListener",
|
|
1157
1393
|
value: function setUpLocusInfoMediaInactiveListener() {
|
|
1158
|
-
var
|
|
1394
|
+
var _this4 = this;
|
|
1159
1395
|
|
|
1160
1396
|
// User gets kicked off the meeting due to inactivity or user did a refresh
|
|
1161
1397
|
this.locusInfo.on(_constants.EVENTS.DISCONNECT_DUE_TO_INACTIVITY, function (res) {
|
|
@@ -1163,23 +1399,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1163
1399
|
// TODO: send custom parameter explaining why the inactivity happened
|
|
1164
1400
|
// refresh , no media or network got dsconnected or something else
|
|
1165
1401
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.DISCONNECT_DUE_TO_INACTIVITY, {
|
|
1166
|
-
correlation_id:
|
|
1167
|
-
locus_id:
|
|
1402
|
+
correlation_id: _this4.correlationId,
|
|
1403
|
+
locus_id: _this4.locusId
|
|
1168
1404
|
}); // Upload logs on media inactivity
|
|
1169
1405
|
// Normally media should not be inactive
|
|
1170
1406
|
|
|
1171
1407
|
|
|
1172
|
-
_triggerProxy.default.trigger(
|
|
1408
|
+
_triggerProxy.default.trigger(_this4, {
|
|
1173
1409
|
file: 'meeting/index',
|
|
1174
1410
|
function: 'setUpLocusInfoMediaInactiveListener'
|
|
1175
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
1411
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this4);
|
|
1176
1412
|
|
|
1177
1413
|
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ".concat(res.reason));
|
|
1178
1414
|
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1415
|
+
if (_this4.config.reconnection.autoRejoin) {
|
|
1416
|
+
_this4.reconnect();
|
|
1181
1417
|
} else {
|
|
1182
|
-
_triggerProxy.default.trigger(
|
|
1418
|
+
_triggerProxy.default.trigger(_this4, {
|
|
1183
1419
|
file: 'meeting/index',
|
|
1184
1420
|
function: 'setUpLocusInfoMediaInactiveListener'
|
|
1185
1421
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_LEFT, res.reason);
|
|
@@ -1196,19 +1432,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1196
1432
|
}, {
|
|
1197
1433
|
key: "setUpLocusInfoAssignHostListener",
|
|
1198
1434
|
value: function setUpLocusInfoAssignHostListener() {
|
|
1199
|
-
var
|
|
1435
|
+
var _this5 = this;
|
|
1200
1436
|
|
|
1201
1437
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST, function (payload) {
|
|
1202
|
-
_triggerProxy.default.trigger(
|
|
1438
|
+
_triggerProxy.default.trigger(_this5, {
|
|
1203
1439
|
file: 'meeting/index',
|
|
1204
1440
|
function: 'setUpLocusInfoAssignHostListener'
|
|
1205
1441
|
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
|
|
1206
1442
|
canAssignHost: payload.canAssignHost,
|
|
1207
|
-
canLock:
|
|
1208
|
-
canUnlock:
|
|
1443
|
+
canLock: _this5.inMeetingActions.getCanLock(),
|
|
1444
|
+
canUnlock: _this5.inMeetingActions.getCanUnlock()
|
|
1209
1445
|
});
|
|
1210
1446
|
|
|
1211
|
-
|
|
1447
|
+
_this5.inMeetingActions.setCanAssignHost(payload.canAssignHost);
|
|
1212
1448
|
});
|
|
1213
1449
|
}
|
|
1214
1450
|
/**
|
|
@@ -1221,10 +1457,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1221
1457
|
}, {
|
|
1222
1458
|
key: "setUpLocusFullStateListener",
|
|
1223
1459
|
value: function setUpLocusFullStateListener() {
|
|
1224
|
-
var
|
|
1460
|
+
var _this6 = this;
|
|
1225
1461
|
|
|
1226
1462
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE, function (payload) {
|
|
1227
|
-
_triggerProxy.default.trigger(
|
|
1463
|
+
_triggerProxy.default.trigger(_this6, {
|
|
1228
1464
|
file: 'meeting/index',
|
|
1229
1465
|
function: 'setUpLocusFullStateListener'
|
|
1230
1466
|
}, _constants.EVENT_TRIGGERS.MEETING_STATE_CHANGE, {
|
|
@@ -1232,7 +1468,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1232
1468
|
});
|
|
1233
1469
|
});
|
|
1234
1470
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE, function (payload) {
|
|
1235
|
-
|
|
1471
|
+
_this6.members.locusFullStateTypeUpdate(payload);
|
|
1236
1472
|
});
|
|
1237
1473
|
}
|
|
1238
1474
|
/**
|
|
@@ -1440,17 +1676,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1440
1676
|
}, {
|
|
1441
1677
|
key: "setUpLocusSelfListener",
|
|
1442
1678
|
value: function setUpLocusSelfListener() {
|
|
1443
|
-
var
|
|
1679
|
+
var _this7 = this;
|
|
1444
1680
|
|
|
1445
1681
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_SELF, function (payload) {
|
|
1446
|
-
|
|
1682
|
+
_this7.members.locusSelfUpdate(payload);
|
|
1447
1683
|
|
|
1448
|
-
|
|
1684
|
+
_this7.pstnUpdate(payload); // If user moved to a JOINED state and there is a pending floor grant trigger it
|
|
1449
1685
|
|
|
1450
1686
|
|
|
1451
|
-
if (
|
|
1452
|
-
|
|
1453
|
-
|
|
1687
|
+
if (_this7.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
1688
|
+
_this7.share().then(function () {
|
|
1689
|
+
_this7.floorGrantPending = false;
|
|
1454
1690
|
});
|
|
1455
1691
|
}
|
|
1456
1692
|
});
|
|
@@ -1466,16 +1702,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1466
1702
|
}, {
|
|
1467
1703
|
key: "pstnUpdate",
|
|
1468
1704
|
value: function pstnUpdate(payload) {
|
|
1469
|
-
var
|
|
1705
|
+
var _this8 = this;
|
|
1470
1706
|
|
|
1471
1707
|
if (this.locusInfo.self) {
|
|
1472
1708
|
var _payload$newSelf, _payload$newSelf2;
|
|
1473
1709
|
|
|
1474
1710
|
var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
|
|
1475
|
-
return device.url ===
|
|
1711
|
+
return device.url === _this8.dialInUrl;
|
|
1476
1712
|
});
|
|
1477
1713
|
var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
|
|
1478
|
-
return device.url ===
|
|
1714
|
+
return device.url === _this8.dialOutUrl;
|
|
1479
1715
|
});
|
|
1480
1716
|
var changed = false;
|
|
1481
1717
|
|
|
@@ -1530,10 +1766,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1530
1766
|
}, {
|
|
1531
1767
|
key: "setUpLocusHostListener",
|
|
1532
1768
|
value: function setUpLocusHostListener() {
|
|
1533
|
-
var
|
|
1769
|
+
var _this9 = this;
|
|
1534
1770
|
|
|
1535
1771
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_HOST, function (payload) {
|
|
1536
|
-
|
|
1772
|
+
_this9.members.locusHostUpdate(payload);
|
|
1537
1773
|
});
|
|
1538
1774
|
}
|
|
1539
1775
|
/**
|
|
@@ -1548,10 +1784,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1548
1784
|
}, {
|
|
1549
1785
|
key: "setUpLocusParticipantsListener",
|
|
1550
1786
|
value: function setUpLocusParticipantsListener() {
|
|
1551
|
-
var
|
|
1787
|
+
var _this10 = this;
|
|
1552
1788
|
|
|
1553
1789
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, function (payload) {
|
|
1554
|
-
|
|
1790
|
+
_this10.members.locusParticipantsUpdate(payload);
|
|
1555
1791
|
});
|
|
1556
1792
|
}
|
|
1557
1793
|
/**
|
|
@@ -1570,12 +1806,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1570
1806
|
}, {
|
|
1571
1807
|
key: "setupLocusControlsListener",
|
|
1572
1808
|
value: function setupLocusControlsListener() {
|
|
1573
|
-
var
|
|
1809
|
+
var _this11 = this;
|
|
1574
1810
|
|
|
1575
|
-
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (
|
|
1576
|
-
var state =
|
|
1577
|
-
modifiedBy =
|
|
1578
|
-
lastModified =
|
|
1811
|
+
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref5) {
|
|
1812
|
+
var state = _ref5.state,
|
|
1813
|
+
modifiedBy = _ref5.modifiedBy,
|
|
1814
|
+
lastModified = _ref5.lastModified;
|
|
1579
1815
|
var event;
|
|
1580
1816
|
|
|
1581
1817
|
switch (state) {
|
|
@@ -1601,16 +1837,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1601
1837
|
} // `RESUMED` state should be converted to `RECORDING` after triggering the event
|
|
1602
1838
|
|
|
1603
1839
|
|
|
1604
|
-
|
|
1840
|
+
_this11.recording = {
|
|
1605
1841
|
state: state === _constants.RECORDING_STATE.RESUMED ? _constants.RECORDING_STATE.RECORDING : state,
|
|
1606
1842
|
modifiedBy: modifiedBy,
|
|
1607
1843
|
lastModified: lastModified
|
|
1608
1844
|
};
|
|
1609
1845
|
|
|
1610
|
-
_triggerProxy.default.trigger(
|
|
1846
|
+
_triggerProxy.default.trigger(_this11, {
|
|
1611
1847
|
file: 'meeting/index',
|
|
1612
1848
|
function: 'setupLocusControlsListener'
|
|
1613
|
-
}, event,
|
|
1849
|
+
}, event, _this11.recording);
|
|
1614
1850
|
});
|
|
1615
1851
|
}
|
|
1616
1852
|
/**
|
|
@@ -1625,7 +1861,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1625
1861
|
}, {
|
|
1626
1862
|
key: "setUpLocusMediaSharesListener",
|
|
1627
1863
|
value: function setUpLocusMediaSharesListener() {
|
|
1628
|
-
var
|
|
1864
|
+
var _this12 = this;
|
|
1629
1865
|
|
|
1630
1866
|
// Will get triggered on local and remote share
|
|
1631
1867
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, function (payload) {
|
|
@@ -1643,17 +1879,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1643
1879
|
return;
|
|
1644
1880
|
}
|
|
1645
1881
|
|
|
1646
|
-
var newShareStatus =
|
|
1882
|
+
var newShareStatus = _this12.shareStatus; // REMOTE - check if remote started sharing
|
|
1647
1883
|
|
|
1648
|
-
if (
|
|
1884
|
+
if (_this12.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
|
|
1649
1885
|
// CONTENT - sharing content remote
|
|
1650
1886
|
newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
|
|
1651
1887
|
} // LOCAL - check if we started sharing content
|
|
1652
|
-
else if (
|
|
1653
|
-
var
|
|
1888
|
+
else if (_this12.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
|
|
1889
|
+
var _this12$mediaProperti;
|
|
1654
1890
|
|
|
1655
|
-
if (((
|
|
1656
|
-
|
|
1891
|
+
if (((_this12$mediaProperti = _this12.mediaProperties.shareTrack) === null || _this12$mediaProperti === void 0 ? void 0 : _this12$mediaProperti.readyState) === 'ended') {
|
|
1892
|
+
_this12.stopShare({
|
|
1657
1893
|
skipSignalingCheck: true
|
|
1658
1894
|
}).catch(function (error) {
|
|
1659
1895
|
_loggerProxy.default.logger.log('Meeting:index#setUpLocusMediaSharesListener --> Error stopping share: ', error);
|
|
@@ -1673,14 +1909,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1673
1909
|
newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
1674
1910
|
}
|
|
1675
1911
|
|
|
1676
|
-
if (newShareStatus !==
|
|
1677
|
-
var oldShareStatus =
|
|
1912
|
+
if (newShareStatus !== _this12.shareStatus) {
|
|
1913
|
+
var oldShareStatus = _this12.shareStatus; // update our state before we send out any notifications
|
|
1678
1914
|
|
|
1679
|
-
|
|
1915
|
+
_this12.shareStatus = newShareStatus; // send out "stop" notifications for the old state
|
|
1680
1916
|
|
|
1681
1917
|
switch (oldShareStatus) {
|
|
1682
1918
|
case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
|
|
1683
|
-
_triggerProxy.default.trigger(
|
|
1919
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1684
1920
|
file: 'meetings/index',
|
|
1685
1921
|
function: 'remoteShare'
|
|
1686
1922
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
|
|
@@ -1688,7 +1924,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1688
1924
|
break;
|
|
1689
1925
|
|
|
1690
1926
|
case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
|
|
1691
|
-
_triggerProxy.default.trigger(
|
|
1927
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1692
1928
|
file: 'meeting/index',
|
|
1693
1929
|
function: 'stopFloorRequest'
|
|
1694
1930
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
|
|
@@ -1698,7 +1934,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1698
1934
|
break;
|
|
1699
1935
|
|
|
1700
1936
|
case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
|
|
1701
|
-
_triggerProxy.default.trigger(
|
|
1937
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1702
1938
|
file: 'meeting/index',
|
|
1703
1939
|
function: 'stopWhiteboardShare'
|
|
1704
1940
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
|
|
@@ -1717,10 +1953,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1717
1953
|
switch (newShareStatus) {
|
|
1718
1954
|
case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
|
|
1719
1955
|
{
|
|
1720
|
-
var
|
|
1956
|
+
var _this12$mediaProperti2;
|
|
1721
1957
|
|
|
1722
1958
|
var sendStartedSharingRemote = function sendStartedSharingRemote() {
|
|
1723
|
-
_triggerProxy.default.trigger(
|
|
1959
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1724
1960
|
file: 'meetings/index',
|
|
1725
1961
|
function: 'remoteShare'
|
|
1726
1962
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
|
|
@@ -1729,12 +1965,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1729
1965
|
}; // if a remote participant is stealing the presentation from us
|
|
1730
1966
|
|
|
1731
1967
|
|
|
1732
|
-
if (!((
|
|
1968
|
+
if (!((_this12$mediaProperti2 = _this12.mediaProperties.mediaDirection) !== null && _this12$mediaProperti2 !== void 0 && _this12$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
|
|
1733
1969
|
sendStartedSharingRemote();
|
|
1734
1970
|
} else {
|
|
1735
|
-
|
|
1971
|
+
_this12.updateShare({
|
|
1736
1972
|
sendShare: false,
|
|
1737
|
-
receiveShare:
|
|
1973
|
+
receiveShare: _this12.mediaProperties.mediaDirection.receiveShare
|
|
1738
1974
|
}).finally(function () {
|
|
1739
1975
|
sendStartedSharingRemote();
|
|
1740
1976
|
});
|
|
@@ -1744,20 +1980,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1744
1980
|
}
|
|
1745
1981
|
|
|
1746
1982
|
case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
|
|
1747
|
-
_triggerProxy.default.trigger(
|
|
1983
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1748
1984
|
file: 'meeting/index',
|
|
1749
1985
|
function: 'share'
|
|
1750
1986
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_LOCAL);
|
|
1751
1987
|
|
|
1752
1988
|
_metrics.default.postEvent({
|
|
1753
1989
|
event: _config.eventType.LOCAL_SHARE_FLOOR_GRANTED,
|
|
1754
|
-
meeting:
|
|
1990
|
+
meeting: _this12
|
|
1755
1991
|
});
|
|
1756
1992
|
|
|
1757
1993
|
break;
|
|
1758
1994
|
|
|
1759
1995
|
case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
|
|
1760
|
-
_triggerProxy.default.trigger(
|
|
1996
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1761
1997
|
file: 'meeting/index',
|
|
1762
1998
|
function: 'startWhiteboardShare'
|
|
1763
1999
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
|
|
@@ -1767,7 +2003,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1767
2003
|
|
|
1768
2004
|
_metrics.default.postEvent({
|
|
1769
2005
|
event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
|
|
1770
|
-
meeting:
|
|
2006
|
+
meeting: _this12
|
|
1771
2007
|
});
|
|
1772
2008
|
|
|
1773
2009
|
break;
|
|
@@ -1780,22 +2016,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1780
2016
|
break;
|
|
1781
2017
|
}
|
|
1782
2018
|
|
|
1783
|
-
|
|
2019
|
+
_this12.members.locusMediaSharesUpdate(payload);
|
|
1784
2020
|
} else if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
|
|
1785
2021
|
// if we got here, then some remote participant has stolen
|
|
1786
2022
|
// the presentation from another remote participant
|
|
1787
|
-
_triggerProxy.default.trigger(
|
|
2023
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1788
2024
|
file: 'meetings/index',
|
|
1789
2025
|
function: 'remoteShare'
|
|
1790
2026
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
|
|
1791
2027
|
memberId: contentShare.beneficiaryId
|
|
1792
2028
|
});
|
|
1793
2029
|
|
|
1794
|
-
|
|
2030
|
+
_this12.members.locusMediaSharesUpdate(payload);
|
|
1795
2031
|
} else if (newShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
|
|
1796
2032
|
// if we got here, then some remote participant has stolen
|
|
1797
2033
|
// the presentation from another remote participant
|
|
1798
|
-
_triggerProxy.default.trigger(
|
|
2034
|
+
_triggerProxy.default.trigger(_this12, {
|
|
1799
2035
|
file: 'meeting/index',
|
|
1800
2036
|
function: 'startWhiteboardShare'
|
|
1801
2037
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
|
|
@@ -1805,10 +2041,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1805
2041
|
|
|
1806
2042
|
_metrics.default.postEvent({
|
|
1807
2043
|
event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
|
|
1808
|
-
meeting:
|
|
2044
|
+
meeting: _this12
|
|
1809
2045
|
});
|
|
1810
2046
|
|
|
1811
|
-
|
|
2047
|
+
_this12.members.locusMediaSharesUpdate(payload);
|
|
1812
2048
|
}
|
|
1813
2049
|
});
|
|
1814
2050
|
}
|
|
@@ -1823,15 +2059,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1823
2059
|
}, {
|
|
1824
2060
|
key: "setUpLocusUrlListener",
|
|
1825
2061
|
value: function setUpLocusUrlListener() {
|
|
1826
|
-
var
|
|
2062
|
+
var _this13 = this;
|
|
1827
2063
|
|
|
1828
2064
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_URL, function (payload) {
|
|
1829
|
-
var
|
|
2065
|
+
var _this13$locusUrl;
|
|
1830
2066
|
|
|
1831
|
-
|
|
2067
|
+
_this13.members.locusUrlUpdate(payload);
|
|
1832
2068
|
|
|
1833
|
-
|
|
1834
|
-
|
|
2069
|
+
_this13.locusUrl = payload;
|
|
2070
|
+
_this13.locusId = (_this13$locusUrl = _this13.locusUrl) === null || _this13$locusUrl === void 0 ? void 0 : _this13$locusUrl.split('/').pop();
|
|
1835
2071
|
});
|
|
1836
2072
|
}
|
|
1837
2073
|
/**
|
|
@@ -1844,11 +2080,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1844
2080
|
}, {
|
|
1845
2081
|
key: "setUpLocusInfoMeetingInfoListener",
|
|
1846
2082
|
value: function setUpLocusInfoMeetingInfoListener() {
|
|
1847
|
-
var
|
|
2083
|
+
var _this14 = this;
|
|
1848
2084
|
|
|
1849
2085
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_LOCKED, function (payload) {
|
|
1850
2086
|
if (payload) {
|
|
1851
|
-
_triggerProxy.default.trigger(
|
|
2087
|
+
_triggerProxy.default.trigger(_this14, {
|
|
1852
2088
|
file: 'meeting/index',
|
|
1853
2089
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
1854
2090
|
}, _constants.EVENT_TRIGGERS.MEETING_LOCKED, {
|
|
@@ -1858,7 +2094,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1858
2094
|
});
|
|
1859
2095
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, function (payload) {
|
|
1860
2096
|
if (payload) {
|
|
1861
|
-
_triggerProxy.default.trigger(
|
|
2097
|
+
_triggerProxy.default.trigger(_this14, {
|
|
1862
2098
|
file: 'meeting/index',
|
|
1863
2099
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
1864
2100
|
}, _constants.EVENT_TRIGGERS.MEETING_UNLOCKED, {
|
|
@@ -1879,31 +2115,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1879
2115
|
newCanUnlock = _util.default.canUserUnlock(payload.info.moderator, payload.info.policy);
|
|
1880
2116
|
}
|
|
1881
2117
|
|
|
1882
|
-
if (newCanLock && !
|
|
1883
|
-
_triggerProxy.default.trigger(
|
|
2118
|
+
if (newCanLock && !_this14.inMeetingActions.canLock) {
|
|
2119
|
+
_triggerProxy.default.trigger(_this14, {
|
|
1884
2120
|
file: 'meeting/index',
|
|
1885
2121
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
1886
2122
|
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
|
|
1887
2123
|
canLock: true,
|
|
1888
2124
|
canUnlock: false,
|
|
1889
|
-
canAssignHost:
|
|
2125
|
+
canAssignHost: _this14.inMeetingActions.getCanAssignHost()
|
|
1890
2126
|
});
|
|
1891
2127
|
}
|
|
1892
2128
|
|
|
1893
|
-
if (newCanUnlock && !
|
|
1894
|
-
_triggerProxy.default.trigger(
|
|
2129
|
+
if (newCanUnlock && !_this14.inMeetingActions.canUnlock || !newCanLock) {
|
|
2130
|
+
_triggerProxy.default.trigger(_this14, {
|
|
1895
2131
|
file: 'meeting/index',
|
|
1896
2132
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
1897
2133
|
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
|
|
1898
2134
|
canLock: false,
|
|
1899
2135
|
canUnlock: true,
|
|
1900
|
-
canAssignHost:
|
|
2136
|
+
canAssignHost: _this14.inMeetingActions.getCanAssignHost()
|
|
1901
2137
|
});
|
|
1902
2138
|
}
|
|
1903
2139
|
|
|
1904
|
-
|
|
2140
|
+
_this14.inMeetingActions.setCanLock(newCanLock || false);
|
|
1905
2141
|
|
|
1906
|
-
|
|
2142
|
+
_this14.inMeetingActions.setCanUnlock(newCanUnlock || false);
|
|
1907
2143
|
}
|
|
1908
2144
|
});
|
|
1909
2145
|
}
|
|
@@ -1917,13 +2153,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1917
2153
|
}, {
|
|
1918
2154
|
key: "setUpLocusInfoSelfListener",
|
|
1919
2155
|
value: function setUpLocusInfoSelfListener() {
|
|
1920
|
-
var
|
|
2156
|
+
var _this15 = this;
|
|
1921
2157
|
|
|
1922
2158
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
|
|
1923
|
-
if (
|
|
1924
|
-
|
|
2159
|
+
if (_this15.audio) {
|
|
2160
|
+
_this15.audio.handleServerLocalUnmuteRequired(_this15);
|
|
1925
2161
|
|
|
1926
|
-
_triggerProxy.default.trigger(
|
|
2162
|
+
_triggerProxy.default.trigger(_this15, {
|
|
1927
2163
|
file: 'meeting/index',
|
|
1928
2164
|
function: 'setUpLocusInfoSelfListener'
|
|
1929
2165
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
|
|
@@ -1933,17 +2169,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1933
2169
|
});
|
|
1934
2170
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
|
|
1935
2171
|
if (payload) {
|
|
1936
|
-
var
|
|
2172
|
+
var _this15$audio;
|
|
1937
2173
|
|
|
1938
|
-
if (
|
|
1939
|
-
|
|
2174
|
+
if (_this15.audio) {
|
|
2175
|
+
_this15.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
|
|
1940
2176
|
} // with "mute on entry" server will send us remote mute even if we don't have media configured,
|
|
1941
2177
|
// so if being muted by others, always send the notification,
|
|
1942
2178
|
// but if being unmuted, only send it if we are also locally unmuted
|
|
1943
2179
|
|
|
1944
2180
|
|
|
1945
|
-
if (payload.muted || !((
|
|
1946
|
-
_triggerProxy.default.trigger(
|
|
2181
|
+
if (payload.muted || !((_this15$audio = _this15.audio) !== null && _this15$audio !== void 0 && _this15$audio.isMuted())) {
|
|
2182
|
+
_triggerProxy.default.trigger(_this15, {
|
|
1947
2183
|
file: 'meeting/index',
|
|
1948
2184
|
function: 'setUpLocusInfoSelfListener'
|
|
1949
2185
|
}, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
|
|
@@ -1953,7 +2189,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1953
2189
|
}
|
|
1954
2190
|
});
|
|
1955
2191
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
|
|
1956
|
-
_triggerProxy.default.trigger(
|
|
2192
|
+
_triggerProxy.default.trigger(_this15, {
|
|
1957
2193
|
file: 'meeting/index',
|
|
1958
2194
|
function: 'setUpLocusInfoSelfListener'
|
|
1959
2195
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
|
|
@@ -1962,7 +2198,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1962
2198
|
});
|
|
1963
2199
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
|
|
1964
2200
|
if (payload) {
|
|
1965
|
-
_triggerProxy.default.trigger(
|
|
2201
|
+
_triggerProxy.default.trigger(_this15, {
|
|
1966
2202
|
file: 'meeting/index',
|
|
1967
2203
|
function: 'setUpLocusInfoSelfListener'
|
|
1968
2204
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
|
|
@@ -1971,13 +2207,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1971
2207
|
|
|
1972
2208
|
_metrics.default.postEvent({
|
|
1973
2209
|
event: _config.eventType.LOBBY_ENTERED,
|
|
1974
|
-
meeting:
|
|
2210
|
+
meeting: _this15
|
|
1975
2211
|
});
|
|
1976
2212
|
}
|
|
1977
2213
|
});
|
|
1978
2214
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
|
|
1979
2215
|
if (payload) {
|
|
1980
|
-
_triggerProxy.default.trigger(
|
|
2216
|
+
_triggerProxy.default.trigger(_this15, {
|
|
1981
2217
|
file: 'meeting/index',
|
|
1982
2218
|
function: 'setUpLocusInfoSelfListener'
|
|
1983
2219
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
|
|
@@ -1986,35 +2222,35 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1986
2222
|
|
|
1987
2223
|
_metrics.default.postEvent({
|
|
1988
2224
|
event: _config.eventType.LOBBY_EXITED,
|
|
1989
|
-
meeting:
|
|
2225
|
+
meeting: _this15
|
|
1990
2226
|
});
|
|
1991
2227
|
}
|
|
1992
2228
|
});
|
|
1993
2229
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
|
|
1994
2230
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_MEDIA_INACTIVE, {
|
|
1995
|
-
correlation_id:
|
|
1996
|
-
locus_id:
|
|
2231
|
+
correlation_id: _this15.correlationId,
|
|
2232
|
+
locus_id: _this15.locusId
|
|
1997
2233
|
});
|
|
1998
2234
|
|
|
1999
|
-
|
|
2235
|
+
_this15.reconnect();
|
|
2000
2236
|
}); // There is two stats for mute one is the actual media being sent or received
|
|
2001
2237
|
// The second on is if the audio is muted, we need to tell the statsAnalyzer when
|
|
2002
2238
|
// the audio is muted or the user is not willing to send media
|
|
2003
2239
|
|
|
2004
2240
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
|
|
2005
|
-
if (
|
|
2006
|
-
var
|
|
2241
|
+
if (_this15.statsAnalyzer) {
|
|
2242
|
+
var _this15$mediaProperti, _this15$audio2, _this15$mediaProperti2, _this15$video, _this15$mediaProperti3, _this15$mediaProperti4, _this15$mediaProperti5, _this15$mediaProperti6;
|
|
2007
2243
|
|
|
2008
|
-
|
|
2244
|
+
_this15.statsAnalyzer.updateMediaStatus({
|
|
2009
2245
|
actual: status,
|
|
2010
2246
|
expected: {
|
|
2011
2247
|
// We need to check what should be the actual direction of media
|
|
2012
|
-
sendAudio: ((
|
|
2013
|
-
sendVideo: ((
|
|
2014
|
-
sendShare: (
|
|
2015
|
-
receiveAudio: (
|
|
2016
|
-
receiveVideo: (
|
|
2017
|
-
receiveShare: (
|
|
2248
|
+
sendAudio: ((_this15$mediaProperti = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti === void 0 ? void 0 : _this15$mediaProperti.sendAudio) && !((_this15$audio2 = _this15.audio) !== null && _this15$audio2 !== void 0 && _this15$audio2.isMuted()),
|
|
2249
|
+
sendVideo: ((_this15$mediaProperti2 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti2 === void 0 ? void 0 : _this15$mediaProperti2.sendVideo) && !((_this15$video = _this15.video) !== null && _this15$video !== void 0 && _this15$video.isMuted()),
|
|
2250
|
+
sendShare: (_this15$mediaProperti3 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti3 === void 0 ? void 0 : _this15$mediaProperti3.sendShare,
|
|
2251
|
+
receiveAudio: (_this15$mediaProperti4 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti4 === void 0 ? void 0 : _this15$mediaProperti4.receiveAudio,
|
|
2252
|
+
receiveVideo: (_this15$mediaProperti5 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti5 === void 0 ? void 0 : _this15$mediaProperti5.receiveVideo,
|
|
2253
|
+
receiveShare: (_this15$mediaProperti6 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti6 === void 0 ? void 0 : _this15$mediaProperti6.receiveShare
|
|
2018
2254
|
}
|
|
2019
2255
|
});
|
|
2020
2256
|
}
|
|
@@ -2030,29 +2266,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2030
2266
|
}, {
|
|
2031
2267
|
key: "setUpLocusInfoMeetingListener",
|
|
2032
2268
|
value: function setUpLocusInfoMeetingListener() {
|
|
2033
|
-
var
|
|
2269
|
+
var _this16 = this;
|
|
2034
2270
|
|
|
2035
2271
|
this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
|
|
2036
|
-
|
|
2272
|
+
_this16.meetingFiniteStateMachine.remote(payload);
|
|
2037
2273
|
|
|
2038
2274
|
if (payload.remoteDeclined) {
|
|
2039
|
-
|
|
2275
|
+
_this16.leave({
|
|
2040
2276
|
reason: payload.reason
|
|
2041
2277
|
}).then(function () {
|
|
2042
2278
|
_loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
|
|
2043
2279
|
}).catch(function (error) {
|
|
2044
|
-
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(
|
|
2280
|
+
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this16.meeting, ", error: ").concat(error));
|
|
2045
2281
|
});
|
|
2046
2282
|
}
|
|
2047
2283
|
});
|
|
2048
2284
|
this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
|
|
2049
2285
|
// if self state is NOT left
|
|
2050
2286
|
// TODO: Handle sharing and wireless sharing when meeting end
|
|
2051
|
-
if (
|
|
2052
|
-
if (
|
|
2053
|
-
|
|
2287
|
+
if (_this16.wirelessShare) {
|
|
2288
|
+
if (_this16.mediaProperties.shareTrack) {
|
|
2289
|
+
_this16.mediaProperties.shareTrack.onended = null;
|
|
2054
2290
|
|
|
2055
|
-
|
|
2291
|
+
_this16.mediaProperties.shareTrack.stop();
|
|
2056
2292
|
}
|
|
2057
2293
|
} // when multiple WEB deviceType join with same user
|
|
2058
2294
|
// and some of the devices are joined and some are left
|
|
@@ -2066,24 +2302,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2066
2302
|
|
|
2067
2303
|
if (payload.shouldLeave) {
|
|
2068
2304
|
// TODO: We should do cleaning of meeting object if the shouldLeave: false because there might be meeting object which we are not cleaning
|
|
2069
|
-
|
|
2305
|
+
_this16.leave({
|
|
2070
2306
|
reason: payload.reason
|
|
2071
2307
|
}).then(function () {
|
|
2072
2308
|
_loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
|
|
2073
2309
|
}).catch(function (error) {
|
|
2074
|
-
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(
|
|
2310
|
+
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this16.meeting, ", error: ").concat(error));
|
|
2075
2311
|
});
|
|
2076
2312
|
} else {
|
|
2077
2313
|
_loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
|
|
2078
2314
|
|
|
2079
|
-
_util.default.cleanUp(
|
|
2315
|
+
_util.default.cleanUp(_this16);
|
|
2080
2316
|
|
|
2081
|
-
_triggerProxy.default.trigger(
|
|
2317
|
+
_triggerProxy.default.trigger(_this16, {
|
|
2082
2318
|
file: 'meeting/index',
|
|
2083
2319
|
function: 'setUpLocusInfoMeetingListener'
|
|
2084
2320
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
2085
2321
|
reason: payload.reason,
|
|
2086
|
-
meetingId:
|
|
2322
|
+
meetingId: _this16.id
|
|
2087
2323
|
});
|
|
2088
2324
|
}
|
|
2089
2325
|
});
|
|
@@ -2100,14 +2336,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2100
2336
|
}, {
|
|
2101
2337
|
key: "updateMeetingObject",
|
|
2102
2338
|
value: function updateMeetingObject(object) {
|
|
2103
|
-
var
|
|
2339
|
+
var _this17 = this;
|
|
2104
2340
|
|
|
2105
2341
|
// Validate if these are valid meeting object property
|
|
2106
2342
|
// TODO: add a check to make sure the value passed in the constructor
|
|
2107
2343
|
// is not changed by any delta event
|
|
2108
2344
|
if (object && (0, _keys.default)(object).length) {
|
|
2109
2345
|
(0, _keys.default)(object).forEach(function (key) {
|
|
2110
|
-
|
|
2346
|
+
_this17[key] = object[key];
|
|
2111
2347
|
});
|
|
2112
2348
|
}
|
|
2113
2349
|
}
|
|
@@ -2239,7 +2475,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2239
2475
|
}, {
|
|
2240
2476
|
key: "startMediaQualityMetrics",
|
|
2241
2477
|
value: function startMediaQualityMetrics() {
|
|
2242
|
-
var
|
|
2478
|
+
var _this18 = this;
|
|
2243
2479
|
|
|
2244
2480
|
var automaticMetrics = new _metrics2.default({
|
|
2245
2481
|
config: this.config
|
|
@@ -2248,7 +2484,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2248
2484
|
this.mediaQualityMetrics = automaticMetrics;
|
|
2249
2485
|
this.mediaQualityMetrics.setStats(stats);
|
|
2250
2486
|
this.mqaInterval = setInterval(function () {
|
|
2251
|
-
return
|
|
2487
|
+
return _this18.processMQAData();
|
|
2252
2488
|
}, this.config.metrics.mqaMetricsInterval);
|
|
2253
2489
|
return automaticMetrics;
|
|
2254
2490
|
}
|
|
@@ -2261,20 +2497,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2261
2497
|
}, {
|
|
2262
2498
|
key: "processMQAData",
|
|
2263
2499
|
value: function processMQAData() {
|
|
2264
|
-
var
|
|
2500
|
+
var _this19 = this;
|
|
2265
2501
|
|
|
2266
2502
|
if (!this.mqaProcessor) {
|
|
2267
2503
|
this.mqaProcessor = new _mqaProcessor.default();
|
|
2268
2504
|
}
|
|
2269
2505
|
|
|
2270
2506
|
_constants.MQA_STATS.DATA_PLACEMENTS.forEach(function (key) {
|
|
2271
|
-
if (
|
|
2507
|
+
if (_this19.mediaQualityMetrics && _this19.mediaQualityMetrics.stats) {
|
|
2272
2508
|
var sendRecvData;
|
|
2273
2509
|
|
|
2274
2510
|
if (key.toLowerCase().endsWith(_constants.STATS.SENDER)) {
|
|
2275
|
-
sendRecvData =
|
|
2511
|
+
sendRecvData = _this19.mediaQualityMetrics.stats.getSender(key);
|
|
2276
2512
|
} else if (key.toLowerCase().endsWith(_constants.STATS.RECEIVER)) {
|
|
2277
|
-
sendRecvData =
|
|
2513
|
+
sendRecvData = _this19.mediaQualityMetrics.stats.getReceiver(key);
|
|
2278
2514
|
}
|
|
2279
2515
|
|
|
2280
2516
|
var mqa;
|
|
@@ -2284,9 +2520,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2284
2520
|
}
|
|
2285
2521
|
|
|
2286
2522
|
if (mqa) {
|
|
2287
|
-
var interval = mqa.getSlice(
|
|
2523
|
+
var interval = mqa.getSlice(_this19.config.metrics.mqaMetricsInterval / 1000); // milliseconds -> second based intervals
|
|
2288
2524
|
|
|
2289
|
-
|
|
2525
|
+
_this19.mqaProcessor.process(key, interval);
|
|
2290
2526
|
}
|
|
2291
2527
|
}
|
|
2292
2528
|
});
|
|
@@ -2553,7 +2789,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2553
2789
|
}, {
|
|
2554
2790
|
key: "setRemoteStream",
|
|
2555
2791
|
value: function setRemoteStream(pc) {
|
|
2556
|
-
var
|
|
2792
|
+
var _this20 = this;
|
|
2557
2793
|
|
|
2558
2794
|
if (!pc) {
|
|
2559
2795
|
return;
|
|
@@ -2596,8 +2832,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2596
2832
|
trackMediaID = null;
|
|
2597
2833
|
|
|
2598
2834
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE, {
|
|
2599
|
-
correlation_id:
|
|
2600
|
-
locus_id:
|
|
2835
|
+
correlation_id: _this20.correlationId,
|
|
2836
|
+
locus_id: _this20.locusUrl.split('/').pop()
|
|
2601
2837
|
});
|
|
2602
2838
|
}
|
|
2603
2839
|
}
|
|
@@ -2606,14 +2842,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2606
2842
|
case MEDIA_ID.AUDIO_TRACK:
|
|
2607
2843
|
eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
|
|
2608
2844
|
|
|
2609
|
-
|
|
2845
|
+
_this20.mediaProperties.setRemoteAudioTrack(mediaTrack);
|
|
2610
2846
|
|
|
2611
2847
|
break;
|
|
2612
2848
|
|
|
2613
2849
|
case MEDIA_ID.VIDEO_TRACK:
|
|
2614
2850
|
eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
|
|
2615
2851
|
|
|
2616
|
-
|
|
2852
|
+
_this20.mediaProperties.setRemoteVideoTrack(mediaTrack);
|
|
2617
2853
|
|
|
2618
2854
|
break;
|
|
2619
2855
|
|
|
@@ -2621,7 +2857,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2621
2857
|
if (event.track) {
|
|
2622
2858
|
eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
|
|
2623
2859
|
|
|
2624
|
-
|
|
2860
|
+
_this20.mediaProperties.setRemoteShare(mediaTrack);
|
|
2625
2861
|
}
|
|
2626
2862
|
|
|
2627
2863
|
break;
|
|
@@ -2633,10 +2869,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2633
2869
|
} // start stats here the stats are coming null if you dont receive streams
|
|
2634
2870
|
|
|
2635
2871
|
|
|
2636
|
-
|
|
2872
|
+
_this20.statsAnalyzer.startAnalyzer(_this20.mediaProperties.peerConnection);
|
|
2637
2873
|
|
|
2638
2874
|
if (eventType && mediaTrack) {
|
|
2639
|
-
_triggerProxy.default.trigger(
|
|
2875
|
+
_triggerProxy.default.trigger(_this20, {
|
|
2640
2876
|
file: 'meeting/index',
|
|
2641
2877
|
function: 'setRemoteStream:pc.ontrack'
|
|
2642
2878
|
}, _constants.EVENT_TRIGGERS.MEDIA_READY, {
|
|
@@ -2716,7 +2952,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2716
2952
|
}, {
|
|
2717
2953
|
key: "closeRemoteTracks",
|
|
2718
2954
|
value: function closeRemoteTracks() {
|
|
2719
|
-
var
|
|
2955
|
+
var _this21 = this;
|
|
2720
2956
|
|
|
2721
2957
|
var _this$mediaProperties = this.mediaProperties,
|
|
2722
2958
|
remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
|
|
@@ -2730,7 +2966,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2730
2966
|
*/
|
|
2731
2967
|
|
|
2732
2968
|
var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
|
|
2733
|
-
_triggerProxy.default.trigger(
|
|
2969
|
+
_triggerProxy.default.trigger(_this21, {
|
|
2734
2970
|
file: 'meeting/index',
|
|
2735
2971
|
function: 'closeRemoteTracks'
|
|
2736
2972
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -2885,7 +3121,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2885
3121
|
}, {
|
|
2886
3122
|
key: "setLocalShareTrack",
|
|
2887
3123
|
value: function setLocalShareTrack(localShare) {
|
|
2888
|
-
var
|
|
3124
|
+
var _this22 = this;
|
|
2889
3125
|
|
|
2890
3126
|
var settings = null;
|
|
2891
3127
|
|
|
@@ -2908,7 +3144,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2908
3144
|
}
|
|
2909
3145
|
|
|
2910
3146
|
contentTracks.onended = function () {
|
|
2911
|
-
return
|
|
3147
|
+
return _this22.handleShareTrackEnded(localShare);
|
|
2912
3148
|
};
|
|
2913
3149
|
|
|
2914
3150
|
_triggerProxy.default.trigger(this, {
|
|
@@ -2931,7 +3167,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2931
3167
|
}, {
|
|
2932
3168
|
key: "closeLocalStream",
|
|
2933
3169
|
value: function closeLocalStream() {
|
|
2934
|
-
var
|
|
3170
|
+
var _this23 = this;
|
|
2935
3171
|
|
|
2936
3172
|
var _this$mediaProperties2 = this.mediaProperties,
|
|
2937
3173
|
audioTrack = _this$mediaProperties2.audioTrack,
|
|
@@ -2943,7 +3179,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2943
3179
|
var videoStopped = videoTrack && videoTrack.readyState === _constants.ENDED;
|
|
2944
3180
|
|
|
2945
3181
|
if (audioStopped && videoStopped) {
|
|
2946
|
-
_triggerProxy.default.trigger(
|
|
3182
|
+
_triggerProxy.default.trigger(_this23, {
|
|
2947
3183
|
file: 'meeting/index',
|
|
2948
3184
|
function: 'closeLocalStream'
|
|
2949
3185
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -2965,12 +3201,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2965
3201
|
}, {
|
|
2966
3202
|
key: "closeLocalShare",
|
|
2967
3203
|
value: function closeLocalShare() {
|
|
2968
|
-
var
|
|
3204
|
+
var _this24 = this;
|
|
2969
3205
|
|
|
2970
3206
|
var track = this.mediaProperties.shareTrack;
|
|
2971
3207
|
return _media.default.stopTracks(track).then(function () {
|
|
2972
3208
|
if (track && track.readyState === _constants.ENDED) {
|
|
2973
|
-
_triggerProxy.default.trigger(
|
|
3209
|
+
_triggerProxy.default.trigger(_this24, {
|
|
2974
3210
|
file: 'meeting/index',
|
|
2975
3211
|
function: 'closeLocalShare'
|
|
2976
3212
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3016,7 +3252,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3016
3252
|
}, {
|
|
3017
3253
|
key: "setMercuryListener",
|
|
3018
3254
|
value: function setMercuryListener() {
|
|
3019
|
-
var
|
|
3255
|
+
var _this25 = this;
|
|
3020
3256
|
|
|
3021
3257
|
// Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
|
|
3022
3258
|
// if the meeting has active peer connections, it should try to reconnect.
|
|
@@ -3024,25 +3260,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3024
3260
|
_loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online'); // Only send restore event when it was disconnected before and for connected later
|
|
3025
3261
|
|
|
3026
3262
|
|
|
3027
|
-
if (!
|
|
3263
|
+
if (!_this25.hasWebsocketConnected) {
|
|
3028
3264
|
_metrics.default.postEvent({
|
|
3029
3265
|
event: _config.eventType.MERCURY_CONNECTION_RESTORED,
|
|
3030
|
-
meeting:
|
|
3266
|
+
meeting: _this25
|
|
3031
3267
|
});
|
|
3032
3268
|
}
|
|
3033
3269
|
|
|
3034
|
-
|
|
3270
|
+
_this25.hasWebsocketConnected = true;
|
|
3035
3271
|
});
|
|
3036
3272
|
this.webex.internal.mercury.on(_constants.OFFLINE, function () {
|
|
3037
3273
|
_loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
|
|
3038
3274
|
|
|
3039
3275
|
_metrics.default.postEvent({
|
|
3040
3276
|
event: _config.eventType.MERCURY_CONNECTION_LOST,
|
|
3041
|
-
meeting:
|
|
3277
|
+
meeting: _this25
|
|
3042
3278
|
});
|
|
3043
3279
|
|
|
3044
3280
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MERCURY_CONNECTION_FAILURE, {
|
|
3045
|
-
correlation_id:
|
|
3281
|
+
correlation_id: _this25.correlationId
|
|
3046
3282
|
});
|
|
3047
3283
|
});
|
|
3048
3284
|
}
|
|
@@ -3100,7 +3336,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3100
3336
|
}, {
|
|
3101
3337
|
key: "muteAudio",
|
|
3102
3338
|
value: function muteAudio() {
|
|
3103
|
-
var
|
|
3339
|
+
var _this26 = this;
|
|
3104
3340
|
|
|
3105
3341
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3106
3342
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3118,11 +3354,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3118
3354
|
var LOG_HEADER = 'Meeting:index#muteAudio -->'; // First, stop sending the local audio media
|
|
3119
3355
|
|
|
3120
3356
|
return logRequest(this.audio.handleClientRequest(this, true).then(function () {
|
|
3121
|
-
_util.default.handleAudioLogging(
|
|
3357
|
+
_util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
|
|
3122
3358
|
|
|
3123
3359
|
_metrics.default.postEvent({
|
|
3124
3360
|
event: _config.eventType.MUTED,
|
|
3125
|
-
meeting:
|
|
3361
|
+
meeting: _this26,
|
|
3126
3362
|
data: {
|
|
3127
3363
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3128
3364
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3130,8 +3366,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3130
3366
|
});
|
|
3131
3367
|
}).catch(function (error) {
|
|
3132
3368
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE, {
|
|
3133
|
-
correlation_id:
|
|
3134
|
-
locus_id:
|
|
3369
|
+
correlation_id: _this26.correlationId,
|
|
3370
|
+
locus_id: _this26.locusUrl.split('/').pop(),
|
|
3135
3371
|
reason: error.message,
|
|
3136
3372
|
stack: error.stack
|
|
3137
3373
|
});
|
|
@@ -3153,7 +3389,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3153
3389
|
}, {
|
|
3154
3390
|
key: "unmuteAudio",
|
|
3155
3391
|
value: function unmuteAudio() {
|
|
3156
|
-
var
|
|
3392
|
+
var _this27 = this;
|
|
3157
3393
|
|
|
3158
3394
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3159
3395
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3171,11 +3407,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3171
3407
|
var LOG_HEADER = 'Meeting:index#unmuteAudio -->'; // First, send the control to unmute the participant on the server
|
|
3172
3408
|
|
|
3173
3409
|
return logRequest(this.audio.handleClientRequest(this, false).then(function () {
|
|
3174
|
-
_util.default.handleAudioLogging(
|
|
3410
|
+
_util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
|
|
3175
3411
|
|
|
3176
3412
|
_metrics.default.postEvent({
|
|
3177
3413
|
event: _config.eventType.UNMUTED,
|
|
3178
|
-
meeting:
|
|
3414
|
+
meeting: _this27,
|
|
3179
3415
|
data: {
|
|
3180
3416
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3181
3417
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3183,8 +3419,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3183
3419
|
});
|
|
3184
3420
|
}).catch(function (error) {
|
|
3185
3421
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UNMUTE_AUDIO_FAILURE, {
|
|
3186
|
-
correlation_id:
|
|
3187
|
-
locus_id:
|
|
3422
|
+
correlation_id: _this27.correlationId,
|
|
3423
|
+
locus_id: _this27.locusUrl.split('/').pop(),
|
|
3188
3424
|
reason: error.message,
|
|
3189
3425
|
stack: error.stack
|
|
3190
3426
|
});
|
|
@@ -3206,7 +3442,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3206
3442
|
}, {
|
|
3207
3443
|
key: "muteVideo",
|
|
3208
3444
|
value: function muteVideo() {
|
|
3209
|
-
var
|
|
3445
|
+
var _this28 = this;
|
|
3210
3446
|
|
|
3211
3447
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3212
3448
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3223,11 +3459,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3223
3459
|
|
|
3224
3460
|
var LOG_HEADER = 'Meeting:index#muteVideo -->';
|
|
3225
3461
|
return logRequest(this.video.handleClientRequest(this, true).then(function () {
|
|
3226
|
-
_util.default.handleVideoLogging(
|
|
3462
|
+
_util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
|
|
3227
3463
|
|
|
3228
3464
|
_metrics.default.postEvent({
|
|
3229
3465
|
event: _config.eventType.MUTED,
|
|
3230
|
-
meeting:
|
|
3466
|
+
meeting: _this28,
|
|
3231
3467
|
data: {
|
|
3232
3468
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3233
3469
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3235,8 +3471,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3235
3471
|
});
|
|
3236
3472
|
}).catch(function (error) {
|
|
3237
3473
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_VIDEO_FAILURE, {
|
|
3238
|
-
correlation_id:
|
|
3239
|
-
locus_id:
|
|
3474
|
+
correlation_id: _this28.correlationId,
|
|
3475
|
+
locus_id: _this28.locusUrl.split('/').pop(),
|
|
3240
3476
|
reason: error.message,
|
|
3241
3477
|
stack: error.stack
|
|
3242
3478
|
});
|
|
@@ -3258,7 +3494,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3258
3494
|
}, {
|
|
3259
3495
|
key: "unmuteVideo",
|
|
3260
3496
|
value: function unmuteVideo() {
|
|
3261
|
-
var
|
|
3497
|
+
var _this29 = this;
|
|
3262
3498
|
|
|
3263
3499
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3264
3500
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3275,11 +3511,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3275
3511
|
|
|
3276
3512
|
var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
|
|
3277
3513
|
return logRequest(this.video.handleClientRequest(this, false).then(function () {
|
|
3278
|
-
_util.default.handleVideoLogging(
|
|
3514
|
+
_util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
|
|
3279
3515
|
|
|
3280
3516
|
_metrics.default.postEvent({
|
|
3281
3517
|
event: _config.eventType.UNMUTED,
|
|
3282
|
-
meeting:
|
|
3518
|
+
meeting: _this29,
|
|
3283
3519
|
data: {
|
|
3284
3520
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3285
3521
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3287,8 +3523,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3287
3523
|
});
|
|
3288
3524
|
}).catch(function (error) {
|
|
3289
3525
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UNMUTE_VIDEO_FAILURE, {
|
|
3290
|
-
correlation_id:
|
|
3291
|
-
locus_id:
|
|
3526
|
+
correlation_id: _this29.correlationId,
|
|
3527
|
+
locus_id: _this29.locusUrl.split('/').pop(),
|
|
3292
3528
|
reason: error.message,
|
|
3293
3529
|
stack: error.stack
|
|
3294
3530
|
});
|
|
@@ -3329,7 +3565,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3329
3565
|
}, {
|
|
3330
3566
|
key: "joinWithMedia",
|
|
3331
3567
|
value: function joinWithMedia() {
|
|
3332
|
-
var
|
|
3568
|
+
var _this30 = this;
|
|
3333
3569
|
|
|
3334
3570
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3335
3571
|
// TODO: add validations for parameters
|
|
@@ -3337,12 +3573,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3337
3573
|
joinOptions = options.joinOptions,
|
|
3338
3574
|
audioVideoOptions = options.audioVideoOptions;
|
|
3339
3575
|
return this.join(joinOptions).then(function (joinResponse) {
|
|
3340
|
-
return
|
|
3341
|
-
var
|
|
3342
|
-
localStream =
|
|
3343
|
-
localShare =
|
|
3576
|
+
return _this30.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref6) {
|
|
3577
|
+
var _ref7 = (0, _slicedToArray2.default)(_ref6, 2),
|
|
3578
|
+
localStream = _ref7[0],
|
|
3579
|
+
localShare = _ref7[1];
|
|
3344
3580
|
|
|
3345
|
-
return
|
|
3581
|
+
return _this30.addMedia({
|
|
3346
3582
|
mediaSettings: mediaSettings,
|
|
3347
3583
|
localShare: localShare,
|
|
3348
3584
|
localStream: localStream
|
|
@@ -3358,8 +3594,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3358
3594
|
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
|
|
3359
3595
|
|
|
3360
3596
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.JOIN_WITH_MEDIA_FAILURE, {
|
|
3361
|
-
correlation_id:
|
|
3362
|
-
locus_id:
|
|
3597
|
+
correlation_id: _this30.correlationId,
|
|
3598
|
+
locus_id: _this30.locusUrl.split('/').pop(),
|
|
3363
3599
|
reason: error.message,
|
|
3364
3600
|
stack: error.stack
|
|
3365
3601
|
}, {
|
|
@@ -3381,7 +3617,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3381
3617
|
}, {
|
|
3382
3618
|
key: "reconnect",
|
|
3383
3619
|
value: function reconnect(options) {
|
|
3384
|
-
var
|
|
3620
|
+
var _this31 = this;
|
|
3385
3621
|
|
|
3386
3622
|
_loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
|
|
3387
3623
|
|
|
@@ -3414,14 +3650,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3414
3650
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
|
|
3415
3651
|
|
|
3416
3652
|
return this.reconnectionManager.reconnect(options).then(function () {
|
|
3417
|
-
_triggerProxy.default.trigger(
|
|
3653
|
+
_triggerProxy.default.trigger(_this31, {
|
|
3418
3654
|
file: 'meeting/index',
|
|
3419
3655
|
function: 'reconnect'
|
|
3420
3656
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
|
|
3421
3657
|
|
|
3422
3658
|
_loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
|
|
3423
3659
|
}).catch(function (error) {
|
|
3424
|
-
_triggerProxy.default.trigger(
|
|
3660
|
+
_triggerProxy.default.trigger(_this31, {
|
|
3425
3661
|
file: 'meeting/index',
|
|
3426
3662
|
function: 'reconnect'
|
|
3427
3663
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
|
|
@@ -3431,20 +3667,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3431
3667
|
_loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
|
|
3432
3668
|
|
|
3433
3669
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_RECONNECT_FAILURE, {
|
|
3434
|
-
correlation_id:
|
|
3435
|
-
locus_id:
|
|
3670
|
+
correlation_id: _this31.correlationId,
|
|
3671
|
+
locus_id: _this31.locusUrl.split('/').pop(),
|
|
3436
3672
|
reason: error.message,
|
|
3437
3673
|
stack: error.stack
|
|
3438
3674
|
});
|
|
3439
3675
|
|
|
3440
|
-
|
|
3676
|
+
_this31.uploadLogs({
|
|
3441
3677
|
file: 'meeting/index',
|
|
3442
3678
|
function: 'reconnect'
|
|
3443
3679
|
});
|
|
3444
3680
|
|
|
3445
3681
|
return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
|
|
3446
3682
|
}).finally(function () {
|
|
3447
|
-
|
|
3683
|
+
_this31.reconnectionManager.reset();
|
|
3448
3684
|
});
|
|
3449
3685
|
}
|
|
3450
3686
|
/**
|
|
@@ -3475,20 +3711,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3475
3711
|
}, {
|
|
3476
3712
|
key: "monitorTranscriptionSocketConnection",
|
|
3477
3713
|
value: function monitorTranscriptionSocketConnection() {
|
|
3478
|
-
var
|
|
3714
|
+
var _this32 = this;
|
|
3479
3715
|
|
|
3480
3716
|
this.transcription.onCloseSocket(function (event) {
|
|
3481
3717
|
_loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
|
|
3482
3718
|
|
|
3483
|
-
|
|
3719
|
+
_this32.triggerStopReceivingTranscriptionEvent();
|
|
3484
3720
|
});
|
|
3485
3721
|
this.transcription.onErrorSocket(function (event) {
|
|
3486
3722
|
_loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
|
|
3487
3723
|
|
|
3488
|
-
|
|
3724
|
+
_this32.triggerStopReceivingTranscriptionEvent();
|
|
3489
3725
|
|
|
3490
3726
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
3491
|
-
correlation_id:
|
|
3727
|
+
correlation_id: _this32.correlationId,
|
|
3492
3728
|
reason: 'unexpected error: transcription LLM web socket connection error had occured.',
|
|
3493
3729
|
event: event
|
|
3494
3730
|
});
|
|
@@ -3503,20 +3739,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3503
3739
|
}, {
|
|
3504
3740
|
key: "receiveTranscription",
|
|
3505
3741
|
value: function () {
|
|
3506
|
-
var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3507
|
-
var
|
|
3742
|
+
var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
3743
|
+
var _this33 = this;
|
|
3508
3744
|
|
|
3509
3745
|
var datachannelUrl, _yield$this$request, webSocketUrl;
|
|
3510
3746
|
|
|
3511
|
-
return _regenerator.default.wrap(function
|
|
3747
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
3512
3748
|
while (1) {
|
|
3513
|
-
switch (
|
|
3749
|
+
switch (_context2.prev = _context2.next) {
|
|
3514
3750
|
case 0:
|
|
3515
3751
|
_loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Attempting to generate a web socket url.");
|
|
3516
3752
|
|
|
3517
|
-
|
|
3753
|
+
_context2.prev = 1;
|
|
3518
3754
|
datachannelUrl = this.locusInfo.info.datachannelUrl;
|
|
3519
|
-
|
|
3755
|
+
_context2.next = 5;
|
|
3520
3756
|
return this.request({
|
|
3521
3757
|
method: _constants.HTTP_VERBS.POST,
|
|
3522
3758
|
uri: datachannelUrl,
|
|
@@ -3526,7 +3762,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3526
3762
|
});
|
|
3527
3763
|
|
|
3528
3764
|
case 5:
|
|
3529
|
-
_yield$this$request =
|
|
3765
|
+
_yield$this$request = _context2.sent;
|
|
3530
3766
|
webSocketUrl = _yield$this$request.body.webSocketUrl;
|
|
3531
3767
|
|
|
3532
3768
|
_loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Generated web socket url succesfully.");
|
|
@@ -3537,34 +3773,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3537
3773
|
|
|
3538
3774
|
|
|
3539
3775
|
this.transcription.subscribe(function (payload) {
|
|
3540
|
-
_triggerProxy.default.trigger(
|
|
3776
|
+
_triggerProxy.default.trigger(_this33, {
|
|
3541
3777
|
file: 'meeting/index',
|
|
3542
3778
|
function: 'join'
|
|
3543
3779
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
|
|
3544
3780
|
});
|
|
3545
3781
|
this.monitorTranscriptionSocketConnection();
|
|
3546
3782
|
this.transcription.connect(this.webex.credentials.supertoken.access_token);
|
|
3547
|
-
|
|
3783
|
+
_context2.next = 19;
|
|
3548
3784
|
break;
|
|
3549
3785
|
|
|
3550
3786
|
case 15:
|
|
3551
|
-
|
|
3552
|
-
|
|
3787
|
+
_context2.prev = 15;
|
|
3788
|
+
_context2.t0 = _context2["catch"](1);
|
|
3553
3789
|
|
|
3554
|
-
_loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(
|
|
3790
|
+
_loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(_context2.t0));
|
|
3555
3791
|
|
|
3556
3792
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
3557
3793
|
correlation_id: this.correlationId,
|
|
3558
|
-
reason:
|
|
3559
|
-
stack:
|
|
3794
|
+
reason: _context2.t0.message,
|
|
3795
|
+
stack: _context2.t0.stack
|
|
3560
3796
|
});
|
|
3561
3797
|
|
|
3562
3798
|
case 19:
|
|
3563
3799
|
case "end":
|
|
3564
|
-
return
|
|
3800
|
+
return _context2.stop();
|
|
3565
3801
|
}
|
|
3566
3802
|
}
|
|
3567
|
-
},
|
|
3803
|
+
}, _callee2, this, [[1, 15]]);
|
|
3568
3804
|
}));
|
|
3569
3805
|
|
|
3570
3806
|
function receiveTranscription() {
|
|
@@ -3619,7 +3855,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3619
3855
|
}, {
|
|
3620
3856
|
key: "join",
|
|
3621
3857
|
value: function join() {
|
|
3622
|
-
var
|
|
3858
|
+
var _this34 = this;
|
|
3623
3859
|
|
|
3624
3860
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3625
3861
|
|
|
@@ -3638,8 +3874,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3638
3874
|
joinSuccess = resolve;
|
|
3639
3875
|
});
|
|
3640
3876
|
|
|
3641
|
-
if (this.
|
|
3642
|
-
this.
|
|
3877
|
+
if (!this.hasJoinedOnce) {
|
|
3878
|
+
this.hasJoinedOnce = true;
|
|
3643
3879
|
} else {
|
|
3644
3880
|
_loggerProxy.default.logger.log("Meeting:index#join --> Generating a new correlation id for meeting ".concat(this.id));
|
|
3645
3881
|
|
|
@@ -3722,85 +3958,85 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3722
3958
|
}
|
|
3723
3959
|
|
|
3724
3960
|
return _util.default.joinMeetingOptions(this, options).then(function (join) {
|
|
3725
|
-
|
|
3961
|
+
_this34.meetingFiniteStateMachine.join();
|
|
3726
3962
|
|
|
3727
3963
|
_loggerProxy.default.logger.log('Meeting:index#join --> Success');
|
|
3728
3964
|
|
|
3729
3965
|
return join;
|
|
3730
3966
|
}).then(function (join) {
|
|
3731
3967
|
joinSuccess(join);
|
|
3732
|
-
|
|
3968
|
+
_this34.deferJoin = undefined;
|
|
3733
3969
|
return join;
|
|
3734
3970
|
}).then( /*#__PURE__*/function () {
|
|
3735
|
-
var
|
|
3736
|
-
return _regenerator.default.wrap(function
|
|
3971
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(join) {
|
|
3972
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
3737
3973
|
while (1) {
|
|
3738
|
-
switch (
|
|
3974
|
+
switch (_context3.prev = _context3.next) {
|
|
3739
3975
|
case 0:
|
|
3740
3976
|
if (!isBrowser) {
|
|
3741
|
-
|
|
3977
|
+
_context3.next = 8;
|
|
3742
3978
|
break;
|
|
3743
3979
|
}
|
|
3744
3980
|
|
|
3745
|
-
if (!(
|
|
3746
|
-
|
|
3981
|
+
if (!(_this34.config.receiveTranscription || options.receiveTranscription)) {
|
|
3982
|
+
_context3.next = 6;
|
|
3747
3983
|
break;
|
|
3748
3984
|
}
|
|
3749
3985
|
|
|
3750
|
-
if (!
|
|
3751
|
-
|
|
3986
|
+
if (!_this34.isTranscriptionSupported()) {
|
|
3987
|
+
_context3.next = 6;
|
|
3752
3988
|
break;
|
|
3753
3989
|
}
|
|
3754
3990
|
|
|
3755
|
-
|
|
3756
|
-
return
|
|
3991
|
+
_context3.next = 5;
|
|
3992
|
+
return _this34.receiveTranscription();
|
|
3757
3993
|
|
|
3758
3994
|
case 5:
|
|
3759
3995
|
_loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
|
|
3760
3996
|
|
|
3761
3997
|
case 6:
|
|
3762
|
-
|
|
3998
|
+
_context3.next = 9;
|
|
3763
3999
|
break;
|
|
3764
4000
|
|
|
3765
4001
|
case 8:
|
|
3766
4002
|
_loggerProxy.default.logger.error('Meeting:index#join --> Receving transcription is not supported on this platform');
|
|
3767
4003
|
|
|
3768
4004
|
case 9:
|
|
3769
|
-
return
|
|
4005
|
+
return _context3.abrupt("return", join);
|
|
3770
4006
|
|
|
3771
4007
|
case 10:
|
|
3772
4008
|
case "end":
|
|
3773
|
-
return
|
|
4009
|
+
return _context3.stop();
|
|
3774
4010
|
}
|
|
3775
4011
|
}
|
|
3776
|
-
},
|
|
4012
|
+
}, _callee3);
|
|
3777
4013
|
}));
|
|
3778
4014
|
|
|
3779
|
-
return function (
|
|
3780
|
-
return
|
|
4015
|
+
return function (_x2) {
|
|
4016
|
+
return _ref8.apply(this, arguments);
|
|
3781
4017
|
};
|
|
3782
4018
|
}()).catch(function (error) {
|
|
3783
4019
|
var _error$error;
|
|
3784
4020
|
|
|
3785
|
-
|
|
4021
|
+
_this34.meetingFiniteStateMachine.fail(error);
|
|
3786
4022
|
|
|
3787
4023
|
_loggerProxy.default.logger.error('Meeting:index#join --> Failed', error); // TODO: change this to error codes and pre defined dictionary
|
|
3788
4024
|
|
|
3789
4025
|
|
|
3790
4026
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.JOIN_FAILURE, {
|
|
3791
|
-
correlation_id:
|
|
4027
|
+
correlation_id: _this34.correlationId,
|
|
3792
4028
|
reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
|
|
3793
4029
|
stack: error.stack
|
|
3794
4030
|
}); // Upload logs on join Failure
|
|
3795
4031
|
|
|
3796
4032
|
|
|
3797
|
-
_triggerProxy.default.trigger(
|
|
4033
|
+
_triggerProxy.default.trigger(_this34, {
|
|
3798
4034
|
file: 'meeting/index',
|
|
3799
4035
|
function: 'join'
|
|
3800
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4036
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
|
|
3801
4037
|
|
|
3802
4038
|
joinFailed(error);
|
|
3803
|
-
|
|
4039
|
+
_this34.deferJoin = undefined;
|
|
3804
4040
|
return _promise.default.reject(error);
|
|
3805
4041
|
});
|
|
3806
4042
|
}
|
|
@@ -3844,7 +4080,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3844
4080
|
}, {
|
|
3845
4081
|
key: "dialInPstn",
|
|
3846
4082
|
value: function dialInPstn() {
|
|
3847
|
-
var
|
|
4083
|
+
var _this35 = this;
|
|
3848
4084
|
|
|
3849
4085
|
if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
|
|
3850
4086
|
|
|
@@ -3857,15 +4093,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3857
4093
|
locusUrl: locusUrl,
|
|
3858
4094
|
clientUrl: this.deviceUrl
|
|
3859
4095
|
}).then(function (res) {
|
|
3860
|
-
|
|
4096
|
+
_this35.locusInfo.onFullLocus(res.body.locus);
|
|
3861
4097
|
}).catch(function (error) {
|
|
3862
4098
|
var _error$error2;
|
|
3863
4099
|
|
|
3864
4100
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_IN_FAILURE, {
|
|
3865
|
-
correlation_id:
|
|
3866
|
-
dial_in_url:
|
|
4101
|
+
correlation_id: _this35.correlationId,
|
|
4102
|
+
dial_in_url: _this35.dialInUrl,
|
|
3867
4103
|
locus_id: locusUrl.split('/').pop(),
|
|
3868
|
-
client_url:
|
|
4104
|
+
client_url: _this35.deviceUrl,
|
|
3869
4105
|
reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
|
|
3870
4106
|
stack: error.stack
|
|
3871
4107
|
});
|
|
@@ -3884,7 +4120,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3884
4120
|
}, {
|
|
3885
4121
|
key: "dialOutPstn",
|
|
3886
4122
|
value: function dialOutPstn(phoneNumber) {
|
|
3887
|
-
var
|
|
4123
|
+
var _this36 = this;
|
|
3888
4124
|
|
|
3889
4125
|
if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
|
|
3890
4126
|
|
|
@@ -3898,15 +4134,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3898
4134
|
locusUrl: locusUrl,
|
|
3899
4135
|
clientUrl: this.deviceUrl
|
|
3900
4136
|
}).then(function (res) {
|
|
3901
|
-
|
|
4137
|
+
_this36.locusInfo.onFullLocus(res.body.locus);
|
|
3902
4138
|
}).catch(function (error) {
|
|
3903
4139
|
var _error$error3;
|
|
3904
4140
|
|
|
3905
4141
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_OUT_FAILURE, {
|
|
3906
|
-
correlation_id:
|
|
3907
|
-
dial_out_url:
|
|
4142
|
+
correlation_id: _this36.correlationId,
|
|
4143
|
+
dial_out_url: _this36.dialOutUrl,
|
|
3908
4144
|
locus_id: locusUrl.split('/').pop(),
|
|
3909
|
-
client_url:
|
|
4145
|
+
client_url: _this36.deviceUrl,
|
|
3910
4146
|
reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
|
|
3911
4147
|
stack: error.stack
|
|
3912
4148
|
});
|
|
@@ -3938,7 +4174,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3938
4174
|
}, {
|
|
3939
4175
|
key: "moveTo",
|
|
3940
4176
|
value: function moveTo(resourceId) {
|
|
3941
|
-
var
|
|
4177
|
+
var _this37 = this;
|
|
3942
4178
|
|
|
3943
4179
|
if (!resourceId) {
|
|
3944
4180
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -3976,9 +4212,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3976
4212
|
resourceId: resourceId,
|
|
3977
4213
|
moveToResource: true
|
|
3978
4214
|
}).then(function () {
|
|
3979
|
-
|
|
4215
|
+
_this37.meetingFiniteStateMachine.join();
|
|
3980
4216
|
|
|
3981
|
-
return
|
|
4217
|
+
return _this37.updateMedia({
|
|
3982
4218
|
mediaSettings: {
|
|
3983
4219
|
sendVideo: false,
|
|
3984
4220
|
receiveVideo: false,
|
|
@@ -3988,10 +4224,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3988
4224
|
receiveShare: false
|
|
3989
4225
|
}
|
|
3990
4226
|
}).then(function () {
|
|
3991
|
-
return _promise.default.resolve(
|
|
4227
|
+
return _promise.default.resolve(_this37);
|
|
3992
4228
|
});
|
|
3993
4229
|
}).catch(function (error) {
|
|
3994
|
-
|
|
4230
|
+
_this37.meetingFiniteStateMachine.fail(error);
|
|
3995
4231
|
|
|
3996
4232
|
return _promise.default.reject(error);
|
|
3997
4233
|
});
|
|
@@ -4007,7 +4243,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4007
4243
|
}, {
|
|
4008
4244
|
key: "moveFrom",
|
|
4009
4245
|
value: function moveFrom(resourceId) {
|
|
4010
|
-
var
|
|
4246
|
+
var _this38 = this;
|
|
4011
4247
|
|
|
4012
4248
|
if (!resourceId) {
|
|
4013
4249
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -4046,16 +4282,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4046
4282
|
});
|
|
4047
4283
|
|
|
4048
4284
|
return _util.default.joinMeetingOptions(this).then(function (join) {
|
|
4049
|
-
return
|
|
4285
|
+
return _this38.getMediaStreams({
|
|
4050
4286
|
sendAudio: true,
|
|
4051
4287
|
sendVideo: true,
|
|
4052
4288
|
sendShare: false
|
|
4053
|
-
}).then(function (
|
|
4054
|
-
var
|
|
4055
|
-
localStream =
|
|
4056
|
-
localShare =
|
|
4289
|
+
}).then(function (_ref9) {
|
|
4290
|
+
var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
|
|
4291
|
+
localStream = _ref10[0],
|
|
4292
|
+
localShare = _ref10[1];
|
|
4057
4293
|
|
|
4058
|
-
return
|
|
4294
|
+
return _this38.updateMedia({
|
|
4059
4295
|
mediaSettings: {
|
|
4060
4296
|
sendAudio: true,
|
|
4061
4297
|
receiveAudio: true,
|
|
@@ -4070,14 +4306,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4070
4306
|
return _promise.default.resolve(join);
|
|
4071
4307
|
});
|
|
4072
4308
|
}).then(function () {
|
|
4073
|
-
return _util.default.leaveMeeting(
|
|
4309
|
+
return _util.default.leaveMeeting(_this38, {
|
|
4074
4310
|
resourceId: resourceId,
|
|
4075
4311
|
correlationId: oldCorrelationId,
|
|
4076
4312
|
moveMeeting: true
|
|
4077
4313
|
});
|
|
4078
4314
|
});
|
|
4079
4315
|
}).then(function () {
|
|
4080
|
-
|
|
4316
|
+
_this38.webex.meetings.meetingCollection.delete(_this38.id);
|
|
4081
4317
|
|
|
4082
4318
|
return _promise.default.resolve();
|
|
4083
4319
|
});
|
|
@@ -4108,7 +4344,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4108
4344
|
* @memberof Meeting
|
|
4109
4345
|
*/
|
|
4110
4346
|
function addMedia() {
|
|
4111
|
-
var
|
|
4347
|
+
var _this39 = this;
|
|
4112
4348
|
|
|
4113
4349
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4114
4350
|
var LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
@@ -4156,54 +4392,54 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4156
4392
|
});
|
|
4157
4393
|
|
|
4158
4394
|
return _util.default.validateOptions(options).then(function () {
|
|
4159
|
-
|
|
4395
|
+
_this39.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
|
|
4160
4396
|
|
|
4161
|
-
|
|
4397
|
+
_this39.setMercuryListener();
|
|
4162
4398
|
|
|
4163
|
-
_peerConnectionManager.default.setPeerConnectionEvents(
|
|
4399
|
+
_peerConnectionManager.default.setPeerConnectionEvents(_this39);
|
|
4164
4400
|
|
|
4165
|
-
return
|
|
4401
|
+
return _this39.preMedia(localStream, localShare, mediaSettings);
|
|
4166
4402
|
}).then(function () {
|
|
4167
|
-
return _media.default.attachMedia(
|
|
4168
|
-
meetingId:
|
|
4169
|
-
remoteQualityLevel:
|
|
4170
|
-
enableRtx:
|
|
4171
|
-
enableExtmap:
|
|
4172
|
-
setStartLocalSDPGenRemoteSDPRecvDelay:
|
|
4403
|
+
return _media.default.attachMedia(_this39.mediaProperties, {
|
|
4404
|
+
meetingId: _this39.id,
|
|
4405
|
+
remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
|
|
4406
|
+
enableRtx: _this39.config.enableRtx,
|
|
4407
|
+
enableExtmap: _this39.config.enableExtmap,
|
|
4408
|
+
setStartLocalSDPGenRemoteSDPRecvDelay: _this39.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this39)
|
|
4173
4409
|
}).then(function (peerConnection) {
|
|
4174
|
-
return
|
|
4410
|
+
return _this39.getDevices().then(function (devices) {
|
|
4175
4411
|
_util.default.handleDeviceLogging(devices);
|
|
4176
4412
|
|
|
4177
4413
|
return peerConnection;
|
|
4178
4414
|
});
|
|
4179
4415
|
}).then(function (peerConnection) {
|
|
4180
|
-
|
|
4416
|
+
_this39.handleMediaLogging(_this39.mediaProperties);
|
|
4181
4417
|
|
|
4182
4418
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
4183
4419
|
|
|
4184
|
-
|
|
4420
|
+
_this39.setRemoteStream(peerConnection);
|
|
4185
4421
|
|
|
4186
|
-
_util.default.startInternalStats(
|
|
4422
|
+
_util.default.startInternalStats(_this39);
|
|
4187
4423
|
|
|
4188
|
-
if (
|
|
4189
|
-
|
|
4424
|
+
if (_this39.config.metrics.autoSendMQA) {
|
|
4425
|
+
_this39.startMediaQualityMetrics();
|
|
4190
4426
|
}
|
|
4191
4427
|
|
|
4192
|
-
if (
|
|
4428
|
+
if (_this39.config.stats.enableStatsAnalyzer) {
|
|
4193
4429
|
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4194
|
-
|
|
4195
|
-
|
|
4430
|
+
_this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
|
|
4431
|
+
_this39.statsAnalyzer = new _statsAnalyzer.default(_this39.config.stats, _this39.networkQualityMonitor);
|
|
4196
4432
|
|
|
4197
|
-
|
|
4198
|
-
var
|
|
4433
|
+
_this39.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
|
|
4434
|
+
var _this39$webex$meeting;
|
|
4199
4435
|
|
|
4200
4436
|
// TODO: might have to send the same event to the developer
|
|
4201
4437
|
// Add ip address info if geo hint is present
|
|
4202
|
-
options.data.intervalMetadata.peerReflexiveIP = ((
|
|
4438
|
+
options.data.intervalMetadata.peerReflexiveIP = ((_this39$webex$meeting = _this39.webex.meetings.geoHintInfo) === null || _this39$webex$meeting === void 0 ? void 0 : _this39$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
|
|
4203
4439
|
|
|
4204
4440
|
_metrics.default.postEvent({
|
|
4205
4441
|
event: _config.eventType.MEDIA_QUALITY,
|
|
4206
|
-
meeting:
|
|
4442
|
+
meeting: _this39,
|
|
4207
4443
|
data: {
|
|
4208
4444
|
intervalData: options.data,
|
|
4209
4445
|
networkType: options.networkType
|
|
@@ -4211,14 +4447,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4211
4447
|
});
|
|
4212
4448
|
});
|
|
4213
4449
|
|
|
4214
|
-
|
|
4450
|
+
_this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
|
|
4215
4451
|
}
|
|
4216
4452
|
}).catch(function (error) {
|
|
4217
4453
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4218
4454
|
|
|
4219
4455
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
|
|
4220
|
-
correlation_id:
|
|
4221
|
-
locus_id:
|
|
4456
|
+
correlation_id: _this39.correlationId,
|
|
4457
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
4222
4458
|
reason: error.message,
|
|
4223
4459
|
stack: error.stack
|
|
4224
4460
|
});
|
|
@@ -4229,14 +4465,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4229
4465
|
var timerCount = 0; // eslint-disable-next-line func-names
|
|
4230
4466
|
// eslint-disable-next-line prefer-arrow-callback
|
|
4231
4467
|
|
|
4232
|
-
if (
|
|
4468
|
+
if (_this39.type === _constants._CALL_) {
|
|
4233
4469
|
resolve();
|
|
4234
4470
|
}
|
|
4235
4471
|
|
|
4236
4472
|
var joiningTimer = setInterval(function () {
|
|
4237
4473
|
timerCount += 1;
|
|
4238
4474
|
|
|
4239
|
-
if (
|
|
4475
|
+
if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4240
4476
|
clearInterval(joiningTimer);
|
|
4241
4477
|
resolve();
|
|
4242
4478
|
}
|
|
@@ -4248,10 +4484,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4248
4484
|
}, 1000);
|
|
4249
4485
|
});
|
|
4250
4486
|
}).then(function () {
|
|
4251
|
-
return logRequest(
|
|
4252
|
-
sdp:
|
|
4253
|
-
roapSeq:
|
|
4254
|
-
meeting:
|
|
4487
|
+
return logRequest(_this39.roap.sendRoapMediaRequest({
|
|
4488
|
+
sdp: _this39.mediaProperties.peerConnection.sdp,
|
|
4489
|
+
roapSeq: _this39.roapSeq,
|
|
4490
|
+
meeting: _this39 // or can pass meeting ID
|
|
4255
4491
|
|
|
4256
4492
|
}), {
|
|
4257
4493
|
header: "".concat(LOG_HEADER, " Send Roap Media Request."),
|
|
@@ -4259,7 +4495,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4259
4495
|
failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
|
|
4260
4496
|
});
|
|
4261
4497
|
}).then(function () {
|
|
4262
|
-
var peerConnection =
|
|
4498
|
+
var peerConnection = _this39.mediaProperties.peerConnection;
|
|
4263
4499
|
return new _promise.default(function (resolve, reject) {
|
|
4264
4500
|
if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
|
|
4265
4501
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
@@ -4280,7 +4516,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4280
4516
|
}
|
|
4281
4517
|
}, _constants.PC_BAIL_TIMEOUT);
|
|
4282
4518
|
|
|
4283
|
-
|
|
4519
|
+
_this39.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
|
|
4284
4520
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
|
|
4285
4521
|
|
|
4286
4522
|
clearTimeout(stabilityTimeout);
|
|
@@ -4289,51 +4525,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4289
4525
|
});
|
|
4290
4526
|
}).then(function () {
|
|
4291
4527
|
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4292
|
-
if (
|
|
4293
|
-
return
|
|
4528
|
+
if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4529
|
+
return _this39.share();
|
|
4294
4530
|
} // When the self state changes to JOINED then request the floor
|
|
4295
4531
|
|
|
4296
4532
|
|
|
4297
|
-
|
|
4533
|
+
_this39.floorGrantPending = true;
|
|
4298
4534
|
}
|
|
4299
4535
|
|
|
4300
4536
|
return _promise.default.resolve();
|
|
4301
4537
|
});
|
|
4302
4538
|
}).catch(function (error) {
|
|
4303
4539
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4304
|
-
if (
|
|
4305
|
-
|
|
4540
|
+
if (_this39.statsAnalyzer) {
|
|
4541
|
+
_this39.statsAnalyzer.stopAnalyzer();
|
|
4306
4542
|
|
|
4307
|
-
|
|
4543
|
+
_this39.statsAnalyzer = null;
|
|
4308
4544
|
}
|
|
4309
4545
|
|
|
4310
|
-
if (
|
|
4311
|
-
|
|
4546
|
+
if (_this39.mediaProperties.peerConnection) {
|
|
4547
|
+
_this39.closePeerConnections();
|
|
4312
4548
|
|
|
4313
|
-
|
|
4549
|
+
_this39.unsetPeerConnections();
|
|
4314
4550
|
}
|
|
4315
4551
|
|
|
4316
4552
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
|
|
4317
4553
|
|
|
4318
4554
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
|
|
4319
|
-
correlation_id:
|
|
4320
|
-
locus_id:
|
|
4555
|
+
correlation_id: _this39.correlationId,
|
|
4556
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
4321
4557
|
reason: error.message,
|
|
4322
4558
|
stack: error.stack,
|
|
4323
4559
|
code: error.code
|
|
4324
4560
|
}); // Upload logs on error while adding media
|
|
4325
4561
|
|
|
4326
4562
|
|
|
4327
|
-
_triggerProxy.default.trigger(
|
|
4563
|
+
_triggerProxy.default.trigger(_this39, {
|
|
4328
4564
|
file: 'meeting/index',
|
|
4329
4565
|
function: 'addMedia'
|
|
4330
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4566
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39); // If addMedia failes for not establishing connection then
|
|
4331
4567
|
// leave the meeting with reson connection failed as meeting anyways will end
|
|
4332
4568
|
// and cannot be connected unless network condition is checked for firewall
|
|
4333
4569
|
|
|
4334
4570
|
|
|
4335
4571
|
if (error.code === _webexErrors.InvalidSdpError.CODE) {
|
|
4336
|
-
|
|
4572
|
+
_this39.leave({
|
|
4337
4573
|
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
4338
4574
|
});
|
|
4339
4575
|
}
|
|
@@ -4363,7 +4599,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4363
4599
|
}, {
|
|
4364
4600
|
key: "enqueueMediaUpdate",
|
|
4365
4601
|
value: function enqueueMediaUpdate(mediaUpdateType, options) {
|
|
4366
|
-
var
|
|
4602
|
+
var _this40 = this;
|
|
4367
4603
|
|
|
4368
4604
|
return new _promise.default(function (resolve, reject) {
|
|
4369
4605
|
var queueItem = {
|
|
@@ -4375,7 +4611,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4375
4611
|
|
|
4376
4612
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
4377
4613
|
|
|
4378
|
-
|
|
4614
|
+
_this40.queuedMediaUpdates.push(queueItem);
|
|
4379
4615
|
});
|
|
4380
4616
|
}
|
|
4381
4617
|
/**
|
|
@@ -4401,7 +4637,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4401
4637
|
* @memberof Meeting
|
|
4402
4638
|
*/
|
|
4403
4639
|
function updateMedia() {
|
|
4404
|
-
var
|
|
4640
|
+
var _this41 = this;
|
|
4405
4641
|
|
|
4406
4642
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4407
4643
|
var LOG_HEADER = 'Meeting:index#updateMedia -->';
|
|
@@ -4415,17 +4651,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4415
4651
|
mediaSettings = options.mediaSettings;
|
|
4416
4652
|
var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
|
|
4417
4653
|
return _util.default.validateOptions(options).then(function () {
|
|
4418
|
-
return
|
|
4654
|
+
return _this41.preMedia(localStream, localShare, mediaSettings);
|
|
4419
4655
|
}).then(function () {
|
|
4420
|
-
return _media.default.updateMedia(
|
|
4421
|
-
meetingId:
|
|
4422
|
-
remoteQualityLevel:
|
|
4423
|
-
enableRtx:
|
|
4424
|
-
enableExtmap:
|
|
4656
|
+
return _media.default.updateMedia(_this41.mediaProperties, {
|
|
4657
|
+
meetingId: _this41.id,
|
|
4658
|
+
remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel,
|
|
4659
|
+
enableRtx: _this41.config.enableRtx,
|
|
4660
|
+
enableExtmap: _this41.config.enableExtmap
|
|
4425
4661
|
}).then(function (peerConnection) {
|
|
4426
4662
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
|
|
4427
4663
|
|
|
4428
|
-
|
|
4664
|
+
_this41.setRemoteStream(peerConnection);
|
|
4429
4665
|
|
|
4430
4666
|
if (mediaSettings.receiveShare || localShare) {
|
|
4431
4667
|
_peerConnectionManager.default.setContentSlides(peerConnection);
|
|
@@ -4434,18 +4670,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4434
4670
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
|
|
4435
4671
|
|
|
4436
4672
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE, {
|
|
4437
|
-
correlation_id:
|
|
4438
|
-
locus_id:
|
|
4673
|
+
correlation_id: _this41.correlationId,
|
|
4674
|
+
locus_id: _this41.locusUrl.split('/').pop(),
|
|
4439
4675
|
reason: error.message,
|
|
4440
4676
|
stack: error.stack
|
|
4441
4677
|
});
|
|
4442
4678
|
|
|
4443
4679
|
throw error;
|
|
4444
4680
|
}).then(function () {
|
|
4445
|
-
return logRequest(
|
|
4446
|
-
sdp:
|
|
4447
|
-
roapSeq:
|
|
4448
|
-
meeting:
|
|
4681
|
+
return logRequest(_this41.roap.sendRoapMediaRequest({
|
|
4682
|
+
sdp: _this41.mediaProperties.peerConnection.sdp,
|
|
4683
|
+
roapSeq: _this41.roapSeq,
|
|
4684
|
+
meeting: _this41 // or can pass meeting ID
|
|
4449
4685
|
|
|
4450
4686
|
}), {
|
|
4451
4687
|
header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
|
|
@@ -4453,13 +4689,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4453
4689
|
failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
|
|
4454
4690
|
});
|
|
4455
4691
|
}).then(function () {
|
|
4456
|
-
return
|
|
4692
|
+
return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
|
|
4457
4693
|
}).then(function (startShare) {
|
|
4458
4694
|
// This is a special case if we do an /floor grant followed by /media
|
|
4459
4695
|
// we actually get a OFFER from the server and a GLAR condition happens
|
|
4460
4696
|
if (startShare) {
|
|
4461
4697
|
// We are assuming that the clients are connected when doing an update
|
|
4462
|
-
return
|
|
4698
|
+
return _this41.share();
|
|
4463
4699
|
}
|
|
4464
4700
|
|
|
4465
4701
|
return _promise.default.resolve();
|
|
@@ -4480,7 +4716,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4480
4716
|
}, {
|
|
4481
4717
|
key: "updateAudio",
|
|
4482
4718
|
value: function updateAudio(options) {
|
|
4483
|
-
var
|
|
4719
|
+
var _this42 = this;
|
|
4484
4720
|
|
|
4485
4721
|
if (!this.canUpdateMedia()) {
|
|
4486
4722
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
|
|
@@ -4503,13 +4739,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4503
4739
|
}).then(function () {
|
|
4504
4740
|
var previousMediaDirection = {};
|
|
4505
4741
|
|
|
4506
|
-
if (
|
|
4742
|
+
if (_this42.mediaProperties.mediaDirection) {
|
|
4507
4743
|
previousMediaDirection = {
|
|
4508
|
-
sendTrack:
|
|
4509
|
-
receiveTrack:
|
|
4744
|
+
sendTrack: _this42.mediaProperties.mediaDirection.sendAudio,
|
|
4745
|
+
receiveTrack: _this42.mediaProperties.mediaDirection.receiveAudio
|
|
4510
4746
|
};
|
|
4511
4747
|
} else {
|
|
4512
|
-
|
|
4748
|
+
_this42.mediaProperties.mediaDirection = {};
|
|
4513
4749
|
}
|
|
4514
4750
|
|
|
4515
4751
|
return _util.default.updateTransceiver({
|
|
@@ -4518,20 +4754,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4518
4754
|
receiveTrack: options.receiveAudio,
|
|
4519
4755
|
track: track,
|
|
4520
4756
|
transceiver: audioTransceiver,
|
|
4521
|
-
peerConnection:
|
|
4757
|
+
peerConnection: _this42.mediaProperties.peerConnection,
|
|
4522
4758
|
previousMediaDirection: previousMediaDirection
|
|
4523
4759
|
}, {
|
|
4524
|
-
mediaProperties:
|
|
4525
|
-
meeting:
|
|
4526
|
-
id:
|
|
4760
|
+
mediaProperties: _this42.mediaProperties,
|
|
4761
|
+
meeting: _this42,
|
|
4762
|
+
id: _this42.id
|
|
4527
4763
|
});
|
|
4528
4764
|
}).then(function () {
|
|
4529
|
-
|
|
4765
|
+
_this42.setLocalAudioTrack(track);
|
|
4530
4766
|
|
|
4531
|
-
|
|
4532
|
-
|
|
4767
|
+
_this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
|
|
4768
|
+
_this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
|
|
4533
4769
|
|
|
4534
|
-
|
|
4770
|
+
_this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
|
|
4535
4771
|
});
|
|
4536
4772
|
}
|
|
4537
4773
|
/**
|
|
@@ -4548,7 +4784,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4548
4784
|
}, {
|
|
4549
4785
|
key: "updateVideo",
|
|
4550
4786
|
value: function updateVideo(options) {
|
|
4551
|
-
var
|
|
4787
|
+
var _this43 = this;
|
|
4552
4788
|
|
|
4553
4789
|
if (!this.canUpdateMedia()) {
|
|
4554
4790
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
|
|
@@ -4575,23 +4811,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4575
4811
|
receiveTrack: options.receiveVideo,
|
|
4576
4812
|
track: track,
|
|
4577
4813
|
transceiver: videoTransceiver,
|
|
4578
|
-
peerConnection:
|
|
4814
|
+
peerConnection: _this43.mediaProperties.peerConnection,
|
|
4579
4815
|
previousMediaDirection: {
|
|
4580
|
-
sendTrack:
|
|
4581
|
-
receiveTrack:
|
|
4816
|
+
sendTrack: _this43.mediaProperties.mediaDirection.sendVideo,
|
|
4817
|
+
receiveTrack: _this43.mediaProperties.mediaDirection.receiveVideo
|
|
4582
4818
|
}
|
|
4583
4819
|
}, {
|
|
4584
|
-
mediaProperties:
|
|
4585
|
-
meeting:
|
|
4586
|
-
id:
|
|
4820
|
+
mediaProperties: _this43.mediaProperties,
|
|
4821
|
+
meeting: _this43,
|
|
4822
|
+
id: _this43.id
|
|
4587
4823
|
});
|
|
4588
4824
|
}).then(function () {
|
|
4589
|
-
|
|
4825
|
+
_this43.setLocalVideoTrack(track);
|
|
4590
4826
|
|
|
4591
|
-
|
|
4592
|
-
|
|
4827
|
+
_this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
|
|
4828
|
+
_this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
|
|
4593
4829
|
|
|
4594
|
-
|
|
4830
|
+
_this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
|
|
4595
4831
|
});
|
|
4596
4832
|
}
|
|
4597
4833
|
/**
|
|
@@ -4633,7 +4869,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4633
4869
|
}, {
|
|
4634
4870
|
key: "updateShare",
|
|
4635
4871
|
value: function updateShare(options) {
|
|
4636
|
-
var
|
|
4872
|
+
var _this44 = this;
|
|
4637
4873
|
|
|
4638
4874
|
if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
|
|
4639
4875
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
|
|
@@ -4656,7 +4892,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4656
4892
|
sendShare: sendShare,
|
|
4657
4893
|
localShare: stream
|
|
4658
4894
|
}).then(function () {
|
|
4659
|
-
return
|
|
4895
|
+
return _this44.checkForStopShare(sendShare, previousSendShareStatus);
|
|
4660
4896
|
}).then(function (startShare) {
|
|
4661
4897
|
return _util.default.updateTransceiver({
|
|
4662
4898
|
type: 'video',
|
|
@@ -4664,41 +4900,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4664
4900
|
receiveTrack: receiveShare,
|
|
4665
4901
|
track: track,
|
|
4666
4902
|
transceiver: shareTransceiver,
|
|
4667
|
-
peerConnection:
|
|
4903
|
+
peerConnection: _this44.mediaProperties.peerConnection,
|
|
4668
4904
|
previousMediaDirection: {
|
|
4669
|
-
sendTrack:
|
|
4670
|
-
receiveTrack:
|
|
4905
|
+
sendTrack: _this44.mediaProperties.mediaDirection.sendShare,
|
|
4906
|
+
receiveTrack: _this44.mediaProperties.mediaDirection.receiveShare
|
|
4671
4907
|
}
|
|
4672
4908
|
}, {
|
|
4673
|
-
mediaProperties:
|
|
4674
|
-
meeting:
|
|
4675
|
-
id:
|
|
4909
|
+
mediaProperties: _this44.mediaProperties,
|
|
4910
|
+
meeting: _this44,
|
|
4911
|
+
id: _this44.id
|
|
4676
4912
|
}).then(function () {
|
|
4677
4913
|
if (startShare) {
|
|
4678
|
-
return
|
|
4914
|
+
return _this44.share();
|
|
4679
4915
|
}
|
|
4680
4916
|
|
|
4681
4917
|
return _promise.default.resolve();
|
|
4682
4918
|
});
|
|
4683
4919
|
}).then(function () {
|
|
4684
|
-
|
|
4685
|
-
|
|
4920
|
+
_this44.mediaProperties.mediaDirection.sendShare = sendShare;
|
|
4921
|
+
_this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
|
|
4686
4922
|
}).catch(function (error) {
|
|
4687
|
-
|
|
4923
|
+
_this44.unsetLocalShareTrack(stream);
|
|
4688
4924
|
|
|
4689
4925
|
throw error;
|
|
4690
4926
|
}).finally(function () {
|
|
4691
4927
|
var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
|
|
4692
4928
|
|
|
4693
|
-
var sharingModeIsActive =
|
|
4694
|
-
var isSharingOutOfSync = sharingModeIsActive && !
|
|
4929
|
+
var sharingModeIsActive = _this44.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
|
|
4930
|
+
var isSharingOutOfSync = sharingModeIsActive && !_this44.isLocalShareLive;
|
|
4695
4931
|
|
|
4696
4932
|
if (isSharingOutOfSync) {
|
|
4697
4933
|
// Adding a delay to avoid a 409 from server
|
|
4698
4934
|
// which results in user still appearing as if sharing.
|
|
4699
4935
|
// Also delay give time for changes to peerConnection.
|
|
4700
4936
|
setTimeout(function () {
|
|
4701
|
-
return
|
|
4937
|
+
return _this44.handleShareTrackEnded(stream);
|
|
4702
4938
|
}, delay);
|
|
4703
4939
|
}
|
|
4704
4940
|
});
|
|
@@ -4738,7 +4974,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4738
4974
|
}, {
|
|
4739
4975
|
key: "acknowledge",
|
|
4740
4976
|
value: function acknowledge(type) {
|
|
4741
|
-
var
|
|
4977
|
+
var _this45 = this;
|
|
4742
4978
|
|
|
4743
4979
|
if (!type) {
|
|
4744
4980
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
@@ -4752,11 +4988,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4752
4988
|
}).then(function (response) {
|
|
4753
4989
|
return _promise.default.resolve(response);
|
|
4754
4990
|
}).then(function (response) {
|
|
4755
|
-
|
|
4991
|
+
_this45.meetingFiniteStateMachine.ring(type);
|
|
4756
4992
|
|
|
4757
4993
|
_metrics.default.postEvent({
|
|
4758
4994
|
event: _config.eventType.ALERT_DISPLAYED,
|
|
4759
|
-
meeting:
|
|
4995
|
+
meeting: _this45
|
|
4760
4996
|
});
|
|
4761
4997
|
|
|
4762
4998
|
return _promise.default.resolve({
|
|
@@ -4781,14 +5017,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4781
5017
|
}, {
|
|
4782
5018
|
key: "decline",
|
|
4783
5019
|
value: function decline(reason) {
|
|
4784
|
-
var
|
|
5020
|
+
var _this46 = this;
|
|
4785
5021
|
|
|
4786
5022
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
4787
|
-
|
|
5023
|
+
_this46.meetingFiniteStateMachine.decline();
|
|
4788
5024
|
|
|
4789
5025
|
return _promise.default.resolve(decline);
|
|
4790
5026
|
}).catch(function (error) {
|
|
4791
|
-
|
|
5027
|
+
_this46.meetingFiniteStateMachine.fail(error);
|
|
4792
5028
|
|
|
4793
5029
|
return _promise.default.reject(error);
|
|
4794
5030
|
});
|
|
@@ -4805,7 +5041,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4805
5041
|
}, {
|
|
4806
5042
|
key: "leave",
|
|
4807
5043
|
value: function leave() {
|
|
4808
|
-
var
|
|
5044
|
+
var _this47 = this;
|
|
4809
5045
|
|
|
4810
5046
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4811
5047
|
|
|
@@ -4823,41 +5059,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4823
5059
|
_loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
|
|
4824
5060
|
|
|
4825
5061
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
4826
|
-
|
|
5062
|
+
_this47.meetingFiniteStateMachine.leave();
|
|
4827
5063
|
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
5064
|
+
_this47.audio = null;
|
|
5065
|
+
_this47.video = null;
|
|
5066
|
+
_this47.isSharing = false;
|
|
4831
5067
|
|
|
4832
|
-
if (
|
|
4833
|
-
|
|
5068
|
+
if (_this47.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
|
|
5069
|
+
_this47.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
4834
5070
|
}
|
|
4835
5071
|
|
|
4836
|
-
|
|
5072
|
+
_this47.queuedMediaUpdates = [];
|
|
4837
5073
|
|
|
4838
|
-
if (
|
|
4839
|
-
|
|
5074
|
+
if (_this47.transcription) {
|
|
5075
|
+
_this47.transcription.closeSocket();
|
|
4840
5076
|
|
|
4841
|
-
|
|
5077
|
+
_this47.triggerStopReceivingTranscriptionEvent();
|
|
4842
5078
|
|
|
4843
|
-
|
|
5079
|
+
_this47.transcription = undefined;
|
|
4844
5080
|
} // upload logs on leave irrespective of meeting delete
|
|
4845
5081
|
|
|
4846
5082
|
|
|
4847
|
-
_triggerProxy.default.trigger(
|
|
5083
|
+
_triggerProxy.default.trigger(_this47, {
|
|
4848
5084
|
file: 'meeting/index',
|
|
4849
5085
|
function: 'leave'
|
|
4850
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5086
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
4851
5087
|
|
|
4852
5088
|
|
|
4853
|
-
if (
|
|
5089
|
+
if (_this47.wirelessShare || _this47.guest) {
|
|
4854
5090
|
// If screen sharing clean the meeting object
|
|
4855
|
-
_triggerProxy.default.trigger(
|
|
5091
|
+
_triggerProxy.default.trigger(_this47, {
|
|
4856
5092
|
file: 'meeting/index',
|
|
4857
5093
|
function: 'leave'
|
|
4858
5094
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
4859
5095
|
reason: options.reason,
|
|
4860
|
-
meetingId:
|
|
5096
|
+
meetingId: _this47.id
|
|
4861
5097
|
});
|
|
4862
5098
|
}
|
|
4863
5099
|
|
|
@@ -4865,19 +5101,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4865
5101
|
|
|
4866
5102
|
return leave;
|
|
4867
5103
|
}).catch(function (error) {
|
|
4868
|
-
|
|
5104
|
+
_this47.meetingFiniteStateMachine.fail(error);
|
|
4869
5105
|
|
|
4870
5106
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
|
|
4871
5107
|
|
|
4872
5108
|
|
|
4873
|
-
_triggerProxy.default.trigger(
|
|
5109
|
+
_triggerProxy.default.trigger(_this47, {
|
|
4874
5110
|
file: 'meeting/index',
|
|
4875
5111
|
function: 'leave'
|
|
4876
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5112
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
|
|
4877
5113
|
|
|
4878
5114
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE, {
|
|
4879
|
-
correlation_id:
|
|
4880
|
-
locus_id:
|
|
5115
|
+
correlation_id: _this47.correlationId,
|
|
5116
|
+
locus_id: _this47.locusUrl.split('/').pop(),
|
|
4881
5117
|
reason: error.message,
|
|
4882
5118
|
stack: error.stack,
|
|
4883
5119
|
code: error.code
|
|
@@ -4898,7 +5134,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4898
5134
|
}, {
|
|
4899
5135
|
key: "startWhiteboardShare",
|
|
4900
5136
|
value: function startWhiteboardShare(channelUrl, resourceToken) {
|
|
4901
|
-
var
|
|
5137
|
+
var _this48 = this;
|
|
4902
5138
|
|
|
4903
5139
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
4904
5140
|
return element.name === 'whiteboard';
|
|
@@ -4927,14 +5163,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4927
5163
|
}
|
|
4928
5164
|
|
|
4929
5165
|
return this.meetingRequest.changeMeetingFloor(body).then(function () {
|
|
4930
|
-
|
|
5166
|
+
_this48.isSharing = false;
|
|
4931
5167
|
return _promise.default.resolve();
|
|
4932
5168
|
}).catch(function (error) {
|
|
4933
5169
|
_loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
|
|
4934
5170
|
|
|
4935
5171
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
|
|
4936
|
-
correlation_id:
|
|
4937
|
-
locus_id:
|
|
5172
|
+
correlation_id: _this48.correlationId,
|
|
5173
|
+
locus_id: _this48.locusUrl.split('/').pop(),
|
|
4938
5174
|
reason: error.message,
|
|
4939
5175
|
stack: error.stack,
|
|
4940
5176
|
board: {
|
|
@@ -4959,7 +5195,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4959
5195
|
}, {
|
|
4960
5196
|
key: "stopWhiteboardShare",
|
|
4961
5197
|
value: function stopWhiteboardShare(channelUrl) {
|
|
4962
|
-
var
|
|
5198
|
+
var _this49 = this;
|
|
4963
5199
|
|
|
4964
5200
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
4965
5201
|
return element.name === 'whiteboard';
|
|
@@ -4980,8 +5216,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4980
5216
|
_loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
|
|
4981
5217
|
|
|
4982
5218
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_WHITEBOARD_SHARE_FAILURE, {
|
|
4983
|
-
correlation_id:
|
|
4984
|
-
locus_id:
|
|
5219
|
+
correlation_id: _this49.correlationId,
|
|
5220
|
+
locus_id: _this49.locusUrl.split('/').pop(),
|
|
4985
5221
|
reason: error.message,
|
|
4986
5222
|
stack: error.stack,
|
|
4987
5223
|
board: {
|
|
@@ -5005,7 +5241,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5005
5241
|
}, {
|
|
5006
5242
|
key: "share",
|
|
5007
5243
|
value: function share() {
|
|
5008
|
-
var
|
|
5244
|
+
var _this50 = this;
|
|
5009
5245
|
|
|
5010
5246
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5011
5247
|
return element.name === _constants.CONTENT;
|
|
@@ -5024,14 +5260,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5024
5260
|
uri: content.url,
|
|
5025
5261
|
resourceUrl: this.resourceUrl
|
|
5026
5262
|
}).then(function () {
|
|
5027
|
-
|
|
5263
|
+
_this50.isSharing = true;
|
|
5028
5264
|
return _promise.default.resolve();
|
|
5029
5265
|
}).catch(function (error) {
|
|
5030
5266
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
5031
5267
|
|
|
5032
5268
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE, {
|
|
5033
|
-
correlation_id:
|
|
5034
|
-
locus_id:
|
|
5269
|
+
correlation_id: _this50.correlationId,
|
|
5270
|
+
locus_id: _this50.locusUrl.split('/').pop(),
|
|
5035
5271
|
reason: error.message,
|
|
5036
5272
|
stack: error.stack
|
|
5037
5273
|
});
|
|
@@ -5070,7 +5306,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5070
5306
|
}, {
|
|
5071
5307
|
key: "stopFloorRequest",
|
|
5072
5308
|
value: function stopFloorRequest() {
|
|
5073
|
-
var
|
|
5309
|
+
var _this51 = this;
|
|
5074
5310
|
|
|
5075
5311
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5076
5312
|
return element.name === _constants.CONTENT;
|
|
@@ -5100,15 +5336,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5100
5336
|
_loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
|
|
5101
5337
|
|
|
5102
5338
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE, {
|
|
5103
|
-
correlation_id:
|
|
5104
|
-
locus_id:
|
|
5339
|
+
correlation_id: _this51.correlationId,
|
|
5340
|
+
locus_id: _this51.locusUrl.split('/').pop(),
|
|
5105
5341
|
reason: error.message,
|
|
5106
5342
|
stack: error.stack
|
|
5107
5343
|
});
|
|
5108
5344
|
|
|
5109
5345
|
return _promise.default.reject(error);
|
|
5110
5346
|
}).finally(function () {
|
|
5111
|
-
|
|
5347
|
+
_this51.isSharing = false;
|
|
5112
5348
|
});
|
|
5113
5349
|
}
|
|
5114
5350
|
|
|
@@ -5244,7 +5480,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5244
5480
|
}, {
|
|
5245
5481
|
key: "changeVideoLayout",
|
|
5246
5482
|
value: function changeVideoLayout(layoutType) {
|
|
5247
|
-
var
|
|
5483
|
+
var _this52 = this;
|
|
5248
5484
|
|
|
5249
5485
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5250
5486
|
var main = renderInfo.main,
|
|
@@ -5307,7 +5543,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5307
5543
|
content: layoutInfo.content
|
|
5308
5544
|
}).then(function (response) {
|
|
5309
5545
|
if (response && response.body && response.body.locus) {
|
|
5310
|
-
|
|
5546
|
+
_this52.locusInfo.onFullLocus(response.body.locus);
|
|
5311
5547
|
}
|
|
5312
5548
|
}).catch(function (error) {
|
|
5313
5549
|
_loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
|
|
@@ -5324,7 +5560,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5324
5560
|
}, {
|
|
5325
5561
|
key: "setLocalVideoQuality",
|
|
5326
5562
|
value: function setLocalVideoQuality(level) {
|
|
5327
|
-
var
|
|
5563
|
+
var _this53 = this;
|
|
5328
5564
|
|
|
5329
5565
|
_loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
|
|
5330
5566
|
|
|
@@ -5350,11 +5586,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5350
5586
|
sendVideo: this.mediaProperties.mediaDirection.sendVideo,
|
|
5351
5587
|
sendShare: this.mediaProperties.mediaDirection.sendShare
|
|
5352
5588
|
};
|
|
5353
|
-
return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then(function (
|
|
5354
|
-
var
|
|
5355
|
-
localStream =
|
|
5589
|
+
return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then(function (_ref11) {
|
|
5590
|
+
var _ref12 = (0, _slicedToArray2.default)(_ref11, 1),
|
|
5591
|
+
localStream = _ref12[0];
|
|
5356
5592
|
|
|
5357
|
-
return
|
|
5593
|
+
return _this53.updateVideo({
|
|
5358
5594
|
sendVideo: true,
|
|
5359
5595
|
receiveVideo: true,
|
|
5360
5596
|
stream: localStream
|
|
@@ -5402,7 +5638,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5402
5638
|
}, {
|
|
5403
5639
|
key: "setMeetingQuality",
|
|
5404
5640
|
value: function setMeetingQuality(level) {
|
|
5405
|
-
var
|
|
5641
|
+
var _this54 = this;
|
|
5406
5642
|
|
|
5407
5643
|
_loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
|
|
5408
5644
|
|
|
@@ -5427,18 +5663,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5427
5663
|
receiveVideo = _this$mediaProperties4.receiveVideo,
|
|
5428
5664
|
sendVideo = _this$mediaProperties4.sendVideo;
|
|
5429
5665
|
return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
|
|
5430
|
-
return receiveAudio || receiveVideo ?
|
|
5666
|
+
return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
|
|
5431
5667
|
}).catch(function (error) {
|
|
5432
5668
|
// From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
|
|
5433
|
-
|
|
5669
|
+
_this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
|
|
5434
5670
|
|
|
5435
|
-
|
|
5671
|
+
_this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
|
|
5436
5672
|
|
|
5437
5673
|
_loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
|
|
5438
5674
|
|
|
5439
5675
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE, {
|
|
5440
|
-
correlation_id:
|
|
5441
|
-
locus_id:
|
|
5676
|
+
correlation_id: _this54.correlationId,
|
|
5677
|
+
locus_id: _this54.locusUrl.split('/').pop(),
|
|
5442
5678
|
reason: error.message,
|
|
5443
5679
|
stack: error.stack
|
|
5444
5680
|
}, {
|
|
@@ -5462,7 +5698,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5462
5698
|
}, {
|
|
5463
5699
|
key: "shareScreen",
|
|
5464
5700
|
value: function shareScreen() {
|
|
5465
|
-
var
|
|
5701
|
+
var _this55 = this;
|
|
5466
5702
|
|
|
5467
5703
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5468
5704
|
|
|
@@ -5474,9 +5710,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5474
5710
|
}, options);
|
|
5475
5711
|
|
|
5476
5712
|
return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
|
|
5477
|
-
return
|
|
5713
|
+
return _this55.updateShare({
|
|
5478
5714
|
sendShare: true,
|
|
5479
|
-
receiveShare:
|
|
5715
|
+
receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
|
|
5480
5716
|
stream: shareStream
|
|
5481
5717
|
});
|
|
5482
5718
|
}).catch(function (error) {
|
|
@@ -5488,8 +5724,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5488
5724
|
// TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
|
|
5489
5725
|
var metricName = _constants.METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
|
|
5490
5726
|
var data = {
|
|
5491
|
-
correlation_id:
|
|
5492
|
-
locus_id:
|
|
5727
|
+
correlation_id: _this55.correlationId,
|
|
5728
|
+
locus_id: _this55.locusUrl.split('/').pop(),
|
|
5493
5729
|
reason: error.message,
|
|
5494
5730
|
stack: error.stack
|
|
5495
5731
|
};
|
|
@@ -5568,9 +5804,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5568
5804
|
|
|
5569
5805
|
}, {
|
|
5570
5806
|
key: "handleMediaLogging",
|
|
5571
|
-
value: function handleMediaLogging(
|
|
5572
|
-
var audioTrack =
|
|
5573
|
-
videoTrack =
|
|
5807
|
+
value: function handleMediaLogging(_ref13) {
|
|
5808
|
+
var audioTrack = _ref13.audioTrack,
|
|
5809
|
+
videoTrack = _ref13.videoTrack;
|
|
5574
5810
|
|
|
5575
5811
|
_util.default.handleVideoLogging(videoTrack);
|
|
5576
5812
|
|