fcr-core 3.10.0-beta → 3.10.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/engine/index.d.ts +10 -4
- package/lib/engine/index.js +43 -13
- package/lib/engine/type.d.ts +13 -3
- package/lib/imports.d.ts +4 -7
- package/lib/imports.js +13 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -2
- package/lib/media-control/desktop.js +10 -1
- package/lib/media-control/mobile.js +13 -3
- package/lib/media-control/type.d.ts +7 -0
- package/lib/monitor-control/index.js +5 -2
- package/lib/monitor-control/type.d.ts +4 -0
- package/lib/peer-session/index.d.ts +4 -1
- package/lib/peer-session/index.js +197 -30
- package/lib/peer-session/type.d.ts +29 -0
- package/lib/plugins/chat/chatroom.js +5 -1
- package/lib/remote-control/index.d.ts +31 -0
- package/lib/remote-control/index.js +702 -0
- package/lib/remote-control/type.d.ts +115 -0
- package/lib/remote-control/type.js +45 -0
- package/lib/room-control/ability-control/index.js +2 -1
- package/lib/room-control/ability-control/type.d.ts +3 -1
- package/lib/room-control/ability-control/type.js +1 -0
- package/lib/room-control/application-control/index.d.ts +32 -0
- package/lib/room-control/application-control/index.js +264 -0
- package/lib/room-control/application-control/type.d.ts +41 -0
- package/lib/room-control/application-control/type.js +12 -0
- package/lib/room-control/chatroom-control/type.d.ts +4 -0
- package/lib/room-control/group-control/index.d.ts +2 -0
- package/lib/room-control/group-control/index.js +11 -3
- package/lib/room-control/helpers/board-init-info-helper.d.ts +8 -0
- package/lib/room-control/helpers/board-init-info-helper.js +73 -0
- package/lib/room-control/index.js +73 -8
- package/lib/room-control/infinity-room-control/index.d.ts +1 -0
- package/lib/room-control/infinity-room-control/index.js +130 -0
- package/lib/room-control/infinity-room-control/type.d.ts +6 -0
- package/lib/room-control/infinity-room-control/type.js +5 -0
- package/lib/room-control/interpreter-control/index.js +34 -29
- package/lib/room-control/interpreter-control/types.d.ts +1 -0
- package/lib/room-control/mainroom-control/index.js +9 -69
- package/lib/room-control/privilege-control/index.js +85 -5
- package/lib/room-control/privilege-control/type.d.ts +101 -1
- package/lib/room-control/privilege-control/type.js +48 -1
- package/lib/room-control/room-connector-control/index.js +9 -4
- package/lib/room-control/room-connector-control/type.d.ts +4 -0
- package/lib/room-control/room-control-factory.js +4 -2
- package/lib/room-control/room-session/index.js +26 -9
- package/lib/room-control/room-session/type.d.ts +4 -0
- package/lib/room-control/shared-cache.d.ts +11 -1
- package/lib/room-control/shared-cache.js +34 -0
- package/lib/room-control/sharing-control/index.js +35 -16
- package/lib/room-control/stream-control/index.js +55 -37
- package/lib/room-control/stream-control/type.d.ts +7 -3
- package/lib/room-control/stt-control/index.js +4 -1
- package/lib/room-control/type.d.ts +32 -2
- package/lib/room-control/type.js +1 -0
- package/lib/room-control/user-control/index.js +51 -24
- package/lib/room-control/user-control/type.d.ts +36 -1
- package/lib/room-control/whiteboard-control-v1/index.js +5 -1
- package/lib/room-control/whiteboard-control-v1/type.d.ts +4 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +7 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +37 -8
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.d.ts +2 -2
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +12 -8
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +5 -2
- package/lib/room-control/whiteboard-control-v2/base/index.d.ts +7 -6
- package/lib/room-control/whiteboard-control-v2/base/index.js +42 -51
- package/lib/room-control/whiteboard-control-v2/base/main-window.d.ts +16 -2
- package/lib/room-control/whiteboard-control-v2/base/main-window.js +45 -10
- package/lib/room-control/whiteboard-control-v2/type.d.ts +16 -6
- package/lib/room-control/whiteboard-control-v2/utils.d.ts +1 -1
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +4 -2
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +10 -5
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.d.ts +2 -2
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +13 -8
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +4 -2
- package/lib/room-router/index.js +3 -2
- package/lib/schema.d.ts +133 -53
- package/lib/schema.js +41 -22
- package/lib/service/api.d.ts +92 -6
- package/lib/service/api.js +212 -13
- package/lib/service/type.d.ts +7 -0
- package/lib/service/type.js +11 -1
- package/lib/struct.d.ts +31 -0
- package/lib/struct.js +75 -0
- package/lib/type.d.ts +7 -30
- package/lib/type.js +16 -62
- package/lib/utilities/error-helpers.d.ts +3 -1
- package/lib/utilities/error-helpers.js +2 -0
- package/lib/utilities/error.d.ts +2 -2
- package/lib/utilities/error.js +5 -5
- package/lib/utilities/join-helper.js +5 -4
- package/lib/utilities/scene-properties.d.ts +6 -0
- package/lib/utilities/scene-properties.js +9 -0
- package/lib/utilities/shared-storage.d.ts +5 -5
- package/lib/utilities/stream.d.ts +0 -2
- package/lib/utilities/video-encoder-config.d.ts +2 -2
- package/lib/utilities/video-encoder-config.js +19 -9
- package/lib-es/engine/index.js +43 -13
- package/lib-es/imports.js +3 -2
- package/lib-es/index.js +2 -1
- package/lib-es/media-control/desktop.js +10 -1
- package/lib-es/media-control/mobile.js +13 -3
- package/lib-es/monitor-control/index.js +5 -2
- package/lib-es/peer-session/index.js +199 -32
- package/lib-es/plugins/chat/chatroom.js +5 -1
- package/lib-es/remote-control/index.js +695 -0
- package/lib-es/remote-control/type.js +41 -0
- package/lib-es/room-control/ability-control/index.js +2 -1
- package/lib-es/room-control/ability-control/type.js +1 -0
- package/lib-es/room-control/application-control/index.js +257 -0
- package/lib-es/room-control/application-control/type.js +6 -0
- package/lib-es/room-control/group-control/index.js +11 -3
- package/lib-es/room-control/helpers/board-init-info-helper.js +67 -0
- package/lib-es/room-control/index.js +75 -9
- package/lib-es/room-control/infinity-room-control/index.js +123 -0
- package/lib-es/room-control/infinity-room-control/type.js +1 -0
- package/lib-es/room-control/interpreter-control/index.js +34 -29
- package/lib-es/room-control/mainroom-control/index.js +11 -71
- package/lib-es/room-control/privilege-control/index.js +86 -6
- package/lib-es/room-control/privilege-control/type.js +47 -0
- package/lib-es/room-control/room-connector-control/index.js +9 -4
- package/lib-es/room-control/room-control-factory.js +4 -2
- package/lib-es/room-control/room-session/index.js +26 -9
- package/lib-es/room-control/shared-cache.js +34 -0
- package/lib-es/room-control/sharing-control/index.js +28 -9
- package/lib-es/room-control/stream-control/index.js +56 -38
- package/lib-es/room-control/stt-control/index.js +4 -1
- package/lib-es/room-control/type.js +1 -0
- package/lib-es/room-control/user-control/index.js +51 -24
- package/lib-es/room-control/whiteboard-control-v1/index.js +5 -1
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +38 -9
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +12 -8
- package/lib-es/room-control/whiteboard-control-v2/base/index.js +42 -51
- package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +45 -10
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +10 -5
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +13 -8
- package/lib-es/room-router/index.js +3 -2
- package/lib-es/schema.js +33 -19
- package/lib-es/service/api.js +203 -4
- package/lib-es/service/type.js +9 -1
- package/lib-es/struct.js +69 -0
- package/lib-es/type.js +3 -54
- package/lib-es/utilities/error-helpers.js +2 -0
- package/lib-es/utilities/error.js +5 -5
- package/lib-es/utilities/join-helper.js +5 -4
- package/lib-es/utilities/scene-properties.js +2 -0
- package/lib-es/utilities/video-encoder-config.js +19 -9
- package/package.json +7 -7
package/lib/engine/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FcrCoreEngineConfig } from '..';
|
|
2
2
|
import { FcrDesktopMediaControl, FcrMobileMediaControl } from '../media-control/type';
|
|
3
3
|
import { FcrMonitorControl } from '../monitor-control/type';
|
|
4
|
-
import { FcrMainRoomControl, FcrRoomJoinOptions, FcrWaitingRoomControl } from '../room-control/type';
|
|
4
|
+
import { FcrInfinityRoomControl, FcrMainRoomControl, FcrRoomJoinOptions, FcrWaitingRoomControl } from '../room-control/type';
|
|
5
5
|
import { FcrRoomRouter } from '../room-router/type';
|
|
6
|
-
import { FcrCoreEngine, FcrCoreEngineObserver, FcrPeerSessionControl } from '../type';
|
|
6
|
+
import { FcrCoreEngine, FcrCoreEngineObserver, FcrPeerSessionControl, FcrRemoteControl } from '../type';
|
|
7
7
|
import { Unknown } from '../imports';
|
|
8
8
|
export declare class FcrCoreEngineImpl implements FcrCoreEngine {
|
|
9
9
|
constructor(config: FcrCoreEngineConfig);
|
|
@@ -30,12 +30,13 @@ export declare class FcrCoreEngineImpl implements FcrCoreEngine {
|
|
|
30
30
|
*/
|
|
31
31
|
getVersion(): string;
|
|
32
32
|
getDependencyVersions(): Record<string, string>;
|
|
33
|
+
createMainRoomControl(roomId: string): FcrMainRoomControl;
|
|
33
34
|
/**
|
|
34
35
|
* Creates a room control.
|
|
35
36
|
* @param roomId
|
|
36
37
|
* @returns The room control.
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
createInfinityRoomControl(roomId: string): FcrInfinityRoomControl;
|
|
39
40
|
/**
|
|
40
41
|
* Creates a waiting room control.
|
|
41
42
|
* @param roomId
|
|
@@ -53,7 +54,7 @@ export declare class FcrCoreEngineImpl implements FcrCoreEngine {
|
|
|
53
54
|
* @param roomId
|
|
54
55
|
* @returns The room control.
|
|
55
56
|
*/
|
|
56
|
-
createRoomControlAndJoin(roomId: string, options: FcrRoomJoinOptions): Promise<FcrMainRoomControl | FcrWaitingRoomControl>;
|
|
57
|
+
createRoomControlAndJoin(roomId: string, options: FcrRoomJoinOptions): Promise<FcrMainRoomControl | FcrWaitingRoomControl | FcrInfinityRoomControl>;
|
|
57
58
|
/**
|
|
58
59
|
* Gets the media control.
|
|
59
60
|
* @returns The media control.
|
|
@@ -74,6 +75,11 @@ export declare class FcrCoreEngineImpl implements FcrCoreEngine {
|
|
|
74
75
|
* @returns The peer session control.
|
|
75
76
|
*/
|
|
76
77
|
getPeerSessionControl(): FcrPeerSessionControl;
|
|
78
|
+
/**
|
|
79
|
+
* Gets the remote control.
|
|
80
|
+
* @returns The remote control.
|
|
81
|
+
*/
|
|
82
|
+
getRemoteControl(): FcrRemoteControl;
|
|
77
83
|
/**
|
|
78
84
|
* Sends a peer message.
|
|
79
85
|
* @param payload
|
package/lib/engine/index.js
CHANGED
|
@@ -58,7 +58,9 @@ var _logger = require("../utilities/logger");
|
|
|
58
58
|
var _packageInfo = require("../utilities/package-info");
|
|
59
59
|
var _parameters = require("../utilities/parameters");
|
|
60
60
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
61
|
-
|
|
61
|
+
var _infinityRoomControl = require("../room-control/infinity-room-control");
|
|
62
|
+
var _remoteControl = require("../remote-control");
|
|
63
|
+
let _initProto, _renewUserTokenDecs, _createMainRoomControlDecs, _createInfinityRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
|
|
62
64
|
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)]; } }; }
|
|
63
65
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
64
66
|
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); }
|
|
@@ -66,10 +68,10 @@ function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.descrip
|
|
|
66
68
|
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; }
|
|
67
69
|
class FcrCoreEngineImpl {
|
|
68
70
|
static {
|
|
69
|
-
[_initProto] = _applyDecs(this, [[_decorator.trace, 2, "release"], [_decorator.trace, 2, "login"], [_decorator.trace, 2, "logout"], [_renewUserTokenDecs, 2, "renewUserToken"], [_decorator.trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [_decorator.trace, 2, "getDesktopMediaControl"], [_decorator.trace, 2, "getMobileMediaControl"], [_decorator.trace, 2, "getMonitorControl"], [_decorator.trace, 2, "getPeerSessionControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e;
|
|
71
|
+
[_initProto] = _applyDecs(this, [[_decorator.trace, 2, "release"], [_decorator.trace, 2, "login"], [_decorator.trace, 2, "logout"], [_renewUserTokenDecs, 2, "renewUserToken"], [_decorator.trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createInfinityRoomControlDecs, 2, "createInfinityRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [_decorator.trace, 2, "getDesktopMediaControl"], [_decorator.trace, 2, "getMobileMediaControl"], [_decorator.trace, 2, "getMonitorControl"], [_decorator.trace, 2, "getPeerSessionControl"], [_decorator.trace, 2, "getRemoteControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e;
|
|
70
72
|
}
|
|
71
73
|
// @internal
|
|
72
|
-
[(_renewUserTokenDecs = (0, _decorator.trace)(['token'], true), _createMainRoomControlDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createWaitingRoomControlDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createRoomRouterDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createRoomControlAndJoinDecs = [(0, _decorator.trace)(['roomId', 'options']), (0, _validateParams.default)(_schema.stringSchema, _schema.fcrRoomJoinOptionsSchema)], _sendPeerMessageDecs = [(0, _decorator.trace)(['payload', 'guaranteedDelivery', 'receiverId'], true), (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema, _schema.booleanSchema, _schema.stringSchema)], _setParametersDecs = [(0, _decorator.trace)(['parameters'], true), (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema)], "logger")] = void _initProto(this);
|
|
74
|
+
[(_renewUserTokenDecs = (0, _decorator.trace)(['token'], true), _createMainRoomControlDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createInfinityRoomControlDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createWaitingRoomControlDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createRoomRouterDecs = [(0, _decorator.trace)(['roomId']), (0, _validateParams.default)(_schema.stringSchema)], _createRoomControlAndJoinDecs = [(0, _decorator.trace)(['roomId', 'options']), (0, _validateParams.default)(_schema.stringSchema, _schema.fcrRoomJoinOptionsSchema)], _sendPeerMessageDecs = [(0, _decorator.trace)(['payload', 'guaranteedDelivery', 'receiverId'], true), (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema, _schema.booleanSchema, _schema.stringSchema)], _setParametersDecs = [(0, _decorator.trace)(['parameters'], true), (0, _validateParams.default)(_schema.stringKeyUnknownValueSchema)], "logger")] = void _initProto(this);
|
|
73
75
|
// @internal
|
|
74
76
|
|
|
75
77
|
// @internal
|
|
@@ -96,6 +98,8 @@ class FcrCoreEngineImpl {
|
|
|
96
98
|
_lock = new _mutex.Mutex();
|
|
97
99
|
// @internal
|
|
98
100
|
_observable = new _observable.AgoraObservable();
|
|
101
|
+
// @internal
|
|
102
|
+
|
|
99
103
|
constructor(config) {
|
|
100
104
|
this._config = config;
|
|
101
105
|
(0, _domainHolder.resetSharedDomainHolder)();
|
|
@@ -128,6 +132,7 @@ class FcrCoreEngineImpl {
|
|
|
128
132
|
|
|
129
133
|
// cannot be lazy loaded, because all the observers should be added before the engine is started
|
|
130
134
|
this._peerSessionControl = new _peerSession.FcrPeerSessionControlImpl(this._rteEngine, this._apiService, this._config.userId);
|
|
135
|
+
this._remoteControl = new _remoteControl.FcrRemoteControlImpl(this._rteEngine, this._apiService, this._config.userId);
|
|
131
136
|
this._chatConnection = this._createChatConnection(config.parameters);
|
|
132
137
|
this._monitorControl = new _monitorControl.FcrMonitorControlImpl(this._rteEngine, this._config);
|
|
133
138
|
this._desktopMediaControl = new _desktop.FcrDesktopMediaControlImpl(this._rteEngine.getMediaControl());
|
|
@@ -204,17 +209,25 @@ class FcrCoreEngineImpl {
|
|
|
204
209
|
easemob: (0, _packageInfo.getDependenciesInfo)('easemob-websdk')
|
|
205
210
|
};
|
|
206
211
|
}
|
|
212
|
+
createMainRoomControl(roomId) {
|
|
213
|
+
const sceneConfig = {
|
|
214
|
+
sceneId: roomId
|
|
215
|
+
};
|
|
216
|
+
const scene = this._rteEngine.createScene(sceneConfig);
|
|
217
|
+
return new _mainroomControl.FcrMainRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new _chatroom.FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache, false), this._monitorControl);
|
|
218
|
+
}
|
|
207
219
|
|
|
208
220
|
/**
|
|
209
221
|
* Creates a room control.
|
|
210
222
|
* @param roomId
|
|
211
223
|
* @returns The room control.
|
|
212
224
|
*/
|
|
213
|
-
|
|
214
|
-
const
|
|
225
|
+
createInfinityRoomControl(roomId) {
|
|
226
|
+
const sceneConfig = {
|
|
215
227
|
sceneId: roomId
|
|
216
|
-
}
|
|
217
|
-
|
|
228
|
+
};
|
|
229
|
+
const scene = this._rteEngine.createScene(sceneConfig);
|
|
230
|
+
return new _infinityRoomControl.FcrInfinityRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new _chatroom.FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache, false), this._monitorControl);
|
|
218
231
|
}
|
|
219
232
|
|
|
220
233
|
/**
|
|
@@ -223,9 +236,10 @@ class FcrCoreEngineImpl {
|
|
|
223
236
|
* @returns The room control.
|
|
224
237
|
*/
|
|
225
238
|
createWaitingRoomControl(roomId) {
|
|
226
|
-
const
|
|
239
|
+
const sceneConfig = {
|
|
227
240
|
sceneId: roomId
|
|
228
|
-
}
|
|
241
|
+
};
|
|
242
|
+
const scene = this._rteEngine.createScene(sceneConfig);
|
|
229
243
|
return new _waitingroomControl.FcrWaitingRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new _chatroom.FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache, false));
|
|
230
244
|
}
|
|
231
245
|
|
|
@@ -275,10 +289,18 @@ class FcrCoreEngineImpl {
|
|
|
275
289
|
data,
|
|
276
290
|
ts
|
|
277
291
|
} = res;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
292
|
+
switch (data.room.roomProperties.roomType) {
|
|
293
|
+
case _type3.FcrRoomType.Waitingroom:
|
|
294
|
+
roomControl = this.createWaitingRoomControl(data.room.roomInfo.roomUuid);
|
|
295
|
+
break;
|
|
296
|
+
case _type3.FcrRoomType.Infinityroom:
|
|
297
|
+
roomControl = this.createInfinityRoomControl(roomId);
|
|
298
|
+
break;
|
|
299
|
+
case _type3.FcrRoomType.Mainroom:
|
|
300
|
+
roomControl = this.createMainRoomControl(roomId);
|
|
301
|
+
break;
|
|
302
|
+
default:
|
|
303
|
+
throw new Error(`Unknown room type: ${data.room.roomProperties.roomType}`);
|
|
282
304
|
}
|
|
283
305
|
await roomControl.join({
|
|
284
306
|
...options,
|
|
@@ -339,6 +361,14 @@ class FcrCoreEngineImpl {
|
|
|
339
361
|
return this._peerSessionControl;
|
|
340
362
|
}
|
|
341
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Gets the remote control.
|
|
366
|
+
* @returns The remote control.
|
|
367
|
+
*/
|
|
368
|
+
getRemoteControl() {
|
|
369
|
+
return this._remoteControl;
|
|
370
|
+
}
|
|
371
|
+
|
|
342
372
|
/**
|
|
343
373
|
* Sends a peer message.
|
|
344
374
|
* @param payload
|
package/lib/engine/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FcrDesktopMediaControl, FcrMobileMediaControl, FcrMonitorControl } from '..';
|
|
2
|
-
import { FcrMainRoomControl, FcrWaitingRoomControl, FcrRoomJoinOptions } from '../room-control/type';
|
|
3
|
-
import { FcrRoomRouter, FcrPeerSessionControl, FcrCoreEngineObserver } from '../type';
|
|
2
|
+
import { FcrMainRoomControl, FcrWaitingRoomControl, FcrRoomJoinOptions, FcrInfinityRoomControl } from '../room-control/type';
|
|
3
|
+
import { FcrRoomRouter, FcrPeerSessionControl, FcrCoreEngineObserver, FcrRemoteControl } from '../type';
|
|
4
4
|
import { Unknown } from '../imports';
|
|
5
5
|
export interface FcrCoreEngine {
|
|
6
6
|
release(): void;
|
|
@@ -39,6 +39,11 @@ export interface FcrCoreEngine {
|
|
|
39
39
|
* @returns The room control.
|
|
40
40
|
*/
|
|
41
41
|
createWaitingRoomControl(roomId: string): FcrWaitingRoomControl;
|
|
42
|
+
/**
|
|
43
|
+
* Creates an infinity room control.
|
|
44
|
+
* @param roomId
|
|
45
|
+
*/
|
|
46
|
+
createInfinityRoomControl(roomId: string): FcrInfinityRoomControl;
|
|
42
47
|
/**
|
|
43
48
|
* Creates room router.
|
|
44
49
|
* @param roomId
|
|
@@ -50,7 +55,7 @@ export interface FcrCoreEngine {
|
|
|
50
55
|
* @param roomId
|
|
51
56
|
* @returns The room control.
|
|
52
57
|
*/
|
|
53
|
-
createRoomControlAndJoin(roomId: string, options: FcrRoomJoinOptions): Promise<FcrMainRoomControl | FcrWaitingRoomControl>;
|
|
58
|
+
createRoomControlAndJoin(roomId: string, options: FcrRoomJoinOptions): Promise<FcrMainRoomControl | FcrWaitingRoomControl | FcrInfinityRoomControl>;
|
|
54
59
|
/**
|
|
55
60
|
* Gets the media control.
|
|
56
61
|
* @returns The media control.
|
|
@@ -71,6 +76,11 @@ export interface FcrCoreEngine {
|
|
|
71
76
|
* @returns The peer session control.
|
|
72
77
|
*/
|
|
73
78
|
getPeerSessionControl(): FcrPeerSessionControl;
|
|
79
|
+
/**
|
|
80
|
+
* Gets the remote control.
|
|
81
|
+
* @returns The remote control.
|
|
82
|
+
*/
|
|
83
|
+
getRemoteControl(): FcrRemoteControl;
|
|
74
84
|
/**
|
|
75
85
|
* Sends a peer message.
|
|
76
86
|
* @param payload
|
package/lib/imports.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import padStart from 'lodash/padStart';
|
|
|
5
5
|
import padEnd from 'lodash/padEnd';
|
|
6
6
|
import toLower from 'lodash/toLower';
|
|
7
7
|
import { default as EasemobChatSDK } from 'easemob-websdk';
|
|
8
|
-
import { FcrVideoEncoderConfigurationSchema, FcrMediaStreamCreateConfigSchema, FcrStreamBindConfigSchema } from './schema';
|
|
9
8
|
export { to, get, padStart, padEnd, toLower, EasemobChatSDK };
|
|
10
9
|
export { EasemobChat } from 'easemob-websdk';
|
|
11
10
|
export { RTMProvider_2_2 as FcrRTMProvider_2_2 } from '@netless/forge-rtm';
|
|
@@ -32,14 +31,11 @@ export type { AgoraRtcNetworkStats, AgoraRtcDeviceInfo, AgoraRtcDisplayInfo, Ago
|
|
|
32
31
|
export type { AgoraRtmClient } from 'agora-rte-sdk/lib/core/rtm/client';
|
|
33
32
|
export type { AgoraRteEngineObserver } from 'agora-rte-sdk/lib/core/engine/type';
|
|
34
33
|
export type { AgoraRteNetworkQualityEvent } from 'agora-rte-sdk/lib/core/scene/type';
|
|
35
|
-
export type { AgoraRteOperatCause } from 'agora-rte-sdk/lib/core/processor/type';
|
|
34
|
+
export type { AgoraRteOperatCause, AgoraRteExDataSyncTypeInfo, } from 'agora-rte-sdk/lib/core/processor/type';
|
|
36
35
|
export type { AgoraRestfulClient } from 'agora-rte-sdk/lib/core/services/client';
|
|
37
36
|
export { AgoraRteError } from 'agora-rte-sdk/lib/core/utilities/error';
|
|
38
37
|
export { AgoraError as FcrError } from 'agora-foundation/lib/utilities/error/agora-error';
|
|
39
|
-
export type { AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteUserPageParams, AgoraRteUserPageResponse, AgoraRteUserPropertiesDeletedEvent, AgoraRteUserPropertiesUpdatedEvent, AgoraRteUserInfo, AgoraRteSceneObserver, AgoraRteSnapshotInfo, AgoraRteEntryRoomResponse, AgoraRteMediaStreamEvent, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
40
|
-
export type AgoraRteMediaStreamCreateConfig = FcrMediaStreamCreateConfigSchema;
|
|
41
|
-
export type AgoraRteStreamBindConfig = FcrStreamBindConfigSchema;
|
|
42
|
-
export type AgoraRteVideoEncoderConfig = FcrVideoEncoderConfigurationSchema;
|
|
38
|
+
export type { AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteUserPageParams, AgoraRteUserPageResponse, AgoraRteUserPropertiesDeletedEvent, AgoraRteUserPropertiesUpdatedEvent, AgoraRteUserInfo, AgoraRteSceneObserver, AgoraRteSnapshotInfo, AgoraRteEntryRoomResponse, AgoraRteMediaStreamEvent, AgoraRteUserDesyncedEvent, AgoraRteUserSyncedEvent, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
43
39
|
export type { AgoraRtcLocalVideoStats, AgoraRtcLocalAudioStats, AgoraRtcRemoteVideoStats, AgoraRtcRemoteAudioStats, AgoraRtcDimensions, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
44
40
|
export type { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams, AgoraRteVirtualBackgroundOptions, AgoraRteCameraCaptureParams, } from 'agora-rte-sdk/lib/core/media/type';
|
|
45
41
|
export type { AgoraRteMonitor } from 'agora-rte-sdk/lib/core/monitor';
|
|
@@ -47,7 +43,7 @@ export type { AgoraRteMediaControl } from 'agora-rte-sdk/lib/core/media/type';
|
|
|
47
43
|
export type { AgoraRteUpdateStreamPrivilege, AgoraRteMediaStreamInfo, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
48
44
|
export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishState, AgoraRteLatencyLevel, } from 'agora-rte-sdk';
|
|
49
45
|
export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
50
|
-
export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
46
|
+
export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode, AgoraRtcDegradationPreference, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
51
47
|
export { AgoraRteStreamLayer } from 'agora-rte-sdk/lib/type';
|
|
52
48
|
export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
|
|
53
49
|
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState, } from 'agora-rte-sdk/lib/type';
|
|
@@ -72,3 +68,4 @@ export { FcrChatRoomControlImpl } from './plugins/chat/chatroom';
|
|
|
72
68
|
export type Unknown = unknown;
|
|
73
69
|
export { default as isBoolean } from 'lodash/isBoolean';
|
|
74
70
|
export { default as isNumber } from 'lodash/isNumber';
|
|
71
|
+
export { AgoraRteExDataSyncType } from 'agora-rte-sdk/lib/core/processor/type';
|
package/lib/imports.js
CHANGED
|
@@ -48,6 +48,12 @@ Object.defineProperty(exports, "AgoraRtcCapability", {
|
|
|
48
48
|
return _type2.AgoraRtcCapability;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
Object.defineProperty(exports, "AgoraRtcDegradationPreference", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _type2.AgoraRtcDegradationPreference;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
51
57
|
Object.defineProperty(exports, "AgoraRtcEncryptionMode", {
|
|
52
58
|
enumerable: true,
|
|
53
59
|
get: function () {
|
|
@@ -114,6 +120,12 @@ Object.defineProperty(exports, "AgoraRteError", {
|
|
|
114
120
|
return _error.AgoraRteError;
|
|
115
121
|
}
|
|
116
122
|
});
|
|
123
|
+
Object.defineProperty(exports, "AgoraRteExDataSyncType", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () {
|
|
126
|
+
return _type6.AgoraRteExDataSyncType;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
117
129
|
Object.defineProperty(exports, "AgoraRteLatencyLevel", {
|
|
118
130
|
enumerable: true,
|
|
119
131
|
get: function () {
|
|
@@ -591,6 +603,7 @@ var _errorCode = require("agora-foundation/lib/utilities/error/error-code");
|
|
|
591
603
|
var _chatroom = require("./plugins/chat/chatroom");
|
|
592
604
|
var _isBoolean = _interopRequireDefault(require("lodash/isBoolean"));
|
|
593
605
|
var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
|
|
606
|
+
var _type6 = require("agora-rte-sdk/lib/core/processor/type");
|
|
594
607
|
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); }
|
|
595
608
|
// Other utility exports
|
|
596
609
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { FcrDesktopMediaControl, FcrDesktopMediaObserver, FcrMobileMediaControl, FcrMobileMediaObserver, FcrMonitorControl, FcrMonitorObserver, FcrBaseRoomControl, FcrRoomObserver, FcrUserControl, FcrUserObserver, FcrStreamControl, FcrStreamObserver, FcrPrivilegeControl, FcrPermission, FcrBoardMainWindow, FcrBoardMainWindowObserver, FcrColor, } from './type';
|
|
2
|
-
export { FcrStreamLatencyLevel, FcrPermissionAction, FcrPrivilegeUserRole, FcrUserRole, FcrStreamState, FcrRegion, FcrStreamType, FcrUserUpdatedReason, FcrRoomConnectorType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState, FcrVideoRenderMode, FcrVideoStreamType, FcrCapability, FcrAiDenoiseLevel, FcrStreamPrivilegeOperation, FcrStreamPrivilegeVideoSourceType, FcrStreamPrivilegeAudioSourceType, FcrConnectionState, registerPlugin, FcrBoardToolType, FcrBoardShape,
|
|
2
|
+
export { FcrStreamLatencyLevel, FcrPermissionAction, FcrPrivilegeUserRole, FcrUserRole, FcrStreamState, FcrRegion, FcrStreamType, FcrUserUpdatedReason, FcrRoomConnectorType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState, FcrVideoRenderMode, FcrVideoStreamType, FcrCapability, FcrAiDenoiseLevel, FcrStreamPrivilegeOperation, FcrStreamPrivilegeVideoSourceType, FcrStreamPrivilegeAudioSourceType, FcrConnectionState, registerPlugin, FcrBoardToolType, FcrBoardShape, FcrVideoEncoderConfig, FcrDualVideoStreamConfig, } from './type';
|
|
3
3
|
export { FcrCoreEngineImpl as FcrCoreEngine } from './engine';
|
|
4
|
+
export { FcrCoreEngineConfig } from './struct';
|
|
4
5
|
export { FcrError } from './type';
|
package/lib/index.js
CHANGED
|
@@ -48,7 +48,7 @@ Object.defineProperty(exports, "FcrCoreEngine", {
|
|
|
48
48
|
Object.defineProperty(exports, "FcrCoreEngineConfig", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function () {
|
|
51
|
-
return
|
|
51
|
+
return _struct.FcrCoreEngineConfig;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "FcrDualVideoStreamConfig", {
|
|
@@ -172,4 +172,5 @@ Object.defineProperty(exports, "registerPlugin", {
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
var _type = require("./type");
|
|
175
|
-
var _engine = require("./engine");
|
|
175
|
+
var _engine = require("./engine");
|
|
176
|
+
var _struct = require("./struct");
|
|
@@ -25,6 +25,7 @@ exports.FcrDesktopMediaControlImpl = void 0;
|
|
|
25
25
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
26
26
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
27
27
|
var _imports = require("../imports");
|
|
28
|
+
var _type = require("../type");
|
|
28
29
|
var _schema = require("../schema");
|
|
29
30
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
30
31
|
var _logger = require("../utilities/logger");
|
|
@@ -39,7 +40,7 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
39
40
|
*/
|
|
40
41
|
class FcrDesktopMediaControlImpl {
|
|
41
42
|
static {
|
|
42
|
-
[_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"], [_stopSelectedSpeakerTestDecs, 2, "stopSelectedSpeakerTest"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_imports.trace, 2, "getSelectedSpeakerVolume"], [_observeSystemSelectedSpeakerChangedDecs, 2, "observeSystemSelectedSpeakerChanged"], [_observeSystemSelectedMicrophoneChangedDecs, 2, "observeSystemSelectedMicrophoneChanged"], [_disableAGCDecs, 2, "disableAGC"], [_enableAGCDecs, 2, "enableAGC"]], []).e;
|
|
43
|
+
[_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"], [_stopSelectedSpeakerTestDecs, 2, "stopSelectedSpeakerTest"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_imports.trace, 2, "getSelectedSpeakerVolume"], [_imports.trace, 2, "getOutputVolume"], [_imports.trace, 2, "release"], [_observeSystemSelectedSpeakerChangedDecs, 2, "observeSystemSelectedSpeakerChanged"], [_observeSystemSelectedMicrophoneChangedDecs, 2, "observeSystemSelectedMicrophoneChanged"], [_disableAGCDecs, 2, "disableAGC"], [_enableAGCDecs, 2, "enableAGC"]], []).e;
|
|
43
44
|
}
|
|
44
45
|
[(_getCameraTrackDecs = [(0, _imports.trace)(['deviceId']), (0, _validateParams.default)(_schema.stringSchema)], _getMicrophoneTrackDecs = [(0, _imports.trace)(['deviceId']), (0, _validateParams.default)(_schema.stringSchema)], _getScreenTrackDecs = [(0, _imports.trace)(['sourceId']), (0, _validateParams.default)(_schema.stringSchema)], _getLoopbackTrackDecs = [(0, _imports.trace)(['sourceId']), (0, _validateParams.default)(_schema.stringSchema)], _setSelectedSpeakerDecs = [(0, _imports.trace)(['deviceId'], true), (0, _validateParams.default)(_schema.stringSchema)], _startSelectedSpeakerTestDecs = [(0, _imports.trace)(['url'], true), (0, _validateParams.default)(_schema.stringSchema)], _stopSelectedSpeakerTestDecs = (0, _imports.trace)(true), _isCapabilitySupportedDecs = [(0, _imports.trace)(['capability']), (0, _validateParams.default)(_schema.fcrCapabilitySchema)], _adjustOutputVolumeDecs = [(0, _imports.trace)(['volume'], true), (0, _validateParams.default)(_schema.numberSchema)], _setSelectedSpeakerVolumeDecs = [(0, _imports.trace)(['volume'], true), (0, _validateParams.default)(_schema.numberSchema)], _observeSystemSelectedSpeakerChangedDecs = (0, _imports.trace)(true), _observeSystemSelectedMicrophoneChangedDecs = (0, _imports.trace)(true), _disableAGCDecs = (0, _imports.trace)(true), _enableAGCDecs = (0, _imports.trace)(true), "logger")] = (_initProto(this), (0, _logger.createLogger)({
|
|
45
46
|
prefix: 'FcrDesktopMediaControlImpl'
|
|
@@ -158,12 +159,20 @@ class FcrDesktopMediaControlImpl {
|
|
|
158
159
|
getSelectedSpeakerVolume() {
|
|
159
160
|
return this._mediaControl.getSelectedSpeakerVolume();
|
|
160
161
|
}
|
|
162
|
+
getOutputVolume() {
|
|
163
|
+
return this._mediaControl.getOutputVolume();
|
|
164
|
+
}
|
|
161
165
|
addObserver(observer) {
|
|
162
166
|
this._observable.addObserver(observer);
|
|
163
167
|
}
|
|
164
168
|
removeObserver(observer) {
|
|
165
169
|
this._observable.removeObserver(observer);
|
|
166
170
|
}
|
|
171
|
+
release() {
|
|
172
|
+
this._mediaControl.release();
|
|
173
|
+
this._observable.removeAllObservers();
|
|
174
|
+
return _type.FcrReturnCode.SUCCESS;
|
|
175
|
+
}
|
|
167
176
|
observeSystemSelectedSpeakerChanged(follow) {
|
|
168
177
|
return this._mediaControl.observeSystemSelectedSpeakerChanged(follow);
|
|
169
178
|
}
|
|
@@ -33,19 +33,22 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
33
33
|
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); }
|
|
34
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; }
|
|
35
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; }
|
|
36
|
+
const DEFAULT_MOBILE_CAMERA_SOURCE_ID = 'default-mobile-camera-source-id';
|
|
37
|
+
const DEFAULT_MOBILE_MIC_SOURCE_ID = 'default-mobile-mic-source-id';
|
|
38
|
+
|
|
36
39
|
/**
|
|
37
40
|
* @internal
|
|
38
41
|
*/
|
|
39
42
|
class FcrMobileMediaControlImpl {
|
|
40
43
|
static {
|
|
41
|
-
[_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;
|
|
44
|
+
[_initProto] = _applyDecs(this, [[_getDeviceIdDecs, 2, "getDeviceId"], [_getDeviceStateDecs, 2, "getDeviceState"], [_imports.trace, 2, "startCameraTest"], [_imports.trace, 2, "stopCameraTest"], [_imports.trace, 2, "setCaptureParams"], [_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"], [_imports.trace, 2, "release"]], []).e;
|
|
42
45
|
}
|
|
43
46
|
[(_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)({
|
|
44
47
|
prefix: 'FcrMobileMediaControlImpl'
|
|
45
48
|
}));
|
|
46
49
|
_observable = new _imports.AgoraObservable();
|
|
47
|
-
_cameraDeviceName =
|
|
48
|
-
_microphoneDeviceName =
|
|
50
|
+
_cameraDeviceName = DEFAULT_MOBILE_CAMERA_SOURCE_ID;
|
|
51
|
+
_microphoneDeviceName = DEFAULT_MOBILE_MIC_SOURCE_ID;
|
|
49
52
|
_screenDeviceName = undefined;
|
|
50
53
|
_loopbackDeviceName = undefined;
|
|
51
54
|
constructor(mediaControl) {
|
|
@@ -112,6 +115,9 @@ class FcrMobileMediaControlImpl {
|
|
|
112
115
|
stopCameraTest() {
|
|
113
116
|
this._mediaControl.getCameraTrack(this._cameraDeviceName).startTest();
|
|
114
117
|
}
|
|
118
|
+
setCaptureParams(params) {
|
|
119
|
+
return this._mediaControl.getCameraTrack(this._cameraDeviceName).setCaptureParams(params);
|
|
120
|
+
}
|
|
115
121
|
startCameraPreview(view, config) {
|
|
116
122
|
this._mediaControl.getCameraTrack(this._cameraDeviceName).startPreview(config, view);
|
|
117
123
|
}
|
|
@@ -202,5 +208,9 @@ class FcrMobileMediaControlImpl {
|
|
|
202
208
|
removeObserver(observer) {
|
|
203
209
|
this._observable.removeObserver(observer);
|
|
204
210
|
}
|
|
211
|
+
release() {
|
|
212
|
+
this._observable.removeAllObservers();
|
|
213
|
+
return 0;
|
|
214
|
+
}
|
|
205
215
|
}
|
|
206
216
|
exports.FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
@@ -596,6 +596,11 @@ export interface FcrDesktopMediaControl {
|
|
|
596
596
|
* @returns The volume of the speaker. Range from 0 to 100.
|
|
597
597
|
*/
|
|
598
598
|
getSelectedSpeakerVolume(): number;
|
|
599
|
+
/**
|
|
600
|
+
* Get the output volume.
|
|
601
|
+
* @returns The output volume.
|
|
602
|
+
*/
|
|
603
|
+
getOutputVolume(): number;
|
|
599
604
|
/**
|
|
600
605
|
* Follow the system speaker.
|
|
601
606
|
* @param follow
|
|
@@ -635,6 +640,7 @@ export interface FcrMobileMediaControl {
|
|
|
635
640
|
getCameraPosition(): FcrCameraPosition;
|
|
636
641
|
startCameraTest(): void;
|
|
637
642
|
stopCameraTest(): void;
|
|
643
|
+
setCaptureParams(params: FcrCameraCaptureParams): number;
|
|
638
644
|
startCameraPreview(view: string | object, config: FcrRenderConfig): void;
|
|
639
645
|
stopCameraPreview(view: string | object): void;
|
|
640
646
|
stopCameraPreviewOnAllCanvas(): void;
|
|
@@ -660,6 +666,7 @@ export interface FcrMobileMediaControl {
|
|
|
660
666
|
* @param observer The observer to remove.
|
|
661
667
|
*/
|
|
662
668
|
removeObserver(observer: FcrMobileMediaObserver): void;
|
|
669
|
+
release(): void;
|
|
663
670
|
}
|
|
664
671
|
export declare enum FcrDeviceType {
|
|
665
672
|
Camera = "camera",
|
|
@@ -34,7 +34,7 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
34
34
|
*/
|
|
35
35
|
class FcrMonitorControlImpl {
|
|
36
36
|
static {
|
|
37
|
-
[_initProto] = _applyDecs(this, [[_uploadEventDecs, 2, "uploadEvent"], [_imports.trace, 2, "setNeedLogUpload"]], []).e;
|
|
37
|
+
[_initProto] = _applyDecs(this, [[_uploadEventDecs, 2, "uploadEvent"], [_imports.trace, 2, "setNeedLogUpload"], [_imports.trace, 2, "release"]], []).e;
|
|
38
38
|
}
|
|
39
39
|
[(_uploadEventDecs = (0, _imports.trace)(['event']), "_monitor")] = void _initProto(this);
|
|
40
40
|
_needLogUpload = true;
|
|
@@ -60,7 +60,10 @@ class FcrMonitorControlImpl {
|
|
|
60
60
|
this._monitor.addObserver(observer);
|
|
61
61
|
}
|
|
62
62
|
removeObserver(observer) {
|
|
63
|
-
this._monitor.
|
|
63
|
+
this._monitor.removeObserver(observer);
|
|
64
|
+
}
|
|
65
|
+
release() {
|
|
66
|
+
this._monitor.release();
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|