@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0-test.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/README.md +12 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/webex-errors.js +23 -3
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/request.js +5 -1
- package/dist/common/logs/request.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +69 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +40 -11
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +42 -21
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/index.js +10 -6
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +13 -3
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +135 -330
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +4 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2187 -1074
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +34 -19
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +71 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -23
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +25 -4
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +17 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +142 -57
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +2 -6
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +9 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +11 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +17 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js +15 -4
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +15 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +222 -73
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +262 -432
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +1 -1
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reconnection-manager/index.js +113 -96
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +57 -25
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +5 -13
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +173 -81
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/index.js +68 -6
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +338 -289
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +296 -156
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/webex-errors.d.ts +13 -1
- package/dist/types/common/logs/request.d.ts +2 -0
- package/dist/types/config.d.ts +1 -1
- package/dist/types/constants.d.ts +66 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/locus-info/index.d.ts +1 -1
- package/dist/types/locus-info/parser.d.ts +3 -2
- package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +285 -34
- package/dist/types/meeting/locusMediaRequest.d.ts +1 -2
- package/dist/types/meeting/muteState.d.ts +2 -8
- package/dist/types/meeting/request.d.ts +4 -1
- package/dist/types/meeting/util.d.ts +25 -1
- package/dist/types/meeting-info/index.d.ts +7 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/collection.d.ts +9 -0
- package/dist/types/meetings/index.d.ts +42 -14
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/members/types.d.ts +1 -0
- package/dist/types/members/util.d.ts +5 -0
- package/dist/types/metrics/constants.d.ts +15 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +2 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +2 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +25 -1
- package/dist/types/multistream/sendSlotManager.d.ts +9 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +59 -112
- package/dist/types/reachability/request.d.ts +1 -1
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reconnection-manager/index.d.ts +10 -0
- package/dist/types/roap/index.d.ts +2 -1
- package/dist/types/roap/request.d.ts +2 -1
- package/dist/types/roap/turnDiscovery.d.ts +21 -4
- package/dist/types/rtcMetrics/index.d.ts +15 -1
- package/dist/types/statsAnalyzer/index.d.ts +28 -11
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/package.json +3 -2
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +19 -2
- package/src/common/logs/request.ts +5 -1
- package/src/config.ts +1 -1
- package/src/constants.ts +71 -6
- package/src/index.ts +5 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/index.ts +52 -16
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +47 -21
- package/src/media/index.ts +8 -6
- package/src/media/properties.ts +17 -2
- package/src/mediaQualityMetrics/config.ts +103 -238
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1510 -529
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +19 -1
- package/src/meeting/util.ts +97 -0
- package/src/meeting-info/index.ts +47 -20
- package/src/meeting-info/meeting-info-v2.ts +27 -5
- package/src/meeting-info/utilv2.ts +1 -1
- package/src/meetings/collection.ts +13 -0
- package/src/meetings/index.ts +112 -31
- package/src/meetings/util.ts +2 -8
- package/src/member/index.ts +9 -0
- package/src/member/util.ts +14 -0
- package/src/members/index.ts +29 -2
- package/src/members/types.ts +1 -0
- package/src/members/util.ts +15 -1
- package/src/metrics/constants.ts +14 -0
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +141 -18
- package/src/multistream/sendSlotManager.ts +29 -0
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +221 -382
- package/src/reachability/request.ts +1 -1
- package/src/reachability/util.ts +24 -0
- package/src/reconnection-manager/index.ts +87 -83
- package/src/roap/index.ts +60 -24
- package/src/roap/request.ts +3 -16
- package/src/roap/turnDiscovery.ts +112 -39
- package/src/rtcMetrics/index.ts +71 -5
- package/src/statsAnalyzer/index.ts +430 -427
- package/src/statsAnalyzer/mqaUtil.ts +317 -168
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +7 -7
- package/test/integration/spec/journey.js +86 -104
- package/test/integration/spec/space-meeting.js +9 -9
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/index.ts +36 -3
- package/test/unit/spec/locus-info/index.js +205 -12
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
- package/test/unit/spec/locus-info/parser.js +54 -13
- package/test/unit/spec/media/index.ts +20 -4
- package/test/unit/spec/media/properties.ts +2 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +4027 -1075
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +63 -12
- package/test/unit/spec/meeting/utils.js +93 -0
- package/test/unit/spec/meeting-info/index.js +180 -61
- package/test/unit/spec/meeting-info/meetinginfov2.js +196 -53
- package/test/unit/spec/meetings/collection.js +12 -0
- package/test/unit/spec/meetings/index.js +619 -206
- package/test/unit/spec/meetings/utils.js +35 -12
- package/test/unit/spec/member/index.js +8 -7
- package/test/unit/spec/member/util.js +32 -0
- package/test/unit/spec/members/index.js +130 -17
- package/test/unit/spec/members/utils.js +26 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +80 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +210 -3
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +505 -135
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +74 -17
- package/test/unit/spec/roap/index.ts +181 -61
- package/test/unit/spec/roap/request.ts +27 -3
- package/test/unit/spec/roap/turnDiscovery.ts +362 -101
- package/test/unit/spec/rtcMetrics/index.ts +57 -3
- package/test/unit/spec/stats-analyzer/index.js +1225 -12
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/integrationTestUtils.js +4 -4
- package/test/utils/webex-test-users.js +12 -4
|
@@ -30,6 +30,7 @@ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy")
|
|
|
30
30
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
31
31
|
var _remoteMedia = require("./remoteMedia");
|
|
32
32
|
var _remoteMediaGroup = require("./remoteMediaGroup");
|
|
33
|
+
var _constants = require("../constants");
|
|
33
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
34
35
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
36
|
/* Predefined layouts: */
|
|
@@ -153,6 +154,7 @@ var Event;
|
|
|
153
154
|
exports.Event = Event;
|
|
154
155
|
(function (Event) {
|
|
155
156
|
Event["AudioCreated"] = "AudioCreated";
|
|
157
|
+
Event["InterpretationAudioCreated"] = "InterpretationAudioCreated";
|
|
156
158
|
Event["ScreenShareAudioCreated"] = "ScreenShareAudioCreated";
|
|
157
159
|
Event["VideoLayoutChanged"] = "VideoLayoutChanged";
|
|
158
160
|
})(Event || (exports.Event = Event = {}));
|
|
@@ -193,7 +195,10 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
193
195
|
_this.receiveSlotManager = receiveSlotManager;
|
|
194
196
|
_this.mediaRequestManagers = mediaRequestManagers;
|
|
195
197
|
_this.media = {
|
|
196
|
-
audio:
|
|
198
|
+
audio: {
|
|
199
|
+
main: undefined,
|
|
200
|
+
si: undefined
|
|
201
|
+
},
|
|
197
202
|
video: {
|
|
198
203
|
activeSpeakerGroups: {},
|
|
199
204
|
memberPanes: {}
|
|
@@ -205,7 +210,10 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
205
210
|
};
|
|
206
211
|
_this.checkConfigValidity();
|
|
207
212
|
_this.slots = {
|
|
208
|
-
audio:
|
|
213
|
+
audio: {
|
|
214
|
+
main: [],
|
|
215
|
+
si: undefined
|
|
216
|
+
},
|
|
209
217
|
screenShare: {
|
|
210
218
|
audio: [],
|
|
211
219
|
video: undefined
|
|
@@ -321,10 +329,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
321
329
|
});
|
|
322
330
|
|
|
323
331
|
// release all audio receive slots
|
|
324
|
-
this.slots.audio.forEach(function (slot) {
|
|
332
|
+
this.slots.audio.main.forEach(function (slot) {
|
|
325
333
|
return _this2.receiveSlotManager.releaseSlot(slot);
|
|
326
334
|
});
|
|
327
|
-
this.slots.audio.length = 0;
|
|
335
|
+
this.slots.audio.main.length = 0;
|
|
336
|
+
if (this.slots.audio.si) {
|
|
337
|
+
this.receiveSlotManager.releaseSlot(this.slots.audio.si);
|
|
338
|
+
}
|
|
328
339
|
|
|
329
340
|
// release screen share slots
|
|
330
341
|
this.slots.screenShare.audio.forEach(function (slot) {
|
|
@@ -437,15 +448,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
437
448
|
}
|
|
438
449
|
throw new Error('setLayout() called before start()');
|
|
439
450
|
case 4:
|
|
451
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setLayout --> new layout selected: ".concat(layoutId));
|
|
440
452
|
this.currentLayoutId = layoutId;
|
|
441
453
|
this.currentLayout = (0, _cloneDeep2.default)(this.config.video.layouts[this.currentLayoutId]);
|
|
442
|
-
_context3.next =
|
|
454
|
+
_context3.next = 9;
|
|
443
455
|
return this.updateVideoReceiveSlots();
|
|
444
|
-
case
|
|
456
|
+
case 9:
|
|
445
457
|
this.updateVideoRemoteMediaObjects();
|
|
446
458
|
this.updateScreenShareVideoRemoteMediaObject();
|
|
447
459
|
this.emitVideoLayoutChangedEvent();
|
|
448
|
-
case
|
|
460
|
+
case 12:
|
|
449
461
|
case "end":
|
|
450
462
|
return _context3.stop();
|
|
451
463
|
}
|
|
@@ -502,75 +514,171 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
502
514
|
this.mediaRequestManagers.video.commit();
|
|
503
515
|
}
|
|
504
516
|
|
|
517
|
+
/**
|
|
518
|
+
* Sets which named media group need receiving
|
|
519
|
+
* @param {MediaType} mediaType of the stream
|
|
520
|
+
* @param {number} languageCode of the stream. If the languageId is 0, the named media group request will be canceled,
|
|
521
|
+
* and only receive the main audio stream.
|
|
522
|
+
* @returns {void}
|
|
523
|
+
*/
|
|
524
|
+
}, {
|
|
525
|
+
key: "setReceiveNamedMediaGroup",
|
|
526
|
+
value: function () {
|
|
527
|
+
var _setReceiveNamedMediaGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mediaType, languageId) {
|
|
528
|
+
var _this$config$namedMed;
|
|
529
|
+
var value;
|
|
530
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
531
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
532
|
+
case 0:
|
|
533
|
+
if (!(mediaType !== _internalMediaCore.MediaType.AudioMain)) {
|
|
534
|
+
_context4.next = 2;
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
throw new Error("cannot set receive named media group which media type is ".concat(mediaType));
|
|
538
|
+
case 2:
|
|
539
|
+
value = languageId;
|
|
540
|
+
if (!(value === ((_this$config$namedMed = this.config.namedMediaGroup) === null || _this$config$namedMed === void 0 ? void 0 : _this$config$namedMed.value))) {
|
|
541
|
+
_context4.next = 5;
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
return _context4.abrupt("return");
|
|
545
|
+
case 5:
|
|
546
|
+
this.config.namedMediaGroup = {
|
|
547
|
+
type: _constants.NAMED_MEDIA_GROUP_TYPE_AUDIO,
|
|
548
|
+
value: value
|
|
549
|
+
};
|
|
550
|
+
if (this.media.audio.si) {
|
|
551
|
+
_context4.next = 11;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
_context4.next = 9;
|
|
555
|
+
return this.createInterpretationAudioMedia(true);
|
|
556
|
+
case 9:
|
|
557
|
+
_context4.next = 12;
|
|
558
|
+
break;
|
|
559
|
+
case 11:
|
|
560
|
+
this.media.audio.si.setNamedMediaGroup(this.config.namedMediaGroup, true);
|
|
561
|
+
case 12:
|
|
562
|
+
case "end":
|
|
563
|
+
return _context4.stop();
|
|
564
|
+
}
|
|
565
|
+
}, _callee4, this);
|
|
566
|
+
}));
|
|
567
|
+
function setReceiveNamedMediaGroup(_x2, _x3) {
|
|
568
|
+
return _setReceiveNamedMediaGroup.apply(this, arguments);
|
|
569
|
+
}
|
|
570
|
+
return setReceiveNamedMediaGroup;
|
|
571
|
+
}()
|
|
505
572
|
/**
|
|
506
573
|
* Creates the audio slots
|
|
507
574
|
*/
|
|
508
575
|
}, {
|
|
509
576
|
key: "createAudioMedia",
|
|
510
577
|
value: function () {
|
|
511
|
-
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
578
|
+
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
512
579
|
var i, slot;
|
|
513
|
-
return _regenerator.default.wrap(function
|
|
514
|
-
while (1) switch (
|
|
580
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
581
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
515
582
|
case 0:
|
|
583
|
+
_context5.next = 2;
|
|
584
|
+
return this.createInterpretationAudioMedia(false);
|
|
585
|
+
case 2:
|
|
516
586
|
i = 0;
|
|
517
|
-
case
|
|
587
|
+
case 3:
|
|
518
588
|
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
519
|
-
|
|
589
|
+
_context5.next = 11;
|
|
520
590
|
break;
|
|
521
591
|
}
|
|
522
|
-
|
|
592
|
+
_context5.next = 6;
|
|
523
593
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
524
|
-
case 4:
|
|
525
|
-
slot = _context4.sent;
|
|
526
|
-
this.slots.audio.push(slot);
|
|
527
594
|
case 6:
|
|
595
|
+
slot = _context5.sent;
|
|
596
|
+
this.slots.audio.main.push(slot);
|
|
597
|
+
case 8:
|
|
528
598
|
i += 1;
|
|
529
|
-
|
|
599
|
+
_context5.next = 3;
|
|
530
600
|
break;
|
|
531
|
-
case
|
|
532
|
-
// create a remote media group
|
|
533
|
-
this.media.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, this.slots.audio, 255, true);
|
|
601
|
+
case 11:
|
|
602
|
+
// create a remote media group for main audio
|
|
603
|
+
this.media.audio.main = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, this.slots.audio.main, 255, true);
|
|
534
604
|
this.emit({
|
|
535
605
|
file: 'multistream/remoteMediaManager',
|
|
536
606
|
function: 'createAudioMedia'
|
|
537
|
-
}, Event.AudioCreated, this.media.audio);
|
|
538
|
-
case
|
|
607
|
+
}, Event.AudioCreated, this.media.audio.main);
|
|
608
|
+
case 13:
|
|
539
609
|
case "end":
|
|
540
|
-
return
|
|
610
|
+
return _context5.stop();
|
|
541
611
|
}
|
|
542
|
-
},
|
|
612
|
+
}, _callee5, this);
|
|
543
613
|
}));
|
|
544
614
|
function createAudioMedia() {
|
|
545
615
|
return _createAudioMedia.apply(this, arguments);
|
|
546
616
|
}
|
|
547
617
|
return createAudioMedia;
|
|
548
618
|
}()
|
|
619
|
+
/**
|
|
620
|
+
* Creates the audio slots for named media
|
|
621
|
+
*/
|
|
622
|
+
}, {
|
|
623
|
+
key: "createInterpretationAudioMedia",
|
|
624
|
+
value: function () {
|
|
625
|
+
var _createInterpretationAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(commitRequest) {
|
|
626
|
+
var _this$config$namedMed2, _this$config$namedMed3;
|
|
627
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
628
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
629
|
+
case 0:
|
|
630
|
+
if (!(((_this$config$namedMed2 = this.config.namedMediaGroup) === null || _this$config$namedMed2 === void 0 ? void 0 : _this$config$namedMed2.type) === _constants.NAMED_MEDIA_GROUP_TYPE_AUDIO && (_this$config$namedMed3 = this.config.namedMediaGroup) !== null && _this$config$namedMed3 !== void 0 && _this$config$namedMed3.value)) {
|
|
631
|
+
_context6.next = 6;
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
_context6.next = 3;
|
|
635
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
636
|
+
case 3:
|
|
637
|
+
this.slots.audio.si = _context6.sent;
|
|
638
|
+
// create a remote media group for si audio
|
|
639
|
+
this.media.audio.si = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, [this.slots.audio.si], 255, commitRequest, {
|
|
640
|
+
namedMediaGroup: this.config.namedMediaGroup
|
|
641
|
+
});
|
|
642
|
+
this.emit({
|
|
643
|
+
file: 'multistream/remoteMediaManager',
|
|
644
|
+
function: 'createInterpretationAudioMedia'
|
|
645
|
+
}, Event.InterpretationAudioCreated, this.media.audio.si);
|
|
646
|
+
case 6:
|
|
647
|
+
case "end":
|
|
648
|
+
return _context6.stop();
|
|
649
|
+
}
|
|
650
|
+
}, _callee6, this);
|
|
651
|
+
}));
|
|
652
|
+
function createInterpretationAudioMedia(_x4) {
|
|
653
|
+
return _createInterpretationAudioMedia.apply(this, arguments);
|
|
654
|
+
}
|
|
655
|
+
return createInterpretationAudioMedia;
|
|
656
|
+
}()
|
|
549
657
|
/**
|
|
550
658
|
* Creates receive slots required for receiving screen share audio and video
|
|
551
659
|
*/
|
|
552
660
|
}, {
|
|
553
661
|
key: "createScreenShareReceiveSlots",
|
|
554
662
|
value: function () {
|
|
555
|
-
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
663
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
556
664
|
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
557
|
-
return _regenerator.default.wrap(function
|
|
558
|
-
while (1) switch (
|
|
665
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
666
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
559
667
|
case 0:
|
|
560
668
|
i = 0;
|
|
561
669
|
case 1:
|
|
562
670
|
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
563
|
-
|
|
671
|
+
_context7.next = 9;
|
|
564
672
|
break;
|
|
565
673
|
}
|
|
566
|
-
|
|
674
|
+
_context7.next = 4;
|
|
567
675
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
568
676
|
case 4:
|
|
569
|
-
slot =
|
|
677
|
+
slot = _context7.sent;
|
|
570
678
|
this.slots.screenShare.audio.push(slot);
|
|
571
679
|
case 6:
|
|
572
680
|
i += 1;
|
|
573
|
-
|
|
681
|
+
_context7.next = 1;
|
|
574
682
|
break;
|
|
575
683
|
case 9:
|
|
576
684
|
// video
|
|
@@ -578,18 +686,18 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
578
686
|
return !!layout.screenShareVideo;
|
|
579
687
|
});
|
|
580
688
|
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
581
|
-
|
|
689
|
+
_context7.next = 14;
|
|
582
690
|
break;
|
|
583
691
|
}
|
|
584
|
-
|
|
692
|
+
_context7.next = 13;
|
|
585
693
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
586
694
|
case 13:
|
|
587
|
-
this.slots.screenShare.video =
|
|
695
|
+
this.slots.screenShare.video = _context7.sent;
|
|
588
696
|
case 14:
|
|
589
697
|
case "end":
|
|
590
|
-
return
|
|
698
|
+
return _context7.stop();
|
|
591
699
|
}
|
|
592
|
-
},
|
|
700
|
+
}, _callee7, this);
|
|
593
701
|
}));
|
|
594
702
|
function createScreenShareReceiveSlots() {
|
|
595
703
|
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
@@ -724,37 +832,37 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
724
832
|
}, {
|
|
725
833
|
key: "refillRequiredSlotsIfNeeded",
|
|
726
834
|
value: function () {
|
|
727
|
-
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
835
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
728
836
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
729
|
-
return _regenerator.default.wrap(function
|
|
730
|
-
while (1) switch (
|
|
837
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
838
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
731
839
|
case 0:
|
|
732
840
|
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
733
841
|
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
734
842
|
if (!(totalNumSlots < requiredNumSlots)) {
|
|
735
|
-
|
|
843
|
+
_context8.next = 13;
|
|
736
844
|
break;
|
|
737
845
|
}
|
|
738
846
|
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
739
847
|
case 4:
|
|
740
848
|
if (!(numSlotsToCreate > 0)) {
|
|
741
|
-
|
|
849
|
+
_context8.next = 13;
|
|
742
850
|
break;
|
|
743
851
|
}
|
|
744
|
-
|
|
745
|
-
|
|
852
|
+
_context8.t0 = this.slots.video.unused;
|
|
853
|
+
_context8.next = 8;
|
|
746
854
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
747
855
|
case 8:
|
|
748
|
-
|
|
749
|
-
|
|
856
|
+
_context8.t1 = _context8.sent;
|
|
857
|
+
_context8.t0.push.call(_context8.t0, _context8.t1);
|
|
750
858
|
numSlotsToCreate -= 1;
|
|
751
|
-
|
|
859
|
+
_context8.next = 4;
|
|
752
860
|
break;
|
|
753
861
|
case 13:
|
|
754
862
|
case "end":
|
|
755
|
-
return
|
|
863
|
+
return _context8.stop();
|
|
756
864
|
}
|
|
757
|
-
},
|
|
865
|
+
}, _callee8, this);
|
|
758
866
|
}));
|
|
759
867
|
function refillRequiredSlotsIfNeeded() {
|
|
760
868
|
return _refillRequiredSlotsIfNeeded.apply(this, arguments);
|
|
@@ -776,19 +884,55 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
776
884
|
* Logs the state of the receive slots
|
|
777
885
|
*/
|
|
778
886
|
}, {
|
|
779
|
-
key: "
|
|
780
|
-
value: function
|
|
887
|
+
key: "logMainVideoReceiveSlots",
|
|
888
|
+
value: function logMainVideoReceiveSlots() {
|
|
781
889
|
var logMessage = '';
|
|
782
890
|
(0, _forEach2.default)(this.receiveSlotAllocations.activeSpeaker, function (group, groupName) {
|
|
783
|
-
logMessage += "
|
|
891
|
+
logMessage += "\ngroup: ".concat(groupName, "\n").concat(group.slots.map(function (slot) {
|
|
784
892
|
return slot.logString;
|
|
785
|
-
}).join(' '));
|
|
893
|
+
}).join(', '));
|
|
786
894
|
});
|
|
787
895
|
logMessage += '\nreceiverSelected:\n';
|
|
788
896
|
(0, _forEach2.default)(this.receiveSlotAllocations.receiverSelected, function (slot, key) {
|
|
789
897
|
logMessage += " ".concat(key, ": ").concat(slot.logString, "\n");
|
|
790
898
|
});
|
|
791
|
-
_loggerProxy.default.logger.log("RemoteMediaManager#
|
|
899
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainVideoReceiveSlots --> MAIN VIDEO receive slots: unused=".concat(this.slots.video.unused.length, ", activeSpeaker=").concat(this.slots.video.activeSpeaker.length, ", receiverSelected=").concat(this.slots.video.receiverSelected.length).concat(logMessage));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/** logs main audio slots */
|
|
903
|
+
}, {
|
|
904
|
+
key: "logMainAudioReceiveSlots",
|
|
905
|
+
value: function logMainAudioReceiveSlots() {
|
|
906
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainAudioReceiveSlots --> MAIN AUDIO receive slots: ".concat(this.slots.audio.main.map(function (slot) {
|
|
907
|
+
return slot.logString;
|
|
908
|
+
}).join(', ')));
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/** logs slides video slots */
|
|
912
|
+
}, {
|
|
913
|
+
key: "logSlidesVideoReceiveSlots",
|
|
914
|
+
value: function logSlidesVideoReceiveSlots() {
|
|
915
|
+
var _this$slots$screenSha;
|
|
916
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesVideoReceiveSlots --> SLIDES VIDEO receive slot: ".concat((_this$slots$screenSha = this.slots.screenShare.video) === null || _this$slots$screenSha === void 0 ? void 0 : _this$slots$screenSha.logString));
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/** logs slides audio slots */
|
|
920
|
+
}, {
|
|
921
|
+
key: "logSlidesAudioReceiveSlots",
|
|
922
|
+
value: function logSlidesAudioReceiveSlots() {
|
|
923
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesAudioReceiveSlots --> SLIDES AUDIO receive slots: ".concat(this.slots.screenShare.audio.map(function (slot) {
|
|
924
|
+
return slot.logString;
|
|
925
|
+
}).join(', ')));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/** Logs all current receive slots */
|
|
929
|
+
}, {
|
|
930
|
+
key: "logAllReceiveSlots",
|
|
931
|
+
value: function logAllReceiveSlots() {
|
|
932
|
+
this.logMainVideoReceiveSlots();
|
|
933
|
+
this.logMainAudioReceiveSlots();
|
|
934
|
+
this.logSlidesVideoReceiveSlots();
|
|
935
|
+
this.logSlidesAudioReceiveSlots();
|
|
792
936
|
}
|
|
793
937
|
|
|
794
938
|
/**
|
|
@@ -800,9 +944,9 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
800
944
|
}, {
|
|
801
945
|
key: "updateVideoReceiveSlots",
|
|
802
946
|
value: function () {
|
|
803
|
-
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
804
|
-
return _regenerator.default.wrap(function
|
|
805
|
-
while (1) switch (
|
|
947
|
+
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
948
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
949
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
806
950
|
case 0:
|
|
807
951
|
// move all active speaker slots to "unused"
|
|
808
952
|
this.trimActiveSpeakerSlots();
|
|
@@ -811,7 +955,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
811
955
|
this.trimReceiverSelectedSlots();
|
|
812
956
|
|
|
813
957
|
// ensure we have enough total slots for current layout
|
|
814
|
-
|
|
958
|
+
_context9.next = 4;
|
|
815
959
|
return this.refillRequiredSlotsIfNeeded();
|
|
816
960
|
case 4:
|
|
817
961
|
// allocate the slots to the right panes / pane groups
|
|
@@ -824,16 +968,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
824
968
|
this.allocateSlotsToActiveSpeakerPaneGroups();
|
|
825
969
|
// allocate receiver selected
|
|
826
970
|
this.allocateSlotsToReceiverSelectedVideoPaneGroups();
|
|
827
|
-
this.
|
|
971
|
+
this.logMainVideoReceiveSlots();
|
|
828
972
|
|
|
829
973
|
// If this is the initial layout, there may be some "unused" slots left because of the preallocation
|
|
830
974
|
// done in this.preallocateVideoReceiveSlots(), so release them now
|
|
831
975
|
this.releaseUnusedVideoSlots();
|
|
832
976
|
case 9:
|
|
833
977
|
case "end":
|
|
834
|
-
return
|
|
978
|
+
return _context9.stop();
|
|
835
979
|
}
|
|
836
|
-
},
|
|
980
|
+
}, _callee9, this);
|
|
837
981
|
}));
|
|
838
982
|
function updateVideoReceiveSlots() {
|
|
839
983
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
@@ -950,8 +1094,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
950
1094
|
screenShareAudio = options.screenShareAudio,
|
|
951
1095
|
screenShareVideo = options.screenShareVideo,
|
|
952
1096
|
commit = options.commit;
|
|
953
|
-
if (audio
|
|
954
|
-
this.media.audio.
|
|
1097
|
+
if (audio) {
|
|
1098
|
+
if (this.media.audio.main) {
|
|
1099
|
+
this.media.audio.main.stop(commit);
|
|
1100
|
+
}
|
|
1101
|
+
if (this.media.audio.si) {
|
|
1102
|
+
this.media.audio.si.stop(commit);
|
|
1103
|
+
}
|
|
955
1104
|
}
|
|
956
1105
|
if (video) {
|
|
957
1106
|
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
@@ -1023,14 +1172,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1023
1172
|
}, {
|
|
1024
1173
|
key: "addMemberVideoPane",
|
|
1025
1174
|
value: function () {
|
|
1026
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1175
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(newPane) {
|
|
1027
1176
|
var _this$currentLayout5;
|
|
1028
1177
|
var receiveSlot, remoteMedia;
|
|
1029
|
-
return _regenerator.default.wrap(function
|
|
1030
|
-
while (1) switch (
|
|
1178
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
1179
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1031
1180
|
case 0:
|
|
1032
1181
|
if (this.currentLayout) {
|
|
1033
|
-
|
|
1182
|
+
_context10.next = 2;
|
|
1034
1183
|
break;
|
|
1035
1184
|
}
|
|
1036
1185
|
throw new Error('There is no current layout selected, call start() first');
|
|
@@ -1039,16 +1188,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1039
1188
|
this.currentLayout.memberVideoPanes = [];
|
|
1040
1189
|
}
|
|
1041
1190
|
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
1042
|
-
|
|
1191
|
+
_context10.next = 5;
|
|
1043
1192
|
break;
|
|
1044
1193
|
}
|
|
1045
1194
|
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
1046
1195
|
case 5:
|
|
1047
1196
|
this.currentLayout.memberVideoPanes.push(newPane);
|
|
1048
|
-
|
|
1197
|
+
_context10.next = 8;
|
|
1049
1198
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
1050
1199
|
case 8:
|
|
1051
|
-
receiveSlot =
|
|
1200
|
+
receiveSlot = _context10.sent;
|
|
1052
1201
|
this.slots.video.receiverSelected.push(receiveSlot);
|
|
1053
1202
|
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
1054
1203
|
resolution: newPane.size
|
|
@@ -1057,14 +1206,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1057
1206
|
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
1058
1207
|
}
|
|
1059
1208
|
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
1060
|
-
return
|
|
1209
|
+
return _context10.abrupt("return", remoteMedia);
|
|
1061
1210
|
case 14:
|
|
1062
1211
|
case "end":
|
|
1063
|
-
return
|
|
1212
|
+
return _context10.stop();
|
|
1064
1213
|
}
|
|
1065
|
-
},
|
|
1214
|
+
}, _callee10, this);
|
|
1066
1215
|
}));
|
|
1067
|
-
function addMemberVideoPane(
|
|
1216
|
+
function addMemberVideoPane(_x5) {
|
|
1068
1217
|
return _addMemberVideoPane.apply(this, arguments);
|
|
1069
1218
|
}
|
|
1070
1219
|
return addMemberVideoPane;
|