fcr-ui-scene 3.4.2 → 3.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/device-store.d.ts +23 -14
- package/lib/common/device-store.js +361 -252
- package/lib/common/device-stream-store.d.ts +8 -14
- package/lib/common/device-stream-store.js +254 -116
- package/lib/common/event-store.d.ts +35 -10
- package/lib/common/event-store.js +64 -13
- package/lib/common/security-store.d.ts +47 -39
- package/lib/common/security-store.js +335 -379
- package/lib/electron/app.js +1 -0
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +4 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +38 -21
- package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +7 -0
- package/lib/modules/action-bar/components/apps/useWidgetList.js +43 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +8 -1
- package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +16 -1
- package/lib/modules/action-bar/smaller.js +5 -5
- package/lib/modules/chat/chat-bar/index.css +6 -0
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +51 -39
- package/lib/modules/chat/chat-select/index.css +27 -7
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +18 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +196 -128
- package/lib/modules/chat/components/chat-select/select-input/index.d.ts +7 -0
- package/lib/modules/chat/components/chat-select/select-input/index.js +35 -0
- package/lib/modules/chat/components/chat-select/select-item/index.d.ts +12 -0
- package/lib/modules/chat/components/chat-select/select-item/index.js +153 -0
- package/lib/modules/chat/components/chat-tabs/index.d.ts +2 -0
- package/lib/modules/chat/components/chat-tabs/index.js +61 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.d.ts +2 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.js +26 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.d.ts +7 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.js +55 -0
- package/lib/modules/chat/components/message-list/message-item/index.d.ts +15 -0
- package/lib/modules/chat/components/message-list/message-item/index.js +279 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.d.ts +9 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.js +67 -0
- package/lib/modules/chat/message-list.js +68 -51
- package/lib/modules/components/dialog-container/component/body.js +1 -2
- package/lib/modules/components/dialog-container/index.d.ts +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +6 -0
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +36 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +40 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +170 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +105 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +42 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +159 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +32 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +16 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +130 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +12 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +57 -0
- package/lib/modules/components/member-window/components/member-actions/index.d.ts +3 -0
- package/lib/modules/components/member-window/components/member-actions/index.js +122 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.js +24 -0
- package/lib/modules/components/member-window/components/member-actions/provider.d.ts +21 -0
- package/lib/modules/components/member-window/components/member-actions/provider.js +77 -0
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +48 -0
- package/lib/modules/components/member-window/components/member-actions/store.js +306 -0
- package/lib/modules/components/member-window/components/member-board.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-board.js +63 -0
- package/lib/modules/components/member-window/components/mic-volume.d.ts +2 -0
- package/lib/modules/components/member-window/components/mic-volume.js +23 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +4 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +40 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +8 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +62 -0
- package/lib/modules/components/member-window/components/video-player/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/video-player/index.js +38 -0
- package/lib/modules/components/member-window/types.d.ts +78 -0
- package/lib/modules/components/member-window/types.js +6 -0
- package/lib/modules/connection-gateway/components/tabs/index.js +2 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +7 -15
- package/lib/modules/control-bar/components/more-actions/index.js +5 -15
- package/lib/modules/dialog/components/system-preference/assets/bg1.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/bg2.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/fcr_png_host.png +0 -0
- package/lib/modules/dialog/components/widget/electron.d.ts +5 -0
- package/lib/modules/dialog/components/widget/electron.js +41 -0
- package/lib/modules/dialog/components/widget/index.d.ts +6 -0
- package/lib/modules/dialog/components/widget/index.js +41 -0
- package/lib/modules/dialog/type.d.ts +84 -0
- package/lib/modules/dialog/type.js +6 -0
- package/lib/modules/invite/components/pstn-invite.js +4 -13
- package/lib/modules/invite/pstn-invite.js +7 -9
- package/lib/modules/invite/store.d.ts +2 -0
- package/lib/modules/invite/store.js +6 -0
- package/lib/modules/invite/voip-invite.js +5 -6
- package/lib/modules/layout/member-window/index.css +116 -18
- package/lib/modules/layout/member-window/index.d.ts +10 -3
- package/lib/modules/layout/member-window/index.js +227 -115
- package/lib/modules/participant/attendee/index.css +0 -51
- package/lib/modules/participant/attendee/index.d.ts +8 -5
- package/lib/modules/participant/attendee/index.js +61 -15
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/confirm-input/index.d.ts +6 -0
- package/lib/modules/participant/components/confirm-input/index.js +49 -0
- package/lib/modules/participant/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.js +52 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +60 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +166 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +13 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +242 -0
- package/lib/modules/participant/components/participants/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/index.js +47 -0
- package/lib/modules/participant/components/participants/components/merge/index.d.ts +11 -0
- package/lib/modules/participant/components/participants/components/merge/index.js +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +191 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +204 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +219 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +70 -0
- package/lib/modules/participant/components/participants/components/participants/index.css +104 -0
- package/lib/modules/participant/components/participants/components/participants/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/participants/index.js +110 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +135 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.js +31 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +75 -0
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/types.d.ts +96 -0
- package/lib/modules/participant/components/participants/types.js +37 -0
- package/lib/modules/participant/components/user-action/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/user-action/audio-button/index.js +31 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/share-screen/selection/index.css +4 -0
- package/lib/modules/share-screen/selection/index.js +126 -129
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +29 -34
- package/lib/modules/video-window/components/deviceState/index.d.ts +7 -0
- package/lib/modules/video-window/components/deviceState/index.js +75 -0
- package/lib/modules/video-window/components/members/index.css +51 -0
- package/lib/modules/video-window/components/members/index.d.ts +2 -0
- package/lib/modules/video-window/components/members/index.js +130 -0
- package/lib/modules/video-window/components/speaking/index.css +86 -0
- package/lib/modules/video-window/components/speaking/index.d.ts +3 -0
- package/lib/modules/video-window/components/speaking/index.js +48 -0
- package/lib/modules/video-window/components/topControl/index.css +35 -0
- package/lib/modules/video-window/components/topControl/index.d.ts +3 -0
- package/lib/modules/video-window/components/topControl/index.js +79 -0
- package/lib/modules/widget/index.css +17 -0
- package/lib/modules/widget/index.d.ts +10 -0
- package/lib/modules/widget/index.js +114 -0
- package/lib/modules/widget/sdk.d.ts +30 -0
- package/lib/modules/widget/sdk.js +221 -0
- package/lib/modules/widget/store.d.ts +14 -0
- package/lib/modules/widget/store.js +28 -0
- package/lib/modules/widget/type.d.ts +155 -0
- package/lib/modules/widget/type.js +6 -0
- package/lib/modules/widget/view.d.ts +2 -0
- package/lib/modules/widget/view.js +47 -0
- package/lib/modules/widget/web-widget.d.ts +29 -0
- package/lib/modules/widget/web-widget.js +234 -0
- package/lib/providers/ability-provider.d.ts +24 -0
- package/lib/providers/ability-provider.js +36 -0
- package/lib/providers/widget-provider.d.ts +44 -0
- package/lib/providers/widget-provider.js +167 -0
- package/lib/schema.d.ts +114 -0
- package/lib/schema.js +77 -0
- package/lib/shared-data-source/member-data.d.ts +126 -0
- package/lib/shared-data-source/member-data.js +465 -0
- package/lib/translations/enUS.d.ts +5 -0
- package/lib/translations/enUS.js +9 -3
- package/lib/translations/zhCN.d.ts +5 -0
- package/lib/translations/zhCN.js +13 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/logger.d.ts +8 -0
- package/lib/utilities/logger.js +42 -0
- package/lib/utilities/meeting-detail.d.ts +2 -0
- package/lib/utilities/meeting-detail.js +56 -0
- package/lib/utilities/validate-params.d.ts +2 -0
- package/lib/utilities/validate-params.js +16 -0
- package/lib/widget-sdk.d.ts +2 -0
- package/lib/widget-sdk.js +13 -0
- package/package.json +5 -5
|
@@ -37,8 +37,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", {
|
|
38
38
|
value: true
|
|
39
39
|
});
|
|
40
|
-
exports.FcrSecurityStore = void 0;
|
|
40
|
+
exports.SecurityStoreContext = exports.FcrSecurityStore = void 0;
|
|
41
41
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
42
|
+
require("core-js/modules/es.array.concat.js");
|
|
42
43
|
require("core-js/modules/es.array.find.js");
|
|
43
44
|
require("core-js/modules/es.array.for-each.js");
|
|
44
45
|
require("core-js/modules/es.array.includes.js");
|
|
@@ -70,24 +71,24 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
70
71
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
71
72
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
72
73
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
73
|
-
var
|
|
74
|
-
var _type = require("
|
|
74
|
+
var _fcrCore = require("fcr-core");
|
|
75
|
+
var _type = require("fcr-core/lib/type");
|
|
75
76
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
76
77
|
var _mobx = require("mobx");
|
|
77
78
|
var _mobxUtils = require("mobx-utils");
|
|
78
79
|
var _constant = require("../utilities/constant");
|
|
79
|
-
var _rendererEvent = require("../utilities/renderer-event");
|
|
80
80
|
var _lodash = require("lodash");
|
|
81
|
-
var _user = require("
|
|
81
|
+
var _user = require("fcr-core/lib/utilities/user");
|
|
82
82
|
var _toast = require("agora-ui-foundation/lib/components/toast");
|
|
83
|
-
var _enums = require("
|
|
83
|
+
var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
|
|
84
84
|
var _logger = require("agora-foundation/lib/logger");
|
|
85
85
|
var _type2 = require("agora-ui-foundation/lib/components/icon/type");
|
|
86
86
|
var _type3 = require("../modules/whiteboard/type");
|
|
87
87
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
88
|
-
var _type4 = require("
|
|
88
|
+
var _type4 = require("fcr-core/lib/room-control/privilege-control/type");
|
|
89
|
+
var _react = require("react");
|
|
89
90
|
var _FcrSecurityStore;
|
|
90
|
-
var _initProto, _init_securityInfos, _init_permissionInfos, _init_privilegeOperator, _init_boardOwnerUser, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _ref;
|
|
91
|
+
var _initProto, _init_securityInfos, _init_permissionInfos, _init_privilegeOperator, _init_boardOwnerUser, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _getInterpreterInfoDecs, _ref;
|
|
91
92
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
92
93
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
93
94
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -102,9 +103,9 @@ var _A = /*#__PURE__*/new WeakMap();
|
|
|
102
103
|
var _B = /*#__PURE__*/new WeakMap();
|
|
103
104
|
var _C = /*#__PURE__*/new WeakMap();
|
|
104
105
|
var _D = /*#__PURE__*/new WeakMap();
|
|
105
|
-
_ref = (_handlePermissionUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSecurityUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
106
|
+
_ref = (_handlePermissionUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSecurityUpdatedDecs = [_mobx.action, _mobx.action.bound], _getInterpreterInfoDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
106
107
|
var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
107
|
-
function FcrSecurityStore(_privilegeControl, _userControl, _streamControl,
|
|
108
|
+
function FcrSecurityStore(_privilegeControl, _userControl, _streamControl, _uiEventStore, _interpterControl) {
|
|
108
109
|
var _this = this;
|
|
109
110
|
(0, _classCallCheck2["default"])(this, FcrSecurityStore);
|
|
110
111
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
@@ -127,6 +128,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
127
128
|
});
|
|
128
129
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
129
130
|
}));
|
|
131
|
+
(0, _defineProperty2["default"])(this, "getWaterMarkContent", function () {
|
|
132
|
+
return _this._userControl.getWaterMarkContent() || 'Watermark';
|
|
133
|
+
});
|
|
130
134
|
(0, _defineProperty2["default"])(this, "convertSendChatPayload", function (payload) {
|
|
131
135
|
return {
|
|
132
136
|
"public": !!payload["public"],
|
|
@@ -194,7 +198,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
194
198
|
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
195
199
|
});
|
|
196
200
|
var shareState = info === null || info === void 0 || (_info$info = info.info) === null || _info$info === void 0 ? void 0 : _info$info.payload;
|
|
197
|
-
var screenShareState = shareState.screen === _enums.FcrSharePermissionState.ON;
|
|
201
|
+
var screenShareState = (shareState === null || shareState === void 0 ? void 0 : shareState.screen) === _enums.FcrSharePermissionState.ON;
|
|
198
202
|
return screenShareState;
|
|
199
203
|
}));
|
|
200
204
|
(0, _defineProperty2["default"])(this, "allowBoardWrite", (0, _mobxUtils.computedFn)(function () {
|
|
@@ -204,7 +208,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
204
208
|
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
205
209
|
});
|
|
206
210
|
var shareState = info === null || info === void 0 || (_info$info2 = info.info) === null || _info$info2 === void 0 ? void 0 : _info$info2.payload;
|
|
207
|
-
var boardWriteState = ((_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.write) === _enums.FcrSharePermissionState.ON;
|
|
211
|
+
var boardWriteState = (shareState === null || shareState === void 0 || (_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.write) === _enums.FcrSharePermissionState.ON;
|
|
208
212
|
return boardWriteState;
|
|
209
213
|
}));
|
|
210
214
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfVideo", (0, _mobxUtils.computedFn)(function () {
|
|
@@ -235,6 +239,17 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
235
239
|
});
|
|
236
240
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
237
241
|
}));
|
|
242
|
+
(0, _defineProperty2["default"])(this, "isWaterMarkEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
243
|
+
var info = _this.securityInfos.find(function (_ref16) {
|
|
244
|
+
var info = _ref16.info;
|
|
245
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaterMark;
|
|
246
|
+
});
|
|
247
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
248
|
+
}));
|
|
249
|
+
(0, _defineProperty2["default"])(this, "hasWaitingRoomPermission", function () {
|
|
250
|
+
var role = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _type4.FcrPrivilegeUserRole.PARTICIPANT;
|
|
251
|
+
return _this._hasPermission(_type4.FcrPermissionAction.WaitingRoomOpen, role);
|
|
252
|
+
});
|
|
238
253
|
(0, _defineProperty2["default"])(this, "hasMutePermission", function (targetRole) {
|
|
239
254
|
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, targetRole);
|
|
240
255
|
});
|
|
@@ -271,12 +286,21 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
271
286
|
(0, _defineProperty2["default"])(this, "hasKickOutPermission", function (targetRole) {
|
|
272
287
|
return _this._hasPermission(_type4.FcrPermissionAction.UserKickOut, targetRole);
|
|
273
288
|
});
|
|
289
|
+
(0, _defineProperty2["default"])(this, "hasCallMergePermission", function () {
|
|
290
|
+
return _this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
291
|
+
});
|
|
292
|
+
(0, _defineProperty2["default"])(this, "hasCallSplitPermission", function () {
|
|
293
|
+
return _this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
294
|
+
});
|
|
274
295
|
(0, _defineProperty2["default"])(this, "hasStartScreenSharePermission", function () {
|
|
275
296
|
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartScreenShare, _type4.FcrPrivilegeUserRole.SELF);
|
|
276
297
|
});
|
|
277
298
|
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermission", function () {
|
|
278
299
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
279
300
|
});
|
|
301
|
+
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermissionByTargetRole", function (targetRole) {
|
|
302
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, targetRole);
|
|
303
|
+
});
|
|
280
304
|
// 是否有权限发送私信息
|
|
281
305
|
(0, _defineProperty2["default"])(this, "hasPermissionToSendPrivateMessage", function (targetRole) {
|
|
282
306
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPrivate, targetRole);
|
|
@@ -297,6 +321,12 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
297
321
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendPrivate", function () {
|
|
298
322
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
299
323
|
});
|
|
324
|
+
// 是否有设置角色的权限
|
|
325
|
+
(0, _defineProperty2["default"])(this, "hasSetRolePermission", function (targetRole, setToRole) {
|
|
326
|
+
return _this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
327
|
+
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
328
|
+
});
|
|
329
|
+
});
|
|
300
330
|
(0, _defineProperty2["default"])(this, "hasStartCloudRecordingPermission", function () {
|
|
301
331
|
return _this._hasPermission(_type4.FcrPermissionAction.RecordStartCloudRecording, _type4.FcrPrivilegeUserRole.SELF);
|
|
302
332
|
});
|
|
@@ -327,11 +357,166 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
327
357
|
(0, _defineProperty2["default"])(this, "hasLockRoomPermission", function () {
|
|
328
358
|
return _this._hasPermission(_type4.FcrPermissionAction.RoomLock, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
329
359
|
});
|
|
360
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkEnablePermission", function () {
|
|
361
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomEnableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
362
|
+
});
|
|
363
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkDisablePermission", function () {
|
|
364
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomDisableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
365
|
+
});
|
|
366
|
+
(0, _defineProperty2["default"])(this, "hasEndRoomPermission", function () {
|
|
367
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
368
|
+
});
|
|
369
|
+
(0, _defineProperty2["default"])(this, "hasAssignHostBeforeLeavingPermission", function (role) {
|
|
370
|
+
return _this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
371
|
+
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
(0, _defineProperty2["default"])(this, "hasStartBoardPermission", function () {
|
|
375
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
376
|
+
});
|
|
377
|
+
(0, _defineProperty2["default"])(this, "hasCloseBoardPermission", function () {
|
|
378
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
379
|
+
});
|
|
380
|
+
(0, _defineProperty2["default"])(this, "hasWriteBoardPermission", function () {
|
|
381
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
382
|
+
});
|
|
383
|
+
(0, _defineProperty2["default"])(this, "hasAllowStartBoardPermission", function () {
|
|
384
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
385
|
+
});
|
|
386
|
+
(0, _defineProperty2["default"])(this, "hasDisallowStartBoardPermission", function () {
|
|
387
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
388
|
+
});
|
|
389
|
+
(0, _defineProperty2["default"])(this, "hasAllowWriteBoardPermission", function () {
|
|
390
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
391
|
+
});
|
|
392
|
+
(0, _defineProperty2["default"])(this, "hasDisallowWriteBoardPermission", function () {
|
|
393
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
394
|
+
});
|
|
395
|
+
(0, _defineProperty2["default"])(this, "hasAllowScreenShareAndBoardPermission", function () {
|
|
396
|
+
var _this$_privilegeContr;
|
|
397
|
+
return (_this$_privilegeContr = _this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
398
|
+
});
|
|
399
|
+
(0, _defineProperty2["default"])(this, "hasAllowWaterMarkPermission", function () {
|
|
400
|
+
var _this$_privilegeContr2;
|
|
401
|
+
return (_this$_privilegeContr2 = _this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.WaterMark)) === null || _this$_privilegeContr2 === void 0 ? void 0 : _this$_privilegeContr2.enable;
|
|
402
|
+
});
|
|
403
|
+
(0, _defineProperty2["default"])(this, "hasEnableInterpreterPermission", function () {
|
|
404
|
+
return _this._hasPermission(_type4.FcrPermissionAction.InterpreterStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
405
|
+
});
|
|
406
|
+
(0, _defineProperty2["default"])(this, "hasDisableInterpreterPermission", function () {
|
|
407
|
+
return _this._hasPermission(_type4.FcrPermissionAction.InterpreterStop, _type4.FcrPrivilegeUserRole.SELF);
|
|
408
|
+
});
|
|
409
|
+
(0, _defineProperty2["default"])(this, "hasAllowChangeNamePermission", function () {
|
|
410
|
+
return _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.UserAllowChangeName).enable;
|
|
411
|
+
});
|
|
412
|
+
(0, _defineProperty2["default"])(this, "hasDisallowChangeNamePermission", function () {
|
|
413
|
+
return _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.UserDisallowChangeName).enable;
|
|
414
|
+
});
|
|
415
|
+
(0, _defineProperty2["default"])(this, "hasChangeNamePermission", function (targetRole) {
|
|
416
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserChangeName, targetRole);
|
|
417
|
+
});
|
|
418
|
+
(0, _defineProperty2["default"])(this, "isMulti", (0, _mobxUtils.computedFn)(function () {
|
|
419
|
+
var _info$info3;
|
|
420
|
+
var info = _this.securityInfos.find(function (_ref17) {
|
|
421
|
+
var info = _ref17.info;
|
|
422
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaterMark;
|
|
423
|
+
});
|
|
424
|
+
return (info === null || info === void 0 || (_info$info3 = info.info) === null || _info$info3 === void 0 ? void 0 : _info$info3.payload.lineType) === _type.FcrLineType.MULTI_ROW;
|
|
425
|
+
}));
|
|
426
|
+
(0, _defineProperty2["default"])(this, "getAllowedOperations", function (targetUserRole, isSelf) {
|
|
427
|
+
var operations = [];
|
|
428
|
+
if (_this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
429
|
+
//请求开启摄像头权限
|
|
430
|
+
operations.push('request_start_video');
|
|
431
|
+
}
|
|
432
|
+
if (_this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
433
|
+
//开启摄像头权限
|
|
434
|
+
operations.push('start_video');
|
|
435
|
+
}
|
|
436
|
+
if (_this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
437
|
+
//关闭摄像头权限
|
|
438
|
+
operations.push('stop_video');
|
|
439
|
+
}
|
|
440
|
+
if (_this.hasPermissionToSendPrivateMessage(targetUserRole)) {
|
|
441
|
+
//私聊权限
|
|
442
|
+
operations.push('private_chat');
|
|
443
|
+
}
|
|
444
|
+
operations.push('pin');
|
|
445
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
446
|
+
//设为主持人权限
|
|
447
|
+
operations.push('set_as_host');
|
|
448
|
+
}
|
|
449
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
450
|
+
//设为联席主持人权限
|
|
451
|
+
operations.push('set_as_co_host');
|
|
452
|
+
}
|
|
453
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
454
|
+
//撤销联席主持人权限
|
|
455
|
+
operations.push('revoke_co_host');
|
|
456
|
+
}
|
|
457
|
+
if (_this.hasCallMergePermission()) {
|
|
458
|
+
//与视频合并权限
|
|
459
|
+
operations.push('merge_video');
|
|
460
|
+
}
|
|
461
|
+
if (_this.hasKickOutPermission(targetUserRole)) {
|
|
462
|
+
//移除房间权限
|
|
463
|
+
operations.push('kick_out');
|
|
464
|
+
}
|
|
465
|
+
if (_this.hasWaitingRoomPermission(targetUserRole)) {
|
|
466
|
+
operations.push('put_into_waiting_room');
|
|
467
|
+
}
|
|
468
|
+
if (_this.hasChangeNamePermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
469
|
+
operations.push('change_name');
|
|
470
|
+
}
|
|
471
|
+
return operations;
|
|
472
|
+
});
|
|
473
|
+
(0, _defineProperty2["default"])(this, "allowShare", /*#__PURE__*/function () {
|
|
474
|
+
var _ref18 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
475
|
+
var enable;
|
|
476
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
477
|
+
while (1) switch (_context.prev = _context.next) {
|
|
478
|
+
case 0:
|
|
479
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
480
|
+
_context.next = 3;
|
|
481
|
+
return _this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
482
|
+
case 3:
|
|
483
|
+
return _context.abrupt("return", _context.sent);
|
|
484
|
+
case 4:
|
|
485
|
+
case "end":
|
|
486
|
+
return _context.stop();
|
|
487
|
+
}
|
|
488
|
+
}, _callee);
|
|
489
|
+
}));
|
|
490
|
+
return function (_x) {
|
|
491
|
+
return _ref18.apply(this, arguments);
|
|
492
|
+
};
|
|
493
|
+
}());
|
|
494
|
+
(0, _defineProperty2["default"])(this, "setAllowWriteBoard", /*#__PURE__*/function () {
|
|
495
|
+
var _ref19 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
|
|
496
|
+
var enable;
|
|
497
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
498
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
499
|
+
case 0:
|
|
500
|
+
enable = typeof state === 'boolean' ? state : state === _enums.FcrSharePermissionState.ON;
|
|
501
|
+
_context2.next = 3;
|
|
502
|
+
return _this._privilegeControl.allowWriteBoard(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
503
|
+
case 3:
|
|
504
|
+
return _context2.abrupt("return", _context2.sent);
|
|
505
|
+
case 4:
|
|
506
|
+
case "end":
|
|
507
|
+
return _context2.stop();
|
|
508
|
+
}
|
|
509
|
+
}, _callee2);
|
|
510
|
+
}));
|
|
511
|
+
return function (_x2) {
|
|
512
|
+
return _ref19.apply(this, arguments);
|
|
513
|
+
};
|
|
514
|
+
}());
|
|
330
515
|
//全体静音
|
|
331
516
|
(0, _defineProperty2["default"])(this, "muteAll", function () {
|
|
332
517
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
333
|
-
audioPrivilege:
|
|
334
|
-
videoPrivilege:
|
|
518
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
519
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
335
520
|
}, {
|
|
336
521
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
337
522
|
targetRoleTypeIsInclude: true
|
|
@@ -340,8 +525,8 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
340
525
|
//要求所有人解除静音
|
|
341
526
|
(0, _defineProperty2["default"])(this, "unmuteAll", function () {
|
|
342
527
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
343
|
-
audioPrivilege:
|
|
344
|
-
videoPrivilege:
|
|
528
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
529
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
345
530
|
}, {
|
|
346
531
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
347
532
|
targetRoleTypeIsInclude: true
|
|
@@ -353,8 +538,8 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
353
538
|
(0, _defineProperty2["default"])(this, "setWaitingRoomEnabled", function () {
|
|
354
539
|
// this._privilegeControl.enableWaitingRoom(true);
|
|
355
540
|
});
|
|
356
|
-
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function () {
|
|
357
|
-
|
|
541
|
+
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function (enable) {
|
|
542
|
+
_this._privilegeControl.allowChangeUserName(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
358
543
|
});
|
|
359
544
|
//设置是否允许聊天
|
|
360
545
|
(0, _defineProperty2["default"])(this, "setAllowChat", function (enable) {
|
|
@@ -399,14 +584,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
399
584
|
});
|
|
400
585
|
//允许屏幕共享
|
|
401
586
|
(0, _defineProperty2["default"])(this, "setAllowShareScreen", function (state) {
|
|
402
|
-
|
|
403
|
-
var payload = {
|
|
404
|
-
screen: enable,
|
|
405
|
-
board: {
|
|
406
|
-
start: enable
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
587
|
+
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
410
588
|
});
|
|
411
589
|
//允许开启视频
|
|
412
590
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfVideo", function (enable) {
|
|
@@ -416,12 +594,16 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
416
594
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfAudio", function (enable) {
|
|
417
595
|
_this._privilegeControl.allowStartAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
418
596
|
});
|
|
597
|
+
(0, _defineProperty2["default"])(this, "hasSendAllChatPermission", function () {
|
|
598
|
+
var _this$_privilegeContr3;
|
|
599
|
+
return (_this$_privilegeContr3 = _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.ChatSendPublic)) === null || _this$_privilegeContr3 === void 0 ? void 0 : _this$_privilegeContr3.enable;
|
|
600
|
+
});
|
|
419
601
|
(0, _defineProperty2["default"])(this, "_hasPermission", (0, _mobxUtils.computedFn)(function (action, targetRole) {
|
|
420
602
|
var _this$permissionInfos;
|
|
421
603
|
var convertedRole = targetRole === _type4.FcrPrivilegeUserRole.SELF ? [_this.localUser.userRole, _type4.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
422
|
-
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (
|
|
604
|
+
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (_ref20) {
|
|
423
605
|
var _info$targetRoles;
|
|
424
|
-
var info =
|
|
606
|
+
var info = _ref20.info;
|
|
425
607
|
return (info === null || info === void 0 ? void 0 : info.action) === action && ((info === null || info === void 0 || (_info$targetRoles = info.targetRoles) === null || _info$targetRoles === void 0 ? void 0 : _info$targetRoles.length) === 0 || convertedRole.some(function (role) {
|
|
426
608
|
var _info$targetRoles2;
|
|
427
609
|
return info === null || info === void 0 || (_info$targetRoles2 = info.targetRoles) === null || _info$targetRoles2 === void 0 ? void 0 : _info$targetRoles2.includes(role);
|
|
@@ -437,9 +619,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
437
619
|
return _params && _params[key].includes(params[key]);
|
|
438
620
|
});
|
|
439
621
|
};
|
|
440
|
-
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (
|
|
622
|
+
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (_ref21) {
|
|
441
623
|
var _info$targetRoles3, _info$params;
|
|
442
|
-
var info =
|
|
624
|
+
var info = _ref21.info;
|
|
443
625
|
return (info === null || info === void 0 ? void 0 : info.action) === action && ((info === null || info === void 0 || (_info$targetRoles3 = info.targetRoles) === null || _info$targetRoles3 === void 0 ? void 0 : _info$targetRoles3.length) === 0 || convertedRole.some(function (role) {
|
|
444
626
|
var _info$targetRoles4;
|
|
445
627
|
return info === null || info === void 0 || (_info$targetRoles4 = info.targetRoles) === null || _info$targetRoles4 === void 0 ? void 0 : _info$targetRoles4.includes(role);
|
|
@@ -447,16 +629,13 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
447
629
|
});
|
|
448
630
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
449
631
|
}));
|
|
450
|
-
(0, _defineProperty2["default"])(this, "_handleUnmuteSessionReceived", function () {});
|
|
451
632
|
this._privilegeControl = _privilegeControl;
|
|
452
633
|
this._userControl = _userControl;
|
|
453
634
|
this._streamControl = _streamControl;
|
|
454
|
-
this._roomSessionControl = _roomSessionControl;
|
|
455
635
|
this._uiEventStore = _uiEventStore;
|
|
636
|
+
this._interpterControl = _interpterControl;
|
|
456
637
|
this.securityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
457
638
|
this.permissionInfos = this._privilegeControl.getAllLocalUserPermissionInfo();
|
|
458
|
-
this._addReactions();
|
|
459
|
-
(0, _rendererEvent.addEventListener)(this._handleProcessEvent);
|
|
460
639
|
this._uiEventStore.addObserver({
|
|
461
640
|
onEvent: function onEvent(action, payload) {
|
|
462
641
|
if (action === _constant.UIAction.WHITEBOARD_CHANGED) {
|
|
@@ -510,181 +689,24 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
510
689
|
set: function set(v) {
|
|
511
690
|
_classPrivateFieldSet(_D, this, v);
|
|
512
691
|
}
|
|
692
|
+
}, {
|
|
693
|
+
key: "hasSecurityPermission",
|
|
694
|
+
get: function get() {
|
|
695
|
+
return this.hasEnableStartScreenSharePermission() || this.hasPermissionToControlAllowSendAll() || this.hasEnableStartAudioPermission() || this.hasEnableChangeNamePermission() || this.hasEnableStartVideoPermission() || this.hasLockRoomPermission();
|
|
696
|
+
}
|
|
513
697
|
}, {
|
|
514
698
|
key: "release",
|
|
515
699
|
value: function release() {
|
|
516
|
-
this.
|
|
517
|
-
|
|
700
|
+
this._disposers.forEach(function (d) {
|
|
701
|
+
return d();
|
|
702
|
+
});
|
|
703
|
+
this._disposers = [];
|
|
518
704
|
}
|
|
519
705
|
}, {
|
|
520
706
|
key: "localUser",
|
|
521
707
|
get: function get() {
|
|
522
708
|
return this._userControl.getLocalUser();
|
|
523
709
|
}
|
|
524
|
-
}, {
|
|
525
|
-
key: "hasCallMergePermission",
|
|
526
|
-
value: function hasCallMergePermission() {
|
|
527
|
-
return this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
528
|
-
}
|
|
529
|
-
}, {
|
|
530
|
-
key: "hasCallSplitPermission",
|
|
531
|
-
value: function hasCallSplitPermission() {
|
|
532
|
-
return this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
533
|
-
}
|
|
534
|
-
}, {
|
|
535
|
-
key: "hasSetRolePermission",
|
|
536
|
-
value:
|
|
537
|
-
// 是否有设置角色的权限
|
|
538
|
-
function hasSetRolePermission(targetRole, setToRole) {
|
|
539
|
-
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
540
|
-
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
}, {
|
|
544
|
-
key: "hasEndRoomPermission",
|
|
545
|
-
value: function hasEndRoomPermission() {
|
|
546
|
-
return this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
547
|
-
}
|
|
548
|
-
}, {
|
|
549
|
-
key: "hasAssignHostBeforeLeavingPermission",
|
|
550
|
-
value: function hasAssignHostBeforeLeavingPermission(role) {
|
|
551
|
-
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
552
|
-
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
}, {
|
|
556
|
-
key: "hasStartBoardPermission",
|
|
557
|
-
value: function hasStartBoardPermission() {
|
|
558
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
559
|
-
}
|
|
560
|
-
}, {
|
|
561
|
-
key: "hasCloseBoardPermission",
|
|
562
|
-
value: function hasCloseBoardPermission() {
|
|
563
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
564
|
-
}
|
|
565
|
-
}, {
|
|
566
|
-
key: "hasWriteBoardPermission",
|
|
567
|
-
value: function hasWriteBoardPermission() {
|
|
568
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
569
|
-
}
|
|
570
|
-
}, {
|
|
571
|
-
key: "hasAllowStartBoardPermission",
|
|
572
|
-
value: function hasAllowStartBoardPermission() {
|
|
573
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
574
|
-
}
|
|
575
|
-
}, {
|
|
576
|
-
key: "hasDisallowStartBoardPermission",
|
|
577
|
-
value: function hasDisallowStartBoardPermission() {
|
|
578
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
579
|
-
}
|
|
580
|
-
}, {
|
|
581
|
-
key: "hasAllowWriteBoardPermission",
|
|
582
|
-
value: function hasAllowWriteBoardPermission() {
|
|
583
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
584
|
-
}
|
|
585
|
-
}, {
|
|
586
|
-
key: "hasDisallowWriteBoardPermission",
|
|
587
|
-
value: function hasDisallowWriteBoardPermission() {
|
|
588
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
589
|
-
}
|
|
590
|
-
}, {
|
|
591
|
-
key: "hasAllowScreenShareAndBoardPermission",
|
|
592
|
-
value: function hasAllowScreenShareAndBoardPermission() {
|
|
593
|
-
var _this$_privilegeContr;
|
|
594
|
-
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
595
|
-
}
|
|
596
|
-
}, {
|
|
597
|
-
key: "getAllowedOperations",
|
|
598
|
-
value: function getAllowedOperations(targetUserRole, isSelf) {
|
|
599
|
-
var operations = [];
|
|
600
|
-
if (this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
601
|
-
//请求开启摄像头权限
|
|
602
|
-
operations.push('request_start_video');
|
|
603
|
-
}
|
|
604
|
-
if (this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
605
|
-
//开启摄像头权限
|
|
606
|
-
operations.push('start_video');
|
|
607
|
-
}
|
|
608
|
-
if (this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
609
|
-
//关闭摄像头权限
|
|
610
|
-
operations.push('stop_video');
|
|
611
|
-
}
|
|
612
|
-
if (this.hasPermissionToSendPrivateMessage(targetUserRole)) {
|
|
613
|
-
//私聊权限
|
|
614
|
-
operations.push('private_chat');
|
|
615
|
-
}
|
|
616
|
-
operations.push('pin');
|
|
617
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
618
|
-
//设为主持人权限
|
|
619
|
-
operations.push('set_as_host');
|
|
620
|
-
}
|
|
621
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
622
|
-
//设为联席主持人权限
|
|
623
|
-
operations.push('set_as_co_host');
|
|
624
|
-
}
|
|
625
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
626
|
-
//撤销联席主持人权限
|
|
627
|
-
operations.push('revoke_co_host');
|
|
628
|
-
}
|
|
629
|
-
if (this.hasCallMergePermission()) {
|
|
630
|
-
//与视频合并权限
|
|
631
|
-
operations.push('merge_video');
|
|
632
|
-
}
|
|
633
|
-
if (this.hasKickOutPermission(targetUserRole)) {
|
|
634
|
-
//移除房间权限
|
|
635
|
-
operations.push('kick_out');
|
|
636
|
-
}
|
|
637
|
-
return operations;
|
|
638
|
-
}
|
|
639
|
-
}, {
|
|
640
|
-
key: "allowShare",
|
|
641
|
-
value: function () {
|
|
642
|
-
var _allowShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state, payload) {
|
|
643
|
-
var enable;
|
|
644
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
645
|
-
while (1) switch (_context.prev = _context.next) {
|
|
646
|
-
case 0:
|
|
647
|
-
enable = state === _enums.FcrSharePermissionState.ON;
|
|
648
|
-
_context.next = 3;
|
|
649
|
-
return this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
650
|
-
case 3:
|
|
651
|
-
return _context.abrupt("return", _context.sent);
|
|
652
|
-
case 4:
|
|
653
|
-
case "end":
|
|
654
|
-
return _context.stop();
|
|
655
|
-
}
|
|
656
|
-
}, _callee, this);
|
|
657
|
-
}));
|
|
658
|
-
function allowShare(_x, _x2) {
|
|
659
|
-
return _allowShare.apply(this, arguments);
|
|
660
|
-
}
|
|
661
|
-
return allowShare;
|
|
662
|
-
}()
|
|
663
|
-
}, {
|
|
664
|
-
key: "setAllowWriteBoard",
|
|
665
|
-
value: function () {
|
|
666
|
-
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state, payload) {
|
|
667
|
-
var enable;
|
|
668
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
669
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
670
|
-
case 0:
|
|
671
|
-
this.logger.info('setAllowWriteBoard', state);
|
|
672
|
-
enable = state === _enums.FcrSharePermissionState.ON;
|
|
673
|
-
_context2.next = 4;
|
|
674
|
-
return this._privilegeControl.allowWriteBoard(enable, [], payload);
|
|
675
|
-
case 4:
|
|
676
|
-
return _context2.abrupt("return", _context2.sent);
|
|
677
|
-
case 5:
|
|
678
|
-
case "end":
|
|
679
|
-
return _context2.stop();
|
|
680
|
-
}
|
|
681
|
-
}, _callee2, this);
|
|
682
|
-
}));
|
|
683
|
-
function setAllowWriteBoard(_x3, _x4) {
|
|
684
|
-
return _setAllowWriteBoard.apply(this, arguments);
|
|
685
|
-
}
|
|
686
|
-
return setAllowWriteBoard;
|
|
687
|
-
}()
|
|
688
710
|
}, {
|
|
689
711
|
key: "_handlePermissionUpdated",
|
|
690
712
|
value: function _handlePermissionUpdated() {
|
|
@@ -693,22 +715,29 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
693
715
|
}, {
|
|
694
716
|
key: "_handleSecurityUpdated",
|
|
695
717
|
value: function _handleSecurityUpdated(roomId, event) {
|
|
696
|
-
var
|
|
718
|
+
var _event$operatorUser,
|
|
719
|
+
_event$operatorUser2,
|
|
720
|
+
_this$privilegeOperat,
|
|
721
|
+
_securityInfo$info,
|
|
697
722
|
_securityInfo$info2,
|
|
698
723
|
_securityInfo$info3,
|
|
699
724
|
_securityInfo$info4,
|
|
700
725
|
_securityInfo$info5,
|
|
701
726
|
_securityInfo$info6,
|
|
702
|
-
_this2 = this
|
|
727
|
+
_this2 = this,
|
|
728
|
+
_event$securityInfo$i,
|
|
729
|
+
_event$securityInfo$i2;
|
|
703
730
|
this.securityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
704
731
|
this.privilegeOperator = event.operatorUser;
|
|
705
732
|
var securityInfo = event.securityInfo;
|
|
706
733
|
var enable = securityInfo.enable;
|
|
707
|
-
var
|
|
734
|
+
var isPersonalOperation = this.localUser.userId === ((_event$operatorUser = event.operatorUser) === null || _event$operatorUser === void 0 ? void 0 : _event$operatorUser.userId);
|
|
735
|
+
var toastType = isPersonalOperation ? 'normal' : 'info';
|
|
736
|
+
var operator = isPersonalOperation ? (0, _i18n.transI18n)('fmt_settings_labels_you') : (((_event$operatorUser2 = event.operatorUser) === null || _event$operatorUser2 === void 0 ? void 0 : _event$operatorUser2.userRole) === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_role_host') : (0, _i18n.transI18n)('fmt_role_cohost')) + " ".concat((_this$privilegeOperat = this.privilegeOperator) === null || _this$privilegeOperat === void 0 ? void 0 : _this$privilegeOperat.userName, " ");
|
|
708
737
|
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio) {
|
|
709
738
|
if (enable) {
|
|
710
739
|
this._uiEventStore.showToast({
|
|
711
|
-
type:
|
|
740
|
+
type: toastType,
|
|
712
741
|
message: (0, _i18n.transI18n)('fmt_settings_tips_muteallwhilejoin', {
|
|
713
742
|
reason1: operator
|
|
714
743
|
})
|
|
@@ -720,10 +749,12 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
720
749
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledselfunmuting', {
|
|
721
750
|
reason1: operator
|
|
722
751
|
});
|
|
723
|
-
this.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
752
|
+
if (!this._getInterpreterInfo()) {
|
|
753
|
+
this._uiEventStore.showToast({
|
|
754
|
+
type: toastType,
|
|
755
|
+
message: toastMessage
|
|
756
|
+
});
|
|
757
|
+
}
|
|
727
758
|
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) === _type4.FcrSecurityAction.StartVideo) {
|
|
728
759
|
var _toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_videoenabled', {
|
|
729
760
|
reason1: operator
|
|
@@ -731,7 +762,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
731
762
|
reason1: operator
|
|
732
763
|
});
|
|
733
764
|
this._uiEventStore.showToast({
|
|
734
|
-
type:
|
|
765
|
+
type: toastType,
|
|
735
766
|
message: _toastMessage
|
|
736
767
|
});
|
|
737
768
|
} else if (((_securityInfo$info4 = securityInfo.info) === null || _securityInfo$info4 === void 0 ? void 0 : _securityInfo$info4.action) === _type4.FcrSecurityAction.ShareScreen) {
|
|
@@ -741,7 +772,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
741
772
|
reason1: operator
|
|
742
773
|
});
|
|
743
774
|
this._uiEventStore.showToast({
|
|
744
|
-
type:
|
|
775
|
+
type: toastType,
|
|
745
776
|
message: _toastMessage2
|
|
746
777
|
});
|
|
747
778
|
} else if (((_securityInfo$info5 = securityInfo.info) === null || _securityInfo$info5 === void 0 ? void 0 : _securityInfo$info5.action) === _type4.FcrSecurityAction.SendChat) {
|
|
@@ -751,7 +782,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
751
782
|
reason1: operator
|
|
752
783
|
});
|
|
753
784
|
this._uiEventStore.showToast({
|
|
754
|
-
type:
|
|
785
|
+
type: toastType,
|
|
755
786
|
message: _toastMessage3
|
|
756
787
|
});
|
|
757
788
|
} else if (((_securityInfo$info6 = securityInfo.info) === null || _securityInfo$info6 === void 0 ? void 0 : _securityInfo$info6.action) === _type4.FcrSecurityAction.Sharing && !enable) {
|
|
@@ -765,7 +796,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
765
796
|
}
|
|
766
797
|
if (((_this$boardOwnerUser2 = this.boardOwnerUser) === null || _this$boardOwnerUser2 === void 0 ? void 0 : _this$boardOwnerUser2.userId) !== this.localUser.userId) {
|
|
767
798
|
this._uiEventStore.showToast({
|
|
768
|
-
type:
|
|
799
|
+
type: toastType,
|
|
769
800
|
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_alreadyopend')
|
|
770
801
|
});
|
|
771
802
|
} else {
|
|
@@ -782,9 +813,59 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
782
813
|
},
|
|
783
814
|
onCancel: function onCancel() {
|
|
784
815
|
_this2._uiEventStore.closeDialog(dialogKey);
|
|
785
|
-
}
|
|
816
|
+
},
|
|
817
|
+
width: 400,
|
|
818
|
+
height: 160
|
|
786
819
|
});
|
|
787
820
|
}
|
|
821
|
+
} else if (((_event$securityInfo$i = event.securityInfo.info) === null || _event$securityInfo$i === void 0 ? void 0 : _event$securityInfo$i.action) === _type4.FcrSecurityAction.WaitingRoom) {
|
|
822
|
+
var _event$operatorUser3, _event$operatorUser4;
|
|
823
|
+
var isSelf = this.localUser.userId === ((_event$operatorUser3 = event.operatorUser) === null || _event$operatorUser3 === void 0 ? void 0 : _event$operatorUser3.userId);
|
|
824
|
+
var userName = (_event$operatorUser4 = event.operatorUser) === null || _event$operatorUser4 === void 0 ? void 0 : _event$operatorUser4.userName;
|
|
825
|
+
if (!isSelf) {
|
|
826
|
+
if (enable) {
|
|
827
|
+
this._uiEventStore.showToast({
|
|
828
|
+
type: toastType,
|
|
829
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_setting_tips_enable'))
|
|
830
|
+
});
|
|
831
|
+
} else {
|
|
832
|
+
this._uiEventStore.showToast({
|
|
833
|
+
type: toastType,
|
|
834
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_mobile_setting_label_disable'))
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
} else if (((_event$securityInfo$i2 = event.securityInfo.info) === null || _event$securityInfo$i2 === void 0 ? void 0 : _event$securityInfo$i2.action) == _type4.FcrSecurityAction.WaterMark) {
|
|
839
|
+
var _event$securityInfo$i3;
|
|
840
|
+
var _enable = event.securityInfo.enable;
|
|
841
|
+
if (this._prevWaterMarkEnable !== _enable) {
|
|
842
|
+
var _event$operatorUser5;
|
|
843
|
+
var toastText = '';
|
|
844
|
+
var roleValue = (_event$operatorUser5 = event.operatorUser) === null || _event$operatorUser5 === void 0 ? void 0 : _event$operatorUser5.userRole;
|
|
845
|
+
var canTriggerToast = roleValue === _type.FcrUserRole.HOST || roleValue === _type.FcrUserRole.COHOST;
|
|
846
|
+
if (canTriggerToast) {
|
|
847
|
+
if (_enable) {
|
|
848
|
+
if (roleValue === _type.FcrUserRole.HOST) {
|
|
849
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_facilitator_watermark');
|
|
850
|
+
} else if (roleValue === _type.FcrUserRole.COHOST) {
|
|
851
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_co_facilitator_watermark');
|
|
852
|
+
}
|
|
853
|
+
} else {
|
|
854
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_turn_off_watermark');
|
|
855
|
+
}
|
|
856
|
+
this._prevWaterMarkEnable = _enable;
|
|
857
|
+
if (toastText) {
|
|
858
|
+
this._uiEventStore.showToast({
|
|
859
|
+
type: toastType,
|
|
860
|
+
message: toastText
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WATERMARK_INFO_UPDATE, {
|
|
866
|
+
enable: _enable,
|
|
867
|
+
lineType: (_event$securityInfo$i3 = event.securityInfo.info) === null || _event$securityInfo$i3 === void 0 ? void 0 : _event$securityInfo$i3.payload.lineType
|
|
868
|
+
});
|
|
788
869
|
}
|
|
789
870
|
}
|
|
790
871
|
}, {
|
|
@@ -838,176 +919,51 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
838
919
|
this.logger.debug(JSON.stringify((0, _mobx.toJS)(this.permissionInfos)));
|
|
839
920
|
}
|
|
840
921
|
}, {
|
|
841
|
-
key: "
|
|
842
|
-
value: function
|
|
843
|
-
var
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_UNMUTE_SELF_VIDEO:
|
|
860
|
-
this.setAllowUnmuteSelfVideo(payload.allow);
|
|
861
|
-
break;
|
|
862
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_UNMUTE_SELF_AUDIO:
|
|
863
|
-
this.setAllowUnmuteSelfAudio(payload.allow);
|
|
864
|
-
break;
|
|
865
|
-
case _constant.RendererEventAction.FRAGMENT_SET_LOCK_ROOM:
|
|
866
|
-
this.setLockRoomEnabled(payload.allow);
|
|
867
|
-
break;
|
|
868
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ENABLE_WAITING_ROOM:
|
|
869
|
-
// this.setWaitingRoomEnabled(payload.allow);
|
|
870
|
-
break;
|
|
871
|
-
default:
|
|
872
|
-
break;
|
|
922
|
+
key: "setAllowWaterMark",
|
|
923
|
+
value: function () {
|
|
924
|
+
var _setAllowWaterMark = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(state, lineType) {
|
|
925
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
926
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
927
|
+
case 0:
|
|
928
|
+
_context3.next = 2;
|
|
929
|
+
return this._privilegeControl.allowWatermark(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], lineType);
|
|
930
|
+
case 2:
|
|
931
|
+
return _context3.abrupt("return", _context3.sent);
|
|
932
|
+
case 3:
|
|
933
|
+
case "end":
|
|
934
|
+
return _context3.stop();
|
|
935
|
+
}
|
|
936
|
+
}, _callee3, this);
|
|
937
|
+
}));
|
|
938
|
+
function setAllowWaterMark(_x3, _x4) {
|
|
939
|
+
return _setAllowWaterMark.apply(this, arguments);
|
|
873
940
|
}
|
|
874
|
-
|
|
941
|
+
return setAllowWaterMark;
|
|
942
|
+
}()
|
|
875
943
|
}, {
|
|
876
|
-
key: "
|
|
877
|
-
value: function
|
|
944
|
+
key: "_getInterpreterInfo",
|
|
945
|
+
value: function
|
|
946
|
+
// 获取本地用户关联的翻译官信息
|
|
947
|
+
_getInterpreterInfo() {
|
|
878
948
|
var _this3 = this;
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
}, {
|
|
890
|
-
observable: function observable() {
|
|
891
|
-
return _this3.allowJoinWithMuteAudio();
|
|
892
|
-
},
|
|
893
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_JOIN_WITH_MUTE_AUDIO
|
|
894
|
-
}, {
|
|
895
|
-
observable: function observable() {
|
|
896
|
-
return _this3.allowScreenShareAndBoard();
|
|
897
|
-
},
|
|
898
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_SHARE_SCREEN
|
|
899
|
-
}, {
|
|
900
|
-
observable: function observable() {
|
|
901
|
-
return _this3.allowUnmuteSelfVideo();
|
|
902
|
-
},
|
|
903
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_VIDEO
|
|
904
|
-
}, {
|
|
905
|
-
observable: function observable() {
|
|
906
|
-
return _this3.allowUnmuteSelfAudio();
|
|
907
|
-
},
|
|
908
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_AUDIO
|
|
909
|
-
}, {
|
|
910
|
-
observable: function observable() {
|
|
911
|
-
return _this3.isLockRoomEnabled();
|
|
912
|
-
},
|
|
913
|
-
action: _constant.RendererEventAction.MAIN_SET_LOCK_ROOM
|
|
914
|
-
}, {
|
|
915
|
-
observable: function observable() {
|
|
916
|
-
return _this3.isWaitingRoomEnabled();
|
|
917
|
-
},
|
|
918
|
-
action: _constant.RendererEventAction.MAIN_SET_ENABLE_WAITING_ROOM
|
|
919
|
-
}, {
|
|
920
|
-
observable: function observable() {
|
|
921
|
-
return _this3.hasStartCloudRecordingPermission();
|
|
922
|
-
},
|
|
923
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_CLOUD_RECORDING_START
|
|
924
|
-
}, {
|
|
925
|
-
observable: function observable() {
|
|
926
|
-
return _this3.hasStartLiveStreamingPermission();
|
|
927
|
-
},
|
|
928
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_LIVE_STREAMING_START
|
|
929
|
-
}, {
|
|
930
|
-
observable: function observable() {
|
|
931
|
-
return _this3.hasStopLiveStreamingPermission();
|
|
932
|
-
},
|
|
933
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_LIVE_STREAMING_STOP
|
|
934
|
-
}, {
|
|
935
|
-
observable: function observable() {
|
|
936
|
-
return _this3.hasGetLiveStreamingLinkPermission();
|
|
937
|
-
},
|
|
938
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_GET_LIVE_STREAMING_LINK
|
|
939
|
-
}, {
|
|
940
|
-
observable: function observable() {
|
|
941
|
-
return _this3.hasAllowScreenShareAndBoardPermission();
|
|
942
|
-
},
|
|
943
|
-
action: _constant.RendererEventAction.SET_ALLOW_SHARE_SCREEN_AND_BOARD
|
|
944
|
-
}, {
|
|
945
|
-
observable: function observable() {
|
|
946
|
-
return _this3.hasAllowWriteBoardPermission();
|
|
947
|
-
},
|
|
948
|
-
action: _constant.RendererEventAction.SET_ALLOW_WRITE_BOARD
|
|
949
|
-
},
|
|
950
|
-
// security item permission
|
|
951
|
-
{
|
|
952
|
-
observable: function observable() {
|
|
953
|
-
return _this3.hasEnableStartScreenSharePermission();
|
|
954
|
-
},
|
|
955
|
-
action: _constant.RendererEventAction.START_SCREEN_SHARE_PERMISSION
|
|
956
|
-
}, {
|
|
957
|
-
observable: function observable() {
|
|
958
|
-
return _this3.hasPermissionToControlAllowSendAll();
|
|
959
|
-
},
|
|
960
|
-
action: _constant.RendererEventAction.ALLOW_SEND_ALL_PERMISSION
|
|
961
|
-
}, {
|
|
962
|
-
observable: function observable() {
|
|
963
|
-
return _this3.hasEnableStartAudioPermission();
|
|
964
|
-
},
|
|
965
|
-
action: _constant.RendererEventAction.START_AUDIO_PERMISSION
|
|
966
|
-
}, {
|
|
967
|
-
observable: function observable() {
|
|
968
|
-
return _this3.hasEnableChangeNamePermission();
|
|
969
|
-
},
|
|
970
|
-
action: _constant.RendererEventAction.CHANGE_NAME_PERMISSION
|
|
971
|
-
}, {
|
|
972
|
-
observable: function observable() {
|
|
973
|
-
return _this3.hasEnableStartVideoPermission();
|
|
974
|
-
},
|
|
975
|
-
action: _constant.RendererEventAction.START_VIDEO_PERMISSION
|
|
976
|
-
}, {
|
|
977
|
-
observable: function observable() {
|
|
978
|
-
return _this3.hasLockRoomPermission();
|
|
979
|
-
},
|
|
980
|
-
action: _constant.RendererEventAction.LOCK_ROOM_PERMISSION
|
|
981
|
-
}];
|
|
982
|
-
securityReactions.forEach(function (_ref19) {
|
|
983
|
-
var observable = _ref19.observable,
|
|
984
|
-
action = _ref19.action;
|
|
985
|
-
_this3._disposers.push((0, _mobx.reaction)(observable, function (allow) {
|
|
986
|
-
window.runtime.sendEvent({
|
|
987
|
-
action: action,
|
|
988
|
-
payload: {
|
|
989
|
-
allow: allow
|
|
990
|
-
}
|
|
991
|
-
});
|
|
992
|
-
}));
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
}, {
|
|
996
|
-
key: "_removeReactions",
|
|
997
|
-
value: function _removeReactions() {
|
|
998
|
-
this._disposers.forEach(function (d) {
|
|
999
|
-
return d();
|
|
1000
|
-
});
|
|
1001
|
-
this._disposers = [];
|
|
949
|
+
if (this._interpterControl) {
|
|
950
|
+
var interpreterUsers = this._interpterControl.getInterpreterUserList(); //翻译官列表
|
|
951
|
+
if (interpreterUsers) {
|
|
952
|
+
var interpreter = interpreterUsers.find(function (ele) {
|
|
953
|
+
return ele.userId === _this3.localUser.userId;
|
|
954
|
+
}); //本地用户关联的翻译官信息
|
|
955
|
+
return interpreter;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
return null;
|
|
1002
959
|
}
|
|
1003
960
|
}]);
|
|
1004
961
|
}();
|
|
1005
962
|
_FcrSecurityStore = FcrSecurityStore;
|
|
1006
|
-
var _applyDecs$e = _applyDecs(_FcrSecurityStore, [[_mobx.observable, 1, "securityInfos"], [_mobx.observable, 1, "permissionInfos"], [_mobx.observable, 1, "privilegeOperator"], [_mobx.observable, 1, "boardOwnerUser"], [_handlePermissionUpdatedDecs, 18, "_handlePermissionUpdated"], [_handleSecurityUpdatedDecs, 18, "_handleSecurityUpdated"], [_decorator.bound, 2, "
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
_applyDecs$e;
|
|
963
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrSecurityStore, [[_mobx.observable, 1, "securityInfos"], [_mobx.observable, 1, "permissionInfos"], [_mobx.observable, 1, "privilegeOperator"], [_mobx.observable, 1, "boardOwnerUser"], [_handlePermissionUpdatedDecs, 18, "_handlePermissionUpdated"], [_handleSecurityUpdatedDecs, 18, "_handleSecurityUpdated"], [_decorator.bound, 2, "setAllowWaterMark"], [_getInterpreterInfoDecs, 18, "_getInterpreterInfo"]], []).e, 5);
|
|
964
|
+
_init_securityInfos = _applyDecs$e[0];
|
|
965
|
+
_init_permissionInfos = _applyDecs$e[1];
|
|
966
|
+
_init_privilegeOperator = _applyDecs$e[2];
|
|
967
|
+
_init_boardOwnerUser = _applyDecs$e[3];
|
|
968
|
+
_initProto = _applyDecs$e[4];
|
|
969
|
+
var SecurityStoreContext = exports.SecurityStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|