fcr-core 3.6.2 → 3.6.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 +23 -41
- package/lib/engine/index.js +66 -65
- package/lib/imports.js +1 -3
- package/lib/media-control/desktop.js +7 -15
- package/lib/media-control/mobile.js +11 -18
- package/lib/monitor-control/index.js +3 -10
- package/lib/peer-session/index.js +37 -50
- package/lib/plugins/chatroom.js +184 -203
- package/lib/room-control/ability-control/index.js +7 -14
- package/lib/room-control/ability-control/type.d.ts +2 -1
- package/lib/room-control/ability-control/type.js +1 -0
- package/lib/room-control/group-control/index.js +14 -23
- package/lib/room-control/index.js +57 -84
- package/lib/room-control/interpreter-control/index.js +17 -25
- package/lib/room-control/interpreter-control/room.js +4 -6
- package/lib/room-control/join-before-host-waitingroom-control/index.js +4 -6
- package/lib/room-control/mainroom-control/index.js +10 -20
- package/lib/room-control/privilege-control/helper.js +5 -10
- package/lib/room-control/privilege-control/index.js +17 -29
- package/lib/room-control/privilege-control/type.js +1 -0
- package/lib/room-control/room-connector-control/index.js +14 -25
- package/lib/room-control/room-session/index.js +37 -50
- package/lib/room-control/shared-cache.js +19 -26
- package/lib/room-control/sharing-control/index.js +22 -33
- package/lib/room-control/stream-control/index.js +164 -176
- package/lib/room-control/user-control/index.js +131 -146
- package/lib/room-control/waitingroom-control/index.js +8 -15
- package/lib/room-control/whiteboard-control/board-window.js +52 -60
- package/lib/room-control/whiteboard-control/enums.js +84 -0
- package/lib/room-control/whiteboard-control/index.js +26 -40
- package/lib/room-control/whiteboard-control/mount-manager.js +2 -4
- package/lib/room-control/whiteboard-control/utils.js +14 -17
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.d.ts +1 -1
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.js +20 -27
- package/lib/room-control/whiteboard-control-v2/index.d.ts +1 -1
- package/lib/room-control/whiteboard-control-v2/index.js +51 -55
- package/lib/room-control/whiteboard-control-v2/main-window.d.ts +2 -0
- package/lib/room-control/whiteboard-control-v2/main-window.js +32 -41
- package/lib/room-router/index.js +52 -70
- package/lib/schema.d.ts +15 -15
- package/lib/schema.js +0 -1
- package/lib/service/api.js +113 -117
- package/lib/type.js +4 -2
- package/lib/utilities/collection.js +2 -3
- package/lib/utilities/error.js +4 -6
- package/lib/utilities/logger.js +2 -3
- package/lib/utilities/parameters.js +4 -8
- package/lib/utilities/stream.js +12 -20
- package/lib/utilities/user.js +2 -3
- package/lib/utilities/validate-params.js +1 -2
- package/package.json +4 -4
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.d.ts +0 -38
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.js +0 -261
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
|
5
3
|
require("core-js/modules/es.array.push.js");
|
|
6
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
7
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
8
4
|
require("core-js/modules/esnext.function.metadata.js");
|
|
9
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
10
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
11
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
12
5
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
13
6
|
require("core-js/modules/esnext.map.emplace.js");
|
|
14
7
|
require("core-js/modules/esnext.map.every.js");
|
|
@@ -24,40 +17,33 @@ require("core-js/modules/esnext.map.reduce.js");
|
|
|
24
17
|
require("core-js/modules/esnext.map.some.js");
|
|
25
18
|
require("core-js/modules/esnext.map.update.js");
|
|
26
19
|
require("core-js/modules/esnext.symbol.metadata.js");
|
|
27
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
28
20
|
Object.defineProperty(exports, "__esModule", {
|
|
29
21
|
value: true
|
|
30
22
|
});
|
|
31
23
|
exports.FcrChatConnectionImpl = void 0;
|
|
32
|
-
require("core-js/modules/es.json.stringify.js");
|
|
33
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
34
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
35
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
36
24
|
var _imports = require("../imports");
|
|
37
25
|
var _type = require("./type");
|
|
38
26
|
var _config = require("./config");
|
|
39
27
|
var _logger = require("../utilities/logger");
|
|
40
|
-
var _FcrChatConnectionImpl;
|
|
41
28
|
let _initProto;
|
|
42
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
44
29
|
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)]; } }; }
|
|
45
30
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
46
31
|
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); }
|
|
47
32
|
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; }
|
|
48
33
|
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; }
|
|
49
34
|
class FcrChatConnectionImpl {
|
|
35
|
+
static #_ = (() => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "login"], [_imports.trace, 2, "logout"]], []).e)();
|
|
36
|
+
logger = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
37
|
+
prefix: 'FcrChatConnectionImpl'
|
|
38
|
+
})))();
|
|
39
|
+
_observable = (() => new _imports.AgoraObservable())();
|
|
40
|
+
_connectionState = (() => _type.FcrChatConnectionState.DISCONNECTED)();
|
|
41
|
+
_offlineListener = () => {
|
|
42
|
+
if (this._connectionState !== _type.FcrChatConnectionState.DISCONNECTED) {
|
|
43
|
+
this._setConnectionState(_type.FcrChatConnectionState.DISCONNECTED);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
50
46
|
constructor(_userId, _api, _chatIpList, _restIpList) {
|
|
51
|
-
(0, _defineProperty2.default)(this, "logger", (_initProto(this), (0, _logger.createLogger)({
|
|
52
|
-
prefix: 'FcrChatConnectionImpl'
|
|
53
|
-
})));
|
|
54
|
-
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
55
|
-
(0, _defineProperty2.default)(this, "_connectionState", _type.FcrChatConnectionState.DISCONNECTED);
|
|
56
|
-
(0, _defineProperty2.default)(this, "_offlineListener", () => {
|
|
57
|
-
if (this._connectionState !== _type.FcrChatConnectionState.DISCONNECTED) {
|
|
58
|
-
this._setConnectionState(_type.FcrChatConnectionState.DISCONNECTED);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
47
|
this._userId = _userId;
|
|
62
48
|
this._api = _api;
|
|
63
49
|
this._chatIpList = _chatIpList;
|
|
@@ -71,17 +57,19 @@ class FcrChatConnectionImpl {
|
|
|
71
57
|
await (0, _imports.to)((0, _imports.retryAttempt)(async () => {
|
|
72
58
|
const tokenResult = await this._api.getUserToken(this._userId);
|
|
73
59
|
this._initConfig = tokenResult;
|
|
74
|
-
const connParams =
|
|
60
|
+
const connParams = {
|
|
61
|
+
..._config.agoraChatConfig,
|
|
62
|
+
...privateConfig,
|
|
75
63
|
appKey: tokenResult.appKey,
|
|
76
64
|
autoReconnectNumMax: 99999
|
|
77
|
-
}
|
|
65
|
+
};
|
|
78
66
|
_imports.EasemobChatSDK.logger.setConsoleLogVisibility(false);
|
|
79
67
|
this._conn = new _imports.EasemobChatSDK.connection(connParams);
|
|
80
68
|
await this._conn.open({
|
|
81
69
|
accessToken: this._initConfig.token,
|
|
82
70
|
user: this._userId
|
|
83
71
|
});
|
|
84
|
-
this.logger.info(
|
|
72
|
+
this.logger.info(`onConnectionLoginSuccess, token: ${this._initConfig.token}, userId: ${this._userId}`);
|
|
85
73
|
this._observable.notifyObservers('onConnectionLoginSuccess');
|
|
86
74
|
this._addEventListeners();
|
|
87
75
|
}, [], {
|
|
@@ -95,15 +83,14 @@ class FcrChatConnectionImpl {
|
|
|
95
83
|
if (error instanceof _imports.AgoraRestfulClientError) {
|
|
96
84
|
throw error;
|
|
97
85
|
}
|
|
98
|
-
this.logger.error(
|
|
86
|
+
this.logger.error(`retry to login ChatConnection, ${error.message},retry ${currentRetry} times`);
|
|
99
87
|
await timeFn();
|
|
100
88
|
return true;
|
|
101
89
|
}).exec());
|
|
102
90
|
}
|
|
103
91
|
_addEventListeners() {
|
|
104
|
-
var _this$_conn;
|
|
105
92
|
window.addEventListener('offline', this._offlineListener);
|
|
106
|
-
|
|
93
|
+
this._conn?.addEventHandler('connection', {
|
|
107
94
|
onError: e => {
|
|
108
95
|
this.logger.error('onError', e.message);
|
|
109
96
|
},
|
|
@@ -120,9 +107,8 @@ class FcrChatConnectionImpl {
|
|
|
120
107
|
});
|
|
121
108
|
}
|
|
122
109
|
logout() {
|
|
123
|
-
var _this$_conn2;
|
|
124
110
|
window.removeEventListener('offline', this._offlineListener);
|
|
125
|
-
|
|
111
|
+
this._conn?.close();
|
|
126
112
|
}
|
|
127
113
|
_setConnectionState(state) {
|
|
128
114
|
this._connectionState = state;
|
|
@@ -141,22 +127,18 @@ class FcrChatConnectionImpl {
|
|
|
141
127
|
this._observable.removeObserver(observer);
|
|
142
128
|
}
|
|
143
129
|
_getPrivateConfig() {
|
|
144
|
-
|
|
145
|
-
if ((_this$_chatIpList = this._chatIpList) !== null && _this$_chatIpList !== void 0 && _this$_chatIpList.length || (_this$_restIpList = this._restIpList) !== null && _this$_restIpList !== void 0 && _this$_restIpList.length) {
|
|
146
|
-
var _this$_chatIpList2, _this$_restIpList2;
|
|
130
|
+
if (this._chatIpList?.length || this._restIpList?.length) {
|
|
147
131
|
const privateConfig = {
|
|
148
132
|
isHttpDNS: false
|
|
149
133
|
};
|
|
150
|
-
if (
|
|
134
|
+
if (this._chatIpList?.length) {
|
|
151
135
|
privateConfig.url = this._chatIpList[0];
|
|
152
136
|
}
|
|
153
|
-
if (
|
|
137
|
+
if (this._restIpList?.length) {
|
|
154
138
|
privateConfig.apiUrl = this._restIpList[0];
|
|
155
139
|
}
|
|
156
140
|
return privateConfig;
|
|
157
141
|
}
|
|
158
142
|
}
|
|
159
143
|
}
|
|
160
|
-
exports.FcrChatConnectionImpl = FcrChatConnectionImpl;
|
|
161
|
-
_FcrChatConnectionImpl = FcrChatConnectionImpl;
|
|
162
|
-
[_initProto] = _applyDecs(_FcrChatConnectionImpl, [[_imports.trace, 2, "login"], [_imports.trace, 2, "logout"]], []).e;
|
|
144
|
+
exports.FcrChatConnectionImpl = FcrChatConnectionImpl;
|
package/lib/engine/index.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
|
5
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
6
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
7
3
|
require("core-js/modules/esnext.function.metadata.js");
|
|
8
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
9
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
10
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
11
4
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
12
5
|
require("core-js/modules/esnext.map.emplace.js");
|
|
13
6
|
require("core-js/modules/esnext.map.every.js");
|
|
@@ -29,12 +22,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
29
22
|
});
|
|
30
23
|
exports.FcrCoreEngine = void 0;
|
|
31
24
|
require("core-js/modules/es.array.push.js");
|
|
32
|
-
require("core-js/modules/
|
|
33
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
34
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
25
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
35
26
|
require("core-js/modules/esnext.iterator.map.js");
|
|
36
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
37
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
38
27
|
var _imports = require("../imports");
|
|
39
28
|
var _api = require("../service/api");
|
|
40
29
|
var _monitorControl = require("../monitor-control");
|
|
@@ -61,30 +50,46 @@ var _schema = require("../schema");
|
|
|
61
50
|
var _error2 = require("agora-rte-sdk/lib/core/utilities/error");
|
|
62
51
|
var _roomRouter = require("../room-router");
|
|
63
52
|
var _sharedCache = require("../room-control/shared-cache");
|
|
64
|
-
|
|
65
|
-
let _initProto, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs, _ref;
|
|
66
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
67
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
53
|
+
let _initProto, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
|
|
68
54
|
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)]; } }; }
|
|
69
55
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
70
56
|
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); }
|
|
71
57
|
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; }
|
|
72
58
|
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; }
|
|
73
|
-
_ref = (_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");
|
|
74
59
|
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
|
+
// @internal
|
|
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
|
+
prefix: 'FcrCoreEngine'
|
|
64
|
+
})))();
|
|
65
|
+
// @internal
|
|
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
|
+
_isLoggingIn = false;
|
|
85
|
+
// @internal
|
|
86
|
+
_sharedCache = (() => new _sharedCache.FcrSharedCache())();
|
|
87
|
+
// @internal
|
|
88
|
+
_lock = (() => new _imports.Mutex())();
|
|
89
|
+
|
|
90
|
+
// @internal
|
|
91
|
+
_observable = (() => new _imports.AgoraObservable())();
|
|
75
92
|
constructor(config) {
|
|
76
|
-
// @internal
|
|
77
|
-
(0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
78
|
-
prefix: 'FcrCoreEngine'
|
|
79
|
-
})));
|
|
80
|
-
// @internal
|
|
81
|
-
(0, _defineProperty2.default)(this, "_isLoggingIn", false);
|
|
82
|
-
// @internal
|
|
83
|
-
(0, _defineProperty2.default)(this, "_sharedCache", new _sharedCache.FcrSharedCache());
|
|
84
|
-
// @internal
|
|
85
|
-
(0, _defineProperty2.default)(this, "_lock", new _imports.Mutex());
|
|
86
|
-
// @internal
|
|
87
|
-
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
88
93
|
this._config = config;
|
|
89
94
|
(0, _domainHolder.resetSharedDomainHolder)();
|
|
90
95
|
const parameters = this._presetParameters(config.parameters);
|
|
@@ -217,29 +222,26 @@ class FcrCoreEngine {
|
|
|
217
222
|
} = this._rteEngine.getConfig();
|
|
218
223
|
let roomControl = null;
|
|
219
224
|
let [error] = await (0, _imports.to)((0, _imports.retryAttempt)(async () => {
|
|
220
|
-
const res = await (0, _error.handleRequestError)(() => {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
password: options.password
|
|
241
|
-
});
|
|
242
|
-
}, _error.FcrErrorModuleCode.ENGINE);
|
|
225
|
+
const res = await (0, _error.handleRequestError)(() => this._apiService.checkIn({
|
|
226
|
+
userName: options.userName,
|
|
227
|
+
userId,
|
|
228
|
+
userRole: _type.FcrUserRoleToStringMap[options.userRole],
|
|
229
|
+
userProperties: options.userProperties,
|
|
230
|
+
roomId,
|
|
231
|
+
platform: (0, _imports.getPlatform)(),
|
|
232
|
+
streams: options.createStreamConfigs?.map(s => ({
|
|
233
|
+
videoSourceUuid: s.videoSourceId,
|
|
234
|
+
audioSourceUuid: s.audioSourceId,
|
|
235
|
+
streamName: s.streamName,
|
|
236
|
+
...(0, _helper.convertStreamTypeToPublishState)(s.streamType),
|
|
237
|
+
videoSourceType: s.videoSourceType,
|
|
238
|
+
audioSourceType: s.audioSourceType,
|
|
239
|
+
audioSourceState: s.audioSourceState,
|
|
240
|
+
videoSourceState: s.videoSourceState
|
|
241
|
+
})),
|
|
242
|
+
version: (0, _imports.getVersion)(),
|
|
243
|
+
password: options.password
|
|
244
|
+
}), _error.FcrErrorModuleCode.ENGINE);
|
|
243
245
|
const {
|
|
244
246
|
data,
|
|
245
247
|
ts
|
|
@@ -249,28 +251,29 @@ class FcrCoreEngine {
|
|
|
249
251
|
} else {
|
|
250
252
|
roomControl = this.createMainRoomControl(roomId);
|
|
251
253
|
}
|
|
252
|
-
await roomControl.join(
|
|
254
|
+
await roomControl.join({
|
|
255
|
+
...options,
|
|
253
256
|
snapshot: data,
|
|
254
257
|
timestamp: ts,
|
|
255
258
|
createStreamConfigs: data.room.roomProperties.roomType === _type2.FcrRoomType.Waitingroom ? [] : options.createStreamConfigs
|
|
256
|
-
})
|
|
259
|
+
});
|
|
257
260
|
}, [], {
|
|
258
261
|
retriesMax: 10
|
|
259
|
-
}).fail(async
|
|
262
|
+
}).fail(async _ref => {
|
|
260
263
|
let {
|
|
261
264
|
error,
|
|
262
265
|
timeFn,
|
|
263
266
|
currentRetry
|
|
264
|
-
} =
|
|
267
|
+
} = _ref;
|
|
265
268
|
if ((error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) && _error.RTE_ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
266
269
|
throw error;
|
|
267
270
|
}
|
|
268
|
-
this.logger.error(
|
|
271
|
+
this.logger.error(`retry to join room, ${error.message}, retry ${currentRetry} times`);
|
|
269
272
|
await timeFn();
|
|
270
273
|
return true;
|
|
271
274
|
}).exec());
|
|
272
275
|
if (error) {
|
|
273
|
-
this.logger.error(
|
|
276
|
+
this.logger.error(`join room failed, ${error.message}-${JSON.stringify(error)}`);
|
|
274
277
|
throw error;
|
|
275
278
|
}
|
|
276
279
|
return roomControl;
|
|
@@ -315,7 +318,7 @@ class FcrCoreEngine {
|
|
|
315
318
|
* @param receiverId
|
|
316
319
|
*/
|
|
317
320
|
async sendPeerMessage(payload, guaranteedDelivery, receiverId) {
|
|
318
|
-
await this._rteEngine.sendPeerMessage(payload,
|
|
321
|
+
await this._rteEngine.sendPeerMessage(payload, `${_cmd.CMD_PEER_MESSAGE}`, guaranteedDelivery, receiverId);
|
|
319
322
|
}
|
|
320
323
|
|
|
321
324
|
/**
|
|
@@ -374,7 +377,7 @@ class FcrCoreEngine {
|
|
|
374
377
|
_setupCoreIpList(parameters) {
|
|
375
378
|
const coreIpList = (0, _parameters.getCoreIpList)(parameters);
|
|
376
379
|
if (coreIpList) {
|
|
377
|
-
this.logger.info(
|
|
380
|
+
this.logger.info(`setup fixed service domain list: ${JSON.stringify(coreIpList)}`);
|
|
378
381
|
(0, _domainHolder.resetSharedDomainHolder)();
|
|
379
382
|
(0, _imports.getSharedDomainHolder)(this._config.region).setFixedDomainList(coreIpList);
|
|
380
383
|
this._restfulClient = new _agoraRteSdk.AgoraRestfulClientImpl(this._rteEngine.getHttpAuthHeadersProvider(), (0, _imports.getSharedDomainHolder)(this._config.region));
|
|
@@ -385,8 +388,8 @@ class FcrCoreEngine {
|
|
|
385
388
|
const chatIpList = (0, _parameters.getEasemobChatIpList)(parameters);
|
|
386
389
|
const restIpList = (0, _parameters.getEasemobRestIpList)(parameters);
|
|
387
390
|
if (chatIpList && restIpList) {
|
|
388
|
-
this.logger.info(
|
|
389
|
-
this._chatConnection = this._createChatConnection();
|
|
391
|
+
this.logger.info(`setup chat ip list: ${JSON.stringify(chatIpList)}, rest ip list: ${JSON.stringify(restIpList)}`);
|
|
392
|
+
this._chatConnection = this._createChatConnection(parameters);
|
|
390
393
|
}
|
|
391
394
|
}
|
|
392
395
|
_createChatConnection(parameters) {
|
|
@@ -419,6 +422,4 @@ class FcrCoreEngine {
|
|
|
419
422
|
return rtcPresetParameters;
|
|
420
423
|
}
|
|
421
424
|
}
|
|
422
|
-
exports.FcrCoreEngine = FcrCoreEngine;
|
|
423
|
-
_FcrCoreEngine = FcrCoreEngine;
|
|
424
|
-
[_initProto] = _applyDecs(_FcrCoreEngine, [[_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
|
+
exports.FcrCoreEngine = FcrCoreEngine;
|
package/lib/imports.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
4
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
5
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
6
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
7
6
|
Object.defineProperty(exports, "__esModule", {
|
|
8
7
|
value: true
|
|
@@ -474,5 +473,4 @@ var _type5 = require("agora-rte-sdk/lib/core/media/type");
|
|
|
474
473
|
var _plugin = require("agora-rte-sdk/lib/core/engine/plugin");
|
|
475
474
|
var _engine = require("./engine");
|
|
476
475
|
var _packageInfo = require("./utilities/package-info");
|
|
477
|
-
function
|
|
478
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
476
|
+
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); }
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
|
5
3
|
require("core-js/modules/es.array.push.js");
|
|
6
4
|
require("core-js/modules/esnext.function.metadata.js");
|
|
7
5
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
@@ -24,17 +22,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
24
22
|
value: true
|
|
25
23
|
});
|
|
26
24
|
exports.FcrDesktopMediaControlImpl = void 0;
|
|
27
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
28
25
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
29
26
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
30
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
31
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
32
27
|
var _imports = require("../imports");
|
|
33
28
|
var _schema = require("../schema");
|
|
34
29
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
35
30
|
var _logger = require("../utilities/logger");
|
|
36
|
-
|
|
37
|
-
let _initProto, _getCameraTrackDecs, _getMicrophoneTrackDecs, _getScreenTrackDecs, _getLoopbackTrackDecs, _setSelectedSpeakerDecs, _startSelectedSpeakerTestDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs, _setSelectedSpeakerVolumeDecs, _ref;
|
|
31
|
+
let _initProto, _getCameraTrackDecs, _getMicrophoneTrackDecs, _getScreenTrackDecs, _getLoopbackTrackDecs, _setSelectedSpeakerDecs, _startSelectedSpeakerTestDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs, _setSelectedSpeakerVolumeDecs;
|
|
38
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)]; } }; }
|
|
39
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
40
34
|
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); }
|
|
@@ -43,13 +37,13 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
43
37
|
/**
|
|
44
38
|
* @internal
|
|
45
39
|
*/
|
|
46
|
-
_ref = (_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");
|
|
47
40
|
class FcrDesktopMediaControlImpl {
|
|
41
|
+
static #_ = (() => [_initProto] = _applyDecs(this, [[_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, "checkLoopbackDevice"], [_imports.trace, 2, "followSystemSpeaker"], [_imports.trace, 2, "followSystemMicrophone"]], []).e)();
|
|
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)({
|
|
43
|
+
prefix: 'FcrDesktopMediaControlImpl'
|
|
44
|
+
})))();
|
|
45
|
+
_observable = (() => new _imports.AgoraObservable())();
|
|
48
46
|
constructor(mediaControl) {
|
|
49
|
-
(0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
50
|
-
prefix: 'FcrDesktopMediaControlImpl'
|
|
51
|
-
})));
|
|
52
|
-
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
53
47
|
this._mediaControl = mediaControl;
|
|
54
48
|
this._mediaControl.addObserver({
|
|
55
49
|
onAutoPlayFailed: () => {
|
|
@@ -157,6 +151,4 @@ class FcrDesktopMediaControlImpl {
|
|
|
157
151
|
return this._mediaControl.followSystemMicrophone(follow);
|
|
158
152
|
}
|
|
159
153
|
}
|
|
160
|
-
exports.FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
161
|
-
_FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
162
|
-
[_initProto] = _applyDecs(_FcrDesktopMediaControlImpl, [[_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, "checkLoopbackDevice"], [_imports.trace, 2, "followSystemSpeaker"], [_imports.trace, 2, "followSystemMicrophone"]], []).e;
|
|
154
|
+
exports.FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
3
|
require("core-js/modules/es.array.push.js");
|
|
5
4
|
require("core-js/modules/esnext.function.metadata.js");
|
|
6
5
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
@@ -23,17 +22,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
23
22
|
value: true
|
|
24
23
|
});
|
|
25
24
|
exports.FcrMobileMediaControlImpl = void 0;
|
|
26
|
-
require("core-js/modules/es.error.cause.js");
|
|
27
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
28
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
25
|
var _imports = require("../imports");
|
|
30
26
|
var _type = require("../type");
|
|
31
27
|
var _ = require("..");
|
|
32
28
|
var _schema = require("../schema");
|
|
33
29
|
var _validateParams = _interopRequireDefault(require("../utilities/validate-params"));
|
|
34
30
|
var _logger = require("../utilities/logger");
|
|
35
|
-
|
|
36
|
-
let _initProto, _getDeviceIdDecs, _getDeviceStateDecs, _startCameraPreviewDecs, _stopCameraPreviewDecs, _openDeviceDecs, _closeDeviceDecs, _getCameraTrackDecs, _getMicrophoneTrackDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs, _ref;
|
|
31
|
+
let _initProto, _getDeviceIdDecs, _getDeviceStateDecs, _startCameraPreviewDecs, _stopCameraPreviewDecs, _openDeviceDecs, _closeDeviceDecs, _getCameraTrackDecs, _getMicrophoneTrackDecs, _isCapabilitySupportedDecs, _adjustOutputVolumeDecs;
|
|
37
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)]; } }; }
|
|
38
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
39
34
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -42,17 +37,17 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
42
37
|
/**
|
|
43
38
|
* @internal
|
|
44
39
|
*/
|
|
45
|
-
_ref = (_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");
|
|
46
40
|
class FcrMobileMediaControlImpl {
|
|
41
|
+
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)();
|
|
42
|
+
[(_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)({
|
|
43
|
+
prefix: 'FcrMobileMediaControlImpl'
|
|
44
|
+
})))();
|
|
45
|
+
_observable = (() => new _imports.AgoraObservable())();
|
|
46
|
+
_cameraDeviceName = (() => undefined)();
|
|
47
|
+
_microphoneDeviceName = (() => undefined)();
|
|
48
|
+
_screenDeviceName = (() => undefined)();
|
|
49
|
+
_loopbackDeviceName = (() => undefined)();
|
|
47
50
|
constructor(mediaControl) {
|
|
48
|
-
(0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
49
|
-
prefix: 'FcrMobileMediaControlImpl'
|
|
50
|
-
})));
|
|
51
|
-
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
52
|
-
(0, _defineProperty2.default)(this, "_cameraDeviceName", undefined);
|
|
53
|
-
(0, _defineProperty2.default)(this, "_microphoneDeviceName", undefined);
|
|
54
|
-
(0, _defineProperty2.default)(this, "_screenDeviceName", undefined);
|
|
55
|
-
(0, _defineProperty2.default)(this, "_loopbackDeviceName", undefined);
|
|
56
51
|
this._mediaControl = mediaControl;
|
|
57
52
|
this._mediaControl.getCameraVideoTrack(this._cameraDeviceName).addObserver({
|
|
58
53
|
onCameraStateUpdated: (deviceId, state) => {
|
|
@@ -203,6 +198,4 @@ class FcrMobileMediaControlImpl {
|
|
|
203
198
|
this._observable.removeObserver(observer);
|
|
204
199
|
}
|
|
205
200
|
}
|
|
206
|
-
exports.FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
207
|
-
_FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
208
|
-
[_initProto] = _applyDecs(_FcrMobileMediaControlImpl, [[_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;
|
|
201
|
+
exports.FcrMobileMediaControlImpl = FcrMobileMediaControlImpl;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.description.js");
|
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
|
5
3
|
require("core-js/modules/es.array.push.js");
|
|
6
4
|
require("core-js/modules/esnext.function.metadata.js");
|
|
7
5
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
@@ -19,15 +17,11 @@ require("core-js/modules/esnext.map.reduce.js");
|
|
|
19
17
|
require("core-js/modules/esnext.map.some.js");
|
|
20
18
|
require("core-js/modules/esnext.map.update.js");
|
|
21
19
|
require("core-js/modules/esnext.symbol.metadata.js");
|
|
22
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
23
20
|
Object.defineProperty(exports, "__esModule", {
|
|
24
21
|
value: true
|
|
25
22
|
});
|
|
26
23
|
exports.FcrMonitorControlImpl = void 0;
|
|
27
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
28
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
24
|
var _imports = require("../imports");
|
|
30
|
-
var _FcrMonitorControlImpl;
|
|
31
25
|
let _initProto;
|
|
32
26
|
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
27
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
@@ -38,8 +32,9 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
38
32
|
* @internal
|
|
39
33
|
*/
|
|
40
34
|
class FcrMonitorControlImpl {
|
|
35
|
+
static #_ = (() => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "uploadEvent"]], []).e)();
|
|
36
|
+
_monitor = (() => void _initProto(this))();
|
|
41
37
|
constructor(engine, _config) {
|
|
42
|
-
(0, _defineProperty2.default)(this, "_monitor", void _initProto(this));
|
|
43
38
|
this._config = _config;
|
|
44
39
|
this._monitor = engine.getMonitor();
|
|
45
40
|
}
|
|
@@ -53,6 +48,4 @@ class FcrMonitorControlImpl {
|
|
|
53
48
|
this._monitor.addObserver(observer);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
|
-
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|
|
57
|
-
_FcrMonitorControlImpl = FcrMonitorControlImpl;
|
|
58
|
-
[_initProto] = _applyDecs(_FcrMonitorControlImpl, [[_imports.trace, 2, "uploadEvent"]], []).e;
|
|
51
|
+
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|