fcr-ui-scene 3.1.1 → 3.3.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/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +16 -0
- package/lib/base.d.ts +0 -1
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +4 -5
- package/lib/common/device-store.js +178 -86
- 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 +20 -3
- package/lib/common/event-store.js +43 -5
- package/lib/common/security-store.d.ts +16 -16
- package/lib/common/security-store.js +278 -124
- package/lib/electron/app.js +13 -5
- package/lib/electron/bootstrap-dev.d.ts +1 -0
- package/lib/electron/bootstrap-dev.js +51 -0
- package/lib/electron/bootstrap-sdk.d.ts +1 -0
- package/lib/electron/bootstrap-sdk.js +56 -0
- package/lib/electron/bootstrap.d.ts +1 -0
- package/lib/electron/bootstrap.js +56 -0
- package/lib/electron/default-options.js +1 -1
- package/lib/electron/dev.d.ts +1 -0
- package/lib/electron/dev.js +51 -0
- package/lib/electron/injections.d.ts +3 -4
- package/lib/electron/injections.js +46 -33
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.js +15 -11
- package/lib/electron/plugins/meeting-state.d.ts +2 -0
- package/lib/electron/plugins/meeting-state.js +39 -0
- 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.d.ts +34 -1
- package/lib/fragments/control-bar/control-bar-store.js +394 -81
- package/lib/fragments/control-bar/device/index.js +12 -3
- package/lib/fragments/control-bar/index.css +15 -10
- package/lib/fragments/control-bar/index.js +19 -1
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +77 -37
- package/lib/fragments/control-bar/security-content/index.css +10 -0
- package/lib/fragments/control-bar/security-content/index.js +43 -18
- package/lib/fragments/control-bar/view.js +8 -2
- 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/login-confirm-dialog.d.ts +12 -0
- package/lib/login-confirm-dialog.js +80 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +14 -5
- package/lib/modules/action-bar/chat/index.js +6 -6
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +6 -4
- package/lib/modules/action-bar/index.css +63 -12
- package/lib/modules/action-bar/index.d.ts +3 -2
- package/lib/modules/action-bar/index.dev.js +8 -7
- package/lib/modules/action-bar/index.js +21 -0
- 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 +3 -1
- package/lib/modules/action-bar/leave/assign-host.js +7 -7
- package/lib/modules/action-bar/leave/index.js +35 -7
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -1
- package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
- package/lib/modules/action-bar/more/poppover-content.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.js +14 -4
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +21 -14
- package/lib/modules/action-bar/screen-share/index.js +5 -1
- package/lib/modules/action-bar/screen-share/submenu.js +17 -22
- package/lib/modules/action-bar/security/drop-menu.js +124 -14
- 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 +45 -21
- package/lib/modules/action-bar/store.js +544 -134
- package/lib/modules/action-bar/view.js +65 -42
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +46 -27
- package/lib/modules/chat/chat-select/index.css +19 -4
- 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 +2 -3
- package/lib/modules/chat/chat.js +210 -107
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/demo-wrapper.d.ts +0 -1
- package/lib/modules/chat/index.css +49 -0
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +4 -4
- package/lib/modules/chat/index.js +32 -11
- package/lib/modules/chat/message-list.js +81 -49
- package/lib/modules/chat/store.d.ts +50 -4
- package/lib/modules/chat/store.js +303 -124
- 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 +3 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +6 -4
- package/lib/modules/connection-gateway/store.js +46 -15
- 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/audio-preview/speaker-control.js +1 -1
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.css +0 -4
- 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 +19 -6
- 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 +34 -19
- package/lib/modules/dialog/components/chat/electron.js +3 -2
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +7 -5
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +4 -2
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +74 -0
- package/lib/modules/dialog/components/device-setting/index.css +26 -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/operation-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
- package/lib/modules/dialog/components/participant/electron.js +8 -2
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/components/whiteboard/index.js +2 -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 +62 -103
- package/lib/modules/dialog/index.css +7 -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 +6 -2
- package/lib/modules/dialog/store.js +52 -9
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-notification/context.d.ts +2 -0
- package/lib/modules/event-notification/context.js +9 -0
- package/lib/modules/event-notification/index.css +58 -0
- package/lib/modules/event-notification/index.d.ts +13 -0
- package/lib/modules/event-notification/index.js +48 -0
- package/lib/modules/event-notification/store.d.ts +17 -0
- package/lib/modules/event-notification/store.js +133 -0
- package/lib/modules/event-notification/view.d.ts +5 -0
- package/lib/modules/event-notification/view.js +114 -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.css +4 -4
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +4 -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 +16 -9
- package/lib/modules/layout/components/Layout.js +82 -57
- package/lib/modules/layout/components/index.css +42 -5
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.css +30 -0
- 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 +59 -13
- package/lib/modules/layout/store.d.ts +61 -50
- package/lib/modules/layout/store.js +517 -342
- 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 +5 -4
- 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.d.ts +12 -3
- package/lib/modules/participant/attendee/index.js +142 -30
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.css +20 -0
- package/lib/modules/participant/index.d.ts +5 -2
- package/lib/modules/participant/index.dev.js +14 -12
- package/lib/modules/participant/index.js +27 -0
- 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.css +37 -0
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +59 -34
- package/lib/modules/participant/store.js +541 -222
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +138 -34
- 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.css +1 -5
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +14 -12
- 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 +7 -5
- package/lib/modules/setting/store.js +69 -46
- 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 +15 -6
- 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 +4 -2
- package/lib/modules/share-screen/index.dev.js +17 -14
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.css +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 +23 -13
- package/lib/modules/share-screen/store.js +733 -606
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.css +2 -2
- package/lib/modules/state-bar/index.d.ts +2 -2
- package/lib/modules/state-bar/index.dev.js +12 -10
- 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/meeting-detail.css +6 -4
- package/lib/modules/state-bar/meeting-details.js +29 -3
- package/lib/modules/state-bar/meeting-network-state.css +14 -3
- package/lib/modules/state-bar/meeting-network-state.js +10 -4
- package/lib/modules/state-bar/recording.js +9 -11
- package/lib/modules/state-bar/store.d.ts +7 -5
- package/lib/modules/state-bar/store.js +68 -8
- package/lib/modules/state-bar/view.js +4 -8
- 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/index.css +1 -0
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +5 -4
- package/lib/modules/video-window/store.js +49 -17
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/waiting-room-layout/context.d.ts +2 -0
- package/lib/modules/waiting-room-layout/context.js +9 -0
- package/lib/modules/waiting-room-layout/index.css +71 -0
- package/lib/modules/waiting-room-layout/index.d.ts +8 -0
- package/lib/modules/waiting-room-layout/index.js +47 -0
- package/lib/modules/waiting-room-layout/store.d.ts +30 -0
- package/lib/modules/waiting-room-layout/store.js +189 -0
- package/lib/modules/waiting-room-layout/type.d.ts +0 -0
- package/lib/modules/waiting-room-layout/type.js +1 -0
- package/lib/modules/waiting-room-layout/view.d.ts +3 -0
- package/lib/modules/waiting-room-layout/view.js +67 -0
- package/lib/modules/whiteboard/app.js +2 -8
- package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
- 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 +8 -3
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +3 -2
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +29 -17
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +11 -2
- 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 +18 -12
- 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 +8 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +25 -4
- package/lib/modules/whiteboard/context.d.ts +7 -3
- package/lib/modules/whiteboard/context.js +6 -4
- package/lib/modules/whiteboard/index.d.ts +6 -8
- package/lib/modules/whiteboard/index.js +310 -255
- 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 +12 -10
- 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 +590 -0
- package/lib/translations/enUS.js +608 -6
- package/lib/translations/zhCN.d.ts +588 -0
- package/lib/translations/zhCN.js +604 -4
- package/lib/type.d.ts +6 -2
- package/lib/ui-manager.d.ts +7 -3
- package/lib/ui-manager.js +597 -143
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +32 -22
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +47 -5
- package/lib/utilities/constant.js +44 -1
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +15 -6
- 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 +17 -16
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/login_confirm.png +0 -0
- package/public/index.html +29 -11
- package/lib/modules/device-pretest/settings/index.css +0 -15
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -275
|
@@ -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", {
|
|
@@ -21,6 +39,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
39
|
});
|
|
22
40
|
exports.FcrSecurityStore = void 0;
|
|
23
41
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
42
|
+
require("core-js/modules/es.array.concat.js");
|
|
24
43
|
require("core-js/modules/es.array.find.js");
|
|
25
44
|
require("core-js/modules/es.array.for-each.js");
|
|
26
45
|
require("core-js/modules/es.array.includes.js");
|
|
@@ -36,6 +55,15 @@ require("core-js/modules/es.object.values.js");
|
|
|
36
55
|
require("core-js/modules/es.string.includes.js");
|
|
37
56
|
require("core-js/modules/es.string.iterator.js");
|
|
38
57
|
require("core-js/modules/es.weak-map.js");
|
|
58
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
59
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
60
|
+
require("core-js/modules/esnext.async-iterator.some.js");
|
|
61
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
62
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
63
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
64
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
65
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
66
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
39
67
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
40
68
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
41
69
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -43,6 +71,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
43
71
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
44
72
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
45
73
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
74
|
+
var _agoraEduCore = require("agora-edu-core");
|
|
46
75
|
var _type = require("agora-edu-core/lib/type");
|
|
47
76
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
48
77
|
var _mobx = require("mobx");
|
|
@@ -57,10 +86,11 @@ var _logger = require("agora-foundation/lib/logger");
|
|
|
57
86
|
var _type2 = require("agora-ui-foundation/lib/components/icon/type");
|
|
58
87
|
var _type3 = require("../modules/whiteboard/type");
|
|
59
88
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
89
|
+
var _type4 = require("agora-edu-core/lib/room-control/privilege-control/type");
|
|
60
90
|
var _FcrSecurityStore;
|
|
61
91
|
var _initProto, _init_securityInfos, _init_permissionInfos, _init_privilegeOperator, _init_boardOwnerUser, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _ref;
|
|
62
|
-
function _classPrivateFieldInitSpec(
|
|
63
|
-
function _checkPrivateRedeclaration(
|
|
92
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
93
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
64
94
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
65
95
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
66
96
|
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,17 +117,20 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
87
117
|
(0, _defineProperty2["default"])(this, "allowChangeSelfName", (0, _mobxUtils.computedFn)(function () {
|
|
88
118
|
var info = _this.securityInfos.find(function (_ref2) {
|
|
89
119
|
var info = _ref2.info;
|
|
90
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
120
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.ChangeName;
|
|
91
121
|
});
|
|
92
122
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
93
123
|
}));
|
|
94
124
|
(0, _defineProperty2["default"])(this, "allowChat", (0, _mobxUtils.computedFn)(function () {
|
|
95
125
|
var info = _this.securityInfos.find(function (_ref3) {
|
|
96
126
|
var info = _ref3.info;
|
|
97
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
127
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
98
128
|
});
|
|
99
129
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
100
130
|
}));
|
|
131
|
+
(0, _defineProperty2["default"])(this, "getWaterMarkContent", function () {
|
|
132
|
+
return _this._userControl.getWaterMarkContent() || 'Watermark';
|
|
133
|
+
});
|
|
101
134
|
(0, _defineProperty2["default"])(this, "convertSendChatPayload", function (payload) {
|
|
102
135
|
return {
|
|
103
136
|
"public": !!payload["public"],
|
|
@@ -112,7 +145,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
112
145
|
(0, _defineProperty2["default"])(this, "allowedAllChat", (0, _mobxUtils.computedFn)(function () {
|
|
113
146
|
var info = _this.securityInfos.find(function (_ref4) {
|
|
114
147
|
var info = _ref4.info;
|
|
115
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
148
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
116
149
|
});
|
|
117
150
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
118
151
|
return !!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && payload["private"].cohost && payload["private"].participant;
|
|
@@ -121,7 +154,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
121
154
|
(0, _defineProperty2["default"])(this, "allowedPublicChatAndDisallowedPrivateChat", (0, _mobxUtils.computedFn)(function () {
|
|
122
155
|
var info = _this.securityInfos.find(function (_ref5) {
|
|
123
156
|
var info = _ref5.info;
|
|
124
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
157
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
125
158
|
});
|
|
126
159
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
127
160
|
return !!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && !payload["private"].cohost && !payload["private"].participant;
|
|
@@ -130,7 +163,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
130
163
|
(0, _defineProperty2["default"])(this, "disallowedPublicChatAndDisallowedPrivateChatToParticipant", (0, _mobxUtils.computedFn)(function () {
|
|
131
164
|
var info = _this.securityInfos.find(function (_ref6) {
|
|
132
165
|
var info = _ref6.info;
|
|
133
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
166
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
134
167
|
});
|
|
135
168
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
136
169
|
return !!(info !== null && info !== void 0 && info.enable) && payload && !payload["public"] && payload["private"].host && payload["private"].cohost && !payload["private"].participant;
|
|
@@ -139,7 +172,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
139
172
|
(0, _defineProperty2["default"])(this, "disallowedAllChat", (0, _mobxUtils.computedFn)(function () {
|
|
140
173
|
var info = _this.securityInfos.find(function (_ref7) {
|
|
141
174
|
var info = _ref7.info;
|
|
142
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
175
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.SendChat;
|
|
143
176
|
});
|
|
144
177
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
145
178
|
return !(info !== null && info !== void 0 && info.enable) || payload && !payload["public"] && !payload["private"].host && !payload["private"].cohost && !payload["private"].participant;
|
|
@@ -147,14 +180,14 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
147
180
|
(0, _defineProperty2["default"])(this, "allowJoinWithMuteAudio", (0, _mobxUtils.computedFn)(function () {
|
|
148
181
|
var info = _this.securityInfos.find(function (_ref8) {
|
|
149
182
|
var info = _ref8.info;
|
|
150
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
183
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio;
|
|
151
184
|
});
|
|
152
185
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
153
186
|
}));
|
|
154
187
|
(0, _defineProperty2["default"])(this, "allowShareScreen", (0, _mobxUtils.computedFn)(function () {
|
|
155
188
|
var info = _this.securityInfos.find(function (_ref9) {
|
|
156
189
|
var info = _ref9.info;
|
|
157
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
190
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.ShareScreen;
|
|
158
191
|
});
|
|
159
192
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
160
193
|
}));
|
|
@@ -162,147 +195,175 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
162
195
|
var _info$info;
|
|
163
196
|
var info = _this.securityInfos.find(function (_ref10) {
|
|
164
197
|
var info = _ref10.info;
|
|
165
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
198
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
166
199
|
});
|
|
167
200
|
var shareState = info === null || info === void 0 || (_info$info = info.info) === null || _info$info === void 0 ? void 0 : _info$info.payload;
|
|
168
|
-
var screenShareState = shareState.screen === _enums.FcrSharePermissionState.ON;
|
|
201
|
+
var screenShareState = (shareState === null || shareState === void 0 ? void 0 : shareState.screen) === _enums.FcrSharePermissionState.ON;
|
|
169
202
|
return screenShareState;
|
|
170
203
|
}));
|
|
171
204
|
(0, _defineProperty2["default"])(this, "allowBoardWrite", (0, _mobxUtils.computedFn)(function () {
|
|
172
205
|
var _info$info2, _shareState$board;
|
|
173
206
|
var info = _this.securityInfos.find(function (_ref11) {
|
|
174
207
|
var info = _ref11.info;
|
|
175
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
208
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
176
209
|
});
|
|
177
210
|
var shareState = info === null || info === void 0 || (_info$info2 = info.info) === null || _info$info2 === void 0 ? void 0 : _info$info2.payload;
|
|
178
|
-
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;
|
|
179
212
|
return boardWriteState;
|
|
180
213
|
}));
|
|
181
214
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfVideo", (0, _mobxUtils.computedFn)(function () {
|
|
182
215
|
var info = _this.securityInfos.find(function (_ref12) {
|
|
183
216
|
var info = _ref12.info;
|
|
184
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
217
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.StartVideo;
|
|
185
218
|
});
|
|
186
219
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
187
220
|
}));
|
|
188
221
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfAudio", (0, _mobxUtils.computedFn)(function () {
|
|
189
222
|
var info = _this.securityInfos.find(function (_ref13) {
|
|
190
223
|
var info = _ref13.info;
|
|
191
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
224
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.StartAudio;
|
|
192
225
|
});
|
|
193
226
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
194
227
|
}));
|
|
195
228
|
(0, _defineProperty2["default"])(this, "isLockRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
196
229
|
var info = _this.securityInfos.find(function (_ref14) {
|
|
197
230
|
var info = _ref14.info;
|
|
198
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
231
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.LockedRoom;
|
|
199
232
|
});
|
|
200
233
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
201
234
|
}));
|
|
202
235
|
(0, _defineProperty2["default"])(this, "isWaitingRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
203
236
|
var info = _this.securityInfos.find(function (_ref15) {
|
|
204
237
|
var info = _ref15.info;
|
|
205
|
-
return (info === null || info === void 0 ? void 0 : info.action) ===
|
|
238
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaitingRoom;
|
|
206
239
|
});
|
|
207
240
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
208
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
|
+
});
|
|
209
253
|
(0, _defineProperty2["default"])(this, "hasMutePermission", function (targetRole) {
|
|
210
|
-
return _this._hasPermission(
|
|
254
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, targetRole);
|
|
211
255
|
});
|
|
212
256
|
(0, _defineProperty2["default"])(this, "hasUnmutePermission", function (targetRole) {
|
|
213
|
-
return _this._hasPermission(
|
|
257
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, targetRole);
|
|
214
258
|
});
|
|
215
259
|
(0, _defineProperty2["default"])(this, "hasRequestStartAudioPermission", function (targetRole) {
|
|
216
|
-
return _this._hasPermission(
|
|
260
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamRequestStartAudio, targetRole);
|
|
217
261
|
});
|
|
218
262
|
(0, _defineProperty2["default"])(this, "hasRequestStartVideoPermission", function (targetRole) {
|
|
219
|
-
return _this._hasPermission(
|
|
263
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamRequestStartVideo, targetRole);
|
|
220
264
|
});
|
|
221
265
|
(0, _defineProperty2["default"])(this, "hasStartVideoPermission", function (targetRole) {
|
|
222
|
-
return _this._hasPermission(
|
|
266
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartVideo, targetRole);
|
|
223
267
|
});
|
|
224
268
|
(0, _defineProperty2["default"])(this, "hasStopVideoPermission", function (targetRole) {
|
|
225
|
-
return _this._hasPermission(
|
|
269
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStopVideo, targetRole);
|
|
226
270
|
});
|
|
227
271
|
(0, _defineProperty2["default"])(this, "hasSelfMutePermission", function () {
|
|
228
|
-
return _this._hasPermission(
|
|
272
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, _type4.FcrPrivilegeUserRole.SELF);
|
|
229
273
|
});
|
|
230
274
|
(0, _defineProperty2["default"])(this, "hasAllMutePermission", function () {
|
|
231
|
-
return _this._hasPermission(
|
|
275
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
232
276
|
});
|
|
233
277
|
(0, _defineProperty2["default"])(this, "hasSelfUnmutePermission", function () {
|
|
234
|
-
return _this._hasPermission(
|
|
278
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, _type4.FcrPrivilegeUserRole.SELF);
|
|
235
279
|
});
|
|
236
280
|
(0, _defineProperty2["default"])(this, "hasAllUnmutePermission", function () {
|
|
237
|
-
return _this._hasPermission(
|
|
281
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
238
282
|
});
|
|
239
283
|
(0, _defineProperty2["default"])(this, "hasRevokeHostPermission", function () {
|
|
240
|
-
return _this._hasPermission(
|
|
284
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserRevokeRole, _type4.FcrPrivilegeUserRole.HOST);
|
|
241
285
|
});
|
|
242
286
|
(0, _defineProperty2["default"])(this, "hasKickOutPermission", function (targetRole) {
|
|
243
|
-
return _this._hasPermission(
|
|
287
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserKickOut, targetRole);
|
|
244
288
|
});
|
|
245
289
|
(0, _defineProperty2["default"])(this, "hasStartScreenSharePermission", function () {
|
|
246
|
-
return _this._hasPermission(
|
|
290
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartScreenShare, _type4.FcrPrivilegeUserRole.SELF);
|
|
247
291
|
});
|
|
248
292
|
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermission", function () {
|
|
249
|
-
return _this._hasPermission(
|
|
293
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
294
|
+
});
|
|
295
|
+
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermissionByTargetRole", function (targetRole) {
|
|
296
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, targetRole);
|
|
250
297
|
});
|
|
251
298
|
// 是否有权限发送私信息
|
|
252
299
|
(0, _defineProperty2["default"])(this, "hasPermissionToSendPrivateMessage", function (targetRole) {
|
|
253
|
-
return _this._hasPermission(
|
|
300
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPrivate, targetRole);
|
|
254
301
|
});
|
|
255
302
|
// 是否有“控制发送所有人消息”的权限
|
|
256
303
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlAllowSendAll", function () {
|
|
257
|
-
return _this._hasPermission(
|
|
304
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatAllowSendPublic, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
258
305
|
});
|
|
259
306
|
// 是否有“控制禁止发送所有人消息”的权限
|
|
260
307
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendAll", function () {
|
|
261
|
-
return _this._hasPermission(
|
|
308
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
262
309
|
});
|
|
263
310
|
// 是否有“控制发送私信”的权限
|
|
264
311
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlAllowSendPrivate", function () {
|
|
265
|
-
return _this._hasPermission(
|
|
312
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatAllowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
266
313
|
});
|
|
267
314
|
// 是否有“控制禁止发送私信”的权限
|
|
268
315
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendPrivate", function () {
|
|
269
|
-
return _this._hasPermission(
|
|
316
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
270
317
|
});
|
|
271
318
|
(0, _defineProperty2["default"])(this, "hasStartCloudRecordingPermission", function () {
|
|
272
|
-
return _this._hasPermission(
|
|
319
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RecordStartCloudRecording, _type4.FcrPrivilegeUserRole.SELF);
|
|
273
320
|
});
|
|
274
321
|
(0, _defineProperty2["default"])(this, "hasStartLiveStreamingPermission", function () {
|
|
275
|
-
return _this._hasPermission(
|
|
322
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
276
323
|
});
|
|
277
324
|
(0, _defineProperty2["default"])(this, "hasStopLiveStreamingPermission", function () {
|
|
278
|
-
return _this._hasPermission(
|
|
325
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveStop, _type4.FcrPrivilegeUserRole.SELF);
|
|
279
326
|
});
|
|
280
327
|
(0, _defineProperty2["default"])(this, "hasGetLiveStreamingLinkPermission", function () {
|
|
281
|
-
return _this._hasPermission(
|
|
328
|
+
return _this._hasPermission(_type4.FcrPermissionAction.LiveGetLink, _type4.FcrPrivilegeUserRole.SELF);
|
|
282
329
|
});
|
|
283
330
|
(0, _defineProperty2["default"])(this, "hasEnableStartAudioPermission", function () {
|
|
284
|
-
return _this._hasPermission(
|
|
331
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
285
332
|
});
|
|
286
333
|
(0, _defineProperty2["default"])(this, "hasEnableChangeNamePermission", function () {
|
|
287
|
-
return _this._hasPermission(
|
|
334
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserEnableChangeName, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
288
335
|
});
|
|
289
336
|
(0, _defineProperty2["default"])(this, "hasEnableStartVideoPermission", function () {
|
|
290
|
-
return _this._hasPermission(
|
|
337
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartVideo, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
291
338
|
});
|
|
292
339
|
(0, _defineProperty2["default"])(this, "hasEnableJoinWithAudioPermission", function () {
|
|
293
|
-
return _this._hasPermission(
|
|
340
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableJoinWithAudio, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
294
341
|
});
|
|
295
342
|
(0, _defineProperty2["default"])(this, "hasEnableStartScreenSharePermission", function () {
|
|
296
|
-
return _this._hasPermission(
|
|
343
|
+
return _this._hasPermission(_type4.FcrPermissionAction.StreamEnableStartScreenShare, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
297
344
|
});
|
|
298
345
|
(0, _defineProperty2["default"])(this, "hasLockRoomPermission", function () {
|
|
299
|
-
return _this._hasPermission(
|
|
346
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomLock, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
300
347
|
});
|
|
348
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkEnablePermission", function () {
|
|
349
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomEnableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
350
|
+
});
|
|
351
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkDisablePermission", function () {
|
|
352
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomDisableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
353
|
+
});
|
|
354
|
+
(0, _defineProperty2["default"])(this, "isMulti", (0, _mobxUtils.computedFn)(function () {
|
|
355
|
+
var _info$info3;
|
|
356
|
+
var info = _this.securityInfos.find(function (_ref17) {
|
|
357
|
+
var info = _ref17.info;
|
|
358
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaterMark;
|
|
359
|
+
});
|
|
360
|
+
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;
|
|
361
|
+
}));
|
|
301
362
|
//全体静音
|
|
302
363
|
(0, _defineProperty2["default"])(this, "muteAll", function () {
|
|
303
364
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
304
|
-
audioPrivilege:
|
|
305
|
-
videoPrivilege:
|
|
365
|
+
audioPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
366
|
+
videoPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
306
367
|
}, {
|
|
307
368
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
308
369
|
targetRoleTypeIsInclude: true
|
|
@@ -311,36 +372,36 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
311
372
|
//要求所有人解除静音
|
|
312
373
|
(0, _defineProperty2["default"])(this, "unmuteAll", function () {
|
|
313
374
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
314
|
-
audioPrivilege:
|
|
315
|
-
videoPrivilege:
|
|
375
|
+
audioPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
376
|
+
videoPrivilege: _agoraEduCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
316
377
|
}, {
|
|
317
378
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
318
379
|
targetRoleTypeIsInclude: true
|
|
319
380
|
});
|
|
320
381
|
});
|
|
321
382
|
(0, _defineProperty2["default"])(this, "setLockRoomEnabled", function (enable) {
|
|
322
|
-
_this._privilegeControl.enableLockedRoom(enable, [
|
|
383
|
+
_this._privilegeControl.enableLockedRoom(enable, [_type4.FcrPrivilegeUserRole.HOST, _type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
323
384
|
});
|
|
324
385
|
(0, _defineProperty2["default"])(this, "setWaitingRoomEnabled", function () {
|
|
325
|
-
|
|
386
|
+
// this._privilegeControl.enableWaitingRoom(true);
|
|
326
387
|
});
|
|
327
388
|
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function () {
|
|
328
|
-
|
|
389
|
+
// this._privilegeControl.allowChangeName(true, [FcrPrivilegeUserRole.PARTICIPANT]);
|
|
329
390
|
});
|
|
330
391
|
//设置是否允许聊天
|
|
331
392
|
(0, _defineProperty2["default"])(this, "setAllowChat", function (enable) {
|
|
332
|
-
var payload =
|
|
333
|
-
"public":
|
|
393
|
+
var payload = {
|
|
394
|
+
"public": enable,
|
|
334
395
|
"private": {
|
|
335
|
-
host:
|
|
336
|
-
cohost:
|
|
337
|
-
participant:
|
|
396
|
+
host: enable,
|
|
397
|
+
cohost: enable,
|
|
398
|
+
participant: enable
|
|
338
399
|
}
|
|
339
|
-
}
|
|
340
|
-
_this._privilegeControl.allowSendChat(enable, [
|
|
400
|
+
};
|
|
401
|
+
_this._privilegeControl.allowSendChat(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
341
402
|
});
|
|
342
403
|
(0, _defineProperty2["default"])(this, "setAllowChatWithPayload", function (enable, payload) {
|
|
343
|
-
_this._privilegeControl.allowSendChat(enable, [
|
|
404
|
+
_this._privilegeControl.allowSendChat(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
344
405
|
});
|
|
345
406
|
//设置成允许公聊但不允许私聊
|
|
346
407
|
(0, _defineProperty2["default"])(this, "setAllowedPublicChatAndDisallowedPrivateChat", function () {
|
|
@@ -366,32 +427,26 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
366
427
|
});
|
|
367
428
|
//所有人加入会议时静音
|
|
368
429
|
(0, _defineProperty2["default"])(this, "setAllowJoinWithMuteAudio", function (enable) {
|
|
369
|
-
_this._privilegeControl.
|
|
430
|
+
_this._privilegeControl.allowJoinWithMutedAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT, _type4.FcrPrivilegeUserRole.COHOST]);
|
|
370
431
|
});
|
|
371
432
|
//允许屏幕共享
|
|
372
433
|
(0, _defineProperty2["default"])(this, "setAllowShareScreen", function (state) {
|
|
373
|
-
|
|
374
|
-
var payload = {
|
|
375
|
-
screen: enable,
|
|
376
|
-
board: {
|
|
377
|
-
start: enable
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
_this._privilegeControl.allowShare(_enums.FcrSharePermissionState.ON, payload);
|
|
434
|
+
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
381
435
|
});
|
|
382
436
|
//允许开启视频
|
|
383
437
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfVideo", function (enable) {
|
|
384
|
-
_this._privilegeControl.allowStartVideo(enable, [
|
|
438
|
+
_this._privilegeControl.allowStartVideo(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
385
439
|
});
|
|
386
440
|
//允许自我解除静音
|
|
387
441
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfAudio", function (enable) {
|
|
388
|
-
_this._privilegeControl.allowStartAudio(enable, [
|
|
442
|
+
_this._privilegeControl.allowStartAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
389
443
|
});
|
|
390
444
|
(0, _defineProperty2["default"])(this, "_hasPermission", (0, _mobxUtils.computedFn)(function (action, targetRole) {
|
|
391
|
-
var
|
|
392
|
-
var
|
|
445
|
+
var _this$permissionInfos;
|
|
446
|
+
var convertedRole = targetRole === _type4.FcrPrivilegeUserRole.SELF ? [_this.localUser.userRole, _type4.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
447
|
+
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (_ref18) {
|
|
393
448
|
var _info$targetRoles;
|
|
394
|
-
var info =
|
|
449
|
+
var info = _ref18.info;
|
|
395
450
|
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) {
|
|
396
451
|
var _info$targetRoles2;
|
|
397
452
|
return info === null || info === void 0 || (_info$targetRoles2 = info.targetRoles) === null || _info$targetRoles2 === void 0 ? void 0 : _info$targetRoles2.includes(role);
|
|
@@ -400,15 +455,16 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
400
455
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
401
456
|
}));
|
|
402
457
|
(0, _defineProperty2["default"])(this, "_hasPermissionWithParams", (0, _mobxUtils.computedFn)(function (action, targetRole, params) {
|
|
403
|
-
var
|
|
458
|
+
var _this$permissionInfos2;
|
|
459
|
+
var convertedRole = targetRole === _type4.FcrPrivilegeUserRole.SELF ? [_this.localUser.userRole, _type4.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
404
460
|
var matchParams = function matchParams(_params) {
|
|
405
461
|
return (0, _lodash.every)(Object.keys(params), function (key) {
|
|
406
462
|
return _params && _params[key].includes(params[key]);
|
|
407
463
|
});
|
|
408
464
|
};
|
|
409
|
-
var info = _this.permissionInfos.find(function (
|
|
465
|
+
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (_ref19) {
|
|
410
466
|
var _info$targetRoles3, _info$params;
|
|
411
|
-
var info =
|
|
467
|
+
var info = _ref19.info;
|
|
412
468
|
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) {
|
|
413
469
|
var _info$targetRoles4;
|
|
414
470
|
return info === null || info === void 0 || (_info$targetRoles4 = info.targetRoles) === null || _info$targetRoles4 === void 0 ? void 0 : _info$targetRoles4.includes(role);
|
|
@@ -493,74 +549,80 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
493
549
|
}, {
|
|
494
550
|
key: "hasCallMergePermission",
|
|
495
551
|
value: function hasCallMergePermission() {
|
|
496
|
-
return this._hasPermission(
|
|
552
|
+
return this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
497
553
|
}
|
|
498
554
|
}, {
|
|
499
555
|
key: "hasCallSplitPermission",
|
|
500
556
|
value: function hasCallSplitPermission() {
|
|
501
|
-
return this._hasPermission(
|
|
557
|
+
return this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
502
558
|
}
|
|
503
559
|
}, {
|
|
504
560
|
key: "hasSetRolePermission",
|
|
505
561
|
value:
|
|
506
562
|
// 是否有设置角色的权限
|
|
507
563
|
function hasSetRolePermission(targetRole, setToRole) {
|
|
508
|
-
return this._hasPermissionWithParams(
|
|
564
|
+
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
509
565
|
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
510
566
|
});
|
|
511
567
|
}
|
|
512
568
|
}, {
|
|
513
569
|
key: "hasEndRoomPermission",
|
|
514
570
|
value: function hasEndRoomPermission() {
|
|
515
|
-
return this._hasPermission(
|
|
571
|
+
return this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
516
572
|
}
|
|
517
573
|
}, {
|
|
518
574
|
key: "hasAssignHostBeforeLeavingPermission",
|
|
519
575
|
value: function hasAssignHostBeforeLeavingPermission(role) {
|
|
520
|
-
return this._hasPermissionWithParams(
|
|
576
|
+
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
521
577
|
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
522
578
|
});
|
|
523
579
|
}
|
|
524
580
|
}, {
|
|
525
581
|
key: "hasStartBoardPermission",
|
|
526
582
|
value: function hasStartBoardPermission() {
|
|
527
|
-
return this._hasPermission(
|
|
583
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
528
584
|
}
|
|
529
585
|
}, {
|
|
530
586
|
key: "hasCloseBoardPermission",
|
|
531
587
|
value: function hasCloseBoardPermission() {
|
|
532
|
-
return this._hasPermission(
|
|
588
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
533
589
|
}
|
|
534
590
|
}, {
|
|
535
591
|
key: "hasWriteBoardPermission",
|
|
536
592
|
value: function hasWriteBoardPermission() {
|
|
537
|
-
return this._hasPermission(
|
|
593
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
538
594
|
}
|
|
539
595
|
}, {
|
|
540
596
|
key: "hasAllowStartBoardPermission",
|
|
541
597
|
value: function hasAllowStartBoardPermission() {
|
|
542
|
-
return this._hasPermission(
|
|
598
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
543
599
|
}
|
|
544
600
|
}, {
|
|
545
601
|
key: "hasDisallowStartBoardPermission",
|
|
546
602
|
value: function hasDisallowStartBoardPermission() {
|
|
547
|
-
return this._hasPermission(
|
|
603
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
548
604
|
}
|
|
549
605
|
}, {
|
|
550
606
|
key: "hasAllowWriteBoardPermission",
|
|
551
607
|
value: function hasAllowWriteBoardPermission() {
|
|
552
|
-
return this._hasPermission(
|
|
608
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
553
609
|
}
|
|
554
610
|
}, {
|
|
555
611
|
key: "hasDisallowWriteBoardPermission",
|
|
556
612
|
value: function hasDisallowWriteBoardPermission() {
|
|
557
|
-
return this._hasPermission(
|
|
613
|
+
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
558
614
|
}
|
|
559
615
|
}, {
|
|
560
616
|
key: "hasAllowScreenShareAndBoardPermission",
|
|
561
617
|
value: function hasAllowScreenShareAndBoardPermission() {
|
|
562
618
|
var _this$_privilegeContr;
|
|
563
|
-
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(
|
|
619
|
+
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
620
|
+
}
|
|
621
|
+
}, {
|
|
622
|
+
key: "hasAllowWaterMarkPermission",
|
|
623
|
+
value: function hasAllowWaterMarkPermission() {
|
|
624
|
+
var _this$_privilegeContr2;
|
|
625
|
+
return (_this$_privilegeContr2 = this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.WaterMark)) === null || _this$_privilegeContr2 === void 0 ? void 0 : _this$_privilegeContr2.enable;
|
|
564
626
|
}
|
|
565
627
|
}, {
|
|
566
628
|
key: "getAllowedOperations",
|
|
@@ -570,11 +632,11 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
570
632
|
//请求开启摄像头权限
|
|
571
633
|
operations.push('request_start_video');
|
|
572
634
|
}
|
|
573
|
-
if (this.hasStartVideoPermission(isSelf ?
|
|
635
|
+
if (this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
574
636
|
//开启摄像头权限
|
|
575
637
|
operations.push('start_video');
|
|
576
638
|
}
|
|
577
|
-
if (this.hasStopVideoPermission(isSelf ?
|
|
639
|
+
if (this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
578
640
|
//关闭摄像头权限
|
|
579
641
|
operations.push('stop_video');
|
|
580
642
|
}
|
|
@@ -583,15 +645,15 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
583
645
|
operations.push('private_chat');
|
|
584
646
|
}
|
|
585
647
|
operations.push('pin');
|
|
586
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
648
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
587
649
|
//设为主持人权限
|
|
588
650
|
operations.push('set_as_host');
|
|
589
651
|
}
|
|
590
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
652
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
591
653
|
//设为联席主持人权限
|
|
592
654
|
operations.push('set_as_co_host');
|
|
593
655
|
}
|
|
594
|
-
if (this.hasSetRolePermission(targetUserRole,
|
|
656
|
+
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
595
657
|
//撤销联席主持人权限
|
|
596
658
|
operations.push('revoke_co_host');
|
|
597
659
|
}
|
|
@@ -603,18 +665,22 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
603
665
|
//移除房间权限
|
|
604
666
|
operations.push('kick_out');
|
|
605
667
|
}
|
|
668
|
+
if (this.hasWaitingRoomPermission(targetUserRole)) {
|
|
669
|
+
operations.push('put_into_waiting_room');
|
|
670
|
+
}
|
|
606
671
|
return operations;
|
|
607
672
|
}
|
|
608
673
|
}, {
|
|
609
674
|
key: "allowShare",
|
|
610
675
|
value: function () {
|
|
611
|
-
var _allowShare = (0, _asyncToGenerator2["default"])(
|
|
676
|
+
var _allowShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
677
|
+
var enable;
|
|
612
678
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
613
679
|
while (1) switch (_context.prev = _context.next) {
|
|
614
680
|
case 0:
|
|
615
|
-
|
|
681
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
616
682
|
_context.next = 3;
|
|
617
|
-
return this._privilegeControl.allowShare(enable,
|
|
683
|
+
return this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
618
684
|
case 3:
|
|
619
685
|
return _context.abrupt("return", _context.sent);
|
|
620
686
|
case 4:
|
|
@@ -623,7 +689,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
623
689
|
}
|
|
624
690
|
}, _callee, this);
|
|
625
691
|
}));
|
|
626
|
-
function allowShare(_x
|
|
692
|
+
function allowShare(_x) {
|
|
627
693
|
return _allowShare.apply(this, arguments);
|
|
628
694
|
}
|
|
629
695
|
return allowShare;
|
|
@@ -631,22 +697,24 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
631
697
|
}, {
|
|
632
698
|
key: "setAllowWriteBoard",
|
|
633
699
|
value: function () {
|
|
634
|
-
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(
|
|
700
|
+
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
|
|
701
|
+
var enable;
|
|
635
702
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
636
703
|
while (1) switch (_context2.prev = _context2.next) {
|
|
637
704
|
case 0:
|
|
638
705
|
this.logger.info('setAllowWriteBoard', state);
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
return _context2.abrupt("return", _context2.sent);
|
|
706
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
707
|
+
_context2.next = 4;
|
|
708
|
+
return this._privilegeControl.allowWriteBoard(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
643
709
|
case 4:
|
|
710
|
+
return _context2.abrupt("return", _context2.sent);
|
|
711
|
+
case 5:
|
|
644
712
|
case "end":
|
|
645
713
|
return _context2.stop();
|
|
646
714
|
}
|
|
647
715
|
}, _callee2, this);
|
|
648
716
|
}));
|
|
649
|
-
function setAllowWriteBoard(
|
|
717
|
+
function setAllowWriteBoard(_x2) {
|
|
650
718
|
return _setAllowWriteBoard.apply(this, arguments);
|
|
651
719
|
}
|
|
652
720
|
return setAllowWriteBoard;
|
|
@@ -659,19 +727,24 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
659
727
|
}, {
|
|
660
728
|
key: "_handleSecurityUpdated",
|
|
661
729
|
value: function _handleSecurityUpdated(roomId, event) {
|
|
662
|
-
var
|
|
730
|
+
var _event$operatorUser,
|
|
731
|
+
_event$operatorUser2,
|
|
732
|
+
_this$privilegeOperat,
|
|
733
|
+
_securityInfo$info,
|
|
663
734
|
_securityInfo$info2,
|
|
664
735
|
_securityInfo$info3,
|
|
665
736
|
_securityInfo$info4,
|
|
666
737
|
_securityInfo$info5,
|
|
667
738
|
_securityInfo$info6,
|
|
668
|
-
_this2 = this
|
|
739
|
+
_this2 = this,
|
|
740
|
+
_event$securityInfo$i,
|
|
741
|
+
_event$securityInfo$i2;
|
|
669
742
|
this.securityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
670
743
|
this.privilegeOperator = event.operatorUser;
|
|
671
744
|
var securityInfo = event.securityInfo;
|
|
672
745
|
var enable = securityInfo.enable;
|
|
673
|
-
var operator = this.localUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('
|
|
674
|
-
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) ===
|
|
746
|
+
var operator = this.localUser.userId === ((_event$operatorUser = event.operatorUser) === null || _event$operatorUser === void 0 ? void 0 : _event$operatorUser.userId) ? (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, " ");
|
|
747
|
+
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio) {
|
|
675
748
|
if (enable) {
|
|
676
749
|
this._uiEventStore.showToast({
|
|
677
750
|
type: 'info',
|
|
@@ -680,7 +753,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
680
753
|
})
|
|
681
754
|
});
|
|
682
755
|
}
|
|
683
|
-
} else if (((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) ===
|
|
756
|
+
} else if (((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) === _type4.FcrSecurityAction.StartAudio) {
|
|
684
757
|
var toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedselfunmuting', {
|
|
685
758
|
reason1: operator
|
|
686
759
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledselfunmuting', {
|
|
@@ -690,7 +763,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
690
763
|
type: 'info',
|
|
691
764
|
message: toastMessage
|
|
692
765
|
});
|
|
693
|
-
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) ===
|
|
766
|
+
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) === _type4.FcrSecurityAction.StartVideo) {
|
|
694
767
|
var _toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_videoenabled', {
|
|
695
768
|
reason1: operator
|
|
696
769
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledvideo', {
|
|
@@ -700,7 +773,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
700
773
|
type: 'info',
|
|
701
774
|
message: _toastMessage
|
|
702
775
|
});
|
|
703
|
-
} else if (((_securityInfo$info4 = securityInfo.info) === null || _securityInfo$info4 === void 0 ? void 0 : _securityInfo$info4.action) ===
|
|
776
|
+
} else if (((_securityInfo$info4 = securityInfo.info) === null || _securityInfo$info4 === void 0 ? void 0 : _securityInfo$info4.action) === _type4.FcrSecurityAction.ShareScreen) {
|
|
704
777
|
var _toastMessage2 = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedScreensharing', {
|
|
705
778
|
reason1: operator
|
|
706
779
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledScreensharing', {
|
|
@@ -710,7 +783,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
710
783
|
type: 'info',
|
|
711
784
|
message: _toastMessage2
|
|
712
785
|
});
|
|
713
|
-
} else if (((_securityInfo$info5 = securityInfo.info) === null || _securityInfo$info5 === void 0 ? void 0 : _securityInfo$info5.action) ===
|
|
786
|
+
} else if (((_securityInfo$info5 = securityInfo.info) === null || _securityInfo$info5 === void 0 ? void 0 : _securityInfo$info5.action) === _type4.FcrSecurityAction.SendChat) {
|
|
714
787
|
var _toastMessage3 = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedchat', {
|
|
715
788
|
reason1: operator
|
|
716
789
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_banedchat', {
|
|
@@ -720,7 +793,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
720
793
|
type: 'info',
|
|
721
794
|
message: _toastMessage3
|
|
722
795
|
});
|
|
723
|
-
} else if (((_securityInfo$info6 = securityInfo.info) === null || _securityInfo$info6 === void 0 ? void 0 : _securityInfo$info6.action) ===
|
|
796
|
+
} else if (((_securityInfo$info6 = securityInfo.info) === null || _securityInfo$info6 === void 0 ? void 0 : _securityInfo$info6.action) === _type4.FcrSecurityAction.Sharing && !enable) {
|
|
724
797
|
var _this$boardOwnerUser, _this$boardOwnerUser2;
|
|
725
798
|
if (!this.boardOwnerUser) return;
|
|
726
799
|
var isHost = [_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST].includes((_this$boardOwnerUser = this.boardOwnerUser) === null || _this$boardOwnerUser === void 0 ? void 0 : _this$boardOwnerUser.userRole);
|
|
@@ -751,6 +824,54 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
751
824
|
}
|
|
752
825
|
});
|
|
753
826
|
}
|
|
827
|
+
} else if (((_event$securityInfo$i = event.securityInfo.info) === null || _event$securityInfo$i === void 0 ? void 0 : _event$securityInfo$i.action) === _type4.FcrSecurityAction.WaitingRoom) {
|
|
828
|
+
var _event$operatorUser3, _event$operatorUser4;
|
|
829
|
+
var isSelf = this.localUser.userId === ((_event$operatorUser3 = event.operatorUser) === null || _event$operatorUser3 === void 0 ? void 0 : _event$operatorUser3.userId);
|
|
830
|
+
var userName = (_event$operatorUser4 = event.operatorUser) === null || _event$operatorUser4 === void 0 ? void 0 : _event$operatorUser4.userName;
|
|
831
|
+
if (!isSelf) {
|
|
832
|
+
if (enable) {
|
|
833
|
+
this._uiEventStore.showToast({
|
|
834
|
+
type: 'normal',
|
|
835
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_setting_tips_enable'))
|
|
836
|
+
});
|
|
837
|
+
} else {
|
|
838
|
+
this._uiEventStore.showToast({
|
|
839
|
+
type: 'normal',
|
|
840
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_mobile_setting_label_disable'))
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
} else if (((_event$securityInfo$i2 = event.securityInfo.info) === null || _event$securityInfo$i2 === void 0 ? void 0 : _event$securityInfo$i2.action) == _type4.FcrSecurityAction.WaterMark) {
|
|
845
|
+
var _event$securityInfo$i3;
|
|
846
|
+
var _enable = event.securityInfo.enable;
|
|
847
|
+
if (this._prevWaterMarkEnable !== _enable) {
|
|
848
|
+
var _event$operatorUser5;
|
|
849
|
+
var toastText = '';
|
|
850
|
+
var roleValue = (_event$operatorUser5 = event.operatorUser) === null || _event$operatorUser5 === void 0 ? void 0 : _event$operatorUser5.userRole;
|
|
851
|
+
var canTriggerToast = roleValue === _type.FcrUserRole.HOST || roleValue === _type.FcrUserRole.COHOST;
|
|
852
|
+
if (canTriggerToast) {
|
|
853
|
+
if (_enable) {
|
|
854
|
+
if (roleValue === _type.FcrUserRole.HOST) {
|
|
855
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_facilitator_watermark');
|
|
856
|
+
} else if (roleValue === _type.FcrUserRole.COHOST) {
|
|
857
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_co_facilitator_watermark');
|
|
858
|
+
}
|
|
859
|
+
} else {
|
|
860
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_turn_off_watermark');
|
|
861
|
+
}
|
|
862
|
+
this._prevWaterMarkEnable = _enable;
|
|
863
|
+
if (toastText) {
|
|
864
|
+
this._uiEventStore.showToast({
|
|
865
|
+
type: 'normal',
|
|
866
|
+
message: toastText
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WATERMARK_INFO_UPDATE, {
|
|
872
|
+
enable: _enable,
|
|
873
|
+
lineType: (_event$securityInfo$i3 = event.securityInfo.info) === null || _event$securityInfo$i3 === void 0 ? void 0 : _event$securityInfo$i3.payload.lineType
|
|
874
|
+
});
|
|
754
875
|
}
|
|
755
876
|
}
|
|
756
877
|
}, {
|
|
@@ -760,6 +881,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
760
881
|
var localUserRole = (_this$_userControl$ge = this._userControl.getLocalUser()) === null || _this$_userControl$ge === void 0 ? void 0 : _this$_userControl$ge.userRole;
|
|
761
882
|
// 参会者才需要权限控制
|
|
762
883
|
if (localUserRole === _type.FcrUserRole.PARTICIPANT) {
|
|
884
|
+
var _this$_userControl$ge2;
|
|
763
885
|
var toastObj = {
|
|
764
886
|
id: 'private-toast',
|
|
765
887
|
toastProps: {
|
|
@@ -774,7 +896,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
774
896
|
if (!this.allowChat() || this.disallowedAllChat()) {
|
|
775
897
|
needToast = true;
|
|
776
898
|
}
|
|
777
|
-
var targetUserRole = this._userControl.getUser(userId).userRole;
|
|
899
|
+
var targetUserRole = (_this$_userControl$ge2 = this._userControl.getUser(userId)) === null || _this$_userControl$ge2 === void 0 ? void 0 : _this$_userControl$ge2.userRole;
|
|
778
900
|
|
|
779
901
|
// 公聊但允许私聊主持人和联席主持人
|
|
780
902
|
if (this.allowedPublicChatAndDisallowedPrivateChat() && targetUserRole === _type.FcrUserRole.PARTICIPANT) {
|
|
@@ -805,9 +927,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
805
927
|
}, {
|
|
806
928
|
key: "_handleProcessEvent",
|
|
807
929
|
value: function _handleProcessEvent(event) {
|
|
808
|
-
var
|
|
809
|
-
action =
|
|
810
|
-
payload =
|
|
930
|
+
var _ref20 = event,
|
|
931
|
+
action = _ref20.action,
|
|
932
|
+
payload = _ref20.payload;
|
|
811
933
|
switch (action) {
|
|
812
934
|
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_CHANGE_SELF_NAME:
|
|
813
935
|
// this.setAllowChangeSelfName(payload.allow);
|
|
@@ -821,6 +943,11 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
821
943
|
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_SHARE_SCREEN:
|
|
822
944
|
this.setAllowShareScreen(payload.allow);
|
|
823
945
|
break;
|
|
946
|
+
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_BOARD_WRITE:
|
|
947
|
+
{
|
|
948
|
+
this.setAllowWriteBoard(_enums.FcrSharePermissionState.ON);
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
824
951
|
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_UNMUTE_SELF_VIDEO:
|
|
825
952
|
this.setAllowUnmuteSelfVideo(payload.allow);
|
|
826
953
|
break;
|
|
@@ -861,6 +988,11 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
861
988
|
return _this3.allowScreenShareAndBoard();
|
|
862
989
|
},
|
|
863
990
|
action: _constant.RendererEventAction.MAIN_SET_ALLOW_SHARE_SCREEN
|
|
991
|
+
}, {
|
|
992
|
+
observable: function observable() {
|
|
993
|
+
return _this3.allowBoardWrite();
|
|
994
|
+
},
|
|
995
|
+
action: _constant.RendererEventAction.MAIN_SET_ALLOW_BOARD_WRITE
|
|
864
996
|
}, {
|
|
865
997
|
observable: function observable() {
|
|
866
998
|
return _this3.allowUnmuteSelfVideo();
|
|
@@ -944,9 +1076,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
944
1076
|
},
|
|
945
1077
|
action: _constant.RendererEventAction.LOCK_ROOM_PERMISSION
|
|
946
1078
|
}];
|
|
947
|
-
securityReactions.forEach(function (
|
|
948
|
-
var observable =
|
|
949
|
-
action =
|
|
1079
|
+
securityReactions.forEach(function (_ref21) {
|
|
1080
|
+
var observable = _ref21.observable,
|
|
1081
|
+
action = _ref21.action;
|
|
950
1082
|
_this3._disposers.push((0, _mobx.reaction)(observable, function (allow) {
|
|
951
1083
|
window.runtime.sendEvent({
|
|
952
1084
|
action: action,
|
|
@@ -965,10 +1097,32 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
965
1097
|
});
|
|
966
1098
|
this._disposers = [];
|
|
967
1099
|
}
|
|
1100
|
+
}, {
|
|
1101
|
+
key: "setAllowWaterMark",
|
|
1102
|
+
value: function () {
|
|
1103
|
+
var _setAllowWaterMark = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(state, lineType) {
|
|
1104
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
1105
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1106
|
+
case 0:
|
|
1107
|
+
_context3.next = 2;
|
|
1108
|
+
return this._privilegeControl.allowWatermark(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], lineType);
|
|
1109
|
+
case 2:
|
|
1110
|
+
return _context3.abrupt("return", _context3.sent);
|
|
1111
|
+
case 3:
|
|
1112
|
+
case "end":
|
|
1113
|
+
return _context3.stop();
|
|
1114
|
+
}
|
|
1115
|
+
}, _callee3, this);
|
|
1116
|
+
}));
|
|
1117
|
+
function setAllowWaterMark(_x3, _x4) {
|
|
1118
|
+
return _setAllowWaterMark.apply(this, arguments);
|
|
1119
|
+
}
|
|
1120
|
+
return setAllowWaterMark;
|
|
1121
|
+
}()
|
|
968
1122
|
}]);
|
|
969
1123
|
}();
|
|
970
1124
|
_FcrSecurityStore = FcrSecurityStore;
|
|
971
|
-
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, "_handleProcessEvent"], [_decorator.bound, 2, "_addReactions"], [_decorator.bound, 2, "_removeReactions"]], []).e;
|
|
1125
|
+
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, "_handleProcessEvent"], [_decorator.bound, 2, "_addReactions"], [_decorator.bound, 2, "_removeReactions"], [_decorator.bound, 2, "setAllowWaterMark"]], []).e;
|
|
972
1126
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 5);
|
|
973
1127
|
_init_securityInfos = _applyDecs$e2[0];
|
|
974
1128
|
_init_permissionInfos = _applyDecs$e2[1];
|