fcr-ui-scene 3.7.8 → 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 +45 -33
- package/lib/creator/provider-initializer.browser.js +34 -5
- package/lib/creator/provider-initializer.electron.js +34 -6
- package/lib/electron/bootstrap-sdk.d.ts +3 -1
- package/lib/electron/bootstrap-sdk.js +93 -358
- 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/{modules/control-bar/types.js → electron/process-manager/constants.js} +3 -1
- 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 +45 -4
- package/lib/electron/until.js +3 -0
- 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 +10 -3
- 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/{annotation → caption}/index.js +43 -84
- 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/leave-meeting/store.base.d.ts +1 -0
- package/lib/modules/components/leave-meeting/store.base.js +46 -5
- 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/confirm-leave-meeting/index.d.ts +1 -0
- package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.js +2 -1
- package/lib/modules/dialog/dialogs/participant/components/actions.js +2 -2
- package/lib/modules/dialog/dialogs/share-screen-selection/index.js +0 -12
- 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 +143 -62
- 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 -2
- package/lib/modules/share-screen/store.electron.d.ts +3 -1
- package/lib/modules/share-screen/store.electron.js +168 -38
- 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/{event-confirm → subtitles-history}/index.js +62 -31
- 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/{shared-data-source/security-data.js → modules/subtitles-history/store.electron.js} +75 -77
- package/lib/modules/subtitles-history/type.d.ts +4 -0
- package/lib/modules/subtitles-history/view.d.ts +1 -0
- package/lib/modules/subtitles-history/view.js +104 -0
- package/lib/modules/video-window/popover-watcher.js +4 -1
- package/lib/modules/video-window/store.js +7 -1
- package/lib/modules/video-window/view.js +14 -4
- 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 +198 -144
- 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/{modules/share-screen/types.js → providers/screen-share/constant.js} +3 -1
- 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/browser.js +1 -1
- 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 -4
- package/lib/providers/window/renderer-window.d.ts +7 -0
- package/lib/providers/window/renderer-window.js +65 -4
- package/lib/providers/window/type.d.ts +5 -0
- package/lib/runtime.d.ts +8 -7
- package/lib/runtime.js +1 -2
- package/lib/scenes/main-scene.d.ts +1 -0
- package/lib/scenes/main-scene.js +144 -67
- 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 +32 -5
- 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-source/layout-data.js → shared-data/stt-setting.ts/index.js} +96 -83
- 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 +8 -18
- package/lib/utilities/focus-helper.js +18 -11
- package/lib/utilities/logger.js +1 -1
- 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 +3 -149
- package/public/meeting-manager.js +405 -0
- 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 -20
- package/lib/creator.d.ts +0 -36
- package/lib/creator.js +0 -465
- package/lib/modules/action-bar/index.d.ts +0 -56
- package/lib/modules/action-bar/index.dev.d.ts +0 -0
- package/lib/modules/action-bar/index.dev.js +0 -94
- package/lib/modules/action-bar/index.js +0 -108
- package/lib/modules/action-bar/store.d.ts +0 -256
- package/lib/modules/action-bar/store.js +0 -1572
- package/lib/modules/action-bar/types.d.ts +0 -90
- package/lib/modules/action-bar/view.d.ts +0 -5
- package/lib/modules/action-bar/view.js +0 -112
- package/lib/modules/annotation/annotation-index.d.ts +0 -2
- package/lib/modules/annotation/annotation-index.js +0 -80
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +0 -75
- package/lib/modules/annotation/annotation-toolbar-store.js +0 -459
- package/lib/modules/annotation/board-cursor.css +0 -77
- package/lib/modules/annotation/components/color-picker/components/color.d.ts +0 -5
- package/lib/modules/annotation/components/color-picker/components/color.js +0 -38
- package/lib/modules/annotation/components/color-picker/components/panel.d.ts +0 -1
- package/lib/modules/annotation/components/color-picker/components/panel.js +0 -109
- package/lib/modules/annotation/components/color-picker/components/picker.d.ts +0 -1
- package/lib/modules/annotation/components/color-picker/components/picker.js +0 -75
- package/lib/modules/annotation/components/color-picker/index.d.ts +0 -2
- package/lib/modules/annotation/components/color-picker/index.js +0 -47
- package/lib/modules/annotation/components/eraser-picker.d.ts +0 -4
- package/lib/modules/annotation/components/eraser-picker.js +0 -144
- package/lib/modules/annotation/components/expansion/index.d.ts +0 -1
- package/lib/modules/annotation/components/expansion/index.js +0 -100
- package/lib/modules/annotation/components/extra-tool-picker.d.ts +0 -1
- package/lib/modules/annotation/components/extra-tool-picker.js +0 -62
- package/lib/modules/annotation/components/history.d.ts +0 -2
- package/lib/modules/annotation/components/history.js +0 -78
- package/lib/modules/annotation/components/icons/fold-icon.d.ts +0 -2
- package/lib/modules/annotation/components/icons/fold-icon.js +0 -41
- package/lib/modules/annotation/components/icons/move-icon.d.ts +0 -1
- package/lib/modules/annotation/components/icons/move-icon.js +0 -66
- package/lib/modules/annotation/components/item/index.d.ts +0 -1
- package/lib/modules/annotation/components/item/index.js +0 -43
- package/lib/modules/annotation/components/move-handle.d.ts +0 -5
- package/lib/modules/annotation/components/move-handle.js +0 -134
- package/lib/modules/annotation/components/pen-picker.d.ts +0 -4
- package/lib/modules/annotation/components/pen-picker.js +0 -155
- package/lib/modules/annotation/components/screen-capture-picker.d.ts +0 -4
- package/lib/modules/annotation/components/screen-capture-picker.js +0 -85
- package/lib/modules/annotation/components/shape-picker.d.ts +0 -4
- package/lib/modules/annotation/components/shape-picker.js +0 -210
- package/lib/modules/annotation/hooks/index.d.ts +0 -14
- package/lib/modules/annotation/hooks/index.js +0 -292
- package/lib/modules/annotation/index.d.ts +0 -45
- package/lib/modules/annotation/store.d.ts +0 -98
- package/lib/modules/annotation/store.js +0 -621
- package/lib/modules/annotation/style.css +0 -36
- package/lib/modules/annotation/view.d.ts +0 -3
- package/lib/modules/annotation/view.js +0 -44
- package/lib/modules/components/device-control/store.d.ts +0 -42
- package/lib/modules/components/device-control/store.js +0 -241
- package/lib/modules/components/leave-meeting/store.d.ts +0 -39
- package/lib/modules/components/leave-meeting/store.js +0 -270
- package/lib/modules/control-bar/components/annotation-button/index.d.ts +0 -1
- package/lib/modules/control-bar/components/annotation-button/index.js +0 -72
- package/lib/modules/control-bar/reactor.d.ts +0 -2
- package/lib/modules/control-bar/reactor.js +0 -8
- package/lib/modules/control-bar/types.d.ts +0 -20
- package/lib/modules/dialog/dialogs/pre-setting/index.css +0 -26
- package/lib/modules/dialog/dialogs/pre-setting/index.d.ts +0 -6
- package/lib/modules/dialog/dialogs/pre-setting/index.js +0 -62
- package/lib/modules/dialog/dialogs/widget/electron.d.ts +0 -6
- package/lib/modules/dialog/dialogs/widget/electron.js +0 -38
- package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +0 -14
- package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -110
- package/lib/modules/dialog/hooks/useElectron.d.ts +0 -28
- package/lib/modules/dialog/hooks/useElectron.js +0 -277
- package/lib/modules/dialog/store.d.ts +0 -135
- package/lib/modules/dialog/store.js +0 -616
- package/lib/modules/event-confirm/components/window/index.d.ts +0 -4
- package/lib/modules/event-confirm/components/window/index.js +0 -197
- package/lib/modules/event-confirm/index.css +0 -24
- package/lib/modules/event-confirm/index.d.ts +0 -27
- package/lib/modules/event-confirm/store.d.ts +0 -45
- package/lib/modules/event-confirm/store.js +0 -345
- package/lib/modules/event-confirm/view.d.ts +0 -2
- package/lib/modules/event-confirm/view.js +0 -53
- package/lib/modules/event-toast/store.d.ts +0 -27
- package/lib/modules/event-toast/store.js +0 -205
- package/lib/modules/layout/store.d.ts +0 -176
- package/lib/modules/layout/store.js +0 -1466
- 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/participant/store.d.ts +0 -222
- package/lib/modules/participant/store.js +0 -1927
- package/lib/modules/pc-audio-connect/index.d.ts +0 -22
- package/lib/modules/pc-audio-connect/index.js +0 -67
- package/lib/modules/pc-audio-connect/store.d.ts +0 -46
- package/lib/modules/pc-audio-connect/store.js +0 -304
- package/lib/modules/setting/common/advance-link.d.ts +0 -3
- package/lib/modules/setting/common/advance-link.js +0 -27
- package/lib/modules/setting/common/index.css +0 -26
- package/lib/modules/setting/common/useNamespace.d.ts +0 -15
- package/lib/modules/setting/common/useNamespace.js +0 -66
- package/lib/modules/setting/config.d.ts +0 -36
- package/lib/modules/setting/config.js +0 -36
- package/lib/modules/setting/dialog-wrapper.d.ts +0 -2
- package/lib/modules/setting/dialog-wrapper.js +0 -110
- package/lib/modules/setting/store.d.ts +0 -261
- package/lib/modules/setting/store.js +0 -1321
- package/lib/modules/share-screen/store.d.ts +0 -148
- package/lib/modules/share-screen/store.js +0 -950
- package/lib/modules/share-screen/types.d.ts +0 -26
- package/lib/modules/state-bar/store.d.ts +0 -124
- package/lib/modules/state-bar/store.js +0 -664
- package/lib/modules/whiteboard/components/progress/electron.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +0 -33
- package/lib/modules/widget/sdk.d.ts +0 -30
- package/lib/modules/widget/sdk.js +0 -224
- package/lib/modules/widget/store.d.ts +0 -14
- package/lib/modules/widget/store.js +0 -28
- package/lib/providers/annotation-provider.d.ts +0 -124
- package/lib/providers/annotation-provider.js +0 -369
- package/lib/providers/dialog-provider.d.ts +0 -137
- package/lib/providers/dialog-provider.js +0 -194
- package/lib/providers/message-provider.d.ts +0 -69
- package/lib/providers/message-provider.js +0 -140
- package/lib/providers/room-provider.d.ts +0 -194
- package/lib/providers/room-provider.js +0 -916
- package/lib/providers/screen-share-provider.d.ts +0 -244
- package/lib/providers/screen-share-provider.js +0 -835
- package/lib/providers/sharing-provider.d.ts +0 -42
- package/lib/providers/sharing-provider.js +0 -221
- package/lib/providers/user-setting-storage-provider.d.ts +0 -21
- package/lib/providers/user-setting-storage-provider.js +0 -65
- package/lib/providers/whiteboard-provider.d.ts +0 -24
- package/lib/providers/whiteboard-provider.js +0 -127
- package/lib/shared-data-source/annotation-data.d.ts +0 -17
- package/lib/shared-data-source/annotation-data.js +0 -110
- package/lib/shared-data-source/app-list-data.d.ts +0 -34
- package/lib/shared-data-source/app-list-data.js +0 -133
- package/lib/shared-data-source/chat-data.d.ts +0 -25
- package/lib/shared-data-source/chat-data.js +0 -139
- package/lib/shared-data-source/config.d.ts +0 -35
- package/lib/shared-data-source/config.js +0 -40
- package/lib/shared-data-source/confirm-data.d.ts +0 -25
- package/lib/shared-data-source/confirm-data.js +0 -97
- package/lib/shared-data-source/device-privilege-data.d.ts +0 -8
- package/lib/shared-data-source/device-privilege-data.js +0 -25
- package/lib/shared-data-source/interpreter.d.ts +0 -77
- package/lib/shared-data-source/interpreter.js +0 -247
- package/lib/shared-data-source/layout-data.d.ts +0 -31
- package/lib/shared-data-source/meeting-time.d.ts +0 -90
- package/lib/shared-data-source/meeting-time.js +0 -416
- package/lib/shared-data-source/member-data.d.ts +0 -139
- package/lib/shared-data-source/member-data.js +0 -517
- package/lib/shared-data-source/pin-data.d.ts +0 -13
- package/lib/shared-data-source/pin-data.js +0 -111
- package/lib/shared-data-source/screen-share-data.d.ts +0 -364
- package/lib/shared-data-source/screen-share-data.js +0 -520
- package/lib/shared-data-source/security-data.d.ts +0 -39
- package/lib/shared-data-source/setting.d.ts +0 -67
- package/lib/shared-data-source/setting.js +0 -220
- package/lib/shared-data-source/speaker-spotlight.d.ts +0 -5
- package/lib/shared-data-source/speaker-spotlight.js +0 -15
- package/lib/shared-data-source/video-window.d.ts +0 -165
- package/lib/shared-data-source/video-window.js +0 -1266
- package/lib/shared-data-source/waiting-room.d.ts +0 -46
- package/lib/shared-data-source/waiting-room.js +0 -222
- package/lib/shared-data-source/whiteboard-data.d.ts +0 -68
- package/lib/shared-data-source/whiteboard-data.js +0 -347
- package/lib/utilities/board-context.d.ts +0 -4
- package/lib/utilities/board-context.js +0 -12
- package/lib/utilities/copyText.d.ts +0 -2
- package/lib/utilities/copyText.js +0 -48
- package/lib/utilities/renderer-event.d.ts +0 -10
- package/lib/utilities/renderer-event.js +0 -95
- package/lib/utilities/screen-capture-permission.d.ts +0 -2
- package/lib/utilities/screen-capture-permission.js +0 -24
- package/lib/utilities/screen.d.ts +0 -3
- package/lib/utilities/screen.js +0 -53
- package/lib/utilities/video-track-render-context.d.ts +0 -6
- package/lib/utilities/video-track-render-context.js +0 -9
- package/lib/waiting-room-control-manager.d.ts +0 -28
- package/lib/waiting-room-control-manager.js +0 -230
- package/lib/widget-sdk.d.ts +0 -2
- package/lib/widget-sdk.js +0 -13
- /package/lib/modules/{action-bar/types.js → subtitles-history/type.js} +0 -0
- /package/public/assets/electron/sound_effects/{pretest.mp3 → speakerTest.mp3} +0 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.filter.js");
|
|
9
|
+
require("core-js/modules/es.array.is-array.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.bind.js");
|
|
12
|
+
require("core-js/modules/es.function.name.js");
|
|
13
|
+
require("core-js/modules/es.number.constructor.js");
|
|
14
|
+
require("core-js/modules/es.object.create.js");
|
|
15
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
16
|
+
require("core-js/modules/es.object.define-property.js");
|
|
17
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
19
|
+
require("core-js/modules/es.object.keys.js");
|
|
20
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
21
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
22
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
23
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
24
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
25
|
+
Object.defineProperty(exports, "__esModule", {
|
|
26
|
+
value: true
|
|
27
|
+
});
|
|
28
|
+
exports.FcrUISttProviderImpl = void 0;
|
|
29
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
30
|
+
require("core-js/modules/es.array.concat.js");
|
|
31
|
+
require("core-js/modules/es.array.find-index.js");
|
|
32
|
+
require("core-js/modules/es.array.find-last-index.js");
|
|
33
|
+
require("core-js/modules/es.array.for-each.js");
|
|
34
|
+
require("core-js/modules/es.array.includes.js");
|
|
35
|
+
require("core-js/modules/es.array.iterator.js");
|
|
36
|
+
require("core-js/modules/es.array.push.js");
|
|
37
|
+
require("core-js/modules/es.array.splice.js");
|
|
38
|
+
require("core-js/modules/es.date.now.js");
|
|
39
|
+
require("core-js/modules/es.map.js");
|
|
40
|
+
require("core-js/modules/es.object.to-string.js");
|
|
41
|
+
require("core-js/modules/es.promise.js");
|
|
42
|
+
require("core-js/modules/es.string.includes.js");
|
|
43
|
+
require("core-js/modules/es.string.iterator.js");
|
|
44
|
+
require("core-js/modules/es.weak-map.js");
|
|
45
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
46
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
47
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
48
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
49
|
+
require("core-js/modules/esnext.map.every.js");
|
|
50
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
51
|
+
require("core-js/modules/esnext.map.find.js");
|
|
52
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
53
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
54
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
55
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
56
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
57
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
58
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
59
|
+
require("core-js/modules/esnext.map.some.js");
|
|
60
|
+
require("core-js/modules/esnext.map.update.js");
|
|
61
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
62
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
63
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
64
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
65
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
66
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
67
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
68
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
69
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
70
|
+
var _imports = require("fcr-core/lib/imports");
|
|
71
|
+
var _type = require("fcr-core/lib/room-control/stt-control/type");
|
|
72
|
+
var _type2 = require("fcr-core/lib/type");
|
|
73
|
+
var _mobx = require("mobx");
|
|
74
|
+
var _type3 = require("./type");
|
|
75
|
+
var _type4 = require("../../modules/participant/type");
|
|
76
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
77
|
+
var _translationSettingOptions = require("../../modules/components/caption-menu/translation-setting-options");
|
|
78
|
+
var _interpreter = require("../../shared-data/interpreter");
|
|
79
|
+
var _FcrUISttProviderImpl;
|
|
80
|
+
var _initProto, _init__captionState, _init__transcribingState, _init__openOrStopTranscribingUser, _init__hasEverEnabledTranscribing, _init__languageOptions, _init__sourceLanguage, _init__translateLanguage, _init__transcribingList, _init__captionSentence, _init__preCaptionSentence, _init__isCaptionOpening;
|
|
81
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
82
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
83
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
84
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
85
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
86
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
87
|
+
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"); }
|
|
88
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
89
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
90
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
91
|
+
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
92
|
+
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
93
|
+
var createSentence = function createSentence(id, userId, transcript, translation) {
|
|
94
|
+
return {
|
|
95
|
+
type: 'sentence',
|
|
96
|
+
id: id,
|
|
97
|
+
userId: userId,
|
|
98
|
+
transcript: transcript,
|
|
99
|
+
translation: translation,
|
|
100
|
+
startTs: transcript.timestamp
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
104
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
105
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
106
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
107
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
108
|
+
var _F = /*#__PURE__*/new WeakMap();
|
|
109
|
+
var _G = /*#__PURE__*/new WeakMap();
|
|
110
|
+
var _H = /*#__PURE__*/new WeakMap();
|
|
111
|
+
var _I = /*#__PURE__*/new WeakMap();
|
|
112
|
+
var _J = /*#__PURE__*/new WeakMap();
|
|
113
|
+
var _K = /*#__PURE__*/new WeakMap();
|
|
114
|
+
var FcrUISttProviderImpl = exports.FcrUISttProviderImpl = /*#__PURE__*/function () {
|
|
115
|
+
function FcrUISttProviderImpl(_ref) {
|
|
116
|
+
var _this = this;
|
|
117
|
+
var sttControl = _ref.sttControl,
|
|
118
|
+
roomSessionControl = _ref.roomSessionControl,
|
|
119
|
+
roomControl = _ref.roomControl,
|
|
120
|
+
localUserId = _ref.localUserId,
|
|
121
|
+
messageProvider = _ref.messageProvider,
|
|
122
|
+
dialogProvider = _ref.dialogProvider,
|
|
123
|
+
sharedSecurityDataSource = _ref.sharedSecurityDataSource,
|
|
124
|
+
privilegeProvider = _ref.privilegeProvider,
|
|
125
|
+
sharedInterpreterDataSource = _ref.sharedInterpreterDataSource;
|
|
126
|
+
(0, _classCallCheck2["default"])(this, FcrUISttProviderImpl);
|
|
127
|
+
(0, _defineProperty2["default"])(this, "_logger", (_initProto(this), (0, _imports.createLogger)({
|
|
128
|
+
prefix: 'FcrUISttProviderImpl'
|
|
129
|
+
})));
|
|
130
|
+
(0, _defineProperty2["default"])(this, "_observable", new _imports.AgoraObservable());
|
|
131
|
+
(0, _defineProperty2["default"])(this, "_disposer", []);
|
|
132
|
+
(0, _defineProperty2["default"])(this, "_sentenceMap", new Map());
|
|
133
|
+
(0, _defineProperty2["default"])(this, "_privilegeObserver", {
|
|
134
|
+
onSecurityInfoUpdated: function onSecurityInfoUpdated(roomId, event) {
|
|
135
|
+
var securityInfo = event.securityInfo,
|
|
136
|
+
operatorUser = event.operatorUser;
|
|
137
|
+
var enable = securityInfo.enable,
|
|
138
|
+
info = securityInfo.info;
|
|
139
|
+
var targetRoles = info === null || info === void 0 ? void 0 : info.targetRoles;
|
|
140
|
+
var self = _this._roomControl.getUserControl().getLocalUser();
|
|
141
|
+
var selfRole = _this._roomControl.getUserControl().getLocalUser().userRole;
|
|
142
|
+
var isHostOrCohost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(selfRole);
|
|
143
|
+
var isSelfOperator = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === self.userId;
|
|
144
|
+
|
|
145
|
+
// 不响应自己的操作
|
|
146
|
+
if (isSelfOperator) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 主持人或联合主持人显示允许开启、关闭(字幕、转写)的提示
|
|
151
|
+
if (isHostOrCohost) {
|
|
152
|
+
var _securityInfo$info;
|
|
153
|
+
switch ((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) {
|
|
154
|
+
case _type2.FcrSecurityAction.SttStartTranscribe:
|
|
155
|
+
_this._messageProvider.showToast({
|
|
156
|
+
type: 'normal',
|
|
157
|
+
message: enable ? (0, _i18n.transI18n)('fmt_ai_rtt_toast_host_enabled_rtt') : (0, _i18n.transI18n)('fmt_ai_rtt_toast_host_not_permitted_start_stop_rtt')
|
|
158
|
+
});
|
|
159
|
+
break;
|
|
160
|
+
case _type2.FcrSecurityAction.SttStartCaption:
|
|
161
|
+
_this._messageProvider.showToast({
|
|
162
|
+
type: 'normal',
|
|
163
|
+
message: enable ? (0, _i18n.transI18n)('fmt_ai_subtitles_toast_host_enabled_captions') : (0, _i18n.transI18n)('fmt_ai_subtitles_toast_host_disabled_subtitles')
|
|
164
|
+
});
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
} else if (targetRoles !== null && targetRoles !== void 0 && targetRoles.includes(selfRole)) {
|
|
168
|
+
var _securityInfo$info2;
|
|
169
|
+
// 普通与会者只在主持人或联合主持人禁止使用, 且自己正在使用时, 才显示提示
|
|
170
|
+
switch ((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) {
|
|
171
|
+
case _type2.FcrSecurityAction.SttStartTranscribe:
|
|
172
|
+
if (!enable && _this.transcribingState) {
|
|
173
|
+
_this._messageProvider.showToast({
|
|
174
|
+
type: 'normal',
|
|
175
|
+
message: (0, _i18n.transI18n)('fmt_ai_rtt_toast_host_not_permitted_start_stop_rtt')
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
case _type2.FcrSecurityAction.SttStartCaption:
|
|
180
|
+
if (!enable && _this.captionState) {
|
|
181
|
+
_this._messageProvider.showToast({
|
|
182
|
+
type: 'normal',
|
|
183
|
+
message: (0, _i18n.transI18n)('fmt_ai_subtitles_toast_host_disabled_subtitles')
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// 主持人或联合主持人在安全中不允许使用字幕时, 停止字幕
|
|
187
|
+
_this.stopCaption(true);
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
(0, _defineProperty2["default"])(this, "_roomControlObserver", {
|
|
195
|
+
onRoomPropertiesUpdated: function onRoomPropertiesUpdated(roomId, properties) {
|
|
196
|
+
if ((0, _imports.get)(properties, 'changedProperties.stt.transcribingChanged') === true) {
|
|
197
|
+
(0, _mobx.runInAction)(function () {
|
|
198
|
+
_this._hasEverEnabledTranscribing = true;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
(0, _defineProperty2["default"])(this, "_sttObserver", {
|
|
204
|
+
onSttEventReceived: this._handleSttEventReceived,
|
|
205
|
+
onLocalCaptionStateUpdated: function onLocalCaptionStateUpdated(roomId, state, operatorUser) {
|
|
206
|
+
var captionState = state === _type.FcrCaptionState.STARTED;
|
|
207
|
+
_this._captionState = captionState;
|
|
208
|
+
_this._isCaptionOpening = false;
|
|
209
|
+
_this._captionSentence = null;
|
|
210
|
+
_this._preCaptionSentence = null;
|
|
211
|
+
},
|
|
212
|
+
onTranscribingStateUpdated: function onTranscribingStateUpdated(roomId, state, operatorUser) {
|
|
213
|
+
(0, _mobx.runInAction)(function () {
|
|
214
|
+
_this._transcribingState = state === _type.FcrTranscribingState.STARTED;
|
|
215
|
+
if (operatorUser) {
|
|
216
|
+
_this._openOrStopTranscribingUser = operatorUser;
|
|
217
|
+
} else {
|
|
218
|
+
_this._openOrStopTranscribingUser = null;
|
|
219
|
+
_this._logger.error('onTranscribingStateUpdated: operatorUser is null');
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
onSourceLanguageUpdated: function onSourceLanguageUpdated(roomId, operatorUser) {
|
|
224
|
+
var sourceLanguage = _this._sttControl.getSourceLanguage();
|
|
225
|
+
if (sourceLanguage === null) {
|
|
226
|
+
_this._logger.error('onSourceLanguageUpdated: _sttControl.getSourceLanguage return null, unable to update');
|
|
227
|
+
} else {
|
|
228
|
+
_this._sourceLanguage = sourceLanguage;
|
|
229
|
+
var reason2 = _translationSettingOptions.SourceLanguageMapGenerateI18nKey[sourceLanguage];
|
|
230
|
+
var message = '';
|
|
231
|
+
if ((operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === _this._localUserId) {
|
|
232
|
+
message = (0, _i18n.transI18n)('fmt_ai_subtitles_toast_change_language_self', {
|
|
233
|
+
reason1: reason2 ? (0, _i18n.transI18n)(reason2) : sourceLanguage
|
|
234
|
+
});
|
|
235
|
+
} else {
|
|
236
|
+
message = (0, _i18n.transI18n)('fmt_ai_subtitles_toast_change_language_attendees', {
|
|
237
|
+
reason1: operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userName,
|
|
238
|
+
reason2: reason2 ? (0, _i18n.transI18n)(reason2) : sourceLanguage
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
_this._messageProvider.showToast({
|
|
242
|
+
type: 'normal',
|
|
243
|
+
message: message,
|
|
244
|
+
duration: 2000
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
_classPrivateFieldInitSpec(this, _A, _init__captionState(this));
|
|
250
|
+
_classPrivateFieldInitSpec(this, _B, _init__transcribingState(this));
|
|
251
|
+
_classPrivateFieldInitSpec(this, _C, _init__openOrStopTranscribingUser(this));
|
|
252
|
+
_classPrivateFieldInitSpec(this, _D, _init__hasEverEnabledTranscribing(this));
|
|
253
|
+
_classPrivateFieldInitSpec(this, _E, _init__languageOptions(this));
|
|
254
|
+
_classPrivateFieldInitSpec(this, _F, _init__sourceLanguage(this));
|
|
255
|
+
_classPrivateFieldInitSpec(this, _G, _init__translateLanguage(this));
|
|
256
|
+
_classPrivateFieldInitSpec(this, _H, _init__transcribingList(this, []));
|
|
257
|
+
_classPrivateFieldInitSpec(this, _I, _init__captionSentence(this, null));
|
|
258
|
+
_classPrivateFieldInitSpec(this, _J, _init__preCaptionSentence(this, null));
|
|
259
|
+
_classPrivateFieldInitSpec(this, _K, _init__isCaptionOpening(this, false));
|
|
260
|
+
(0, _defineProperty2["default"])(this, "_handleSourceLanguageUpdated", function () {
|
|
261
|
+
_this._observable.notifyObservers('onSourceLanguageUpdated', _this._sourceLanguage);
|
|
262
|
+
});
|
|
263
|
+
(0, _defineProperty2["default"])(this, "_handleTranslateLanguageUpdated", function () {
|
|
264
|
+
_this._observable.notifyObservers('onTranslateLanguageUpdated', _this._translateLanguage);
|
|
265
|
+
});
|
|
266
|
+
this._sttControl = sttControl;
|
|
267
|
+
this._roomSessionControl = roomSessionControl;
|
|
268
|
+
this._roomControl = roomControl;
|
|
269
|
+
this._dialogProvider = dialogProvider;
|
|
270
|
+
this._localUserId = localUserId;
|
|
271
|
+
this._messageProvider = messageProvider;
|
|
272
|
+
this._sharedSecurityDataSource = sharedSecurityDataSource;
|
|
273
|
+
this._privilegeProvider = privilegeProvider;
|
|
274
|
+
this._privilegeControl = roomControl.getPrivilegeControl();
|
|
275
|
+
this._privilegeControl.addObserver(this._privilegeObserver);
|
|
276
|
+
this._interpreterDataSource = sharedInterpreterDataSource;
|
|
277
|
+
this._captionState = this._sttControl.getLocalCaptionState() === _type.FcrCaptionState.STARTED;
|
|
278
|
+
this._transcribingState = this._sttControl.getTranscribingState() === _type.FcrTranscribingState.STARTED;
|
|
279
|
+
this._openOrStopTranscribingUser = null;
|
|
280
|
+
this._hasEverEnabledTranscribing = roomControl.getRoomPropertiesByKeyPath('stt.transcribingChanged') === true;
|
|
281
|
+
var config = this._sttControl.getConfig();
|
|
282
|
+
if (config) {
|
|
283
|
+
this._languageOptions = {
|
|
284
|
+
sourceList: config.sourceLanguages,
|
|
285
|
+
translateList: config.translateLanguages
|
|
286
|
+
};
|
|
287
|
+
this._cacheMaxLimit = config.cacheMaxLimit;
|
|
288
|
+
} else {
|
|
289
|
+
this._languageOptions = {
|
|
290
|
+
sourceList: [],
|
|
291
|
+
translateList: []
|
|
292
|
+
};
|
|
293
|
+
this._cacheMaxLimit = 500;
|
|
294
|
+
}
|
|
295
|
+
this._sourceLanguage = this._sttControl.getSourceLanguage() || _type2.FcrLanguage.ZH;
|
|
296
|
+
this._translateLanguage = null;
|
|
297
|
+
this._disposer.push((0, _mobx.reaction)(function () {
|
|
298
|
+
return _this.sourceLanguage;
|
|
299
|
+
}, this._handleSourceLanguageUpdated), (0, _mobx.reaction)(function () {
|
|
300
|
+
return _this.translateLanguage;
|
|
301
|
+
}, this._handleTranslateLanguageUpdated));
|
|
302
|
+
sttControl.addObserver(this._sttObserver);
|
|
303
|
+
roomControl.addObserver(this._roomControlObserver);
|
|
304
|
+
}
|
|
305
|
+
return (0, _createClass2["default"])(FcrUISttProviderImpl, [{
|
|
306
|
+
key: "_captionState",
|
|
307
|
+
get: function get() {
|
|
308
|
+
return _classPrivateFieldGet(_A, this);
|
|
309
|
+
},
|
|
310
|
+
set: function set(v) {
|
|
311
|
+
_classPrivateFieldSet(_A, this, v);
|
|
312
|
+
}
|
|
313
|
+
}, {
|
|
314
|
+
key: "_transcribingState",
|
|
315
|
+
get: function get() {
|
|
316
|
+
return _classPrivateFieldGet(_B, this);
|
|
317
|
+
},
|
|
318
|
+
set: function set(v) {
|
|
319
|
+
_classPrivateFieldSet(_B, this, v);
|
|
320
|
+
}
|
|
321
|
+
}, {
|
|
322
|
+
key: "_openOrStopTranscribingUser",
|
|
323
|
+
get: function get() {
|
|
324
|
+
return _classPrivateFieldGet(_C, this);
|
|
325
|
+
},
|
|
326
|
+
set: function set(v) {
|
|
327
|
+
_classPrivateFieldSet(_C, this, v);
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
key: "_hasEverEnabledTranscribing",
|
|
331
|
+
get: function get() {
|
|
332
|
+
return _classPrivateFieldGet(_D, this);
|
|
333
|
+
},
|
|
334
|
+
set: function set(v) {
|
|
335
|
+
_classPrivateFieldSet(_D, this, v);
|
|
336
|
+
}
|
|
337
|
+
}, {
|
|
338
|
+
key: "_languageOptions",
|
|
339
|
+
get: function get() {
|
|
340
|
+
return _classPrivateFieldGet(_E, this);
|
|
341
|
+
},
|
|
342
|
+
set: function set(v) {
|
|
343
|
+
_classPrivateFieldSet(_E, this, v);
|
|
344
|
+
}
|
|
345
|
+
}, {
|
|
346
|
+
key: "_sourceLanguage",
|
|
347
|
+
get: function get() {
|
|
348
|
+
return _classPrivateFieldGet(_F, this);
|
|
349
|
+
},
|
|
350
|
+
set: function set(v) {
|
|
351
|
+
_classPrivateFieldSet(_F, this, v);
|
|
352
|
+
}
|
|
353
|
+
}, {
|
|
354
|
+
key: "_translateLanguage",
|
|
355
|
+
get: function get() {
|
|
356
|
+
return _classPrivateFieldGet(_G, this);
|
|
357
|
+
},
|
|
358
|
+
set: function set(v) {
|
|
359
|
+
_classPrivateFieldSet(_G, this, v);
|
|
360
|
+
}
|
|
361
|
+
}, {
|
|
362
|
+
key: "_transcribingList",
|
|
363
|
+
get: function get() {
|
|
364
|
+
return _classPrivateFieldGet(_H, this);
|
|
365
|
+
},
|
|
366
|
+
set: function set(v) {
|
|
367
|
+
_classPrivateFieldSet(_H, this, v);
|
|
368
|
+
}
|
|
369
|
+
}, {
|
|
370
|
+
key: "_captionSentence",
|
|
371
|
+
get: function get() {
|
|
372
|
+
return _classPrivateFieldGet(_I, this);
|
|
373
|
+
},
|
|
374
|
+
set: function set(v) {
|
|
375
|
+
_classPrivateFieldSet(_I, this, v);
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
key: "_preCaptionSentence",
|
|
379
|
+
get: function get() {
|
|
380
|
+
return _classPrivateFieldGet(_J, this);
|
|
381
|
+
},
|
|
382
|
+
set: function set(v) {
|
|
383
|
+
_classPrivateFieldSet(_J, this, v);
|
|
384
|
+
}
|
|
385
|
+
}, {
|
|
386
|
+
key: "_isCaptionOpening",
|
|
387
|
+
get: function get() {
|
|
388
|
+
return _classPrivateFieldGet(_K, this);
|
|
389
|
+
},
|
|
390
|
+
set: function set(v) {
|
|
391
|
+
_classPrivateFieldSet(_K, this, v);
|
|
392
|
+
}
|
|
393
|
+
}, {
|
|
394
|
+
key: "captionState",
|
|
395
|
+
get: function get() {
|
|
396
|
+
return this._captionState;
|
|
397
|
+
}
|
|
398
|
+
}, {
|
|
399
|
+
key: "transcribingState",
|
|
400
|
+
get: function get() {
|
|
401
|
+
return this._transcribingState;
|
|
402
|
+
}
|
|
403
|
+
}, {
|
|
404
|
+
key: "openOrStopTranscribingUser",
|
|
405
|
+
get: function get() {
|
|
406
|
+
if (this._openOrStopTranscribingUser === null) {
|
|
407
|
+
return null;
|
|
408
|
+
}
|
|
409
|
+
return _objectSpread(_objectSpread({}, this._openOrStopTranscribingUser), {}, {
|
|
410
|
+
isSelf: this._openOrStopTranscribingUser.userId === this._localUserId
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
}, {
|
|
414
|
+
key: "hasEverEnabledTranscribing",
|
|
415
|
+
get: function get() {
|
|
416
|
+
return this._hasEverEnabledTranscribing;
|
|
417
|
+
}
|
|
418
|
+
}, {
|
|
419
|
+
key: "languageOptions",
|
|
420
|
+
get: function get() {
|
|
421
|
+
return this._languageOptions;
|
|
422
|
+
}
|
|
423
|
+
}, {
|
|
424
|
+
key: "sourceLanguage",
|
|
425
|
+
get: function get() {
|
|
426
|
+
return this._sourceLanguage;
|
|
427
|
+
}
|
|
428
|
+
}, {
|
|
429
|
+
key: "translateLanguage",
|
|
430
|
+
get: function get() {
|
|
431
|
+
return this._translateLanguage;
|
|
432
|
+
}
|
|
433
|
+
}, {
|
|
434
|
+
key: "isCaptionOpening",
|
|
435
|
+
get: function get() {
|
|
436
|
+
return this._isCaptionOpening;
|
|
437
|
+
}
|
|
438
|
+
}, {
|
|
439
|
+
key: "transcribingList",
|
|
440
|
+
get: function get() {
|
|
441
|
+
return this._transcribingList;
|
|
442
|
+
}
|
|
443
|
+
}, {
|
|
444
|
+
key: "captionSentence",
|
|
445
|
+
get: function get() {
|
|
446
|
+
return this._captionSentence;
|
|
447
|
+
}
|
|
448
|
+
}, {
|
|
449
|
+
key: "preCaptionSentence",
|
|
450
|
+
get: function get() {
|
|
451
|
+
return this._preCaptionSentence;
|
|
452
|
+
}
|
|
453
|
+
}, {
|
|
454
|
+
key: "release",
|
|
455
|
+
value: function release() {
|
|
456
|
+
this._sttControl.removeObserver(this._sttObserver);
|
|
457
|
+
this._roomControl.removeObserver(this._roomControlObserver);
|
|
458
|
+
this._privilegeControl.removeObserver(this._privilegeObserver);
|
|
459
|
+
this._disposer.forEach(function (disposer) {
|
|
460
|
+
return disposer();
|
|
461
|
+
});
|
|
462
|
+
this._disposer = [];
|
|
463
|
+
this._sentenceMap.clear();
|
|
464
|
+
this._transcribingList = [];
|
|
465
|
+
}
|
|
466
|
+
}, {
|
|
467
|
+
key: "requestOpenTranscribing",
|
|
468
|
+
value: function () {
|
|
469
|
+
var _requestOpenTranscribing = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
470
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
471
|
+
while (1) switch (_context.prev = _context.next) {
|
|
472
|
+
case 0:
|
|
473
|
+
_context.next = 1;
|
|
474
|
+
return this._roomSessionControl.startRoomSession({
|
|
475
|
+
sessionKey: _type4.FcrUISessionKey.REQUEST_OPEN_TRANSCRIBING,
|
|
476
|
+
duration: 11,
|
|
477
|
+
// 和其他端保持一致为11秒
|
|
478
|
+
payload: {}
|
|
479
|
+
}, [_type2.FcrPrivilegeUserRole.HOST]);
|
|
480
|
+
case 1:
|
|
481
|
+
return _context.abrupt("return", _context.sent);
|
|
482
|
+
case 2:
|
|
483
|
+
case "end":
|
|
484
|
+
return _context.stop();
|
|
485
|
+
}
|
|
486
|
+
}, _callee, this);
|
|
487
|
+
}));
|
|
488
|
+
function requestOpenTranscribing() {
|
|
489
|
+
return _requestOpenTranscribing.apply(this, arguments);
|
|
490
|
+
}
|
|
491
|
+
return requestOpenTranscribing;
|
|
492
|
+
}()
|
|
493
|
+
}, {
|
|
494
|
+
key: "acceptOpenTranscribing",
|
|
495
|
+
value: function () {
|
|
496
|
+
var _acceptOpenTranscribing = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(session) {
|
|
497
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
498
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
499
|
+
case 0:
|
|
500
|
+
return _context2.abrupt("return", Promise.all([this._roomSessionControl.acceptRoomSession({
|
|
501
|
+
sessionId: session.sessionId,
|
|
502
|
+
sessionKey: _type4.FcrUISessionKey.REQUEST_OPEN_TRANSCRIBING,
|
|
503
|
+
senderId: session.senderId,
|
|
504
|
+
duration: 1,
|
|
505
|
+
payload: {},
|
|
506
|
+
timestamp: Date.now(),
|
|
507
|
+
interval: 0
|
|
508
|
+
}, {}), this.startTranscribing()]));
|
|
509
|
+
case 1:
|
|
510
|
+
case "end":
|
|
511
|
+
return _context2.stop();
|
|
512
|
+
}
|
|
513
|
+
}, _callee2, this);
|
|
514
|
+
}));
|
|
515
|
+
function acceptOpenTranscribing(_x) {
|
|
516
|
+
return _acceptOpenTranscribing.apply(this, arguments);
|
|
517
|
+
}
|
|
518
|
+
return acceptOpenTranscribing;
|
|
519
|
+
}()
|
|
520
|
+
}, {
|
|
521
|
+
key: "rejectOpenTranscribing",
|
|
522
|
+
value: function () {
|
|
523
|
+
var _rejectOpenTranscribing = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(session) {
|
|
524
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
525
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
526
|
+
case 0:
|
|
527
|
+
return _context3.abrupt("return", Promise.all([
|
|
528
|
+
// 响应发起请求的用户
|
|
529
|
+
// 在此期间其他用户可能也发起过请求, 但是因为只会 reject 收到的第一个 session 的请求
|
|
530
|
+
// 所以还需要调用 startRoomSession 通知其他发起请求的用户请求被拒绝
|
|
531
|
+
this._roomSessionControl.rejectRoomSession({
|
|
532
|
+
sessionId: session.sessionId,
|
|
533
|
+
sessionKey: _type4.FcrUISessionKey.REJECT_OPEN_TRANSCRIBING,
|
|
534
|
+
senderId: session.senderId,
|
|
535
|
+
duration: 1,
|
|
536
|
+
payload: {},
|
|
537
|
+
timestamp: Date.now(),
|
|
538
|
+
interval: 0
|
|
539
|
+
}, {}),
|
|
540
|
+
// 通知所有用户请求被拒绝, 主持人和其他发起请求的用户需要在收到该通知后, 需要自行判断自己身份、是否发起过请求来决定是否需要处理此通知
|
|
541
|
+
this._roomSessionControl.startRoomSession({
|
|
542
|
+
sessionKey: _type4.FcrUISessionKey.REJECT_OPEN_TRANSCRIBING,
|
|
543
|
+
duration: 1,
|
|
544
|
+
payload: {}
|
|
545
|
+
})]));
|
|
546
|
+
case 1:
|
|
547
|
+
case "end":
|
|
548
|
+
return _context3.stop();
|
|
549
|
+
}
|
|
550
|
+
}, _callee3, this);
|
|
551
|
+
}));
|
|
552
|
+
function rejectOpenTranscribing(_x2) {
|
|
553
|
+
return _rejectOpenTranscribing.apply(this, arguments);
|
|
554
|
+
}
|
|
555
|
+
return rejectOpenTranscribing;
|
|
556
|
+
}()
|
|
557
|
+
}, {
|
|
558
|
+
key: "startCaption",
|
|
559
|
+
value: function startCaption() {
|
|
560
|
+
this._isCaptionOpening = true;
|
|
561
|
+
var config = {
|
|
562
|
+
sourceLanguage: this._sourceLanguage
|
|
563
|
+
};
|
|
564
|
+
if (this._translateLanguage) {
|
|
565
|
+
config.targetLanguage = this._translateLanguage;
|
|
566
|
+
}
|
|
567
|
+
return this._sttControl.startCaption(config);
|
|
568
|
+
}
|
|
569
|
+
}, {
|
|
570
|
+
key: "stopCaption",
|
|
571
|
+
value: function () {
|
|
572
|
+
var _stopCaption = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
573
|
+
var isCallbackTriggered,
|
|
574
|
+
_args4 = arguments;
|
|
575
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
576
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
577
|
+
case 0:
|
|
578
|
+
isCallbackTriggered = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : false;
|
|
579
|
+
_context4.next = 1;
|
|
580
|
+
return this._sttControl.stopCaption();
|
|
581
|
+
case 1:
|
|
582
|
+
if (!isCallbackTriggered) {
|
|
583
|
+
this._messageProvider.showToast({
|
|
584
|
+
type: 'normal',
|
|
585
|
+
message: (0, _i18n.transI18n)('fmt_ai_subtitles_toast_you_turned_off_subtitles'),
|
|
586
|
+
duration: 2000
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
this._isCaptionOpening = false;
|
|
590
|
+
case 2:
|
|
591
|
+
case "end":
|
|
592
|
+
return _context4.stop();
|
|
593
|
+
}
|
|
594
|
+
}, _callee4, this);
|
|
595
|
+
}));
|
|
596
|
+
function stopCaption() {
|
|
597
|
+
return _stopCaption.apply(this, arguments);
|
|
598
|
+
}
|
|
599
|
+
return stopCaption;
|
|
600
|
+
}()
|
|
601
|
+
}, {
|
|
602
|
+
key: "startTranscribing",
|
|
603
|
+
value: function () {
|
|
604
|
+
var _startTranscribing = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
605
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
606
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
607
|
+
case 0:
|
|
608
|
+
_context5.next = 1;
|
|
609
|
+
return this._sttControl.startTranscribing({
|
|
610
|
+
sourceLanguage: this.sourceLanguage
|
|
611
|
+
});
|
|
612
|
+
case 1:
|
|
613
|
+
_context5.next = 2;
|
|
614
|
+
return this._markHasEverEnabledTranscribing();
|
|
615
|
+
case 2:
|
|
616
|
+
case "end":
|
|
617
|
+
return _context5.stop();
|
|
618
|
+
}
|
|
619
|
+
}, _callee5, this);
|
|
620
|
+
}));
|
|
621
|
+
function startTranscribing() {
|
|
622
|
+
return _startTranscribing.apply(this, arguments);
|
|
623
|
+
}
|
|
624
|
+
return startTranscribing;
|
|
625
|
+
}()
|
|
626
|
+
}, {
|
|
627
|
+
key: "stopTranscribing",
|
|
628
|
+
value: function () {
|
|
629
|
+
var _stopTranscribing = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
630
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
631
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
632
|
+
case 0:
|
|
633
|
+
_context6.next = 1;
|
|
634
|
+
return this._sttControl.stopTranscribing();
|
|
635
|
+
case 1:
|
|
636
|
+
return _context6.abrupt("return", _context6.sent);
|
|
637
|
+
case 2:
|
|
638
|
+
case "end":
|
|
639
|
+
return _context6.stop();
|
|
640
|
+
}
|
|
641
|
+
}, _callee6, this);
|
|
642
|
+
}));
|
|
643
|
+
function stopTranscribing() {
|
|
644
|
+
return _stopTranscribing.apply(this, arguments);
|
|
645
|
+
}
|
|
646
|
+
return stopTranscribing;
|
|
647
|
+
}()
|
|
648
|
+
}, {
|
|
649
|
+
key: "updateSourceLanguage",
|
|
650
|
+
value: function () {
|
|
651
|
+
var _updateSourceLanguage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(language) {
|
|
652
|
+
var _this2 = this;
|
|
653
|
+
var reason1, dialogId;
|
|
654
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
655
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
656
|
+
case 0:
|
|
657
|
+
reason1 = _translationSettingOptions.SourceLanguageMapGenerateI18nKey[language];
|
|
658
|
+
dialogId = this._dialogProvider.openConfirmDialog({
|
|
659
|
+
title: (0, _i18n.transI18n)('fmt_ai_subtitles_window_label_change_language'),
|
|
660
|
+
content: (0, _i18n.transI18n)('fmt_ai_subtitles_window_label_change_language_content', {
|
|
661
|
+
reason1: reason1 ? (0, _i18n.transI18n)(reason1) : language
|
|
662
|
+
}),
|
|
663
|
+
alignCenter: true,
|
|
664
|
+
closable: false,
|
|
665
|
+
onOk: function () {
|
|
666
|
+
var _onOk = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
667
|
+
var previous, _t;
|
|
668
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
669
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
670
|
+
case 0:
|
|
671
|
+
_this2._dialogProvider.closeConfirmDialog(dialogId);
|
|
672
|
+
previous = _this2._sourceLanguage;
|
|
673
|
+
if (!(language === previous)) {
|
|
674
|
+
_context7.next = 1;
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
_this2._logger.warn('updateSourceLanguage: language is the same as previous, no need to update');
|
|
678
|
+
return _context7.abrupt("return");
|
|
679
|
+
case 1:
|
|
680
|
+
_context7.prev = 1;
|
|
681
|
+
_context7.next = 2;
|
|
682
|
+
return _this2._sttControl.updateSourceLanguage(language);
|
|
683
|
+
case 2:
|
|
684
|
+
_context7.next = 4;
|
|
685
|
+
break;
|
|
686
|
+
case 3:
|
|
687
|
+
_context7.prev = 3;
|
|
688
|
+
_t = _context7["catch"](1);
|
|
689
|
+
throw _t;
|
|
690
|
+
case 4:
|
|
691
|
+
case "end":
|
|
692
|
+
return _context7.stop();
|
|
693
|
+
}
|
|
694
|
+
}, _callee7, null, [[1, 3]]);
|
|
695
|
+
}));
|
|
696
|
+
function onOk() {
|
|
697
|
+
return _onOk.apply(this, arguments);
|
|
698
|
+
}
|
|
699
|
+
return onOk;
|
|
700
|
+
}(),
|
|
701
|
+
onCancel: function onCancel() {
|
|
702
|
+
_this2._dialogProvider.closeConfirmDialog(dialogId);
|
|
703
|
+
},
|
|
704
|
+
cancelText: (0, _i18n.transI18n)('fmt_ai_subtitles_window_button_cancel'),
|
|
705
|
+
okText: (0, _i18n.transI18n)('fmt_ai_subtitles_window_button_modify'),
|
|
706
|
+
width: 320
|
|
707
|
+
});
|
|
708
|
+
case 1:
|
|
709
|
+
case "end":
|
|
710
|
+
return _context8.stop();
|
|
711
|
+
}
|
|
712
|
+
}, _callee8, this);
|
|
713
|
+
}));
|
|
714
|
+
function updateSourceLanguage(_x3) {
|
|
715
|
+
return _updateSourceLanguage.apply(this, arguments);
|
|
716
|
+
}
|
|
717
|
+
return updateSourceLanguage;
|
|
718
|
+
}()
|
|
719
|
+
}, {
|
|
720
|
+
key: "subscribeTranslateLanguage",
|
|
721
|
+
value: function () {
|
|
722
|
+
var _subscribeTranslateLanguage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(language) {
|
|
723
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
724
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
725
|
+
case 0:
|
|
726
|
+
if (!language) {
|
|
727
|
+
_context9.next = 2;
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
_context9.next = 1;
|
|
731
|
+
return this._subscribeTranslateLanguage(language);
|
|
732
|
+
case 1:
|
|
733
|
+
_context9.next = 3;
|
|
734
|
+
break;
|
|
735
|
+
case 2:
|
|
736
|
+
_context9.next = 3;
|
|
737
|
+
return this._unsubscribeTranslateLanguage();
|
|
738
|
+
case 3:
|
|
739
|
+
case "end":
|
|
740
|
+
return _context9.stop();
|
|
741
|
+
}
|
|
742
|
+
}, _callee9, this);
|
|
743
|
+
}));
|
|
744
|
+
function subscribeTranslateLanguage(_x4) {
|
|
745
|
+
return _subscribeTranslateLanguage2.apply(this, arguments);
|
|
746
|
+
}
|
|
747
|
+
return subscribeTranslateLanguage;
|
|
748
|
+
}()
|
|
749
|
+
}, {
|
|
750
|
+
key: "clearCaptionSentence",
|
|
751
|
+
value: function clearCaptionSentence() {
|
|
752
|
+
this._captionSentence = null;
|
|
753
|
+
}
|
|
754
|
+
}, {
|
|
755
|
+
key: "clearPreCaptionSentence",
|
|
756
|
+
value: function clearPreCaptionSentence() {
|
|
757
|
+
this._preCaptionSentence = null;
|
|
758
|
+
}
|
|
759
|
+
}, {
|
|
760
|
+
key: "allowStartTranscribe",
|
|
761
|
+
value: function allowStartTranscribe(enable) {
|
|
762
|
+
this._sharedSecurityDataSource.setCheckedStateMap(_objectSpread(_objectSpread({}, this._sharedSecurityDataSource.checkedStateMap), {}, {
|
|
763
|
+
isStartTranscribeAllowed: enable
|
|
764
|
+
}));
|
|
765
|
+
this._privilegeProvider.allowStartTranscribe(enable);
|
|
766
|
+
}
|
|
767
|
+
}, {
|
|
768
|
+
key: "allowStartCaption",
|
|
769
|
+
value: function allowStartCaption(enable) {
|
|
770
|
+
this._sharedSecurityDataSource.setCheckedStateMap(_objectSpread(_objectSpread({}, this._sharedSecurityDataSource.checkedStateMap), {}, {
|
|
771
|
+
isStartCaptionAllowed: enable
|
|
772
|
+
}));
|
|
773
|
+
this._privilegeProvider.allowStartCaption(enable);
|
|
774
|
+
}
|
|
775
|
+
}, {
|
|
776
|
+
key: "allowSetSourceLanguage",
|
|
777
|
+
value: function allowSetSourceLanguage(enable) {
|
|
778
|
+
this._sharedSecurityDataSource.setCheckedStateMap(_objectSpread(_objectSpread({}, this._sharedSecurityDataSource.checkedStateMap), {}, {
|
|
779
|
+
isSetSourceLanguageAllowed: enable
|
|
780
|
+
}));
|
|
781
|
+
this._privilegeProvider.allowSetSourceLanguage(enable);
|
|
782
|
+
}
|
|
783
|
+
}, {
|
|
784
|
+
key: "addObserver",
|
|
785
|
+
value: function addObserver(observer) {
|
|
786
|
+
this._observable.addObserver(observer);
|
|
787
|
+
}
|
|
788
|
+
}, {
|
|
789
|
+
key: "removeObserver",
|
|
790
|
+
value: function removeObserver(observer) {
|
|
791
|
+
this._observable.removeObserver(observer);
|
|
792
|
+
}
|
|
793
|
+
}, {
|
|
794
|
+
key: "_getTranslation",
|
|
795
|
+
value: function _getTranslation(translation, owner, timestamp) {
|
|
796
|
+
// 声源语言和翻译语言相同, 则视为没有开启翻译
|
|
797
|
+
if (this._translateLanguage === null || this._sourceLanguage === this._translateLanguage) {
|
|
798
|
+
return undefined;
|
|
799
|
+
}
|
|
800
|
+
if (translation) {
|
|
801
|
+
return translation;
|
|
802
|
+
}
|
|
803
|
+
return {
|
|
804
|
+
id: '',
|
|
805
|
+
text: '',
|
|
806
|
+
timestamp: timestamp,
|
|
807
|
+
owner: owner,
|
|
808
|
+
isFinal: false,
|
|
809
|
+
language: this._translateLanguage
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// TODO: 转写和字幕拆分处理, 分别按需订阅此事件
|
|
814
|
+
}, {
|
|
815
|
+
key: "_handleSttEventReceived",
|
|
816
|
+
value: function _handleSttEventReceived(roomId, event) {
|
|
817
|
+
var isInterpreterEnabled = this._interpreterDataSource.isInterpreterEnabled && !this._interpreterDataSource.hasSubscribedLanguageList.includes(_interpreter.ORIGIN);
|
|
818
|
+
if (isInterpreterEnabled) {
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
var translation = this._translateLanguage ? event.translations.get(this._translateLanguage) : undefined;
|
|
822
|
+
if (!translation && this._translateLanguage) {
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
var id = event.transcript.id;
|
|
826
|
+
var sentence = this._sentenceMap.get(id);
|
|
827
|
+
if (sentence === undefined) {
|
|
828
|
+
sentence = createSentence(id, event.transcript.owner.userId, event.transcript, this._getTranslation(translation, event.transcript.owner, event.transcript.timestamp));
|
|
829
|
+
if (this._sentenceMap.size >= this._cacheMaxLimit) {
|
|
830
|
+
var index = this._transcribingList.findIndex(function (item) {
|
|
831
|
+
return item.type === 'sentence';
|
|
832
|
+
});
|
|
833
|
+
if (index === -1) {
|
|
834
|
+
this._logger.error('transcribing list is full, but no sentence item found to remove');
|
|
835
|
+
} else {
|
|
836
|
+
this._transcribingList.splice(0, index + 1);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
if (this._transcribingState) {
|
|
840
|
+
this._transcribingList.push(sentence);
|
|
841
|
+
this._sentenceMap.set(id, sentence);
|
|
842
|
+
}
|
|
843
|
+
} else {
|
|
844
|
+
sentence = _objectSpread(_objectSpread({}, sentence), {}, {
|
|
845
|
+
transcript: event.transcript,
|
|
846
|
+
translation: sentence.translation ? this._getTranslation(translation, event.transcript.owner, event.transcript.timestamp) : undefined
|
|
847
|
+
});
|
|
848
|
+
var _index = this._transcribingList.findLastIndex(function (item) {
|
|
849
|
+
return item.id === id;
|
|
850
|
+
});
|
|
851
|
+
if (_index !== -1) {
|
|
852
|
+
this._transcribingList.splice(_index, 1, sentence);
|
|
853
|
+
} else {
|
|
854
|
+
this._logger.error('unable to find sentence in transcribing list to update');
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if (this.captionState) {
|
|
858
|
+
var _this$_preCaptionSent;
|
|
859
|
+
if (this._captionSentence && ((_this$_preCaptionSent = this._preCaptionSentence) === null || _this$_preCaptionSent === void 0 ? void 0 : _this$_preCaptionSent.id) !== this._captionSentence.id) {
|
|
860
|
+
this._preCaptionSentence = this._captionSentence;
|
|
861
|
+
}
|
|
862
|
+
this._captionSentence = sentence;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}, {
|
|
866
|
+
key: "_subscribeTranslateLanguage",
|
|
867
|
+
value: function () {
|
|
868
|
+
var _subscribeTranslateLanguage3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(language) {
|
|
869
|
+
var previous, now, sentence, _t2;
|
|
870
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
871
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
872
|
+
case 0:
|
|
873
|
+
previous = this._translateLanguage;
|
|
874
|
+
if (!(language === previous)) {
|
|
875
|
+
_context0.next = 1;
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
this._logger.warn('subscribeTranslateLanguage: language is the same as previous, no need to update');
|
|
879
|
+
return _context0.abrupt("return");
|
|
880
|
+
case 1:
|
|
881
|
+
this._translateLanguage = language;
|
|
882
|
+
now = Date.now();
|
|
883
|
+
sentence = {
|
|
884
|
+
type: 'action',
|
|
885
|
+
id: "".concat(_type3.FcrUISttActionType.START_TRANSLATION, "-").concat(now),
|
|
886
|
+
actionType: _type3.FcrUISttActionType.START_TRANSLATION,
|
|
887
|
+
startTs: now
|
|
888
|
+
};
|
|
889
|
+
this._transcribingList.push(sentence);
|
|
890
|
+
_context0.prev = 2;
|
|
891
|
+
_context0.next = 3;
|
|
892
|
+
return this._sttControl.subscribeTranscribingLanguage(language);
|
|
893
|
+
case 3:
|
|
894
|
+
_context0.next = 5;
|
|
895
|
+
break;
|
|
896
|
+
case 4:
|
|
897
|
+
_context0.prev = 4;
|
|
898
|
+
_t2 = _context0["catch"](2);
|
|
899
|
+
// 订阅失败, 恢复之前的值
|
|
900
|
+
this._translateLanguage = previous;
|
|
901
|
+
throw _t2;
|
|
902
|
+
case 5:
|
|
903
|
+
case "end":
|
|
904
|
+
return _context0.stop();
|
|
905
|
+
}
|
|
906
|
+
}, _callee0, this, [[2, 4]]);
|
|
907
|
+
}));
|
|
908
|
+
function _subscribeTranslateLanguage(_x5) {
|
|
909
|
+
return _subscribeTranslateLanguage3.apply(this, arguments);
|
|
910
|
+
}
|
|
911
|
+
return _subscribeTranslateLanguage;
|
|
912
|
+
}()
|
|
913
|
+
}, {
|
|
914
|
+
key: "_unsubscribeTranslateLanguage",
|
|
915
|
+
value: function () {
|
|
916
|
+
var _unsubscribeTranslateLanguage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1() {
|
|
917
|
+
var previous, now, sentence, _t3;
|
|
918
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
919
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
920
|
+
case 0:
|
|
921
|
+
previous = this._translateLanguage;
|
|
922
|
+
if (previous) {
|
|
923
|
+
_context1.next = 1;
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
this._logger.warn('unsubscribeTranslateLanguage: language is already null, no need to unsubscribe');
|
|
927
|
+
return _context1.abrupt("return");
|
|
928
|
+
case 1:
|
|
929
|
+
this._translateLanguage = null;
|
|
930
|
+
now = Date.now();
|
|
931
|
+
sentence = {
|
|
932
|
+
type: 'action',
|
|
933
|
+
id: "".concat(_type3.FcrUISttActionType.STOP_TRANSLATION, "-").concat(now),
|
|
934
|
+
actionType: _type3.FcrUISttActionType.STOP_TRANSLATION,
|
|
935
|
+
startTs: now
|
|
936
|
+
};
|
|
937
|
+
this._transcribingList.push(sentence);
|
|
938
|
+
_context1.prev = 2;
|
|
939
|
+
_context1.next = 3;
|
|
940
|
+
return this._sttControl.unsubscribeTranscribingLanguage();
|
|
941
|
+
case 3:
|
|
942
|
+
_context1.next = 5;
|
|
943
|
+
break;
|
|
944
|
+
case 4:
|
|
945
|
+
_context1.prev = 4;
|
|
946
|
+
_t3 = _context1["catch"](2);
|
|
947
|
+
// 取消订阅失败, 恢复之前的值
|
|
948
|
+
this._translateLanguage = previous;
|
|
949
|
+
throw _t3;
|
|
950
|
+
case 5:
|
|
951
|
+
case "end":
|
|
952
|
+
return _context1.stop();
|
|
953
|
+
}
|
|
954
|
+
}, _callee1, this, [[2, 4]]);
|
|
955
|
+
}));
|
|
956
|
+
function _unsubscribeTranslateLanguage() {
|
|
957
|
+
return _unsubscribeTranslateLanguage2.apply(this, arguments);
|
|
958
|
+
}
|
|
959
|
+
return _unsubscribeTranslateLanguage;
|
|
960
|
+
}() /** 标记开启过转写 */
|
|
961
|
+
}, {
|
|
962
|
+
key: "_markHasEverEnabledTranscribing",
|
|
963
|
+
value: (function () {
|
|
964
|
+
var _markHasEverEnabledTranscribing2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
965
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
966
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
967
|
+
case 0:
|
|
968
|
+
if (!(this._roomControl.getRoomPropertiesByKeyPath('stt.transcribingChanged') === true)) {
|
|
969
|
+
_context10.next = 1;
|
|
970
|
+
break;
|
|
971
|
+
}
|
|
972
|
+
return _context10.abrupt("return");
|
|
973
|
+
case 1:
|
|
974
|
+
_context10.next = 2;
|
|
975
|
+
return this._roomControl.updateRoomProperties({
|
|
976
|
+
'stt.transcribingChanged': true
|
|
977
|
+
});
|
|
978
|
+
case 2:
|
|
979
|
+
this._hasEverEnabledTranscribing = true;
|
|
980
|
+
case 3:
|
|
981
|
+
case "end":
|
|
982
|
+
return _context10.stop();
|
|
983
|
+
}
|
|
984
|
+
}, _callee10, this);
|
|
985
|
+
}));
|
|
986
|
+
function _markHasEverEnabledTranscribing() {
|
|
987
|
+
return _markHasEverEnabledTranscribing2.apply(this, arguments);
|
|
988
|
+
}
|
|
989
|
+
return _markHasEverEnabledTranscribing;
|
|
990
|
+
}())
|
|
991
|
+
}]);
|
|
992
|
+
}();
|
|
993
|
+
_FcrUISttProviderImpl = FcrUISttProviderImpl;
|
|
994
|
+
var _applyDecs$e = _applyDecs(_FcrUISttProviderImpl, [[_mobx.observable, 1, "_captionState"], [_mobx.observable, 1, "_transcribingState"], [_mobx.observable, 1, "_openOrStopTranscribingUser"], [_mobx.observable, 1, "_hasEverEnabledTranscribing"], [_mobx.observable, 1, "_languageOptions"], [_mobx.observable, 1, "_sourceLanguage"], [_mobx.observable, 1, "_translateLanguage"], [_mobx.observable, 1, "_transcribingList"], [_mobx.observable, 1, "_captionSentence"], [_mobx.observable, 1, "_preCaptionSentence"], [_mobx.observable, 1, "_isCaptionOpening"], [_imports.bound, 2, "acceptOpenTranscribing"], [_imports.bound, 2, "rejectOpenTranscribing"], [_imports.bound, 2, "startCaption"], [_imports.bound, 2, "stopCaption"], [_imports.bound, 2, "startTranscribing"], [_imports.bound, 2, "stopTranscribing"], [_imports.bound, 2, "updateSourceLanguage"], [_imports.bound, 2, "subscribeTranslateLanguage"], [_imports.bound, 2, "clearCaptionSentence"], [_imports.bound, 2, "clearPreCaptionSentence"], [_imports.bound, 2, "allowStartTranscribe"], [_imports.bound, 2, "allowStartCaption"], [_imports.bound, 2, "allowSetSourceLanguage"], [_imports.bound, 2, "_handleSttEventReceived"]], []).e;
|
|
995
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 12);
|
|
996
|
+
_init__captionState = _applyDecs$e2[0];
|
|
997
|
+
_init__transcribingState = _applyDecs$e2[1];
|
|
998
|
+
_init__openOrStopTranscribingUser = _applyDecs$e2[2];
|
|
999
|
+
_init__hasEverEnabledTranscribing = _applyDecs$e2[3];
|
|
1000
|
+
_init__languageOptions = _applyDecs$e2[4];
|
|
1001
|
+
_init__sourceLanguage = _applyDecs$e2[5];
|
|
1002
|
+
_init__translateLanguage = _applyDecs$e2[6];
|
|
1003
|
+
_init__transcribingList = _applyDecs$e2[7];
|
|
1004
|
+
_init__captionSentence = _applyDecs$e2[8];
|
|
1005
|
+
_init__preCaptionSentence = _applyDecs$e2[9];
|
|
1006
|
+
_init__isCaptionOpening = _applyDecs$e2[10];
|
|
1007
|
+
_initProto = _applyDecs$e2[11];
|
|
1008
|
+
_applyDecs$e;
|