fcr-core 3.7.3 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/engine/index.d.ts +1 -1
- package/lib/engine/index.js +13 -11
- package/lib/imports.d.ts +2 -1
- package/lib/imports.js +13 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -0
- package/lib/media-control/desktop.js +7 -7
- package/lib/media-control/mobile.js +2 -2
- package/lib/media-control/type.d.ts +10 -14
- package/lib/room-control/index.js +1 -1
- package/lib/room-control/stream-control/index.js +1 -5
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +1 -0
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.js +2 -2
- package/lib/room-router/index.js +5 -3
- package/lib/schema.d.ts +24 -2
- package/lib/schema.js +2 -1
- package/lib/service/api.js +6 -6
- package/lib/type.d.ts +2 -2
- package/lib/type.js +19 -0
- package/lib/utilities/constant.d.ts +1 -0
- package/lib/utilities/constant.js +7 -0
- package/lib/utilities/error.d.ts +7 -12
- package/lib/utilities/error.js +51 -23
- package/lib/utilities/parameters.d.ts +1 -0
- package/lib/utilities/parameters.js +21 -2
- package/package.json +8 -8
package/lib/engine/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class FcrCoreEngine {
|
|
|
28
28
|
* @returns The version of the SDK.
|
|
29
29
|
*/
|
|
30
30
|
getVersion(): string;
|
|
31
|
+
getDependencyVersions(): Record<string, string>;
|
|
31
32
|
/**
|
|
32
33
|
* Creates a room control.
|
|
33
34
|
* @param roomId
|
|
@@ -101,5 +102,4 @@ export declare class FcrCoreEngine {
|
|
|
101
102
|
private _createChatConnection;
|
|
102
103
|
private _presetParameters;
|
|
103
104
|
private _mergeRtcPresetParameters;
|
|
104
|
-
private _getRtcPresetParameters;
|
|
105
105
|
}
|
package/lib/engine/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var _schema = require("../schema");
|
|
|
49
49
|
var _error2 = require("agora-rte-sdk/lib/core/utilities/error");
|
|
50
50
|
var _roomRouter = require("../room-router");
|
|
51
51
|
var _sharedCache = require("../room-control/shared-cache");
|
|
52
|
+
var _packageInfo = require("../utilities/package-info");
|
|
52
53
|
var _staticBlock;
|
|
53
54
|
let _initProto, _createMainRoomControlDecs, _createWaitingRoomControlDecs, _createRoomRouterDecs, _createRoomControlAndJoinDecs, _sendPeerMessageDecs, _setParametersDecs;
|
|
54
55
|
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
@@ -175,6 +176,14 @@ class FcrCoreEngine {
|
|
|
175
176
|
getVersion() {
|
|
176
177
|
return (0, _imports.getVersion)();
|
|
177
178
|
}
|
|
179
|
+
getDependencyVersions() {
|
|
180
|
+
return {
|
|
181
|
+
...this._rteEngine.getDependencyVersions(),
|
|
182
|
+
rte: this._rteEngine.getVersion(),
|
|
183
|
+
whiteboard: (0, _packageInfo.getDependenciesInfo)('@netless/forge-whiteboard'),
|
|
184
|
+
easemob: (0, _packageInfo.getDependenciesInfo)('easemob-websdk')
|
|
185
|
+
};
|
|
186
|
+
}
|
|
178
187
|
|
|
179
188
|
/**
|
|
180
189
|
* Creates a room control.
|
|
@@ -265,7 +274,7 @@ class FcrCoreEngine {
|
|
|
265
274
|
timeFn,
|
|
266
275
|
currentRetry
|
|
267
276
|
} = _ref;
|
|
268
|
-
if ((error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) && _error.
|
|
277
|
+
if ((error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) && _error.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
269
278
|
throw error;
|
|
270
279
|
}
|
|
271
280
|
this.logger.error(`retry to join room, ${error.message}, retry ${currentRetry} times`);
|
|
@@ -400,27 +409,20 @@ class FcrCoreEngine {
|
|
|
400
409
|
_presetParameters(parameters) {
|
|
401
410
|
if (!parameters) {
|
|
402
411
|
parameters = {
|
|
403
|
-
rtc:
|
|
412
|
+
rtc: (0, _parameters.getRtcPresetParameters)()
|
|
404
413
|
};
|
|
405
414
|
} else if (!parameters.rtc) {
|
|
406
|
-
parameters.rtc =
|
|
415
|
+
parameters.rtc = (0, _parameters.getRtcPresetParameters)();
|
|
407
416
|
} else {
|
|
408
417
|
parameters.rtc = this._mergeRtcPresetParameters(parameters.rtc);
|
|
409
418
|
}
|
|
410
419
|
return parameters;
|
|
411
420
|
}
|
|
412
421
|
_mergeRtcPresetParameters(parametersList) {
|
|
413
|
-
const rtcPresetParameters =
|
|
422
|
+
const rtcPresetParameters = (0, _parameters.getRtcPresetParameters)();
|
|
414
423
|
parametersList.push(...rtcPresetParameters);
|
|
415
424
|
return parametersList;
|
|
416
425
|
}
|
|
417
|
-
_getRtcPresetParameters() {
|
|
418
|
-
let rtcPresetParameters = ['{\"che.video.videoCodecIndex\": 1}', '{\"rtc.video.new_complexity\": true}', '{\"rtc.video.default_complexity\": 1027}', '{\"rtc.video.enable_doc_screen_share_sr\":true}', '{\"rtc.video.enable_pvc\":false}', '{\"che.video.brightness_detection_enable\":false} ', '{\"che.audio.bitrate_level\":1}', '{\"rtc.video.downMaxRetryTimes\":5}', '{\"che.video.vqc_min_width\": 1280}', '{\"che.video.vqc_min_height\": 720}', '{\"che.video.lowest_dev_score_4_seg\":0}', '{\"che.video.lowest_dev_score_4_beauty\":0}'];
|
|
419
|
-
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.WINDOWS) {
|
|
420
|
-
rtcPresetParameters.push('{\"engine.video.hw_decoder_provider\":\"qsv\"}', '{\"rtc.video.default_hw_decoder_thres\":921600}');
|
|
421
|
-
}
|
|
422
|
-
return rtcPresetParameters;
|
|
423
|
-
}
|
|
424
426
|
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "release"], [_imports.trace, 2, "login"], [_imports.trace, 2, "logout"], [_imports.trace, 2, "renewUserToken"], [_imports.trace, 2, "getVersion"], [_createMainRoomControlDecs, 2, "createMainRoomControl"], [_createWaitingRoomControlDecs, 2, "createWaitingRoomControl"], [_createRoomRouterDecs, 2, "createRoomRouter"], [_createRoomControlAndJoinDecs, 2, "createRoomControlAndJoin"], [_imports.trace, 2, "getDesktopMediaControl"], [_imports.trace, 2, "getMobileMediaControl"], [_imports.trace, 2, "getMonitorControl"], [_imports.trace, 2, "getPeerSessionControl"], [_sendPeerMessageDecs, 2, "sendPeerMessage"], [_setParametersDecs, 2, "setParameters"]], []).e)();
|
|
425
427
|
}
|
|
426
428
|
exports.FcrCoreEngine = FcrCoreEngine;
|
package/lib/imports.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type { AgoraRteNetworkQualityEvent } from 'agora-rte-sdk/lib/core/scene/t
|
|
|
33
33
|
export type { AgoraRteOperatCause } from 'agora-rte-sdk/lib/core/processor/type';
|
|
34
34
|
export type { AgoraRestfulClient } from 'agora-rte-sdk/lib/core/services/client';
|
|
35
35
|
export { AgoraRteError } from 'agora-rte-sdk/lib/core/utilities/error';
|
|
36
|
+
export { AgoraError as FcrError } from 'agora-foundation/lib/utilities/agora-error';
|
|
36
37
|
export type { AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteUserPageParams, AgoraRteUserPageResponse, AgoraRteUserPropertiesDeletedEvent, AgoraRteUserPropertiesUpdatedEvent, AgoraRteUserInfo, AgoraRteSceneObserver, AgoraRteSnapshotInfo, AgoraRteEntryRoomResponse, AgoraRteMediaStreamEvent, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
37
38
|
export type AgoraRteMediaStreamCreateConfig = FcrMediaStreamCreateConfigSchema;
|
|
38
39
|
export type AgoraRteStreamBindConfig = FcrStreamBindConfigSchema;
|
|
@@ -46,7 +47,7 @@ export { AgoraRteConnectionState, AgoraRteEngine, convertStreamTypeToPublishStat
|
|
|
46
47
|
export { AgoraRteRoomConnectorType, AgoraRteStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType, AgoraRteMediaStreamType, } from 'agora-rte-sdk/lib/core/scene/type';
|
|
47
48
|
export { AgoraRtcRegion, AgoraRtcVideoSourceType, AgoraRtcAudioSourceType, AgoraRtcMediaSourceState, AgoraRtcRenderMode, AgoraRtcVideoStreamType, AgoraRtcCapability, AgoraRtcAiDenoiseLevel, AgoraRtcAudioOutputRouting, AgoraRtcLatencyLevelType, AgoraRtcEncryptionMode, } from 'agora-rte-sdk/lib/core/rtc/type';
|
|
48
49
|
export { AgoraRtmRegion } from 'agora-rte-sdk/lib/core/rtm/type';
|
|
49
|
-
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, } from 'agora-rte-sdk/lib/type';
|
|
50
|
+
export { AgoraRteRegion, AgoraRteAudioSourceType, AgoraRteVideoSourceType, AgoraRteMediaPublishState, AgoraRteScreenScenarioType as FcrScreenScenarioType, AgoraRteMediaSourceState, } from 'agora-rte-sdk/lib/type';
|
|
50
51
|
export { AgoraRestfulClientError } from 'agora-rte-sdk/lib/core/services/client';
|
|
51
52
|
export { getSharedDomainHolder } from 'agora-rte-sdk/lib/core/services/domain-holder';
|
|
52
53
|
export { AgoraRteScreenCaptureType, AgoraRteVideoOrientation, } from 'agora-rte-sdk/lib/core/media/type';
|
package/lib/imports.js
CHANGED
|
@@ -126,6 +126,12 @@ Object.defineProperty(exports, "AgoraRteMediaPublishState", {
|
|
|
126
126
|
return _type4.AgoraRteMediaPublishState;
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
+
Object.defineProperty(exports, "AgoraRteMediaSourceState", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return _type4.AgoraRteMediaSourceState;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
129
135
|
Object.defineProperty(exports, "AgoraRteMediaStreamType", {
|
|
130
136
|
enumerable: true,
|
|
131
137
|
get: function () {
|
|
@@ -234,6 +240,12 @@ Object.defineProperty(exports, "FcrCoreEngine", {
|
|
|
234
240
|
return _engine.FcrCoreEngine;
|
|
235
241
|
}
|
|
236
242
|
});
|
|
243
|
+
Object.defineProperty(exports, "FcrError", {
|
|
244
|
+
enumerable: true,
|
|
245
|
+
get: function () {
|
|
246
|
+
return _agoraError.AgoraError;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
237
249
|
Object.defineProperty(exports, "FcrRTMProvider_2_2", {
|
|
238
250
|
enumerable: true,
|
|
239
251
|
get: function () {
|
|
@@ -498,6 +510,7 @@ var _schema = require("agora-foundation/lib/utilities/schema");
|
|
|
498
510
|
var _validate = require("agora-foundation/lib/decorator/validate");
|
|
499
511
|
var _mutex = require("agora-foundation/lib/worker/mutex");
|
|
500
512
|
var _error = require("agora-rte-sdk/lib/core/utilities/error");
|
|
513
|
+
var _agoraError = require("agora-foundation/lib/utilities/agora-error");
|
|
501
514
|
var _agoraRteSdk = require("agora-rte-sdk");
|
|
502
515
|
var _type = require("agora-rte-sdk/lib/core/scene/type");
|
|
503
516
|
var _type2 = require("agora-rte-sdk/lib/core/rtc/type");
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export type { FcrCoreEngineConfig, FcrDualVideoStreamConfig, FcrDesktopMediaControl, FcrDesktopMediaObserver, FcrMobileMediaControl, FcrMobileMediaObserver, FcrMonitorControl, FcrMonitorObserver, FcrBaseRoomControl, FcrRoomObserver, FcrUserControl, FcrUserObserver, FcrStreamControl, FcrStreamObserver, FcrPrivilegeControl, FcrPermission,
|
|
1
|
+
export type { FcrCoreEngineConfig, FcrDualVideoStreamConfig, FcrDesktopMediaControl, FcrDesktopMediaObserver, FcrMobileMediaControl, FcrMobileMediaObserver, FcrMonitorControl, FcrMonitorObserver, FcrBaseRoomControl, FcrRoomObserver, FcrUserControl, FcrUserObserver, FcrStreamControl, FcrStreamObserver, FcrPrivilegeControl, FcrPermission, } from './type';
|
|
2
2
|
export { FcrStreamLatencyLevel, FcrPermissionAction, FcrPrivilegeUserRole, FcrUserRole, FcrStreamState, FcrRegion, FcrStreamType, FcrUserUpdatedReason, FcrRoomConnectorType, FcrVideoSourceType, FcrAudioSourceType, FcrMediaSourceState, FcrVideoRenderMode, FcrVideoStreamType, FcrCapability, FcrAiDenoiseLevel, FcrStreamPrivilegeOperation, FcrStreamPrivilegeVideoSourceType, FcrStreamPrivilegeAudioSourceType, FcrConnectionState, FcrCoreEngine, registerPlugin, } from './type';
|
|
3
|
+
export { FcrError } from './type';
|
package/lib/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "FcrCoreEngine", {
|
|
|
33
33
|
return _type.FcrCoreEngine;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "FcrError", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _type.FcrError;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "FcrMediaSourceState", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -39,7 +39,7 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
|
|
|
39
39
|
* @internal
|
|
40
40
|
*/
|
|
41
41
|
class FcrDesktopMediaControlImpl {
|
|
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
|
|
42
|
+
[(_getCameraTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getMicrophoneTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getScreenTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _getLoopbackTrackDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _setSelectedSpeakerDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _startSelectedSpeakerTestDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringSchema)], _isCapabilitySupportedDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrCapabilitySchema)], _adjustOutputVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], _setSelectedSpeakerVolumeDecs = [_imports.trace, (0, _validateParams.default)(_schema.numberSchema)], "logger")] = (() => (_initProto(this), (0, _logger.createLogger)({
|
|
43
43
|
prefix: 'FcrDesktopMediaControlImpl'
|
|
44
44
|
})))();
|
|
45
45
|
_observable = (() => new _imports.AgoraObservable())();
|
|
@@ -87,6 +87,9 @@ class FcrDesktopMediaControlImpl {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
+
getLoopbackList() {
|
|
91
|
+
return this._mediaControl.getLoopbackList();
|
|
92
|
+
}
|
|
90
93
|
getCameraList() {
|
|
91
94
|
return this._mediaControl.getCameraList();
|
|
92
95
|
}
|
|
@@ -123,8 +126,8 @@ class FcrDesktopMediaControlImpl {
|
|
|
123
126
|
setSelectedSpeaker(deviceId) {
|
|
124
127
|
this._mediaControl.setSelectedSpeaker(deviceId);
|
|
125
128
|
}
|
|
126
|
-
startSelectedSpeakerTest(url
|
|
127
|
-
this._mediaControl.startSpeakerTest(url
|
|
129
|
+
startSelectedSpeakerTest(url) {
|
|
130
|
+
this._mediaControl.startSpeakerTest(url);
|
|
128
131
|
}
|
|
129
132
|
stopSelectedSpeakerTest() {
|
|
130
133
|
this._mediaControl.stopSpeakerTest();
|
|
@@ -147,9 +150,6 @@ class FcrDesktopMediaControlImpl {
|
|
|
147
150
|
removeObserver(observer) {
|
|
148
151
|
this._observable.removeObserver(observer);
|
|
149
152
|
}
|
|
150
|
-
checkLoopbackDevice() {
|
|
151
|
-
return this._mediaControl.checkLoopbackDevice();
|
|
152
|
-
}
|
|
153
153
|
observeSystemSelectedSpeakerChanged(follow) {
|
|
154
154
|
return this._mediaControl.observeSystemSelectedSpeakerChanged(follow);
|
|
155
155
|
}
|
|
@@ -162,7 +162,7 @@ class FcrDesktopMediaControlImpl {
|
|
|
162
162
|
enableAGC() {
|
|
163
163
|
return this._mediaControl.enableAGC();
|
|
164
164
|
}
|
|
165
|
-
static #_ = (() => _staticBlock = () => [_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, "
|
|
165
|
+
static #_ = (() => _staticBlock = () => [_initProto] = _applyDecs(this, [[_imports.trace, 2, "getLoopbackList"], [_imports.trace, 2, "getCameraList"], [_imports.trace, 2, "getMicrophoneList"], [_imports.trace, 2, "getSpeakerList"], [_imports.trace, 2, "getSystemSelectedMicrophone"], [_imports.trace, 2, "getSystemSelectedSpeaker"], [_imports.trace, 2, "getWindowList"], [_imports.trace, 2, "getDisplayList"], [_getCameraTrackDecs, 2, "getCameraTrack"], [_getMicrophoneTrackDecs, 2, "getMicrophoneTrack"], [_getScreenTrackDecs, 2, "getScreenTrack"], [_getLoopbackTrackDecs, 2, "getLoopbackTrack"], [_setSelectedSpeakerDecs, 2, "setSelectedSpeaker"], [_startSelectedSpeakerTestDecs, 2, "startSelectedSpeakerTest"], [_imports.trace, 2, "stopSelectedSpeakerTest"], [_isCapabilitySupportedDecs, 2, "isCapabilitySupported"], [_adjustOutputVolumeDecs, 2, "adjustOutputVolume"], [_setSelectedSpeakerVolumeDecs, 2, "setSelectedSpeakerVolume"], [_imports.trace, 2, "getSelectedSpeakerVolume"], [_imports.trace, 2, "observeSystemSelectedSpeakerChanged"], [_imports.trace, 2, "observeSystemSelectedMicrophoneChanged"], [_imports.trace, 2, "disableAGC"], [_imports.trace, 2, "enableAGC"]], []).e)();
|
|
166
166
|
}
|
|
167
167
|
exports.FcrDesktopMediaControlImpl = FcrDesktopMediaControlImpl;
|
|
168
168
|
_staticBlock();
|
|
@@ -119,8 +119,8 @@ class FcrMobileMediaControlImpl {
|
|
|
119
119
|
stopCameraPreviewOnAllCanvas() {
|
|
120
120
|
throw new Error('Method not implemented.');
|
|
121
121
|
}
|
|
122
|
-
startScreenCapture(
|
|
123
|
-
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).start(_imports.AgoraRteScreenCaptureType.SCREEN,
|
|
122
|
+
startScreenCapture(excludeWindowList) {
|
|
123
|
+
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).start(_imports.AgoraRteScreenCaptureType.SCREEN, excludeWindowList);
|
|
124
124
|
}
|
|
125
125
|
stopScreenCapture() {
|
|
126
126
|
this._mediaControl.getScreenVideoTrack(this._screenDeviceName).stop();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams,
|
|
2
|
-
import { FcrDeviceInfo, FcrDisplayInfo, FcrRenderView, FcrWindowInfo } from '../type';
|
|
1
|
+
import { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams, AgoraRteVirtualBackgroundOptions, AgoraRteCameraCaptureParams, AgoraRtcAudioOutputRouting } from '../imports';
|
|
2
|
+
import { FcrDeviceInfo, FcrDisplayInfo, FcrRenderView, FcrScreenCaptureType, FcrVideoOrientation, FcrWindowInfo } from '../type';
|
|
3
3
|
import { FcrMediaSourceState, FcrAiDenoiseLevel, FcrVideoSourceType, FcrAudioSourceType, FcrCapability } from '../type';
|
|
4
4
|
import { FcrRenderConfigSchema } from '../schema';
|
|
5
5
|
export type FcrAudioOutputRouting = AgoraRtcAudioOutputRouting;
|
|
@@ -100,7 +100,7 @@ export type FcrLoopbackObserver = {
|
|
|
100
100
|
* @param deviceId
|
|
101
101
|
* @param state
|
|
102
102
|
*/
|
|
103
|
-
|
|
103
|
+
onLoopbackRecordingStateUpdated?: (deviceId: string, state: FcrMediaSourceState) => void;
|
|
104
104
|
};
|
|
105
105
|
export type FcrRenderConfig = FcrRenderConfigSchema;
|
|
106
106
|
export type FcrBeautyOptions = AgoraRteBeautyOptions;
|
|
@@ -108,9 +108,7 @@ export type FcrVirtualBackgroundOptions = AgoraRteVirtualBackgroundOptions;
|
|
|
108
108
|
export type FcrCameraPosition = AgoraRteCameraPosition;
|
|
109
109
|
export type FcrAudioRawDataConfig = AgoraRteAudioRawDataConfig;
|
|
110
110
|
export type FcrScreenCaptureParams = AgoraRteScreenCaptureParams;
|
|
111
|
-
export type FcrScreenCaptureType = AgoraRteScreenCaptureType;
|
|
112
111
|
export type FcrCameraCaptureParams = AgoraRteCameraCaptureParams;
|
|
113
|
-
export type FcrVideoOrientation = AgoraRteVideoOrientation;
|
|
114
112
|
export interface FcrAudioEffectEnhancer {
|
|
115
113
|
/**
|
|
116
114
|
* Enables the AI denoiser for the audio track.
|
|
@@ -458,7 +456,7 @@ export interface FcrScreenTrack {
|
|
|
458
456
|
* @param params The parameters for the screen capture.
|
|
459
457
|
* @returns A promise that resolves when the start is successful.
|
|
460
458
|
*/
|
|
461
|
-
start(type: FcrScreenCaptureType,
|
|
459
|
+
start(type: FcrScreenCaptureType, excludeWindowList: string[]): void;
|
|
462
460
|
/**
|
|
463
461
|
* Stops the screen video track for the specified source.
|
|
464
462
|
* @returns A promise that resolves when the stop is successful.
|
|
@@ -476,6 +474,11 @@ export interface FcrScreenTrack {
|
|
|
476
474
|
removeObserver(observer: FcrScreenTrackObserver): void;
|
|
477
475
|
}
|
|
478
476
|
export interface FcrDesktopMediaControl {
|
|
477
|
+
/**
|
|
478
|
+
* Get the list of loopback devices.
|
|
479
|
+
* @returns An array of device information for each loopback device.
|
|
480
|
+
*/
|
|
481
|
+
getLoopbackList(): FcrDeviceInfo[];
|
|
479
482
|
/**
|
|
480
483
|
* Get the list of cameras.
|
|
481
484
|
* @returns An array of device information for each camera.
|
|
@@ -581,13 +584,6 @@ export interface FcrDesktopMediaControl {
|
|
|
581
584
|
* @returns The volume of the speaker. Range from 0 to 100.
|
|
582
585
|
*/
|
|
583
586
|
getSelectedSpeakerVolume(): number;
|
|
584
|
-
/**
|
|
585
|
-
* Check loopback device status
|
|
586
|
-
* @returns 0 if the loopback device is available; otherwise,
|
|
587
|
-
* 1 if not downloaded,
|
|
588
|
-
* 2 if not installed/activated
|
|
589
|
-
*/
|
|
590
|
-
checkLoopbackDevice(): Promise<number>;
|
|
591
587
|
/**
|
|
592
588
|
* Follow the system speaker.
|
|
593
589
|
* @param follow
|
|
@@ -631,7 +627,7 @@ export interface FcrMobileMediaControl {
|
|
|
631
627
|
stopCameraPreview(view: string | object): void;
|
|
632
628
|
stopCameraPreviewOnAllCanvas(): void;
|
|
633
629
|
isCapabilitySupported(capability: FcrCapability): boolean;
|
|
634
|
-
startScreenCapture(
|
|
630
|
+
startScreenCapture(excludeWindowList: string[]): void;
|
|
635
631
|
stopScreenCapture(): void;
|
|
636
632
|
getScreenCaptureState(): FcrMediaSourceState;
|
|
637
633
|
startLoopbackRecording(): void;
|
|
@@ -367,7 +367,7 @@ class FcrBaseRoomControlImpl {
|
|
|
367
367
|
handleJoinAborted();
|
|
368
368
|
if (error instanceof _error.FcrError || error instanceof _imports.AgoraRteError) {
|
|
369
369
|
this.logger.error(`join room failed, message: ${error.message}, code: ${error.code}`);
|
|
370
|
-
if (_error.
|
|
370
|
+
if (_error.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
371
371
|
this.logger.error(`cancel retry to join room, message: ${error.message}, code: ${error.code}`);
|
|
372
372
|
throw error;
|
|
373
373
|
}
|
|
@@ -191,11 +191,7 @@ class FcrStreamControlImpl {
|
|
|
191
191
|
}))), _error.FcrErrorModuleCode.ROOM_STREAM, 'add local streams failed');
|
|
192
192
|
}
|
|
193
193
|
bindLocalStreams(streams) {
|
|
194
|
-
return
|
|
195
|
-
streamUuid: config.streamId,
|
|
196
|
-
videoSourceUuid: config.videoSourceId,
|
|
197
|
-
audioSourceUuid: config.audioSourceId
|
|
198
|
-
}))), _error.FcrErrorModuleCode.ROOM_STREAM, 'bind local streams failed');
|
|
194
|
+
return this._scene.localUser.bindLocalStreams(streams);
|
|
199
195
|
}
|
|
200
196
|
updatePublishPrivilegeOfStreams() {
|
|
201
197
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -74,6 +74,7 @@ class FcrWhiteboardControlImpl {
|
|
|
74
74
|
boardRoom.applicationManager.removeAllListeners();
|
|
75
75
|
boardRoom.applicationManager.terminateApplication(_type.WHITEBOARD_APP_ID);
|
|
76
76
|
await boardRoom.leaveRoom();
|
|
77
|
+
this.logger.info('the whitebaord room is closed');
|
|
77
78
|
}
|
|
78
79
|
} catch (error) {
|
|
79
80
|
this.logger.error('close board failed', error);
|
|
@@ -196,8 +196,8 @@ class FcrPrivilegedWhiteboardControlImpl extends _control.FcrWhiteboardControlIm
|
|
|
196
196
|
} = getByKeyPath('widgets.netlessBoard.extra') ?? {
|
|
197
197
|
backgroundColor: '#ffffff'
|
|
198
198
|
};
|
|
199
|
-
const widgetCauseReason =
|
|
200
|
-
const widgetCauseCmd = event.cause.data
|
|
199
|
+
const widgetCauseReason = (0, _imports.get)(event.cause.data, 'widgetCause.data.reason');
|
|
200
|
+
const widgetCauseCmd = (0, _imports.get)(event.cause.data, 'widgetCause.cmd');
|
|
201
201
|
this.logger.info(`[whiteboard][privilege-whiteboard]: onScenePropertiesUpdated ${_type.FcrBoardPropertiesState[state]}`);
|
|
202
202
|
if (state === _type.FcrBoardPropertiesState.ACTIVE) {
|
|
203
203
|
this.observable.notifyObservers('onActive', ownerUserUuid, operatorUser);
|
package/lib/room-router/index.js
CHANGED
|
@@ -182,9 +182,11 @@ class FcrRoomRouterImpl {
|
|
|
182
182
|
timeFn,
|
|
183
183
|
currentRetry
|
|
184
184
|
} = _ref;
|
|
185
|
-
if (
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
if (error instanceof _error2.AgoraRteError || error instanceof _error.FcrError) {
|
|
186
|
+
if (_error.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM.includes(error.code)) {
|
|
187
|
+
this.logger.error(`cancel retry to join room, message: ${error.message}, code: ${error.code}`);
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
191
|
this.logger.error(`retry to join room, ${error.message}, retry ${currentRetry} times`);
|
|
190
192
|
await timeFn();
|
package/lib/schema.d.ts
CHANGED
|
@@ -416,6 +416,7 @@ export declare const agoraRtcVideoEncoderConfigurationSchema: z.ZodObject<{
|
|
|
416
416
|
}>;
|
|
417
417
|
frameRate: z.ZodNumber;
|
|
418
418
|
bitrate: z.ZodNumber;
|
|
419
|
+
isMirror: z.ZodBoolean;
|
|
419
420
|
}, "strip", z.ZodTypeAny, {
|
|
420
421
|
dimensions: {
|
|
421
422
|
width: number;
|
|
@@ -423,6 +424,7 @@ export declare const agoraRtcVideoEncoderConfigurationSchema: z.ZodObject<{
|
|
|
423
424
|
};
|
|
424
425
|
frameRate: number;
|
|
425
426
|
bitrate: number;
|
|
427
|
+
isMirror: boolean;
|
|
426
428
|
}, {
|
|
427
429
|
dimensions: {
|
|
428
430
|
width: number;
|
|
@@ -430,6 +432,7 @@ export declare const agoraRtcVideoEncoderConfigurationSchema: z.ZodObject<{
|
|
|
430
432
|
};
|
|
431
433
|
frameRate: number;
|
|
432
434
|
bitrate: number;
|
|
435
|
+
isMirror: boolean;
|
|
433
436
|
}>;
|
|
434
437
|
export type FcrVideoEncoderConfigurationSchema = z.infer<typeof agoraRtcVideoEncoderConfigurationSchema>;
|
|
435
438
|
export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
@@ -446,6 +449,7 @@ export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
|
446
449
|
}>;
|
|
447
450
|
frameRate: z.ZodNumber;
|
|
448
451
|
bitrate: z.ZodNumber;
|
|
452
|
+
isMirror: z.ZodBoolean;
|
|
449
453
|
}, "strip", z.ZodTypeAny, {
|
|
450
454
|
dimensions: {
|
|
451
455
|
width: number;
|
|
@@ -453,6 +457,7 @@ export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
|
453
457
|
};
|
|
454
458
|
frameRate: number;
|
|
455
459
|
bitrate: number;
|
|
460
|
+
isMirror: boolean;
|
|
456
461
|
}, {
|
|
457
462
|
dimensions: {
|
|
458
463
|
width: number;
|
|
@@ -460,6 +465,7 @@ export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
|
460
465
|
};
|
|
461
466
|
frameRate: number;
|
|
462
467
|
bitrate: number;
|
|
468
|
+
isMirror: boolean;
|
|
463
469
|
}>>;
|
|
464
470
|
videoSourceId: z.ZodOptional<z.ZodString>;
|
|
465
471
|
audioSourceId: z.ZodOptional<z.ZodString>;
|
|
@@ -483,6 +489,7 @@ export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
|
483
489
|
};
|
|
484
490
|
frameRate: number;
|
|
485
491
|
bitrate: number;
|
|
492
|
+
isMirror: boolean;
|
|
486
493
|
} | undefined;
|
|
487
494
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
488
495
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -500,6 +507,7 @@ export declare const fcrStreamJoinConfig: z.ZodObject<{
|
|
|
500
507
|
};
|
|
501
508
|
frameRate: number;
|
|
502
509
|
bitrate: number;
|
|
510
|
+
isMirror: boolean;
|
|
503
511
|
} | undefined;
|
|
504
512
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
505
513
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -535,6 +543,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
535
543
|
}>;
|
|
536
544
|
frameRate: z.ZodNumber;
|
|
537
545
|
bitrate: z.ZodNumber;
|
|
546
|
+
isMirror: z.ZodBoolean;
|
|
538
547
|
}, "strip", z.ZodTypeAny, {
|
|
539
548
|
dimensions: {
|
|
540
549
|
width: number;
|
|
@@ -542,6 +551,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
542
551
|
};
|
|
543
552
|
frameRate: number;
|
|
544
553
|
bitrate: number;
|
|
554
|
+
isMirror: boolean;
|
|
545
555
|
}, {
|
|
546
556
|
dimensions: {
|
|
547
557
|
width: number;
|
|
@@ -549,6 +559,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
549
559
|
};
|
|
550
560
|
frameRate: number;
|
|
551
561
|
bitrate: number;
|
|
562
|
+
isMirror: boolean;
|
|
552
563
|
}>>;
|
|
553
564
|
videoSourceId: z.ZodOptional<z.ZodString>;
|
|
554
565
|
audioSourceId: z.ZodOptional<z.ZodString>;
|
|
@@ -572,6 +583,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
572
583
|
};
|
|
573
584
|
frameRate: number;
|
|
574
585
|
bitrate: number;
|
|
586
|
+
isMirror: boolean;
|
|
575
587
|
} | undefined;
|
|
576
588
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
577
589
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -589,6 +601,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
589
601
|
};
|
|
590
602
|
frameRate: number;
|
|
591
603
|
bitrate: number;
|
|
604
|
+
isMirror: boolean;
|
|
592
605
|
} | undefined;
|
|
593
606
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
594
607
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -615,6 +628,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
615
628
|
};
|
|
616
629
|
frameRate: number;
|
|
617
630
|
bitrate: number;
|
|
631
|
+
isMirror: boolean;
|
|
618
632
|
} | undefined;
|
|
619
633
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
620
634
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -646,6 +660,7 @@ export declare const fcrRoomJoinOptionsSchema: z.ZodObject<{
|
|
|
646
660
|
};
|
|
647
661
|
frameRate: number;
|
|
648
662
|
bitrate: number;
|
|
663
|
+
isMirror: boolean;
|
|
649
664
|
} | undefined;
|
|
650
665
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
651
666
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -664,11 +679,11 @@ export declare const fcrRenderConfigSchema: z.ZodObject<{
|
|
|
664
679
|
renderMode: z.ZodNativeEnum<typeof AgoraRtcRenderMode>;
|
|
665
680
|
isMirror: z.ZodBoolean;
|
|
666
681
|
}, "strip", z.ZodTypeAny, {
|
|
667
|
-
renderMode: AgoraRtcRenderMode;
|
|
668
682
|
isMirror: boolean;
|
|
669
|
-
}, {
|
|
670
683
|
renderMode: AgoraRtcRenderMode;
|
|
684
|
+
}, {
|
|
671
685
|
isMirror: boolean;
|
|
686
|
+
renderMode: AgoraRtcRenderMode;
|
|
672
687
|
}>;
|
|
673
688
|
export type FcrRenderConfigSchema = z.infer<typeof fcrRenderConfigSchema>;
|
|
674
689
|
export declare const fcrGroupUpdateOptionsSchema: z.ZodObject<{
|
|
@@ -714,6 +729,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
714
729
|
}>;
|
|
715
730
|
frameRate: z.ZodNumber;
|
|
716
731
|
bitrate: z.ZodNumber;
|
|
732
|
+
isMirror: z.ZodBoolean;
|
|
717
733
|
}, "strip", z.ZodTypeAny, {
|
|
718
734
|
dimensions: {
|
|
719
735
|
width: number;
|
|
@@ -721,6 +737,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
721
737
|
};
|
|
722
738
|
frameRate: number;
|
|
723
739
|
bitrate: number;
|
|
740
|
+
isMirror: boolean;
|
|
724
741
|
}, {
|
|
725
742
|
dimensions: {
|
|
726
743
|
width: number;
|
|
@@ -728,6 +745,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
728
745
|
};
|
|
729
746
|
frameRate: number;
|
|
730
747
|
bitrate: number;
|
|
748
|
+
isMirror: boolean;
|
|
731
749
|
}>>;
|
|
732
750
|
videoSourceId: z.ZodOptional<z.ZodString>;
|
|
733
751
|
audioSourceId: z.ZodOptional<z.ZodString>;
|
|
@@ -751,6 +769,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
751
769
|
};
|
|
752
770
|
frameRate: number;
|
|
753
771
|
bitrate: number;
|
|
772
|
+
isMirror: boolean;
|
|
754
773
|
} | undefined;
|
|
755
774
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
756
775
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -768,6 +787,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
768
787
|
};
|
|
769
788
|
frameRate: number;
|
|
770
789
|
bitrate: number;
|
|
790
|
+
isMirror: boolean;
|
|
771
791
|
} | undefined;
|
|
772
792
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
773
793
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -794,6 +814,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
794
814
|
};
|
|
795
815
|
frameRate: number;
|
|
796
816
|
bitrate: number;
|
|
817
|
+
isMirror: boolean;
|
|
797
818
|
} | undefined;
|
|
798
819
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
799
820
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
@@ -826,6 +847,7 @@ export declare const fcrRoomJoinOptionsWithTicketSchema: z.ZodObject<{
|
|
|
826
847
|
};
|
|
827
848
|
frameRate: number;
|
|
828
849
|
bitrate: number;
|
|
850
|
+
isMirror: boolean;
|
|
829
851
|
} | undefined;
|
|
830
852
|
audioSourceState?: AgoraRtcMediaSourceState | undefined;
|
|
831
853
|
videoSourceState?: AgoraRtcMediaSourceState | undefined;
|
package/lib/schema.js
CHANGED
|
@@ -201,7 +201,8 @@ const AgoraRtcDimensions = exports.AgoraRtcDimensions = _imports.z.object({
|
|
|
201
201
|
const agoraRtcVideoEncoderConfigurationSchema = exports.agoraRtcVideoEncoderConfigurationSchema = _imports.z.object({
|
|
202
202
|
dimensions: AgoraRtcDimensions,
|
|
203
203
|
frameRate: _imports.numberSchema,
|
|
204
|
-
bitrate: _imports.numberSchema
|
|
204
|
+
bitrate: _imports.numberSchema,
|
|
205
|
+
isMirror: _imports.booleanSchema
|
|
205
206
|
});
|
|
206
207
|
// Stream Config Schemas
|
|
207
208
|
const fcrStreamJoinConfig = exports.fcrStreamJoinConfig = _imports.z.object({
|
package/lib/service/api.js
CHANGED
|
@@ -217,12 +217,12 @@ class FcrCoreServiceApi {
|
|
|
217
217
|
data: {
|
|
218
218
|
mode: 'web',
|
|
219
219
|
webRecordConfig: {
|
|
220
|
-
//
|
|
221
|
-
audioProfile: config.audioProfile,
|
|
222
|
-
videoBitrate: config.videoEncoderConfig.bitrate,
|
|
223
|
-
videoWidth: config.videoEncoderConfig.dimensions.width,
|
|
224
|
-
videoHeight: config.videoEncoderConfig.dimensions.height,
|
|
225
|
-
videoFps: config.videoEncoderConfig.frameRate
|
|
220
|
+
// rootUrl: config.url,
|
|
221
|
+
// audioProfile: config.audioProfile,
|
|
222
|
+
// videoBitrate: config.videoEncoderConfig.bitrate,
|
|
223
|
+
// videoWidth: config.videoEncoderConfig.dimensions.width,
|
|
224
|
+
// videoHeight: config.videoEncoderConfig.dimensions.height,
|
|
225
|
+
// videoFps: config.videoEncoderConfig.frameRate,
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
});
|
package/lib/type.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type FcrCoreEngineConfig = {
|
|
|
23
23
|
/** 额外参数配置 */
|
|
24
24
|
parameters?: Record<string, unknown>;
|
|
25
25
|
};
|
|
26
|
-
export { AgoraRteRegion as FcrRegion, AgoraRteMediaStreamType as FcrStreamType, AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteRoomConnectorType as FcrRoomConnectorType, AgoraRtcVideoSourceType as FcrVideoSourceType, AgoraRtcAudioSourceType as FcrAudioSourceType, AgoraRtcMediaSourceState as FcrMediaSourceState, AgoraRtcRenderMode as FcrVideoRenderMode, AgoraRtcVideoStreamType as FcrVideoStreamType, AgoraRtcCapability as FcrCapability, AgoraRtcAiDenoiseLevel as FcrAiDenoiseLevel, AgoraRteStreamPrivilegeOperation as FcrStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType as FcrStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType as FcrStreamPrivilegeAudioSourceType, AgoraRteConnectionState as FcrConnectionState, AgoraRteLatencyLevel as FcrStreamLatencyLevel, FcrCoreEngine, registerPlugin, } from './imports';
|
|
26
|
+
export { AgoraRteRegion as FcrRegion, AgoraRteMediaStreamType as FcrStreamType, AgoraRteUserUpdatedReason as FcrUserUpdatedReason, AgoraRteRoomConnectorType as FcrRoomConnectorType, AgoraRtcVideoSourceType as FcrVideoSourceType, AgoraRtcAudioSourceType as FcrAudioSourceType, AgoraRtcMediaSourceState as FcrMediaSourceState, AgoraRtcRenderMode as FcrVideoRenderMode, AgoraRtcVideoStreamType as FcrVideoStreamType, AgoraRtcCapability as FcrCapability, AgoraRtcAiDenoiseLevel as FcrAiDenoiseLevel, AgoraRteStreamPrivilegeOperation as FcrStreamPrivilegeOperation, AgoraRteStreamPrivilegeVideoSourceType as FcrStreamPrivilegeVideoSourceType, AgoraRteStreamPrivilegeAudioSourceType as FcrStreamPrivilegeAudioSourceType, AgoraRteConnectionState as FcrConnectionState, AgoraRteLatencyLevel as FcrStreamLatencyLevel, AgoraRteScreenCaptureType as FcrScreenCaptureType, AgoraRteVideoOrientation as FcrVideoOrientation, FcrCoreEngine, registerPlugin, } from './imports';
|
|
27
27
|
export type FcrDualVideoStreamConfig = AgoraRteDualVideoStreamConfig;
|
|
28
28
|
export type FcrMessage = AgoraRteMessage;
|
|
29
29
|
export type FcrRenderView = AgoraRteRenderView;
|
|
@@ -284,4 +284,4 @@ export declare enum FcrStreamState {
|
|
|
284
284
|
UNPUBLISH = 0,
|
|
285
285
|
PUBLISH = 1
|
|
286
286
|
}
|
|
287
|
-
export
|
|
287
|
+
export { FcrError } from './utilities/error';
|
package/lib/type.js
CHANGED
|
@@ -64,6 +64,12 @@ Object.defineProperty(exports, "FcrDeviceType", {
|
|
|
64
64
|
return _type8.FcrDeviceType;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
+
Object.defineProperty(exports, "FcrError", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () {
|
|
70
|
+
return _error.FcrError;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
67
73
|
Object.defineProperty(exports, "FcrIPConnectorSessionType", {
|
|
68
74
|
enumerable: true,
|
|
69
75
|
get: function () {
|
|
@@ -158,6 +164,12 @@ Object.defineProperty(exports, "FcrRoomConnectorType", {
|
|
|
158
164
|
}
|
|
159
165
|
});
|
|
160
166
|
exports.FcrRoomState = void 0;
|
|
167
|
+
Object.defineProperty(exports, "FcrScreenCaptureType", {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () {
|
|
170
|
+
return _imports.AgoraRteScreenCaptureType;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
161
173
|
Object.defineProperty(exports, "FcrScreenSharingState", {
|
|
162
174
|
enumerable: true,
|
|
163
175
|
get: function () {
|
|
@@ -226,6 +238,12 @@ Object.defineProperty(exports, "FcrUserUpdatedReason", {
|
|
|
226
238
|
return _imports.AgoraRteUserUpdatedReason;
|
|
227
239
|
}
|
|
228
240
|
});
|
|
241
|
+
Object.defineProperty(exports, "FcrVideoOrientation", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function () {
|
|
244
|
+
return _imports.AgoraRteVideoOrientation;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
229
247
|
Object.defineProperty(exports, "FcrVideoRenderMode", {
|
|
230
248
|
enumerable: true,
|
|
231
249
|
get: function () {
|
|
@@ -273,6 +291,7 @@ var _type5 = require("./room-control/room-connector-control/type");
|
|
|
273
291
|
var _type6 = require("./room-control/sharing-control/type");
|
|
274
292
|
var _type7 = require("./room-control/type");
|
|
275
293
|
var _type8 = require("./media-control/type");
|
|
294
|
+
var _error = require("./utilities/error");
|
|
276
295
|
// 基础导入类型(集中管理第三方依赖类型别名)
|
|
277
296
|
// 内部枚举与基础类型导入
|
|
278
297
|
// 模块类型导出(按功能模块分组)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_RTC_CLIENT_IS_DISABLED = false;
|
package/lib/utilities/error.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
private _message;
|
|
4
|
-
private _origin?;
|
|
5
|
-
get origin(): Error | undefined;
|
|
6
|
-
get code(): string;
|
|
7
|
-
get message(): string;
|
|
8
|
-
constructor(_code: string, _message: string, _origin?: Error | undefined);
|
|
9
|
-
}
|
|
1
|
+
import { FcrError } from '../imports';
|
|
2
|
+
export { FcrError } from '../imports';
|
|
10
3
|
export declare enum FcrErrorCodeType {
|
|
11
4
|
CLIENT = 6,
|
|
12
5
|
SERVER = 7
|
|
@@ -42,7 +35,9 @@ export declare enum FcrErrorCode {
|
|
|
42
35
|
JOIN_CONFLICT = 15,
|
|
43
36
|
EXPIRED = 15
|
|
44
37
|
}
|
|
45
|
-
export declare const generateFcrCoreClientError: (module: FcrErrorModuleCode, code: number, message: string, origin
|
|
46
|
-
export declare const generateFcrCoreServerError: (code: number, message: string, origin
|
|
38
|
+
export declare const generateFcrCoreClientError: (module: FcrErrorModuleCode, code: number, message: string, origin?: Error) => FcrError;
|
|
39
|
+
export declare const generateFcrCoreServerError: (code: number, message: string, origin?: Error) => FcrError;
|
|
47
40
|
export declare const handleRequestError: <T extends () => Promise<any>>(action: T, errorModuleCode: FcrErrorModuleCode, errorMessage?: string) => Promise<Awaited<ReturnType<T>>>;
|
|
48
|
-
export declare const
|
|
41
|
+
export declare const ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM: number[];
|
|
42
|
+
export declare const generateFcrCoreClientErrorNew: (module: FcrErrorModuleCode, code: number, message: string) => FcrError;
|
|
43
|
+
export declare const generateFcrCoreServerErrorNew: (code: number, message: string) => FcrError;
|
package/lib/utilities/error.js
CHANGED
|
@@ -3,27 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get
|
|
10
|
-
return
|
|
11
|
-
}
|
|
12
|
-
get code() {
|
|
13
|
-
return this._code;
|
|
14
|
-
}
|
|
15
|
-
get message() {
|
|
16
|
-
return this._message;
|
|
6
|
+
exports.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM = void 0;
|
|
7
|
+
Object.defineProperty(exports, "FcrError", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _imports.FcrError;
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this._message = _message;
|
|
22
|
-
this._origin = _origin;
|
|
23
|
-
this.name = 'FcrCoreError';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.FcrError = FcrError;
|
|
12
|
+
});
|
|
13
|
+
exports.handleRequestError = exports.generateFcrCoreServerErrorNew = exports.generateFcrCoreServerError = exports.generateFcrCoreClientErrorNew = exports.generateFcrCoreClientError = exports.FcrErrorModuleCode = exports.FcrErrorCodeType = exports.FcrErrorCode = void 0;
|
|
14
|
+
var _imports = require("../imports");
|
|
27
15
|
let FcrErrorCodeType = exports.FcrErrorCodeType = /*#__PURE__*/function (FcrErrorCodeType) {
|
|
28
16
|
FcrErrorCodeType[FcrErrorCodeType["CLIENT"] = 6] = "CLIENT";
|
|
29
17
|
FcrErrorCodeType[FcrErrorCodeType["SERVER"] = 7] = "SERVER";
|
|
@@ -63,12 +51,28 @@ let FcrErrorCode = exports.FcrErrorCode = /*#__PURE__*/function (FcrErrorCode) {
|
|
|
63
51
|
return FcrErrorCode;
|
|
64
52
|
}({}); // helpers
|
|
65
53
|
const generateFcrCoreClientError = (module, code, message, origin) => {
|
|
66
|
-
|
|
54
|
+
const errorType = (0, _imports.padEnd)(String(FcrErrorCodeType.CLIENT), 3, '0'); // 如:'100'
|
|
55
|
+
const moduleCode = (0, _imports.padStart)(String(module), 3, '0'); // 如:'020'
|
|
56
|
+
const errorCode = (0, _imports.padStart)(String(code), 3, '0'); // 如:'001'
|
|
57
|
+
const fullErrorCode = Number(`${errorType}${moduleCode}${errorCode}`); // 如:'100020001'
|
|
58
|
+
|
|
59
|
+
const errorMessage = `domain: RTE-CLIENT, info: ${message}`;
|
|
60
|
+
return new _imports.FcrError({
|
|
61
|
+
code: fullErrorCode,
|
|
62
|
+
message: errorMessage
|
|
63
|
+
});
|
|
67
64
|
};
|
|
68
65
|
exports.generateFcrCoreClientError = generateFcrCoreClientError;
|
|
69
66
|
const generateFcrCoreServerError = (code, message, origin) => {
|
|
70
|
-
|
|
67
|
+
const errorCode = Number(`${FcrErrorCodeType.SERVER}${(0, _imports.padStart)(String(code), 8, '0')}`);
|
|
68
|
+
const error = new _imports.FcrError({
|
|
69
|
+
message: message,
|
|
70
|
+
code: errorCode
|
|
71
|
+
});
|
|
72
|
+
return error;
|
|
71
73
|
};
|
|
74
|
+
|
|
75
|
+
// TODO: i don't know
|
|
72
76
|
exports.generateFcrCoreServerError = generateFcrCoreServerError;
|
|
73
77
|
const handleRequestError = async (action, errorModuleCode, errorMessage) => {
|
|
74
78
|
try {
|
|
@@ -92,4 +96,28 @@ const handleRequestError = async (action, errorModuleCode, errorMessage) => {
|
|
|
92
96
|
// 730403100 // 被永久踢出房间
|
|
93
97
|
// error codes that cannot be retried when joining a room
|
|
94
98
|
exports.handleRequestError = handleRequestError;
|
|
95
|
-
const
|
|
99
|
+
const ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM = exports.ERROR_CODES_NOT_RETRYABLE_WHEN_JOINING_ROOM = [720410100, 720404100, 732403100, 732403101, 100050051, 300000010, 400000010, 730403100];
|
|
100
|
+
|
|
101
|
+
// New
|
|
102
|
+
const generateFcrCoreClientErrorNew = (module, code, message) => {
|
|
103
|
+
const errorType = (0, _imports.padEnd)(String(FcrErrorCodeType.CLIENT), 3, '0'); // 如:'100'
|
|
104
|
+
const moduleCode = (0, _imports.padStart)(String(module), 3, '0'); // 如:'020'
|
|
105
|
+
const errorCode = (0, _imports.padStart)(String(code), 3, '0'); // 如:'001'
|
|
106
|
+
const fullErrorCode = Number(`${errorType}${moduleCode}${errorCode}`); // 如:'100020001'
|
|
107
|
+
|
|
108
|
+
const errorMessage = `domain: RTE-CLIENT, info: ${message}`;
|
|
109
|
+
return new _imports.FcrError({
|
|
110
|
+
code: fullErrorCode,
|
|
111
|
+
message: errorMessage
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
exports.generateFcrCoreClientErrorNew = generateFcrCoreClientErrorNew;
|
|
115
|
+
const generateFcrCoreServerErrorNew = (code, message) => {
|
|
116
|
+
const errorCode = Number(`${FcrErrorCodeType.SERVER}${(0, _imports.padStart)(String(code), 8, '0')}`);
|
|
117
|
+
const error = new _imports.FcrError({
|
|
118
|
+
message: message,
|
|
119
|
+
code: errorCode
|
|
120
|
+
});
|
|
121
|
+
return error;
|
|
122
|
+
};
|
|
123
|
+
exports.generateFcrCoreServerErrorNew = generateFcrCoreServerErrorNew;
|
|
@@ -6,4 +6,5 @@ export declare const getCoreIpList: (parameters?: FcrCoreEngineParameters) => st
|
|
|
6
6
|
export declare const getEasemobChatIpList: (parameters?: FcrCoreEngineParameters) => string[];
|
|
7
7
|
export declare const getEasemobRestIpList: (parameters?: FcrCoreEngineParameters) => string[];
|
|
8
8
|
export declare const isEndpointRegionDisabled: (parameters?: FcrCoreEngineParameters) => boolean;
|
|
9
|
+
export declare const getRtcPresetParameters: () => string[];
|
|
9
10
|
export {};
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isTrueValue = exports.isEndpointRegionDisabled = exports.getEasemobRestIpList = exports.getEasemobChatIpList = exports.getCoreIpList = void 0;
|
|
6
|
+
exports.isTrueValue = exports.isEndpointRegionDisabled = exports.getRtcPresetParameters = exports.getEasemobRestIpList = exports.getEasemobChatIpList = exports.getCoreIpList = void 0;
|
|
7
|
+
require("core-js/modules/es.array.push.js");
|
|
8
|
+
var _imports = require("../imports");
|
|
7
9
|
const isTrueValue = value => {
|
|
8
10
|
return value === 'true' || !!value;
|
|
9
11
|
};
|
|
@@ -23,4 +25,21 @@ exports.getEasemobRestIpList = getEasemobRestIpList;
|
|
|
23
25
|
const isEndpointRegionDisabled = parameters => {
|
|
24
26
|
return isTrueValue(parameters?.core?.disableEndpointRegion);
|
|
25
27
|
};
|
|
26
|
-
exports.isEndpointRegionDisabled = isEndpointRegionDisabled;
|
|
28
|
+
exports.isEndpointRegionDisabled = isEndpointRegionDisabled;
|
|
29
|
+
const getRtcPresetParameters = () => {
|
|
30
|
+
let parameters = [];
|
|
31
|
+
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.WINDOWS) {
|
|
32
|
+
parameters.push('{\"engine.video.hw_decoder_provider\":\"qsv\"}', '{\"rtc.video.default_hw_decoder_thres\":921600}');
|
|
33
|
+
}
|
|
34
|
+
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.MACOS) {
|
|
35
|
+
parameters.push('{\"che.video.screenCaptureMode\":1}');
|
|
36
|
+
}
|
|
37
|
+
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.WINDOWS || (0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.MACOS) {
|
|
38
|
+
parameters.push('{\"che.video.videoCodecIndex\": 1}', '{\"rtc.video.new_complexity\": true}', '{\"rtc.video.default_complexity\": 1027}', '{\"rtc.video.enable_doc_screen_share_sr\":true}', '{\"rtc.video.enable_pvc\":false}', '{\"che.video.brightness_detection_enable\":false} ', '{\"che.audio.bitrate_level\":1}', '{\"rtc.video.downMaxRetryTimes\":5}', '{\"che.video.vqc_min_width\": 1280}', '{\"che.video.vqc_min_height\": 720}', '{\"che.video.lowest_dev_score_4_seg\":0}', '{\"che.video.lowest_dev_score_4_beauty\":0}', '{\"rtc.video.color_space_enable\":true}', '{\"rtc.video.videoFullrange\":1}', '{\"rtc.video.matrixCoefficients\":5}', '{\"che.video.screen_disable_frame_transparent_check\":true}');
|
|
39
|
+
}
|
|
40
|
+
if ((0, _imports.getPlatform)() == _imports.FcrApplicationPlatform.WEB_DESKTOP) {
|
|
41
|
+
parameters.push('{\"RESTRICTION_SET_PLAYBACK_DEVICE\":false}');
|
|
42
|
+
}
|
|
43
|
+
return parameters;
|
|
44
|
+
};
|
|
45
|
+
exports.getRtcPresetParameters = getRtcPresetParameters;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fcr-core",
|
|
3
3
|
"description": "Core APIs for building online scenes",
|
|
4
|
-
"version": "3.7.
|
|
4
|
+
"version": "3.7.4",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/lodash": "^4.14.168",
|
|
41
41
|
"@types/sinon": "^17.0.2",
|
|
42
42
|
"@types/uuid": "^8.3.0",
|
|
43
|
-
"agora-toolchain": "~3.7.
|
|
43
|
+
"agora-toolchain": "~3.7.4",
|
|
44
44
|
"core-js": "^3.33.3",
|
|
45
45
|
"decomment": "^0.9.5",
|
|
46
46
|
"husky": "^9.0.11",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"typescript": "^5.3.2"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@netless/forge-room": "0.
|
|
56
|
-
"@netless/forge-rtm": "0.
|
|
57
|
-
"@netless/forge-whiteboard": "0.
|
|
58
|
-
"agora-foundation": "~3.7.
|
|
59
|
-
"agora-rte-sdk": "~3.7.
|
|
55
|
+
"@netless/forge-room": "1.0.6",
|
|
56
|
+
"@netless/forge-rtm": "1.0.6",
|
|
57
|
+
"@netless/forge-whiteboard": "1.0.6",
|
|
58
|
+
"agora-foundation": "~3.7.4",
|
|
59
|
+
"agora-rte-sdk": "~3.7.4",
|
|
60
60
|
"await-to-js": "^3.0.0",
|
|
61
61
|
"dayjs": "^1.10.4",
|
|
62
62
|
"easemob-websdk": "4.13.0",
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"lint-staged": {
|
|
87
87
|
"*.{ts,tsx,html,css}": "prettier --write"
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|