fcr-core 3.10.2 → 3.10.5
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.js +102 -108
- package/lib/imports.js +1 -0
- package/lib/media-control/desktop.js +22 -13
- package/lib/media-control/mobile.js +27 -19
- package/lib/media-control/type.d.ts +3 -3
- package/lib/monitor-control/index.js +17 -7
- package/lib/peer-session/index.js +120 -121
- package/lib/plugins/chat/chatroom.js +119 -96
- package/lib/plugins/chat/connector.js +69 -48
- package/lib/remote-control/index.js +194 -216
- package/lib/room-control/ability-control/index.js +20 -10
- package/lib/room-control/application-control/index.js +82 -75
- package/lib/room-control/group-control/index.js +31 -30
- package/lib/room-control/helpers/board-init-info-helper.js +16 -10
- package/lib/room-control/helpers/validation-helper.js +1 -1
- package/lib/room-control/index.js +70 -51
- package/lib/room-control/infinity-room-control/index.js +27 -19
- package/lib/room-control/interpreter-control/index.js +77 -65
- package/lib/room-control/interpreter-control/room.js +6 -4
- package/lib/room-control/join-before-host-waitingroom-control/index.js +6 -4
- package/lib/room-control/mainroom-control/index.js +37 -25
- package/lib/room-control/privilege-control/helper.js +28 -13
- package/lib/room-control/privilege-control/index.js +36 -28
- package/lib/room-control/room-connector-control/index.js +52 -49
- package/lib/room-control/room-connector-control/type.d.ts +1 -1
- package/lib/room-control/room-control-factory.js +10 -12
- package/lib/room-control/room-session/index.js +77 -74
- package/lib/room-control/shared-cache.js +63 -56
- package/lib/room-control/sharing-control/index.js +65 -57
- package/lib/room-control/stream-control/index.js +197 -193
- package/lib/room-control/stt-control/de-compress-gzip.js +10 -0
- package/lib/room-control/stt-control/index.js +93 -86
- package/lib/room-control/user-control/index.js +162 -155
- package/lib/room-control/waitingroom-control/index.js +18 -9
- package/lib/room-control/whiteboard-control/utils.js +4 -2
- package/lib/room-control/whiteboard-control-v1/board-subwindow.js +2 -1
- package/lib/room-control/whiteboard-control-v1/board-window.js +120 -103
- package/lib/room-control/whiteboard-control-v1/factory.js +7 -4
- package/lib/room-control/whiteboard-control-v1/index.js +80 -67
- package/lib/room-control/whiteboard-control-v1/mount-manager.js +4 -2
- package/lib/room-control/whiteboard-control-v1/utils.js +17 -14
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +14 -10
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +17 -8
- package/lib/room-control/whiteboard-control-v2/base/index.js +61 -53
- package/lib/room-control/whiteboard-control-v2/base/main-window.js +39 -30
- package/lib/room-control/whiteboard-control-v2/utils.js +10 -10
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +45 -33
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.js +27 -11
- package/lib/room-control/widget-control/index.js +43 -33
- package/lib/room-router/index.js +66 -58
- package/lib/schema.d.ts +15 -15
- package/lib/service/api.js +446 -548
- package/lib/struct.js +5 -2
- package/lib/utilities/abortable-retry.js +3 -0
- package/lib/utilities/collection.js +15 -11
- package/lib/utilities/error-helpers.js +34 -27
- package/lib/utilities/error.js +4 -3
- package/lib/utilities/join-helper.js +37 -31
- package/lib/utilities/logger.js +8 -5
- package/lib/utilities/parameters.js +21 -10
- package/lib/utilities/retry-helpers.js +1 -0
- package/lib/utilities/stream.js +16 -11
- package/lib/utilities/user.js +4 -3
- package/lib/utilities/validate-params.js +1 -1
- package/lib/utilities/video-encoder-config.js +10 -5
- package/lib-es/engine/index.js +102 -108
- package/lib-es/media-control/desktop.js +22 -13
- package/lib-es/media-control/mobile.js +27 -19
- package/lib-es/monitor-control/index.js +16 -7
- package/lib-es/peer-session/index.js +120 -121
- package/lib-es/plugins/chat/chatroom.js +118 -95
- package/lib-es/plugins/chat/connector.js +67 -47
- package/lib-es/remote-control/index.js +194 -216
- package/lib-es/room-control/ability-control/index.js +19 -10
- package/lib-es/room-control/application-control/index.js +81 -75
- package/lib-es/room-control/group-control/index.js +31 -30
- package/lib-es/room-control/helpers/board-init-info-helper.js +15 -10
- package/lib-es/room-control/helpers/validation-helper.js +1 -1
- package/lib-es/room-control/index.js +69 -51
- package/lib-es/room-control/infinity-room-control/index.js +26 -19
- package/lib-es/room-control/interpreter-control/index.js +77 -65
- package/lib-es/room-control/interpreter-control/room.js +5 -4
- package/lib-es/room-control/join-before-host-waitingroom-control/index.js +5 -4
- package/lib-es/room-control/mainroom-control/index.js +37 -25
- package/lib-es/room-control/privilege-control/helper.js +27 -13
- package/lib-es/room-control/privilege-control/index.js +36 -28
- package/lib-es/room-control/room-connector-control/index.js +52 -49
- package/lib-es/room-control/room-control-factory.js +10 -12
- package/lib-es/room-control/room-session/index.js +77 -74
- package/lib-es/room-control/shared-cache.js +62 -56
- package/lib-es/room-control/sharing-control/index.js +64 -57
- package/lib-es/room-control/stream-control/index.js +197 -193
- package/lib-es/room-control/stt-control/de-compress-gzip.js +10 -0
- package/lib-es/room-control/stt-control/index.js +93 -86
- package/lib-es/room-control/user-control/index.js +162 -155
- package/lib-es/room-control/waitingroom-control/index.js +18 -9
- package/lib-es/room-control/whiteboard-control/utils.js +4 -2
- package/lib-es/room-control/whiteboard-control-v1/board-subwindow.js +2 -1
- package/lib-es/room-control/whiteboard-control-v1/board-window.js +120 -103
- package/lib-es/room-control/whiteboard-control-v1/factory.js +6 -4
- package/lib-es/room-control/whiteboard-control-v1/index.js +80 -67
- package/lib-es/room-control/whiteboard-control-v1/mount-manager.js +3 -2
- package/lib-es/room-control/whiteboard-control-v1/utils.js +17 -14
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/control.js +13 -10
- package/lib-es/room-control/whiteboard-control-v2/annotation-control/factory.js +16 -8
- package/lib-es/room-control/whiteboard-control-v2/base/index.js +60 -53
- package/lib-es/room-control/whiteboard-control-v2/base/main-window.js +39 -30
- package/lib-es/room-control/whiteboard-control-v2/utils.js +10 -10
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/control.js +45 -33
- package/lib-es/room-control/whiteboard-control-v2/whiteboard-control/factory.js +26 -11
- package/lib-es/room-control/widget-control/index.js +42 -33
- package/lib-es/room-router/index.js +66 -58
- package/lib-es/service/api.js +445 -548
- package/lib-es/struct.js +4 -2
- package/lib-es/utilities/abortable-retry.js +3 -0
- package/lib-es/utilities/collection.js +14 -11
- package/lib-es/utilities/error-helpers.js +33 -26
- package/lib-es/utilities/error.js +4 -3
- package/lib-es/utilities/join-helper.js +36 -29
- package/lib-es/utilities/logger.js +7 -5
- package/lib-es/utilities/parameters.js +21 -10
- package/lib-es/utilities/retry-helpers.js +1 -0
- package/lib-es/utilities/stream.js +15 -11
- package/lib-es/utilities/user.js +4 -3
- package/lib-es/utilities/validate-params.js +1 -1
- package/lib-es/utilities/video-encoder-config.js +10 -5
- package/package.json +4 -4
package/lib-es/struct.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import "core-js/modules/es.array.unshift.js";
|
|
3
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
1
4
|
import { FcrDualVideoStreamConfig } from './utilities/dual-video-stream-config';
|
|
2
5
|
import { getRtcPresetParameters } from './utilities/parameters';
|
|
3
6
|
|
|
4
7
|
/** 引擎配置类 */
|
|
5
8
|
export class FcrCoreEngineConfig {
|
|
6
|
-
__json_serializable__ = true;
|
|
7
|
-
|
|
8
9
|
/** 应用唯一标识 */
|
|
9
10
|
|
|
10
11
|
/** 身份验证令牌 */
|
|
@@ -20,6 +21,7 @@ export class FcrCoreEngineConfig {
|
|
|
20
21
|
/** 额外参数配置 */
|
|
21
22
|
|
|
22
23
|
constructor(params) {
|
|
24
|
+
_defineProperty(this, "__json_serializable__", true);
|
|
23
25
|
this.appId = params.appId;
|
|
24
26
|
this.token = params.token;
|
|
25
27
|
this.userId = params.userId;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
2
|
+
import "core-js/modules/web.dom-exception.constructor.js";
|
|
1
3
|
import "core-js/modules/web.dom-exception.stack.js";
|
|
4
|
+
import "core-js/modules/web.dom-exception.to-string-tag.js";
|
|
2
5
|
import { retryAttempt, to } from '../imports';
|
|
3
6
|
/**
|
|
4
7
|
* Creates an abortable retry operation that can be cancelled at any time.
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import "core-js/modules/es.array.push.js";
|
|
3
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
2
4
|
export const iterateMap = (map, processors) => {
|
|
3
|
-
const onFilter = processors
|
|
4
|
-
const {
|
|
5
|
-
onMap,
|
|
6
|
-
onReduce
|
|
7
|
-
} = processors || {};
|
|
5
|
+
const onFilter = (processors === null || processors === void 0 ? void 0 : processors.onFilter) || (() => true);
|
|
6
|
+
const _ref = processors || {},
|
|
7
|
+
onMap = _ref.onMap,
|
|
8
|
+
onReduce = _ref.onReduce;
|
|
8
9
|
const list = [];
|
|
9
10
|
let prev = undefined;
|
|
10
|
-
for (const
|
|
11
|
+
for (const _ref2 of map.entries()) {
|
|
12
|
+
var _ref3 = _slicedToArray(_ref2, 2);
|
|
13
|
+
const k = _ref3[0];
|
|
14
|
+
const v = _ref3[1];
|
|
11
15
|
if (onFilter(k, v)) {
|
|
12
16
|
if (onMap) list.push(onMap(k, v));
|
|
13
17
|
if (onReduce) prev = onReduce(prev, k, v);
|
|
@@ -19,11 +23,10 @@ export const iterateMap = (map, processors) => {
|
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
export const iterateSet = (map, processors) => {
|
|
22
|
-
const onFilter = processors
|
|
23
|
-
const {
|
|
24
|
-
onMap,
|
|
25
|
-
onReduce
|
|
26
|
-
} = processors || {};
|
|
26
|
+
const onFilter = (processors === null || processors === void 0 ? void 0 : processors.onFilter) || (() => true);
|
|
27
|
+
const _ref4 = processors || {},
|
|
28
|
+
onMap = _ref4.onMap,
|
|
29
|
+
onReduce = _ref4.onReduce;
|
|
27
30
|
const list = [];
|
|
28
31
|
let prev = undefined;
|
|
29
32
|
for (const item of map.values()) {
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import "core-js/modules/es.array.push.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
3
|
+
import "core-js/modules/esnext.iterator.filter.js";
|
|
4
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
|
+
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; }
|
|
7
|
+
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) { _defineProperty(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; }
|
|
1
8
|
/**
|
|
2
9
|
* 通用错误处理辅助工具
|
|
3
10
|
*
|
|
@@ -37,14 +44,14 @@ export let ControllerType = /*#__PURE__*/function (ControllerType) {
|
|
|
37
44
|
* 错误处理助手类 - 支持实例化配置
|
|
38
45
|
*/
|
|
39
46
|
export class FcrErrorHelper {
|
|
40
|
-
constructor(
|
|
41
|
-
|
|
47
|
+
constructor() {
|
|
48
|
+
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
49
|
+
this.config = _objectSpread({
|
|
42
50
|
defaultModuleCode: ErrorModuleCode.FCR_ROOM,
|
|
43
51
|
enableDetailedMessages: true,
|
|
44
52
|
logPrefix: 'FCR',
|
|
45
|
-
autoLog: false
|
|
46
|
-
|
|
47
|
-
};
|
|
53
|
+
autoLog: false
|
|
54
|
+
}, config);
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
50
57
|
* 生成控制器未初始化错误
|
|
@@ -53,11 +60,11 @@ export class FcrErrorHelper {
|
|
|
53
60
|
* @returns FcrError
|
|
54
61
|
*/
|
|
55
62
|
createControllerNotInitializedError(controllerType, moduleCode) {
|
|
56
|
-
const module = moduleCode
|
|
57
|
-
const message = this.config.enableDetailedMessages ?
|
|
63
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
64
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] The ").concat(controllerType, " controller is not initialized, please join the room first") : "".concat(controllerType, " controller not initialized");
|
|
58
65
|
const error = generateFcrCoreClientError(module, DetailErrorCode.NOT_JOINED_ROOM, message);
|
|
59
66
|
if (this.config.autoLog) {
|
|
60
|
-
console.error(
|
|
67
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message));
|
|
61
68
|
}
|
|
62
69
|
return error;
|
|
63
70
|
}
|
|
@@ -70,11 +77,11 @@ export class FcrErrorHelper {
|
|
|
70
77
|
* @returns FcrError
|
|
71
78
|
*/
|
|
72
79
|
createOperationConflictError(operation, reason, moduleCode) {
|
|
73
|
-
const module = moduleCode
|
|
74
|
-
const message = this.config.enableDetailedMessages ?
|
|
80
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
81
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] Failed to ").concat(operation, ": ").concat(reason) : "".concat(operation, " failed: ").concat(reason);
|
|
75
82
|
const error = generateFcrCoreClientError(module, DetailErrorCode.JOIN_CONFLICT, message);
|
|
76
83
|
if (this.config.autoLog) {
|
|
77
|
-
console.error(
|
|
84
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message));
|
|
78
85
|
}
|
|
79
86
|
return error;
|
|
80
87
|
}
|
|
@@ -86,11 +93,11 @@ export class FcrErrorHelper {
|
|
|
86
93
|
* @returns FcrError
|
|
87
94
|
*/
|
|
88
95
|
createOperationCanceledError(operation, moduleCode) {
|
|
89
|
-
const module = moduleCode
|
|
90
|
-
const message = this.config.enableDetailedMessages ?
|
|
96
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
97
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] ").concat(operation, " operation has been cancelled") : "".concat(operation, " cancelled");
|
|
91
98
|
const error = generateFcrCoreClientError(module, DetailErrorCode.NOT_JOINED_ROOM, message);
|
|
92
99
|
if (this.config.autoLog) {
|
|
93
|
-
console.error(
|
|
100
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message));
|
|
94
101
|
}
|
|
95
102
|
return error;
|
|
96
103
|
}
|
|
@@ -102,11 +109,11 @@ export class FcrErrorHelper {
|
|
|
102
109
|
* @returns FcrError
|
|
103
110
|
*/
|
|
104
111
|
createSendMessageError(originalError, moduleCode) {
|
|
105
|
-
const module = moduleCode
|
|
106
|
-
const message = this.config.enableDetailedMessages ?
|
|
112
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
113
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] Send message failed: ").concat(originalError.message) : 'send message failed';
|
|
107
114
|
const error = generateFcrCoreClientError(module, DetailErrorCode.UNDEFINED_ERROR, message);
|
|
108
115
|
if (this.config.autoLog) {
|
|
109
|
-
console.error(
|
|
116
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message), originalError);
|
|
110
117
|
}
|
|
111
118
|
return error;
|
|
112
119
|
}
|
|
@@ -119,11 +126,11 @@ export class FcrErrorHelper {
|
|
|
119
126
|
* @returns FcrError
|
|
120
127
|
*/
|
|
121
128
|
createOperationError(operation, originalError, moduleCode) {
|
|
122
|
-
const module = moduleCode
|
|
123
|
-
const message = this.config.enableDetailedMessages ?
|
|
129
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
130
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] ").concat(operation, " failed").concat(originalError ? ": ".concat(originalError.message) : '') : "".concat(operation, " failed");
|
|
124
131
|
const error = generateFcrCoreClientError(module, DetailErrorCode.NOT_JOINED_ROOM, message);
|
|
125
132
|
if (this.config.autoLog) {
|
|
126
|
-
console.error(
|
|
133
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message), originalError);
|
|
127
134
|
}
|
|
128
135
|
return error;
|
|
129
136
|
}
|
|
@@ -135,11 +142,11 @@ export class FcrErrorHelper {
|
|
|
135
142
|
* @returns FcrError
|
|
136
143
|
*/
|
|
137
144
|
createNetworkError(message, moduleCode) {
|
|
138
|
-
const module = moduleCode
|
|
139
|
-
const formattedMessage = this.config.enableDetailedMessages ?
|
|
145
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
146
|
+
const formattedMessage = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] Network error: ").concat(message) : message;
|
|
140
147
|
const error = generateFcrCoreClientError(module, DetailErrorCode.LOCAL_HTTP_REQUEST_FAILED, formattedMessage);
|
|
141
148
|
if (this.config.autoLog) {
|
|
142
|
-
console.error(
|
|
149
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(formattedMessage));
|
|
143
150
|
}
|
|
144
151
|
return error;
|
|
145
152
|
}
|
|
@@ -152,11 +159,11 @@ export class FcrErrorHelper {
|
|
|
152
159
|
* @returns FcrError
|
|
153
160
|
*/
|
|
154
161
|
createInvalidParamsError(paramName, reason, moduleCode) {
|
|
155
|
-
const module = moduleCode
|
|
156
|
-
const message = this.config.enableDetailedMessages ?
|
|
162
|
+
const module = moduleCode !== null && moduleCode !== void 0 ? moduleCode : this.config.defaultModuleCode;
|
|
163
|
+
const message = this.config.enableDetailedMessages ? "[".concat(this.config.logPrefix, "] Invalid parameter '").concat(paramName, "': ").concat(reason) : "Invalid parameter '".concat(paramName, "': ").concat(reason);
|
|
157
164
|
const error = generateFcrCoreClientError(module, DetailErrorCode.INVALID_PARAMS, message);
|
|
158
165
|
if (this.config.autoLog) {
|
|
159
|
-
console.error(
|
|
166
|
+
console.error("".concat(this.config.logPrefix, ": ").concat(message));
|
|
160
167
|
}
|
|
161
168
|
return error;
|
|
162
169
|
}
|
|
@@ -10,7 +10,7 @@ export const generateFcrCoreClientError = (module, code, message, cause) => {
|
|
|
10
10
|
return FcrError.create(ErrorServiceType.FCR_CLIENT, module, code, message, cause);
|
|
11
11
|
};
|
|
12
12
|
export const generateFcrCoreServerError = (code, message) => {
|
|
13
|
-
const errorCode = Number(
|
|
13
|
+
const errorCode = Number("".concat(ErrorServiceType.FCR_SERVER).concat(padStart(String(code), 8, '0')));
|
|
14
14
|
const error = new FcrError({
|
|
15
15
|
message: message,
|
|
16
16
|
code: errorCode
|
|
@@ -24,10 +24,11 @@ export const handleRequestError = async (action, errorModuleCode, errorMessage)
|
|
|
24
24
|
return await action();
|
|
25
25
|
} catch (e) {
|
|
26
26
|
if (e instanceof AgoraRestfulClientError) {
|
|
27
|
-
|
|
27
|
+
var _e$serviceCode;
|
|
28
|
+
throw generateFcrCoreServerError((_e$serviceCode = e.serviceCode) !== null && _e$serviceCode !== void 0 ? _e$serviceCode : -1, e.message);
|
|
28
29
|
}
|
|
29
30
|
const error = e;
|
|
30
|
-
throw generateFcrCoreClientError(errorModuleCode, DetailErrorCode.UNDEFINED_ERROR, errorMessage
|
|
31
|
+
throw generateFcrCoreClientError(errorModuleCode, DetailErrorCode.UNDEFINED_ERROR, errorMessage !== null && errorMessage !== void 0 ? errorMessage : error.message);
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import "core-js/modules/es.array.push.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.filter.js";
|
|
3
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
1
6
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
7
|
import "core-js/modules/esnext.iterator.map.js";
|
|
8
|
+
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; }
|
|
9
|
+
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) { _defineProperty(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; }
|
|
3
10
|
/**
|
|
4
11
|
* 房间加入辅助工具
|
|
5
12
|
*
|
|
@@ -23,14 +30,15 @@ import { ROOM_CONTROL_CONSTANTS } from '../room-control/helpers/constants';
|
|
|
23
30
|
* @param logPrefix 日志前缀
|
|
24
31
|
* @returns 是否继续重试
|
|
25
32
|
*/
|
|
26
|
-
export async function handleJoinRetryFailure(error, waitBeforeRetry, attemptCount, canRetryFn, onAborted
|
|
27
|
-
|
|
33
|
+
export async function handleJoinRetryFailure(error, waitBeforeRetry, attemptCount, canRetryFn, onAborted) {
|
|
34
|
+
let logPrefix = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'join room';
|
|
35
|
+
onAborted === null || onAborted === void 0 || onAborted();
|
|
28
36
|
if (!canRetryFn(error)) {
|
|
29
37
|
throw error;
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
// 记录重试信息
|
|
33
|
-
console.warn(
|
|
41
|
+
console.warn("Retry attempt ".concat(attemptCount + 1, " to ").concat(logPrefix, ": ").concat(error.message));
|
|
34
42
|
await waitBeforeRetry();
|
|
35
43
|
return true;
|
|
36
44
|
}
|
|
@@ -61,33 +69,31 @@ export class FcrJoinHelper {
|
|
|
61
69
|
* @returns CheckIn参数对象
|
|
62
70
|
*/
|
|
63
71
|
static buildCheckInParams(options, userId, roomId, extraParams) {
|
|
64
|
-
|
|
72
|
+
var _options$platform, _options$createStream;
|
|
73
|
+
return _objectSpread(_objectSpread({
|
|
65
74
|
userName: options.userName,
|
|
66
75
|
userId,
|
|
67
76
|
userRole: FcrUserRoleToStringMap[options.userRole],
|
|
68
77
|
userProperties: options.userProperties,
|
|
69
78
|
roomId,
|
|
70
|
-
platform: options.platform
|
|
71
|
-
streams: options.createStreamConfigs
|
|
79
|
+
platform: (_options$platform = options.platform) !== null && _options$platform !== void 0 ? _options$platform : getPlatform(),
|
|
80
|
+
streams: (_options$createStream = options.createStreamConfigs) === null || _options$createStream === void 0 ? void 0 : _options$createStream.map(s => _objectSpread(_objectSpread({
|
|
72
81
|
videoSourceUuid: s.videoSourceId,
|
|
73
82
|
audioSourceUuid: s.audioSourceId,
|
|
74
|
-
streamName: s.streamName
|
|
75
|
-
|
|
83
|
+
streamName: s.streamName
|
|
84
|
+
}, convertStreamTypeToPublishState(s.streamType)), {}, {
|
|
76
85
|
videoSourceType: s.videoSourceType,
|
|
77
86
|
audioSourceType: s.audioSourceType,
|
|
78
87
|
audioSourceState: s.audioSourceState,
|
|
79
88
|
videoSourceState: s.videoSourceState
|
|
80
89
|
})),
|
|
81
90
|
version: getVersion(),
|
|
82
|
-
password: options.password
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
avatar: extraParams.avatar
|
|
89
|
-
})
|
|
90
|
-
};
|
|
91
|
+
password: options.password
|
|
92
|
+
}, (extraParams === null || extraParams === void 0 ? void 0 : extraParams.bypass) !== undefined && {
|
|
93
|
+
bypass: extraParams.bypass
|
|
94
|
+
}), (extraParams === null || extraParams === void 0 ? void 0 : extraParams.avatar) !== undefined && {
|
|
95
|
+
avatar: extraParams.avatar
|
|
96
|
+
});
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
/**
|
|
@@ -112,7 +118,8 @@ export class FcrJoinHelper {
|
|
|
112
118
|
* @param useInternalApi 是否使用 checkInInternal API(默认 true)
|
|
113
119
|
* @returns CheckIn响应数据
|
|
114
120
|
*/
|
|
115
|
-
async performCheckIn(options, extraParams
|
|
121
|
+
async performCheckIn(options, extraParams) {
|
|
122
|
+
let useInternalApi = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
116
123
|
const checkInParams = this._buildCheckInParams(options, extraParams);
|
|
117
124
|
const apiCall = useInternalApi ? () => this._api.checkInInternal(checkInParams) : () => this._api.checkIn(checkInParams);
|
|
118
125
|
const errorMessage = useInternalApi ? 'check in internal failed' : 'check in failed';
|
|
@@ -135,11 +142,11 @@ export class FcrJoinHelper {
|
|
|
135
142
|
*/
|
|
136
143
|
async joinWithCheckIn(options, onJoinAborted) {
|
|
137
144
|
await retryAttempt(async () => {
|
|
145
|
+
var _options$roomToken;
|
|
138
146
|
// 1. 执行 CheckIn(单次调用,无内部重试)
|
|
139
|
-
const
|
|
140
|
-
data,
|
|
141
|
-
ts
|
|
142
|
-
} = await this.performCheckIn(options);
|
|
147
|
+
const _await$this$performCh = await this.performCheckIn(options),
|
|
148
|
+
data = _await$this$performCh.data,
|
|
149
|
+
ts = _await$this$performCh.ts;
|
|
143
150
|
|
|
144
151
|
// 2. 检查是否中止
|
|
145
152
|
if (onJoinAborted) {
|
|
@@ -147,7 +154,7 @@ export class FcrJoinHelper {
|
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
// 3. 使用 CheckIn 结果加入房间
|
|
150
|
-
await this._joinScene(options.streamLatency, options.streamEncryptionConfig, data, ts, options.roomToken
|
|
157
|
+
await this._joinScene(options.streamLatency, options.streamEncryptionConfig, data, ts, (_options$roomToken = options.roomToken) !== null && _options$roomToken !== void 0 ? _options$roomToken : '', undefined);
|
|
151
158
|
|
|
152
159
|
// 4. 再次检查是否中止
|
|
153
160
|
if (onJoinAborted) {
|
|
@@ -155,11 +162,10 @@ export class FcrJoinHelper {
|
|
|
155
162
|
}
|
|
156
163
|
}, [], {
|
|
157
164
|
retriesMax: ROOM_CONTROL_CONSTANTS.MAX_JOIN_ATTEMPTS
|
|
158
|
-
}).fail(async
|
|
159
|
-
error,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}) => {
|
|
165
|
+
}).fail(async _ref => {
|
|
166
|
+
let error = _ref.error,
|
|
167
|
+
waitBeforeRetry = _ref.timeFn,
|
|
168
|
+
attemptCount = _ref.currentRetry;
|
|
163
169
|
return handleJoinRetryFailure(error, waitBeforeRetry, attemptCount, canRetryJoinError, onJoinAborted, 'join room via CheckIn');
|
|
164
170
|
}).exec();
|
|
165
171
|
}
|
|
@@ -215,6 +221,7 @@ export class FcrJoinHelper {
|
|
|
215
221
|
* @private
|
|
216
222
|
*/
|
|
217
223
|
async _joinWithSnapshot(options, onJoinAborted) {
|
|
218
|
-
|
|
224
|
+
var _options$roomToken2;
|
|
225
|
+
await this._joinScene(options.streamLatency || FcrStreamLatencyLevel.ULTRA_LOW, options.streamEncryptionConfig, options.snapshot, options.timestamp, (_options$roomToken2 = options.roomToken) !== null && _options$roomToken2 !== void 0 ? _options$roomToken2 : '', onJoinAborted);
|
|
219
226
|
}
|
|
220
227
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
|
1
3
|
import { LoggerManager } from '../imports';
|
|
2
4
|
export class FcrCoreLoggerManagerHolder {
|
|
3
|
-
static instance = null;
|
|
4
|
-
static isDestroying = false;
|
|
5
|
-
static label = 'fcr-core';
|
|
6
5
|
static initialize(opts) {
|
|
7
6
|
if (this.instance && !this.isDestroying) {
|
|
8
|
-
console.warn(
|
|
7
|
+
console.warn("".concat(this.label, " LoggerManager is already initialized. Reinitializing..."));
|
|
9
8
|
}
|
|
10
9
|
this.destroy();
|
|
11
10
|
this.instance = new LoggerManager({
|
|
@@ -15,7 +14,7 @@ export class FcrCoreLoggerManagerHolder {
|
|
|
15
14
|
}
|
|
16
15
|
static getInstance() {
|
|
17
16
|
if (!this.instance) {
|
|
18
|
-
throw new Error(
|
|
17
|
+
throw new Error("LoggerManager is not initialized. Call ".concat(this.label, " LoggerManager.initialize() first."));
|
|
19
18
|
}
|
|
20
19
|
return this.instance;
|
|
21
20
|
}
|
|
@@ -43,6 +42,9 @@ export class FcrCoreLoggerManagerHolder {
|
|
|
43
42
|
return this.instance !== null;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
45
|
+
_defineProperty(FcrCoreLoggerManagerHolder, "instance", null);
|
|
46
|
+
_defineProperty(FcrCoreLoggerManagerHolder, "isDestroying", false);
|
|
47
|
+
_defineProperty(FcrCoreLoggerManagerHolder, "label", 'fcr-core');
|
|
46
48
|
export const getLogger = FcrCoreLoggerManagerHolder.getLogger.bind(FcrCoreLoggerManagerHolder);
|
|
47
49
|
export const createLogger = FcrCoreLoggerManagerHolder.createLogger.bind(FcrCoreLoggerManagerHolder);
|
|
48
50
|
export const generateLogObserver = FcrCoreLoggerManagerHolder.generateLogObserver.bind(FcrCoreLoggerManagerHolder);
|
|
@@ -22,6 +22,7 @@ import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
|
|
22
22
|
import "core-js/modules/esnext.set.symmetric-difference.js";
|
|
23
23
|
import "core-js/modules/esnext.set.union.v2.js";
|
|
24
24
|
import "core-js/modules/esnext.set.union.js";
|
|
25
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
25
26
|
import { FcrApplicationPlatform, getPlatform, isBoolean, isNumber } from '../imports';
|
|
26
27
|
const DEFAULT_LOG_FILE_SIZE = 512;
|
|
27
28
|
/** RTC preset parameters configuration mapping table */
|
|
@@ -106,40 +107,49 @@ export const isTrueValue = value => {
|
|
|
106
107
|
return value === 'true' || !!value;
|
|
107
108
|
};
|
|
108
109
|
export const getCoreIpList = parameters => {
|
|
109
|
-
|
|
110
|
+
var _parameters$core;
|
|
111
|
+
return parameters === null || parameters === void 0 || (_parameters$core = parameters.core) === null || _parameters$core === void 0 ? void 0 : _parameters$core.coreIpList;
|
|
110
112
|
};
|
|
111
113
|
export const getEasemobChatIpList = parameters => {
|
|
112
|
-
|
|
114
|
+
var _parameters$core2;
|
|
115
|
+
return parameters === null || parameters === void 0 || (_parameters$core2 = parameters.core) === null || _parameters$core2 === void 0 ? void 0 : _parameters$core2.easemobChatIpList;
|
|
113
116
|
};
|
|
114
117
|
export const getEasemobRestIpList = parameters => {
|
|
115
|
-
|
|
118
|
+
var _parameters$core3;
|
|
119
|
+
return parameters === null || parameters === void 0 || (_parameters$core3 = parameters.core) === null || _parameters$core3 === void 0 ? void 0 : _parameters$core3.easemobRestIpList;
|
|
116
120
|
};
|
|
117
121
|
export const getScribbleForgeIpList = parameters => {
|
|
118
|
-
|
|
122
|
+
var _parameters$core4;
|
|
123
|
+
return parameters === null || parameters === void 0 || (_parameters$core4 = parameters.core) === null || _parameters$core4 === void 0 ? void 0 : _parameters$core4.scribbleForgeIpList;
|
|
119
124
|
};
|
|
120
125
|
export const isEndpointRegionDisabled = parameters => {
|
|
121
|
-
|
|
126
|
+
var _parameters$core5;
|
|
127
|
+
return isTrueValue(parameters === null || parameters === void 0 || (_parameters$core5 = parameters.core) === null || _parameters$core5 === void 0 ? void 0 : _parameters$core5.disableEndpointRegion);
|
|
122
128
|
};
|
|
123
129
|
export const getNeedLogUpload = parameters => {
|
|
124
|
-
|
|
130
|
+
var _parameters$core6;
|
|
131
|
+
if (isBoolean(parameters === null || parameters === void 0 || (_parameters$core6 = parameters.core) === null || _parameters$core6 === void 0 ? void 0 : _parameters$core6.needLogUpload)) {
|
|
125
132
|
return parameters.core.needLogUpload;
|
|
126
133
|
}
|
|
127
134
|
return true;
|
|
128
135
|
};
|
|
129
136
|
export const getCoreLogFileSize = parameters => {
|
|
130
|
-
|
|
137
|
+
var _parameters$core7;
|
|
138
|
+
if (!isNumber(parameters === null || parameters === void 0 || (_parameters$core7 = parameters.core) === null || _parameters$core7 === void 0 ? void 0 : _parameters$core7.coreLogFileSize)) {
|
|
131
139
|
return DEFAULT_LOG_FILE_SIZE;
|
|
132
140
|
}
|
|
133
141
|
return parameters.core.coreLogFileSize;
|
|
134
142
|
};
|
|
135
143
|
export const getEasemobLogFileSize = parameters => {
|
|
136
|
-
|
|
144
|
+
var _parameters$core8;
|
|
145
|
+
if (!isNumber(parameters === null || parameters === void 0 || (_parameters$core8 = parameters.core) === null || _parameters$core8 === void 0 ? void 0 : _parameters$core8.easemobLogFileSize)) {
|
|
137
146
|
return DEFAULT_LOG_FILE_SIZE;
|
|
138
147
|
}
|
|
139
148
|
return parameters.core.easemobLogFileSize;
|
|
140
149
|
};
|
|
141
150
|
export const getNetlessLogFileSize = parameters => {
|
|
142
|
-
|
|
151
|
+
var _parameters$core9;
|
|
152
|
+
if (!isNumber(parameters === null || parameters === void 0 || (_parameters$core9 = parameters.core) === null || _parameters$core9 === void 0 ? void 0 : _parameters$core9.netlessLogFileSize)) {
|
|
143
153
|
return DEFAULT_LOG_FILE_SIZE;
|
|
144
154
|
}
|
|
145
155
|
return parameters.core.netlessLogFileSize;
|
|
@@ -147,8 +157,9 @@ export const getNetlessLogFileSize = parameters => {
|
|
|
147
157
|
/** desktop platforms set */
|
|
148
158
|
const DESKTOP_PLATFORMS = new Set([FcrApplicationPlatform.WINDOWS, FcrApplicationPlatform.MACOS]);
|
|
149
159
|
export const getRtcPresetParameters = () => {
|
|
160
|
+
var _RTC_PRESET_PARAMS_MA;
|
|
150
161
|
const platform = getPlatform();
|
|
151
|
-
const platformParams = RTC_PRESET_PARAMS_MAP[platform]
|
|
162
|
+
const platformParams = (_RTC_PRESET_PARAMS_MA = RTC_PRESET_PARAMS_MAP[platform]) !== null && _RTC_PRESET_PARAMS_MA !== void 0 ? _RTC_PRESET_PARAMS_MA : [];
|
|
152
163
|
const electronParams = ELECTRON_PLATFORMS.has(platform) ? ELECTRON_COMMON_PARAMS : [];
|
|
153
164
|
const harmonyOrElectronParams = HARMONY_OR_ELECTRON_PLATFORMS.has(platform) ? HARMONY_OR_ELECTRON_COMMON_PARAMS : [];
|
|
154
165
|
return [...platformParams, ...electronParams, ...harmonyOrElectronParams].map(p => JSON.stringify(p));
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import "core-js/modules/es.array.push.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.filter.js";
|
|
3
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
5
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
6
|
import "core-js/modules/esnext.iterator.map.js";
|
|
7
|
+
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; }
|
|
8
|
+
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) { _defineProperty(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; }
|
|
3
9
|
export const getStreamJoinConfig = stream => {
|
|
4
|
-
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
10
|
+
return _objectSpread(_objectSpread({}, stream), {}, {
|
|
11
|
+
videoSourceUuid: stream === null || stream === void 0 ? void 0 : stream.videoSourceId,
|
|
12
|
+
audioSourceUuid: stream === null || stream === void 0 ? void 0 : stream.audioSourceId
|
|
13
|
+
});
|
|
9
14
|
};
|
|
10
15
|
export const getStreamsJoinConfig = streams => {
|
|
11
|
-
return streams
|
|
12
|
-
return {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
16
|
+
return streams === null || streams === void 0 ? void 0 : streams.map(stream => {
|
|
17
|
+
return _objectSpread(_objectSpread({}, stream), {}, {
|
|
18
|
+
videoSourceUuid: stream === null || stream === void 0 ? void 0 : stream.videoSourceId,
|
|
19
|
+
audioSourceUuid: stream === null || stream === void 0 ? void 0 : stream.audioSourceId
|
|
20
|
+
});
|
|
17
21
|
});
|
|
18
22
|
};
|
package/lib-es/utilities/user.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FcrPlatform, FcrUserStringToRoleMap } from '../type';
|
|
2
2
|
import { FcrPrivilegeUserRoleToStringMap, FcrPrivilegeUserStringToRoleMap } from '../room-control/privilege-control/type';
|
|
3
3
|
export const convertRteUserToFcrUser = (user, cache) => {
|
|
4
|
+
var _cache$getUserPlatfor, _cache$getUserAvatar;
|
|
4
5
|
const userRole = FcrUserStringToRoleMap[user.userRole];
|
|
5
6
|
if (!userRole) {
|
|
6
7
|
return undefined;
|
|
7
8
|
}
|
|
8
|
-
let platform = cache.getUserPlatform(user.userId)
|
|
9
|
-
const avatar = cache.getUserAvatar(user.userId)
|
|
9
|
+
let platform = (_cache$getUserPlatfor = cache.getUserPlatform(user.userId)) !== null && _cache$getUserPlatfor !== void 0 ? _cache$getUserPlatfor : FcrPlatform.UNSUPPORTED;
|
|
10
|
+
const avatar = (_cache$getUserAvatar = cache.getUserAvatar(user.userId)) !== null && _cache$getUserAvatar !== void 0 ? _cache$getUserAvatar : '';
|
|
10
11
|
const isValidPlatform = platform in FcrPlatform;
|
|
11
12
|
platform = isValidPlatform ? platform : FcrPlatform.UNSUPPORTED;
|
|
12
13
|
return {
|
|
@@ -19,7 +20,7 @@ export const convertRteUserToFcrUser = (user, cache) => {
|
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
export const checkFcrUserRole = user => {
|
|
22
|
-
if (!user
|
|
23
|
+
if (!(user !== null && user !== void 0 && user.userRole)) return;
|
|
23
24
|
return user;
|
|
24
25
|
};
|
|
25
26
|
export const convertStringPrivilegeRoleToFcrPrivilegeRole = role => {
|
|
@@ -2,7 +2,7 @@ import { DetailErrorCode } from '../imports';
|
|
|
2
2
|
import { validateParams } from '../imports';
|
|
3
3
|
import { generateFcrCoreClientError } from './error';
|
|
4
4
|
export default validateParams(error => {
|
|
5
|
-
const message =
|
|
5
|
+
const message = "invalid params: ".concat(error.message);
|
|
6
6
|
const fcrErrorModuleCode = '00';
|
|
7
7
|
return generateFcrCoreClientError(fcrErrorModuleCode, DetailErrorCode.INVALID_PARAMS, message);
|
|
8
8
|
});
|
|
@@ -95,28 +95,33 @@ const SMOOTH_SCREEN_CONFIG_MAP = {
|
|
|
95
95
|
export let FcrVideoEncoderConfig;
|
|
96
96
|
(function (_FcrVideoEncoderConfig) {
|
|
97
97
|
function createDefaultHighCameraConfig() {
|
|
98
|
+
var _HIGH_CAMERA_CONFIG_M;
|
|
98
99
|
const platform = getPlatform();
|
|
99
|
-
return HIGH_CAMERA_CONFIG_MAP[platform]
|
|
100
|
+
return (_HIGH_CAMERA_CONFIG_M = HIGH_CAMERA_CONFIG_MAP[platform]) !== null && _HIGH_CAMERA_CONFIG_M !== void 0 ? _HIGH_CAMERA_CONFIG_M : COMMON_HIGH_CAMERA_CONFIG;
|
|
100
101
|
}
|
|
101
102
|
_FcrVideoEncoderConfig.createDefaultHighCameraConfig = createDefaultHighCameraConfig;
|
|
102
103
|
function createDefaultLowCameraConfig() {
|
|
104
|
+
var _LOW_CAMERA_CONFIG_MA;
|
|
103
105
|
const platform = getPlatform();
|
|
104
|
-
return LOW_CAMERA_CONFIG_MAP[platform]
|
|
106
|
+
return (_LOW_CAMERA_CONFIG_MA = LOW_CAMERA_CONFIG_MAP[platform]) !== null && _LOW_CAMERA_CONFIG_MA !== void 0 ? _LOW_CAMERA_CONFIG_MA : COMMON_LOW_CAMERA_CONFIG;
|
|
105
107
|
}
|
|
106
108
|
_FcrVideoEncoderConfig.createDefaultLowCameraConfig = createDefaultLowCameraConfig;
|
|
107
109
|
function createDefaultFullHighCameraConfig() {
|
|
110
|
+
var _FULL_HIGH_CAMERA_CON;
|
|
108
111
|
const platform = getPlatform();
|
|
109
|
-
return FULL_HIGH_CAMERA_CONFIG_MAP[platform]
|
|
112
|
+
return (_FULL_HIGH_CAMERA_CON = FULL_HIGH_CAMERA_CONFIG_MAP[platform]) !== null && _FULL_HIGH_CAMERA_CON !== void 0 ? _FULL_HIGH_CAMERA_CON : COMMON_FULL_HIGH_CAMERA_CONFIG;
|
|
110
113
|
}
|
|
111
114
|
_FcrVideoEncoderConfig.createDefaultFullHighCameraConfig = createDefaultFullHighCameraConfig;
|
|
112
115
|
function createDefaultClarityScreenConfig() {
|
|
116
|
+
var _CLARITY_SCREEN_CONFI;
|
|
113
117
|
const platform = getPlatform();
|
|
114
|
-
return CLARITY_SCREEN_CONFIG_MAP[platform]
|
|
118
|
+
return (_CLARITY_SCREEN_CONFI = CLARITY_SCREEN_CONFIG_MAP[platform]) !== null && _CLARITY_SCREEN_CONFI !== void 0 ? _CLARITY_SCREEN_CONFI : COMMON_CLARITY_SCREEN_CONFIG;
|
|
115
119
|
}
|
|
116
120
|
_FcrVideoEncoderConfig.createDefaultClarityScreenConfig = createDefaultClarityScreenConfig;
|
|
117
121
|
function createDefaultSmoothScreenConfig() {
|
|
122
|
+
var _SMOOTH_SCREEN_CONFIG;
|
|
118
123
|
const platform = getPlatform();
|
|
119
|
-
return SMOOTH_SCREEN_CONFIG_MAP[platform]
|
|
124
|
+
return (_SMOOTH_SCREEN_CONFIG = SMOOTH_SCREEN_CONFIG_MAP[platform]) !== null && _SMOOTH_SCREEN_CONFIG !== void 0 ? _SMOOTH_SCREEN_CONFIG : COMMON_SMOOTH_SCREEN_CONFIG;
|
|
120
125
|
}
|
|
121
126
|
_FcrVideoEncoderConfig.createDefaultSmoothScreenConfig = createDefaultSmoothScreenConfig;
|
|
122
127
|
})(FcrVideoEncoderConfig || (FcrVideoEncoderConfig = {}));
|
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.10.
|
|
4
|
+
"version": "3.10.5",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/lodash": "^4.14.168",
|
|
42
42
|
"@types/sinon": "^17.0.2",
|
|
43
43
|
"@types/uuid": "^8.3.0",
|
|
44
|
-
"agora-toolchain": "3.10.
|
|
44
|
+
"agora-toolchain": "3.10.5",
|
|
45
45
|
"core-js": "^3.33.3",
|
|
46
46
|
"decomment": "^0.9.5",
|
|
47
47
|
"husky": "^9.0.11",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@netless/video-js-plugin": "^0.3.8",
|
|
62
62
|
"@netless/white-snapshot": "^0.4.2",
|
|
63
63
|
"@netless/window-manager": "^1.0.7-beta.6",
|
|
64
|
-
"agora-foundation": "3.10.
|
|
65
|
-
"agora-rte-sdk": "3.10.
|
|
64
|
+
"agora-foundation": "3.10.5",
|
|
65
|
+
"agora-rte-sdk": "3.10.5",
|
|
66
66
|
"await-to-js": "^3.0.0",
|
|
67
67
|
"dayjs": "^1.10.4",
|
|
68
68
|
"easemob-websdk": "4.13.0",
|