fcr-ui-scene 3.1.1 → 3.2.0
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/dist/132.js +2 -0
- package/dist/132.js.LICENSE.txt +311 -0
- package/dist/651.js +2 -0
- package/dist/651.js.LICENSE.txt +1 -0
- package/dist/73.js +1 -0
- package/dist/index.html +13 -0
- package/dist/main.da7c203ab32d15742cfe.css +11760 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +254 -0
- package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
- package/lib/base.d.ts +0 -1
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +3 -4
- package/lib/common/device-store.js +167 -83
- package/lib/common/device-stream-store.d.ts +3 -2
- package/lib/common/device-stream-store.js +94 -72
- package/lib/common/event-store.d.ts +3 -2
- package/lib/common/event-store.js +5 -0
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +136 -101
- package/lib/electron/app.js +13 -5
- package/lib/electron/injections.d.ts +3 -4
- package/lib/electron/injections.js +46 -30
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.js +24 -8
- package/lib/electron/preload.js +2 -1
- package/lib/electron/tools.js +9 -0
- package/lib/electron/window.d.ts +1 -1
- package/lib/electron/window.js +14 -2
- package/lib/fragments/control-bar/context.d.ts +0 -1
- package/lib/fragments/control-bar/control-bar-store.js +23 -2
- package/lib/fragments/control-bar/device/index.js +7 -0
- package/lib/fragments/control-bar/index.js +1 -1
- package/lib/fragments/control-bar/more-actions/index.js +5 -0
- package/lib/fragments/control-bar/security-content/index.js +3 -0
- package/lib/fragments/live-streaming/context.d.ts +0 -1
- package/lib/fragments/live-streaming/store.js +27 -17
- package/lib/fragments/share-screen-selection/context.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.js +34 -33
- package/lib/fragments/share-screen-selection/view.js +7 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
- package/lib/fragments/toolbar/components/color-picker.js +3 -1
- package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +2 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
- package/lib/fragments/toolbar/components/shape-picker.js +2 -0
- package/lib/fragments/toolbar/hooks.d.ts +1 -1
- package/lib/fragments/toolbar/hooks.js +13 -8
- package/lib/fragments/toolbar/store.d.ts +4 -4
- package/lib/fragments/toolbar/store.js +20 -2
- package/lib/fragments/toolbar/view.js +2 -0
- package/lib/global.d.ts +1 -0
- package/lib/hooks/meeting-time.d.ts +2 -2
- package/lib/modules/action-bar/action-bar-collapes-items.js +9 -0
- package/lib/modules/action-bar/chat/index.js +1 -1
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +2 -0
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.d.ts +2 -2
- package/lib/modules/action-bar/index.dev.js +7 -6
- package/lib/modules/action-bar/item-placement.d.ts +1 -2
- package/lib/modules/action-bar/item.js +5 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +0 -1
- package/lib/modules/action-bar/leave/assign-host.js +5 -3
- package/lib/modules/action-bar/leave/index.js +6 -1
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.js +10 -0
- package/lib/modules/action-bar/screen-share/submenu.js +1 -0
- package/lib/modules/action-bar/security/drop-menu.js +34 -1
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/settings/index.js +1 -1
- package/lib/modules/action-bar/store.d.ts +9 -17
- package/lib/modules/action-bar/store.js +67 -49
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +7 -0
- package/lib/modules/chat/chat-select/index.css +5 -0
- package/lib/modules/chat/chat-select/index.d.ts +0 -1
- package/lib/modules/chat/chat-select/index.js +29 -3
- package/lib/modules/chat/chat.d.ts +1 -1
- package/lib/modules/chat/chat.js +28 -4
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/demo-wrapper.d.ts +0 -1
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +3 -3
- package/lib/modules/chat/index.js +19 -3
- package/lib/modules/chat/message-list.js +24 -3
- package/lib/modules/chat/store.d.ts +3 -3
- package/lib/modules/chat/store.js +45 -79
- package/lib/modules/chat/util.js +1 -1
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
- package/lib/modules/connection-gateway/components/phone/index.js +2 -0
- package/lib/modules/connection-gateway/index.d.ts +2 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +1 -2
- package/lib/modules/connection-gateway/store.js +41 -14
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
- package/lib/modules/device-pretest/audio-preview/speaker-control.d.ts +0 -1
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.d.ts +0 -1
- package/lib/modules/device-pretest/index.js +2 -1
- package/lib/modules/device-pretest/settings/beauty.js +2 -0
- package/lib/modules/device-pretest/settings/video-effect.d.ts +0 -1
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
- package/lib/modules/device-pretest/store.js +28 -9
- package/lib/modules/dialog/components/chat/electron.js +1 -1
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +2 -2
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +1 -1
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +72 -0
- package/lib/modules/dialog/components/device-setting/index.css +27 -0
- package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
- package/lib/modules/dialog/components/device-setting/index.js +60 -0
- package/lib/modules/dialog/components/participant/electron.js +6 -1
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/context.d.ts +0 -1
- package/lib/modules/dialog/dialogs.d.ts +0 -2
- package/lib/modules/dialog/dialogs.js +46 -91
- package/lib/modules/dialog/index.css +5 -6
- package/lib/modules/dialog/index.d.ts +1 -1
- package/lib/modules/dialog/index.js +17 -0
- package/lib/modules/dialog/store.d.ts +2 -2
- package/lib/modules/dialog/store.js +36 -7
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-toast/context.d.ts +0 -1
- package/lib/modules/event-toast/store.js +16 -0
- package/lib/modules/invite/context.d.ts +0 -1
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +3 -1
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +27 -7
- package/lib/modules/invite/voip-invite.d.ts +0 -1
- package/lib/modules/invite/voip-invite.js +1 -1
- package/lib/modules/layout/components/Aside.d.ts +0 -1
- package/lib/modules/layout/components/Aside.js +4 -1
- package/lib/modules/layout/components/Carousel.js +6 -5
- package/lib/modules/layout/components/Gallery.js +9 -8
- package/lib/modules/layout/components/index.css +11 -1
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +11 -11
- package/lib/modules/layout/index.js +0 -6
- package/lib/modules/layout/member-window/index.css +5 -5
- package/lib/modules/layout/member-window/index.d.ts +7 -7
- package/lib/modules/layout/member-window/index.js +50 -10
- package/lib/modules/layout/store.d.ts +44 -50
- package/lib/modules/layout/store.js +406 -338
- package/lib/modules/layout/type.d.ts +2 -1
- package/lib/modules/layout/video-window-datasource.d.ts +14 -8
- package/lib/modules/layout/video-window-datasource.js +129 -78
- package/lib/modules/live-streaming/context.d.ts +0 -1
- package/lib/modules/live-streaming/index.d.ts +2 -2
- package/lib/modules/live-streaming/index.dev.js +4 -3
- package/lib/modules/live-streaming/store.d.ts +2 -2
- package/lib/modules/live-streaming/store.js +32 -11
- package/lib/modules/participant/attendee/index.js +10 -0
- package/lib/modules/participant/attendee/participants-more-action.js +5 -2
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.d.ts +3 -3
- package/lib/modules/participant/index.dev.js +13 -11
- package/lib/modules/participant/member-list-data-source.d.ts +3 -3
- package/lib/modules/participant/member-list-data-source.js +29 -3
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +31 -31
- package/lib/modules/participant/store.js +203 -157
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +5 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
- package/lib/modules/setting/audio-settings/index.css +2 -2
- package/lib/modules/setting/context.d.ts +0 -1
- package/lib/modules/setting/general-settings/general-settings.js +2 -1
- package/lib/modules/setting/general-settings/index.css +2 -2
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +13 -11
- package/lib/modules/setting/index.js +16 -0
- package/lib/modules/setting/minutes-settings/index.css +65 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
- package/lib/modules/setting/state/index.css +0 -4
- package/lib/modules/setting/state/index.js +11 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.d.ts +6 -4
- package/lib/modules/setting/store.js +68 -40
- package/lib/modules/setting/translate-settings/index.css +45 -0
- package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
- package/lib/modules/setting/translate-settings/language-select.js +50 -0
- package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
- package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
- package/lib/modules/setting/video-settings/index.css +7 -1
- package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
- package/lib/modules/setting/video-settings/video-settings.js +5 -1
- package/lib/modules/setting/view.js +34 -2
- package/lib/modules/share-screen/index.d.ts +2 -2
- package/lib/modules/share-screen/index.dev.js +14 -12
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.js +44 -6
- package/lib/modules/share-screen/share-state-bar/index.css +49 -11
- package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
- package/lib/modules/share-screen/share-state-bar/index.js +51 -20
- package/lib/modules/share-screen/store.d.ts +18 -11
- package/lib/modules/share-screen/store.js +656 -570
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.d.ts +1 -1
- package/lib/modules/state-bar/index.dev.js +11 -9
- package/lib/modules/state-bar/layout-config.js +2 -0
- package/lib/modules/state-bar/live-streaming-state.js +3 -0
- package/lib/modules/state-bar/recording.js +6 -6
- package/lib/modules/state-bar/store.d.ts +4 -4
- package/lib/modules/state-bar/store.js +50 -5
- package/lib/modules/state-bar/view.js +3 -2
- package/lib/modules/video-window/context.d.ts +0 -1
- package/lib/modules/video-window/deviceState/index.d.ts +3 -3
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +3 -2
- package/lib/modules/video-window/store.js +35 -6
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/whiteboard/app.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
- package/lib/modules/whiteboard/components/loading/index.js +2 -2
- package/lib/modules/whiteboard/components/multi-window/index.js +2 -2
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +1 -1
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.js +9 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +22 -4
- package/lib/modules/whiteboard/context.d.ts +3 -3
- package/lib/modules/whiteboard/context.js +2 -2
- package/lib/modules/whiteboard/index.d.ts +6 -8
- package/lib/modules/whiteboard/index.js +292 -253
- package/lib/modules/whiteboard/type.d.ts +4 -12
- package/lib/modules/whiteboard/type.js +6 -16
- package/lib/modules/whiteboard/utils.d.ts +1 -0
- package/lib/modules/whiteboard/utils.js +12 -1
- package/lib/plugins/browser-runtime-plugin.js +2 -1
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/plugins/multi-lang-plugin.d.ts +1 -5
- package/lib/plugins/multi-lang-plugin.js +2 -0
- package/lib/runtime.d.ts +3 -5
- package/lib/translations/enUS.d.ts +148 -1
- package/lib/translations/enUS.js +156 -7
- package/lib/translations/zhCN.d.ts +148 -1
- package/lib/translations/zhCN.js +152 -3
- package/lib/ui-manager.d.ts +2 -2
- package/lib/ui-manager.js +37 -20
- package/lib/ui-scene.js +6 -1
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +4 -1
- package/lib/utilities/constant.js +3 -0
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.js +9 -4
- package/lib/utilities/tools.js +5 -2
- package/lib/utilities/ui-resources.d.ts +2 -2
- package/lib/utilities/ui-resources.js +20 -3
- package/lib/utilities/video-track-render-context.d.ts +0 -1
- package/package.json +8 -7
|
@@ -14,6 +14,24 @@ require("core-js/modules/es.number.constructor.js");
|
|
|
14
14
|
require("core-js/modules/es.object.create.js");
|
|
15
15
|
require("core-js/modules/es.object.define-property.js");
|
|
16
16
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17
|
+
require("core-js/modules/esnext.async-iterator.every.js");
|
|
18
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
19
|
+
require("core-js/modules/esnext.iterator.every.js");
|
|
20
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
21
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
22
|
+
require("core-js/modules/esnext.map.every.js");
|
|
23
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
24
|
+
require("core-js/modules/esnext.map.find.js");
|
|
25
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
26
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
27
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
28
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
29
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
30
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
31
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
32
|
+
require("core-js/modules/esnext.map.some.js");
|
|
33
|
+
require("core-js/modules/esnext.map.update.js");
|
|
34
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
17
35
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
36
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
19
37
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -36,6 +54,15 @@ require("core-js/modules/es.object.values.js");
|
|
|
36
54
|
require("core-js/modules/es.string.includes.js");
|
|
37
55
|
require("core-js/modules/es.string.iterator.js");
|
|
38
56
|
require("core-js/modules/es.weak-map.js");
|
|
57
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
58
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
59
|
+
require("core-js/modules/esnext.async-iterator.some.js");
|
|
60
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
61
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
62
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
63
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
64
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
65
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
39
66
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
40
67
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
41
68
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -43,6 +70,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
43
70
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
44
71
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
45
72
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
73
|
+
var _agoraEduCore = require("agora-edu-core");
|
|
46
74
|
var _type = require("agora-edu-core/lib/type");
|
|
47
75
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
48
76
|
var _mobx = require("mobx");
|
|
@@ -57,10 +85,11 @@ var _logger = require("agora-foundation/lib/logger");
|
|
|
57
85
|
var _type2 = require("agora-ui-foundation/lib/components/icon/type");
|
|
58
86
|
var _type3 = require("../modules/whiteboard/type");
|
|
59
87
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
88
|
+
var _type4 = require("agora-edu-core/lib/room-control/privilege-control/type");
|
|
60
89
|
var _FcrSecurityStore;
|
|
61
90
|
var _initProto, _init_securityInfos, _init_permissionInfos, _init_privilegeOperator, _init_boardOwnerUser, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _ref;
|
|
62
|
-
function _classPrivateFieldInitSpec(
|
|
63
|
-
function _checkPrivateRedeclaration(
|
|
91
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
92
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
64
93
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
65
94
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
66
95
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
@@ -87,14 +116,14 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
87
116
|
(0, _defineProperty2["default"])(this, "allowChangeSelfName", (0, _mobxUtils.computedFn)(function () {
|
|
88
117
|
var info = _this.securityInfos.find(function (_ref2) {
|
|
89
118
|
var info = _ref2.info;
|
|
90
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
119
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.ChangeName;
|
|
91
120
|
});
|
|
92
121
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
93
122
|
}));
|
|
94
123
|
(0, _defineProperty2["default"])(this, "allowChat", (0, _mobxUtils.computedFn)(function () {
|
|
95
124
|
var info = _this.securityInfos.find(function (_ref3) {
|
|
96
125
|
var info = _ref3.info;
|
|
97
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
126
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
98
127
|
});
|
|
99
128
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
100
129
|
}));
|
|
@@ -112,7 +141,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
112
141
|
(0, _defineProperty2["default"])(this, "allowedAllChat", (0, _mobxUtils.computedFn)(function () {
|
|
113
142
|
var info = _this.securityInfos.find(function (_ref4) {
|
|
114
143
|
var info = _ref4.info;
|
|
115
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
144
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
116
145
|
});
|
|
117
146
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
118
147
|
return !!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && payload["private"].cohost && payload["private"].participant;
|
|
@@ -121,7 +150,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
121
150
|
(0, _defineProperty2["default"])(this, "allowedPublicChatAndDisallowedPrivateChat", (0, _mobxUtils.computedFn)(function () {
|
|
122
151
|
var info = _this.securityInfos.find(function (_ref5) {
|
|
123
152
|
var info = _ref5.info;
|
|
124
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
153
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
125
154
|
});
|
|
126
155
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
127
156
|
return !!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && !payload["private"].cohost && !payload["private"].participant;
|
|
@@ -130,7 +159,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
130
159
|
(0, _defineProperty2["default"])(this, "disallowedPublicChatAndDisallowedPrivateChatToParticipant", (0, _mobxUtils.computedFn)(function () {
|
|
131
160
|
var info = _this.securityInfos.find(function (_ref6) {
|
|
132
161
|
var info = _ref6.info;
|
|
133
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
162
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
134
163
|
});
|
|
135
164
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
136
165
|
return !!(info !== null && info !== void 0 && info.enable) && payload && !payload["public"] && payload["private"].host && payload["private"].cohost && !payload["private"].participant;
|
|
@@ -139,7 +168,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
139
168
|
(0, _defineProperty2["default"])(this, "disallowedAllChat", (0, _mobxUtils.computedFn)(function () {
|
|
140
169
|
var info = _this.securityInfos.find(function (_ref7) {
|
|
141
170
|
var info = _ref7.info;
|
|
142
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
171
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
143
172
|
});
|
|
144
173
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
145
174
|
return !(info !== null && info !== void 0 && info.enable) || payload && !payload["public"] && !payload["private"].host && !payload["private"].cohost && !payload["private"].participant;
|
|
@@ -147,14 +176,14 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
147
176
|
(0, _defineProperty2["default"])(this, "allowJoinWithMuteAudio", (0, _mobxUtils.computedFn)(function () {
|
|
148
177
|
var info = _this.securityInfos.find(function (_ref8) {
|
|
149
178
|
var info = _ref8.info;
|
|
150
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
179
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio;
|
|
151
180
|
});
|
|
152
181
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
153
182
|
}));
|
|
154
183
|
(0, _defineProperty2["default"])(this, "allowShareScreen", (0, _mobxUtils.computedFn)(function () {
|
|
155
184
|
var info = _this.securityInfos.find(function (_ref9) {
|
|
156
185
|
var info = _ref9.info;
|
|
157
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
186
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.ShareScreen;
|
|
158
187
|
});
|
|
159
188
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
160
189
|
}));
|
|
@@ -162,7 +191,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
162
191
|
var _info$info;
|
|
163
192
|
var info = _this.securityInfos.find(function (_ref10) {
|
|
164
193
|
var info = _ref10.info;
|
|
165
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
194
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
166
195
|
});
|
|
167
196
|
var shareState = info === null || info === void 0 || (_info$info = info.info) === null || _info$info === void 0 ? void 0 : _info$info.payload;
|
|
168
197
|
var screenShareState = shareState.screen === _enums.FcrSharePermissionState.ON;
|
|
@@ -172,7 +201,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
172
201
|
var _info$info2, _shareState$board;
|
|
173
202
|
var info = _this.securityInfos.find(function (_ref11) {
|
|
174
203
|
var info = _ref11.info;
|
|
175
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
204
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
176
205
|
});
|
|
177
206
|
var shareState = info === null || info === void 0 || (_info$info2 = info.info) === null || _info$info2 === void 0 ? void 0 : _info$info2.payload;
|
|
178
207
|
var boardWriteState = ((_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.write) === _enums.FcrSharePermissionState.ON;
|
|
@@ -181,128 +210,128 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
181
210
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfVideo", (0, _mobxUtils.computedFn)(function () {
|
|
182
211
|
var info = _this.securityInfos.find(function (_ref12) {
|
|
183
212
|
var info = _ref12.info;
|
|
184
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
213
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.StartVideo;
|
|
185
214
|
});
|
|
186
215
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
187
216
|
}));
|
|
188
217
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfAudio", (0, _mobxUtils.computedFn)(function () {
|
|
189
218
|
var info = _this.securityInfos.find(function (_ref13) {
|
|
190
219
|
var info = _ref13.info;
|
|
191
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
220
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.StartAudio;
|
|
192
221
|
});
|
|
193
222
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
194
223
|
}));
|
|
195
224
|
(0, _defineProperty2["default"])(this, "isLockRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
196
225
|
var info = _this.securityInfos.find(function (_ref14) {
|
|
197
226
|
var info = _ref14.info;
|
|
198
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
227
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.LockedRoom;
|
|
199
228
|
});
|
|
200
229
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
201
230
|
}));
|
|
202
231
|
(0, _defineProperty2["default"])(this, "isWaitingRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
203
232
|
var info = _this.securityInfos.find(function (_ref15) {
|
|
204
233
|
var info = _ref15.info;
|
|
205
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
234
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaitingRoom;
|
|
206
235
|
});
|
|
207
236
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
208
237
|
}));
|
|
209
238
|
(0, _defineProperty2["default"])(this, "hasMutePermission", function (targetRole) {
|
|
210
|
-
return _this._hasPermission(
|
|
239
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, targetRole);
|
|
211
240
|
});
|
|
212
241
|
(0, _defineProperty2["default"])(this, "hasUnmutePermission", function (targetRole) {
|
|
213
|
-
return _this._hasPermission(
|
|
242
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, targetRole);
|
|
214
243
|
});
|
|
215
244
|
(0, _defineProperty2["default"])(this, "hasRequestStartAudioPermission", function (targetRole) {
|
|
216
|
-
return _this._hasPermission(
|
|
245
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamRequestStartAudio, targetRole);
|
|
217
246
|
});
|
|
218
247
|
(0, _defineProperty2["default"])(this, "hasRequestStartVideoPermission", function (targetRole) {
|
|
219
|
-
return _this._hasPermission(
|
|
248
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamRequestStartVideo, targetRole);
|
|
220
249
|
});
|
|
221
250
|
(0, _defineProperty2["default"])(this, "hasStartVideoPermission", function (targetRole) {
|
|
222
|
-
return _this._hasPermission(
|
|
251
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartVideo, targetRole);
|
|
223
252
|
});
|
|
224
253
|
(0, _defineProperty2["default"])(this, "hasStopVideoPermission", function (targetRole) {
|
|
225
|
-
return _this._hasPermission(
|
|
254
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStopVideo, targetRole);
|
|
226
255
|
});
|
|
227
256
|
(0, _defineProperty2["default"])(this, "hasSelfMutePermission", function () {
|
|
228
|
-
return _this._hasPermission(
|
|
257
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, _type4.FcrPrivilegeUserRole.SELF);
|
|
229
258
|
});
|
|
230
259
|
(0, _defineProperty2["default"])(this, "hasAllMutePermission", function () {
|
|
231
|
-
return _this._hasPermission(
|
|
260
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
232
261
|
});
|
|
233
262
|
(0, _defineProperty2["default"])(this, "hasSelfUnmutePermission", function () {
|
|
234
|
-
return _this._hasPermission(
|
|
263
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, _type4.FcrPrivilegeUserRole.SELF);
|
|
235
264
|
});
|
|
236
265
|
(0, _defineProperty2["default"])(this, "hasAllUnmutePermission", function () {
|
|
237
|
-
return _this._hasPermission(
|
|
266
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
238
267
|
});
|
|
239
268
|
(0, _defineProperty2["default"])(this, "hasRevokeHostPermission", function () {
|
|
240
|
-
return _this._hasPermission(
|
|
269
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserRevokeRole, _type4.FcrPrivilegeUserRole.HOST);
|
|
241
270
|
});
|
|
242
271
|
(0, _defineProperty2["default"])(this, "hasKickOutPermission", function (targetRole) {
|
|
243
|
-
return _this._hasPermission(
|
|
272
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserKickOut, targetRole);
|
|
244
273
|
});
|
|
245
274
|
(0, _defineProperty2["default"])(this, "hasStartScreenSharePermission", function () {
|
|
246
|
-
return _this._hasPermission(
|
|
275
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartScreenShare, _type4.FcrPrivilegeUserRole.SELF);
|
|
247
276
|
});
|
|
248
277
|
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermission", function () {
|
|
249
|
-
return _this._hasPermission(
|
|
278
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
250
279
|
});
|
|
251
280
|
// 是否有权限发送私信息
|
|
252
281
|
(0, _defineProperty2["default"])(this, "hasPermissionToSendPrivateMessage", function (targetRole) {
|
|
253
|
-
return _this._hasPermission(
|
|
282
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPrivate, targetRole);
|
|
254
283
|
});
|
|
255
284
|
// 是否有“控制发送所有人消息”的权限
|
|
256
285
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlAllowSendAll", function () {
|
|
257
|
-
return _this._hasPermission(
|
|
286
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatAllowSendPublic, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
258
287
|
});
|
|
259
288
|
// 是否有“控制禁止发送所有人消息”的权限
|
|
260
289
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendAll", function () {
|
|
261
|
-
return _this._hasPermission(
|
|
290
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
262
291
|
});
|
|
263
292
|
// 是否有“控制发送私信”的权限
|
|
264
293
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlAllowSendPrivate", function () {
|
|
265
|
-
return _this._hasPermission(
|
|
294
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatAllowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
266
295
|
});
|
|
267
296
|
// 是否有“控制禁止发送私信”的权限
|
|
268
297
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendPrivate", function () {
|
|
269
|
-
return _this._hasPermission(
|
|
298
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
270
299
|
});
|
|
271
300
|
(0, _defineProperty2["default"])(this, "hasStartCloudRecordingPermission", function () {
|
|
272
|
-
return _this._hasPermission(
|
|
301
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RecordStartCloudRecording, _type4.FcrPrivilegeUserRole.SELF);
|
|
273
302
|
});
|
|
274
303
|
(0, _defineProperty2["default"])(this, "hasStartLiveStreamingPermission", function () {
|
|
275
|
-
return _this._hasPermission(
|
|
304
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
276
305
|
});
|
|
277
306
|
(0, _defineProperty2["default"])(this, "hasStopLiveStreamingPermission", function () {
|
|
278
|
-
return _this._hasPermission(
|
|
307
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveStop, _type4.FcrPrivilegeUserRole.SELF);
|
|
279
308
|
});
|
|
280
309
|
(0, _defineProperty2["default"])(this, "hasGetLiveStreamingLinkPermission", function () {
|
|
281
|
-
return _this._hasPermission(
|
|
310
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveGetLink, _type4.FcrPrivilegeUserRole.SELF);
|
|
282
311
|
});
|
|
283
312
|
(0, _defineProperty2["default"])(this, "hasEnableStartAudioPermission", function () {
|
|
284
|
-
return _this._hasPermission(
|
|
313
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
285
314
|
});
|
|
286
315
|
(0, _defineProperty2["default"])(this, "hasEnableChangeNamePermission", function () {
|
|
287
|
-
return _this._hasPermission(
|
|
316
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserEnableChangeName, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
288
317
|
});
|
|
289
318
|
(0, _defineProperty2["default"])(this, "hasEnableStartVideoPermission", function () {
|
|
290
|
-
return _this._hasPermission(
|
|
319
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartVideo, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
291
320
|
});
|
|
292
321
|
(0, _defineProperty2["default"])(this, "hasEnableJoinWithAudioPermission", function () {
|
|
293
|
-
return _this._hasPermission(
|
|
322
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableJoinWithAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
294
323
|
});
|
|
295
324
|
(0, _defineProperty2["default"])(this, "hasEnableStartScreenSharePermission", function () {
|
|
296
|
-
return _this._hasPermission(
|
|
325
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartScreenShare, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
297
326
|
});
|
|
298
327
|
(0, _defineProperty2["default"])(this, "hasLockRoomPermission", function () {
|
|
299
|
-
return _this._hasPermission(
|
|
328
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomLock, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
300
329
|
});
|
|
301
330
|
//全体静音
|
|
302
331
|
(0, _defineProperty2["default"])(this, "muteAll", function () {
|
|
303
332
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
304
|
-
audioPrivilege:
|
|
305
|
-
videoPrivilege:
|
|
333
|
+
audioPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
334
|
+
videoPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
306
335
|
}, {
|
|
307
336
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
308
337
|
targetRoleTypeIsInclude: true
|
|
@@ -311,36 +340,36 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
311
340
|
//要求所有人解除静音
|
|
312
341
|
(0, _defineProperty2["default"])(this, "unmuteAll", function () {
|
|
313
342
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
314
|
-
audioPrivilege:
|
|
315
|
-
videoPrivilege:
|
|
343
|
+
audioPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
344
|
+
videoPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
316
345
|
}, {
|
|
317
346
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
318
347
|
targetRoleTypeIsInclude: true
|
|
319
348
|
});
|
|
320
349
|
});
|
|
321
350
|
(0, _defineProperty2["default"])(this, "setLockRoomEnabled", function (enable) {
|
|
322
|
-
_this._privilegeControl.enableLockedRoom(enable, [
|
|
351
|
+
_this._privilegeControl.enableLockedRoom(enable, [_type4.FcrPrivilegeUserRole.HOST, _type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
323
352
|
});
|
|
324
353
|
(0, _defineProperty2["default"])(this, "setWaitingRoomEnabled", function () {
|
|
325
|
-
|
|
354
|
+
// this._privilegeControl.enableWaitingRoom(true);
|
|
326
355
|
});
|
|
327
356
|
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function () {
|
|
328
|
-
|
|
357
|
+
// this._privilegeControl.allowChangeName(true, [FcrPrivilegeUserRole.PARTICIPANT]);
|
|
329
358
|
});
|
|
330
359
|
//设置是否允许聊天
|
|
331
360
|
(0, _defineProperty2["default"])(this, "setAllowChat", function (enable) {
|
|
332
|
-
var payload =
|
|
333
|
-
"public":
|
|
361
|
+
var payload = {
|
|
362
|
+
"public": enable,
|
|
334
363
|
"private": {
|
|
335
|
-
host:
|
|
336
|
-
cohost:
|
|
337
|
-
participant:
|
|
364
|
+
host: enable,
|
|
365
|
+
cohost: enable,
|
|
366
|
+
participant: enable
|
|
338
367
|
}
|
|
339
|
-
}
|
|
340
|
-
_this._privilegeControl.allowSendChat(enable, [
|
|
368
|
+
};
|
|
369
|
+
_this._privilegeControl.allowSendChat(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
341
370
|
});
|
|
342
371
|
(0, _defineProperty2["default"])(this, "setAllowChatWithPayload", function (enable, payload) {
|
|
343
|
-
_this._privilegeControl.allowSendChat(enable, [
|
|
372
|
+
_this._privilegeControl.allowSendChat(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
344
373
|
});
|
|
345
374
|
//设置成允许公聊但不允许私聊
|
|
346
375
|
(0, _defineProperty2["default"])(this, "setAllowedPublicChatAndDisallowedPrivateChat", function () {
|
|
@@ -366,7 +395,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
366
395
|
});
|
|
367
396
|
//所有人加入会议时静音
|
|
368
397
|
(0, _defineProperty2["default"])(this, "setAllowJoinWithMuteAudio", function (enable) {
|
|
369
|
-
_this._privilegeControl.
|
|
398
|
+
_this._privilegeControl.allowJoinWithMutedAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT, _type4.FcrPrivilegeUserRole.COHOST]);
|
|
370
399
|
});
|
|
371
400
|
//允许屏幕共享
|
|
372
401
|
(0, _defineProperty2["default"])(this, "setAllowShareScreen", function (state) {
|
|
@@ -377,19 +406,20 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
377
406
|
start: enable
|
|
378
407
|
}
|
|
379
408
|
};
|
|
380
|
-
_this._privilegeControl.allowShare(
|
|
409
|
+
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
381
410
|
});
|
|
382
411
|
//允许开启视频
|
|
383
412
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfVideo", function (enable) {
|
|
384
|
-
_this._privilegeControl.allowStartVideo(enable, [
|
|
413
|
+
_this._privilegeControl.allowStartVideo(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
385
414
|
});
|
|
386
415
|
//允许自我解除静音
|
|
387
416
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfAudio", function (enable) {
|
|
388
|
-
_this._privilegeControl.allowStartAudio(enable, [
|
|
417
|
+
_this._privilegeControl.allowStartAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
389
418
|
});
|
|
390
419
|
(0, _defineProperty2["default"])(this, "_hasPermission", (0, _mobxUtils.computedFn)(function (action, targetRole) {
|
|
391
|
-
var
|
|
392
|
-
var
|
|
420
|
+
var _this$permissionInfos;
|
|
421
|
+
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 (_ref16) {
|
|
393
423
|
var _info$targetRoles;
|
|
394
424
|
var info = _ref16.info;
|
|
395
425
|
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) {
|
|
@@ -400,13 +430,14 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
400
430
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
401
431
|
}));
|
|
402
432
|
(0, _defineProperty2["default"])(this, "_hasPermissionWithParams", (0, _mobxUtils.computedFn)(function (action, targetRole, params) {
|
|
403
|
-
var
|
|
433
|
+
var _this$permissionInfos2;
|
|
434
|
+
var convertedRole = targetRole === _type4.FcrPrivilegeUserRole.SELF ? [_this.localUser.userRole, _type4.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
404
435
|
var matchParams = function matchParams(_params) {
|
|
405
436
|
return (0, _lodash.every)(Object.keys(params), function (key) {
|
|
406
437
|
return _params && _params[key].includes(params[key]);
|
|
407
438
|
});
|
|
408
439
|
};
|
|
409
|
-
var info = _this.permissionInfos.find(function (_ref17) {
|
|
440
|
+
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (_ref17) {
|
|
410
441
|
var _info$targetRoles3, _info$params;
|
|
411
442
|
var info = _ref17.info;
|
|
412
443
|
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) {
|
|
@@ -493,74 +524,74 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
493
524
|
}, {
|
|
494
525
|
key: "hasCallMergePermission",
|
|
495
526
|
value: function hasCallMergePermission() {
|
|
496
|
-
return this._hasPermission(
|
|
527
|
+
return this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
497
528
|
}
|
|
498
529
|
}, {
|
|
499
530
|
key: "hasCallSplitPermission",
|
|
500
531
|
value: function hasCallSplitPermission() {
|
|
501
|
-
return this._hasPermission(
|
|
532
|
+
return this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
502
533
|
}
|
|
503
534
|
}, {
|
|
504
535
|
key: "hasSetRolePermission",
|
|
505
536
|
value:
|
|
506
537
|
// 是否有设置角色的权限
|
|
507
538
|
function hasSetRolePermission(targetRole, setToRole) {
|
|
508
|
-
return this._hasPermissionWithParams(
|
|
539
|
+
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
509
540
|
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
510
541
|
});
|
|
511
542
|
}
|
|
512
543
|
}, {
|
|
513
544
|
key: "hasEndRoomPermission",
|
|
514
545
|
value: function hasEndRoomPermission() {
|
|
515
|
-
return this._hasPermission(
|
|
546
|
+
return this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
516
547
|
}
|
|
517
548
|
}, {
|
|
518
549
|
key: "hasAssignHostBeforeLeavingPermission",
|
|
519
550
|
value: function hasAssignHostBeforeLeavingPermission(role) {
|
|
520
|
-
return this._hasPermissionWithParams(
|
|
551
|
+
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
521
552
|
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
522
553
|
});
|
|
523
554
|
}
|
|
524
555
|
}, {
|
|
525
556
|
key: "hasStartBoardPermission",
|
|
526
557
|
value: function hasStartBoardPermission() {
|
|
527
|
-
return this._hasPermission(
|
|
558
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
528
559
|
}
|
|
529
560
|
}, {
|
|
530
561
|
key: "hasCloseBoardPermission",
|
|
531
562
|
value: function hasCloseBoardPermission() {
|
|
532
|
-
return this._hasPermission(
|
|
563
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
533
564
|
}
|
|
534
565
|
}, {
|
|
535
566
|
key: "hasWriteBoardPermission",
|
|
536
567
|
value: function hasWriteBoardPermission() {
|
|
537
|
-
return this._hasPermission(
|
|
568
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
538
569
|
}
|
|
539
570
|
}, {
|
|
540
571
|
key: "hasAllowStartBoardPermission",
|
|
541
572
|
value: function hasAllowStartBoardPermission() {
|
|
542
|
-
return this._hasPermission(
|
|
573
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
543
574
|
}
|
|
544
575
|
}, {
|
|
545
576
|
key: "hasDisallowStartBoardPermission",
|
|
546
577
|
value: function hasDisallowStartBoardPermission() {
|
|
547
|
-
return this._hasPermission(
|
|
578
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
548
579
|
}
|
|
549
580
|
}, {
|
|
550
581
|
key: "hasAllowWriteBoardPermission",
|
|
551
582
|
value: function hasAllowWriteBoardPermission() {
|
|
552
|
-
return this._hasPermission(
|
|
583
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
553
584
|
}
|
|
554
585
|
}, {
|
|
555
586
|
key: "hasDisallowWriteBoardPermission",
|
|
556
587
|
value: function hasDisallowWriteBoardPermission() {
|
|
557
|
-
return this._hasPermission(
|
|
588
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
558
589
|
}
|
|
559
590
|
}, {
|
|
560
591
|
key: "hasAllowScreenShareAndBoardPermission",
|
|
561
592
|
value: function hasAllowScreenShareAndBoardPermission() {
|
|
562
593
|
var _this$_privilegeContr;
|
|
563
|
-
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(
|
|
594
|
+
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
564
595
|
}
|
|
565
596
|
}, {
|
|
566
597
|
key: "getAllowedOperations",
|
|
@@ -570,11 +601,11 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
570
601
|
//请求开启摄像头权限
|
|
571
602
|
operations.push('request_start_video');
|
|
572
603
|
}
|
|
573
|
-
if (this.hasStartVideoPermission(isSelf ?
|
|
604
|
+
if (this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
574
605
|
//开启摄像头权限
|
|
575
606
|
operations.push('start_video');
|
|
576
607
|
}
|
|
577
|
-
if (this.hasStopVideoPermission(isSelf ?
|
|
608
|
+
if (this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
578
609
|
//关闭摄像头权限
|
|
579
610
|
operations.push('stop_video');
|
|
580
611
|
}
|
|
@@ -583,15 +614,15 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
583
614
|
operations.push('private_chat');
|
|
584
615
|
}
|
|
585
616
|
operations.push('pin');
|
|
586
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
617
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
587
618
|
//设为主持人权限
|
|
588
619
|
operations.push('set_as_host');
|
|
589
620
|
}
|
|
590
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
621
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
591
622
|
//设为联席主持人权限
|
|
592
623
|
operations.push('set_as_co_host');
|
|
593
624
|
}
|
|
594
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
625
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
595
626
|
//撤销联席主持人权限
|
|
596
627
|
operations.push('revoke_co_host');
|
|
597
628
|
}
|
|
@@ -608,13 +639,14 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
608
639
|
}, {
|
|
609
640
|
key: "allowShare",
|
|
610
641
|
value: function () {
|
|
611
|
-
var _allowShare = (0, _asyncToGenerator2["default"])(
|
|
642
|
+
var _allowShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state, payload) {
|
|
643
|
+
var enable;
|
|
612
644
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
613
645
|
while (1) switch (_context.prev = _context.next) {
|
|
614
646
|
case 0:
|
|
615
|
-
|
|
647
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
616
648
|
_context.next = 3;
|
|
617
|
-
return this._privilegeControl.allowShare(enable, payload);
|
|
649
|
+
return this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
618
650
|
case 3:
|
|
619
651
|
return _context.abrupt("return", _context.sent);
|
|
620
652
|
case 4:
|
|
@@ -631,16 +663,18 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
631
663
|
}, {
|
|
632
664
|
key: "setAllowWriteBoard",
|
|
633
665
|
value: function () {
|
|
634
|
-
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(
|
|
666
|
+
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state, payload) {
|
|
667
|
+
var enable;
|
|
635
668
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
636
669
|
while (1) switch (_context2.prev = _context2.next) {
|
|
637
670
|
case 0:
|
|
638
671
|
this.logger.info('setAllowWriteBoard', state);
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
return _context2.abrupt("return", _context2.sent);
|
|
672
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
673
|
+
_context2.next = 4;
|
|
674
|
+
return this._privilegeControl.allowWriteBoard(enable, [], payload);
|
|
643
675
|
case 4:
|
|
676
|
+
return _context2.abrupt("return", _context2.sent);
|
|
677
|
+
case 5:
|
|
644
678
|
case "end":
|
|
645
679
|
return _context2.stop();
|
|
646
680
|
}
|
|
@@ -671,7 +705,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
671
705
|
var securityInfo = event.securityInfo;
|
|
672
706
|
var enable = securityInfo.enable;
|
|
673
707
|
var operator = this.localUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_settings_labels_you') : (0, _i18n.transI18n)('fmt_role_host');
|
|
674
|
-
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) ===
|
|
708
|
+
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio) {
|
|
675
709
|
if (enable) {
|
|
676
710
|
this._uiEventStore.showToast({
|
|
677
711
|
type: 'info',
|
|
@@ -680,7 +714,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
680
714
|
})
|
|
681
715
|
});
|
|
682
716
|
}
|
|
683
|
-
} else if (((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) ===
|
|
717
|
+
} else if (((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) === _type4.FcrSecurityAction.StartAudio) {
|
|
684
718
|
var toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedselfunmuting', {
|
|
685
719
|
reason1: operator
|
|
686
720
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledselfunmuting', {
|
|
@@ -690,7 +724,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
690
724
|
type: 'info',
|
|
691
725
|
message: toastMessage
|
|
692
726
|
});
|
|
693
|
-
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) ===
|
|
727
|
+
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) === _type4.FcrSecurityAction.StartVideo) {
|
|
694
728
|
var _toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_videoenabled', {
|
|
695
729
|
reason1: operator
|
|
696
730
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledvideo', {
|
|
@@ -700,7 +734,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
700
734
|
type: 'info',
|
|
701
735
|
message: _toastMessage
|
|
702
736
|
});
|
|
703
|
-
} else if (((_securityInfo$info4 = securityInfo.info) === null || _securityInfo$info4 === void 0 ? void 0 : _securityInfo$info4.action) ===
|
|
737
|
+
} else if (((_securityInfo$info4 = securityInfo.info) === null || _securityInfo$info4 === void 0 ? void 0 : _securityInfo$info4.action) === _type4.FcrSecurityAction.ShareScreen) {
|
|
704
738
|
var _toastMessage2 = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedScreensharing', {
|
|
705
739
|
reason1: operator
|
|
706
740
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledScreensharing', {
|
|
@@ -710,7 +744,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
710
744
|
type: 'info',
|
|
711
745
|
message: _toastMessage2
|
|
712
746
|
});
|
|
713
|
-
} else if (((_securityInfo$info5 = securityInfo.info) === null || _securityInfo$info5 === void 0 ? void 0 : _securityInfo$info5.action) ===
|
|
747
|
+
} else if (((_securityInfo$info5 = securityInfo.info) === null || _securityInfo$info5 === void 0 ? void 0 : _securityInfo$info5.action) === _type4.FcrSecurityAction.SendChat) {
|
|
714
748
|
var _toastMessage3 = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedchat', {
|
|
715
749
|
reason1: operator
|
|
716
750
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_banedchat', {
|
|
@@ -720,7 +754,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
720
754
|
type: 'info',
|
|
721
755
|
message: _toastMessage3
|
|
722
756
|
});
|
|
723
|
-
} else if (((_securityInfo$info6 = securityInfo.info) === null || _securityInfo$info6 === void 0 ? void 0 : _securityInfo$info6.action) ===
|
|
757
|
+
} else if (((_securityInfo$info6 = securityInfo.info) === null || _securityInfo$info6 === void 0 ? void 0 : _securityInfo$info6.action) === _type4.FcrSecurityAction.Sharing && !enable) {
|
|
724
758
|
var _this$boardOwnerUser, _this$boardOwnerUser2;
|
|
725
759
|
if (!this.boardOwnerUser) return;
|
|
726
760
|
var isHost = [_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST].includes((_this$boardOwnerUser = this.boardOwnerUser) === null || _this$boardOwnerUser === void 0 ? void 0 : _this$boardOwnerUser.userRole);
|
|
@@ -760,6 +794,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
760
794
|
var localUserRole = (_this$_userControl$ge = this._userControl.getLocalUser()) === null || _this$_userControl$ge === void 0 ? void 0 : _this$_userControl$ge.userRole;
|
|
761
795
|
// 参会者才需要权限控制
|
|
762
796
|
if (localUserRole === _type.FcrUserRole.PARTICIPANT) {
|
|
797
|
+
var _this$_userControl$ge2;
|
|
763
798
|
var toastObj = {
|
|
764
799
|
id: 'private-toast',
|
|
765
800
|
toastProps: {
|
|
@@ -774,7 +809,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
774
809
|
if (!this.allowChat() || this.disallowedAllChat()) {
|
|
775
810
|
needToast = true;
|
|
776
811
|
}
|
|
777
|
-
var targetUserRole = this._userControl.getUser(userId).userRole;
|
|
812
|
+
var targetUserRole = (_this$_userControl$ge2 = this._userControl.getUser(userId)) === null || _this$_userControl$ge2 === void 0 ? void 0 : _this$_userControl$ge2.userRole;
|
|
778
813
|
|
|
779
814
|
// 公聊但允许私聊主持人和联席主持人
|
|
780
815
|
if (this.allowedPublicChatAndDisallowedPrivateChat() && targetUserRole === _type.FcrUserRole.PARTICIPANT) {
|