fcr-core 3.7.9-alpha → 3.8.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chat-connection/index.d.ts +1 -1
- package/lib/chat-connection/index.js +41 -26
- package/lib/engine/index.js +72 -78
- package/lib/imports.d.ts +7 -2
- package/lib/imports.js +26 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +12 -0
- package/lib/media-control/desktop.js +22 -17
- package/lib/media-control/mobile.js +38 -33
- package/lib/media-control/type.d.ts +8 -0
- package/lib/monitor-control/index.js +10 -5
- package/lib/peer-session/index.js +48 -39
- package/lib/plugins/chatroom.js +237 -205
- package/lib/room-control/ability-control/index.js +14 -9
- package/lib/room-control/ability-control/type.d.ts +4 -1
- package/lib/room-control/ability-control/type.js +3 -0
- package/lib/room-control/group-control/index.js +21 -16
- package/lib/room-control/helpers/constants.d.ts +4 -0
- package/lib/room-control/helpers/constants.js +5 -1
- package/lib/room-control/helpers/validation-helper.js +1 -1
- package/lib/room-control/index.js +66 -38
- package/lib/room-control/interpreter-control/index.js +49 -38
- 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 +90 -17
- package/lib/room-control/privilege-control/helper.js +8 -5
- package/lib/room-control/privilege-control/index.js +66 -19
- package/lib/room-control/privilege-control/type.d.ts +57 -10
- package/lib/room-control/privilege-control/type.js +17 -0
- package/lib/room-control/room-connector-control/index.js +28 -19
- package/lib/room-control/room-control-factory.js +3 -2
- package/lib/room-control/room-session/index.js +68 -49
- package/lib/room-control/room-session/type.d.ts +2 -2
- package/lib/room-control/shared-cache.js +36 -29
- package/lib/room-control/sharing-control/index.d.ts +5 -5
- package/lib/room-control/sharing-control/index.js +81 -43
- package/lib/room-control/sharing-control/type.d.ts +9 -5
- package/lib/room-control/sharing-control/type.js +6 -1
- package/lib/room-control/stream-control/index.d.ts +8 -1
- package/lib/room-control/stream-control/index.js +310 -199
- package/lib/room-control/stream-control/type.d.ts +6 -0
- package/lib/room-control/stt-control/de-compress-gzip.d.ts +1 -0
- package/lib/room-control/stt-control/de-compress-gzip.js +49 -0
- package/lib/room-control/stt-control/index.d.ts +1 -0
- package/lib/room-control/stt-control/index.js +353 -0
- package/lib/room-control/stt-control/type.d.ts +142 -0
- package/lib/room-control/stt-control/type.js +16 -0
- package/lib/room-control/type.d.ts +15 -0
- package/lib/room-control/type.js +13 -1
- package/lib/room-control/user-control/index.js +143 -136
- package/lib/room-control/waitingroom-control/index.js +14 -9
- package/lib/room-control/whiteboard-control/enum.d.ts +15 -0
- package/lib/room-control/whiteboard-control/{types.js → enum.js} +12 -1
- package/lib/room-control/whiteboard-control/type.d.ts +38 -0
- package/lib/room-control/whiteboard-control/type.js +15 -0
- package/lib/room-control/whiteboard-control/utils.d.ts +3 -0
- package/lib/room-control/whiteboard-control/utils.js +23 -0
- package/lib/room-control/whiteboard-control-v1/board-subwindow.d.ts +6 -0
- package/lib/room-control/whiteboard-control-v1/board-subwindow.js +26 -0
- package/lib/room-control/whiteboard-control-v1/board-window.d.ts +58 -0
- package/lib/room-control/whiteboard-control-v1/board-window.js +571 -0
- package/lib/room-control/{whiteboard-control/enums.d.ts → whiteboard-control-v1/enum.d.ts} +3 -17
- package/lib/room-control/{whiteboard-control/enums.js → whiteboard-control-v1/enum.js} +3 -20
- package/lib/room-control/whiteboard-control-v1/factory.d.ts +9 -0
- package/lib/room-control/whiteboard-control-v1/factory.js +22 -0
- package/lib/room-control/whiteboard-control-v1/index.d.ts +1 -0
- package/lib/room-control/whiteboard-control-v1/index.js +440 -0
- package/lib/room-control/whiteboard-control-v1/mount-manager.d.ts +4 -0
- package/lib/room-control/whiteboard-control-v1/mount-manager.js +15 -0
- package/lib/room-control/whiteboard-control-v1/type.d.ts +300 -0
- package/lib/room-control/whiteboard-control-v1/type.js +13 -0
- package/lib/room-control/whiteboard-control-v1/utils.d.ts +53 -0
- package/lib/room-control/whiteboard-control-v1/utils.js +290 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.d.ts +17 -31
- package/lib/room-control/whiteboard-control-v2/annotation-control/control.js +42 -228
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.d.ts +10 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/factory.js +48 -0
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.d.ts +11 -19
- package/lib/room-control/whiteboard-control-v2/annotation-control/type.js +1 -3
- package/lib/room-control/whiteboard-control-v2/base/index.d.ts +42 -0
- package/lib/room-control/whiteboard-control-v2/base/index.js +317 -0
- package/lib/room-control/whiteboard-control-v2/{main-window.d.ts → base/main-window.d.ts} +6 -4
- package/lib/room-control/whiteboard-control-v2/{main-window.js → base/main-window.js} +54 -36
- package/lib/room-control/whiteboard-control-v2/constant.d.ts +6 -0
- package/lib/room-control/whiteboard-control-v2/constant.js +15 -0
- package/lib/room-control/whiteboard-control-v2/enum.d.ts +26 -0
- package/lib/room-control/whiteboard-control-v2/enum.js +34 -0
- package/lib/room-control/{whiteboard-control/types.d.ts → whiteboard-control-v2/type.d.ts} +51 -165
- package/lib/room-control/whiteboard-control-v2/type.js +5 -0
- package/lib/room-control/whiteboard-control-v2/utils.d.ts +5 -4
- package/lib/room-control/whiteboard-control-v2/utils.js +29 -27
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.d.ts +34 -33
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/control.js +131 -187
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/factory.d.ts +11 -0
- package/lib/room-control/whiteboard-control-v2/{annotation-control/index.js → whiteboard-control/factory.js} +40 -38
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.d.ts +18 -30
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/type.js +1 -9
- package/lib/room-router/index.js +56 -42
- package/lib/schema.d.ts +23 -9
- package/lib/schema.js +10 -4
- package/lib/service/api.d.ts +75 -19
- package/lib/service/api.js +401 -208
- package/lib/type.d.ts +15 -2
- package/lib/type.js +13 -0
- package/lib/utilities/collection.js +3 -2
- package/lib/utilities/error-helpers.d.ts +2 -1
- package/lib/utilities/error-helpers.js +35 -27
- package/lib/utilities/error.d.ts +1 -0
- package/lib/utilities/error.js +10 -8
- package/lib/utilities/join-helper.js +32 -25
- package/lib/utilities/logger.d.ts +2 -2
- package/lib/utilities/logger.js +6 -3
- package/lib/utilities/parameters.js +8 -4
- package/lib/utilities/retry-helpers.js +1 -0
- package/lib/utilities/shared-storage.d.ts +3 -1
- package/lib/utilities/shared-storage.js +10 -1
- package/lib/utilities/storage.js +1 -0
- package/lib/utilities/stream.js +16 -11
- package/lib/utilities/user.js +4 -3
- package/lib/utilities/validate-params.js +2 -1
- package/package.json +11 -5
- package/lib/room-control/whiteboard-control-v2/annotation-control/index.d.ts +0 -19
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.d.ts +0 -36
- package/lib/room-control/whiteboard-control-v2/annotation-control/privilege-control.js +0 -252
- package/lib/room-control/whiteboard-control-v2/index.d.ts +0 -38
- package/lib/room-control/whiteboard-control-v2/index.js +0 -274
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.d.ts +0 -17
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/index.js +0 -30
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.d.ts +0 -36
- package/lib/room-control/whiteboard-control-v2/whiteboard-control/privilege-control.js +0 -240
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.FcrJoinBeforeHostWaitingRoomControlImpl = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _ = require("..");
|
|
8
10
|
var _type = require("../type");
|
|
9
11
|
var _logger = require("../../utilities/logger");
|
|
@@ -11,12 +13,12 @@ var _logger = require("../../utilities/logger");
|
|
|
11
13
|
* @internal
|
|
12
14
|
*/
|
|
13
15
|
class FcrJoinBeforeHostWaitingRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
14
|
-
//@internal
|
|
15
|
-
logger = (0, _logger.createLogger)({
|
|
16
|
-
prefix: 'FcrJoinBeforeHostWaitingRoomControlImpl'
|
|
17
|
-
});
|
|
18
16
|
constructor(engine, scene, api, config, sharedCache, chatConnection, chatRoomControl) {
|
|
19
17
|
super(engine, scene, api, config, _type.FcrRoomType.JoinBeforeHostWaitingRoom, chatConnection, sharedCache, chatRoomControl);
|
|
18
|
+
//@internal
|
|
19
|
+
(0, _defineProperty2.default)(this, "logger", (0, _logger.createLogger)({
|
|
20
|
+
prefix: 'FcrJoinBeforeHostWaitingRoomControlImpl'
|
|
21
|
+
}));
|
|
20
22
|
this._addLogObserver();
|
|
21
23
|
}
|
|
22
24
|
addObserver(observer) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.symbol.description.js");
|
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
|
3
5
|
require("core-js/modules/es.array.push.js");
|
|
4
6
|
require("core-js/modules/esnext.function.metadata.js");
|
|
5
7
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
@@ -22,6 +24,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
22
24
|
value: true
|
|
23
25
|
});
|
|
24
26
|
exports.FcrMainRoomControlImpl = void 0;
|
|
27
|
+
require("core-js/modules/es.json.stringify.js");
|
|
28
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
29
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
30
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
31
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
32
|
var _imports = require("../../imports");
|
|
26
33
|
var _ = require("..");
|
|
27
34
|
var _groupControl = require("../group-control");
|
|
@@ -33,7 +40,10 @@ var _schema = require("../../schema");
|
|
|
33
40
|
var _logger = require("../../utilities/logger");
|
|
34
41
|
var _validateParams = _interopRequireDefault(require("../../utilities/validate-params"));
|
|
35
42
|
var _sharedStorage = require("../../utilities/shared-storage");
|
|
36
|
-
|
|
43
|
+
var _utils = require("../whiteboard-control-v2/utils");
|
|
44
|
+
var _utils2 = require("../whiteboard-control/utils");
|
|
45
|
+
var _FcrMainRoomControlImpl;
|
|
46
|
+
let _initProto, _enableWaitingRoomDecs, _moveToWaitingRoomByUserIdsDecs, _ref;
|
|
37
47
|
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
38
48
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
39
49
|
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); }
|
|
@@ -46,16 +56,18 @@ const {
|
|
|
46
56
|
/**
|
|
47
57
|
* @internal
|
|
48
58
|
*/
|
|
59
|
+
_ref = (_enableWaitingRoomDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema)], _moveToWaitingRoomByUserIdsDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringArraySchema)], "logger");
|
|
49
60
|
class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
50
|
-
static {
|
|
51
|
-
[_initProto] = _applyDecs(this, [[_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_enableWaitingRoomDecs, 2, "enableWaitingRoom"], [_moveToWaitingRoomByUserIdsDecs, 2, "moveToWaitingRoomByUserIds"], [_imports.trace, 2, "moveToWaitingRoomByUserRoles"], [_imports.bound, 2, "_getToken"], [_imports.bound, 2, "_getBoardToken"]], [], 0, void 0, _.FcrBaseRoomControlImpl).e;
|
|
52
|
-
}
|
|
53
|
-
//@internal
|
|
54
|
-
[(_enableWaitingRoomDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema)], _moveToWaitingRoomByUserIdsDecs = [_imports.trace, (0, _validateParams.default)(_schema.stringArraySchema)], "logger")] = (_initProto(this), (0, _logger.createLogger)({
|
|
55
|
-
prefix: 'FcrMainRoomControlImpl'
|
|
56
|
-
}));
|
|
57
61
|
constructor(engine, scene, api, config, sharedCache, chatConnection, chatRoomControl) {
|
|
58
62
|
super(engine, scene, api, config, _type2.FcrRoomType.Mainroom, chatConnection, sharedCache, chatRoomControl);
|
|
63
|
+
//@internal
|
|
64
|
+
(0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
65
|
+
prefix: 'FcrMainRoomControlImpl'
|
|
66
|
+
})));
|
|
67
|
+
(0, _defineProperty2.default)(this, "_privilegeObserver", {
|
|
68
|
+
onLocalUserPermissionInfoAdded: this._onLocalUserPermissionInfoAdded,
|
|
69
|
+
onLocalUserPermissionInfoDeleted: this._onLocalUserPermissionInfoDeleted
|
|
70
|
+
});
|
|
59
71
|
this._groupControl = new _groupControl.FcrGroupControl(engine, scene, api, sharedCache);
|
|
60
72
|
this._interpreterControl = new _interpreterControl.FcrInterpreterControlImpl(api, scene, config, engine, chatConnection, sharedCache);
|
|
61
73
|
this._addLogObserver();
|
|
@@ -78,7 +90,7 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
78
90
|
this._initBoardInfo();
|
|
79
91
|
}
|
|
80
92
|
});
|
|
81
|
-
this.logger.info(
|
|
93
|
+
this.logger.info("initialized, room id: ".concat(this._scene.sceneId));
|
|
82
94
|
}
|
|
83
95
|
|
|
84
96
|
// @trace
|
|
@@ -95,6 +107,8 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
95
107
|
(0, _sharedStorage.clearAnnotationBoardOptions)();
|
|
96
108
|
(0, _sharedStorage.clearWhiteboardOptions)();
|
|
97
109
|
await super.join(options);
|
|
110
|
+
const privilegeControl = this.getPrivilegeControl();
|
|
111
|
+
privilegeControl.addObserver(this._privilegeObserver);
|
|
98
112
|
const task = sharedScheduler.addIntervalTask(() => {
|
|
99
113
|
this._engine.getMonitor().uploadLog({
|
|
100
114
|
userUuid: this._config.userId,
|
|
@@ -111,9 +125,12 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
111
125
|
}
|
|
112
126
|
async leave() {
|
|
113
127
|
try {
|
|
128
|
+
const privilegeControl = this.getPrivilegeControl();
|
|
129
|
+
privilegeControl.removeObserver(this._privilegeObserver);
|
|
114
130
|
return await super.leave();
|
|
115
131
|
} finally {
|
|
116
|
-
|
|
132
|
+
var _this$_logUploadTask;
|
|
133
|
+
(_this$_logUploadTask = this._logUploadTask) === null || _this$_logUploadTask === void 0 || _this$_logUploadTask.stop();
|
|
117
134
|
this._engine.getMonitor().uploadLog({
|
|
118
135
|
userUuid: this._config.userId,
|
|
119
136
|
roomUuid: this._scene.sceneId
|
|
@@ -135,9 +152,10 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
135
152
|
async moveToWaitingRoomByUserIds(userIds) {
|
|
136
153
|
const [error] = await (0, _imports.to)(this._api.moveToWaitingRoomByUserIds(userIds, this._scene.sceneId));
|
|
137
154
|
if (error) {
|
|
138
|
-
this.logger.error(
|
|
155
|
+
this.logger.error("[RoomControl] move to waiting room failed, ".concat(error.message, "-").concat(JSON.stringify(error)));
|
|
139
156
|
if (error instanceof _imports.AgoraRestfulClientError) {
|
|
140
|
-
|
|
157
|
+
var _error$serviceCode;
|
|
158
|
+
throw (0, _error.generateFcrCoreServerError)((_error$serviceCode = error.serviceCode) !== null && _error$serviceCode !== void 0 ? _error$serviceCode : -1, error.message, error);
|
|
141
159
|
}
|
|
142
160
|
throw (0, _error.generateFcrCoreClientError)(_error.FcrErrorModuleCode.ROOM, _error.FcrErrorCode.UNDEFINED_ERROR, 'move to waiting room failed', error);
|
|
143
161
|
}
|
|
@@ -150,9 +168,9 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
150
168
|
const userId = this._scene.localUser.getLocalUserId();
|
|
151
169
|
const boardOptions = (await this._getToken(roomId, userId)).data;
|
|
152
170
|
if (!boardOptions) {
|
|
153
|
-
this.logger.error(
|
|
171
|
+
this.logger.error("get annotation board options failed, roomId: ".concat(roomId, ", userId: ").concat(userId, ", boardOptions: ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
154
172
|
} else {
|
|
155
|
-
this.logger.info(
|
|
173
|
+
this.logger.info("get annotation board options success, roomId: ".concat(roomId, ", userId: ").concat(userId, ", boardOptions: ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
156
174
|
(0, _sharedStorage.setAnnotationBoardOptions)(boardOptions);
|
|
157
175
|
}
|
|
158
176
|
}
|
|
@@ -161,9 +179,9 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
161
179
|
const userId = this._scene.localUser.getLocalUserId();
|
|
162
180
|
const boardOptions = (await this._getBoardToken(roomId, userId)).data;
|
|
163
181
|
if (!boardOptions) {
|
|
164
|
-
this.logger.error(
|
|
182
|
+
this.logger.error("get whiteboard options failed, roomId: ".concat(roomId, ", userId: ").concat(userId, ", boardOptions: ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
165
183
|
} else {
|
|
166
|
-
this.logger.info(
|
|
184
|
+
this.logger.info("get whiteboard options success, roomId: ".concat(roomId, ", userId: ").concat(userId, ", boardOptions: ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
167
185
|
(0, _sharedStorage.setWhiteboardOptions)(boardOptions);
|
|
168
186
|
}
|
|
169
187
|
}
|
|
@@ -179,6 +197,59 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
179
197
|
userId
|
|
180
198
|
}), _error.FcrErrorModuleCode.ROOM_WHITEBOARD, 'get whiteboard token failed');
|
|
181
199
|
}
|
|
200
|
+
_onLocalUserPermissionInfoAdded(roomId, event) {
|
|
201
|
+
if ((0, _utils2.hasBoardWritePermission)(event.permissionInfo)) {
|
|
202
|
+
this.logger.info("add board write permission");
|
|
203
|
+
this.getSharingControl().getBoardControl().setOperationPrivilege(true);
|
|
204
|
+
}
|
|
205
|
+
if ((0, _utils2.hasAnnotationWritePermission)(event.permissionInfo)) {
|
|
206
|
+
this.logger.info("add annotation write permission");
|
|
207
|
+
this.getSharingControl().getAnnotationControl().setOperationPrivilege(true);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
_onLocalUserPermissionInfoDeleted(roomId, event) {
|
|
211
|
+
if ((0, _utils2.hasBoardWritePermission)(event.permissionInfo)) {
|
|
212
|
+
this.logger.info("remove board write permission");
|
|
213
|
+
this.getSharingControl().getBoardControl().setOperationPrivilege(false);
|
|
214
|
+
}
|
|
215
|
+
if ((0, _utils2.hasAnnotationWritePermission)(event.permissionInfo)) {
|
|
216
|
+
this.logger.info("remove annotation write permission");
|
|
217
|
+
this.getSharingControl().getAnnotationControl().setOperationPrivilege(false);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
_checkIfUpdateAnnotationMainWindow() {
|
|
221
|
+
const streamControl = this.getStreamControl();
|
|
222
|
+
const userControl = this.getUserControl();
|
|
223
|
+
const mainWindow = this.getSharingControl().getAnnotationControl().getMainWindow();
|
|
224
|
+
const annotationConfig = (0, _utils.getAnnotationConfigFromRoomProperties)(this._scene.getSceneProperties(), this.logger);
|
|
225
|
+
if (mainWindow) {
|
|
226
|
+
const stream = streamControl.getStreamList().find(stream => stream.videoSourceType === _type.FcrVideoSourceType.SCREEN);
|
|
227
|
+
const localUserId = userControl.getLocalUser().userId;
|
|
228
|
+
if (stream) {
|
|
229
|
+
var _userControl$getUser;
|
|
230
|
+
const ownerId = stream.owner.userId;
|
|
231
|
+
const isNotMeSharing = ownerId !== localUserId;
|
|
232
|
+
const platform = (_userControl$getUser = userControl.getUser(ownerId)) === null || _userControl$getUser === void 0 ? void 0 : _userControl$getUser.platform;
|
|
233
|
+
const isPcPlatform = platform && [_type.FcrPlatform.WEB_DESKTOP, _type.FcrPlatform.WINDOWS, _type.FcrPlatform.MACOS].includes(platform);
|
|
234
|
+
const isAndroidPlatform = platform && platform === _type.FcrPlatform.ANDROID;
|
|
235
|
+
this.logger.info("check if set auto cancel draw, isPcPlatform: ".concat(isPcPlatform, ", isAndroidPlatform: ").concat(isAndroidPlatform, ", isNotMeSharing: ").concat(isNotMeSharing, ", ownerId: ").concat(ownerId, ", localUserId: ").concat(localUserId, ", platform: ").concat(platform));
|
|
236
|
+
if (isPcPlatform) {
|
|
237
|
+
mainWindow.setAutoCancelDraw(false);
|
|
238
|
+
}
|
|
239
|
+
if (isAndroidPlatform) {
|
|
240
|
+
mainWindow.setAutoCancelDraw(isNotMeSharing);
|
|
241
|
+
}
|
|
242
|
+
if (!isNotMeSharing) {
|
|
243
|
+
mainWindow.clean();
|
|
244
|
+
mainWindow.updateWindowSize({
|
|
245
|
+
width: annotationConfig.size.width,
|
|
246
|
+
height: annotationConfig.size.height
|
|
247
|
+
});
|
|
248
|
+
this._api.syncScreenShareOwnerAnnotationOpenDone(this._scene.sceneId);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
182
253
|
_addLogObserver() {
|
|
183
254
|
this.addObserver((0, _logger.generateLogObserver)(this.logger, ['onCloudRecordingStateUpdated', 'onJoinRoomFailure', 'onJoinRoomSuccess', 'onLiveStreamingStateUpdated',
|
|
184
255
|
// 'onNetworkQualityUpdated',
|
|
@@ -186,4 +257,6 @@ class FcrMainRoomControlImpl extends _.FcrBaseRoomControlImpl {
|
|
|
186
257
|
'onRoomMessageReceived', 'onRoomPropertiesDeleted', 'onRoomPropertiesUpdated', 'onRoomStateUpdated']));
|
|
187
258
|
}
|
|
188
259
|
}
|
|
189
|
-
exports.FcrMainRoomControlImpl = FcrMainRoomControlImpl;
|
|
260
|
+
exports.FcrMainRoomControlImpl = FcrMainRoomControlImpl;
|
|
261
|
+
_FcrMainRoomControlImpl = FcrMainRoomControlImpl;
|
|
262
|
+
[_initProto] = _applyDecs(_FcrMainRoomControlImpl, [[_imports.trace, 2, "join"], [_imports.trace, 2, "leave"], [_enableWaitingRoomDecs, 2, "enableWaitingRoom"], [_moveToWaitingRoomByUserIdsDecs, 2, "moveToWaitingRoomByUserIds"], [_imports.trace, 2, "moveToWaitingRoomByUserRoles"], [_imports.bound, 2, "_onLocalUserPermissionInfoAdded"], [_imports.bound, 2, "_onLocalUserPermissionInfoDeleted"]], [], 0, void 0, _.FcrBaseRoomControlImpl).e;
|
|
@@ -7,6 +7,7 @@ exports.getLocalUserPermissionInfo = exports.addLocalUserPermissionObserver = ex
|
|
|
7
7
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
8
8
|
require("core-js/modules/esnext.iterator.find.js");
|
|
9
9
|
require("core-js/modules/esnext.iterator.map.js");
|
|
10
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
11
|
var _type = require("./type");
|
|
11
12
|
var _user = require("../../utilities/user");
|
|
12
13
|
// 初始化权限策略表达式:{module}:{action}-{k1=v1|v2;k2=v3}>{role1|role2}
|
|
@@ -46,7 +47,7 @@ class FcrPermission {
|
|
|
46
47
|
}
|
|
47
48
|
exports.FcrPermission = FcrPermission;
|
|
48
49
|
const getLocalUserPermissionInfo = (scene, action) => {
|
|
49
|
-
const permissionStringArray = scene.getUserPropertiesByKeyPath(
|
|
50
|
+
const permissionStringArray = scene.getUserPropertiesByKeyPath("permission.list", scene.localUser.getLocalUserId());
|
|
50
51
|
const permissionString = permissionStringArray.find(permission => permission.startsWith(action));
|
|
51
52
|
if (!permissionString) {
|
|
52
53
|
return {
|
|
@@ -70,7 +71,7 @@ const convertPermissionInfo = (permission, operateType) => {
|
|
|
70
71
|
enable: operateType === _type.FcrOperatePermissionType.ADD || operateType === _type.FcrOperatePermissionType.GET ? true : false,
|
|
71
72
|
info: {
|
|
72
73
|
targetRoles: permission.targetRoles.map(role => (0, _user.convertStringPrivilegeRoleToFcrPrivilegeRole)(role)),
|
|
73
|
-
action:
|
|
74
|
+
action: "".concat(module, ":").concat(action),
|
|
74
75
|
params: permission.conditions
|
|
75
76
|
}
|
|
76
77
|
};
|
|
@@ -79,11 +80,13 @@ const convertPermissionInfo = (permission, operateType) => {
|
|
|
79
80
|
const addLocalUserPermissionObserver = (scene, observer, cache) => {
|
|
80
81
|
scene.addObserver({
|
|
81
82
|
onUserPropertiesUpdated: (sceneId, event) => {
|
|
82
|
-
|
|
83
|
+
var _event$cause;
|
|
84
|
+
if (((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.cmd) === 3200) {
|
|
83
85
|
if (event.modifiedUser.userId === scene.localUser.getLocalUserId()) {
|
|
86
|
+
var _data$addPermissions, _data$removePermissio;
|
|
84
87
|
const data = event.cause.data;
|
|
85
|
-
const addedPermissions = data.addPermissions
|
|
86
|
-
const removedPermissions = data.removePermissions
|
|
88
|
+
const addedPermissions = (_data$addPermissions = data.addPermissions) === null || _data$addPermissions === void 0 ? void 0 : _data$addPermissions.map(p => convertPermissionInfo(FcrPermission.fromString(p), _type.FcrOperatePermissionType.ADD));
|
|
89
|
+
const removedPermissions = (_data$removePermissio = data.removePermissions) === null || _data$removePermissio === void 0 ? void 0 : _data$removePermissio.map(p => convertPermissionInfo(FcrPermission.fromString(p), _type.FcrOperatePermissionType.DELETE));
|
|
87
90
|
if (removedPermissions && removedPermissions.length > 0) {
|
|
88
91
|
observer.onLocalUserPermissionInfoDeleted && observer.onLocalUserPermissionInfoDeleted(sceneId, {
|
|
89
92
|
permissionInfo: removedPermissions,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.symbol.description.js");
|
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
|
3
5
|
require("core-js/modules/es.array.push.js");
|
|
4
6
|
require("core-js/modules/esnext.function.metadata.js");
|
|
7
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
5
8
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
6
9
|
require("core-js/modules/esnext.map.emplace.js");
|
|
7
10
|
require("core-js/modules/esnext.map.every.js");
|
|
@@ -25,6 +28,8 @@ exports.FcrPrivilegeControlImpl = void 0;
|
|
|
25
28
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
26
29
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
27
30
|
require("core-js/modules/esnext.iterator.map.js");
|
|
31
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
32
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
28
33
|
var _imports = require("../../imports");
|
|
29
34
|
var _type = require("../../type");
|
|
30
35
|
var _user = require("../../utilities/user");
|
|
@@ -34,25 +39,26 @@ var _logger = require("../../utilities/logger");
|
|
|
34
39
|
var _error = require("../../utilities/error");
|
|
35
40
|
var _validateParams = _interopRequireDefault(require("../../utilities/validate-params"));
|
|
36
41
|
var _schema = require("../../schema");
|
|
37
|
-
|
|
42
|
+
var _FcrPrivilegeControlImpl;
|
|
43
|
+
let _initProto, _getSecurityInfoDecs, _getLocalUserPermissionInfoDecs, _enableLockedRoomDecs, _allowShareAndWriteDecs, _allowWriteBoardDecs, _allowWriteBoardByUserIdsDecs, _allowSendChatDecs, _allowStartAudioDecs, _allowStartVideoDecs, _allowJoinWithMutedAudioDecs, _allowJoinWithMutedVideoDecs, _allowWatermarkDecs, _allowChangeUserNameDecs, _allowStartCaptionDecs, _allowStartTranscribingDecs, _allowUpdateSttSourceLanguageDecs, _allowJoinWithPromptSoundDecs, _ref;
|
|
44
|
+
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; }
|
|
45
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
46
|
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function (e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O.static = l, O.private = f, f ? 2 === o ? k = function (e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function (e) { return e[n]; }, (o < 2 || 4 === o) && (F = function (e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == typeof P && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol.for("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function (t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
39
47
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
40
48
|
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); }
|
|
41
49
|
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; }
|
|
42
50
|
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; }
|
|
51
|
+
_ref = (_getSecurityInfoDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrSecurityActionSchema)], _getLocalUserPermissionInfoDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrPermissionActionSchema)], _enableLockedRoomDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowShareAndWriteDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowWriteBoardDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowWriteBoardByUserIdsDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.stringArraySchema)], _allowSendChatDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema, _schema.fcrSecuritySendChatPayloadSchema)], _allowStartAudioDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowStartVideoDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowJoinWithMutedAudioDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowJoinWithMutedVideoDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowWatermarkDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema, _schema.fcrLineTypeSchema.optional())], _allowChangeUserNameDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowStartCaptionDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowStartTranscribingDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowUpdateSttSourceLanguageDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowJoinWithPromptSoundDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], "logger");
|
|
43
52
|
/**
|
|
44
53
|
* @internal
|
|
45
54
|
*/
|
|
46
55
|
class FcrPrivilegeControlImpl {
|
|
47
|
-
static {
|
|
48
|
-
[_initProto] = _applyDecs(this, [[_imports.trace, 2, "allowWriteAnnotation"], [_getSecurityInfoDecs, 2, "getSecurityInfo"], [_getLocalUserPermissionInfoDecs, 2, "getLocalUserPermissionInfo"], [_enableLockedRoomDecs, 2, "enableLockedRoom"], [_allowShareAndWriteDecs, 2, "allowShareAndWrite"], [_allowWriteBoardDecs, 2, "allowWriteBoard"], [_allowSendChatDecs, 2, "allowSendChat"], [_allowStartAudioDecs, 2, "allowStartAudio"], [_allowStartVideoDecs, 2, "allowStartVideo"], [_allowJoinWithMutedAudioDecs, 2, "allowJoinWithMutedAudio"], [_allowJoinWithMutedVideoDecs, 2, "allowJoinWithMutedVideo"], [_allowWatermarkDecs, 2, "allowWatermark"], [_allowChangeUserNameDecs, 2, "allowChangeUserName"]], []).e;
|
|
49
|
-
}
|
|
50
|
-
//@internal
|
|
51
|
-
[(_getSecurityInfoDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrSecurityActionSchema)], _getLocalUserPermissionInfoDecs = [_imports.trace, (0, _validateParams.default)(_schema.fcrPermissionActionSchema)], _enableLockedRoomDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowShareAndWriteDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowWriteBoardDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowSendChatDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema, _schema.fcrSecuritySendChatPayloadSchema)], _allowStartAudioDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowStartVideoDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowJoinWithMutedAudioDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowJoinWithMutedVideoDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], _allowWatermarkDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema, _schema.fcrLineTypeSchema.optional())], _allowChangeUserNameDecs = [_imports.trace, (0, _validateParams.default)(_schema.booleanSchema, _schema.fcrPrivilegeUserRoleArraySchema)], "logger")] = (_initProto(this), (0, _logger.createLogger)({
|
|
52
|
-
prefix: 'FcrPrivilegeControlImpl'
|
|
53
|
-
}));
|
|
54
|
-
_observable = new _imports.AgoraObservable();
|
|
55
56
|
constructor(_engine, _scene, _api, _sharedCache) {
|
|
57
|
+
//@internal
|
|
58
|
+
(0, _defineProperty2.default)(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
59
|
+
prefix: 'FcrPrivilegeControlImpl'
|
|
60
|
+
})));
|
|
61
|
+
(0, _defineProperty2.default)(this, "_observable", new _imports.AgoraObservable());
|
|
56
62
|
this._engine = _engine;
|
|
57
63
|
this._scene = _scene;
|
|
58
64
|
this._api = _api;
|
|
@@ -72,7 +78,7 @@ class FcrPrivilegeControlImpl {
|
|
|
72
78
|
}), _error.FcrErrorModuleCode.ROOM_WHITEBOARD, 'allow annotation failed');
|
|
73
79
|
}
|
|
74
80
|
getSecurityInfo(action) {
|
|
75
|
-
const info = this._scene.getScenePropertiesByKeyPath(
|
|
81
|
+
const info = this._scene.getScenePropertiesByKeyPath("security.".concat(action));
|
|
76
82
|
return this._convertSecurityInfo(info, action);
|
|
77
83
|
}
|
|
78
84
|
// @trace
|
|
@@ -100,7 +106,7 @@ class FcrPrivilegeControlImpl {
|
|
|
100
106
|
|
|
101
107
|
// @trace
|
|
102
108
|
getAllLocalUserPermissionInfo() {
|
|
103
|
-
const permissionStringArray = this._scene.getUserPropertiesByKeyPath(
|
|
109
|
+
const permissionStringArray = this._scene.getUserPropertiesByKeyPath("permission.list", this._scene.localUser.getLocalUserId());
|
|
104
110
|
return permissionStringArray.map(permissionString => this._convertPermissionInfo(_helper.FcrPermission.fromString(permissionString), _type2.FcrOperatePermissionType.GET));
|
|
105
111
|
}
|
|
106
112
|
async enableLockedRoom(enable, targetRoles) {
|
|
@@ -142,6 +148,18 @@ class FcrPrivilegeControlImpl {
|
|
|
142
148
|
}
|
|
143
149
|
}), _error.FcrErrorModuleCode.ROOM_PRIVILEGE, 'allow write board failed');
|
|
144
150
|
}
|
|
151
|
+
async allowWriteBoardByUserIds(enable, targetUserIds) {
|
|
152
|
+
await (0, _error.handleRequestError)(() => this._api.toggleShareEnableByUserIds({
|
|
153
|
+
roomId: this._scene.sceneId,
|
|
154
|
+
enable: true,
|
|
155
|
+
toUserUuids: targetUserIds,
|
|
156
|
+
payload: {
|
|
157
|
+
board: {
|
|
158
|
+
write: enable ? 1 : 0
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}), _error.FcrErrorModuleCode.ROOM_PRIVILEGE, 'allow write board by user ids failed');
|
|
162
|
+
}
|
|
145
163
|
async allowSendChat(enable, targetRoles, payload) {
|
|
146
164
|
await (0, _error.handleRequestError)(() => this._api.allowSendChat({
|
|
147
165
|
enable,
|
|
@@ -194,7 +212,7 @@ class FcrPrivilegeControlImpl {
|
|
|
194
212
|
enable,
|
|
195
213
|
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role]),
|
|
196
214
|
payload: {
|
|
197
|
-
lineType: lineType
|
|
215
|
+
lineType: lineType !== null && lineType !== void 0 ? lineType : _type.FcrLineType.SINGLE_ROW
|
|
198
216
|
}
|
|
199
217
|
}), _error.FcrErrorModuleCode.ROOM_PRIVILEGE, 'allow water mark failed');
|
|
200
218
|
}
|
|
@@ -205,6 +223,34 @@ class FcrPrivilegeControlImpl {
|
|
|
205
223
|
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
|
|
206
224
|
}), _error.FcrErrorModuleCode.ROOM_PRIVILEGE, 'allow change user name failed');
|
|
207
225
|
}
|
|
226
|
+
async allowStartCaption(enable, targetRoles) {
|
|
227
|
+
await (0, _error.handleRequestError)(() => this._api.allowStartCaption({
|
|
228
|
+
roomUuid: this._scene.sceneId,
|
|
229
|
+
enable,
|
|
230
|
+
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
|
|
231
|
+
}), _error.FcrErrorModuleCode.ROOM_STT, 'allow start caption failed');
|
|
232
|
+
}
|
|
233
|
+
async allowStartTranscribing(enable, targetRoles) {
|
|
234
|
+
await (0, _error.handleRequestError)(() => this._api.allowStartTranscribing({
|
|
235
|
+
roomUuid: this._scene.sceneId,
|
|
236
|
+
enable,
|
|
237
|
+
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
|
|
238
|
+
}), _error.FcrErrorModuleCode.ROOM_STT, 'allow start transcribing failed');
|
|
239
|
+
}
|
|
240
|
+
async allowUpdateSttSourceLanguage(enable, targetRoles) {
|
|
241
|
+
await (0, _error.handleRequestError)(() => this._api.allowUpdateSttSourceLanguage({
|
|
242
|
+
roomUuid: this._scene.sceneId,
|
|
243
|
+
enable,
|
|
244
|
+
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
|
|
245
|
+
}), _error.FcrErrorModuleCode.ROOM_STT, 'allow update stt source language failed');
|
|
246
|
+
}
|
|
247
|
+
async allowJoinWithPromptSound(enable, targetRoles) {
|
|
248
|
+
await (0, _error.handleRequestError)(() => this._api.allowJoinWithPromptSound({
|
|
249
|
+
roomId: this._scene.sceneId,
|
|
250
|
+
enable,
|
|
251
|
+
targetRoles: targetRoles.map(role => _type2.FcrPrivilegeUserRoleToStringMap[role])
|
|
252
|
+
}), _error.FcrErrorModuleCode.ROOM_PRIVILEGE, 'allow join with prompt sound failed');
|
|
253
|
+
}
|
|
208
254
|
addObserver(observer) {
|
|
209
255
|
this._observable.addObserver(observer);
|
|
210
256
|
}
|
|
@@ -222,13 +268,12 @@ class FcrPrivilegeControlImpl {
|
|
|
222
268
|
payload
|
|
223
269
|
} = security;
|
|
224
270
|
if (action === _type2.FcrSecurityAction.Annotation) {
|
|
225
|
-
return {
|
|
271
|
+
return _objectSpread({
|
|
226
272
|
info: {
|
|
227
273
|
action: action,
|
|
228
274
|
payload
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
};
|
|
275
|
+
}
|
|
276
|
+
}, security);
|
|
232
277
|
}
|
|
233
278
|
return {
|
|
234
279
|
enable: !!security.enable,
|
|
@@ -253,7 +298,7 @@ class FcrPrivilegeControlImpl {
|
|
|
253
298
|
enable: operateType === _type2.FcrOperatePermissionType.ADD || operateType === _type2.FcrOperatePermissionType.GET ? true : false,
|
|
254
299
|
info: {
|
|
255
300
|
targetRoles: permission.targetRoles.map(role => (0, _user.convertStringPrivilegeRoleToFcrPrivilegeRole)(role)),
|
|
256
|
-
action:
|
|
301
|
+
action: "".concat(module, ":").concat(action),
|
|
257
302
|
params: permission.conditions
|
|
258
303
|
}
|
|
259
304
|
};
|
|
@@ -265,7 +310,7 @@ class FcrPrivilegeControlImpl {
|
|
|
265
310
|
if ('security' in event.changedProperties) {
|
|
266
311
|
const securityChangedKeys = Object.keys(event.changedProperties.security);
|
|
267
312
|
securityChangedKeys.forEach(key => {
|
|
268
|
-
const infoObj = (0, _imports.get)(event.changedProperties,
|
|
313
|
+
const infoObj = (0, _imports.get)(event.changedProperties, "security.".concat(key));
|
|
269
314
|
this._observable.notifyObservers('onSecurityInfoUpdated', sceneId, {
|
|
270
315
|
securityInfo: this._convertSecurityInfo(infoObj, key),
|
|
271
316
|
operatorUser: (0, _user.checkFcrUserRole)((0, _user.convertRteUserToFcrUser)(event.operatorUser, this._roomCache)),
|
|
@@ -288,4 +333,6 @@ class FcrPrivilegeControlImpl {
|
|
|
288
333
|
this.addObserver((0, _logger.generateLogObserver)(this.logger, ['onSecurityInfoUpdated', 'onLocalUserPermissionInfoAdded', 'onLocalUserPermissionInfoDeleted']));
|
|
289
334
|
}
|
|
290
335
|
}
|
|
291
|
-
exports.FcrPrivilegeControlImpl = FcrPrivilegeControlImpl;
|
|
336
|
+
exports.FcrPrivilegeControlImpl = FcrPrivilegeControlImpl;
|
|
337
|
+
_FcrPrivilegeControlImpl = FcrPrivilegeControlImpl;
|
|
338
|
+
[_initProto] = _applyDecs(_FcrPrivilegeControlImpl, [[_imports.trace, 2, "allowWriteAnnotation"], [_getSecurityInfoDecs, 2, "getSecurityInfo"], [_getLocalUserPermissionInfoDecs, 2, "getLocalUserPermissionInfo"], [_enableLockedRoomDecs, 2, "enableLockedRoom"], [_allowShareAndWriteDecs, 2, "allowShareAndWrite"], [_allowWriteBoardDecs, 2, "allowWriteBoard"], [_allowWriteBoardByUserIdsDecs, 2, "allowWriteBoardByUserIds"], [_allowSendChatDecs, 2, "allowSendChat"], [_allowStartAudioDecs, 2, "allowStartAudio"], [_allowStartVideoDecs, 2, "allowStartVideo"], [_allowJoinWithMutedAudioDecs, 2, "allowJoinWithMutedAudio"], [_allowJoinWithMutedVideoDecs, 2, "allowJoinWithMutedVideo"], [_allowWatermarkDecs, 2, "allowWatermark"], [_allowChangeUserNameDecs, 2, "allowChangeUserName"], [_allowStartCaptionDecs, 2, "allowStartCaption"], [_allowStartTranscribingDecs, 2, "allowStartTranscribing"], [_allowUpdateSttSourceLanguageDecs, 2, "allowUpdateSttSourceLanguage"], [_allowJoinWithPromptSoundDecs, 2, "allowJoinWithPromptSound"]], []).e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FcrSecurityPrivateChatConfigSchema, FcrSecuritySendChatPayloadSchema } from '../../schema';
|
|
2
2
|
import { FcrLineType, FcrUserInfo } from '../../type';
|
|
3
|
-
import { FcrSharePermissionState } from '../
|
|
3
|
+
import { FcrSharePermissionState } from '../sharing-control/type';
|
|
4
4
|
export interface FcrPrivilegeControl {
|
|
5
5
|
/**
|
|
6
6
|
* Gets the security information of the specified action.
|
|
@@ -38,6 +38,12 @@ export interface FcrPrivilegeControl {
|
|
|
38
38
|
* @param targetRoles
|
|
39
39
|
*/
|
|
40
40
|
allowWriteBoard(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Enables or disables whiteboard write privilege by user ids.
|
|
43
|
+
* @param enable
|
|
44
|
+
* @param targetUserIds
|
|
45
|
+
*/
|
|
46
|
+
allowWriteBoardByUserIds(enable: boolean, targetUserIds: string[]): Promise<void>;
|
|
41
47
|
/**
|
|
42
48
|
* Enables or disables send chat.
|
|
43
49
|
* @param enable
|
|
@@ -87,6 +93,30 @@ export interface FcrPrivilegeControl {
|
|
|
87
93
|
* @param targetRoles
|
|
88
94
|
*/
|
|
89
95
|
allowWriteAnnotation(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Enables or disables start caption.
|
|
98
|
+
* @param enable
|
|
99
|
+
* @param targetRoles
|
|
100
|
+
*/
|
|
101
|
+
allowStartCaption(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Enables or disables start transcribing.
|
|
104
|
+
* @param enable
|
|
105
|
+
* @param targetRoles
|
|
106
|
+
*/
|
|
107
|
+
allowStartTranscribing(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Enables or disables update stt source language.
|
|
110
|
+
* @param enable
|
|
111
|
+
* @param targetRoles
|
|
112
|
+
*/
|
|
113
|
+
allowUpdateSttSourceLanguage(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Enables or disables join with prompt sound.
|
|
116
|
+
* @param enable
|
|
117
|
+
* @param targetRoles
|
|
118
|
+
*/
|
|
119
|
+
allowJoinWithPromptSound(enable: boolean, targetRoles: FcrPrivilegeUserRole[]): Promise<void>;
|
|
90
120
|
/**
|
|
91
121
|
* Adds an observer.
|
|
92
122
|
* @param observer
|
|
@@ -173,13 +203,13 @@ export declare enum FcrPrivilegeUserRole {
|
|
|
173
203
|
SELF = 7
|
|
174
204
|
}
|
|
175
205
|
export declare const FcrPrivilegeUserRoleToStringMap: {
|
|
176
|
-
1:
|
|
177
|
-
2:
|
|
178
|
-
3:
|
|
179
|
-
4:
|
|
180
|
-
5:
|
|
181
|
-
6:
|
|
182
|
-
7:
|
|
206
|
+
readonly 1: "host";
|
|
207
|
+
readonly 2: "cohost";
|
|
208
|
+
readonly 3: "participant";
|
|
209
|
+
readonly 4: "audience";
|
|
210
|
+
readonly 5: "observer";
|
|
211
|
+
readonly 6: "robot";
|
|
212
|
+
readonly 7: "~";
|
|
183
213
|
};
|
|
184
214
|
export declare const FcrPrivilegeUserStringToRoleMap: {
|
|
185
215
|
host: FcrPrivilegeUserRole;
|
|
@@ -229,6 +259,7 @@ export declare enum FcrPermissionAction {
|
|
|
229
259
|
StreamEnableJoinWithVideo = "stream:disallowJoinWithCloseVideo",
|
|
230
260
|
StreamDisableJoinWithAudio = "stream:allowJoinWithMuteAudio",
|
|
231
261
|
StreamEnableJoinWithAudio = "stream:disallowJoinWithMuteAudio",
|
|
262
|
+
StreamAllowJoinWithPromptSound = "stream:allowJoinWithPromptSound",
|
|
232
263
|
WaitingRoomOpen = "waitingRoom:enable",
|
|
233
264
|
WaitingRoomClose = "waitingRoom:disable",
|
|
234
265
|
WaitingRoomAddUser = "waitingRoom:addUser",
|
|
@@ -260,8 +291,20 @@ export declare enum FcrPermissionAction {
|
|
|
260
291
|
BoardDisallowWrite = "board:disallowWrite",
|
|
261
292
|
InterpreterStart = "interpreter:start",
|
|
262
293
|
InterpreterStop = "interpreter:stop",
|
|
294
|
+
AnnotationStart = "annotation:start",
|
|
263
295
|
AnnotationWrite = "annotation:write",
|
|
264
|
-
AnnotationAllowWrite = "annotation:allowWrite"
|
|
296
|
+
AnnotationAllowWrite = "annotation:allowWrite",
|
|
297
|
+
SttAllowStartCaption = "stt:allowStartCaption",
|
|
298
|
+
SttDisallowStartCaption = "stt:disallowStartCaption",
|
|
299
|
+
SttAllowStartTranscribe = "stt:allowStartTranscribe",
|
|
300
|
+
SttDisallowStartTranscribe = "stt:disallowStartTranscribe",
|
|
301
|
+
SttAllowModifySpeechLanguage = "stt:allowModifySpeechLanguage",
|
|
302
|
+
SttDisallowModifySpeechLanguage = "stt:disallowModifySpeechLanguage",
|
|
303
|
+
SttStartCaption = "stt:startCaption",
|
|
304
|
+
SttStopCaption = "stt:stopCaption",
|
|
305
|
+
SttStartTranscribe = "stt:startTranscribe",
|
|
306
|
+
SttStopTranscribe = "stt:stopTranscribe",
|
|
307
|
+
SttModifySpeechLanguage = "stt:modifySpeechLanguage"
|
|
265
308
|
}
|
|
266
309
|
export type FcrPermission = {
|
|
267
310
|
action: FcrPermissionAction;
|
|
@@ -298,7 +341,11 @@ export declare enum FcrSecurityAction {
|
|
|
298
341
|
BoardAllowWrite = "boardAllowWrite",
|
|
299
342
|
Sharing = "sharing",
|
|
300
343
|
WaterMark = "watermark",
|
|
301
|
-
Annotation = "annotation"
|
|
344
|
+
Annotation = "annotation",
|
|
345
|
+
SttSourceLanguage = "stt",
|
|
346
|
+
SttStartCaption = "caption",
|
|
347
|
+
SttStartTranscribe = "transcribe",
|
|
348
|
+
JoinWithPromptSound = "joinWithPromptSound"
|
|
302
349
|
}
|
|
303
350
|
export declare enum FcrWatermarkPermissionState {
|
|
304
351
|
ON = 1,
|
|
@@ -75,6 +75,7 @@ let FcrPermissionAction = exports.FcrPermissionAction = /*#__PURE__*/function (F
|
|
|
75
75
|
FcrPermissionAction["StreamEnableJoinWithVideo"] = "stream:disallowJoinWithCloseVideo";
|
|
76
76
|
FcrPermissionAction["StreamDisableJoinWithAudio"] = "stream:allowJoinWithMuteAudio";
|
|
77
77
|
FcrPermissionAction["StreamEnableJoinWithAudio"] = "stream:disallowJoinWithMuteAudio";
|
|
78
|
+
FcrPermissionAction["StreamAllowJoinWithPromptSound"] = "stream:allowJoinWithPromptSound";
|
|
78
79
|
FcrPermissionAction["WaitingRoomOpen"] = "waitingRoom:enable";
|
|
79
80
|
FcrPermissionAction["WaitingRoomClose"] = "waitingRoom:disable";
|
|
80
81
|
FcrPermissionAction["WaitingRoomAddUser"] = "waitingRoom:addUser";
|
|
@@ -106,8 +107,20 @@ let FcrPermissionAction = exports.FcrPermissionAction = /*#__PURE__*/function (F
|
|
|
106
107
|
FcrPermissionAction["BoardDisallowWrite"] = "board:disallowWrite";
|
|
107
108
|
FcrPermissionAction["InterpreterStart"] = "interpreter:start";
|
|
108
109
|
FcrPermissionAction["InterpreterStop"] = "interpreter:stop";
|
|
110
|
+
FcrPermissionAction["AnnotationStart"] = "annotation:start";
|
|
109
111
|
FcrPermissionAction["AnnotationWrite"] = "annotation:write";
|
|
110
112
|
FcrPermissionAction["AnnotationAllowWrite"] = "annotation:allowWrite";
|
|
113
|
+
FcrPermissionAction["SttAllowStartCaption"] = "stt:allowStartCaption";
|
|
114
|
+
FcrPermissionAction["SttDisallowStartCaption"] = "stt:disallowStartCaption";
|
|
115
|
+
FcrPermissionAction["SttAllowStartTranscribe"] = "stt:allowStartTranscribe";
|
|
116
|
+
FcrPermissionAction["SttDisallowStartTranscribe"] = "stt:disallowStartTranscribe";
|
|
117
|
+
FcrPermissionAction["SttAllowModifySpeechLanguage"] = "stt:allowModifySpeechLanguage";
|
|
118
|
+
FcrPermissionAction["SttDisallowModifySpeechLanguage"] = "stt:disallowModifySpeechLanguage";
|
|
119
|
+
FcrPermissionAction["SttStartCaption"] = "stt:startCaption";
|
|
120
|
+
FcrPermissionAction["SttStopCaption"] = "stt:stopCaption";
|
|
121
|
+
FcrPermissionAction["SttStartTranscribe"] = "stt:startTranscribe";
|
|
122
|
+
FcrPermissionAction["SttStopTranscribe"] = "stt:stopTranscribe";
|
|
123
|
+
FcrPermissionAction["SttModifySpeechLanguage"] = "stt:modifySpeechLanguage";
|
|
111
124
|
return FcrPermissionAction;
|
|
112
125
|
}({});
|
|
113
126
|
let FcrOperatePermissionType = exports.FcrOperatePermissionType = /*#__PURE__*/function (FcrOperatePermissionType) {
|
|
@@ -139,6 +152,10 @@ let FcrSecurityAction = exports.FcrSecurityAction = /*#__PURE__*/function (FcrSe
|
|
|
139
152
|
FcrSecurityAction["Sharing"] = "sharing";
|
|
140
153
|
FcrSecurityAction["WaterMark"] = "watermark";
|
|
141
154
|
FcrSecurityAction["Annotation"] = "annotation";
|
|
155
|
+
FcrSecurityAction["SttSourceLanguage"] = "stt";
|
|
156
|
+
FcrSecurityAction["SttStartCaption"] = "caption";
|
|
157
|
+
FcrSecurityAction["SttStartTranscribe"] = "transcribe";
|
|
158
|
+
FcrSecurityAction["JoinWithPromptSound"] = "joinWithPromptSound";
|
|
142
159
|
return FcrSecurityAction;
|
|
143
160
|
}({});
|
|
144
161
|
let FcrWatermarkPermissionState = exports.FcrWatermarkPermissionState = /*#__PURE__*/function (FcrWatermarkPermissionState) {
|