fcr-core 3.11.0-rc.2 → 3.11.0-rc.3
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.
|
@@ -26,6 +26,7 @@ require("core-js/modules/esnext.iterator.constructor.js");
|
|
|
26
26
|
require("core-js/modules/esnext.iterator.find.js");
|
|
27
27
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
28
28
|
require("core-js/modules/esnext.iterator.map.js");
|
|
29
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
29
30
|
var _imports = require("../../imports");
|
|
30
31
|
var _type = require("../../type");
|
|
31
32
|
var _user = require("../../utilities/user");
|
|
@@ -42,6 +43,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
42
43
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
43
44
|
function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
44
45
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
|
|
46
|
+
const WAITING_ROOM_USER_PROPERTY_PREFIXES = ['security.waitingRoom', 'security.ticket'];
|
|
47
|
+
|
|
45
48
|
/**
|
|
46
49
|
* @internal
|
|
47
50
|
*/
|
|
@@ -61,6 +64,35 @@ class FcrUserControlImpl {
|
|
|
61
64
|
|
|
62
65
|
//@internal
|
|
63
66
|
_enableUserCount = true;
|
|
67
|
+
_buildNotifiedUserChangedProperties(changedProperties, causeCmd) {
|
|
68
|
+
const hasFlexProps = causeCmd === 8 && Object.keys(changedProperties).some(key => key.startsWith('flexProps'));
|
|
69
|
+
if (hasFlexProps) {
|
|
70
|
+
const flexPropsChangedProperties = {};
|
|
71
|
+
for (const key in changedProperties) {
|
|
72
|
+
if (key.startsWith('flexProps')) {
|
|
73
|
+
flexPropsChangedProperties[key] = changedProperties[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (Object.keys(flexPropsChangedProperties).length === 0) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
const structure = (0, _collection.convertToStructure)(flexPropsChangedProperties);
|
|
80
|
+
return structure['flexProps'] ?? {};
|
|
81
|
+
}
|
|
82
|
+
const waitingRoomChangedProperties = {};
|
|
83
|
+
for (const key in changedProperties) {
|
|
84
|
+
if (key === 'security' || WAITING_ROOM_USER_PROPERTY_PREFIXES.some(prefix => key.startsWith(prefix))) {
|
|
85
|
+
waitingRoomChangedProperties[key] = changedProperties[key];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (Object.keys(waitingRoomChangedProperties).length === 0) {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
const structure = 'security' in waitingRoomChangedProperties ? waitingRoomChangedProperties : (0, _collection.convertToStructure)(waitingRoomChangedProperties);
|
|
92
|
+
return 'security' in structure ? {
|
|
93
|
+
security: structure['security']
|
|
94
|
+
} : structure;
|
|
95
|
+
}
|
|
64
96
|
|
|
65
97
|
//@internal
|
|
66
98
|
_sceneObserver = {
|
|
@@ -158,20 +190,12 @@ class FcrUserControlImpl {
|
|
|
158
190
|
type
|
|
159
191
|
});
|
|
160
192
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
if (Object.keys(changedProperties).length > 0) {
|
|
169
|
-
const structure = (0, _collection.convertToStructure)(changedProperties);
|
|
170
|
-
this._observable.notifyObservers('onUserPropertiesUpdated', roomId, {
|
|
171
|
-
...event,
|
|
172
|
-
changedProperties: structure['flexProps']
|
|
173
|
-
});
|
|
174
|
-
}
|
|
193
|
+
const notifiedChangedProperties = this._buildNotifiedUserChangedProperties(event.changedProperties, event.cause?.cmd);
|
|
194
|
+
if (notifiedChangedProperties) {
|
|
195
|
+
this._observable.notifyObservers('onUserPropertiesUpdated', roomId, {
|
|
196
|
+
...event,
|
|
197
|
+
changedProperties: notifiedChangedProperties
|
|
198
|
+
});
|
|
175
199
|
}
|
|
176
200
|
if (event.cause?.cmd === _constants.ROOM_MESSAGE_COMMANDS.CLIENT_RECORDING_PERMISSION) {
|
|
177
201
|
const {
|
|
@@ -100,6 +100,10 @@ const HARMONY_OR_ELECTRON_COMMON_PARAMS = [
|
|
|
100
100
|
'rtc.video.low_stream_enable_hw_encoder': false
|
|
101
101
|
}, {
|
|
102
102
|
'rtc.video.enable_minor_stream_intra_request': true
|
|
103
|
+
},
|
|
104
|
+
// BR710 小流不符合预期分辨率的临时方案,详见APAAS-15529
|
|
105
|
+
{
|
|
106
|
+
'che.video.enableProfileAutoAdjuster': false
|
|
103
107
|
}];
|
|
104
108
|
|
|
105
109
|
/** ELECTRON common parameters */
|
|
@@ -20,6 +20,7 @@ import "core-js/modules/esnext.iterator.constructor.js";
|
|
|
20
20
|
import "core-js/modules/esnext.iterator.find.js";
|
|
21
21
|
import "core-js/modules/esnext.iterator.for-each.js";
|
|
22
22
|
import "core-js/modules/esnext.iterator.map.js";
|
|
23
|
+
import "core-js/modules/esnext.iterator.some.js";
|
|
23
24
|
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)]; } }; }
|
|
24
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
25
26
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -38,6 +39,7 @@ import validateParams from '../../utilities/validate-params';
|
|
|
38
39
|
import { fcrUserKickedOutTypeSchema, fcrUserRolesSchema, stringKeyUnknownValueSchema, stringSchema, stringArraySchema, fcrUserRoleSchema, stringKeyNumberValueSchema } from '../../schema';
|
|
39
40
|
import { ROOM_MESSAGE_COMMANDS } from '../helpers/constants';
|
|
40
41
|
import { ErrorModuleCode } from '../../imports';
|
|
42
|
+
const WAITING_ROOM_USER_PROPERTY_PREFIXES = ['security.waitingRoom', 'security.ticket'];
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* @internal
|
|
@@ -58,6 +60,35 @@ export class FcrUserControlImpl {
|
|
|
58
60
|
|
|
59
61
|
//@internal
|
|
60
62
|
_enableUserCount = true;
|
|
63
|
+
_buildNotifiedUserChangedProperties(changedProperties, causeCmd) {
|
|
64
|
+
const hasFlexProps = causeCmd === 8 && Object.keys(changedProperties).some(key => key.startsWith('flexProps'));
|
|
65
|
+
if (hasFlexProps) {
|
|
66
|
+
const flexPropsChangedProperties = {};
|
|
67
|
+
for (const key in changedProperties) {
|
|
68
|
+
if (key.startsWith('flexProps')) {
|
|
69
|
+
flexPropsChangedProperties[key] = changedProperties[key];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (Object.keys(flexPropsChangedProperties).length === 0) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
const structure = convertToStructure(flexPropsChangedProperties);
|
|
76
|
+
return structure['flexProps'] ?? {};
|
|
77
|
+
}
|
|
78
|
+
const waitingRoomChangedProperties = {};
|
|
79
|
+
for (const key in changedProperties) {
|
|
80
|
+
if (key === 'security' || WAITING_ROOM_USER_PROPERTY_PREFIXES.some(prefix => key.startsWith(prefix))) {
|
|
81
|
+
waitingRoomChangedProperties[key] = changedProperties[key];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (Object.keys(waitingRoomChangedProperties).length === 0) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
const structure = 'security' in waitingRoomChangedProperties ? waitingRoomChangedProperties : convertToStructure(waitingRoomChangedProperties);
|
|
88
|
+
return 'security' in structure ? {
|
|
89
|
+
security: structure['security']
|
|
90
|
+
} : structure;
|
|
91
|
+
}
|
|
61
92
|
|
|
62
93
|
//@internal
|
|
63
94
|
_sceneObserver = {
|
|
@@ -155,20 +186,12 @@ export class FcrUserControlImpl {
|
|
|
155
186
|
type
|
|
156
187
|
});
|
|
157
188
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
if (Object.keys(changedProperties).length > 0) {
|
|
166
|
-
const structure = convertToStructure(changedProperties);
|
|
167
|
-
this._observable.notifyObservers('onUserPropertiesUpdated', roomId, {
|
|
168
|
-
...event,
|
|
169
|
-
changedProperties: structure['flexProps']
|
|
170
|
-
});
|
|
171
|
-
}
|
|
189
|
+
const notifiedChangedProperties = this._buildNotifiedUserChangedProperties(event.changedProperties, event.cause?.cmd);
|
|
190
|
+
if (notifiedChangedProperties) {
|
|
191
|
+
this._observable.notifyObservers('onUserPropertiesUpdated', roomId, {
|
|
192
|
+
...event,
|
|
193
|
+
changedProperties: notifiedChangedProperties
|
|
194
|
+
});
|
|
172
195
|
}
|
|
173
196
|
if (event.cause?.cmd === ROOM_MESSAGE_COMMANDS.CLIENT_RECORDING_PERMISSION) {
|
|
174
197
|
const {
|
|
@@ -94,6 +94,10 @@ const HARMONY_OR_ELECTRON_COMMON_PARAMS = [
|
|
|
94
94
|
'rtc.video.low_stream_enable_hw_encoder': false
|
|
95
95
|
}, {
|
|
96
96
|
'rtc.video.enable_minor_stream_intra_request': true
|
|
97
|
+
},
|
|
98
|
+
// BR710 小流不符合预期分辨率的临时方案,详见APAAS-15529
|
|
99
|
+
{
|
|
100
|
+
'che.video.enableProfileAutoAdjuster': false
|
|
97
101
|
}];
|
|
98
102
|
|
|
99
103
|
/** ELECTRON common parameters */
|
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.11.0-rc.
|
|
4
|
+
"version": "3.11.0-rc.3",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"build:en-docs": "typedoc --entryPoints ./build-doc/en-sdk.d.ts --readme ./build-doc/readme-en.md --hideGenerator --name 'Edu Store Typescript API Reference for Web' --tsconfig ./build-doc/en/tsconfig.json --out en-docs --excludeExternals --excludePrivate --excludeInternal --excludeProtected --disableSources --theme typedoc-theme",
|
|
30
30
|
"build:cn-docs": "typedoc --entryPoints ./build-doc/cn-sdk.d.ts --readme ./build-doc/readme-cn.md --hideGenerator --name 'Edu Store Typescript API Reference for Web' --tsconfig ./build-doc/cn/tsconfig.json --out cn-docs --excludeExternals --excludePrivate --excludeInternal --excludeProtected --disableSources --theme typedoc-theme",
|
|
31
31
|
"test-browser": "agora-tc-test-karma-browser",
|
|
32
|
-
"test-electron": "agora-tc-test-karma-electron"
|
|
33
|
-
"preinstall": "node ./scripts/check-ai-kb.js"
|
|
32
|
+
"test-electron": "agora-tc-test-karma-electron"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@babel/core": "^7.23.5",
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
"@types/lodash": "^4.14.168",
|
|
44
43
|
"@types/sinon": "^17.0.2",
|
|
45
44
|
"@types/uuid": "^8.3.0",
|
|
46
|
-
"agora-toolchain": "3.11.0-rc.
|
|
45
|
+
"agora-toolchain": "3.11.0-rc.3",
|
|
47
46
|
"core-js": "^3.33.3",
|
|
48
47
|
"decomment": "^0.9.5",
|
|
49
48
|
"husky": "^9.0.11",
|
|
@@ -57,14 +56,14 @@
|
|
|
57
56
|
"dependencies": {
|
|
58
57
|
"@netless/app-slide": "^0.2.81",
|
|
59
58
|
"@netless/appliance-plugin": "^1.1.21",
|
|
60
|
-
"@netless/forge-room": "1.2.
|
|
61
|
-
"@netless/forge-rtm": "1.2.
|
|
62
|
-
"@netless/forge-whiteboard": "1.2.
|
|
59
|
+
"@netless/forge-room": "1.2.1",
|
|
60
|
+
"@netless/forge-rtm": "1.2.1",
|
|
61
|
+
"@netless/forge-whiteboard": "1.2.1",
|
|
63
62
|
"@netless/video-js-plugin": "^0.3.8",
|
|
64
63
|
"@netless/white-snapshot": "^0.4.2",
|
|
65
64
|
"@netless/window-manager": "^1.0.7-beta.6",
|
|
66
|
-
"agora-foundation": "3.11.0-rc.
|
|
67
|
-
"agora-rte-sdk": "3.11.0-rc.
|
|
65
|
+
"agora-foundation": "3.11.0-rc.3",
|
|
66
|
+
"agora-rte-sdk": "3.11.0-rc.3",
|
|
68
67
|
"await-to-js": "^3.0.0",
|
|
69
68
|
"dayjs": "^1.10.4",
|
|
70
69
|
"easemob-websdk": "4.13.0",
|