fcr-ui-scene 3.7.9-alpha → 3.8.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/creator/index.d.ts +6 -3
- package/lib/creator/index.js +38 -20
- package/lib/creator/provider-initializer.browser.js +30 -2
- package/lib/creator/provider-initializer.electron.js +34 -6
- package/lib/electron/app.js +0 -1
- package/lib/electron/bootstrap-sdk.d.ts +3 -1
- package/lib/electron/bootstrap-sdk.js +93 -375
- package/lib/electron/exit-codes.d.ts +6 -1
- package/lib/electron/exit-codes.js +5 -0
- package/lib/electron/injections.d.ts +10 -4
- package/lib/electron/injections.js +116 -74
- package/lib/electron/ipc/ipc.js +13 -11
- package/lib/electron/ipc/type.d.ts +3 -1
- package/lib/electron/ipc/type.js +2 -0
- package/lib/electron/main.js +3 -1
- package/lib/electron/preload.js +2 -1
- package/lib/electron/process-manager/constants.d.ts +1 -0
- package/lib/electron/process-manager/constants.js +8 -0
- package/lib/electron/{event-manager.d.ts → process-manager/event-manager.d.ts} +3 -4
- package/lib/electron/{event-manager.js → process-manager/event-manager.js} +38 -30
- package/lib/electron/process-manager/index.d.ts +179 -0
- package/lib/electron/process-manager/index.js +848 -0
- package/lib/electron/process-manager/state-manager.d.ts +135 -0
- package/lib/electron/process-manager/state-manager.js +358 -0
- package/lib/electron/process-manager/types.d.ts +80 -0
- package/lib/electron/process-manager/types.js +79 -0
- package/lib/electron/sdk-helper.d.ts +4 -0
- package/lib/electron/sdk-helper.js +39 -2
- package/lib/fragments/annotation/libs.d.ts +1 -1
- package/lib/fragments/annotation/libs.js +12 -12
- package/lib/fragments/annotation/store.d.ts +1 -1
- package/lib/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -1
- package/lib/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/libs.js +21 -21
- package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +3 -3
- package/lib/fragments/annotation/toolbar/store.d.ts +1 -1
- package/lib/fragments/annotation/toolbar/store.js +10 -10
- package/lib/fragments/annotation/toolbar/view.js +7 -7
- package/lib/fragments/whiteboard/store.d.ts +2 -2
- package/lib/fragments/whiteboard/store.js +27 -21
- package/lib/fragments/whiteboard/view.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/modules/action-bar/components/apps/index.js +1 -37
- package/lib/modules/action-bar/components/collapse/index.d.ts +2 -1
- package/lib/modules/action-bar/components/collapse/index.js +11 -2
- package/lib/modules/action-bar/components/item/index.js +2 -2
- package/lib/modules/action-bar/components/screen-share/index.browser.js +21 -14
- package/lib/modules/action-bar/components/screen-share/index.electron.js +38 -24
- package/lib/modules/action-bar/components/screen-share/submenu.js +6 -5
- package/lib/modules/action-bar/components/security/index.js +2 -2
- package/lib/modules/action-bar/index.css +26 -0
- package/lib/modules/action-bar/main-scene/store.base.d.ts +6 -4
- package/lib/modules/action-bar/main-scene/store.base.js +41 -46
- package/lib/modules/action-bar/type.d.ts +0 -10
- package/lib/modules/audio-stream/index.d.ts +1 -1
- package/lib/modules/audio-stream/index.js +22 -8
- package/lib/modules/caption/draggable-container/index.css +10 -0
- package/lib/modules/caption/draggable-container/index.d.ts +4 -0
- package/lib/modules/caption/draggable-container/index.js +145 -0
- package/lib/modules/caption/index.d.ts +10 -0
- package/lib/modules/caption/index.js +127 -0
- package/lib/modules/caption/store.d.ts +56 -0
- package/lib/modules/caption/store.js +366 -0
- package/lib/modules/caption/type.d.ts +13 -0
- package/lib/modules/caption/type.js +14 -0
- package/lib/modules/caption/view.css +158 -0
- package/lib/modules/caption/view.d.ts +4 -0
- package/lib/modules/caption/view.js +292 -0
- package/lib/modules/chat/chat-room-store.d.ts +1 -1
- package/lib/modules/chat/chat-room-store.js +6 -6
- package/lib/modules/chat/components/message-list/message-item/index.js +60 -18
- package/lib/modules/chat/index.css +7 -0
- package/lib/modules/chat/store.js +1 -1
- package/lib/modules/components/apps/app-item/index.css +16 -1
- package/lib/modules/components/apps/app-item/index.js +102 -35
- package/lib/modules/components/apps/app-list.js +17 -1
- package/lib/modules/components/apps/types.d.ts +11 -1
- package/lib/modules/components/caption-menu/index.css +58 -0
- package/lib/modules/components/caption-menu/index.d.ts +41 -0
- package/lib/modules/components/caption-menu/index.js +112 -0
- package/lib/modules/components/caption-menu/participants-privilege-control-options.d.ts +2 -0
- package/lib/modules/components/caption-menu/participants-privilege-control-options.js +87 -0
- package/lib/modules/components/caption-menu/steps/index.css +73 -0
- package/lib/modules/components/caption-menu/steps/index.d.ts +11 -0
- package/lib/modules/components/caption-menu/steps/index.js +56 -0
- package/lib/modules/components/caption-menu/translation-setting-options.d.ts +17 -0
- package/lib/modules/components/caption-menu/translation-setting-options.js +181 -0
- package/lib/modules/components/control-bar/index.d.ts +3 -3
- package/lib/modules/components/control-bar/index.js +10 -10
- package/lib/modules/components/device-control/components/audio-menu/index.js +17 -0
- package/lib/modules/components/device-control/components/carmera/index.js +3 -0
- package/lib/modules/components/device-control/components/microphone/index.js +4 -1
- package/lib/modules/components/device-control/index.css +12 -4
- package/lib/modules/components/device-control/store.base.d.ts +1 -0
- package/lib/modules/components/device-control/store.base.js +2 -0
- package/lib/modules/components/security-menu/index.js +147 -65
- package/lib/modules/components/security-menu/store.d.ts +15 -0
- package/lib/modules/components/security-menu/store.js +78 -16
- package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/clean-tool/index.js +4 -4
- package/lib/modules/components/toolbar/components/color-tool/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -1
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +21 -21
- package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +1 -1
- package/lib/modules/components/toolbar/components/pen-tool/index.js +3 -3
- package/lib/modules/components/toolbar/index.d.ts +2 -2
- package/lib/modules/components/toolbar/index.js +35 -34
- package/lib/modules/components/toolbar/style.css +1 -1
- package/lib/modules/components/toolbar/types.d.ts +1 -1
- package/lib/modules/connection-gateway/store.d.ts +1 -0
- package/lib/modules/connection-gateway/store.js +5 -0
- package/lib/modules/control-bar/components/apps-popover/index.d.ts +3 -0
- package/lib/modules/control-bar/components/apps-popover/index.js +41 -0
- package/lib/modules/control-bar/components/more-actions/index.js +9 -1
- package/lib/modules/control-bar/enums.d.ts +2 -1
- package/lib/modules/control-bar/enums.js +1 -0
- package/lib/modules/control-bar/store.d.ts +6 -1
- package/lib/modules/control-bar/store.js +56 -12
- package/lib/modules/control-bar/view.js +16 -11
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +8 -0
- package/lib/modules/dialog/components/dialog-container/component/body.js +44 -5
- package/lib/modules/dialog/components/dialog-container/index.css +4 -1
- package/lib/modules/dialog/components/dialog-container/index.d.ts +1 -0
- package/lib/modules/dialog/components/dialog-container/index.js +7 -1
- package/lib/modules/dialog/components/normal-window/index.d.ts +1 -0
- package/lib/modules/dialog/components/normal-window/index.js +3 -1
- package/lib/modules/dialog/dialogs/caption/index.d.ts +21 -0
- package/lib/modules/dialog/dialogs/caption/index.js +42 -0
- package/lib/modules/dialog/dialogs/chat/components/actions.js +2 -2
- package/lib/modules/dialog/dialogs/confirm/index.js +1 -1
- package/lib/modules/dialog/dialogs/participant/components/actions.js +2 -2
- package/lib/modules/dialog/dialogs/subtitles-history/index.d.ts +27 -0
- package/lib/modules/dialog/dialogs/subtitles-history/index.js +51 -0
- package/lib/modules/dialog/store.base.d.ts +1 -1
- package/lib/modules/dialog/store.browser.d.ts +1 -1
- package/lib/modules/dialog/store.electron.d.ts +1 -3
- package/lib/modules/dialog/store.electron.js +0 -9
- package/lib/modules/event-sound/enum.d.ts +5 -0
- package/lib/modules/event-sound/enum.js +20 -0
- package/lib/modules/event-sound/index.d.ts +0 -10
- package/lib/modules/event-sound/index.js +1 -12
- package/lib/modules/event-sound/store.d.ts +2 -2
- package/lib/modules/event-sound/store.js +21 -22
- package/lib/modules/interpreter/store.js +4 -2
- package/lib/modules/layout/components/Aside.d.ts +2 -1
- package/lib/modules/layout/components/Aside.js +97 -58
- package/lib/modules/layout/components/CommonVideoRenderer.js +1 -2
- package/lib/modules/layout/components/index.css +15 -2
- package/lib/modules/layout/store.base.d.ts +13 -2
- package/lib/modules/layout/store.base.js +149 -54
- package/lib/modules/layout/store.electron.d.ts +1 -0
- package/lib/modules/layout/store.electron.js +132 -32
- package/lib/modules/layout/type.d.ts +4 -0
- package/lib/modules/layout/view.js +27 -5
- package/lib/modules/notification/index.css +4 -4
- package/lib/modules/notification/store.d.ts +5 -3
- package/lib/modules/notification/store.js +9 -2
- package/lib/modules/notification/view.d.ts +1 -0
- package/lib/modules/notification/view.js +33 -2
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +0 -1
- package/lib/modules/participant/components/participants/components/footer/index.js +1 -1
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +2 -2
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +6 -1
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +1 -1
- package/lib/modules/participant/components/participants/index.js +13 -1
- package/lib/modules/participant/store.base.d.ts +1 -2
- package/lib/modules/participant/store.base.js +70 -71
- package/lib/modules/participant/type.d.ts +3 -1
- package/lib/modules/participant/type.js +2 -0
- package/lib/modules/pc-audio-connect/main-scene/store.d.ts +1 -0
- package/lib/modules/pc-audio-connect/main-scene/store.js +5 -0
- package/lib/modules/pc-audio-connect/waiting-scene/store.d.ts +2 -0
- package/lib/modules/pc-audio-connect/waiting-scene/store.js +10 -6
- package/lib/modules/phone-audio-connect/store.d.ts +1 -0
- package/lib/modules/phone-audio-connect/store.js +5 -0
- package/lib/modules/secondary-window/store.d.ts +1 -2
- package/lib/modules/secondary-window/store.js +22 -12
- package/lib/modules/secondary-window/type.d.ts +1 -1
- package/lib/modules/secondary-window/view.js +7 -8
- package/lib/modules/setting/audio-whiteList/audio-device-adaptation.d.ts +18 -0
- package/lib/modules/setting/audio-whiteList/audio-device-adaptation.js +34 -0
- package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.d.ts +63 -0
- package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.js +353 -0
- package/lib/modules/setting/caption_and_transcribing/index.css +88 -0
- package/lib/modules/setting/caption_and_transcribing/index.d.ts +3 -0
- package/lib/modules/setting/caption_and_transcribing/index.js +96 -0
- package/lib/modules/setting/general-settings/general-settings.d.ts +4 -0
- package/lib/modules/setting/general-settings/general-settings.js +3 -3
- package/lib/modules/setting/index.d.ts +1 -0
- package/lib/modules/setting/index.js +10 -7
- package/lib/modules/setting/state/index.js +5 -3
- package/lib/modules/setting/store.base.d.ts +29 -4
- package/lib/modules/setting/store.base.js +141 -61
- package/lib/modules/setting/store.browser.js +4 -9
- package/lib/modules/setting/store.electron.d.ts +11 -0
- package/lib/modules/setting/store.electron.js +110 -1
- package/lib/modules/setting/type.d.ts +2 -1
- package/lib/modules/setting/type.js +1 -0
- package/lib/modules/setting/video-settings/video-settings-basic.js +1 -7
- package/lib/modules/setting/view.js +11 -4
- package/lib/modules/share-screen/store.base.d.ts +1 -1
- package/lib/modules/share-screen/store.base.js +3 -0
- package/lib/modules/share-screen/store.electron.d.ts +3 -1
- package/lib/modules/share-screen/store.electron.js +130 -23
- package/lib/modules/state-bar/index.css +73 -2
- package/lib/modules/state-bar/main-scene/store.base.d.ts +2 -0
- package/lib/modules/state-bar/main-scene/store.base.js +7 -1
- package/lib/modules/state-bar/main-scene/store.browser.js +1 -1
- package/lib/modules/state-bar/main-scene/store.electron.js +1 -1
- package/lib/modules/state-bar/store.base.d.ts +5 -0
- package/lib/modules/state-bar/store.base.js +29 -2
- package/lib/modules/state-bar/subtitles-history-state.d.ts +7 -0
- package/lib/modules/state-bar/subtitles-history-state.js +108 -0
- package/lib/modules/state-bar/view.js +16 -1
- package/lib/modules/state-bar/waiting-scene/store.base.d.ts +1 -0
- package/lib/modules/state-bar/waiting-scene/store.base.js +5 -0
- package/lib/modules/subtitles-history/components/actions.d.ts +5 -0
- package/lib/modules/subtitles-history/components/actions.js +36 -0
- package/lib/modules/subtitles-history/components/list-item.d.ts +12 -0
- package/lib/modules/subtitles-history/components/list-item.js +105 -0
- package/lib/modules/subtitles-history/components/list.d.ts +10 -0
- package/lib/modules/subtitles-history/components/list.js +182 -0
- package/lib/modules/subtitles-history/components/respond-dialog-content.d.ts +5 -0
- package/lib/modules/subtitles-history/components/respond-dialog-content.js +44 -0
- package/lib/modules/subtitles-history/components/settings/index.css +5 -0
- package/lib/modules/subtitles-history/components/settings/index.d.ts +2 -0
- package/lib/modules/subtitles-history/components/settings/index.js +53 -0
- package/lib/modules/subtitles-history/components/timer.d.ts +3 -0
- package/lib/modules/subtitles-history/components/timer.js +44 -0
- package/lib/modules/subtitles-history/components/title.d.ts +1 -0
- package/lib/modules/subtitles-history/components/title.js +15 -0
- package/lib/modules/subtitles-history/empty.d.ts +2 -0
- package/lib/modules/subtitles-history/empty.js +22 -0
- package/lib/modules/subtitles-history/index.css +129 -0
- package/lib/modules/subtitles-history/index.d.ts +13 -0
- package/lib/modules/subtitles-history/index.js +107 -0
- package/lib/modules/subtitles-history/store.base.d.ts +74 -0
- package/lib/modules/subtitles-history/store.base.js +786 -0
- package/lib/modules/subtitles-history/store.electron.d.ts +15 -0
- package/lib/modules/subtitles-history/store.electron.js +154 -0
- package/lib/modules/subtitles-history/type.d.ts +4 -0
- package/lib/modules/subtitles-history/type.js +6 -0
- package/lib/modules/subtitles-history/view.d.ts +1 -0
- package/lib/modules/subtitles-history/view.js +104 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +2 -2
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +5 -5
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +15 -15
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +21 -21
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +23 -21
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -6
- package/lib/modules/whiteboard/components/toolbar/store.js +14 -15
- package/lib/modules/whiteboard/store.d.ts +2 -3
- package/lib/modules/whiteboard/store.electron.d.ts +2 -0
- package/lib/modules/whiteboard/store.electron.js +35 -0
- package/lib/modules/whiteboard/store.js +14 -2
- package/lib/modules/whiteboard/type.d.ts +0 -35
- package/lib/modules/whiteboard/type.js +1 -26
- package/lib/modules/widget/type.d.ts +3 -66
- package/lib/object-manager.d.ts +3 -1
- package/lib/object-manager.js +2 -0
- package/lib/providers/ability-provider.d.ts +24 -0
- package/lib/providers/ability-provider.js +21 -0
- package/lib/providers/app-list-provider.d.ts +90 -4
- package/lib/providers/app-list-provider.js +157 -13
- package/lib/providers/board-share/bar-control/base.d.ts +4 -5
- package/lib/providers/board-share/bar-control/base.js +4 -4
- package/lib/providers/board-share/bar-control/browser.d.ts +2 -2
- package/lib/providers/board-share/bar-control/electron.d.ts +4 -5
- package/lib/providers/board-share/bar-control/electron.js +2 -0
- package/lib/providers/board-share/provider.base.d.ts +6 -6
- package/lib/providers/board-share/provider.base.js +20 -3
- package/lib/providers/board-share/provider.browser.js +2 -2
- package/lib/providers/board-share/provider.electron.js +1 -2
- package/lib/providers/board-share/type.d.ts +1 -2
- package/lib/providers/device-provider.d.ts +15 -5
- package/lib/providers/device-provider.js +199 -145
- package/lib/providers/dialog/provider.base.js +1 -1
- package/lib/providers/dialog/provider.electron.js +3 -0
- package/lib/providers/interpreter-provider.js +4 -9
- package/lib/providers/multi-display-provider.d.ts +1 -1
- package/lib/providers/privilege-provider.d.ts +241 -139
- package/lib/providers/privilege-provider.js +577 -318
- package/lib/providers/room-provider/waiting-room-control-manager.d.ts +1 -1
- package/lib/providers/screen-share/constant.d.ts +1 -0
- package/lib/providers/screen-share/constant.js +8 -0
- package/lib/providers/screen-share/provider.base.d.ts +20 -7
- package/lib/providers/screen-share/provider.base.js +27 -27
- package/lib/providers/screen-share/provider.browser.js +14 -18
- package/lib/providers/screen-share/provider.electron.d.ts +8 -0
- package/lib/providers/screen-share/provider.electron.js +41 -13
- package/lib/providers/screen-share/strategy/electron.d.ts +2 -1
- package/lib/providers/screen-share/strategy/electron.js +64 -56
- package/lib/providers/screen-share/strategy/type.d.ts +2 -2
- package/lib/providers/screen-share/stream-state-sync.js +5 -3
- package/lib/providers/screen-share/struct.d.ts +14 -4
- package/lib/providers/screen-share/struct.js +16 -5
- package/lib/providers/screen-share/type.d.ts +32 -2
- package/lib/providers/stt-provider/stt-provider.d.ts +89 -0
- package/lib/providers/stt-provider/stt-provider.js +1008 -0
- package/lib/providers/stt-provider/type.d.ts +168 -0
- package/lib/providers/stt-provider/type.js +19 -0
- package/lib/providers/window/main-window.d.ts +1 -0
- package/lib/providers/window/main-window.js +6 -1
- package/lib/providers/window/renderer-window.d.ts +4 -0
- package/lib/providers/window/renderer-window.js +19 -1
- package/lib/providers/window/type.d.ts +4 -0
- package/lib/runtime.d.ts +8 -7
- package/lib/runtime.js +1 -2
- package/lib/scenes/main-scene.js +112 -66
- package/lib/schema.d.ts +70 -8
- package/lib/schema.js +7 -2
- package/lib/shared-data/app-list-data.d.ts +4 -0
- package/lib/shared-data/app-list-data.js +21 -1
- package/lib/shared-data/config.d.ts +5 -1
- package/lib/shared-data/layout-data.d.ts +5 -0
- package/lib/shared-data/layout-data.js +35 -9
- package/lib/shared-data/member-data.d.ts +2 -3
- package/lib/shared-data/screen-share/index.d.ts +0 -2
- package/lib/shared-data/screen-share/index.js +20 -36
- package/lib/shared-data/screen-share/type.d.ts +0 -8
- package/lib/shared-data/security-data.d.ts +4 -0
- package/lib/shared-data/security-data.js +14 -10
- package/lib/shared-data/setting.d.ts +16 -1
- package/lib/shared-data/setting.js +33 -6
- package/lib/shared-data/stt-setting.ts/constant.d.ts +29 -0
- package/lib/shared-data/stt-setting.ts/constant.js +35 -0
- package/lib/shared-data/stt-setting.ts/index.d.ts +67 -0
- package/lib/shared-data/stt-setting.ts/index.js +202 -0
- package/lib/shared-data/stt-setting.ts/type.d.ts +10 -0
- package/lib/shared-data/stt-setting.ts/type.js +14 -0
- package/lib/shared-data/video-window.d.ts +1 -2
- package/lib/shared-data/video-window.js +20 -32
- package/lib/translations/enUS.d.ts +9 -0
- package/lib/translations/enUS.js +21 -4
- package/lib/translations/zhCN.d.ts +9 -0
- package/lib/translations/zhCN.js +21 -4
- package/lib/type.d.ts +20 -15
- package/lib/type.js +1 -0
- package/lib/{ui-scene.d.ts → ui-scene-switch.d.ts} +1 -1
- package/lib/{ui-scene.js → ui-scene-switch.js} +29 -9
- package/lib/utilities/constant.d.ts +6 -2
- package/lib/utilities/constant.js +5 -1
- package/lib/utilities/default-config.d.ts +3 -3
- package/lib/utilities/default-config.js +7 -17
- package/lib/utilities/focus-helper.js +18 -11
- package/lib/utilities/renderer.d.ts +4 -6
- package/lib/utilities/renderer.js +10 -4
- package/lib/utilities/tools.d.ts +1 -0
- package/lib/utilities/tools.js +6 -1
- package/lib/utilities/ui-resources.d.ts +9 -2
- package/lib/utilities/ui-resources.js +36 -12
- package/package.json +11 -6
- package/public/index.html +1 -0
- package/public/meeting-manager.js +23 -9
- package/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/icons/icon.png +0 -0
- package/installer/mac/entitlements.mac.plist +0 -16
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +0 -17
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +0 -5
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +0 -242
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +0 -192
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +0 -4
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -206
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +0 -57
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +0 -5
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -229
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +0 -5
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +0 -68
- package/lib/modules/participant/components/participants/components/participants/index.css +0 -105
- package/lib/modules/participant/components/participants/components/participants/index.d.ts +0 -3
- package/lib/modules/participant/components/participants/components/participants/index.js +0 -117
- package/lib/modules/participant/components/participants/types.d.ts +0 -101
- package/lib/modules/participant/components/participants/types.js +0 -37
- package/lib/modules/setting/config.d.ts +0 -36
- package/lib/modules/setting/config.js +0 -36
- package/lib/modules/widget/sdk.d.ts +0 -30
- package/lib/modules/widget/sdk.js +0 -224
- package/lib/widget-sdk.d.ts +0 -2
- package/lib/widget-sdk.js +0 -13
- /package/public/assets/electron/sound_effects/{pretest.mp3 → speakerTest.mp3} +0 -0
|
@@ -38,7 +38,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
38
38
|
});
|
|
39
39
|
exports.FcrUIPrivilegeProviderImpl = void 0;
|
|
40
40
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
41
|
-
require("core-js/modules/es.array.filter.js");
|
|
42
41
|
require("core-js/modules/es.array.find.js");
|
|
43
42
|
require("core-js/modules/es.array.for-each.js");
|
|
44
43
|
require("core-js/modules/es.array.includes.js");
|
|
@@ -52,7 +51,6 @@ require("core-js/modules/es.string.includes.js");
|
|
|
52
51
|
require("core-js/modules/es.string.iterator.js");
|
|
53
52
|
require("core-js/modules/es.weak-map.js");
|
|
54
53
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
55
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
56
54
|
require("core-js/modules/esnext.iterator.find.js");
|
|
57
55
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
58
56
|
require("core-js/modules/esnext.iterator.some.js");
|
|
@@ -73,13 +71,13 @@ var _mobxUtils = require("mobx-utils");
|
|
|
73
71
|
var _lodash = require("lodash");
|
|
74
72
|
var _user = require("fcr-core/lib/utilities/user");
|
|
75
73
|
var _toast = require("agora-ui-foundation/lib/components/toast");
|
|
76
|
-
var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
|
|
77
74
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
78
75
|
var _type2 = require("fcr-core/lib/room-control/privilege-control/type");
|
|
79
76
|
var _logger = require("../utilities/logger");
|
|
80
77
|
var _imports = require("fcr-core/lib/imports");
|
|
78
|
+
var _type3 = require("fcr-core/lib/room-control/sharing-control/type");
|
|
81
79
|
var _FcrUIPrivilegeProviderImpl;
|
|
82
|
-
var _initProto,
|
|
80
|
+
var _initProto, _init__isWatermarkOperationAllowed, _init__isWatermarkMultiLine, _init_securityInfos, _init_permissionInfos, _init__privilegeOperator, _allowWatermarkDecs, _setAllowWaterMarkLineDecs, _allowJoinWithPromptSoundDecs, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _ref;
|
|
83
81
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
84
82
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
85
83
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -95,7 +93,7 @@ var _B = /*#__PURE__*/new WeakMap();
|
|
|
95
93
|
var _C = /*#__PURE__*/new WeakMap();
|
|
96
94
|
var _D = /*#__PURE__*/new WeakMap();
|
|
97
95
|
var _E = /*#__PURE__*/new WeakMap();
|
|
98
|
-
_ref = (
|
|
96
|
+
_ref = (_allowWatermarkDecs = [_mobx.action, _mobx.action.bound], _setAllowWaterMarkLineDecs = [_mobx.action, _mobx.action.bound], _allowJoinWithPromptSoundDecs = [_mobx.action, _mobx.action.bound], _handlePermissionUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSecurityUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
99
97
|
var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE__*/function () {
|
|
100
98
|
function FcrUIPrivilegeProviderImpl(_privilegeControl, _userControl, _streamControl, _eventProvider) {
|
|
101
99
|
var _this = this;
|
|
@@ -106,24 +104,22 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
106
104
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
107
105
|
(0, _defineProperty2["default"])(this, "_observable", new _imports.AgoraObservable());
|
|
108
106
|
(0, _defineProperty2["default"])(this, "_watermarkLoadingTimber", null);
|
|
109
|
-
_classPrivateFieldInitSpec(this, _A,
|
|
110
|
-
_classPrivateFieldInitSpec(this, _B,
|
|
107
|
+
_classPrivateFieldInitSpec(this, _A, _init__isWatermarkOperationAllowed(this, true));
|
|
108
|
+
_classPrivateFieldInitSpec(this, _B, _init__isWatermarkMultiLine(this, false));
|
|
111
109
|
_classPrivateFieldInitSpec(this, _C, _init_securityInfos(this));
|
|
112
110
|
_classPrivateFieldInitSpec(this, _D, _init_permissionInfos(this));
|
|
113
|
-
_classPrivateFieldInitSpec(this, _E,
|
|
114
|
-
(0, _defineProperty2["default"])(this, "
|
|
115
|
-
|
|
116
|
-
var info = _ref2.info;
|
|
117
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.ChangeName;
|
|
118
|
-
});
|
|
119
|
-
return !!(info !== null && info !== void 0 && info.enable);
|
|
111
|
+
_classPrivateFieldInitSpec(this, _E, _init__privilegeOperator(this));
|
|
112
|
+
(0, _defineProperty2["default"])(this, "isWatermarkOperationAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
113
|
+
return _this._isWatermarkOperationAllowed;
|
|
120
114
|
}));
|
|
121
|
-
(0, _defineProperty2["default"])(this, "
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
115
|
+
(0, _defineProperty2["default"])(this, "isWatermarkMultiLine", (0, _mobxUtils.computedFn)(function () {
|
|
116
|
+
return _this._isWatermarkMultiLine;
|
|
117
|
+
}));
|
|
118
|
+
(0, _defineProperty2["default"])(this, "getPrivilegeOperator", (0, _mobxUtils.computedFn)(function () {
|
|
119
|
+
return _this._privilegeOperator;
|
|
120
|
+
}));
|
|
121
|
+
(0, _defineProperty2["default"])(this, "hasSecurityPermission", (0, _mobxUtils.computedFn)(function () {
|
|
122
|
+
return _this.hasEnableStartScreenSharePermission() || _this.hasPermissionToControlAllowSendAll() || _this.hasEnableStartAudioPermission() || _this.hasEnableChangeNamePermission() || _this.hasEnableStartVideoPermission() || _this.hasLockRoomPermission();
|
|
127
123
|
}));
|
|
128
124
|
(0, _defineProperty2["default"])(this, "getWaterMarkContent", function () {
|
|
129
125
|
return _this._userControl.getWaterMarkContent() || 'Watermark';
|
|
@@ -138,8 +134,70 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
138
134
|
}
|
|
139
135
|
};
|
|
140
136
|
});
|
|
137
|
+
(0, _defineProperty2["default"])(this, "getAllowedOperations", function (targetUserRole, isSelf) {
|
|
138
|
+
var operations = [];
|
|
139
|
+
if (_this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
140
|
+
//请求开启摄像头权限
|
|
141
|
+
operations.push('request_start_video');
|
|
142
|
+
}
|
|
143
|
+
if (_this.hasStartVideoPermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
144
|
+
//开启摄像头权限
|
|
145
|
+
operations.push('start_video');
|
|
146
|
+
}
|
|
147
|
+
if (_this.hasStopVideoPermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
148
|
+
//关闭摄像头权限
|
|
149
|
+
operations.push('stop_video');
|
|
150
|
+
}
|
|
151
|
+
//私聊权限
|
|
152
|
+
operations.push('private_chat');
|
|
153
|
+
operations.push('pin');
|
|
154
|
+
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.HOST)) {
|
|
155
|
+
//设为主持人权限
|
|
156
|
+
operations.push('set_as_host');
|
|
157
|
+
}
|
|
158
|
+
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.COHOST)) {
|
|
159
|
+
//设为联席主持人权限
|
|
160
|
+
operations.push('set_as_co_host');
|
|
161
|
+
}
|
|
162
|
+
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
163
|
+
//撤销联席主持人权限
|
|
164
|
+
operations.push('revoke_co_host');
|
|
165
|
+
}
|
|
166
|
+
if (_this.hasCallMergePermission()) {
|
|
167
|
+
//与视频合并权限
|
|
168
|
+
operations.push('merge_video');
|
|
169
|
+
}
|
|
170
|
+
if (_this.hasKickOutPermission(targetUserRole)) {
|
|
171
|
+
//移除房间权限
|
|
172
|
+
operations.push('kick_out');
|
|
173
|
+
}
|
|
174
|
+
if (_this.hasWaitingRoomPermission(targetUserRole)) {
|
|
175
|
+
operations.push('put_into_waiting_room');
|
|
176
|
+
}
|
|
177
|
+
if (_this.hasChangeNamePermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
178
|
+
operations.push('change_name');
|
|
179
|
+
}
|
|
180
|
+
return operations;
|
|
181
|
+
});
|
|
182
|
+
/**
|
|
183
|
+
* 互译安全开关
|
|
184
|
+
*/
|
|
185
|
+
(0, _defineProperty2["default"])(this, "isChangeSelfNameAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
186
|
+
var info = _this.securityInfos.find(function (_ref2) {
|
|
187
|
+
var info = _ref2.info;
|
|
188
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.ChangeName;
|
|
189
|
+
});
|
|
190
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
191
|
+
}));
|
|
192
|
+
(0, _defineProperty2["default"])(this, "isChatAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
193
|
+
var info = _this.securityInfos.find(function (_ref3) {
|
|
194
|
+
var info = _ref3.info;
|
|
195
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SendChat;
|
|
196
|
+
});
|
|
197
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
198
|
+
}));
|
|
141
199
|
// 允许发送公聊和私聊
|
|
142
|
-
(0, _defineProperty2["default"])(this, "
|
|
200
|
+
(0, _defineProperty2["default"])(this, "isAllChatAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
143
201
|
var info = _this.securityInfos.find(function (_ref4) {
|
|
144
202
|
var info = _ref4.info;
|
|
145
203
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SendChat;
|
|
@@ -147,128 +205,221 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
147
205
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
148
206
|
return !!(!!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && payload["private"].cohost && payload["private"].participant);
|
|
149
207
|
}));
|
|
150
|
-
//
|
|
151
|
-
(0, _defineProperty2["default"])(this, "
|
|
208
|
+
// 禁止发送所有聊天
|
|
209
|
+
(0, _defineProperty2["default"])(this, "isAllChatDisallowed", (0, _mobxUtils.computedFn)(function () {
|
|
152
210
|
var info = _this.securityInfos.find(function (_ref5) {
|
|
153
211
|
var info = _ref5.info;
|
|
154
212
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SendChat;
|
|
155
213
|
});
|
|
156
214
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
157
|
-
return !!(
|
|
215
|
+
return !!(!(info !== null && info !== void 0 && info.enable) || payload && !payload["public"] && !payload["private"].host && !payload["private"].cohost && !payload["private"].participant);
|
|
158
216
|
}));
|
|
159
|
-
//
|
|
160
|
-
(0, _defineProperty2["default"])(this, "
|
|
217
|
+
// 允许发送公聊,禁止发送私聊
|
|
218
|
+
(0, _defineProperty2["default"])(this, "isPublicChatAllowedAndPrivateChatDisallowed", (0, _mobxUtils.computedFn)(function () {
|
|
161
219
|
var info = _this.securityInfos.find(function (_ref6) {
|
|
162
220
|
var info = _ref6.info;
|
|
163
221
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SendChat;
|
|
164
222
|
});
|
|
165
223
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
166
|
-
return !!(!!(info !== null && info !== void 0 && info.enable) && payload &&
|
|
224
|
+
return !!(!!(info !== null && info !== void 0 && info.enable) && payload && payload["public"] && payload["private"].host && !payload["private"].cohost && !payload["private"].participant);
|
|
167
225
|
}));
|
|
168
|
-
//
|
|
169
|
-
(0, _defineProperty2["default"])(this, "
|
|
226
|
+
// 禁止发送公聊,只能私聊给主持人和联席主持人
|
|
227
|
+
(0, _defineProperty2["default"])(this, "isPublicChatAndPrivateChatToParticipantDisallowed", (0, _mobxUtils.computedFn)(function () {
|
|
170
228
|
var info = _this.securityInfos.find(function (_ref7) {
|
|
171
229
|
var info = _ref7.info;
|
|
172
230
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SendChat;
|
|
173
231
|
});
|
|
174
232
|
var payload = info && info.info && _this.convertSendChatPayload(info.info.payload);
|
|
175
|
-
return !!(
|
|
233
|
+
return !!(!!(info !== null && info !== void 0 && info.enable) && payload && !payload["public"] && payload["private"].host && payload["private"].cohost && !payload["private"].participant);
|
|
176
234
|
}));
|
|
177
|
-
(0, _defineProperty2["default"])(this, "
|
|
235
|
+
(0, _defineProperty2["default"])(this, "isJoinWithMutedVideoEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
178
236
|
var info = _this.securityInfos.find(function (_ref8) {
|
|
179
237
|
var info = _ref8.info;
|
|
180
238
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.JoinWithCloseVideo;
|
|
181
239
|
});
|
|
182
240
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
183
241
|
}));
|
|
184
|
-
(0, _defineProperty2["default"])(this, "
|
|
242
|
+
(0, _defineProperty2["default"])(this, "isJoinWithMutedAudioEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
185
243
|
var info = _this.securityInfos.find(function (_ref9) {
|
|
186
244
|
var info = _ref9.info;
|
|
187
245
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.JoinWithMuteAudio;
|
|
188
246
|
});
|
|
189
247
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
190
248
|
}));
|
|
191
|
-
(0, _defineProperty2["default"])(this, "
|
|
249
|
+
(0, _defineProperty2["default"])(this, "isShareScreenAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
250
|
+
var _info$info;
|
|
192
251
|
var info = _this.securityInfos.find(function (_ref0) {
|
|
193
252
|
var info = _ref0.info;
|
|
194
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.
|
|
253
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Sharing;
|
|
195
254
|
});
|
|
196
|
-
|
|
255
|
+
var shareState = info === null || info === void 0 || (_info$info = info.info) === null || _info$info === void 0 ? void 0 : _info$info.payload;
|
|
256
|
+
var screenShareState = (shareState === null || shareState === void 0 ? void 0 : shareState.screen) === _type3.FcrSharePermissionState.ON;
|
|
257
|
+
return screenShareState;
|
|
197
258
|
}));
|
|
198
|
-
(0, _defineProperty2["default"])(this, "
|
|
199
|
-
var _info$
|
|
259
|
+
(0, _defineProperty2["default"])(this, "isBoardStartAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
260
|
+
var _info$info2, _shareState$board;
|
|
200
261
|
var info = _this.securityInfos.find(function (_ref1) {
|
|
201
262
|
var info = _ref1.info;
|
|
202
263
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Sharing;
|
|
203
264
|
});
|
|
204
|
-
var shareState = info === null || info === void 0 || (_info$
|
|
205
|
-
var
|
|
206
|
-
return
|
|
265
|
+
var shareState = info === null || info === void 0 || (_info$info2 = info.info) === null || _info$info2 === void 0 ? void 0 : _info$info2.payload;
|
|
266
|
+
var boardWriteState = (shareState === null || shareState === void 0 || (_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.start) === _type3.FcrSharePermissionState.ON;
|
|
267
|
+
return boardWriteState;
|
|
207
268
|
}));
|
|
208
|
-
(0, _defineProperty2["default"])(this, "
|
|
209
|
-
var _info$
|
|
269
|
+
(0, _defineProperty2["default"])(this, "isBoardWriteAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
270
|
+
var _info$info3, _shareState$board2;
|
|
210
271
|
var info = _this.securityInfos.find(function (_ref10) {
|
|
211
272
|
var info = _ref10.info;
|
|
212
273
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Sharing;
|
|
213
274
|
});
|
|
214
|
-
var shareState = info === null || info === void 0 || (_info$
|
|
215
|
-
var boardWriteState = (shareState === null || shareState === void 0 || (_shareState$
|
|
275
|
+
var shareState = info === null || info === void 0 || (_info$info3 = info.info) === null || _info$info3 === void 0 ? void 0 : _info$info3.payload;
|
|
276
|
+
var boardWriteState = (shareState === null || shareState === void 0 || (_shareState$board2 = shareState.board) === null || _shareState$board2 === void 0 ? void 0 : _shareState$board2.write) === _type3.FcrSharePermissionState.ON;
|
|
216
277
|
return boardWriteState;
|
|
217
278
|
}));
|
|
218
|
-
(0, _defineProperty2["default"])(this, "
|
|
279
|
+
(0, _defineProperty2["default"])(this, "isAnnotationStartAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
219
280
|
var info = _this.securityInfos.find(function (_ref11) {
|
|
220
281
|
var info = _ref11.info;
|
|
221
282
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Annotation;
|
|
222
283
|
});
|
|
223
284
|
var shareState = info === null || info === void 0 ? void 0 : info.payload;
|
|
224
|
-
var annotationWriteState = (shareState === null || shareState === void 0 ? void 0 : shareState.
|
|
285
|
+
var annotationWriteState = (shareState === null || shareState === void 0 ? void 0 : shareState.start) === _type3.FcrSharePermissionState.ON;
|
|
225
286
|
return annotationWriteState;
|
|
226
287
|
}));
|
|
227
|
-
(0, _defineProperty2["default"])(this, "
|
|
288
|
+
(0, _defineProperty2["default"])(this, "isAnnotationWriteAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
228
289
|
var info = _this.securityInfos.find(function (_ref12) {
|
|
229
290
|
var info = _ref12.info;
|
|
230
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.
|
|
291
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Annotation;
|
|
231
292
|
});
|
|
232
|
-
|
|
293
|
+
var shareState = info === null || info === void 0 ? void 0 : info.payload;
|
|
294
|
+
var annotationWriteState = (shareState === null || shareState === void 0 ? void 0 : shareState.write) === _type3.FcrSharePermissionState.ON;
|
|
295
|
+
return annotationWriteState;
|
|
233
296
|
}));
|
|
234
|
-
(0, _defineProperty2["default"])(this, "
|
|
297
|
+
(0, _defineProperty2["default"])(this, "isUnmuteSelfVideoAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
235
298
|
var info = _this.securityInfos.find(function (_ref13) {
|
|
236
299
|
var info = _ref13.info;
|
|
237
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.
|
|
300
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.StartVideo;
|
|
238
301
|
});
|
|
239
302
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
240
303
|
}));
|
|
241
|
-
(0, _defineProperty2["default"])(this, "
|
|
304
|
+
(0, _defineProperty2["default"])(this, "isUnmuteSelfAudioAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
242
305
|
var info = _this.securityInfos.find(function (_ref14) {
|
|
243
306
|
var info = _ref14.info;
|
|
244
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.
|
|
307
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.StartAudio;
|
|
245
308
|
});
|
|
246
309
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
247
310
|
}));
|
|
248
|
-
(0, _defineProperty2["default"])(this, "
|
|
311
|
+
(0, _defineProperty2["default"])(this, "isJoinWithPromptSoundEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
249
312
|
var info = _this.securityInfos.find(function (_ref15) {
|
|
250
313
|
var info = _ref15.info;
|
|
251
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.
|
|
314
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.JoinWithPromptSound;
|
|
252
315
|
});
|
|
253
316
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
254
317
|
}));
|
|
255
|
-
(0, _defineProperty2["default"])(this, "
|
|
318
|
+
(0, _defineProperty2["default"])(this, "isLockRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
256
319
|
var info = _this.securityInfos.find(function (_ref16) {
|
|
257
320
|
var info = _ref16.info;
|
|
321
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.LockedRoom;
|
|
322
|
+
});
|
|
323
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
324
|
+
}));
|
|
325
|
+
(0, _defineProperty2["default"])(this, "isWaitingRoomEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
326
|
+
var info = _this.securityInfos.find(function (_ref17) {
|
|
327
|
+
var info = _ref17.info;
|
|
328
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.WaitingRoom;
|
|
329
|
+
});
|
|
330
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
331
|
+
}));
|
|
332
|
+
(0, _defineProperty2["default"])(this, "isWaterMarkEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
333
|
+
var info = _this.securityInfos.find(function (_ref18) {
|
|
334
|
+
var info = _ref18.info;
|
|
258
335
|
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.WaterMark;
|
|
259
336
|
});
|
|
260
337
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
261
338
|
}));
|
|
339
|
+
(0, _defineProperty2["default"])(this, "isStartCaptionAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
340
|
+
var info = _this.securityInfos.find(function (_ref19) {
|
|
341
|
+
var info = _ref19.info;
|
|
342
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SttStartCaption;
|
|
343
|
+
});
|
|
344
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
345
|
+
}));
|
|
346
|
+
(0, _defineProperty2["default"])(this, "isStartTranscribeAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
347
|
+
var info = _this.securityInfos.find(function (_ref20) {
|
|
348
|
+
var info = _ref20.info;
|
|
349
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SttStartTranscribe;
|
|
350
|
+
});
|
|
351
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
352
|
+
}));
|
|
353
|
+
(0, _defineProperty2["default"])(this, "isSetSourceLanguageAllowed", (0, _mobxUtils.computedFn)(function () {
|
|
354
|
+
var info = _this.securityInfos.find(function (_ref21) {
|
|
355
|
+
var info = _ref21.info;
|
|
356
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.SttSourceLanguage;
|
|
357
|
+
});
|
|
358
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
359
|
+
}));
|
|
360
|
+
(0, _defineProperty2["default"])(this, "isMultiWaterMarkEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
361
|
+
var _info$info4;
|
|
362
|
+
var info = _this.securityInfos.find(function (_ref22) {
|
|
363
|
+
var info = _ref22.info;
|
|
364
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.WaterMark;
|
|
365
|
+
});
|
|
366
|
+
return (info === null || info === void 0 || (_info$info4 = info.info) === null || _info$info4 === void 0 ? void 0 : _info$info4.payload.lineType) === _type.FcrLineType.MULTI_ROW;
|
|
367
|
+
}));
|
|
368
|
+
/**
|
|
369
|
+
* 权限判断,例:某角色有 XX 权限
|
|
370
|
+
*/
|
|
371
|
+
(0, _defineProperty2["default"])(this, "hasChangeNamePermission", function (targetRole) {
|
|
372
|
+
return _this._hasPermission(_type2.FcrPermissionAction.UserChangeName, targetRole);
|
|
373
|
+
});
|
|
262
374
|
(0, _defineProperty2["default"])(this, "hasWaitingRoomPermission", function () {
|
|
263
375
|
var role = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _type2.FcrPrivilegeUserRole.PARTICIPANT;
|
|
264
376
|
return _this._hasPermission(_type2.FcrPermissionAction.WaitingRoomOpen, role);
|
|
265
377
|
});
|
|
378
|
+
(0, _defineProperty2["default"])(this, "hasAllowJoinWithPromptSoundPermission", function () {
|
|
379
|
+
return _this._hasPermission(_type2.FcrPermissionAction.StreamAllowJoinWithPromptSound, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
380
|
+
});
|
|
381
|
+
(0, _defineProperty2["default"])(this, "hasEnableWaitingRoomPermission", function () {
|
|
382
|
+
return _this._hasPermission(_type2.FcrPermissionAction.WaitingRoomOpen, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
383
|
+
});
|
|
266
384
|
(0, _defineProperty2["default"])(this, "hasMutePermission", function (targetRole) {
|
|
267
385
|
return _this._hasPermission(_type2.FcrPermissionAction.StreamMuteAudio, targetRole);
|
|
268
386
|
});
|
|
269
387
|
(0, _defineProperty2["default"])(this, "hasStopScreenSharePermission", function () {
|
|
270
388
|
return _this._hasPermission(_type2.FcrPermissionAction.StreamEnableStartScreenShare, _type2.FcrPrivilegeUserRole.SELF);
|
|
271
389
|
});
|
|
390
|
+
(0, _defineProperty2["default"])(this, "hasEnableCaptionPermission", function () {
|
|
391
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttAllowStartCaption, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
392
|
+
});
|
|
393
|
+
(0, _defineProperty2["default"])(this, "hasDisableCaptionPermission", function () {
|
|
394
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttDisallowStartCaption, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
395
|
+
});
|
|
396
|
+
(0, _defineProperty2["default"])(this, "hasEnableTranscribePermission", function () {
|
|
397
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttAllowStartTranscribe, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
398
|
+
});
|
|
399
|
+
(0, _defineProperty2["default"])(this, "hasDisableTranscribePermission", function () {
|
|
400
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttDisallowStartTranscribe, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
401
|
+
});
|
|
402
|
+
(0, _defineProperty2["default"])(this, "hasEnableSourceLanguagePermission", function () {
|
|
403
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttAllowModifySpeechLanguage, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
404
|
+
});
|
|
405
|
+
(0, _defineProperty2["default"])(this, "hasDisableSourceLanguagePermission", function () {
|
|
406
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttDisallowModifySpeechLanguage, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
407
|
+
});
|
|
408
|
+
(0, _defineProperty2["default"])(this, "hasStartCaptionPermission", function () {
|
|
409
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttStartCaption, _type2.FcrPrivilegeUserRole.SELF);
|
|
410
|
+
});
|
|
411
|
+
(0, _defineProperty2["default"])(this, "hasStopCaptionPermission", function () {
|
|
412
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttStopCaption, _type2.FcrPrivilegeUserRole.SELF);
|
|
413
|
+
});
|
|
414
|
+
(0, _defineProperty2["default"])(this, "hasStartTranscribePermission", function () {
|
|
415
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttStartTranscribe, _type2.FcrPrivilegeUserRole.SELF);
|
|
416
|
+
});
|
|
417
|
+
(0, _defineProperty2["default"])(this, "hasStopTranscribePermission", function () {
|
|
418
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttStopTranscribe, _type2.FcrPrivilegeUserRole.SELF);
|
|
419
|
+
});
|
|
420
|
+
(0, _defineProperty2["default"])(this, "hasSetSourceLanguagePermission", function () {
|
|
421
|
+
return _this._hasPermission(_type2.FcrPermissionAction.SttModifySpeechLanguage, _type2.FcrPrivilegeUserRole.SELF);
|
|
422
|
+
});
|
|
272
423
|
(0, _defineProperty2["default"])(this, "hasUnmutePermission", function (targetRole) {
|
|
273
424
|
return _this._hasPermission(_type2.FcrPermissionAction.StreamStartAudio, targetRole);
|
|
274
425
|
});
|
|
@@ -393,21 +544,15 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
393
544
|
(0, _defineProperty2["default"])(this, "hasWriteBoardPermission", function () {
|
|
394
545
|
return _this._hasPermission(_type2.FcrPermissionAction.BoardWrite, _type2.FcrPrivilegeUserRole.SELF);
|
|
395
546
|
});
|
|
396
|
-
(0, _defineProperty2["default"])(this, "hasAnnotationStartPermission", function () {
|
|
397
|
-
var info = _this.securityInfos.find(function (_ref17) {
|
|
398
|
-
var info = _ref17.info;
|
|
399
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.Annotation;
|
|
400
|
-
});
|
|
401
|
-
var shareState = info === null || info === void 0 ? void 0 : info.payload;
|
|
402
|
-
var annotationStartSecurityInfoState = (shareState === null || shareState === void 0 ? void 0 : shareState.start) === _enums.FcrSharePermissionState.ON;
|
|
403
|
-
return annotationStartSecurityInfoState;
|
|
404
|
-
});
|
|
405
547
|
(0, _defineProperty2["default"])(this, "hasAnnotationAllowWritePermission", function () {
|
|
406
548
|
return _this._hasPermission(_type2.FcrPermissionAction.AnnotationAllowWrite, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
407
549
|
});
|
|
408
550
|
(0, _defineProperty2["default"])(this, "hasAnnotationWritePermission", function () {
|
|
409
551
|
return _this._hasPermission(_type2.FcrPermissionAction.AnnotationWrite, _type2.FcrPrivilegeUserRole.SELF);
|
|
410
552
|
});
|
|
553
|
+
(0, _defineProperty2["default"])(this, "hasAnnotationStartPermission", function () {
|
|
554
|
+
return _this._hasPermission(_type2.FcrPermissionAction.AnnotationStart, _type2.FcrPrivilegeUserRole.SELF);
|
|
555
|
+
});
|
|
411
556
|
(0, _defineProperty2["default"])(this, "hasAllowStartBoardPermission", function () {
|
|
412
557
|
return _this._hasPermission(_type2.FcrPermissionAction.BoardAllowStart, _type2.FcrPrivilegeUserRole.SELF);
|
|
413
558
|
});
|
|
@@ -435,219 +580,333 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
435
580
|
return _this._hasPermission(_type2.FcrPermissionAction.InterpreterStop, _type2.FcrPrivilegeUserRole.SELF);
|
|
436
581
|
});
|
|
437
582
|
(0, _defineProperty2["default"])(this, "hasAllowChangeNamePermission", function () {
|
|
438
|
-
return _this.
|
|
583
|
+
return _this._hasPermission(_type2.FcrPermissionAction.UserAllowChangeName, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
439
584
|
});
|
|
440
585
|
(0, _defineProperty2["default"])(this, "hasDisallowChangeNamePermission", function () {
|
|
441
|
-
return _this.
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
var
|
|
449
|
-
var info = _ref18.info;
|
|
450
|
-
return (info === null || info === void 0 ? void 0 : info.action) === _type2.FcrSecurityAction.WaterMark;
|
|
451
|
-
});
|
|
452
|
-
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;
|
|
453
|
-
}));
|
|
454
|
-
(0, _defineProperty2["default"])(this, "getAllowedOperations", function (targetUserRole, isSelf) {
|
|
455
|
-
var operations = [];
|
|
456
|
-
if (_this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
457
|
-
//请求开启摄像头权限
|
|
458
|
-
operations.push('request_start_video');
|
|
459
|
-
}
|
|
460
|
-
if (_this.hasStartVideoPermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
461
|
-
//开启摄像头权限
|
|
462
|
-
operations.push('start_video');
|
|
463
|
-
}
|
|
464
|
-
if (_this.hasStopVideoPermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
465
|
-
//关闭摄像头权限
|
|
466
|
-
operations.push('stop_video');
|
|
467
|
-
}
|
|
468
|
-
//私聊权限
|
|
469
|
-
operations.push('private_chat');
|
|
470
|
-
operations.push('pin');
|
|
471
|
-
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.HOST)) {
|
|
472
|
-
//设为主持人权限
|
|
473
|
-
operations.push('set_as_host');
|
|
474
|
-
}
|
|
475
|
-
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.COHOST)) {
|
|
476
|
-
//设为联席主持人权限
|
|
477
|
-
operations.push('set_as_co_host');
|
|
478
|
-
}
|
|
479
|
-
if (_this.hasSetRolePermission(targetUserRole, _type2.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
480
|
-
//撤销联席主持人权限
|
|
481
|
-
operations.push('revoke_co_host');
|
|
482
|
-
}
|
|
483
|
-
if (_this.hasCallMergePermission()) {
|
|
484
|
-
//与视频合并权限
|
|
485
|
-
operations.push('merge_video');
|
|
486
|
-
}
|
|
487
|
-
if (_this.hasKickOutPermission(targetUserRole)) {
|
|
488
|
-
//移除房间权限
|
|
489
|
-
operations.push('kick_out');
|
|
490
|
-
}
|
|
491
|
-
if (_this.hasWaitingRoomPermission(targetUserRole)) {
|
|
492
|
-
operations.push('put_into_waiting_room');
|
|
493
|
-
}
|
|
494
|
-
if (_this.hasChangeNamePermission(isSelf ? _type2.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
495
|
-
operations.push('change_name');
|
|
496
|
-
}
|
|
497
|
-
return operations;
|
|
498
|
-
});
|
|
499
|
-
(0, _defineProperty2["default"])(this, "allowShareAndWrite", /*#__PURE__*/function () {
|
|
500
|
-
var _ref19 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
501
|
-
var enable;
|
|
586
|
+
return _this._hasPermission(_type2.FcrPermissionAction.UserDisallowChangeName, _type2.FcrPrivilegeUserRole.PARTICIPANT);
|
|
587
|
+
});
|
|
588
|
+
/**
|
|
589
|
+
* 权限操作
|
|
590
|
+
* @param enable
|
|
591
|
+
*/
|
|
592
|
+
(0, _defineProperty2["default"])(this, "allowStartTranscribe", /*#__PURE__*/function () {
|
|
593
|
+
var _ref23 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(enable) {
|
|
502
594
|
return _regenerator["default"].wrap(function (_context) {
|
|
503
595
|
while (1) switch (_context.prev = _context.next) {
|
|
504
596
|
case 0:
|
|
505
|
-
|
|
506
|
-
_context.next = 1;
|
|
507
|
-
return _this._privilegeControl.allowShareAndWrite(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
597
|
+
return _context.abrupt("return", _this._privilegeControl.allowStartTranscribing(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
508
598
|
case 1:
|
|
509
|
-
return _context.abrupt("return", _context.sent);
|
|
510
|
-
case 2:
|
|
511
599
|
case "end":
|
|
512
600
|
return _context.stop();
|
|
513
601
|
}
|
|
514
602
|
}, _callee);
|
|
515
603
|
}));
|
|
516
604
|
return function (_x) {
|
|
517
|
-
return
|
|
605
|
+
return _ref23.apply(this, arguments);
|
|
518
606
|
};
|
|
519
607
|
}());
|
|
520
|
-
(0, _defineProperty2["default"])(this, "
|
|
521
|
-
var
|
|
608
|
+
(0, _defineProperty2["default"])(this, "allowSetSourceLanguage", /*#__PURE__*/function () {
|
|
609
|
+
var _ref24 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(enable) {
|
|
522
610
|
return _regenerator["default"].wrap(function (_context2) {
|
|
523
611
|
while (1) switch (_context2.prev = _context2.next) {
|
|
524
612
|
case 0:
|
|
525
|
-
_context2.
|
|
526
|
-
return _this._privilegeControl.allowWriteAnnotation(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
613
|
+
return _context2.abrupt("return", _this._privilegeControl.allowUpdateSttSourceLanguage(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
527
614
|
case 1:
|
|
528
|
-
return _context2.abrupt("return", _context2.sent);
|
|
529
|
-
case 2:
|
|
530
615
|
case "end":
|
|
531
616
|
return _context2.stop();
|
|
532
617
|
}
|
|
533
618
|
}, _callee2);
|
|
534
619
|
}));
|
|
535
620
|
return function (_x2) {
|
|
536
|
-
return
|
|
621
|
+
return _ref24.apply(this, arguments);
|
|
537
622
|
};
|
|
538
623
|
}());
|
|
539
|
-
(0, _defineProperty2["default"])(this, "
|
|
540
|
-
var
|
|
541
|
-
var enable;
|
|
624
|
+
(0, _defineProperty2["default"])(this, "allowStartCaption", /*#__PURE__*/function () {
|
|
625
|
+
var _ref25 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(enable) {
|
|
542
626
|
return _regenerator["default"].wrap(function (_context3) {
|
|
543
627
|
while (1) switch (_context3.prev = _context3.next) {
|
|
544
628
|
case 0:
|
|
545
|
-
|
|
546
|
-
_context3.next = 1;
|
|
547
|
-
return _this._privilegeControl.allowWriteBoard(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
629
|
+
return _context3.abrupt("return", _this._privilegeControl.allowStartCaption(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
548
630
|
case 1:
|
|
549
|
-
return _context3.abrupt("return", _context3.sent);
|
|
550
|
-
case 2:
|
|
551
631
|
case "end":
|
|
552
632
|
return _context3.stop();
|
|
553
633
|
}
|
|
554
634
|
}, _callee3);
|
|
555
635
|
}));
|
|
556
636
|
return function (_x3) {
|
|
557
|
-
return
|
|
637
|
+
return _ref25.apply(this, arguments);
|
|
638
|
+
};
|
|
639
|
+
}());
|
|
640
|
+
(0, _defineProperty2["default"])(this, "allowWriteAnnotation", /*#__PURE__*/function () {
|
|
641
|
+
var _ref26 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(allow) {
|
|
642
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
643
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
644
|
+
case 0:
|
|
645
|
+
return _context4.abrupt("return", _this._privilegeControl.allowWriteAnnotation(allow, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
646
|
+
case 1:
|
|
647
|
+
case "end":
|
|
648
|
+
return _context4.stop();
|
|
649
|
+
}
|
|
650
|
+
}, _callee4);
|
|
651
|
+
}));
|
|
652
|
+
return function (_x4) {
|
|
653
|
+
return _ref26.apply(this, arguments);
|
|
654
|
+
};
|
|
655
|
+
}());
|
|
656
|
+
(0, _defineProperty2["default"])(this, "allowWriteBoard", /*#__PURE__*/function () {
|
|
657
|
+
var _ref27 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(allow) {
|
|
658
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
659
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
660
|
+
case 0:
|
|
661
|
+
return _context5.abrupt("return", _this._privilegeControl.allowWriteBoard(allow, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
662
|
+
case 1:
|
|
663
|
+
case "end":
|
|
664
|
+
return _context5.stop();
|
|
665
|
+
}
|
|
666
|
+
}, _callee5);
|
|
667
|
+
}));
|
|
668
|
+
return function (_x5) {
|
|
669
|
+
return _ref27.apply(this, arguments);
|
|
558
670
|
};
|
|
559
671
|
}());
|
|
560
672
|
//全体静音
|
|
561
|
-
(0, _defineProperty2["default"])(this, "muteAll", function () {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
673
|
+
(0, _defineProperty2["default"])(this, "muteAll", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
674
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
675
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
676
|
+
case 0:
|
|
677
|
+
return _context6.abrupt("return", _this._streamControl.updatePublishPrivilegeOfStreams({
|
|
678
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
679
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
680
|
+
}, {
|
|
681
|
+
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
682
|
+
targetRoleTypeIsInclude: true
|
|
683
|
+
}));
|
|
684
|
+
case 1:
|
|
685
|
+
case "end":
|
|
686
|
+
return _context6.stop();
|
|
687
|
+
}
|
|
688
|
+
}, _callee6);
|
|
689
|
+
})));
|
|
570
690
|
//要求所有人解除静音
|
|
571
|
-
(0, _defineProperty2["default"])(this, "unmuteAll", function () {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
});
|
|
586
|
-
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function (enable) {
|
|
587
|
-
_this._privilegeControl.allowChangeUserName(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
588
|
-
});
|
|
589
|
-
//设置是否允许聊天
|
|
590
|
-
(0, _defineProperty2["default"])(this, "setAllowChat", function (enable) {
|
|
591
|
-
var payload = {
|
|
592
|
-
"public": enable,
|
|
593
|
-
"private": {
|
|
594
|
-
host: enable,
|
|
595
|
-
cohost: enable,
|
|
596
|
-
participant: enable
|
|
691
|
+
(0, _defineProperty2["default"])(this, "unmuteAll", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
692
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
693
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
694
|
+
case 0:
|
|
695
|
+
return _context7.abrupt("return", _this._streamControl.updatePublishPrivilegeOfStreams({
|
|
696
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
697
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
698
|
+
}, {
|
|
699
|
+
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
700
|
+
targetRoleTypeIsInclude: true
|
|
701
|
+
}));
|
|
702
|
+
case 1:
|
|
703
|
+
case "end":
|
|
704
|
+
return _context7.stop();
|
|
597
705
|
}
|
|
706
|
+
}, _callee7);
|
|
707
|
+
})));
|
|
708
|
+
(0, _defineProperty2["default"])(this, "enableLockedRoom", /*#__PURE__*/function () {
|
|
709
|
+
var _ref30 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(enable) {
|
|
710
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
711
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
712
|
+
case 0:
|
|
713
|
+
return _context8.abrupt("return", _this._privilegeControl.enableLockedRoom(enable, [_type2.FcrPrivilegeUserRole.COHOST, _type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
714
|
+
case 1:
|
|
715
|
+
case "end":
|
|
716
|
+
return _context8.stop();
|
|
717
|
+
}
|
|
718
|
+
}, _callee8);
|
|
719
|
+
}));
|
|
720
|
+
return function (_x6) {
|
|
721
|
+
return _ref30.apply(this, arguments);
|
|
598
722
|
};
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
723
|
+
}());
|
|
724
|
+
(0, _defineProperty2["default"])(this, "allowChangeUserName", /*#__PURE__*/function () {
|
|
725
|
+
var _ref31 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(enable) {
|
|
726
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
727
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
728
|
+
case 0:
|
|
729
|
+
return _context9.abrupt("return", _this._privilegeControl.allowChangeUserName(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
730
|
+
case 1:
|
|
731
|
+
case "end":
|
|
732
|
+
return _context9.stop();
|
|
733
|
+
}
|
|
734
|
+
}, _callee9);
|
|
735
|
+
}));
|
|
736
|
+
return function (_x7) {
|
|
737
|
+
return _ref31.apply(this, arguments);
|
|
738
|
+
};
|
|
739
|
+
}());
|
|
740
|
+
//设置是否允许聊天
|
|
741
|
+
(0, _defineProperty2["default"])(this, "setAllowChat", /*#__PURE__*/function () {
|
|
742
|
+
var _ref32 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(enable) {
|
|
743
|
+
var payload;
|
|
744
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
745
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
746
|
+
case 0:
|
|
747
|
+
payload = {
|
|
748
|
+
"public": enable,
|
|
749
|
+
"private": {
|
|
750
|
+
host: enable,
|
|
751
|
+
cohost: enable,
|
|
752
|
+
participant: enable
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
return _context0.abrupt("return", _this._privilegeControl.allowSendChat(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT], payload));
|
|
756
|
+
case 1:
|
|
757
|
+
case "end":
|
|
758
|
+
return _context0.stop();
|
|
759
|
+
}
|
|
760
|
+
}, _callee0);
|
|
761
|
+
}));
|
|
762
|
+
return function (_x8) {
|
|
763
|
+
return _ref32.apply(this, arguments);
|
|
764
|
+
};
|
|
765
|
+
}());
|
|
766
|
+
(0, _defineProperty2["default"])(this, "setAllowChatWithPayload", /*#__PURE__*/function () {
|
|
767
|
+
var _ref33 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(enable, payload) {
|
|
768
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
769
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
770
|
+
case 0:
|
|
771
|
+
return _context1.abrupt("return", _this._privilegeControl.allowSendChat(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT], payload));
|
|
772
|
+
case 1:
|
|
773
|
+
case "end":
|
|
774
|
+
return _context1.stop();
|
|
775
|
+
}
|
|
776
|
+
}, _callee1);
|
|
777
|
+
}));
|
|
778
|
+
return function (_x9, _x0) {
|
|
779
|
+
return _ref33.apply(this, arguments);
|
|
780
|
+
};
|
|
781
|
+
}());
|
|
604
782
|
//设置成允许公聊但不允许私聊
|
|
605
|
-
(0, _defineProperty2["default"])(this, "setAllowedPublicChatAndDisallowedPrivateChat", function () {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
783
|
+
(0, _defineProperty2["default"])(this, "setAllowedPublicChatAndDisallowedPrivateChat", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
784
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
785
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
786
|
+
case 0:
|
|
787
|
+
return _context10.abrupt("return", _this.setAllowChatWithPayload(true, {
|
|
788
|
+
"public": true,
|
|
789
|
+
"private": {
|
|
790
|
+
host: true,
|
|
791
|
+
cohost: false,
|
|
792
|
+
participant: false
|
|
793
|
+
}
|
|
794
|
+
}));
|
|
795
|
+
case 1:
|
|
796
|
+
case "end":
|
|
797
|
+
return _context10.stop();
|
|
612
798
|
}
|
|
613
|
-
});
|
|
614
|
-
});
|
|
799
|
+
}, _callee10);
|
|
800
|
+
})));
|
|
615
801
|
//设置成不允许公聊,只允许私聊给主持人和联席主持人
|
|
616
|
-
(0, _defineProperty2["default"])(this, "setDisallowedPublicChatAndDisallowedPrivateChatToParticipant", function () {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
802
|
+
(0, _defineProperty2["default"])(this, "setDisallowedPublicChatAndDisallowedPrivateChatToParticipant", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
803
|
+
return _regenerator["default"].wrap(function (_context11) {
|
|
804
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
805
|
+
case 0:
|
|
806
|
+
return _context11.abrupt("return", _this.setAllowChatWithPayload(true, {
|
|
807
|
+
"public": false,
|
|
808
|
+
"private": {
|
|
809
|
+
host: true,
|
|
810
|
+
cohost: true,
|
|
811
|
+
participant: false
|
|
812
|
+
}
|
|
813
|
+
}));
|
|
814
|
+
case 1:
|
|
815
|
+
case "end":
|
|
816
|
+
return _context11.stop();
|
|
623
817
|
}
|
|
624
|
-
});
|
|
625
|
-
});
|
|
818
|
+
}, _callee11);
|
|
819
|
+
})));
|
|
626
820
|
//所有人加入会议时静音
|
|
627
|
-
(0, _defineProperty2["default"])(this, "
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
821
|
+
(0, _defineProperty2["default"])(this, "allowJoinWithMutedAudio", /*#__PURE__*/function () {
|
|
822
|
+
var _ref36 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12(enable) {
|
|
823
|
+
return _regenerator["default"].wrap(function (_context12) {
|
|
824
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
825
|
+
case 0:
|
|
826
|
+
_this._privilegeControl.allowJoinWithMutedAudio(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT, _type2.FcrPrivilegeUserRole.COHOST]);
|
|
827
|
+
case 1:
|
|
828
|
+
case "end":
|
|
829
|
+
return _context12.stop();
|
|
830
|
+
}
|
|
831
|
+
}, _callee12);
|
|
832
|
+
}));
|
|
833
|
+
return function (_x1) {
|
|
834
|
+
return _ref36.apply(this, arguments);
|
|
835
|
+
};
|
|
836
|
+
}());
|
|
837
|
+
(0, _defineProperty2["default"])(this, "allowJoinWithMutedVideo", /*#__PURE__*/function () {
|
|
838
|
+
var _ref37 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13(enable) {
|
|
839
|
+
return _regenerator["default"].wrap(function (_context13) {
|
|
840
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
841
|
+
case 0:
|
|
842
|
+
_this._privilegeControl.allowJoinWithMutedVideo(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT, _type2.FcrPrivilegeUserRole.COHOST]);
|
|
843
|
+
case 1:
|
|
844
|
+
case "end":
|
|
845
|
+
return _context13.stop();
|
|
846
|
+
}
|
|
847
|
+
}, _callee13);
|
|
848
|
+
}));
|
|
849
|
+
return function (_x10) {
|
|
850
|
+
return _ref37.apply(this, arguments);
|
|
851
|
+
};
|
|
852
|
+
}());
|
|
633
853
|
//允许屏幕共享
|
|
634
|
-
(0, _defineProperty2["default"])(this, "
|
|
635
|
-
|
|
636
|
-
|
|
854
|
+
(0, _defineProperty2["default"])(this, "allowShareAndWrite", /*#__PURE__*/function () {
|
|
855
|
+
var _ref38 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14(state) {
|
|
856
|
+
return _regenerator["default"].wrap(function (_context14) {
|
|
857
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
858
|
+
case 0:
|
|
859
|
+
_this._privilegeControl.allowShareAndWrite(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
860
|
+
case 1:
|
|
861
|
+
case "end":
|
|
862
|
+
return _context14.stop();
|
|
863
|
+
}
|
|
864
|
+
}, _callee14);
|
|
865
|
+
}));
|
|
866
|
+
return function (_x11) {
|
|
867
|
+
return _ref38.apply(this, arguments);
|
|
868
|
+
};
|
|
869
|
+
}());
|
|
637
870
|
//允许开启视频
|
|
638
|
-
(0, _defineProperty2["default"])(this, "
|
|
639
|
-
|
|
640
|
-
|
|
871
|
+
(0, _defineProperty2["default"])(this, "allowStartVideo", /*#__PURE__*/function () {
|
|
872
|
+
var _ref39 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15(enable) {
|
|
873
|
+
return _regenerator["default"].wrap(function (_context15) {
|
|
874
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
875
|
+
case 0:
|
|
876
|
+
return _context15.abrupt("return", _this._privilegeControl.allowStartVideo(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
877
|
+
case 1:
|
|
878
|
+
case "end":
|
|
879
|
+
return _context15.stop();
|
|
880
|
+
}
|
|
881
|
+
}, _callee15);
|
|
882
|
+
}));
|
|
883
|
+
return function (_x12) {
|
|
884
|
+
return _ref39.apply(this, arguments);
|
|
885
|
+
};
|
|
886
|
+
}());
|
|
641
887
|
//允许自我解除静音
|
|
642
|
-
(0, _defineProperty2["default"])(this, "
|
|
643
|
-
|
|
644
|
-
|
|
888
|
+
(0, _defineProperty2["default"])(this, "allowStartAudio", /*#__PURE__*/function () {
|
|
889
|
+
var _ref40 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16(enable) {
|
|
890
|
+
return _regenerator["default"].wrap(function (_context16) {
|
|
891
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
892
|
+
case 0:
|
|
893
|
+
return _context16.abrupt("return", _this._privilegeControl.allowStartAudio(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
894
|
+
case 1:
|
|
895
|
+
case "end":
|
|
896
|
+
return _context16.stop();
|
|
897
|
+
}
|
|
898
|
+
}, _callee16);
|
|
899
|
+
}));
|
|
900
|
+
return function (_x13) {
|
|
901
|
+
return _ref40.apply(this, arguments);
|
|
902
|
+
};
|
|
903
|
+
}());
|
|
645
904
|
(0, _defineProperty2["default"])(this, "_hasPermission", (0, _mobxUtils.computedFn)(function (action, targetRole) {
|
|
646
905
|
var _this$permissionInfos;
|
|
647
906
|
var convertedRole = targetRole === _type2.FcrPrivilegeUserRole.SELF ? [_this._localUser.userRole, _type2.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
648
|
-
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (
|
|
907
|
+
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (_ref41) {
|
|
649
908
|
var _info$targetRoles;
|
|
650
|
-
var info =
|
|
909
|
+
var info = _ref41.info;
|
|
651
910
|
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) {
|
|
652
911
|
var _info$targetRoles2;
|
|
653
912
|
return info === null || info === void 0 || (_info$targetRoles2 = info.targetRoles) === null || _info$targetRoles2 === void 0 ? void 0 : _info$targetRoles2.includes(role);
|
|
@@ -663,9 +922,9 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
663
922
|
return _params && _params[key].includes(params[key]);
|
|
664
923
|
});
|
|
665
924
|
};
|
|
666
|
-
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (
|
|
925
|
+
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (_ref42) {
|
|
667
926
|
var _info$targetRoles3, _info$params;
|
|
668
|
-
var info =
|
|
927
|
+
var info = _ref42.info;
|
|
669
928
|
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) {
|
|
670
929
|
var _info$targetRoles4;
|
|
671
930
|
return info === null || info === void 0 || (_info$targetRoles4 = info.targetRoles) === null || _info$targetRoles4 === void 0 ? void 0 : _info$targetRoles4.includes(role);
|
|
@@ -690,14 +949,14 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
690
949
|
onLocalUserPermissionInfoDeleted: this._handlePermissionUpdated.bind(this),
|
|
691
950
|
onSecurityInfoUpdated: this._handleSecurityUpdated.bind(this)
|
|
692
951
|
};
|
|
693
|
-
this.
|
|
952
|
+
this._isWatermarkMultiLine = this.isMultiWaterMarkEnabled();
|
|
694
953
|
this._userControl.addObserver(userObserver);
|
|
695
954
|
this._privilegeControl.addObserver(privilegeObserver);
|
|
696
955
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
697
|
-
return _this.
|
|
698
|
-
}, function (
|
|
699
|
-
_this.
|
|
700
|
-
_this.
|
|
956
|
+
return _this.isMultiWaterMarkEnabled();
|
|
957
|
+
}, function (isMultiWaterMarkEnabled) {
|
|
958
|
+
_this._isWatermarkOperationAllowed = true;
|
|
959
|
+
_this._isWatermarkMultiLine = isMultiWaterMarkEnabled;
|
|
701
960
|
}));
|
|
702
961
|
this._disposers.push(function () {
|
|
703
962
|
_this._userControl.removeObserver(userObserver);
|
|
@@ -705,7 +964,7 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
705
964
|
});
|
|
706
965
|
}
|
|
707
966
|
return (0, _createClass2["default"])(FcrUIPrivilegeProviderImpl, [{
|
|
708
|
-
key: "
|
|
967
|
+
key: "_isWatermarkOperationAllowed",
|
|
709
968
|
get: function get() {
|
|
710
969
|
return _classPrivateFieldGet(_A, this);
|
|
711
970
|
},
|
|
@@ -713,7 +972,7 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
713
972
|
_classPrivateFieldSet(_A, this, v);
|
|
714
973
|
}
|
|
715
974
|
}, {
|
|
716
|
-
key: "
|
|
975
|
+
key: "_isWatermarkMultiLine",
|
|
717
976
|
get: function get() {
|
|
718
977
|
return _classPrivateFieldGet(_B, this);
|
|
719
978
|
},
|
|
@@ -737,18 +996,13 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
737
996
|
_classPrivateFieldSet(_D, this, v);
|
|
738
997
|
}
|
|
739
998
|
}, {
|
|
740
|
-
key: "
|
|
999
|
+
key: "_privilegeOperator",
|
|
741
1000
|
get: function get() {
|
|
742
1001
|
return _classPrivateFieldGet(_E, this);
|
|
743
1002
|
},
|
|
744
1003
|
set: function set(v) {
|
|
745
1004
|
_classPrivateFieldSet(_E, this, v);
|
|
746
1005
|
}
|
|
747
|
-
}, {
|
|
748
|
-
key: "hasSecurityPermission",
|
|
749
|
-
get: function get() {
|
|
750
|
-
return this.hasEnableStartScreenSharePermission() || this.hasPermissionToControlAllowSendAll() || this.hasEnableStartAudioPermission() || this.hasEnableChangeNamePermission() || this.hasEnableStartVideoPermission() || this.hasLockRoomPermission();
|
|
751
|
-
}
|
|
752
1006
|
}, {
|
|
753
1007
|
key: "addObserver",
|
|
754
1008
|
value: function addObserver(observer) {
|
|
@@ -775,26 +1029,74 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
775
1029
|
this._disposers = [];
|
|
776
1030
|
}
|
|
777
1031
|
}, {
|
|
778
|
-
key: "
|
|
779
|
-
value: function
|
|
780
|
-
|
|
781
|
-
|
|
1032
|
+
key: "allowWatermark",
|
|
1033
|
+
value: function () {
|
|
1034
|
+
var _allowWatermark = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17(state, lineType) {
|
|
1035
|
+
return _regenerator["default"].wrap(function (_context17) {
|
|
1036
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1037
|
+
case 0:
|
|
1038
|
+
return _context17.abrupt("return", this._privilegeControl.allowWatermark(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT], lineType));
|
|
1039
|
+
case 1:
|
|
1040
|
+
case "end":
|
|
1041
|
+
return _context17.stop();
|
|
1042
|
+
}
|
|
1043
|
+
}, _callee17, this);
|
|
1044
|
+
}));
|
|
1045
|
+
function allowWatermark(_x14, _x15) {
|
|
1046
|
+
return _allowWatermark.apply(this, arguments);
|
|
1047
|
+
}
|
|
1048
|
+
return allowWatermark;
|
|
1049
|
+
}()
|
|
782
1050
|
}, {
|
|
783
|
-
key: "
|
|
784
|
-
value: function
|
|
785
|
-
|
|
786
|
-
var
|
|
787
|
-
return ((
|
|
788
|
-
|
|
789
|
-
|
|
1051
|
+
key: "setAllowWaterMarkLine",
|
|
1052
|
+
value: function () {
|
|
1053
|
+
var _setAllowWaterMarkLine = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18(state, lineType) {
|
|
1054
|
+
var _this2 = this;
|
|
1055
|
+
return _regenerator["default"].wrap(function (_context18) {
|
|
1056
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1057
|
+
case 0:
|
|
1058
|
+
if (this._watermarkLoadingTimber) {
|
|
1059
|
+
_context18.next = 1;
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1062
|
+
this._isWatermarkMultiLine = !this._isWatermarkMultiLine;
|
|
1063
|
+
this._isWatermarkOperationAllowed = false;
|
|
1064
|
+
this._watermarkLoadingTimber = setTimeout(function () {
|
|
1065
|
+
_this2._isWatermarkOperationAllowed = true;
|
|
1066
|
+
_this2._watermarkLoadingTimber && clearTimeout(_this2._watermarkLoadingTimber);
|
|
1067
|
+
_this2._watermarkLoadingTimber = null;
|
|
1068
|
+
}, 1000);
|
|
1069
|
+
return _context18.abrupt("return", this._privilegeControl.allowWatermark(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT], lineType));
|
|
1070
|
+
case 1:
|
|
1071
|
+
case "end":
|
|
1072
|
+
return _context18.stop();
|
|
1073
|
+
}
|
|
1074
|
+
}, _callee18, this);
|
|
1075
|
+
}));
|
|
1076
|
+
function setAllowWaterMarkLine(_x16, _x17) {
|
|
1077
|
+
return _setAllowWaterMarkLine.apply(this, arguments);
|
|
1078
|
+
}
|
|
1079
|
+
return setAllowWaterMarkLine;
|
|
1080
|
+
}()
|
|
790
1081
|
}, {
|
|
791
|
-
key: "
|
|
792
|
-
value: function
|
|
793
|
-
var
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
1082
|
+
key: "allowJoinWithPromptSound",
|
|
1083
|
+
value: function () {
|
|
1084
|
+
var _allowJoinWithPromptSound = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19(enable) {
|
|
1085
|
+
return _regenerator["default"].wrap(function (_context19) {
|
|
1086
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1087
|
+
case 0:
|
|
1088
|
+
return _context19.abrupt("return", this._privilegeControl.allowJoinWithPromptSound(enable, [_type2.FcrPrivilegeUserRole.PARTICIPANT]));
|
|
1089
|
+
case 1:
|
|
1090
|
+
case "end":
|
|
1091
|
+
return _context19.stop();
|
|
1092
|
+
}
|
|
1093
|
+
}, _callee19, this);
|
|
1094
|
+
}));
|
|
1095
|
+
function allowJoinWithPromptSound(_x18) {
|
|
1096
|
+
return _allowJoinWithPromptSound.apply(this, arguments);
|
|
1097
|
+
}
|
|
1098
|
+
return allowJoinWithPromptSound;
|
|
1099
|
+
}()
|
|
798
1100
|
}, {
|
|
799
1101
|
key: "permitPrivateChat",
|
|
800
1102
|
value: function permitPrivateChat(userId) {
|
|
@@ -814,19 +1116,19 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
814
1116
|
};
|
|
815
1117
|
var needToast = false;
|
|
816
1118
|
// 禁止所有聊天
|
|
817
|
-
if (!this.
|
|
1119
|
+
if (!this.isChatAllowed() || this.isAllChatDisallowed()) {
|
|
818
1120
|
needToast = true;
|
|
819
1121
|
}
|
|
820
1122
|
var _targetUserRole = (_this$_userControl$ge2 = this._userControl.getUser(userId)) === null || _this$_userControl$ge2 === void 0 ? void 0 : _this$_userControl$ge2.userRole;
|
|
821
1123
|
|
|
822
1124
|
// 公聊但允许私聊主持人和联席主持人
|
|
823
|
-
if (this.
|
|
1125
|
+
if (this.isPublicChatAllowedAndPrivateChatDisallowed() && _targetUserRole === _type.FcrUserRole.PARTICIPANT) {
|
|
824
1126
|
toastObj.toastProps.content = (0, _i18n.transI18n)('fmt_settings_tips_groupchatonly');
|
|
825
1127
|
needToast = true;
|
|
826
1128
|
}
|
|
827
1129
|
|
|
828
1130
|
// 仅允许私聊主持人和联席主持人
|
|
829
|
-
if (this.
|
|
1131
|
+
if (this.isPublicChatAndPrivateChatToParticipantDisallowed() && _targetUserRole === _type.FcrUserRole.PARTICIPANT) {
|
|
830
1132
|
toastObj.toastProps.content = (0, _i18n.transI18n)('fmt_settings_tips_hostchatonly');
|
|
831
1133
|
needToast = true;
|
|
832
1134
|
}
|
|
@@ -839,70 +1141,27 @@ var FcrUIPrivilegeProviderImpl = exports.FcrUIPrivilegeProviderImpl = /*#__PURE_
|
|
|
839
1141
|
return true;
|
|
840
1142
|
}
|
|
841
1143
|
}, {
|
|
842
|
-
key: "
|
|
843
|
-
value: function () {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
847
|
-
case 0:
|
|
848
|
-
_context4.next = 1;
|
|
849
|
-
return this._privilegeControl.allowWatermark(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT], lineType);
|
|
850
|
-
case 1:
|
|
851
|
-
return _context4.abrupt("return", _context4.sent);
|
|
852
|
-
case 2:
|
|
853
|
-
case "end":
|
|
854
|
-
return _context4.stop();
|
|
855
|
-
}
|
|
856
|
-
}, _callee4, this);
|
|
857
|
-
}));
|
|
858
|
-
function setAllowWaterMark(_x4, _x5) {
|
|
859
|
-
return _setAllowWaterMark.apply(this, arguments);
|
|
860
|
-
}
|
|
861
|
-
return setAllowWaterMark;
|
|
862
|
-
}()
|
|
1144
|
+
key: "_handlePermissionUpdated",
|
|
1145
|
+
value: function _handlePermissionUpdated() {
|
|
1146
|
+
this.permissionInfos = this._privilegeControl.getAllLocalUserPermissionInfo() || [];
|
|
1147
|
+
}
|
|
863
1148
|
}, {
|
|
864
|
-
key: "
|
|
865
|
-
value: function () {
|
|
866
|
-
var
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if (this._watermarkLoadingTimber) {
|
|
872
|
-
_context5.next = 2;
|
|
873
|
-
break;
|
|
874
|
-
}
|
|
875
|
-
this.targetLoadingWatermarkLineTypeIsMulti = !this.targetLoadingWatermarkLineTypeIsMulti;
|
|
876
|
-
this.canOperateWatermark = false;
|
|
877
|
-
this._watermarkLoadingTimber = setTimeout(function () {
|
|
878
|
-
_this2.canOperateWatermark = true;
|
|
879
|
-
_this2._watermarkLoadingTimber && clearTimeout(_this2._watermarkLoadingTimber);
|
|
880
|
-
_this2._watermarkLoadingTimber = null;
|
|
881
|
-
}, 1000);
|
|
882
|
-
_context5.next = 1;
|
|
883
|
-
return this._privilegeControl.allowWatermark(state, [_type2.FcrPrivilegeUserRole.PARTICIPANT], lineType);
|
|
884
|
-
case 1:
|
|
885
|
-
return _context5.abrupt("return", _context5.sent);
|
|
886
|
-
case 2:
|
|
887
|
-
case "end":
|
|
888
|
-
return _context5.stop();
|
|
889
|
-
}
|
|
890
|
-
}, _callee5, this);
|
|
891
|
-
}));
|
|
892
|
-
function setAllowWaterMarkLine(_x6, _x7) {
|
|
893
|
-
return _setAllowWaterMarkLine.apply(this, arguments);
|
|
894
|
-
}
|
|
895
|
-
return setAllowWaterMarkLine;
|
|
896
|
-
}()
|
|
1149
|
+
key: "_handleSecurityUpdated",
|
|
1150
|
+
value: function _handleSecurityUpdated(roomId, event) {
|
|
1151
|
+
var newSecurityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
1152
|
+
this.securityInfos = newSecurityInfos;
|
|
1153
|
+
this._privilegeOperator = event.operatorUser;
|
|
1154
|
+
this._observable.notifyObservers('onLocalUserSecurityInfosUpdated', event);
|
|
1155
|
+
}
|
|
897
1156
|
}]);
|
|
898
1157
|
}();
|
|
899
1158
|
_FcrUIPrivilegeProviderImpl = FcrUIPrivilegeProviderImpl;
|
|
900
|
-
var _applyDecs$e = _applyDecs(_FcrUIPrivilegeProviderImpl, [[_mobx.observable, 1, "
|
|
1159
|
+
var _applyDecs$e = _applyDecs(_FcrUIPrivilegeProviderImpl, [[_mobx.observable, 1, "_isWatermarkOperationAllowed"], [_mobx.observable, 1, "_isWatermarkMultiLine"], [_mobx.observable, 1, "securityInfos"], [_mobx.observable, 1, "permissionInfos"], [_mobx.observable, 1, "_privilegeOperator"], [_allowWatermarkDecs, 18, "allowWatermark"], [_setAllowWaterMarkLineDecs, 18, "setAllowWaterMarkLine"], [_allowJoinWithPromptSoundDecs, 18, "allowJoinWithPromptSound"], [_handlePermissionUpdatedDecs, 18, "_handlePermissionUpdated"], [_handleSecurityUpdatedDecs, 18, "_handleSecurityUpdated"]], []).e;
|
|
901
1160
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
|
|
902
|
-
|
|
903
|
-
|
|
1161
|
+
_init__isWatermarkOperationAllowed = _applyDecs$e2[0];
|
|
1162
|
+
_init__isWatermarkMultiLine = _applyDecs$e2[1];
|
|
904
1163
|
_init_securityInfos = _applyDecs$e2[2];
|
|
905
1164
|
_init_permissionInfos = _applyDecs$e2[3];
|
|
906
|
-
|
|
1165
|
+
_init__privilegeOperator = _applyDecs$e2[4];
|
|
907
1166
|
_initProto = _applyDecs$e2[5];
|
|
908
1167
|
_applyDecs$e;
|