fcr-core 3.8.1 → 3.9.0-alpha
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-connector/type.d.ts +40 -0
- package/lib/{chat-connection → chat-connector}/type.js +1 -1
- package/lib/engine/index.d.ts +10 -11
- package/lib/engine/index.js +63 -72
- package/lib/engine/type.d.ts +96 -0
- package/lib/engine/type.js +5 -0
- package/lib/imports.d.ts +7 -4
- package/lib/imports.js +30 -4
- package/lib/index.d.ts +3 -2
- package/lib/index.js +21 -2
- package/lib/media-control/desktop.js +12 -12
- package/lib/media-control/mobile.js +4 -0
- package/lib/media-control/type.d.ts +32 -33
- package/lib/monitor-control/index.js +3 -3
- package/lib/peer-session/index.js +14 -14
- package/lib/peer-session/type.d.ts +1 -1
- package/lib/plugins/chat/chatroom.js +417 -0
- package/lib/{chat-connection → plugins/chat}/config.d.ts +1 -0
- package/lib/{room-control/chatroom-control → plugins/chat}/config.js +2 -1
- package/lib/plugins/chat/connector.d.ts +38 -0
- package/lib/{chat-connection/index.js → plugins/chat/connector.js} +181 -61
- package/lib/room-control/ability-control/index.js +5 -4
- package/lib/room-control/ability-control/type.d.ts +5 -1
- package/lib/room-control/ability-control/type.js +4 -0
- package/lib/room-control/chatroom-control/type.d.ts +44 -35
- package/lib/room-control/group-control/index.js +9 -9
- package/lib/room-control/index.js +37 -22
- package/lib/room-control/interpreter-control/index.js +7 -4
- package/lib/room-control/interpreter-control/room.js +3 -3
- package/lib/room-control/interpreter-control/types.d.ts +2 -2
- package/lib/room-control/join-before-host-waitingroom-control/index.js +3 -3
- package/lib/room-control/mainroom-control/index.js +15 -13
- package/lib/room-control/privilege-control/index.js +39 -24
- package/lib/room-control/privilege-control/type.d.ts +15 -15
- package/lib/room-control/room-connector-control/index.js +7 -5
- package/lib/room-control/room-connector-control/type.d.ts +1 -1
- package/lib/room-control/room-control-factory.d.ts +3 -3
- package/lib/room-control/room-control-factory.js +7 -7
- package/lib/room-control/room-session/index.js +17 -15
- package/lib/room-control/room-session/type.d.ts +3 -3
- package/lib/room-control/sharing-control/index.js +13 -7
- package/lib/room-control/stream-control/index.js +18 -16
- package/lib/room-control/stream-control/type.d.ts +5 -5
- package/lib/room-control/stt-control/index.js +38 -31
- package/lib/room-control/type.d.ts +19 -19
- package/lib/room-control/user-control/index.js +20 -22
- package/lib/room-control/user-control/type.d.ts +1 -1
- package/lib/room-control/waitingroom-control/index.js +11 -11
- package/lib/room-control/whiteboard-control-v1/board-window.d.ts +21 -20
- package/lib/room-control/whiteboard-control-v1/board-window.js +27 -8
- package/lib/room-control/whiteboard-control-v1/factory.js +1 -1
- package/lib/room-control/whiteboard-control-v1/index.js +26 -18
- package/lib/room-control/whiteboard-control-v1/type.d.ts +26 -25
- package/lib/room-control/whiteboard-control-v1/type.js +1 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +15 -6
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +39 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.d.ts +4 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +6 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +7 -1
- package/lib/room-control/whiteboard-control-v2/base/index.d.ts +9 -8
- package/lib/room-control/whiteboard-control-v2/base/index.js +84 -42
- package/lib/room-control/whiteboard-control-v2/base/main-window.d.ts +16 -15
- package/lib/room-control/whiteboard-control-v2/base/main-window.js +23 -4
- package/lib/room-control/whiteboard-control-v2/type.d.ts +17 -17
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +12 -6
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +64 -18
- 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 +10 -10
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +1 -1
- package/lib/room-router/index.js +10 -7
- package/lib/room-router/type.d.ts +1 -1
- package/lib/schema.d.ts +24 -46
- package/lib/schema.js +1 -2
- package/lib/service/api.d.ts +5 -3
- package/lib/service/api.js +17 -12
- package/lib/type.d.ts +64 -45
- package/lib/type.js +76 -11
- package/lib/utilities/abortable-retry.d.ts +38 -0
- package/lib/utilities/abortable-retry.js +61 -0
- package/lib/utilities/dual-video-stream-config.d.ts +6 -0
- package/lib/utilities/dual-video-stream-config.js +25 -0
- package/lib/utilities/error-helpers.d.ts +10 -9
- package/lib/utilities/error-helpers.js +12 -11
- package/lib/utilities/error.d.ts +4 -40
- package/lib/utilities/error.js +20 -77
- package/lib/utilities/join-helper.js +2 -2
- package/lib/utilities/logger.d.ts +2 -2
- package/lib/utilities/logger.js +6 -25
- package/lib/utilities/package-info.d.ts +1 -2
- package/lib/utilities/package-info.js +4 -8
- package/lib/utilities/parameters.js +88 -15
- package/lib/utilities/validate-params.js +1 -1
- package/lib/utilities/video-encoder-config.d.ts +9 -0
- package/lib/utilities/video-encoder-config.js +109 -0
- package/lib-es/base-session.js +1 -0
- package/lib-es/chat-connector/type.js +6 -0
- package/lib-es/engine/index.js +412 -0
- package/lib-es/engine/type.js +1 -0
- package/lib-es/imports.js +59 -0
- package/lib-es/index.js +8 -0
- package/lib-es/media-control/desktop.js +172 -0
- package/lib-es/media-control/mobile.js +198 -0
- package/lib-es/media-control/type.js +6 -0
- package/lib-es/monitor-control/index.js +46 -0
- package/lib-es/monitor-control/type.js +1 -0
- package/lib-es/peer-session/index.js +279 -0
- package/lib-es/peer-session/type.js +1 -0
- package/lib-es/plugins/chat/chatroom.js +409 -0
- package/{lib/chat-connection → lib-es/plugins/chat}/config.js +5 -9
- package/lib-es/plugins/chat/connector.js +269 -0
- package/lib-es/plugins/electron-rtc-plugin.js +1 -0
- package/lib-es/plugins/rtm-plugin.js +1 -0
- package/lib-es/plugins/web-rtc-plugin.js +1 -0
- package/lib-es/room-control/ability-control/index.js +58 -0
- package/lib-es/room-control/ability-control/type.js +15 -0
- package/lib-es/room-control/chatroom-control/type.js +12 -0
- package/lib-es/room-control/group-control/index.js +256 -0
- package/lib-es/room-control/helpers/constants.js +92 -0
- package/lib-es/room-control/helpers/index.js +20 -0
- package/lib-es/room-control/helpers/validation-helper.js +46 -0
- package/lib-es/room-control/index.js +623 -0
- package/lib-es/room-control/interpreter-control/index.js +172 -0
- package/lib-es/room-control/interpreter-control/room.js +28 -0
- package/lib-es/room-control/interpreter-control/types.js +26 -0
- package/lib-es/room-control/join-before-host-waitingroom-control/index.js +29 -0
- package/lib-es/room-control/mainroom-control/index.js +248 -0
- package/lib-es/room-control/privilege-control/helper.js +97 -0
- package/lib-es/room-control/privilege-control/index.js +339 -0
- package/lib-es/room-control/privilege-control/type.js +159 -0
- package/lib-es/room-control/room-connector-control/index.js +182 -0
- package/lib-es/room-control/room-connector-control/type.js +28 -0
- package/lib-es/room-control/room-control-factory.js +77 -0
- package/lib-es/room-control/room-session/index.js +292 -0
- package/lib-es/room-control/room-session/type.js +1 -0
- package/lib-es/room-control/shared-cache.js +47 -0
- package/lib-es/room-control/sharing-control/index.js +307 -0
- package/lib-es/room-control/sharing-control/type.js +16 -0
- package/lib-es/room-control/stream-control/index.js +536 -0
- package/lib-es/room-control/stream-control/type.js +1 -0
- package/lib-es/room-control/stt-control/de-compress-gzip.js +33 -0
- package/lib-es/room-control/stt-control/index.js +350 -0
- package/lib-es/room-control/stt-control/type.js +10 -0
- package/lib-es/room-control/type.js +30 -0
- package/lib-es/room-control/user-control/index.js +344 -0
- package/lib-es/room-control/user-control/type.js +21 -0
- package/lib-es/room-control/waitingroom-control/index.js +68 -0
- package/lib-es/room-control/whiteboard-control/enum.js +18 -0
- package/lib-es/room-control/whiteboard-control/type.js +10 -0
- package/lib-es/room-control/whiteboard-control/utils.js +13 -0
- package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +18 -0
- package/lib-es/room-control/whiteboard-control-v1/board-window.js +573 -0
- package/lib-es/room-control/whiteboard-control-v1/enum.js +157 -0
- package/lib-es/room-control/whiteboard-control-v1/factory.js +12 -0
- package/lib-es/room-control/whiteboard-control-v1/index.js +427 -0
- package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +6 -0
- package/lib-es/room-control/whiteboard-control-v1/type.js +8 -0
- package/lib-es/room-control/whiteboard-control-v1/utils.js +273 -0
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +76 -0
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +37 -0
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/type.js +1 -0
- package/lib-es/room-control/whiteboard-control-v2/base/index.js +347 -0
- package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +269 -0
- package/lib-es/room-control/whiteboard-control-v2/constant.js +9 -0
- package/lib-es/room-control/whiteboard-control-v2/enum.js +28 -0
- package/lib-es/room-control/whiteboard-control-v2/type.js +1 -0
- package/lib-es/room-control/whiteboard-control-v2/utils.js +92 -0
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +204 -0
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +61 -0
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/type.js +1 -0
- package/lib-es/room-router/index.js +263 -0
- package/lib-es/room-router/type.js +5 -0
- package/lib-es/schema.js +231 -0
- package/lib-es/service/api.js +1211 -0
- package/lib-es/service/type.js +1 -0
- package/lib-es/type.js +222 -0
- package/lib-es/utilities/abortable-retry.js +54 -0
- package/lib-es/utilities/cmd.js +1 -0
- package/lib-es/utilities/collection.js +64 -0
- package/lib-es/utilities/dual-video-stream-config.js +19 -0
- package/lib-es/utilities/error-helpers.js +224 -0
- package/lib-es/utilities/error.js +43 -0
- package/lib-es/utilities/join-helper.js +219 -0
- package/lib-es/utilities/logger.js +7 -0
- package/lib-es/utilities/package-info.js +5 -0
- package/lib-es/utilities/parameters.js +106 -0
- package/lib-es/utilities/retry-helpers.js +66 -0
- package/lib-es/utilities/shared-storage.js +31 -0
- package/lib-es/utilities/stream.js +18 -0
- package/lib-es/utilities/user.js +30 -0
- package/lib-es/utilities/validate-params.js +8 -0
- package/lib-es/utilities/video-encoder-config.js +103 -0
- package/package.json +11 -10
- package/lib/chat-connection/index.d.ts +0 -24
- package/lib/chat-connection/type.d.ts +0 -17
- package/lib/plugins/chatroom.js +0 -454
- package/lib/room-control/chatroom-control/config.d.ts +0 -51
- package/lib/utilities/storage.d.ts +0 -8
- package/lib/utilities/storage.js +0 -33
- /package/lib/plugins/{chatroom.d.ts → chat/chatroom.d.ts} +0 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import "core-js/modules/es.array.push.js";
|
|
2
|
+
import "core-js/modules/esnext.function.metadata.js";
|
|
3
|
+
import "core-js/modules/esnext.map.delete-all.js";
|
|
4
|
+
import "core-js/modules/esnext.map.emplace.js";
|
|
5
|
+
import "core-js/modules/esnext.map.every.js";
|
|
6
|
+
import "core-js/modules/esnext.map.filter.js";
|
|
7
|
+
import "core-js/modules/esnext.map.find.js";
|
|
8
|
+
import "core-js/modules/esnext.map.find-key.js";
|
|
9
|
+
import "core-js/modules/esnext.map.includes.js";
|
|
10
|
+
import "core-js/modules/esnext.map.key-of.js";
|
|
11
|
+
import "core-js/modules/esnext.map.map-keys.js";
|
|
12
|
+
import "core-js/modules/esnext.map.map-values.js";
|
|
13
|
+
import "core-js/modules/esnext.map.merge.js";
|
|
14
|
+
import "core-js/modules/esnext.map.reduce.js";
|
|
15
|
+
import "core-js/modules/esnext.map.some.js";
|
|
16
|
+
import "core-js/modules/esnext.map.update.js";
|
|
17
|
+
import "core-js/modules/esnext.symbol.metadata.js";
|
|
18
|
+
let _initProto, _renewUserTokenDecs, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
|
|
19
|
+
import "core-js/modules/es.json.stringify.js";
|
|
20
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
21
|
+
import "core-js/modules/esnext.iterator.map.js";
|
|
22
|
+
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)]; } }; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
26
|
+
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; }
|
|
27
|
+
import { trace } from 'agora-foundation/lib/decorator';
|
|
28
|
+
import { retryAttempt } from 'agora-foundation/lib/utilities/async-retry';
|
|
29
|
+
import { getPlatform } from 'agora-foundation/lib/utilities/env';
|
|
30
|
+
import { ErrorModuleCode } from 'agora-foundation/lib/utilities/error/error-code';
|
|
31
|
+
import { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
|
|
32
|
+
import { Mutex } from 'agora-foundation/lib/worker/mutex';
|
|
33
|
+
import { AgoraRestfulClientImpl, AgoraRteEngine, convertStreamTypeToPublishState } from 'agora-rte-sdk';
|
|
34
|
+
import { AgoraRtcRegion } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
35
|
+
import { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
|
|
36
|
+
import { getSharedDomainHolder, resetSharedDomainHolder } from 'agora-rte-sdk/lib/core/services/domain-holder';
|
|
37
|
+
import to from 'await-to-js';
|
|
38
|
+
import { FcrConnectionState } from '..';
|
|
39
|
+
import { FcrDesktopMediaControlImpl } from '../media-control/desktop';
|
|
40
|
+
import { FcrMobileMediaControlImpl } from '../media-control/mobile';
|
|
41
|
+
import { FcrMonitorControlImpl } from '../monitor-control';
|
|
42
|
+
import { FcrPeerSessionControlImpl } from '../peer-session';
|
|
43
|
+
import { FcrChatRoomControlImpl } from '../plugins/chat/chatroom';
|
|
44
|
+
import { FcrChatConnectorImpl } from '../plugins/chat/connector';
|
|
45
|
+
import { FcrMainRoomControlImpl } from '../room-control/mainroom-control';
|
|
46
|
+
import { FcrSharedCache } from '../room-control/shared-cache';
|
|
47
|
+
import { FcrRoomType } from '../room-control/type';
|
|
48
|
+
import { FcrWaitingRoomControlImpl } from '../room-control/waitingroom-control';
|
|
49
|
+
import { FcrRoomRouterImpl } from '../room-router';
|
|
50
|
+
import { booleanSchema, fcrRoomJoinOptionsSchema, stringKeyUnknownValueSchema, stringSchema } from '../schema';
|
|
51
|
+
import { FcrCoreServiceApi } from '../service/api';
|
|
52
|
+
import { FcrReturnCode, FcrUserRoleToStringMap } from '../type';
|
|
53
|
+
import { CMD_PEER_MESSAGE } from '../utilities/cmd';
|
|
54
|
+
import { ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM, FcrError, handleRequestError } from '../utilities/error';
|
|
55
|
+
import { createLogger, generateLogObserver } from '../utilities/logger';
|
|
56
|
+
import { getDependenciesInfo, getVersion } from '../utilities/package-info';
|
|
57
|
+
import { getCoreIpList, getEasemobChatIpList, getEasemobRestIpList, isEndpointRegionDisabled } from '../utilities/parameters';
|
|
58
|
+
import validateParams from '../utilities/validate-params';
|
|
59
|
+
export class FcrCoreEngineImpl {
|
|
60
|
+
static {
|
|
61
|
+
[_initProto] = _applyDecs(this, [[trace, 2, "release"], [trace, 2, "login"], [trace, 2, "logout"], [_renewUserTokenDecs, 2, "renewUserToken"], [trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [trace, 2, "getDesktopMediaControl"], [trace, 2, "getMobileMediaControl"], [trace, 2, "getMonitorControl"], [trace, 2, "getPeerSessionControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e;
|
|
62
|
+
}
|
|
63
|
+
// @internal
|
|
64
|
+
[(_renewUserTokenDecs = trace(['token'], true), _createMainRoomControlDecs = [trace(['roomId']), validateParams(stringSchema)], _createWaitingRoomControlDecs = [trace(['roomId']), validateParams(stringSchema)], _createRoomRouterDecs = [trace(['roomId']), validateParams(stringSchema)], _createRoomControlAndJoinDecs = [trace(['roomId', 'options']), validateParams(stringSchema, fcrRoomJoinOptionsSchema)], _sendPeerMessageDecs = [trace(['payload', 'guaranteedDelivery', 'receiverId'], true), validateParams(stringKeyUnknownValueSchema, booleanSchema, stringSchema)], _setParametersDecs = [trace(['parameters'], true), validateParams(stringKeyUnknownValueSchema)], "logger")] = (_initProto(this), createLogger({
|
|
65
|
+
prefix: 'FcrCoreEngine'
|
|
66
|
+
}));
|
|
67
|
+
// @internal
|
|
68
|
+
|
|
69
|
+
// @internal
|
|
70
|
+
|
|
71
|
+
// @internal
|
|
72
|
+
|
|
73
|
+
// @internal
|
|
74
|
+
|
|
75
|
+
// @internal
|
|
76
|
+
|
|
77
|
+
// @internal
|
|
78
|
+
|
|
79
|
+
// @internal
|
|
80
|
+
|
|
81
|
+
// @internal
|
|
82
|
+
|
|
83
|
+
// @internal
|
|
84
|
+
|
|
85
|
+
// @internal
|
|
86
|
+
_isLoggingIn = false;
|
|
87
|
+
// @internal
|
|
88
|
+
_sharedCache = new FcrSharedCache();
|
|
89
|
+
// @internal
|
|
90
|
+
_lock = new Mutex();
|
|
91
|
+
// @internal
|
|
92
|
+
_observable = new AgoraObservable();
|
|
93
|
+
constructor(config) {
|
|
94
|
+
this._config = config;
|
|
95
|
+
resetSharedDomainHolder();
|
|
96
|
+
this.logger.info('Fcr core engine is created, version: ', this.getVersion());
|
|
97
|
+
this._rteEngine = new AgoraRteEngine({
|
|
98
|
+
appId: config.appId,
|
|
99
|
+
userId: config.userId,
|
|
100
|
+
userToken: config.token,
|
|
101
|
+
rteRegion: config.region,
|
|
102
|
+
rtcRegion: AgoraRtcRegion.AREA_GLOBAL,
|
|
103
|
+
rtmRegion: AgoraRtmRegion.AREA_GLOBAL,
|
|
104
|
+
audioConfig: {
|
|
105
|
+
profile: 'default',
|
|
106
|
+
scenario: 'meeting'
|
|
107
|
+
},
|
|
108
|
+
dualCameraVideoStreamConfig: config.dualCameraVideoStreamConfig,
|
|
109
|
+
dualScreenVideoStreamConfig: config.dualScreenVideoStreamConfig,
|
|
110
|
+
parameters: config.parameters
|
|
111
|
+
});
|
|
112
|
+
const domainHolder = getSharedDomainHolder(config.region);
|
|
113
|
+
this._restfulClient = new AgoraRestfulClientImpl(this._rteEngine.getHttpAuthHeadersProvider(), domainHolder, this._rteEngine.getRequestScheduler());
|
|
114
|
+
this._apiService = new FcrCoreServiceApi(this._restfulClient, config.appId, config.region, !isEndpointRegionDisabled(config.parameters));
|
|
115
|
+
|
|
116
|
+
// cannot be lazy loaded, because all the observers should be added before the engine is started
|
|
117
|
+
this._peerSessionControl = new FcrPeerSessionControlImpl(this._rteEngine, this._apiService, this._config.userId);
|
|
118
|
+
this._chatConnection = this._createChatConnection(config.parameters);
|
|
119
|
+
this._monitorControl = new FcrMonitorControlImpl(this._rteEngine, this._config);
|
|
120
|
+
this._desktopMediaControl = new FcrDesktopMediaControlImpl(this._rteEngine.getMediaControl());
|
|
121
|
+
this._mobileMediaControl = new FcrMobileMediaControlImpl(this._rteEngine.getMediaControl());
|
|
122
|
+
this._addLogObserver();
|
|
123
|
+
this._addRteEngineObserver();
|
|
124
|
+
this._setupCoreIpList(config.parameters);
|
|
125
|
+
this._setupChatConnection(config.parameters);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Releases the engine and all its resources.
|
|
130
|
+
*/
|
|
131
|
+
release() {
|
|
132
|
+
this._rteEngine.release();
|
|
133
|
+
return FcrReturnCode.SUCCESS;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Logins to the RTE service.
|
|
138
|
+
*/
|
|
139
|
+
async login() {
|
|
140
|
+
await this._lock.dispatch(async () => {
|
|
141
|
+
if (this._isLoggingIn) {
|
|
142
|
+
return FcrReturnCode.UNDEFINED;
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
this._isLoggingIn = true;
|
|
146
|
+
this._chatConnection.login();
|
|
147
|
+
return await this._rteEngine.login();
|
|
148
|
+
} finally {
|
|
149
|
+
this._isLoggingIn = false;
|
|
150
|
+
this._rteEngine.getMonitor().uploadLog({
|
|
151
|
+
userUuid: this._config.userId
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Logouts from the RTE service.
|
|
159
|
+
*/
|
|
160
|
+
async logout() {
|
|
161
|
+
await this._lock.dispatch(async () => {
|
|
162
|
+
this._isLoggingIn = false;
|
|
163
|
+
this._chatConnection.logout();
|
|
164
|
+
return await this._rteEngine.logout();
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Renews the user token.
|
|
169
|
+
* @param token
|
|
170
|
+
*/
|
|
171
|
+
renewUserToken(token) {
|
|
172
|
+
return this._rteEngine.renewUserToken(token);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Gets the version of the SDK.
|
|
177
|
+
* @returns The version of the SDK.
|
|
178
|
+
*/
|
|
179
|
+
getVersion() {
|
|
180
|
+
return getVersion();
|
|
181
|
+
}
|
|
182
|
+
getDependencyVersions() {
|
|
183
|
+
return {
|
|
184
|
+
...this._rteEngine.getDependencyVersions(),
|
|
185
|
+
rte: this._rteEngine.getVersion(),
|
|
186
|
+
whiteboard: getDependenciesInfo('@netless/forge-whiteboard'),
|
|
187
|
+
easemob: getDependenciesInfo('easemob-websdk')
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Creates a room control.
|
|
193
|
+
* @param roomId
|
|
194
|
+
* @returns The room control.
|
|
195
|
+
*/
|
|
196
|
+
createMainRoomControl(roomId) {
|
|
197
|
+
const scene = this._rteEngine.createScene({
|
|
198
|
+
sceneId: roomId
|
|
199
|
+
});
|
|
200
|
+
return new FcrMainRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache, false));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Creates a waiting room control.
|
|
205
|
+
* @param roomId
|
|
206
|
+
* @returns The room control.
|
|
207
|
+
*/
|
|
208
|
+
createWaitingRoomControl(roomId) {
|
|
209
|
+
const scene = this._rteEngine.createScene({
|
|
210
|
+
sceneId: roomId
|
|
211
|
+
});
|
|
212
|
+
return new FcrWaitingRoomControlImpl(this._rteEngine, scene, this._apiService, this._config, this._sharedCache, this._chatConnection, new FcrChatRoomControlImpl(scene, this._chatConnection, this._sharedCache, false));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Creates room router.
|
|
217
|
+
* @param roomId
|
|
218
|
+
* @returns The room router.
|
|
219
|
+
*/
|
|
220
|
+
createRoomRouter(roomId) {
|
|
221
|
+
const roomRouter = new FcrRoomRouterImpl(this._rteEngine, this._apiService, this._config, this._chatConnection, this._sharedCache, roomId);
|
|
222
|
+
return roomRouter;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Creates a main room control or a waiting room control.
|
|
227
|
+
* @param roomId
|
|
228
|
+
* @returns The room control.
|
|
229
|
+
*/
|
|
230
|
+
async createRoomControlAndJoin(roomId, options) {
|
|
231
|
+
const {
|
|
232
|
+
userId
|
|
233
|
+
} = this._rteEngine.getConfig();
|
|
234
|
+
let roomControl = null;
|
|
235
|
+
let [error] = await to(retryAttempt(async () => {
|
|
236
|
+
const res = await handleRequestError(() => this._apiService.checkIn({
|
|
237
|
+
userName: options.userName,
|
|
238
|
+
userId,
|
|
239
|
+
userRole: FcrUserRoleToStringMap[options.userRole],
|
|
240
|
+
userProperties: options.userProperties,
|
|
241
|
+
roomId,
|
|
242
|
+
platform: getPlatform(),
|
|
243
|
+
streams: options.createStreamConfigs?.map(s => ({
|
|
244
|
+
videoSourceUuid: s.videoSourceId,
|
|
245
|
+
audioSourceUuid: s.audioSourceId,
|
|
246
|
+
streamName: s.streamName,
|
|
247
|
+
...convertStreamTypeToPublishState(s.streamType),
|
|
248
|
+
videoSourceType: s.videoSourceType,
|
|
249
|
+
audioSourceType: s.audioSourceType,
|
|
250
|
+
audioSourceState: s.audioSourceState,
|
|
251
|
+
videoSourceState: s.videoSourceState
|
|
252
|
+
})),
|
|
253
|
+
version: getVersion(),
|
|
254
|
+
password: options.password,
|
|
255
|
+
avatar: options.avatar
|
|
256
|
+
}), ErrorModuleCode.FCR_ENGINE);
|
|
257
|
+
const {
|
|
258
|
+
data,
|
|
259
|
+
ts
|
|
260
|
+
} = res;
|
|
261
|
+
if (data.room.roomProperties.roomType === FcrRoomType.Waitingroom) {
|
|
262
|
+
roomControl = this.createWaitingRoomControl(data.room.roomInfo.roomUuid);
|
|
263
|
+
} else {
|
|
264
|
+
roomControl = this.createMainRoomControl(roomId);
|
|
265
|
+
}
|
|
266
|
+
await roomControl.join({
|
|
267
|
+
...options,
|
|
268
|
+
snapshot: data,
|
|
269
|
+
timestamp: ts,
|
|
270
|
+
createStreamConfigs: data.room.roomProperties.roomType === FcrRoomType.Waitingroom ? [] : options.createStreamConfigs
|
|
271
|
+
});
|
|
272
|
+
}, [], {
|
|
273
|
+
retriesMax: 10
|
|
274
|
+
}).fail(async ({
|
|
275
|
+
error,
|
|
276
|
+
timeFn,
|
|
277
|
+
currentRetry
|
|
278
|
+
}) => {
|
|
279
|
+
if (error instanceof FcrError && ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
282
|
+
this.logger.error(`retry to join room, ${error.message}, retry ${currentRetry} times`);
|
|
283
|
+
await timeFn();
|
|
284
|
+
return true;
|
|
285
|
+
}).exec());
|
|
286
|
+
if (error) {
|
|
287
|
+
this.logger.error(`join room failed, ${error.message}-${JSON.stringify(error)}`);
|
|
288
|
+
throw error;
|
|
289
|
+
}
|
|
290
|
+
return roomControl;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Gets the media control.
|
|
295
|
+
* @returns The media control.
|
|
296
|
+
*/
|
|
297
|
+
getDesktopMediaControl() {
|
|
298
|
+
return this._desktopMediaControl;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Gets the mobile media control.
|
|
303
|
+
* @returns The mobile media control.
|
|
304
|
+
*/
|
|
305
|
+
getMobileMediaControl() {
|
|
306
|
+
return this._mobileMediaControl;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Gets the monitor control.
|
|
311
|
+
* @returns The monitor control.
|
|
312
|
+
*/
|
|
313
|
+
getMonitorControl() {
|
|
314
|
+
return this._monitorControl;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Gets the peer session control.
|
|
319
|
+
* @returns The peer session control.
|
|
320
|
+
*/
|
|
321
|
+
getPeerSessionControl() {
|
|
322
|
+
return this._peerSessionControl;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Sends a peer message.
|
|
327
|
+
* @param payload
|
|
328
|
+
* @param guaranteedDelivery
|
|
329
|
+
* @param receiverId
|
|
330
|
+
*/
|
|
331
|
+
async sendPeerMessage(payload, guaranteedDelivery, receiverId) {
|
|
332
|
+
return await this._rteEngine.sendPeerMessage(payload, `${CMD_PEER_MESSAGE}`, guaranteedDelivery, receiverId);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Sets the parameters.
|
|
337
|
+
* @param parameters
|
|
338
|
+
*/
|
|
339
|
+
setParameters(parameters) {
|
|
340
|
+
try {
|
|
341
|
+
this._setupCoreIpList(parameters);
|
|
342
|
+
this._setupChatConnection(parameters);
|
|
343
|
+
const {
|
|
344
|
+
rte,
|
|
345
|
+
rtc,
|
|
346
|
+
rtm
|
|
347
|
+
} = parameters;
|
|
348
|
+
return this._rteEngine.setParameters({
|
|
349
|
+
rtc,
|
|
350
|
+
rtm,
|
|
351
|
+
rte
|
|
352
|
+
});
|
|
353
|
+
} catch (e) {
|
|
354
|
+
this.logger.warn('setParameters failed', e);
|
|
355
|
+
return FcrReturnCode.UNDEFINED;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Adds an observer.
|
|
361
|
+
* @param observer
|
|
362
|
+
*/
|
|
363
|
+
addObserver(observer) {
|
|
364
|
+
this._rteEngine.addObserver(observer);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Removes an observer.
|
|
369
|
+
* @param observer
|
|
370
|
+
*/
|
|
371
|
+
removeObserver(observer) {
|
|
372
|
+
this._rteEngine.removeObserver(observer);
|
|
373
|
+
}
|
|
374
|
+
_addRteEngineObserver() {
|
|
375
|
+
this._rteEngine.addObserver({
|
|
376
|
+
onConnectionStateUpdated: state => {
|
|
377
|
+
if (state === FcrConnectionState.ABORTED) {
|
|
378
|
+
this.logout();
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
onUserTokenWillExpire: () => {
|
|
382
|
+
this._observable.notifyObservers('onUserTokenWillExpire');
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
_addLogObserver() {
|
|
387
|
+
this.addObserver(generateLogObserver(this.logger, [['onConnectionStateUpdated', ['state']], ['onPeerMessageReceived', ['message']], 'onUserTokenWillExpire']));
|
|
388
|
+
}
|
|
389
|
+
_setupCoreIpList(parameters) {
|
|
390
|
+
const coreIpList = getCoreIpList(parameters);
|
|
391
|
+
if (coreIpList) {
|
|
392
|
+
this.logger.info(`setup fixed service domain list: ${JSON.stringify(coreIpList)}`);
|
|
393
|
+
resetSharedDomainHolder();
|
|
394
|
+
getSharedDomainHolder(this._config.region).setFixedDomainList(coreIpList);
|
|
395
|
+
this._restfulClient = new AgoraRestfulClientImpl(this._rteEngine.getHttpAuthHeadersProvider(), getSharedDomainHolder(this._config.region), this._rteEngine.getRequestScheduler());
|
|
396
|
+
this._apiService.setRestfulClient(this._restfulClient);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
_setupChatConnection(parameters) {
|
|
400
|
+
const chatIpList = getEasemobChatIpList(parameters);
|
|
401
|
+
const restIpList = getEasemobRestIpList(parameters);
|
|
402
|
+
if (chatIpList && restIpList) {
|
|
403
|
+
this.logger.info(`setup chat ip list: ${JSON.stringify(chatIpList)}, rest ip list: ${JSON.stringify(restIpList)}`);
|
|
404
|
+
this._chatConnection = this._createChatConnection(parameters);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
_createChatConnection(parameters) {
|
|
408
|
+
const chatIpList = getEasemobChatIpList(parameters);
|
|
409
|
+
const restIpList = getEasemobRestIpList(parameters);
|
|
410
|
+
return new FcrChatConnectorImpl(this._config.userId, this._apiService, chatIpList, restIpList);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Other utility exports
|
|
2
|
+
export { md5 } from 'js-md5';
|
|
3
|
+
import to from 'await-to-js';
|
|
4
|
+
import get from 'lodash/get';
|
|
5
|
+
import padStart from 'lodash/padStart';
|
|
6
|
+
import padEnd from 'lodash/padEnd';
|
|
7
|
+
import toLower from 'lodash/toLower';
|
|
8
|
+
import { default as EasemobChatSDK } from 'easemob-websdk';
|
|
9
|
+
export { to, get, padStart, padEnd, toLower, EasemobChatSDK };
|
|
10
|
+
|
|
11
|
+
// Third-party exports
|
|
12
|
+
export { EasemobChat } from 'easemob-websdk';
|
|
13
|
+
export { RTMProvider_2_2 as FcrRTMProvider_2_2 } from '@netless/forge-rtm';
|
|
14
|
+
export { Room as FcrRoom } from '@netless/forge-room';
|
|
15
|
+
export { WhiteboardApplication as FcrWhiteboardApplication } from '@netless/forge-whiteboard';
|
|
16
|
+
export { WhiteboardPermissionFlag as FcrWhiteboardPermissionFlag } from '@netless/forge-whiteboard';
|
|
17
|
+
// Agora Foundation exports
|
|
18
|
+
export { getLogger, createLogger } from 'agora-foundation/lib/logger';
|
|
19
|
+
export { serializeArgs } from 'agora-foundation/lib/decorator/log/log-serializer';
|
|
20
|
+
export { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
|
|
21
|
+
export { retryAttempt } from 'agora-foundation/lib/utilities/async-retry';
|
|
22
|
+
export { getPlatform, FcrApplicationPlatform } from 'agora-foundation/lib/utilities/env';
|
|
23
|
+
export { Duration } from 'agora-foundation/lib/schedule/scheduler';
|
|
24
|
+
export { trace, bound } from 'agora-foundation/lib/decorator';
|
|
25
|
+
export { AgoraScheduler, ActionWhenTaskFail } from 'agora-foundation/lib/schedule';
|
|
26
|
+
export { sleep, jsonstring, randomString } from 'agora-foundation/lib/utilities/misc';
|
|
27
|
+
export { z, ZodError, anySchema, booleanSchema, numberSchema,
|
|
28
|
+
// stringArraySchema,
|
|
29
|
+
stringSchema, fcrRenderViewSchema,
|
|
30
|
+
// stringOrObjectSchema,
|
|
31
|
+
// unknownArraySchema,
|
|
32
|
+
unknownSchema, objectSchema, createRecordSchemaWithKey, createUnionSchema, createArraySchema } from 'agora-foundation/lib/utilities/schema';
|
|
33
|
+
export { validateParams } from 'agora-foundation/lib/decorator/validate';
|
|
34
|
+
export { Mutex } from 'agora-foundation/lib/worker/mutex';
|
|
35
|
+
|
|
36
|
+
// Agora RTE exports
|
|
37
|
+
|
|
38
|
+
export { AgoraRteError } from 'agora-rte-sdk/lib/core/utilities/error';
|
|
39
|
+
export { AgoraError as FcrError } from 'agora-foundation/lib/utilities/error/agora-error';
|
|
40
|
+
export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishState, AgoraRteLatencyLevel } from 'agora-rte-sdk';
|
|
41
|
+
export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType } from 'agora-rte-sdk/lib/core/scene/type';
|
|
42
|
+
export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
43
|
+
export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
|
|
44
|
+
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState } from 'agora-rte-sdk/lib/type';
|
|
45
|
+
export { AgoraRestfulClientError } from 'agora-rte-sdk/lib/core/services/client';
|
|
46
|
+
export { getSharedDomainHolder } from 'agora-rte-sdk/lib/core/services/domain-holder';
|
|
47
|
+
export { AgoraRteScreenCaptureType, AgoraRteVideoOrientation } from 'agora-rte-sdk/lib/core/media/type';
|
|
48
|
+
export { registerPlugin } from 'agora-rte-sdk/lib/core/engine/plugin';
|
|
49
|
+
export { AgoraRteUserUpdatedReason } from 'agora-rte-sdk/lib/core/scene/type';
|
|
50
|
+
export { LoggerManager } from 'agora-foundation/lib/utilities/logger';
|
|
51
|
+
export { FcrWhiteboardControlFactoryImpl } from './room-control/whiteboard-control-v2/whiteboard-control/factory';
|
|
52
|
+
export { FcrAnnotationControlFactoryImpl } from './room-control/whiteboard-control-v2/annotation-control/factory';
|
|
53
|
+
export { deCompressGzipToJson } from './room-control/stt-control/de-compress-gzip';
|
|
54
|
+
export { getVersion } from './utilities/package-info';
|
|
55
|
+
export const localStorage = window.localStorage;
|
|
56
|
+
export { v4 } from 'uuid';
|
|
57
|
+
export { default as merge } from 'lodash/merge';
|
|
58
|
+
export { DetailErrorCode, ErrorModuleCode, ErrorServiceType } from 'agora-foundation/lib/utilities/error/error-code';
|
|
59
|
+
export { FcrChatRoomControlImpl } from './plugins/chat/chatroom';
|
package/lib-es/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// types
|
|
2
|
+
|
|
3
|
+
//enums
|
|
4
|
+
export { FcrStreamLatencyLevel, FcrPermissionAction, FcrPrivilegeUserRole, FcrUserRole, FcrStreamState, FcrRegion, FcrStreamType, FcrUserUpdatedReason, FcrRoomConnectorType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState, FcrVideoRenderMode, FcrVideoStreamType, FcrCapability, FcrAiDenoiseLevel, FcrStreamPrivilegeOperation, FcrStreamPrivilegeVideoSourceType, FcrStreamPrivilegeAudioSourceType, FcrConnectionState, registerPlugin, FcrBoardToolType, FcrBoardShape, FcrCoreEngineConfig, FcrVideoEncoderConfig, FcrDualVideoStreamConfig } from './type';
|
|
5
|
+
export { FcrCoreEngineImpl as FcrCoreEngine } from './engine';
|
|
6
|
+
|
|
7
|
+
// classes
|
|
8
|
+
export { FcrError } from './type';
|