fcr-core 3.10.2 → 3.10.5
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/lib/engine/index.js +102 -108
- package/lib/imports.js +1 -0
- package/lib/media-control/desktop.js +22 -13
- package/lib/media-control/mobile.js +27 -19
- package/lib/media-control/type.d.ts +3 -3
- package/lib/monitor-control/index.js +17 -7
- package/lib/peer-session/index.js +120 -121
- package/lib/plugins/chat/chatroom.js +119 -96
- package/lib/plugins/chat/connector.js +69 -48
- package/lib/remote-control/index.js +194 -216
- package/lib/room-control/ability-control/index.js +20 -10
- package/lib/room-control/application-control/index.js +82 -75
- package/lib/room-control/group-control/index.js +31 -30
- package/lib/room-control/helpers/board-init-info-helper.js +16 -10
- package/lib/room-control/helpers/validation-helper.js +1 -1
- package/lib/room-control/index.js +70 -51
- package/lib/room-control/infinity-room-control/index.js +27 -19
- package/lib/room-control/interpreter-control/index.js +77 -65
- package/lib/room-control/interpreter-control/room.js +6 -4
- package/lib/room-control/join-before-host-waitingroom-control/index.js +6 -4
- package/lib/room-control/mainroom-control/index.js +37 -25
- package/lib/room-control/privilege-control/helper.js +28 -13
- package/lib/room-control/privilege-control/index.js +36 -28
- package/lib/room-control/room-connector-control/index.js +52 -49
- package/lib/room-control/room-connector-control/type.d.ts +1 -1
- package/lib/room-control/room-control-factory.js +10 -12
- package/lib/room-control/room-session/index.js +77 -74
- package/lib/room-control/shared-cache.js +63 -56
- package/lib/room-control/sharing-control/index.js +65 -57
- package/lib/room-control/stream-control/index.js +197 -193
- package/lib/room-control/stt-control/de-compress-gzip.js +10 -0
- package/lib/room-control/stt-control/index.js +93 -86
- package/lib/room-control/user-control/index.js +162 -155
- package/lib/room-control/waitingroom-control/index.js +18 -9
- package/lib/room-control/whiteboard-control/utils.js +4 -2
- package/lib/room-control/whiteboard-control-v1/board-subwindow.js +2 -1
- package/lib/room-control/whiteboard-control-v1/board-window.js +120 -103
- package/lib/room-control/whiteboard-control-v1/factory.js +7 -4
- package/lib/room-control/whiteboard-control-v1/index.js +80 -67
- package/lib/room-control/whiteboard-control-v1/mount-manager.js +4 -2
- package/lib/room-control/whiteboard-control-v1/utils.js +17 -14
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +14 -10
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +17 -8
- package/lib/room-control/whiteboard-control-v2/base/index.js +61 -53
- package/lib/room-control/whiteboard-control-v2/base/main-window.js +39 -30
- package/lib/room-control/whiteboard-control-v2/utils.js +10 -10
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +45 -33
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +27 -11
- package/lib/room-control/widget-control/index.js +43 -33
- package/lib/room-router/index.js +66 -58
- package/lib/schema.d.ts +15 -15
- package/lib/service/api.js +446 -548
- package/lib/struct.js +5 -2
- package/lib/utilities/abortable-retry.js +3 -0
- package/lib/utilities/collection.js +15 -11
- package/lib/utilities/error-helpers.js +34 -27
- package/lib/utilities/error.js +4 -3
- package/lib/utilities/join-helper.js +37 -31
- package/lib/utilities/logger.js +8 -5
- package/lib/utilities/parameters.js +21 -10
- package/lib/utilities/retry-helpers.js +1 -0
- package/lib/utilities/stream.js +16 -11
- package/lib/utilities/user.js +4 -3
- package/lib/utilities/validate-params.js +1 -1
- package/lib/utilities/video-encoder-config.js +10 -5
- package/lib-es/engine/index.js +102 -108
- package/lib-es/media-control/desktop.js +22 -13
- package/lib-es/media-control/mobile.js +27 -19
- package/lib-es/monitor-control/index.js +16 -7
- package/lib-es/peer-session/index.js +120 -121
- package/lib-es/plugins/chat/chatroom.js +118 -95
- package/lib-es/plugins/chat/connector.js +67 -47
- package/lib-es/remote-control/index.js +194 -216
- package/lib-es/room-control/ability-control/index.js +19 -10
- package/lib-es/room-control/application-control/index.js +81 -75
- package/lib-es/room-control/group-control/index.js +31 -30
- package/lib-es/room-control/helpers/board-init-info-helper.js +15 -10
- package/lib-es/room-control/helpers/validation-helper.js +1 -1
- package/lib-es/room-control/index.js +69 -51
- package/lib-es/room-control/infinity-room-control/index.js +26 -19
- package/lib-es/room-control/interpreter-control/index.js +77 -65
- package/lib-es/room-control/interpreter-control/room.js +5 -4
- package/lib-es/room-control/join-before-host-waitingroom-control/index.js +5 -4
- package/lib-es/room-control/mainroom-control/index.js +37 -25
- package/lib-es/room-control/privilege-control/helper.js +27 -13
- package/lib-es/room-control/privilege-control/index.js +36 -28
- package/lib-es/room-control/room-connector-control/index.js +52 -49
- package/lib-es/room-control/room-control-factory.js +10 -12
- package/lib-es/room-control/room-session/index.js +77 -74
- package/lib-es/room-control/shared-cache.js +62 -56
- package/lib-es/room-control/sharing-control/index.js +64 -57
- package/lib-es/room-control/stream-control/index.js +197 -193
- package/lib-es/room-control/stt-control/de-compress-gzip.js +10 -0
- package/lib-es/room-control/stt-control/index.js +93 -86
- package/lib-es/room-control/user-control/index.js +162 -155
- package/lib-es/room-control/waitingroom-control/index.js +18 -9
- package/lib-es/room-control/whiteboard-control/utils.js +4 -2
- package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +2 -1
- package/lib-es/room-control/whiteboard-control-v1/board-window.js +120 -103
- package/lib-es/room-control/whiteboard-control-v1/factory.js +6 -4
- package/lib-es/room-control/whiteboard-control-v1/index.js +80 -67
- package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +3 -2
- package/lib-es/room-control/whiteboard-control-v1/utils.js +17 -14
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +13 -10
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +16 -8
- package/lib-es/room-control/whiteboard-control-v2/base/index.js +60 -53
- package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +39 -30
- package/lib-es/room-control/whiteboard-control-v2/utils.js +10 -10
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +45 -33
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +26 -11
- package/lib-es/room-control/widget-control/index.js +42 -33
- package/lib-es/room-router/index.js +66 -58
- package/lib-es/service/api.js +445 -548
- package/lib-es/struct.js +4 -2
- package/lib-es/utilities/abortable-retry.js +3 -0
- package/lib-es/utilities/collection.js +14 -11
- package/lib-es/utilities/error-helpers.js +33 -26
- package/lib-es/utilities/error.js +4 -3
- package/lib-es/utilities/join-helper.js +36 -29
- package/lib-es/utilities/logger.js +7 -5
- package/lib-es/utilities/parameters.js +21 -10
- package/lib-es/utilities/retry-helpers.js +1 -0
- package/lib-es/utilities/stream.js +15 -11
- package/lib-es/utilities/user.js +4 -3
- package/lib-es/utilities/validate-params.js +1 -1
- package/lib-es/utilities/video-encoder-config.js +10 -5
- package/package.json +4 -4
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import "core-js/modules/es.symbol.description.js";
|
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
|
1
3
|
import "core-js/modules/esnext.function.metadata.js";
|
|
2
4
|
import "core-js/modules/esnext.symbol.metadata.js";
|
|
3
|
-
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
var _FcrStreamControlImpl;
|
|
8
|
+
let _initProto, _addLocalStreamsDecs, _bindLocalStreamsDecs, _updatePublishPrivilegeOfStreamsDecs, _updatePublishPrivilegeOfStreamsByScopeDecs, _removeStreamsDecs, _setVideoEncoderConfigDecs, _setDualStreamModeDecs, _setScreenScenarioDecs, _startRenderRemoteVideoStreamDecs, _stopRenderRemoteVideoStreamDecs, _startPlayRemoteAudioStreamDecs, _stopPlayRemoteAudioStreamDecs, _takeSnapshotDecs, _addLocalScreenStreamDecs, _adjustRemoteAudioStreamVolumeDecs, _mergeAudioStreamDecs, _splitAudioStreamDecs, _ref;
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
11
|
import "core-js/modules/es.array.includes.js";
|
|
5
12
|
import "core-js/modules/es.array.push.js";
|
|
6
13
|
import "core-js/modules/es.json.stringify.js";
|
|
@@ -23,6 +30,7 @@ import "core-js/modules/esnext.map.merge.js";
|
|
|
23
30
|
import "core-js/modules/esnext.map.reduce.js";
|
|
24
31
|
import "core-js/modules/esnext.map.some.js";
|
|
25
32
|
import "core-js/modules/esnext.map.update.js";
|
|
33
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
26
34
|
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
27
35
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
28
36
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -42,104 +50,148 @@ import { ErrorModuleCode } from '../../imports';
|
|
|
42
50
|
/**
|
|
43
51
|
* @internal
|
|
44
52
|
*/
|
|
53
|
+
_ref = (_addLocalStreamsDecs = [bound, trace(['streams']), validateParams(fcrLocalStreamCreateArrayConfigSchema)], _bindLocalStreamsDecs = [bound, trace(['streams']), validateParams(fcrStreamBindConfigArrySchema)], _updatePublishPrivilegeOfStreamsDecs = [bound, trace, validateParams(fcrUpdateStreamPrivilegesRecordSchema)], _updatePublishPrivilegeOfStreamsByScopeDecs = [bound, trace, validateParams(fcrUpdateStreamPrivilegeSchema, fcrUpdateStreamPrivilegeScopeSchema)], _removeStreamsDecs = [bound, trace(['streams']), validateParams(stringArraySchema)], _setVideoEncoderConfigDecs = [bound, trace(['streamId', 'config', 'streamType']), validateParams(stringSchema, agoraRtcVideoEncoderConfigurationSchema, fcrVideoStreamTypeSchema)], _setDualStreamModeDecs = [bound, trace(['streamId', 'enable'])], _setScreenScenarioDecs = [bound, trace(['type']), validateParams(fcrScreenScenarioTypeSchema)], _startRenderRemoteVideoStreamDecs = [bound, trace(['streamId', 'type', 'config', 'element']), validateParams(stringSchema, fcrVideoStreamTypeSchema, fcrRenderConfigSchema, createUnionSchema([fcrRenderViewSchema, objectSchema]))], _stopRenderRemoteVideoStreamDecs = [bound, trace(['streamId', 'element']), validateParams(stringSchema, fcrRenderViewSchema)], _startPlayRemoteAudioStreamDecs = [bound, trace(['streamId']), validateParams(stringSchema)], _stopPlayRemoteAudioStreamDecs = [bound, trace(['streamId']), validateParams(stringSchema)], _takeSnapshotDecs = [bound, trace(['streamId', 'filePath']), validateParams(stringSchema, stringSchema)], _addLocalScreenStreamDecs = [bound, trace(['config', 'size']), validateParams(fcrScreenStreamCreateConfigSchema, fcrSizeSchema)], _adjustRemoteAudioStreamVolumeDecs = [bound, trace(['streamId', 'volume']), validateParams(stringSchema, numberSchema)], _mergeAudioStreamDecs = [bound, trace(['targetUserId']), validateParams(stringSchema)], _splitAudioStreamDecs = [bound, trace(['userId']), validateParams(stringSchema)], "logger");
|
|
45
54
|
export class FcrStreamControlImpl {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const stream = event.modifiedStream;
|
|
75
|
-
const exists = stream.streamId in this._streamMapByStreamId;
|
|
76
|
-
if (exists) {
|
|
77
|
-
this.logger.warn(`[FcrStreamControl] stream added when the stream already exists, streamId: ${stream.streamId}`);
|
|
78
|
-
} else {
|
|
79
|
-
this._streamList.push(stream);
|
|
80
|
-
this._streamMapByStreamId[stream.streamId] = stream;
|
|
81
|
-
this._putUserStream(stream.owner.userId, stream);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
this._observable.notifyObservers('onStreamsAdded', sceneId, fcrStreamEvents);
|
|
85
|
-
},
|
|
86
|
-
onStreamsRemoved: (sceneId, events) => {
|
|
87
|
-
const fcrStreamEvents = events.map(this._convertStreamEvent);
|
|
88
|
-
fcrStreamEvents.forEach(event => {
|
|
89
|
-
const stream = event.modifiedStream;
|
|
90
|
-
const exists = stream.streamId in this._streamMapByStreamId;
|
|
91
|
-
if (!exists) {
|
|
92
|
-
this.logger.warn(`[FcrStreamControl] stream removed when the stream does not exist, streamId: ${stream.streamId}`);
|
|
93
|
-
} else {
|
|
94
|
-
const index = this._streamList.findIndex(s => stream.streamId === s.streamId);
|
|
95
|
-
if (index !== -1) {
|
|
96
|
-
this._streamList.splice(index, 1);
|
|
55
|
+
constructor(_engine, _scene, _api, _sharedCache) {
|
|
56
|
+
//@internal
|
|
57
|
+
_defineProperty(this, _ref, (_initProto(this), createLogger({
|
|
58
|
+
prefix: 'FcrStreamControlImpl'
|
|
59
|
+
})));
|
|
60
|
+
//@internal
|
|
61
|
+
_defineProperty(this, "_observable", new AgoraObservable());
|
|
62
|
+
//@internal
|
|
63
|
+
_defineProperty(this, "_streamMapByStreamId", {});
|
|
64
|
+
//@internal
|
|
65
|
+
_defineProperty(this, "_streamMapByUserId", {});
|
|
66
|
+
//@internal
|
|
67
|
+
_defineProperty(this, "_streamList", []);
|
|
68
|
+
//@internal
|
|
69
|
+
_defineProperty(this, "_subscribedStreamsControl", new FcrSubscribedStreamsControl());
|
|
70
|
+
//@internal
|
|
71
|
+
_defineProperty(this, "_sceneObserver", {
|
|
72
|
+
onStreamsAdded: (sceneId, events) => {
|
|
73
|
+
const fcrStreamEvents = events.map(this._convertStreamEvent);
|
|
74
|
+
fcrStreamEvents.forEach(event => {
|
|
75
|
+
const stream = event.modifiedStream;
|
|
76
|
+
const exists = stream.streamId in this._streamMapByStreamId;
|
|
77
|
+
if (exists) {
|
|
78
|
+
this.logger.warn("[FcrStreamControl] stream added when the stream already exists, streamId: ".concat(stream.streamId));
|
|
79
|
+
} else {
|
|
80
|
+
this._streamList.push(stream);
|
|
81
|
+
this._streamMapByStreamId[stream.streamId] = stream;
|
|
82
|
+
this._putUserStream(stream.owner.userId, stream);
|
|
97
83
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.
|
|
84
|
+
});
|
|
85
|
+
this._observable.notifyObservers('onStreamsAdded', sceneId, fcrStreamEvents);
|
|
86
|
+
},
|
|
87
|
+
onStreamsRemoved: (sceneId, events) => {
|
|
88
|
+
const fcrStreamEvents = events.map(this._convertStreamEvent);
|
|
89
|
+
fcrStreamEvents.forEach(event => {
|
|
90
|
+
const stream = event.modifiedStream;
|
|
91
|
+
const exists = stream.streamId in this._streamMapByStreamId;
|
|
92
|
+
if (!exists) {
|
|
93
|
+
this.logger.warn("[FcrStreamControl] stream removed when the stream does not exist, streamId: ".concat(stream.streamId));
|
|
94
|
+
} else {
|
|
95
|
+
const index = this._streamList.findIndex(s => stream.streamId === s.streamId);
|
|
96
|
+
if (index !== -1) {
|
|
97
|
+
this._streamList.splice(index, 1);
|
|
98
|
+
}
|
|
99
|
+
delete this._streamMapByStreamId[stream.streamId];
|
|
100
|
+
this._deleteUserStream(stream.owner.userId, stream);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
this._observable.notifyObservers('onStreamsRemoved', sceneId, fcrStreamEvents);
|
|
104
|
+
},
|
|
105
|
+
onStreamsUpdated: (sceneId, events) => {
|
|
106
|
+
const fcrStreamEvents = events.map(this._convertStreamEvent);
|
|
107
|
+
fcrStreamEvents.forEach(event => {
|
|
108
|
+
const stream = event.modifiedStream;
|
|
109
|
+
const exists = stream.streamId in this._streamMapByStreamId;
|
|
110
|
+
if (!exists) {
|
|
111
|
+
this.logger.warn("[FcrStreamControl] stream updated when the stream does not exist, streamId: ".concat(stream.streamId));
|
|
112
|
+
} else {
|
|
113
|
+
const index = this._streamList.findIndex(s => stream.streamId === s.streamId);
|
|
114
|
+
if (index !== -1) {
|
|
115
|
+
this._streamList.splice(index, 1, stream);
|
|
116
|
+
}
|
|
117
|
+
this._streamMapByStreamId[stream.streamId] = stream;
|
|
118
|
+
this._setUserStream(stream.owner.userId, stream);
|
|
115
119
|
}
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
});
|
|
121
|
+
this._observable.notifyObservers('onStreamsUpdated', sceneId, fcrStreamEvents);
|
|
122
|
+
},
|
|
123
|
+
onLocalVideoStatsUpdated: (sceneId, streamId, stats) => {
|
|
124
|
+
this._observable.notifyObservers('onLocalVideoStatsUpdated', sceneId, streamId, stats);
|
|
125
|
+
},
|
|
126
|
+
onLocalAudioStatsUpdated: (sceneId, streamId, stats) => {
|
|
127
|
+
this._observable.notifyObservers('onLocalAudioStatsUpdated', sceneId, streamId, stats);
|
|
128
|
+
},
|
|
129
|
+
onRemoteVideoStatsUpdated: (sceneId, streamId, stats) => {
|
|
130
|
+
this._observable.notifyObservers('onRemoteVideoStatsUpdated', sceneId, streamId, stats);
|
|
131
|
+
},
|
|
132
|
+
onRemoteAudioStatsUpdated: (sceneId, streamId, stats) => {
|
|
133
|
+
this._observable.notifyObservers('onRemoteAudioStatsUpdated', sceneId, streamId, stats);
|
|
134
|
+
},
|
|
135
|
+
onFirstRemoteVideoFrameRendered: (sceneId, streamId) => {
|
|
136
|
+
this._observable.notifyObservers('onFirstRemoteVideoFrameRendered', sceneId, streamId);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
//@internal
|
|
140
|
+
_defineProperty(this, "_addSceneStreamPlayerObserver", {
|
|
141
|
+
onRemoteAudioStreamVolumeUpdated: (streamId, volume) => this._observable.notifyObservers('onStreamVolumeIndicationUpdated', this._scene.sceneId, streamId, volume)
|
|
142
|
+
});
|
|
143
|
+
_defineProperty(this, "_convertStreamInfo", info => {
|
|
144
|
+
return {
|
|
145
|
+
streamId: info.streamId,
|
|
146
|
+
streamName: info.streamName,
|
|
147
|
+
owner: convertRteUserToFcrUser(info.owner, this._roomCache),
|
|
148
|
+
streamType: info.streamType,
|
|
149
|
+
videoSourceType: info.videoSourceType,
|
|
150
|
+
audioSourceType: info.audioSourceType,
|
|
151
|
+
videoSourceState: info.videoSourceState,
|
|
152
|
+
audioSourceState: info.audioSourceState,
|
|
153
|
+
videoSourceId: info.videoSourceId,
|
|
154
|
+
audioSourceId: info.audioSourceId,
|
|
155
|
+
connectorType: info.connectorType
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
_defineProperty(this, "_getPublishStateByPrivilege", privilege => {
|
|
159
|
+
return privilege === AgoraRteStreamPrivilegeOperation.HAS_PRIVILEGE ? 1 : privilege === AgoraRteStreamPrivilegeOperation.NOPRIVILEGE ? 0 : undefined;
|
|
160
|
+
});
|
|
161
|
+
_defineProperty(this, "_convertStreamEvent", event => {
|
|
162
|
+
return {
|
|
163
|
+
modifiedStream: this._convertStreamInfo(event.modifiedStream),
|
|
164
|
+
operatorUser: event.operatorUser ? convertRteUserToFcrUser(event.operatorUser, this._roomCache) : undefined,
|
|
165
|
+
cause: event.cause
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
_defineProperty(this, "_putUserStream", (userId, stream) => {
|
|
169
|
+
if (!this._streamMapByUserId[userId]) {
|
|
170
|
+
this._streamMapByUserId[userId] = [];
|
|
171
|
+
}
|
|
172
|
+
this._streamMapByUserId[userId].push(stream);
|
|
173
|
+
});
|
|
174
|
+
_defineProperty(this, "_setUserStream", (userId, stream) => {
|
|
175
|
+
const streams = this._streamMapByUserId[userId];
|
|
176
|
+
if (streams) {
|
|
177
|
+
const index = streams.findIndex(s => s.streamId === stream.streamId);
|
|
178
|
+
if (index !== -1) {
|
|
179
|
+
streams.splice(index, 1, stream);
|
|
118
180
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
onFirstRemoteVideoFrameRendered: (sceneId, streamId) => {
|
|
135
|
-
this._observable.notifyObservers('onFirstRemoteVideoFrameRendered', sceneId, streamId);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
//@internal
|
|
139
|
-
_addSceneStreamPlayerObserver = {
|
|
140
|
-
onRemoteAudioStreamVolumeUpdated: (streamId, volume) => this._observable.notifyObservers('onStreamVolumeIndicationUpdated', this._scene.sceneId, streamId, volume)
|
|
141
|
-
};
|
|
142
|
-
constructor(_engine, _scene, _api, _sharedCache) {
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
_defineProperty(this, "_deleteUserStream", (userId, stream) => {
|
|
184
|
+
const userStreams = this._streamMapByUserId[userId];
|
|
185
|
+
if (userStreams) {
|
|
186
|
+
const index = userStreams.findIndex(s => s.streamId === stream.streamId);
|
|
187
|
+
if (index !== -1) {
|
|
188
|
+
userStreams.splice(index, 1);
|
|
189
|
+
}
|
|
190
|
+
if (userStreams.length === 0) {
|
|
191
|
+
delete this._streamMapByUserId[userId];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
143
195
|
this._engine = _engine;
|
|
144
196
|
this._scene = _scene;
|
|
145
197
|
this._api = _api;
|
|
@@ -178,18 +230,20 @@ export class FcrStreamControlImpl {
|
|
|
178
230
|
}
|
|
179
231
|
}
|
|
180
232
|
async addLocalStreams(streams) {
|
|
181
|
-
const streamCreateResult = await handleRequestError(() => this._api.createStreamBatch(this._scene.sceneId, streams.map(config =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
233
|
+
const streamCreateResult = await handleRequestError(() => this._api.createStreamBatch(this._scene.sceneId, streams.map(config => {
|
|
234
|
+
var _config$generateToken;
|
|
235
|
+
return _objectSpread({
|
|
236
|
+
streamName: config.streamName,
|
|
237
|
+
streamUuid: '0',
|
|
238
|
+
// means that this stream needs to be created
|
|
239
|
+
generateToken: (_config$generateToken = config.generateToken) !== null && _config$generateToken !== void 0 ? _config$generateToken : config.videoSourceType === AgoraRteVideoSourceType.SCREEN,
|
|
240
|
+
userUuid: config.ownerId,
|
|
241
|
+
videoSourceType: config.videoSourceType,
|
|
242
|
+
audioSourceType: config.audioSourceType,
|
|
243
|
+
videoSourceUuid: config.videoSourceId,
|
|
244
|
+
audioSourceUuid: config.audioSourceId
|
|
245
|
+
}, convertStreamTypeToPublishState(config.streamType));
|
|
246
|
+
})), ErrorModuleCode.FCR_ROOM_STREAM, 'add local streams failed');
|
|
193
247
|
|
|
194
248
|
// 处理需要 token 的流
|
|
195
249
|
this._handleStreamTokensPreparation(streams, streamCreateResult.data);
|
|
@@ -277,7 +331,7 @@ export class FcrStreamControlImpl {
|
|
|
277
331
|
}
|
|
278
332
|
startRenderRemoteVideoStream(streamId, type, config, element) {
|
|
279
333
|
const startTime = Date.now();
|
|
280
|
-
const parameters =
|
|
334
|
+
const parameters = "streamId: ".concat(streamId, ", config: ").concat(JSON.stringify(config), ", type: ").concat(type, ", element: ").concat(element);
|
|
281
335
|
|
|
282
336
|
// 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
|
|
283
337
|
const streamLayer = this._convertToStreamLayer(type);
|
|
@@ -288,13 +342,13 @@ export class FcrStreamControlImpl {
|
|
|
288
342
|
this._subscribedStreamsControl.bind(viewId, streamId);
|
|
289
343
|
return FcrReturnCode.SUCCESS;
|
|
290
344
|
} catch (error) {
|
|
291
|
-
this.logger.error(
|
|
345
|
+
this.logger.error("[FcrStreamControl][start-render-remote-video-stream] render failed, streamId: ".concat(streamId, ", error: ").concat(error, ", parameters: ").concat(parameters, ", duration: ").concat(Date.now() - startTime, "ms"));
|
|
292
346
|
throw error;
|
|
293
347
|
}
|
|
294
348
|
}
|
|
295
349
|
stopRenderRemoteVideoStream(streamId, element) {
|
|
296
350
|
const startTime = Date.now();
|
|
297
|
-
const parameters =
|
|
351
|
+
const parameters = "streamId: ".concat(streamId, ", element: ").concat(element);
|
|
298
352
|
try {
|
|
299
353
|
this._scene.streamPlayer.stopRenderRemoteVideoStream(streamId, element);
|
|
300
354
|
const viewId = this._subscribedStreamsControl.getViewId(element);
|
|
@@ -303,11 +357,11 @@ export class FcrStreamControlImpl {
|
|
|
303
357
|
if (shouldUnsubscribe) {
|
|
304
358
|
this._scene.streamPlayer.unsubscribeRemoteVideoStream(streamId);
|
|
305
359
|
} else {
|
|
306
|
-
this.logger.info(
|
|
360
|
+
this.logger.info("[FcrStreamControl][unsubscribe-remote-video-stream] still has other views, do not unsubscribe, streamId: ".concat(streamId, ", parameters: ").concat(parameters, ", duration: ").concat(Date.now() - startTime, "ms"));
|
|
307
361
|
}
|
|
308
362
|
return FcrReturnCode.SUCCESS;
|
|
309
363
|
} catch (error) {
|
|
310
|
-
this.logger.error(
|
|
364
|
+
this.logger.error("[FcrStreamControl][stop-render-remote-video-stream] stop render failed, streamId: ".concat(streamId, ", error: ").concat(error, ", parameters: ").concat(parameters, ", duration: ").concat(Date.now() - startTime, "ms"));
|
|
311
365
|
throw error;
|
|
312
366
|
}
|
|
313
367
|
}
|
|
@@ -324,14 +378,14 @@ export class FcrStreamControlImpl {
|
|
|
324
378
|
const res = await handleRequestError(() => this._api.startShareScreen({
|
|
325
379
|
roomId: this._scene.sceneId,
|
|
326
380
|
userId: this._scene.getLocalUser().getLocalUserId(),
|
|
327
|
-
config: {
|
|
381
|
+
config: _objectSpread(_objectSpread({
|
|
328
382
|
videoSourceType: FcrVideoSourceType.SCREEN,
|
|
329
383
|
audioSourceType: FcrAudioSourceType.LOOPBACK,
|
|
330
384
|
videoSourceState: FcrMediaSourceState.CLOSE,
|
|
331
385
|
audioSourceState: FcrMediaSourceState.CLOSE,
|
|
332
386
|
videoSourceUuid: config.videoSourceId,
|
|
333
|
-
audioSourceUuid: config.audioSourceId
|
|
334
|
-
|
|
387
|
+
audioSourceUuid: config.audioSourceId
|
|
388
|
+
}, convertStreamTypeToPublishState(config.streamType)), {}, {
|
|
335
389
|
annotation: size ? {
|
|
336
390
|
size: {
|
|
337
391
|
width: size.width,
|
|
@@ -343,14 +397,11 @@ export class FcrStreamControlImpl {
|
|
|
343
397
|
height: 0
|
|
344
398
|
}
|
|
345
399
|
}
|
|
346
|
-
}
|
|
400
|
+
})
|
|
347
401
|
}), ErrorModuleCode.FCR_ROOM_STREAM, 'add local screen stream failed');
|
|
348
|
-
const
|
|
349
|
-
data
|
|
350
|
-
|
|
351
|
-
streamUuid: streamId
|
|
352
|
-
}
|
|
353
|
-
} = res;
|
|
402
|
+
const _res$data = res.data,
|
|
403
|
+
token = _res$data.rtcToken,
|
|
404
|
+
streamId = _res$data.streamUuid;
|
|
354
405
|
this._screenStreamId = streamId;
|
|
355
406
|
this._scene.localUser.prepareToPublishStream(streamId, token);
|
|
356
407
|
if (labels) {
|
|
@@ -364,7 +415,7 @@ export class FcrStreamControlImpl {
|
|
|
364
415
|
let localUserId;
|
|
365
416
|
try {
|
|
366
417
|
localUserId = this._scene.localUser.getLocalUserId();
|
|
367
|
-
} catch {
|
|
418
|
+
} catch (_unused) {
|
|
368
419
|
// localUser 已被清除(房间已结束),无需调用 API
|
|
369
420
|
this.logger.warn('removeScreenStream: localUser not exist, skip API call');
|
|
370
421
|
if (this._screenStreamId) {
|
|
@@ -383,7 +434,7 @@ export class FcrStreamControlImpl {
|
|
|
383
434
|
try {
|
|
384
435
|
this._scene.localUser.removePreparePublishStream(this._screenStreamId);
|
|
385
436
|
} catch (e) {
|
|
386
|
-
this.logger.warn(
|
|
437
|
+
this.logger.warn("removeScreenStream: localUser not exist ".concat(JSON.stringify(e), " "));
|
|
387
438
|
}
|
|
388
439
|
}
|
|
389
440
|
return res;
|
|
@@ -424,39 +475,14 @@ export class FcrStreamControlImpl {
|
|
|
424
475
|
this._observable.removeAllObservers();
|
|
425
476
|
}
|
|
426
477
|
async findSelectionByParamId(paramSourceId) {
|
|
427
|
-
|
|
428
|
-
const
|
|
478
|
+
var _this$_mediaControl, _this$_mediaControl2;
|
|
479
|
+
const wins = (await ((_this$_mediaControl = this._mediaControl) === null || _this$_mediaControl === void 0 ? void 0 : _this$_mediaControl.getWindowList())) || [];
|
|
480
|
+
const displays = (await ((_this$_mediaControl2 = this._mediaControl) === null || _this$_mediaControl2 === void 0 ? void 0 : _this$_mediaControl2.getDisplayList())) || [];
|
|
429
481
|
const findInList = list => list.find(item => item.id === paramSourceId);
|
|
430
482
|
const winMatch = findInList(wins);
|
|
431
483
|
const displayMatch = findInList(displays);
|
|
432
484
|
return winMatch || displayMatch || null;
|
|
433
485
|
}
|
|
434
|
-
_convertStreamInfo = info => {
|
|
435
|
-
return {
|
|
436
|
-
streamId: info.streamId,
|
|
437
|
-
streamName: info.streamName,
|
|
438
|
-
owner: convertRteUserToFcrUser(info.owner, this._roomCache),
|
|
439
|
-
streamType: info.streamType,
|
|
440
|
-
videoSourceType: info.videoSourceType,
|
|
441
|
-
audioSourceType: info.audioSourceType,
|
|
442
|
-
videoSourceState: info.videoSourceState,
|
|
443
|
-
audioSourceState: info.audioSourceState,
|
|
444
|
-
videoSourceId: info.videoSourceId,
|
|
445
|
-
audioSourceId: info.audioSourceId,
|
|
446
|
-
connectorType: info.connectorType
|
|
447
|
-
};
|
|
448
|
-
};
|
|
449
|
-
_getPublishStateByPrivilege = privilege => {
|
|
450
|
-
return privilege === AgoraRteStreamPrivilegeOperation.HAS_PRIVILEGE ? 1 : privilege === AgoraRteStreamPrivilegeOperation.NOPRIVILEGE ? 0 : undefined;
|
|
451
|
-
};
|
|
452
|
-
_convertStreamEvent = event => {
|
|
453
|
-
return {
|
|
454
|
-
modifiedStream: this._convertStreamInfo(event.modifiedStream),
|
|
455
|
-
operatorUser: event.operatorUser ? convertRteUserToFcrUser(event.operatorUser, this._roomCache) : undefined,
|
|
456
|
-
cause: event.cause
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
|
|
460
486
|
/**
|
|
461
487
|
* 将 FcrVideoStreamType 转换为 AgoraRteStreamLayer
|
|
462
488
|
* @param streamType - FcrVideoStreamType (HIGH_STREAM=0, LOW_STREAM=1)
|
|
@@ -466,33 +492,6 @@ export class FcrStreamControlImpl {
|
|
|
466
492
|
_convertToStreamLayer(streamType) {
|
|
467
493
|
return streamType === FcrVideoStreamType.HIGH_STREAM ? AgoraRteStreamLayer.HIGH : AgoraRteStreamLayer.LOW;
|
|
468
494
|
}
|
|
469
|
-
_putUserStream = (userId, stream) => {
|
|
470
|
-
if (!this._streamMapByUserId[userId]) {
|
|
471
|
-
this._streamMapByUserId[userId] = [];
|
|
472
|
-
}
|
|
473
|
-
this._streamMapByUserId[userId].push(stream);
|
|
474
|
-
};
|
|
475
|
-
_setUserStream = (userId, stream) => {
|
|
476
|
-
const streams = this._streamMapByUserId[userId];
|
|
477
|
-
if (streams) {
|
|
478
|
-
const index = streams.findIndex(s => s.streamId === stream.streamId);
|
|
479
|
-
if (index !== -1) {
|
|
480
|
-
streams.splice(index, 1, stream);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
_deleteUserStream = (userId, stream) => {
|
|
485
|
-
const userStreams = this._streamMapByUserId[userId];
|
|
486
|
-
if (userStreams) {
|
|
487
|
-
const index = userStreams.findIndex(s => s.streamId === stream.streamId);
|
|
488
|
-
if (index !== -1) {
|
|
489
|
-
userStreams.splice(index, 1);
|
|
490
|
-
}
|
|
491
|
-
if (userStreams.length === 0) {
|
|
492
|
-
delete this._streamMapByUserId[userId];
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
495
|
_addLogObserver() {
|
|
497
496
|
this.addObserver(generateLogObserver(this.logger, [
|
|
498
497
|
// 'onLocalVideoStatsUpdated',
|
|
@@ -504,17 +503,22 @@ export class FcrStreamControlImpl {
|
|
|
504
503
|
['onStreamsAdded', ['roomId', 'events']], ['onStreamsRemoved', ['roomId', 'events']], ['onStreamsUpdated', ['roomId', 'events']]]));
|
|
505
504
|
}
|
|
506
505
|
}
|
|
506
|
+
_FcrStreamControlImpl = FcrStreamControlImpl;
|
|
507
|
+
var _applyDecs$e = _slicedToArray(_applyDecs(_FcrStreamControlImpl, [[bound, 2, "getStreams"], [bound, 2, "getStreamList"], [bound, 2, "getStreamsByUserId"], [bound, 2, "getStreamByStreamId"], [_addLocalStreamsDecs, 2, "addLocalStreams"], [_bindLocalStreamsDecs, 2, "bindLocalStreams"], [_updatePublishPrivilegeOfStreamsDecs, 2, "updatePublishPrivilegeOfStreams"], [_updatePublishPrivilegeOfStreamsByScopeDecs, 2, "updatePublishPrivilegeOfStreamsByScope"], [_removeStreamsDecs, 2, "removeStreams"], [_setVideoEncoderConfigDecs, 2, "setVideoEncoderConfig"], [_setDualStreamModeDecs, 2, "setDualStreamMode"], [_setScreenScenarioDecs, 2, "setScreenScenario"], [_startRenderRemoteVideoStreamDecs, 2, "startRenderRemoteVideoStream"], [_stopRenderRemoteVideoStreamDecs, 2, "stopRenderRemoteVideoStream"], [_startPlayRemoteAudioStreamDecs, 2, "startPlayRemoteAudioStream"], [_stopPlayRemoteAudioStreamDecs, 2, "stopPlayRemoteAudioStream"], [_takeSnapshotDecs, 2, "takeSnapshot"], [_addLocalScreenStreamDecs, 2, "addLocalScreenStream"], [[bound, trace], 2, "removeScreenStream"], [_adjustRemoteAudioStreamVolumeDecs, 2, "adjustRemoteAudioStreamVolume"], [_mergeAudioStreamDecs, 2, "mergeAudioStream"], [_splitAudioStreamDecs, 2, "splitAudioStream"], [trace, 2, "release"]], []).e, 1);
|
|
508
|
+
_initProto = _applyDecs$e[0];
|
|
507
509
|
export class FcrSubscribedStreamsControl {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
510
|
+
constructor() {
|
|
511
|
+
_defineProperty(this, "logger", createLogger({
|
|
512
|
+
prefix: 'StreamSubscriptionManager'
|
|
513
|
+
}));
|
|
514
|
+
//@internal
|
|
515
|
+
/**
|
|
516
|
+
* Map of remote subscribed streams to their bound view IDs
|
|
517
|
+
* key: streamId - The ID of the remote video stream
|
|
518
|
+
* value: string[] - Array of viewIds bound to this stream
|
|
519
|
+
*/
|
|
520
|
+
_defineProperty(this, "_remoteSubscribedStreamRenderMap", new Map());
|
|
521
|
+
}
|
|
518
522
|
getViewId(element) {
|
|
519
523
|
// Adapt for harmony: AgoraRteRenderView is string in harmony, HTMLElement in web
|
|
520
524
|
if (typeof element === 'string') {
|
|
@@ -537,7 +541,7 @@ export class FcrSubscribedStreamsControl {
|
|
|
537
541
|
}
|
|
538
542
|
bind(viewId, streamId) {
|
|
539
543
|
if (!streamId || !viewId) {
|
|
540
|
-
this.logger.warn(
|
|
544
|
+
this.logger.warn("[FcrStreamControl][bind-view-to-stream] invalid parameters, streamId: ".concat(streamId, ", viewId: ").concat(viewId));
|
|
541
545
|
return;
|
|
542
546
|
}
|
|
543
547
|
const viewIds = this._remoteSubscribedStreamRenderMap.get(streamId) || [];
|
|
@@ -546,17 +550,17 @@ export class FcrSubscribedStreamsControl {
|
|
|
546
550
|
viewIds.push(viewId);
|
|
547
551
|
this._remoteSubscribedStreamRenderMap.set(streamId, viewIds);
|
|
548
552
|
} else {
|
|
549
|
-
this.logger.warn(
|
|
553
|
+
this.logger.warn("[FcrStreamControl][bind-view-to-stream] viewId already bound, streamId: ".concat(streamId, ", viewId: ").concat(viewId));
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
556
|
unbind(viewId, streamId) {
|
|
553
557
|
if (!streamId || !viewId) {
|
|
554
|
-
this.logger.warn(
|
|
558
|
+
this.logger.warn("[FcrStreamControl][unbind-view-from-stream] invalid parameters, streamId: ".concat(streamId, ", viewId: ").concat(viewId));
|
|
555
559
|
return;
|
|
556
560
|
}
|
|
557
561
|
const viewIds = this._remoteSubscribedStreamRenderMap.get(streamId);
|
|
558
562
|
if (!viewIds || !viewIds.includes(viewId)) {
|
|
559
|
-
this.logger.warn(
|
|
563
|
+
this.logger.warn("[FcrStreamControl][unbind-view-from-stream] viewId not found, streamId: ".concat(streamId, ", viewId: ").concat(viewId));
|
|
560
564
|
return;
|
|
561
565
|
}
|
|
562
566
|
const rest = viewIds.filter(id => id !== viewId);
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
|
2
|
+
import "core-js/modules/es.array-buffer.constructor.js";
|
|
3
|
+
import "core-js/modules/es.array-buffer.slice.js";
|
|
4
|
+
import "core-js/modules/es.typed-array.uint8-array.js";
|
|
5
|
+
import "core-js/modules/es.typed-array.at.js";
|
|
6
|
+
import "core-js/modules/es.typed-array.fill.js";
|
|
7
|
+
import "core-js/modules/es.typed-array.find-last.js";
|
|
8
|
+
import "core-js/modules/es.typed-array.find-last-index.js";
|
|
9
|
+
import "core-js/modules/es.typed-array.set.js";
|
|
10
|
+
import "core-js/modules/es.typed-array.sort.js";
|
|
1
11
|
import "core-js/modules/es.typed-array.to-reversed.js";
|
|
2
12
|
import "core-js/modules/es.typed-array.to-sorted.js";
|
|
3
13
|
import "core-js/modules/es.typed-array.with.js";
|