@webex/plugin-meetings 3.0.0-stream-classes.5 → 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 +67 -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 +15 -10
- 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 +37 -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 +2143 -1087
- 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 +33 -18
- 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 +13 -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 +177 -65
- 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 +65 -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 +272 -35
- package/dist/types/meeting/muteState.d.ts +2 -8
- package/dist/types/meeting/request.d.ts +2 -0
- package/dist/types/meeting/util.d.ts +16 -0
- 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 +12 -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 +16 -0
- 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 -106
- 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/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 +70 -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 +19 -14
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +40 -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 +1471 -533
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -0
- 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 +12 -0
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +101 -15
- 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/journey.js +22 -22
- 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 +87 -11
- 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 +4178 -1289
- 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 +617 -204
- 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 +200 -1
- 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/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) {
|
|
@@ -503,75 +514,171 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
503
514
|
this.mediaRequestManagers.video.commit();
|
|
504
515
|
}
|
|
505
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
|
+
}()
|
|
506
572
|
/**
|
|
507
573
|
* Creates the audio slots
|
|
508
574
|
*/
|
|
509
575
|
}, {
|
|
510
576
|
key: "createAudioMedia",
|
|
511
577
|
value: function () {
|
|
512
|
-
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
578
|
+
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
513
579
|
var i, slot;
|
|
514
|
-
return _regenerator.default.wrap(function
|
|
515
|
-
while (1) switch (
|
|
580
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
581
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
516
582
|
case 0:
|
|
583
|
+
_context5.next = 2;
|
|
584
|
+
return this.createInterpretationAudioMedia(false);
|
|
585
|
+
case 2:
|
|
517
586
|
i = 0;
|
|
518
|
-
case
|
|
587
|
+
case 3:
|
|
519
588
|
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
520
|
-
|
|
589
|
+
_context5.next = 11;
|
|
521
590
|
break;
|
|
522
591
|
}
|
|
523
|
-
|
|
592
|
+
_context5.next = 6;
|
|
524
593
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
525
|
-
case 4:
|
|
526
|
-
slot = _context4.sent;
|
|
527
|
-
this.slots.audio.push(slot);
|
|
528
594
|
case 6:
|
|
595
|
+
slot = _context5.sent;
|
|
596
|
+
this.slots.audio.main.push(slot);
|
|
597
|
+
case 8:
|
|
529
598
|
i += 1;
|
|
530
|
-
|
|
599
|
+
_context5.next = 3;
|
|
531
600
|
break;
|
|
532
|
-
case
|
|
533
|
-
// create a remote media group
|
|
534
|
-
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);
|
|
535
604
|
this.emit({
|
|
536
605
|
file: 'multistream/remoteMediaManager',
|
|
537
606
|
function: 'createAudioMedia'
|
|
538
|
-
}, Event.AudioCreated, this.media.audio);
|
|
539
|
-
case
|
|
607
|
+
}, Event.AudioCreated, this.media.audio.main);
|
|
608
|
+
case 13:
|
|
540
609
|
case "end":
|
|
541
|
-
return
|
|
610
|
+
return _context5.stop();
|
|
542
611
|
}
|
|
543
|
-
},
|
|
612
|
+
}, _callee5, this);
|
|
544
613
|
}));
|
|
545
614
|
function createAudioMedia() {
|
|
546
615
|
return _createAudioMedia.apply(this, arguments);
|
|
547
616
|
}
|
|
548
617
|
return createAudioMedia;
|
|
549
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
|
+
}()
|
|
550
657
|
/**
|
|
551
658
|
* Creates receive slots required for receiving screen share audio and video
|
|
552
659
|
*/
|
|
553
660
|
}, {
|
|
554
661
|
key: "createScreenShareReceiveSlots",
|
|
555
662
|
value: function () {
|
|
556
|
-
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
663
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
557
664
|
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
558
|
-
return _regenerator.default.wrap(function
|
|
559
|
-
while (1) switch (
|
|
665
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
666
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
560
667
|
case 0:
|
|
561
668
|
i = 0;
|
|
562
669
|
case 1:
|
|
563
670
|
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
564
|
-
|
|
671
|
+
_context7.next = 9;
|
|
565
672
|
break;
|
|
566
673
|
}
|
|
567
|
-
|
|
674
|
+
_context7.next = 4;
|
|
568
675
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
569
676
|
case 4:
|
|
570
|
-
slot =
|
|
677
|
+
slot = _context7.sent;
|
|
571
678
|
this.slots.screenShare.audio.push(slot);
|
|
572
679
|
case 6:
|
|
573
680
|
i += 1;
|
|
574
|
-
|
|
681
|
+
_context7.next = 1;
|
|
575
682
|
break;
|
|
576
683
|
case 9:
|
|
577
684
|
// video
|
|
@@ -579,18 +686,18 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
579
686
|
return !!layout.screenShareVideo;
|
|
580
687
|
});
|
|
581
688
|
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
582
|
-
|
|
689
|
+
_context7.next = 14;
|
|
583
690
|
break;
|
|
584
691
|
}
|
|
585
|
-
|
|
692
|
+
_context7.next = 13;
|
|
586
693
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
587
694
|
case 13:
|
|
588
|
-
this.slots.screenShare.video =
|
|
695
|
+
this.slots.screenShare.video = _context7.sent;
|
|
589
696
|
case 14:
|
|
590
697
|
case "end":
|
|
591
|
-
return
|
|
698
|
+
return _context7.stop();
|
|
592
699
|
}
|
|
593
|
-
},
|
|
700
|
+
}, _callee7, this);
|
|
594
701
|
}));
|
|
595
702
|
function createScreenShareReceiveSlots() {
|
|
596
703
|
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
@@ -725,37 +832,37 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
725
832
|
}, {
|
|
726
833
|
key: "refillRequiredSlotsIfNeeded",
|
|
727
834
|
value: function () {
|
|
728
|
-
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
835
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
729
836
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
730
|
-
return _regenerator.default.wrap(function
|
|
731
|
-
while (1) switch (
|
|
837
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
838
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
732
839
|
case 0:
|
|
733
840
|
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
734
841
|
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
735
842
|
if (!(totalNumSlots < requiredNumSlots)) {
|
|
736
|
-
|
|
843
|
+
_context8.next = 13;
|
|
737
844
|
break;
|
|
738
845
|
}
|
|
739
846
|
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
740
847
|
case 4:
|
|
741
848
|
if (!(numSlotsToCreate > 0)) {
|
|
742
|
-
|
|
849
|
+
_context8.next = 13;
|
|
743
850
|
break;
|
|
744
851
|
}
|
|
745
|
-
|
|
746
|
-
|
|
852
|
+
_context8.t0 = this.slots.video.unused;
|
|
853
|
+
_context8.next = 8;
|
|
747
854
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
748
855
|
case 8:
|
|
749
|
-
|
|
750
|
-
|
|
856
|
+
_context8.t1 = _context8.sent;
|
|
857
|
+
_context8.t0.push.call(_context8.t0, _context8.t1);
|
|
751
858
|
numSlotsToCreate -= 1;
|
|
752
|
-
|
|
859
|
+
_context8.next = 4;
|
|
753
860
|
break;
|
|
754
861
|
case 13:
|
|
755
862
|
case "end":
|
|
756
|
-
return
|
|
863
|
+
return _context8.stop();
|
|
757
864
|
}
|
|
758
|
-
},
|
|
865
|
+
}, _callee8, this);
|
|
759
866
|
}));
|
|
760
867
|
function refillRequiredSlotsIfNeeded() {
|
|
761
868
|
return _refillRequiredSlotsIfNeeded.apply(this, arguments);
|
|
@@ -796,7 +903,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
796
903
|
}, {
|
|
797
904
|
key: "logMainAudioReceiveSlots",
|
|
798
905
|
value: function logMainAudioReceiveSlots() {
|
|
799
|
-
_loggerProxy.default.logger.log("RemoteMediaManager#logMainAudioReceiveSlots --> MAIN AUDIO receive slots: ".concat(this.slots.audio.map(function (slot) {
|
|
906
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainAudioReceiveSlots --> MAIN AUDIO receive slots: ".concat(this.slots.audio.main.map(function (slot) {
|
|
800
907
|
return slot.logString;
|
|
801
908
|
}).join(', ')));
|
|
802
909
|
}
|
|
@@ -837,9 +944,9 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
837
944
|
}, {
|
|
838
945
|
key: "updateVideoReceiveSlots",
|
|
839
946
|
value: function () {
|
|
840
|
-
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
841
|
-
return _regenerator.default.wrap(function
|
|
842
|
-
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) {
|
|
843
950
|
case 0:
|
|
844
951
|
// move all active speaker slots to "unused"
|
|
845
952
|
this.trimActiveSpeakerSlots();
|
|
@@ -848,7 +955,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
848
955
|
this.trimReceiverSelectedSlots();
|
|
849
956
|
|
|
850
957
|
// ensure we have enough total slots for current layout
|
|
851
|
-
|
|
958
|
+
_context9.next = 4;
|
|
852
959
|
return this.refillRequiredSlotsIfNeeded();
|
|
853
960
|
case 4:
|
|
854
961
|
// allocate the slots to the right panes / pane groups
|
|
@@ -868,9 +975,9 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
868
975
|
this.releaseUnusedVideoSlots();
|
|
869
976
|
case 9:
|
|
870
977
|
case "end":
|
|
871
|
-
return
|
|
978
|
+
return _context9.stop();
|
|
872
979
|
}
|
|
873
|
-
},
|
|
980
|
+
}, _callee9, this);
|
|
874
981
|
}));
|
|
875
982
|
function updateVideoReceiveSlots() {
|
|
876
983
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
@@ -987,8 +1094,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
987
1094
|
screenShareAudio = options.screenShareAudio,
|
|
988
1095
|
screenShareVideo = options.screenShareVideo,
|
|
989
1096
|
commit = options.commit;
|
|
990
|
-
if (audio
|
|
991
|
-
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
|
+
}
|
|
992
1104
|
}
|
|
993
1105
|
if (video) {
|
|
994
1106
|
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
@@ -1060,14 +1172,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1060
1172
|
}, {
|
|
1061
1173
|
key: "addMemberVideoPane",
|
|
1062
1174
|
value: function () {
|
|
1063
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1175
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(newPane) {
|
|
1064
1176
|
var _this$currentLayout5;
|
|
1065
1177
|
var receiveSlot, remoteMedia;
|
|
1066
|
-
return _regenerator.default.wrap(function
|
|
1067
|
-
while (1) switch (
|
|
1178
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
1179
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1068
1180
|
case 0:
|
|
1069
1181
|
if (this.currentLayout) {
|
|
1070
|
-
|
|
1182
|
+
_context10.next = 2;
|
|
1071
1183
|
break;
|
|
1072
1184
|
}
|
|
1073
1185
|
throw new Error('There is no current layout selected, call start() first');
|
|
@@ -1076,16 +1188,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1076
1188
|
this.currentLayout.memberVideoPanes = [];
|
|
1077
1189
|
}
|
|
1078
1190
|
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
1079
|
-
|
|
1191
|
+
_context10.next = 5;
|
|
1080
1192
|
break;
|
|
1081
1193
|
}
|
|
1082
1194
|
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
1083
1195
|
case 5:
|
|
1084
1196
|
this.currentLayout.memberVideoPanes.push(newPane);
|
|
1085
|
-
|
|
1197
|
+
_context10.next = 8;
|
|
1086
1198
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
1087
1199
|
case 8:
|
|
1088
|
-
receiveSlot =
|
|
1200
|
+
receiveSlot = _context10.sent;
|
|
1089
1201
|
this.slots.video.receiverSelected.push(receiveSlot);
|
|
1090
1202
|
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
1091
1203
|
resolution: newPane.size
|
|
@@ -1094,14 +1206,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1094
1206
|
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
1095
1207
|
}
|
|
1096
1208
|
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
1097
|
-
return
|
|
1209
|
+
return _context10.abrupt("return", remoteMedia);
|
|
1098
1210
|
case 14:
|
|
1099
1211
|
case "end":
|
|
1100
|
-
return
|
|
1212
|
+
return _context10.stop();
|
|
1101
1213
|
}
|
|
1102
|
-
},
|
|
1214
|
+
}, _callee10, this);
|
|
1103
1215
|
}));
|
|
1104
|
-
function addMemberVideoPane(
|
|
1216
|
+
function addMemberVideoPane(_x5) {
|
|
1105
1217
|
return _addMemberVideoPane.apply(this, arguments);
|
|
1106
1218
|
}
|
|
1107
1219
|
return addMemberVideoPane;
|