@webex/plugin-meetings 3.6.0-next.2 → 3.6.0-next.4
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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/webinar-registration-error.js +50 -0
- package/dist/common/errors/webinar-registration-error.js.map +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +73 -37
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +68 -17
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +2 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/types/common/errors/webinar-registration-error.d.ts +14 -0
- package/dist/types/constants.d.ts +6 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/common/errors/webinar-registration-error.ts +27 -0
- package/src/constants.ts +6 -0
- package/src/index.ts +2 -0
- package/src/meeting/index.ts +24 -10
- package/src/meeting-info/meeting-info-v2.ts +51 -0
- package/src/meetings/index.ts +3 -1
- package/src/metrics/constants.ts +1 -0
- package/test/unit/spec/meeting/index.js +23 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +37 -0
package/dist/meeting/index.js
CHANGED
|
@@ -86,6 +86,7 @@ var _controlsOptionsManager = _interopRequireDefault(require("../controls-option
|
|
|
86
86
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
87
87
|
var _locusMediaRequest = require("./locusMediaRequest");
|
|
88
88
|
var _connectionStateHandler = require("./connectionStateHandler");
|
|
89
|
+
var _webinarRegistrationError = _interopRequireDefault(require("../common/errors/webinar-registration-error"));
|
|
89
90
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
90
91
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
91
92
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -2421,8 +2422,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2421
2422
|
}
|
|
2422
2423
|
throw new _permission.default();
|
|
2423
2424
|
case 21:
|
|
2425
|
+
if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2WebinarRegistrationError)) {
|
|
2426
|
+
_context5.next = 28;
|
|
2427
|
+
break;
|
|
2428
|
+
}
|
|
2429
|
+
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION;
|
|
2430
|
+
this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
|
|
2431
|
+
if (_context5.t0.meetingInfo) {
|
|
2432
|
+
this.meetingInfo = _context5.t0.meetingInfo;
|
|
2433
|
+
}
|
|
2434
|
+
throw new _webinarRegistrationError.default();
|
|
2435
|
+
case 28:
|
|
2424
2436
|
if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
|
|
2425
|
-
_context5.next =
|
|
2437
|
+
_context5.next = 40;
|
|
2426
2438
|
break;
|
|
2427
2439
|
}
|
|
2428
2440
|
_loggerProxy.default.logger.info( // @ts-ignore
|
|
@@ -2437,16 +2449,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2437
2449
|
this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
|
|
2438
2450
|
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
|
|
2439
2451
|
if (!this.requiredCaptcha) {
|
|
2440
|
-
_context5.next =
|
|
2452
|
+
_context5.next = 37;
|
|
2441
2453
|
break;
|
|
2442
2454
|
}
|
|
2443
|
-
_context5.next =
|
|
2455
|
+
_context5.next = 37;
|
|
2444
2456
|
return this.refreshCaptcha();
|
|
2445
|
-
case
|
|
2457
|
+
case 37:
|
|
2446
2458
|
throw new _passwordError.default();
|
|
2447
|
-
case
|
|
2459
|
+
case 40:
|
|
2448
2460
|
if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
|
|
2449
|
-
_context5.next =
|
|
2461
|
+
_context5.next = 49;
|
|
2450
2462
|
break;
|
|
2451
2463
|
}
|
|
2452
2464
|
_loggerProxy.default.logger.info( // @ts-ignore
|
|
@@ -2458,10 +2470,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2458
2470
|
}
|
|
2459
2471
|
this.requiredCaptcha = _context5.t0.captchaInfo;
|
|
2460
2472
|
throw new _captchaError.default();
|
|
2461
|
-
case
|
|
2473
|
+
case 49:
|
|
2462
2474
|
this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
|
|
2463
2475
|
throw _context5.t0;
|
|
2464
|
-
case
|
|
2476
|
+
case 51:
|
|
2465
2477
|
case "end":
|
|
2466
2478
|
return _context5.stop();
|
|
2467
2479
|
}
|
|
@@ -8407,8 +8419,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
8407
8419
|
key: "publishStreams",
|
|
8408
8420
|
value: (function () {
|
|
8409
8421
|
var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(streams) {
|
|
8410
|
-
var _streams$screenShare, _streams$screenShare2, _streams$
|
|
8411
|
-
var floorRequestNeeded, _streams$
|
|
8422
|
+
var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
|
|
8423
|
+
var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
|
|
8412
8424
|
return _regenerator.default.wrap(function _callee37$(_context37) {
|
|
8413
8425
|
while (1) switch (_context37.prev = _context37.next) {
|
|
8414
8426
|
case 0:
|
|
@@ -8420,54 +8432,78 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
8420
8432
|
}
|
|
8421
8433
|
return _context37.abrupt("return");
|
|
8422
8434
|
case 4:
|
|
8423
|
-
|
|
8424
|
-
|
|
8435
|
+
streamChecks = [{
|
|
8436
|
+
stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
|
|
8437
|
+
name: 'microphone'
|
|
8438
|
+
}, {
|
|
8439
|
+
stream: streams === null || streams === void 0 ? void 0 : streams.camera,
|
|
8440
|
+
name: 'camera'
|
|
8441
|
+
}, {
|
|
8442
|
+
stream: streams === null || streams === void 0 ? void 0 : (_streams$screenShare3 = streams.screenShare) === null || _streams$screenShare3 === void 0 ? void 0 : _streams$screenShare3.audio,
|
|
8443
|
+
name: 'screenShare audio'
|
|
8444
|
+
}, {
|
|
8445
|
+
stream: streams === null || streams === void 0 ? void 0 : (_streams$screenShare4 = streams.screenShare) === null || _streams$screenShare4 === void 0 ? void 0 : _streams$screenShare4.video,
|
|
8446
|
+
name: 'screenShare video'
|
|
8447
|
+
}];
|
|
8448
|
+
_i = 0, _streamChecks = streamChecks;
|
|
8449
|
+
case 6:
|
|
8450
|
+
if (!(_i < _streamChecks.length)) {
|
|
8451
|
+
_context37.next = 13;
|
|
8425
8452
|
break;
|
|
8426
8453
|
}
|
|
8427
|
-
|
|
8428
|
-
|
|
8454
|
+
_streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
|
|
8455
|
+
if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
|
|
8456
|
+
_context37.next = 10;
|
|
8457
|
+
break;
|
|
8458
|
+
}
|
|
8459
|
+
throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
|
|
8460
|
+
case 10:
|
|
8461
|
+
_i++;
|
|
8462
|
+
_context37.next = 6;
|
|
8463
|
+
break;
|
|
8464
|
+
case 13:
|
|
8429
8465
|
floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
|
|
8430
|
-
if (!(this.isMultistream && (_streams$
|
|
8431
|
-
_context37.next =
|
|
8466
|
+
if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
|
|
8467
|
+
_context37.next = 18;
|
|
8432
8468
|
break;
|
|
8433
8469
|
}
|
|
8434
|
-
_context37.next =
|
|
8470
|
+
_context37.next = 17;
|
|
8435
8471
|
return this.setLocalShareAudioStream(streams.screenShare.audio);
|
|
8436
|
-
case
|
|
8472
|
+
case 17:
|
|
8437
8473
|
floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
|
|
8438
|
-
case
|
|
8439
|
-
if (!((_streams$
|
|
8440
|
-
_context37.next =
|
|
8474
|
+
case 18:
|
|
8475
|
+
if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
|
|
8476
|
+
_context37.next = 22;
|
|
8441
8477
|
break;
|
|
8442
8478
|
}
|
|
8443
|
-
_context37.next =
|
|
8444
|
-
return this.setLocalShareVideoStream((_streams$
|
|
8445
|
-
case
|
|
8479
|
+
_context37.next = 21;
|
|
8480
|
+
return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
|
|
8481
|
+
case 21:
|
|
8446
8482
|
floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
|
|
8447
|
-
case
|
|
8483
|
+
case 22:
|
|
8448
8484
|
if (!streams.microphone) {
|
|
8449
|
-
_context37.next =
|
|
8485
|
+
_context37.next = 25;
|
|
8450
8486
|
break;
|
|
8451
8487
|
}
|
|
8452
|
-
_context37.next =
|
|
8488
|
+
_context37.next = 25;
|
|
8453
8489
|
return this.setLocalAudioStream(streams.microphone);
|
|
8454
|
-
case
|
|
8490
|
+
case 25:
|
|
8455
8491
|
if (!streams.camera) {
|
|
8456
|
-
_context37.next =
|
|
8492
|
+
_context37.next = 28;
|
|
8457
8493
|
break;
|
|
8458
8494
|
}
|
|
8459
|
-
_context37.next =
|
|
8495
|
+
_context37.next = 28;
|
|
8460
8496
|
return this.setLocalVideoStream(streams.camera);
|
|
8461
|
-
case
|
|
8497
|
+
case 28:
|
|
8462
8498
|
if (this.isMultistream) {
|
|
8463
|
-
_context37.next =
|
|
8499
|
+
_context37.next = 31;
|
|
8464
8500
|
break;
|
|
8465
8501
|
}
|
|
8466
|
-
_context37.next =
|
|
8502
|
+
_context37.next = 31;
|
|
8467
8503
|
return this.updateTranscodedMediaConnection();
|
|
8468
|
-
case
|
|
8504
|
+
case 31:
|
|
8469
8505
|
if (!floorRequestNeeded) {
|
|
8470
|
-
_context37.next =
|
|
8506
|
+
_context37.next = 37;
|
|
8471
8507
|
break;
|
|
8472
8508
|
}
|
|
8473
8509
|
this.localShareInstanceId = _uuid.default.v4();
|
|
@@ -8491,9 +8527,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
8491
8527
|
// we're sending the http request to Locus to request the screen share floor
|
|
8492
8528
|
// only after the SDP update, because that's how it's always been done for transcoded meetings
|
|
8493
8529
|
// and also if sharing from the start, we need confluence to have been created
|
|
8494
|
-
_context37.next =
|
|
8530
|
+
_context37.next = 37;
|
|
8495
8531
|
return this.enqueueScreenShareFloorRequest();
|
|
8496
|
-
case
|
|
8532
|
+
case 37:
|
|
8497
8533
|
case "end":
|
|
8498
8534
|
return _context37.stop();
|
|
8499
8535
|
}
|