fcr-core 3.7.2 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chat-connection/index.js +4 -2
- package/lib/engine/index.d.ts +1 -1
- package/lib/engine/index.js +18 -15
- package/lib/imports.d.ts +8 -6
- package/lib/imports.js +38 -18
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -0
- package/lib/media-control/desktop.js +10 -8
- package/lib/media-control/mobile.js +6 -4
- package/lib/media-control/type.d.ts +10 -14
- package/lib/monitor-control/index.js +4 -2
- package/lib/peer-session/index.js +4 -2
- package/lib/plugins/chatroom.js +4 -2
- package/lib/room-control/ability-control/index.js +4 -2
- package/lib/room-control/group-control/index.js +4 -2
- package/lib/room-control/index.js +14 -7
- package/lib/room-control/interpreter-control/index.js +4 -2
- package/lib/room-control/interpreter-control/room.js +2 -3
- package/lib/room-control/join-before-host-waitingroom-control/index.js +2 -2
- package/lib/room-control/mainroom-control/index.js +52 -13
- package/lib/room-control/privilege-control/index.js +4 -2
- package/lib/room-control/room-connector-control/index.js +4 -2
- package/lib/room-control/room-session/index.js +4 -2
- package/lib/room-control/sharing-control/index.d.ts +8 -7
- package/lib/room-control/sharing-control/index.js +33 -34
- package/lib/room-control/sharing-control/type.d.ts +4 -4
- package/lib/room-control/stream-control/index.js +5 -7
- package/lib/room-control/user-control/index.js +4 -2
- package/lib/room-control/waitingroom-control/index.js +6 -4
- package/lib/room-control/whiteboard-control/types.d.ts +16 -13
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +32 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +239 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.d.ts +15 -35
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.js +32 -217
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.d.ts +36 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.js +252 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +15 -3
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.js +3 -1
- package/lib/room-control/whiteboard-control-v2/index.d.ts +3 -3
- package/lib/room-control/whiteboard-control-v2/index.js +7 -4
- package/lib/room-control/whiteboard-control-v2/main-window.d.ts +7 -11
- package/lib/room-control/whiteboard-control-v2/main-window.js +42 -48
- package/lib/room-control/whiteboard-control-v2/utils.d.ts +17 -0
- package/lib/room-control/whiteboard-control-v2/utils.js +64 -1
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +34 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +234 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.d.ts +17 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.js +30 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.d.ts +36 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.js +240 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +20 -4
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.js +9 -1
- package/lib/room-router/index.js +10 -7
- package/lib/schema.d.ts +24 -2
- package/lib/schema.js +2 -1
- package/lib/service/api.d.ts +7 -2
- package/lib/service/api.js +8 -7
- package/lib/type.d.ts +3 -3
- package/lib/type.js +19 -0
- package/lib/utilities/constant.d.ts +1 -0
- package/lib/utilities/constant.js +7 -0
- package/lib/utilities/error.d.ts +7 -12
- package/lib/utilities/error.js +51 -23
- package/lib/utilities/logger.d.ts +0 -1
- package/lib/utilities/logger.js +2 -3
- package/lib/utilities/parameters.d.ts +1 -0
- package/lib/utilities/parameters.js +21 -2
- package/lib/utilities/shared-storage.d.ts +5 -0
- package/lib/utilities/shared-storage.js +34 -0
- package/lib/utilities/storage.d.ts +8 -0
- package/lib/utilities/storage.js +32 -0
- package/package.json +7 -13
- package/lib/room-control/whiteboard-control/board-window.d.ts +0 -52
- package/lib/room-control/whiteboard-control/board-window.js +0 -405
- package/lib/room-control/whiteboard-control/index.d.ts +0 -1
- package/lib/room-control/whiteboard-control/index.js +0 -343
- package/lib/room-control/whiteboard-control/mount-manager.d.ts +0 -4
- package/lib/room-control/whiteboard-control/mount-manager.js +0 -13
- package/lib/room-control/whiteboard-control/utils.d.ts +0 -51
- package/lib/room-control/whiteboard-control/utils.js +0 -270
|
@@ -26,6 +26,7 @@ var _type = require("./type");
|
|
|
26
26
|
var _config = require("./config");
|
|
27
27
|
var _logger = require("../utilities/logger");
|
|
28
28
|
var _packageInfo = require("../utilities/package-info");
|
|
29
|
+
var _staticBlock;
|
|
29
30
|
let _initProto;
|
|
30
31
|
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)]; } }; }
|
|
31
32
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -33,7 +34,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
33
34
|
function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
34
35
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
|
|
35
36
|
class FcrChatConnectionImpl {
|
|
36
|
-
static #_ = (() => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "login"], [_imports.trace, 2, "logout"]], []).e)();
|
|
37
37
|
logger = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
38
38
|
prefix: 'FcrChatConnectionImpl'
|
|
39
39
|
})))();
|
|
@@ -150,5 +150,7 @@ class FcrChatConnectionImpl {
|
|
|
150
150
|
return privateConfig;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "login"], [_imports.trace, 2, "logout"]], []).e)();
|
|
153
154
|
}
|
|
154
|
-
exports.FcrChatConnectionImpl = FcrChatConnectionImpl;
|
|
155
|
+
exports.FcrChatConnectionImpl = FcrChatConnectionImpl;
|
|
156
|
+
_staticBlock();
|
package/lib/engine/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class FcrCoreEngine {
|
|
|
28
28
|
* @returns The version of the SDK.
|
|
29
29
|
*/
|
|
30
30
|
getVersion(): string;
|
|
31
|
+
getDependencyVersions(): Record<string, string>;
|
|
31
32
|
/**
|
|
32
33
|
* Creates a room control.
|
|
33
34
|
* @param roomId
|
|
@@ -101,5 +102,4 @@ export declare class FcrCoreEngine {
|
|
|
101
102
|
private _createChatConnection;
|
|
102
103
|
private _presetParameters;
|
|
103
104
|
private _mergeRtcPresetParameters;
|
|
104
|
-
private _getRtcPresetParameters;
|
|
105
105
|
}
|
package/lib/engine/index.js
CHANGED
|
@@ -43,13 +43,14 @@ var _agoraRteSdk = require("agora-rte-sdk");
|
|
|
43
43
|
var _helper = require("agora-rte-sdk/lib/core/scene/helper");
|
|
44
44
|
var _mobile = require("../media-control/mobile");
|
|
45
45
|
var _chatroom = require("../plugins/chatroom");
|
|
46
|
-
var _whiteboardControlV = require("../room-control/whiteboard-control-v2");
|
|
47
46
|
var _logger = require("../utilities/logger");
|
|
48
47
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
49
48
|
var _schema = require("../schema");
|
|
50
49
|
var _error2 = require("agora-rte-sdk/lib/core/utilities/error");
|
|
51
50
|
var _roomRouter = require("../room-router");
|
|
52
51
|
var _sharedCache = require("../room-control/shared-cache");
|
|
52
|
+
var _packageInfo = require("../utilities/package-info");
|
|
53
|
+
var _staticBlock;
|
|
53
54
|
let _initProto, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
|
|
54
55
|
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)]; } }; }
|
|
55
56
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -57,7 +58,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
57
58
|
function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
58
59
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
|
|
59
60
|
class FcrCoreEngine {
|
|
60
|
-
static #_ = (() => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "release"], [_imports.trace, 2, "login"], [_imports.trace, 2, "logout"], [_imports.trace, 2, "renewUserToken"], [_imports.trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [_imports.trace, 2, "getDesktopMediaControl"], [_imports.trace, 2, "getMobileMediaControl"], [_imports.trace, 2, "getMonitorControl"], [_imports.trace, 2, "getPeerSessionControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e)();
|
|
61
61
|
// @internal
|
|
62
62
|
[(_createMainRoomControlDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _createWaitingRoomControlDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _createRoomRouterDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _createRoomControlAndJoinDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.fcrRoomJoinOptionsSchema)], _sendPeerMessageDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema, _schema.booleanSchema, _schema.stringSchema)], _setParametersDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema)], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
63
63
|
prefix: 'FcrCoreEngine'
|
|
@@ -176,6 +176,14 @@ class FcrCoreEngine {
|
|
|
176
176
|
getVersion() {
|
|
177
177
|
return (0, _imports.getVersion)();
|
|
178
178
|
}
|
|
179
|
+
getDependencyVersions() {
|
|
180
|
+
return {
|
|
181
|
+
...this._rteEngine.getDependencyVersions(),
|
|
182
|
+
rte: this._rteEngine.getVersion(),
|
|
183
|
+
whiteboard: (0, _packageInfo.getDependenciesInfo)('@netless/forge-whiteboard'),
|
|
184
|
+
easemob: (0, _packageInfo.getDependenciesInfo)('easemob-websdk')
|
|
185
|
+
};
|
|
186
|
+
}
|
|
179
187
|
|
|
180
188
|
/**
|
|
181
189
|
* Creates a room control.
|
|
@@ -186,7 +194,7 @@ class FcrCoreEngine {
|
|
|
186
194
|
const scene = this._rteEngine.createScene({
|
|
187
195
|
sceneId: roomId
|
|
188
196
|
});
|
|
189
|
-
return new _mainroomControl.FcrMainRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new _chatroom.FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache)
|
|
197
|
+
return new _mainroomControl.FcrMainRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new _chatroom.FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache));
|
|
190
198
|
}
|
|
191
199
|
|
|
192
200
|
/**
|
|
@@ -266,7 +274,7 @@ class FcrCoreEngine {
|
|
|
266
274
|
timeFn,
|
|
267
275
|
currentRetry
|
|
268
276
|
} = _ref;
|
|
269
|
-
if ((error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) && _error.
|
|
277
|
+
if ((error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) && _error.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
270
278
|
throw error;
|
|
271
279
|
}
|
|
272
280
|
this.logger.error(`retry to join room, ${error.message}, retry ${currentRetry} times`);
|
|
@@ -401,26 +409,21 @@ class FcrCoreEngine {
|
|
|
401
409
|
_presetParameters(parameters) {
|
|
402
410
|
if (!parameters) {
|
|
403
411
|
parameters = {
|
|
404
|
-
rtc:
|
|
412
|
+
rtc: (0, _parameters.getRtcPresetParameters)()
|
|
405
413
|
};
|
|
406
414
|
} else if (!parameters.rtc) {
|
|
407
|
-
parameters.rtc =
|
|
415
|
+
parameters.rtc = (0, _parameters.getRtcPresetParameters)();
|
|
408
416
|
} else {
|
|
409
417
|
parameters.rtc = this._mergeRtcPresetParameters(parameters.rtc);
|
|
410
418
|
}
|
|
411
419
|
return parameters;
|
|
412
420
|
}
|
|
413
421
|
_mergeRtcPresetParameters(parametersList) {
|
|
414
|
-
const rtcPresetParameters =
|
|
422
|
+
const rtcPresetParameters = (0, _parameters.getRtcPresetParameters)();
|
|
415
423
|
parametersList.push(...rtcPresetParameters);
|
|
416
424
|
return parametersList;
|
|
417
425
|
}
|
|
418
|
-
|
|
419
|
-
let rtcPresetParameters = ['{\"che.video.videoCodecIndex\": 1}', '{\"rtc.video.new_complexity\": true}', '{\"rtc.video.default_complexity\": 1027}', '{\"rtc.video.enable_doc_screen_share_sr\":true}', '{\"rtc.video.enable_pvc\":false}', '{\"che.video.brightness_detection_enable\":false} ', '{\"che.audio.bitrate_level\":1}', '{\"rtc.video.downMaxRetryTimes\":5}', '{\"che.video.vqc_min_width\": 1280}', '{\"che.video.vqc_min_height\": 720}', '{\"che.video.lowest_dev_score_4_seg\":0}'];
|
|
420
|
-
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.WINDOWS) {
|
|
421
|
-
rtcPresetParameters.push('{\"engine.video.hw_decoder_provider\":\"qsv\"}', '{\"rtc.video.default_hw_decoder_thres\":921600}');
|
|
422
|
-
}
|
|
423
|
-
return rtcPresetParameters;
|
|
424
|
-
}
|
|
426
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "release"], [_imports.trace, 2, "login"], [_imports.trace, 2, "logout"], [_imports.trace, 2, "renewUserToken"], [_imports.trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [_imports.trace, 2, "getDesktopMediaControl"], [_imports.trace, 2, "getMobileMediaControl"], [_imports.trace, 2, "getMonitorControl"], [_imports.trace, 2, "getPeerSessionControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e)();
|
|
425
427
|
}
|
|
426
|
-
exports.FcrCoreEngine = FcrCoreEngine;
|
|
428
|
+
exports.FcrCoreEngine = FcrCoreEngine;
|
|
429
|
+
_staticBlock();
|
package/lib/imports.d.ts
CHANGED
|
@@ -8,14 +8,13 @@ import { default as EasemobChatSDK } from 'easemob-websdk';
|
|
|
8
8
|
import { FcrVideoEncoderConfigurationSchema, FcrMediaStreamCreateConfigSchema, FcrStreamBindConfigSchema } from './schema';
|
|
9
9
|
export { to, get, padStart, padEnd, toLower, EasemobChatSDK };
|
|
10
10
|
export { EasemobChat } from 'easemob-websdk';
|
|
11
|
-
export { WhiteWebSdk, createPlugins } from 'white-web-sdk';
|
|
12
|
-
export * as netlessVideoPlugin from '@netless/video-js-plugin';
|
|
13
|
-
export { WindowManager } from '@netless/window-manager';
|
|
14
11
|
export { RTMProvider_2_2 as FcrRTMProvider_2_2 } from '@netless/forge-rtm';
|
|
15
12
|
export { Room as FcrRoom } from '@netless/forge-room';
|
|
16
13
|
export { WhiteboardApplication as FcrWhiteboardApplication } from '@netless/forge-whiteboard';
|
|
17
14
|
export type { ApplicationInstanceType as FcrApplicationInstanceType } from '@netless/forge-room';
|
|
18
15
|
export type { Whiteboard as FcrWhiteboard, WhiteboardToolType as FcrWhiteboardToolType, } from '@netless/forge-whiteboard';
|
|
16
|
+
export { WhiteboardPermissionFlag as FcrWhiteboardPermissionFlag } from '@netless/forge-whiteboard';
|
|
17
|
+
export type { JoinRoomOptions as FcrJoinRoomOptions } from '@netless/forge-room';
|
|
19
18
|
export { getLogger, createLogger } from 'agora-foundation/lib/logger';
|
|
20
19
|
export { serializeArgs } from 'agora-foundation/lib/decorator/log/log-serializer';
|
|
21
20
|
export { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
|
|
@@ -34,21 +33,21 @@ export type { AgoraRteNetworkQualityEvent } from 'agora-rte-sdk/lib/core/scene/t
|
|
|
34
33
|
export type { AgoraRteOperatCause } from 'agora-rte-sdk/lib/core/processor/type';
|
|
35
34
|
export type { AgoraRestfulClient } from 'agora-rte-sdk/lib/core/services/client';
|
|
36
35
|
export { AgoraRteError } from 'agora-rte-sdk/lib/core/utilities/error';
|
|
36
|
+
export { AgoraError as FcrError } from 'agora-foundation/lib/utilities/agora-error';
|
|
37
37
|
export type { AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteUserPageParams, AgoraRteUserPageResponse, AgoraRteUserPropertiesDeletedEvent, AgoraRteUserPropertiesUpdatedEvent, AgoraRteUserInfo, AgoraRteSceneObserver, AgoraRteSnapshotInfo, AgoraRteEntryRoomResponse, AgoraRteMediaStreamEvent, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
38
38
|
export type AgoraRteMediaStreamCreateConfig = FcrMediaStreamCreateConfigSchema;
|
|
39
39
|
export type AgoraRteStreamBindConfig = FcrStreamBindConfigSchema;
|
|
40
40
|
export type AgoraRteVideoEncoderConfig = FcrVideoEncoderConfigurationSchema;
|
|
41
41
|
export type { AgoraRtcLocalVideoStats, AgoraRtcLocalAudioStats, AgoraRtcRemoteVideoStats, AgoraRtcRemoteAudioStats, AgoraRtcDimensions, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
42
42
|
export type { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams, AgoraRteVirtualBackgroundOptions, AgoraRteCameraCaptureParams, } from 'agora-rte-sdk/lib/core/media/type';
|
|
43
|
-
export type { AgoraRteMediaStreamInfo } from 'agora-rte-sdk/lib/core/processor/struct';
|
|
44
43
|
export type { AgoraRteMonitor } from 'agora-rte-sdk/lib/core/monitor';
|
|
45
44
|
export type { AgoraRteMediaControl } from 'agora-rte-sdk/lib/core/media';
|
|
46
|
-
export type { AgoraRteUpdateStreamPrivilege } from 'agora-rte-sdk/lib/core/scene/type';
|
|
45
|
+
export type { AgoraRteUpdateStreamPrivilege, AgoraRteMediaStreamInfo, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
47
46
|
export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishState, AgoraRteLatencyLevel, } from 'agora-rte-sdk';
|
|
48
47
|
export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
49
48
|
export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
50
49
|
export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
|
|
51
|
-
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, } from 'agora-rte-sdk/lib/type';
|
|
50
|
+
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState, } from 'agora-rte-sdk/lib/type';
|
|
52
51
|
export { AgoraRestfulClientError } from 'agora-rte-sdk/lib/core/services/client';
|
|
53
52
|
export { getSharedDomainHolder } from 'agora-rte-sdk/lib/core/services/domain-holder';
|
|
54
53
|
export { AgoraRteScreenCaptureType, AgoraRteVideoOrientation, } from 'agora-rte-sdk/lib/core/media/type';
|
|
@@ -56,6 +55,9 @@ export { registerPlugin } from 'agora-rte-sdk/lib/core/engine/plugin';
|
|
|
56
55
|
export { AgoraRteUserUpdatedReason } from 'agora-rte-sdk/lib/core/scene/type';
|
|
57
56
|
export type { AgoraRteUploadEvent } from 'agora-rte-sdk/lib/core/monitor/type';
|
|
58
57
|
export { FcrCoreEngine } from './engine';
|
|
58
|
+
export { FcrWhiteboardControlFactoryImpl } from './room-control/whiteboard-control-v2/whiteboard-control';
|
|
59
|
+
export { FcrAnnotationControlFactoryImpl } from './room-control/whiteboard-control-v2/annotation-control';
|
|
59
60
|
export type FcrImageData = ImageData;
|
|
60
61
|
export type FcrWhiteboardView = HTMLElement;
|
|
61
62
|
export { getVersion } from './utilities/package-info';
|
|
63
|
+
export declare const localStorage: Storage;
|
package/lib/imports.js
CHANGED
|
@@ -126,6 +126,12 @@ Object.defineProperty(exports, "AgoraRteMediaPublishState", {
|
|
|
126
126
|
return _type4.AgoraRteMediaPublishState;
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
+
Object.defineProperty(exports, "AgoraRteMediaSourceState", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return _type4.AgoraRteMediaSourceState;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
129
135
|
Object.defineProperty(exports, "AgoraRteMediaStreamType", {
|
|
130
136
|
enumerable: true,
|
|
131
137
|
get: function () {
|
|
@@ -216,6 +222,12 @@ Object.defineProperty(exports, "EasemobChatSDK", {
|
|
|
216
222
|
return _easemobWebsdk.default;
|
|
217
223
|
}
|
|
218
224
|
});
|
|
225
|
+
Object.defineProperty(exports, "FcrAnnotationControlFactoryImpl", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function () {
|
|
228
|
+
return _annotationControl.FcrAnnotationControlFactoryImpl;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
219
231
|
Object.defineProperty(exports, "FcrApplicationPlatform", {
|
|
220
232
|
enumerable: true,
|
|
221
233
|
get: function () {
|
|
@@ -228,6 +240,12 @@ Object.defineProperty(exports, "FcrCoreEngine", {
|
|
|
228
240
|
return _engine.FcrCoreEngine;
|
|
229
241
|
}
|
|
230
242
|
});
|
|
243
|
+
Object.defineProperty(exports, "FcrError", {
|
|
244
|
+
enumerable: true,
|
|
245
|
+
get: function () {
|
|
246
|
+
return _agoraError.AgoraError;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
231
249
|
Object.defineProperty(exports, "FcrRTMProvider_2_2", {
|
|
232
250
|
enumerable: true,
|
|
233
251
|
get: function () {
|
|
@@ -252,22 +270,22 @@ Object.defineProperty(exports, "FcrWhiteboardApplication", {
|
|
|
252
270
|
return _forgeWhiteboard.WhiteboardApplication;
|
|
253
271
|
}
|
|
254
272
|
});
|
|
255
|
-
Object.defineProperty(exports, "
|
|
273
|
+
Object.defineProperty(exports, "FcrWhiteboardControlFactoryImpl", {
|
|
256
274
|
enumerable: true,
|
|
257
275
|
get: function () {
|
|
258
|
-
return
|
|
276
|
+
return _whiteboardControl.FcrWhiteboardControlFactoryImpl;
|
|
259
277
|
}
|
|
260
278
|
});
|
|
261
|
-
Object.defineProperty(exports, "
|
|
279
|
+
Object.defineProperty(exports, "FcrWhiteboardPermissionFlag", {
|
|
262
280
|
enumerable: true,
|
|
263
281
|
get: function () {
|
|
264
|
-
return
|
|
282
|
+
return _forgeWhiteboard.WhiteboardPermissionFlag;
|
|
265
283
|
}
|
|
266
284
|
});
|
|
267
|
-
Object.defineProperty(exports, "
|
|
285
|
+
Object.defineProperty(exports, "Mutex", {
|
|
268
286
|
enumerable: true,
|
|
269
287
|
get: function () {
|
|
270
|
-
return
|
|
288
|
+
return _mutex.Mutex;
|
|
271
289
|
}
|
|
272
290
|
});
|
|
273
291
|
Object.defineProperty(exports, "ZodError", {
|
|
@@ -312,12 +330,6 @@ Object.defineProperty(exports, "createLogger", {
|
|
|
312
330
|
return _logger.createLogger;
|
|
313
331
|
}
|
|
314
332
|
});
|
|
315
|
-
Object.defineProperty(exports, "createPlugins", {
|
|
316
|
-
enumerable: true,
|
|
317
|
-
get: function () {
|
|
318
|
-
return _whiteWebSdk.createPlugins;
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
333
|
Object.defineProperty(exports, "createRecordSchemaWithKey", {
|
|
322
334
|
enumerable: true,
|
|
323
335
|
get: function () {
|
|
@@ -372,13 +384,13 @@ Object.defineProperty(exports, "jsonstring", {
|
|
|
372
384
|
return _misc.jsonstring;
|
|
373
385
|
}
|
|
374
386
|
});
|
|
387
|
+
exports.localStorage = void 0;
|
|
375
388
|
Object.defineProperty(exports, "md5", {
|
|
376
389
|
enumerable: true,
|
|
377
390
|
get: function () {
|
|
378
391
|
return _jsMd.md5;
|
|
379
392
|
}
|
|
380
393
|
});
|
|
381
|
-
exports.netlessVideoPlugin = void 0;
|
|
382
394
|
Object.defineProperty(exports, "numberSchema", {
|
|
383
395
|
enumerable: true,
|
|
384
396
|
get: function () {
|
|
@@ -482,10 +494,6 @@ var _padStart = _interopRequireDefault(require("lodash/padStart"));
|
|
|
482
494
|
var _padEnd = _interopRequireDefault(require("lodash/padEnd"));
|
|
483
495
|
var _toLower = _interopRequireDefault(require("lodash/toLower"));
|
|
484
496
|
var _easemobWebsdk = _interopRequireWildcard(require("easemob-websdk"));
|
|
485
|
-
var _whiteWebSdk = require("white-web-sdk");
|
|
486
|
-
var _netlessVideoPlugin = _interopRequireWildcard(require("@netless/video-js-plugin"));
|
|
487
|
-
exports.netlessVideoPlugin = _netlessVideoPlugin;
|
|
488
|
-
var _windowManager = require("@netless/window-manager");
|
|
489
497
|
var _forgeRtm = require("@netless/forge-rtm");
|
|
490
498
|
var _forgeRoom = require("@netless/forge-room");
|
|
491
499
|
var _forgeWhiteboard = require("@netless/forge-whiteboard");
|
|
@@ -502,6 +510,7 @@ var _schema = require("agora-foundation/lib/utilities/schema");
|
|
|
502
510
|
var _validate = require("agora-foundation/lib/decorator/validate");
|
|
503
511
|
var _mutex = require("agora-foundation/lib/worker/mutex");
|
|
504
512
|
var _error = require("agora-rte-sdk/lib/core/utilities/error");
|
|
513
|
+
var _agoraError = require("agora-foundation/lib/utilities/agora-error");
|
|
505
514
|
var _agoraRteSdk = require("agora-rte-sdk");
|
|
506
515
|
var _type = require("agora-rte-sdk/lib/core/scene/type");
|
|
507
516
|
var _type2 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
@@ -512,5 +521,16 @@ var _domainHolder = require("agora-rte-sdk/lib/core/services/domain-holder");
|
|
|
512
521
|
var _type5 = require("agora-rte-sdk/lib/core/media/type");
|
|
513
522
|
var _plugin = require("agora-rte-sdk/lib/core/engine/plugin");
|
|
514
523
|
var _engine = require("./engine");
|
|
524
|
+
var _whiteboardControl = require("./room-control/whiteboard-control-v2/whiteboard-control");
|
|
525
|
+
var _annotationControl = require("./room-control/whiteboard-control-v2/annotation-control");
|
|
515
526
|
var _packageInfo = require("./utilities/package-info");
|
|
516
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
527
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
528
|
+
// Other utility exports
|
|
529
|
+
|
|
530
|
+
// Third-party exports
|
|
531
|
+
|
|
532
|
+
// Agora Foundation exports
|
|
533
|
+
|
|
534
|
+
// Agora RTE exports
|
|
535
|
+
|
|
536
|
+
const localStorage = exports.localStorage = window.localStorage;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export type { FcrCoreEngineConfig, FcrDualVideoStreamConfig, FcrDesktopMediaControl, FcrDesktopMediaObserver, FcrMobileMediaControl, FcrMobileMediaObserver, FcrMonitorControl, FcrMonitorObserver, FcrBaseRoomControl, FcrRoomObserver, FcrUserControl, FcrUserObserver, FcrStreamControl, FcrStreamObserver, FcrPrivilegeControl, FcrPermission,
|
|
1
|
+
export type { FcrCoreEngineConfig, FcrDualVideoStreamConfig, FcrDesktopMediaControl, FcrDesktopMediaObserver, FcrMobileMediaControl, FcrMobileMediaObserver, FcrMonitorControl, FcrMonitorObserver, FcrBaseRoomControl, FcrRoomObserver, FcrUserControl, FcrUserObserver, FcrStreamControl, FcrStreamObserver, FcrPrivilegeControl, FcrPermission, } from './type';
|
|
2
2
|
export { FcrStreamLatencyLevel, FcrPermissionAction, FcrPrivilegeUserRole, FcrUserRole, FcrStreamState, FcrRegion, FcrStreamType, FcrUserUpdatedReason, FcrRoomConnectorType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState, FcrVideoRenderMode, FcrVideoStreamType, FcrCapability, FcrAiDenoiseLevel, FcrStreamPrivilegeOperation, FcrStreamPrivilegeVideoSourceType, FcrStreamPrivilegeAudioSourceType, FcrConnectionState, FcrCoreEngine, registerPlugin, } from './type';
|
|
3
|
+
export { FcrError } from './type';
|
package/lib/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "FcrCoreEngine", {
|
|
|
33
33
|
return _type.FcrCoreEngine;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "FcrError", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _type.FcrError;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "FcrMediaSourceState", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -28,6 +28,7 @@ var _imports = require("../imports");
|
|
|
28
28
|
var _schema = require("../schema");
|
|
29
29
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
30
30
|
var _logger = require("../utilities/logger");
|
|
31
|
+
var _staticBlock;
|
|
31
32
|
let _initProto, _getCameraTrackDecs, _getMicrophoneTrackDecs, _getScreenTrackDecs, _getLoopbackTrackDecs, _setSelectedSpeakerDecs, _startSelectedSpeakerTestDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs, _setSelectedSpeakerVolumeDecs;
|
|
32
33
|
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)]; } }; }
|
|
33
34
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -38,8 +39,7 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
38
39
|
* @internal
|
|
39
40
|
*/
|
|
40
41
|
class FcrDesktopMediaControlImpl {
|
|
41
|
-
|
|
42
|
-
[(_getCameraTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getMicrophoneTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getScreenTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getLoopbackTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _setSelectedSpeakerDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _startSelectedSpeakerTestDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema, _schema.numberSchema)], _isCapabilitySupportedDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrCapabilitySchema)], _adjustOutputVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], _setSelectedSpeakerVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
42
|
+
[(_getCameraTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getMicrophoneTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getScreenTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getLoopbackTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _setSelectedSpeakerDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _startSelectedSpeakerTestDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _isCapabilitySupportedDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrCapabilitySchema)], _adjustOutputVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], _setSelectedSpeakerVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
43
43
|
prefix: 'FcrDesktopMediaControlImpl'
|
|
44
44
|
})))();
|
|
45
45
|
_observable = (() => new _imports.AgoraObservable())();
|
|
@@ -87,6 +87,9 @@ class FcrDesktopMediaControlImpl {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
+
getLoopbackList() {
|
|
91
|
+
return this._mediaControl.getLoopbackList();
|
|
92
|
+
}
|
|
90
93
|
getCameraList() {
|
|
91
94
|
return this._mediaControl.getCameraList();
|
|
92
95
|
}
|
|
@@ -123,8 +126,8 @@ class FcrDesktopMediaControlImpl {
|
|
|
123
126
|
setSelectedSpeaker(deviceId) {
|
|
124
127
|
this._mediaControl.setSelectedSpeaker(deviceId);
|
|
125
128
|
}
|
|
126
|
-
startSelectedSpeakerTest(url
|
|
127
|
-
this._mediaControl.startSpeakerTest(url
|
|
129
|
+
startSelectedSpeakerTest(url) {
|
|
130
|
+
this._mediaControl.startSpeakerTest(url);
|
|
128
131
|
}
|
|
129
132
|
stopSelectedSpeakerTest() {
|
|
130
133
|
this._mediaControl.stopSpeakerTest();
|
|
@@ -147,9 +150,6 @@ class FcrDesktopMediaControlImpl {
|
|
|
147
150
|
removeObserver(observer) {
|
|
148
151
|
this._observable.removeObserver(observer);
|
|
149
152
|
}
|
|
150
|
-
checkLoopbackDevice() {
|
|
151
|
-
return this._mediaControl.checkLoopbackDevice();
|
|
152
|
-
}
|
|
153
153
|
observeSystemSelectedSpeakerChanged(follow) {
|
|
154
154
|
return this._mediaControl.observeSystemSelectedSpeakerChanged(follow);
|
|
155
155
|
}
|
|
@@ -162,5 +162,7 @@ class FcrDesktopMediaControlImpl {
|
|
|
162
162
|
enableAGC() {
|
|
163
163
|
return this._mediaControl.enableAGC();
|
|
164
164
|
}
|
|
165
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "getLoopbackList"], [_imports.trace, 2, "getCameraList"], [_imports.trace, 2, "getMicrophoneList"], [_imports.trace, 2, "getSpeakerList"], [_imports.trace, 2, "getSystemSelectedMicrophone"], [_imports.trace, 2, "getSystemSelectedSpeaker"], [_imports.trace, 2, "getWindowList"], [_imports.trace, 2, "getDisplayList"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_getScreenTrackDecs, 2, "getScreenTrack"], [_getLoopbackTrackDecs, 2, "getLoopbackTrack"], [_setSelectedSpeakerDecs, 2, "setSelectedSpeaker"], [_startSelectedSpeakerTestDecs, 2, "startSelectedSpeakerTest"], [_imports.trace, 2, "stopSelectedSpeakerTest"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_imports.trace, 2, "getSelectedSpeakerVolume"], [_imports.trace, 2, "observeSystemSelectedSpeakerChanged"], [_imports.trace, 2, "observeSystemSelectedMicrophoneChanged"], [_imports.trace, 2, "disableAGC"], [_imports.trace, 2, "enableAGC"]], []).e)();
|
|
165
166
|
}
|
|
166
|
-
exports.FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
167
|
+
exports.FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
168
|
+
_staticBlock();
|
|
@@ -27,6 +27,7 @@ var _type = require("../type");
|
|
|
27
27
|
var _schema = require("../schema");
|
|
28
28
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
29
29
|
var _logger = require("../utilities/logger");
|
|
30
|
+
var _staticBlock;
|
|
30
31
|
let _initProto, _getDeviceIdDecs, _getDeviceStateDecs, _startCameraPreviewDecs, _stopCameraPreviewDecs, _openDeviceDecs, _closeDeviceDecs, _getCameraTrackDecs, _getMicrophoneTrackDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs;
|
|
31
32
|
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)]; } }; }
|
|
32
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -37,7 +38,6 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
37
38
|
* @internal
|
|
38
39
|
*/
|
|
39
40
|
class FcrMobileMediaControlImpl {
|
|
40
|
-
static #_ = (() => [_initProto] = _applyDecs(this, [[_getDeviceIdDecs, 2, "getDeviceId"], [_getDeviceStateDecs, 2, "getDeviceState"], [_imports.trace, 2, "startCameraTest"], [_imports.trace, 2, "stopCameraTest"], [_startCameraPreviewDecs, 2, "startCameraPreview"], [_stopCameraPreviewDecs, 2, "stopCameraPreview"], [_imports.trace, 2, "stopCameraPreviewOnAllCanvas"], [_imports.trace, 2, "startScreenCapture"], [_imports.trace, 2, "getScreenCaptureState"], [_imports.trace, 2, "startLoopbackRecording"], [_imports.trace, 2, "stopLoopbackRecording"], [_imports.trace, 2, "getLoopbackRecordingState"], [_imports.trace, 2, "getAudioOutputRouting"], [_imports.trace, 2, "getAudioEffectEnhancer"], [_imports.trace, 2, "getVideoEffectEnhancer"], [_openDeviceDecs, 2, "openDevice"], [_closeDeviceDecs, 2, "closeDevice"], [_imports.trace, 2, "switchCamera"], [_imports.trace, 2, "getCameraPosition"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"]], []).e)();
|
|
41
41
|
[(_getDeviceIdDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrDeviceTypeSchema)], _getDeviceStateDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrDeviceTypeSchema)], _startCameraPreviewDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringOrObjectSchema, _schema.fcrRenderConfigSchema)], _stopCameraPreviewDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringOrObjectSchema)], _openDeviceDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrDeviceTypeSchema)], _closeDeviceDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrDeviceTypeSchema)], _getCameraTrackDecs = (0, _validateParams.default)(_schema.fcrMobileDeviceIdOrNameSchema), _getMicrophoneTrackDecs = (0, _validateParams.default)(_schema.fcrMobileDeviceIdOrNameSchema), _isCapabilitySupportedDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrCapabilitySchema)], _adjustOutputVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
42
42
|
prefix: 'FcrMobileMediaControlImpl'
|
|
43
43
|
})))();
|
|
@@ -119,8 +119,8 @@ class FcrMobileMediaControlImpl {
|
|
|
119
119
|
stopCameraPreviewOnAllCanvas() {
|
|
120
120
|
throw new Error('Method not implemented.');
|
|
121
121
|
}
|
|
122
|
-
startScreenCapture(
|
|
123
|
-
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).start(_imports.AgoraRteScreenCaptureType.SCREEN,
|
|
122
|
+
startScreenCapture(excludeWindowList) {
|
|
123
|
+
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).start(_imports.AgoraRteScreenCaptureType.SCREEN, excludeWindowList);
|
|
124
124
|
}
|
|
125
125
|
stopScreenCapture() {
|
|
126
126
|
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).stop();
|
|
@@ -196,5 +196,7 @@ class FcrMobileMediaControlImpl {
|
|
|
196
196
|
removeObserver(observer) {
|
|
197
197
|
this._observable.removeObserver(observer);
|
|
198
198
|
}
|
|
199
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_getDeviceIdDecs, 2, "getDeviceId"], [_getDeviceStateDecs, 2, "getDeviceState"], [_imports.trace, 2, "startCameraTest"], [_imports.trace, 2, "stopCameraTest"], [_startCameraPreviewDecs, 2, "startCameraPreview"], [_stopCameraPreviewDecs, 2, "stopCameraPreview"], [_imports.trace, 2, "stopCameraPreviewOnAllCanvas"], [_imports.trace, 2, "startScreenCapture"], [_imports.trace, 2, "getScreenCaptureState"], [_imports.trace, 2, "startLoopbackRecording"], [_imports.trace, 2, "stopLoopbackRecording"], [_imports.trace, 2, "getLoopbackRecordingState"], [_imports.trace, 2, "getAudioOutputRouting"], [_imports.trace, 2, "getAudioEffectEnhancer"], [_imports.trace, 2, "getVideoEffectEnhancer"], [_openDeviceDecs, 2, "openDevice"], [_closeDeviceDecs, 2, "closeDevice"], [_imports.trace, 2, "switchCamera"], [_imports.trace, 2, "getCameraPosition"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"]], []).e)();
|
|
199
200
|
}
|
|
200
|
-
exports.FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
201
|
+
exports.FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
202
|
+
_staticBlock();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams,
|
|
2
|
-
import { FcrDeviceInfo, FcrDisplayInfo, FcrRenderView, FcrWindowInfo } from '../type';
|
|
1
|
+
import { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams, AgoraRteVirtualBackgroundOptions, AgoraRteCameraCaptureParams, AgoraRtcAudioOutputRouting } from '../imports';
|
|
2
|
+
import { FcrDeviceInfo, FcrDisplayInfo, FcrRenderView, FcrScreenCaptureType, FcrVideoOrientation, FcrWindowInfo } from '../type';
|
|
3
3
|
import { FcrMediaSourceState, FcrAiDenoiseLevel, FcrVideoSourceType, FcrAudioSourceType, FcrCapability } from '../type';
|
|
4
4
|
import { FcrRenderConfigSchema } from '../schema';
|
|
5
5
|
export type FcrAudioOutputRouting = AgoraRtcAudioOutputRouting;
|
|
@@ -100,7 +100,7 @@ export type FcrLoopbackObserver = {
|
|
|
100
100
|
* @param deviceId
|
|
101
101
|
* @param state
|
|
102
102
|
*/
|
|
103
|
-
|
|
103
|
+
onLoopbackRecordingStateUpdated?: (deviceId: string, state: FcrMediaSourceState) => void;
|
|
104
104
|
};
|
|
105
105
|
export type FcrRenderConfig = FcrRenderConfigSchema;
|
|
106
106
|
export type FcrBeautyOptions = AgoraRteBeautyOptions;
|
|
@@ -108,9 +108,7 @@ export type FcrVirtualBackgroundOptions = AgoraRteVirtualBackgroundOptions;
|
|
|
108
108
|
export type FcrCameraPosition = AgoraRteCameraPosition;
|
|
109
109
|
export type FcrAudioRawDataConfig = AgoraRteAudioRawDataConfig;
|
|
110
110
|
export type FcrScreenCaptureParams = AgoraRteScreenCaptureParams;
|
|
111
|
-
export type FcrScreenCaptureType = AgoraRteScreenCaptureType;
|
|
112
111
|
export type FcrCameraCaptureParams = AgoraRteCameraCaptureParams;
|
|
113
|
-
export type FcrVideoOrientation = AgoraRteVideoOrientation;
|
|
114
112
|
export interface FcrAudioEffectEnhancer {
|
|
115
113
|
/**
|
|
116
114
|
* Enables the AI denoiser for the audio track.
|
|
@@ -458,7 +456,7 @@ export interface FcrScreenTrack {
|
|
|
458
456
|
* @param params The parameters for the screen capture.
|
|
459
457
|
* @returns A promise that resolves when the start is successful.
|
|
460
458
|
*/
|
|
461
|
-
start(type: FcrScreenCaptureType,
|
|
459
|
+
start(type: FcrScreenCaptureType, excludeWindowList: string[]): void;
|
|
462
460
|
/**
|
|
463
461
|
* Stops the screen video track for the specified source.
|
|
464
462
|
* @returns A promise that resolves when the stop is successful.
|
|
@@ -476,6 +474,11 @@ export interface FcrScreenTrack {
|
|
|
476
474
|
removeObserver(observer: FcrScreenTrackObserver): void;
|
|
477
475
|
}
|
|
478
476
|
export interface FcrDesktopMediaControl {
|
|
477
|
+
/**
|
|
478
|
+
* Get the list of loopback devices.
|
|
479
|
+
* @returns An array of device information for each loopback device.
|
|
480
|
+
*/
|
|
481
|
+
getLoopbackList(): FcrDeviceInfo[];
|
|
479
482
|
/**
|
|
480
483
|
* Get the list of cameras.
|
|
481
484
|
* @returns An array of device information for each camera.
|
|
@@ -581,13 +584,6 @@ export interface FcrDesktopMediaControl {
|
|
|
581
584
|
* @returns The volume of the speaker. Range from 0 to 100.
|
|
582
585
|
*/
|
|
583
586
|
getSelectedSpeakerVolume(): number;
|
|
584
|
-
/**
|
|
585
|
-
* Check loopback device status
|
|
586
|
-
* @returns 0 if the loopback device is available; otherwise,
|
|
587
|
-
* 1 if not downloaded,
|
|
588
|
-
* 2 if not installed/activated
|
|
589
|
-
*/
|
|
590
|
-
checkLoopbackDevice(): Promise<number>;
|
|
591
587
|
/**
|
|
592
588
|
* Follow the system speaker.
|
|
593
589
|
* @param follow
|
|
@@ -631,7 +627,7 @@ export interface FcrMobileMediaControl {
|
|
|
631
627
|
stopCameraPreview(view: string | object): void;
|
|
632
628
|
stopCameraPreviewOnAllCanvas(): void;
|
|
633
629
|
isCapabilitySupported(capability: FcrCapability): boolean;
|
|
634
|
-
startScreenCapture(
|
|
630
|
+
startScreenCapture(excludeWindowList: string[]): void;
|
|
635
631
|
stopScreenCapture(): void;
|
|
636
632
|
getScreenCaptureState(): FcrMediaSourceState;
|
|
637
633
|
startLoopbackRecording(): void;
|
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
22
22
|
});
|
|
23
23
|
exports.FcrMonitorControlImpl = void 0;
|
|
24
24
|
var _imports = require("../imports");
|
|
25
|
+
var _staticBlock;
|
|
25
26
|
let _initProto;
|
|
26
27
|
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
28
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -32,7 +33,6 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
32
33
|
* @internal
|
|
33
34
|
*/
|
|
34
35
|
class FcrMonitorControlImpl {
|
|
35
|
-
static #_ = (() => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "uploadEvent"]], []).e)();
|
|
36
36
|
_monitor = (() => void _initProto(this))();
|
|
37
37
|
constructor(engine, _config) {
|
|
38
38
|
this._config = _config;
|
|
@@ -47,5 +47,7 @@ class FcrMonitorControlImpl {
|
|
|
47
47
|
removeObserver(observer) {
|
|
48
48
|
this._monitor.addObserver(observer);
|
|
49
49
|
}
|
|
50
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "uploadEvent"]], []).e)();
|
|
50
51
|
}
|
|
51
|
-
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|
|
52
|
+
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|
|
53
|
+
_staticBlock();
|
|
@@ -27,6 +27,7 @@ var _error = require("../utilities/error");
|
|
|
27
27
|
var _logger = require("../utilities/logger");
|
|
28
28
|
var _schema = require("../schema");
|
|
29
29
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
30
|
+
var _staticBlock;
|
|
30
31
|
let _initProto, _startPeerSessionDecs, _stopPeerSessionDecs, _acceptPeerSessionDecs, _rejectPeerSessionDecs;
|
|
31
32
|
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)]; } }; }
|
|
32
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -37,7 +38,6 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
37
38
|
* @internal
|
|
38
39
|
*/
|
|
39
40
|
class FcrPeerSessionControlImpl {
|
|
40
|
-
static #_ = (() => [_initProto] = _applyDecs(this, [[_startPeerSessionDecs, 2, "startPeerSession"], [_stopPeerSessionDecs, 2, "stopPeerSession"], [_acceptPeerSessionDecs, 2, "acceptPeerSession"], [_rejectPeerSessionDecs, 2, "rejectPeerSession"]], []).e)();
|
|
41
41
|
//@internal
|
|
42
42
|
[(_startPeerSessionDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrPeerSessionParamsSchema)], _stopPeerSessionDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _acceptPeerSessionDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrSessionBaseSchema, _schema.stringKeyUnknownValueSchema.optional())], _rejectPeerSessionDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrSessionBaseSchema, _schema.stringKeyUnknownValueSchema.optional())], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
43
43
|
prefix: 'FcrPeerSessionControlImpl'
|
|
@@ -279,5 +279,7 @@ class FcrPeerSessionControlImpl {
|
|
|
279
279
|
_addLogObserver() {
|
|
280
280
|
this.addObserver((0, _logger.generateLogObserver)(this.logger, ['onPeerSessionAccepted', 'onPeerSessionReceived', 'onPeerSessionRejected']));
|
|
281
281
|
}
|
|
282
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_startPeerSessionDecs, 2, "startPeerSession"], [_stopPeerSessionDecs, 2, "stopPeerSession"], [_acceptPeerSessionDecs, 2, "acceptPeerSession"], [_rejectPeerSessionDecs, 2, "rejectPeerSession"]], []).e)();
|
|
282
283
|
}
|
|
283
|
-
exports.FcrPeerSessionControlImpl = FcrPeerSessionControlImpl;
|
|
284
|
+
exports.FcrPeerSessionControlImpl = FcrPeerSessionControlImpl;
|
|
285
|
+
_staticBlock();
|