fcr-ui-scene 3.4.0 → 3.4.2
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/ scenes/base.d.ts +10 -0
- package/lib/ scenes/base.js +75 -0
- package/lib/ scenes/main-scene.d.ts +43 -0
- package/lib/ scenes/main-scene.js +368 -0
- package/lib/ scenes/waiting-scene.d.ts +31 -0
- package/lib/ scenes/waiting-scene.js +119 -0
- package/lib/base.d.ts +40 -5
- package/lib/base.js +237 -22
- package/lib/common/device-store.d.ts +12 -22
- package/lib/common/device-store.js +154 -247
- package/lib/common/device-stream-store.d.ts +4 -22
- package/lib/common/device-stream-store.js +113 -297
- package/lib/common/event-store.d.ts +10 -35
- package/lib/common/event-store.js +13 -64
- package/lib/common/room-store.js +4 -4
- package/lib/common/security-store.d.ts +26 -44
- package/lib/common/security-store.js +372 -329
- package/lib/common/type.d.ts +8 -0
- package/lib/common/type.js +6 -0
- package/lib/creator.d.ts +1 -1
- package/lib/creator.js +4 -9
- package/lib/electron/app.js +25 -7
- package/lib/electron/bootstrap-dev.js +0 -7
- package/lib/electron/bootstrap-sdk.js +11 -2
- package/lib/electron/injections.d.ts +3 -1
- package/lib/electron/injections.js +17 -2
- package/lib/electron/logger.d.ts +0 -4
- package/lib/electron/logger.js +2 -5
- package/lib/electron/main.js +1 -1
- package/lib/electron/plugins/devtool-shortcut.js +10 -1
- package/lib/electron/plugins/meeting-state.js +1 -1
- package/lib/electron/preload.js +3 -1
- package/lib/error-fallback.css +62 -0
- package/lib/error-fallback.d.ts +2 -0
- package/lib/error-fallback.js +19 -0
- package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +1 -44
- package/lib/fragments/control-bar/control-bar-store.js +80 -457
- package/lib/fragments/control-bar/device/index.js +3 -5
- package/lib/fragments/control-bar/index.css +10 -15
- package/lib/fragments/control-bar/index.js +0 -24
- package/lib/fragments/control-bar/more-actions/index.css +0 -53
- package/lib/fragments/control-bar/more-actions/index.js +38 -73
- package/lib/fragments/control-bar/security-content/index.css +0 -75
- package/lib/fragments/control-bar/security-content/index.js +19 -105
- package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
- package/lib/fragments/control-bar/view.js +8 -23
- package/lib/fragments/live-streaming/store.d.ts +1 -1
- package/lib/fragments/live-streaming/store.js +1 -1
- package/lib/fragments/live-streaming/view.js +2 -4
- package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
- package/lib/fragments/share-screen-selection/selection-store.js +1 -1
- package/lib/fragments/share-screen-selection/view.js +20 -20
- package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
- package/lib/fragments/toolbar/components/pen-picker.js +1 -1
- package/lib/fragments/toolbar/components/shape-picker.js +1 -1
- package/lib/fragments/toolbar/components/wrapper.js +1 -1
- package/lib/fragments/toolbar/hooks.js +1 -1
- package/lib/fragments/toolbar/store.d.ts +1 -1
- package/lib/global.css +5 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -4
- package/lib/login-confirm-dialog.d.ts +1 -0
- package/lib/login-confirm-dialog.js +7 -2
- package/lib/modules/Interpreter/action/delete-btn/index.d.ts +2 -2
- package/lib/modules/Interpreter/action/edit-btn/index.d.ts +0 -1
- package/lib/modules/Interpreter/action/edit-btn/index.js +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.css +3 -0
- package/lib/modules/Interpreter/action/switch-btn/index.d.ts +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.js +8 -8
- package/lib/modules/Interpreter/dialog-content/index.d.ts +2 -2
- package/lib/modules/Interpreter/dialog-content/index.js +4 -4
- package/lib/modules/Interpreter/footer/index.css +4 -3
- package/lib/modules/Interpreter/index.d.ts +11 -19
- package/lib/modules/Interpreter/index.js +23 -24
- package/lib/modules/Interpreter/interpreter-list/index.css +5 -1
- package/lib/modules/Interpreter/interpreter-list/index.d.ts +1 -0
- package/lib/modules/Interpreter/interpreter-list/index.js +3 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +0 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +1 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -7
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +66 -92
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +6 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +58 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +2 -2
- package/lib/modules/Interpreter/store.d.ts +24 -78
- package/lib/modules/Interpreter/store.js +212 -1255
- package/lib/modules/Interpreter/type.d.ts +24 -0
- package/lib/modules/Interpreter/type.js +12 -0
- package/lib/modules/Interpreter/utils.d.ts +8 -0
- package/lib/modules/Interpreter/utils.js +81 -0
- package/lib/modules/Interpreter/view.d.ts +0 -1
- package/lib/modules/Interpreter/view.js +20 -6
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -4
- package/lib/modules/action-bar/action-bar-collapes-items.js +14 -31
- package/lib/modules/action-bar/apps/useInterpreter.js +4 -2
- package/lib/modules/action-bar/chat/index.js +8 -8
- package/lib/modules/action-bar/components/apps/app-item/index.css +34 -0
- package/lib/modules/action-bar/components/apps/app-item/index.d.ts +3 -0
- package/lib/modules/action-bar/components/apps/app-item/index.js +61 -0
- package/lib/modules/action-bar/components/apps/appitems.d.ts +3 -0
- package/lib/modules/action-bar/components/apps/appitems.js +45 -0
- package/lib/modules/action-bar/components/apps/index.css +8 -0
- package/lib/modules/action-bar/components/apps/index.d.ts +4 -0
- package/lib/modules/action-bar/components/apps/index.js +56 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +9 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +29 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +10 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +36 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +14 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.js +37 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +16 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +41 -0
- package/lib/modules/action-bar/components/board/index.d.ts +4 -0
- package/lib/modules/action-bar/components/board/index.js +34 -0
- package/lib/modules/action-bar/components/breakout-room/index.d.ts +4 -0
- package/lib/modules/action-bar/components/breakout-room/index.js +32 -0
- package/lib/modules/action-bar/components/chat/index.css +80 -0
- package/lib/modules/action-bar/components/chat/index.d.ts +5 -0
- package/lib/modules/action-bar/components/chat/index.js +154 -0
- package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
- package/lib/modules/action-bar/components/collapse/index.js +222 -0
- package/lib/modules/action-bar/components/device/index.css +162 -0
- package/lib/modules/action-bar/components/device/index.d.ts +8 -0
- package/lib/modules/action-bar/components/device/index.js +611 -0
- package/lib/modules/action-bar/components/interpreter/index.d.ts +2 -0
- package/lib/modules/action-bar/components/interpreter/index.js +41 -0
- package/lib/modules/action-bar/components/item/index.d.ts +9 -0
- package/lib/modules/action-bar/components/item/index.js +164 -0
- package/lib/modules/action-bar/components/item.d.ts +27 -0
- package/lib/modules/action-bar/components/item.js +164 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/assign-host.js +64 -0
- package/lib/modules/action-bar/components/leave/index.css +126 -0
- package/lib/modules/action-bar/components/leave/index.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/index.js +144 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.js +153 -0
- package/lib/modules/action-bar/components/live-streaming/index.d.ts +4 -0
- package/lib/modules/action-bar/components/live-streaming/index.js +39 -0
- package/lib/modules/action-bar/components/more/index.css +114 -0
- package/lib/modules/action-bar/components/more/index.d.ts +5 -0
- package/lib/modules/action-bar/components/more/index.js +87 -0
- package/lib/modules/action-bar/components/more/poppover-content.d.ts +5 -0
- package/lib/modules/action-bar/components/more/poppover-content.js +423 -0
- package/lib/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/components/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/components/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/components/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/components/participants/index.css +21 -0
- package/lib/modules/action-bar/components/participants/index.d.ts +5 -0
- package/lib/modules/action-bar/components/participants/index.js +83 -0
- package/lib/modules/action-bar/components/placement/index.d.ts +4 -0
- package/lib/modules/action-bar/components/placement/index.js +18 -0
- package/lib/modules/action-bar/components/record/index.css +39 -0
- package/lib/modules/action-bar/components/record/index.d.ts +5 -0
- package/lib/modules/action-bar/components/record/index.js +166 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +3 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.js +48 -0
- package/lib/modules/action-bar/components/respond/index.d.ts +4 -0
- package/lib/modules/action-bar/components/respond/index.js +32 -0
- package/lib/modules/action-bar/components/screen-share/index.d.ts +4 -0
- package/lib/modules/action-bar/components/screen-share/index.js +106 -0
- package/lib/modules/action-bar/components/screen-share/submenu.d.ts +1 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +177 -0
- package/lib/modules/action-bar/components/security/index.d.ts +4 -0
- package/lib/modules/action-bar/components/security/index.js +60 -0
- package/lib/modules/action-bar/components/settings/index.d.ts +4 -0
- package/lib/modules/action-bar/components/settings/index.js +42 -0
- package/lib/modules/action-bar/components/smaller/index.d.ts +1 -0
- package/lib/modules/action-bar/components/smaller/index.js +52 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.js +215 -0
- package/lib/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.d.ts +2 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.js +230 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +37 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +70 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +209 -0
- package/lib/modules/action-bar/device/index.css +2 -7
- package/lib/modules/action-bar/device/index.js +24 -22
- package/lib/modules/action-bar/enums.d.ts +23 -0
- package/lib/modules/action-bar/enums.js +35 -0
- package/lib/modules/action-bar/index.css +23 -1
- package/lib/modules/action-bar/index.d.ts +36 -26
- package/lib/modules/action-bar/index.dev.d.ts +0 -1
- package/lib/modules/action-bar/index.dev.js +94 -100
- package/lib/modules/action-bar/index.js +46 -18
- package/lib/modules/action-bar/leave/assign-host.d.ts +0 -3
- package/lib/modules/action-bar/leave/assign-host.js +4 -2
- package/lib/modules/action-bar/leave/index.css +0 -10
- package/lib/modules/action-bar/leave/index.js +34 -84
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +1 -13
- package/lib/modules/action-bar/leave/leave-meeting.js +19 -37
- package/lib/modules/action-bar/live-streaming/index.js +3 -3
- package/lib/modules/action-bar/more/index.js +6 -9
- package/lib/modules/action-bar/more/poppover-content.js +16 -37
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/participants/index.css +0 -12
- package/lib/modules/action-bar/participants/index.js +16 -23
- package/lib/modules/action-bar/record/index.js +4 -4
- package/lib/modules/action-bar/screen-share/index.js +5 -9
- package/lib/modules/action-bar/screen-share/submenu.js +26 -20
- package/lib/modules/action-bar/security/drop-menu.js +22 -137
- package/lib/modules/action-bar/security/index.js +6 -11
- package/lib/modules/action-bar/settings/index.js +4 -4
- package/lib/modules/action-bar/smaller.js +4 -4
- package/lib/modules/action-bar/store.d.ts +84 -99
- package/lib/modules/action-bar/store.js +545 -699
- package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +15 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.js +220 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +14 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +4 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +36 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/types.d.ts +94 -0
- package/lib/modules/action-bar/types.js +6 -0
- package/lib/modules/action-bar/view.d.ts +1 -2
- package/lib/modules/action-bar/view.js +14 -14
- package/lib/modules/audio-stream/index.d.ts +22 -23
- package/lib/modules/audio-stream/index.js +79 -85
- package/lib/modules/chat/chat-bar/index.css +0 -1
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +37 -47
- package/lib/modules/chat/chat-room-store.d.ts +135 -0
- package/lib/modules/chat/chat-room-store.js +954 -0
- package/lib/modules/chat/chat-select/index.css +4 -21
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +4 -18
- package/lib/modules/chat/chat.d.ts +2 -1
- package/lib/modules/chat/chat.js +127 -194
- package/lib/modules/chat/components/chat-action/index.d.ts +1 -0
- package/lib/modules/chat/components/chat-action/index.js +28 -0
- package/lib/modules/chat/components/chat-bar/index.css +85 -0
- package/lib/modules/chat/components/chat-bar/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-bar/index.js +145 -0
- package/lib/modules/chat/components/chat-select/index.css +185 -0
- package/lib/modules/chat/components/chat-select/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-select/index.js +237 -0
- package/lib/modules/chat/components/message-list/index.d.ts +4 -0
- package/lib/modules/chat/components/message-list/index.js +650 -0
- package/lib/modules/chat/index.css +10 -0
- package/lib/modules/chat/index.d.ts +13 -15
- package/lib/modules/chat/index.dev.d.ts +0 -1
- package/lib/modules/chat/index.dev.js +72 -62
- package/lib/modules/chat/index.js +48 -38
- package/lib/modules/chat/message-list.js +51 -67
- package/lib/modules/chat/mock.d.ts +1 -1
- package/lib/modules/chat/store.d.ts +17 -162
- package/lib/modules/chat/store.js +95 -963
- package/lib/modules/chat/types.d.ts +70 -0
- package/lib/modules/chat/types.js +17 -0
- package/lib/modules/chat/view.d.ts +10 -0
- package/lib/modules/chat/view.js +372 -0
- package/lib/modules/components/device-control/components/audio-menu/index.js +6 -6
- package/lib/modules/components/device-control/components/microphone/index.js +7 -7
- package/lib/modules/components/device-control/index.css +3 -0
- package/lib/modules/components/device-control/store.d.ts +11 -12
- package/lib/modules/components/device-control/store.js +46 -49
- package/lib/modules/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/components/dialog-container/component/body.js +47 -0
- package/lib/modules/components/dialog-container/index.css +78 -0
- package/lib/modules/components/dialog-container/index.d.ts +11 -0
- package/lib/modules/components/dialog-container/index.js +110 -0
- package/lib/modules/components/leave-meeting/components/assign-host.d.ts +3 -0
- package/lib/modules/components/leave-meeting/components/assign-host.js +70 -0
- package/lib/modules/components/leave-meeting/components/index.css +125 -0
- package/lib/modules/components/leave-meeting/index.d.ts +4 -0
- package/lib/modules/components/leave-meeting/index.js +147 -0
- package/lib/modules/components/leave-meeting/store.d.ts +31 -0
- package/lib/modules/components/leave-meeting/store.js +292 -0
- package/lib/modules/components/member-window/index.css +419 -0
- package/lib/modules/components/member-window/index.d.ts +76 -0
- package/lib/modules/components/member-window/index.js +894 -0
- package/lib/modules/components/security-menu/index.css +9 -0
- package/lib/modules/components/security-menu/index.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +108 -58
- package/lib/modules/components/tab-frame/index.css +40 -0
- package/lib/modules/components/tab-frame/index.d.ts +12 -0
- package/lib/modules/components/tab-frame/index.js +78 -0
- package/lib/modules/connection-gateway/components/computer/index.css +1 -0
- package/lib/modules/connection-gateway/components/computer/index.js +4 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +1 -1
- package/lib/modules/connection-gateway/components/phone/index.css +1 -1
- package/lib/modules/connection-gateway/components/phone/index.js +2 -2
- package/lib/modules/connection-gateway/components/tabs/index.js +1 -2
- package/lib/modules/connection-gateway/enums.d.ts +4 -0
- package/lib/modules/connection-gateway/enums.js +12 -0
- package/lib/modules/connection-gateway/index.d.ts +13 -11
- package/lib/modules/connection-gateway/index.js +25 -15
- package/lib/modules/connection-gateway/store.d.ts +19 -23
- package/lib/modules/connection-gateway/store.js +61 -53
- package/lib/modules/connection-gateway/types.d.ts +4 -0
- package/lib/modules/connection-gateway/types.js +6 -0
- package/lib/modules/connection-gateway/view.js +21 -4
- package/lib/modules/control-bar/components/cloud-recording-buttons.js +1 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +30 -25
- package/lib/modules/control-bar/components/more-actions/index.css +18 -0
- package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -5
- package/lib/modules/control-bar/components/more-actions/index.js +58 -9
- package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -7
- package/lib/modules/control-bar/components/share-state-nav/index.js +2 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.d.ts +1 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.js +2 -2
- package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -10
- package/lib/modules/control-bar/components/transfer-position-icon/index.js +7 -12
- package/lib/modules/control-bar/enums.d.ts +21 -0
- package/lib/modules/control-bar/enums.js +31 -0
- package/lib/modules/control-bar/index.d.ts +30 -21
- package/lib/modules/control-bar/index.js +46 -36
- package/lib/modules/control-bar/store.d.ts +36 -37
- package/lib/modules/control-bar/store.js +188 -280
- package/lib/modules/control-bar/types.d.ts +20 -0
- package/lib/modules/control-bar/types.js +6 -0
- package/lib/modules/control-bar/view.js +83 -42
- package/lib/modules/device-pretest/index.js +4 -4
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib/modules/device-pretest/store.d.ts +8 -9
- package/lib/modules/device-pretest/store.js +52 -36
- package/lib/modules/dialog/components/Interpreter/electron.js +22 -38
- package/lib/modules/dialog/components/Interpreter/index.js +14 -43
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
- package/lib/modules/dialog/components/chat/electron.js +21 -19
- package/lib/modules/dialog/components/chat/index.d.ts +1 -4
- package/lib/modules/dialog/components/chat/index.js +35 -41
- package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +68 -38
- package/lib/modules/dialog/components/confirm/index.js +7 -8
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.js +13 -34
- package/lib/modules/dialog/components/connection-gateway/index.css +2 -0
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -2
- package/lib/modules/dialog/components/connection-gateway/index.js +26 -58
- package/lib/modules/dialog/components/connection-gateway/tabs.d.ts +6 -0
- package/lib/modules/dialog/components/connection-gateway/tabs.js +44 -0
- package/lib/modules/dialog/components/control-bar/index.d.ts +5 -1
- package/lib/modules/dialog/components/control-bar/index.js +123 -11
- package/lib/modules/dialog/components/device-setting/electron.js +7 -25
- package/lib/modules/dialog/components/device-setting/index.js +13 -41
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/dialog/components/dialog-container/component/body.js +77 -0
- package/lib/modules/dialog/components/dialog-container/index.css +81 -0
- package/lib/modules/dialog/components/dialog-container/index.d.ts +16 -0
- package/lib/modules/dialog/components/dialog-container/index.js +112 -0
- package/lib/modules/dialog/components/invite/index.js +44 -38
- package/lib/modules/dialog/components/live-streaming/index.js +23 -54
- package/lib/modules/dialog/components/participant/electron.js +12 -19
- package/lib/modules/dialog/components/participant/index.js +37 -27
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +3 -6
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +4 -14
- package/lib/modules/dialog/components/share-screen-selection/index.js +26 -7
- package/lib/modules/dialog/components/system-preference/electron.js +6 -9
- package/lib/modules/dialog/components/system-preference/index.js +4 -15
- package/lib/modules/dialog/components/toast/index.js +9 -13
- package/lib/modules/dialog/components/video-window/index.d.ts +2 -0
- package/lib/modules/dialog/components/video-window/index.js +148 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -2
- package/lib/modules/dialog/dialogs.d.ts +2 -5
- package/lib/modules/dialog/dialogs.js +2 -156
- package/lib/modules/dialog/hooks/useElectron.d.ts +4 -20
- package/lib/modules/dialog/hooks/useElectron.js +127 -29
- package/lib/modules/dialog/index.css +0 -2
- package/lib/modules/dialog/index.d.ts +28 -17
- package/lib/modules/dialog/index.js +62 -6
- package/lib/modules/dialog/store.d.ts +43 -41
- package/lib/modules/dialog/store.js +158 -201
- package/lib/modules/dialog/types/index.d.ts +70 -0
- package/lib/modules/event-confirm/index.css +1 -1
- package/lib/modules/event-confirm/index.d.ts +13 -6
- package/lib/modules/event-confirm/index.js +28 -11
- package/lib/modules/event-confirm/store.d.ts +9 -3
- package/lib/modules/event-confirm/store.js +16 -7
- package/lib/modules/event-confirm/view.js +9 -2
- package/lib/modules/event-toast/index.d.ts +7 -6
- package/lib/modules/event-toast/index.js +19 -8
- package/lib/modules/event-toast/store.d.ts +8 -3
- package/lib/modules/event-toast/store.js +15 -6
- package/lib/modules/invite/components/error-tips.d.ts +4 -0
- package/lib/modules/invite/components/error-tips.js +18 -0
- package/lib/modules/invite/components/pstn-invite.d.ts +2 -0
- package/lib/modules/invite/components/pstn-invite.js +297 -0
- package/lib/modules/invite/components/voip-invite.d.ts +1 -0
- package/lib/modules/invite/components/voip-invite.js +276 -0
- package/lib/modules/invite/enums.d.ts +22 -0
- package/lib/modules/invite/enums.js +33 -0
- package/lib/modules/invite/index.d.ts +7 -8
- package/lib/modules/invite/index.js +17 -15
- package/lib/modules/invite/pstn-invite.js +9 -7
- package/lib/modules/invite/store.d.ts +11 -26
- package/lib/modules/invite/store.js +55 -25
- package/lib/modules/invite/types.d.ts +14 -0
- package/lib/modules/invite/types.js +6 -0
- package/lib/modules/invite/view.js +19 -27
- package/lib/modules/invite/voip-invite.js +3 -2
- package/lib/modules/layout/components/Aside.js +45 -18
- package/lib/modules/layout/components/Carousel.js +2 -2
- package/lib/modules/layout/components/Gallery.js +1 -1
- package/lib/modules/layout/components/Layout.js +7 -4
- package/lib/modules/layout/components/index.css +6 -1
- package/lib/modules/layout/components/index.d.ts +1 -1
- package/lib/modules/layout/components/index.js +4 -4
- package/lib/modules/layout/components/who-is-speaking.d.ts +2 -0
- package/lib/modules/layout/components/who-is-speaking.js +60 -0
- package/lib/modules/layout/index.d.ts +26 -4
- package/lib/modules/layout/index.dev.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +312 -386
- package/lib/modules/layout/index.js +33 -17
- package/lib/modules/layout/member-window/index.css +10 -95
- package/lib/modules/layout/member-window/index.d.ts +3 -10
- package/lib/modules/layout/member-window/index.js +115 -214
- package/lib/modules/layout/store.d.ts +61 -71
- package/lib/modules/layout/store.js +311 -579
- package/lib/modules/layout/video-window-datasource.js +11 -3
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +127 -2
- package/lib/modules/live-streaming/index.d.ts +15 -7
- package/lib/modules/live-streaming/index.dev.js +13 -13
- package/lib/modules/live-streaming/index.js +20 -15
- package/lib/modules/live-streaming/store.d.ts +21 -14
- package/lib/modules/live-streaming/store.js +84 -144
- package/lib/modules/live-streaming/view.js +2 -2
- package/lib/modules/notification/index.css +1 -0
- package/lib/modules/notification/index.d.ts +9 -11
- package/lib/modules/notification/index.js +21 -14
- package/lib/modules/notification/interpreter-status/index.js +1 -2
- package/lib/modules/notification/store.d.ts +5 -11
- package/lib/modules/notification/store.js +12 -62
- package/lib/modules/notification/view.d.ts +5 -3
- package/lib/modules/notification/view.js +8 -5
- package/lib/modules/offscreen-pulling/index.js +1 -1
- package/lib/modules/participant/attendee/index.css +52 -0
- package/lib/modules/participant/attendee/index.d.ts +5 -8
- package/lib/modules/participant/attendee/index.js +17 -62
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/attendee/index.js +337 -0
- package/lib/modules/participant/components/can-moveable/index.d.ts +1 -0
- package/lib/modules/participant/components/can-moveable/index.js +68 -0
- package/lib/modules/participant/components/drop-menu/index.css +1 -0
- package/lib/modules/participant/components/drop-menu/index.js +17 -17
- package/lib/modules/participant/components/footer/buttons.d.ts +2 -3
- package/lib/modules/participant/components/footer/buttons.js +2 -3
- package/lib/modules/participant/components/footer/index.js +2 -2
- package/lib/modules/participant/components/mute-all/index.d.ts +3 -4
- package/lib/modules/participant/components/mute-all/index.js +31 -44
- package/lib/modules/participant/components/operate-waitingroom-member/index.d.ts +2 -0
- package/lib/modules/participant/components/operate-waitingroom-member/index.js +48 -0
- package/lib/modules/participant/components/participants/index.js +27 -50
- package/lib/modules/participant/components/user-action/index.d.ts +17 -0
- package/lib/modules/participant/components/user-action/index.js +169 -0
- package/lib/modules/participant/index.css +5 -0
- package/lib/modules/participant/index.d.ts +34 -22
- package/lib/modules/participant/index.dev.d.ts +0 -1
- package/lib/modules/participant/index.dev.js +87 -105
- package/lib/modules/participant/index.js +39 -13
- package/lib/modules/participant/member-list-data-source.d.ts +4 -1
- package/lib/modules/participant/member-list-data-source.js +58 -31
- package/lib/modules/participant/room-control-drop-menu/index.css +0 -37
- package/lib/modules/participant/store.d.ts +59 -39
- package/lib/modules/participant/store.js +330 -307
- package/lib/modules/participant/type.d.ts +45 -1
- package/lib/modules/participant/type.js +15 -1
- package/lib/modules/pc-audio-connect/index.css +12 -0
- package/lib/modules/pc-audio-connect/index.d.ts +22 -0
- package/lib/modules/pc-audio-connect/index.js +68 -0
- package/lib/modules/pc-audio-connect/store.d.ts +46 -0
- package/lib/modules/pc-audio-connect/store.js +301 -0
- package/lib/modules/pc-audio-connect/types.d.ts +0 -0
- package/lib/modules/pc-audio-connect/types.js +1 -0
- package/lib/modules/pc-audio-connect/view.d.ts +3 -0
- package/lib/modules/pc-audio-connect/view.js +66 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.d.ts +10 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +77 -0
- package/lib/modules/phone-audio-connect/components/calling/index.css +72 -0
- package/lib/modules/phone-audio-connect/components/calling/index.d.ts +7 -0
- package/lib/modules/phone-audio-connect/components/calling/index.js +58 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.d.ts +5 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.js +24 -0
- package/lib/modules/phone-audio-connect/components/useing/index.css +46 -0
- package/lib/modules/phone-audio-connect/components/useing/index.d.ts +3 -0
- package/lib/modules/phone-audio-connect/components/useing/index.js +36 -0
- package/lib/modules/phone-audio-connect/enums.d.ts +4 -0
- package/lib/modules/phone-audio-connect/enums.js +12 -0
- package/lib/modules/phone-audio-connect/index.css +56 -0
- package/lib/modules/phone-audio-connect/index.d.ts +16 -0
- package/lib/modules/phone-audio-connect/index.js +63 -0
- package/lib/modules/phone-audio-connect/store.d.ts +46 -0
- package/lib/modules/phone-audio-connect/store.js +320 -0
- package/lib/modules/phone-audio-connect/types.d.ts +4 -0
- package/lib/modules/phone-audio-connect/types.js +6 -0
- package/lib/modules/phone-audio-connect/view.d.ts +3 -0
- package/lib/modules/phone-audio-connect/view.js +184 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +18 -15
- package/lib/modules/setting/audio-settings/index.css +26 -1
- package/lib/modules/setting/general-settings/index.css +1 -1
- package/lib/modules/setting/index.css +2 -1
- package/lib/modules/setting/index.d.ts +25 -18
- package/lib/modules/setting/index.dev.d.ts +0 -1
- package/lib/modules/setting/index.dev.js +120 -72
- package/lib/modules/setting/index.js +35 -9
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
- package/lib/modules/setting/state/index.js +3 -3
- package/lib/modules/setting/store.d.ts +45 -24
- package/lib/modules/setting/store.js +143 -124
- package/lib/modules/setting/translate-settings/index.css +3 -1
- package/lib/modules/setting/translate-settings/translate-settings.js +3 -3
- package/lib/modules/setting/video-settings/index.css +5 -2
- package/lib/modules/setting/video-settings/video-settings-basic.js +19 -22
- package/lib/modules/setting/view.js +6 -35
- package/lib/modules/share-screen/components/selection/index.css +70 -0
- package/lib/modules/share-screen/components/selection/index.d.ts +2 -0
- package/lib/modules/share-screen/components/selection/index.js +267 -0
- package/lib/modules/share-screen/components/share-state-bar/index.css +76 -0
- package/lib/modules/share-screen/components/share-state-bar/index.d.ts +4 -0
- package/lib/modules/share-screen/components/share-state-bar/index.js +98 -0
- package/lib/modules/share-screen/index.d.ts +15 -18
- package/lib/modules/share-screen/index.dev.d.ts +0 -1
- package/lib/modules/share-screen/index.dev.js +90 -90
- package/lib/modules/share-screen/index.js +22 -22
- package/lib/modules/share-screen/selection/index.css +0 -2
- package/lib/modules/share-screen/selection/index.js +40 -51
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/share-screen/store.d.ts +36 -32
- package/lib/modules/share-screen/store.js +264 -253
- package/lib/modules/share-screen/types.d.ts +27 -0
- package/lib/modules/share-screen/types.js +6 -0
- package/lib/modules/share-screen/view.js +1 -1
- package/lib/modules/sound-effect/index.d.ts +9 -15
- package/lib/modules/sound-effect/index.js +72 -41
- package/lib/modules/sound-effect/sound-effect-player.js +1 -1
- package/lib/modules/state-bar/index.css +13 -2
- package/lib/modules/state-bar/index.d.ts +16 -17
- package/lib/modules/state-bar/index.dev.d.ts +0 -1
- package/lib/modules/state-bar/index.dev.js +78 -83
- package/lib/modules/state-bar/index.js +23 -34
- package/lib/modules/state-bar/layout-config.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +24 -12
- package/lib/modules/state-bar/meeting-network-state.css +1 -1
- package/lib/modules/state-bar/meeting-network-state.js +1 -1
- package/lib/modules/state-bar/recording.js +7 -4
- package/lib/modules/state-bar/store.d.ts +20 -10
- package/lib/modules/state-bar/store.js +84 -87
- package/lib/modules/state-bar/view.js +3 -3
- package/lib/modules/video-window/deviceState/index.d.ts +2 -2
- package/lib/modules/video-window/deviceState/index.js +4 -6
- package/lib/modules/video-window/index.css +1 -4
- package/lib/modules/video-window/index.d.ts +33 -6
- package/lib/modules/video-window/index.js +63 -15
- package/lib/modules/video-window/members/index.css +1 -0
- package/lib/modules/video-window/members/index.js +25 -11
- package/lib/modules/video-window/store.d.ts +58 -26
- package/lib/modules/video-window/store.js +166 -161
- package/lib/modules/waiting-room-layout/index.css +1 -3
- package/lib/modules/waiting-room-layout/index.d.ts +14 -5
- package/lib/modules/waiting-room-layout/index.js +34 -14
- package/lib/modules/waiting-room-layout/store.d.ts +6 -3
- package/lib/modules/waiting-room-layout/store.js +17 -15
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -4
- package/lib/modules/whiteboard/components/control-bar/store.js +8 -8
- package/lib/modules/whiteboard/index.d.ts +20 -25
- package/lib/modules/whiteboard/index.js +250 -224
- package/lib/modules/whiteboard/view.d.ts +2 -0
- package/lib/modules/whiteboard/view.js +49 -0
- package/lib/plugins/browser-runtime-plugin.js +5 -1
- package/lib/providers/chat-provider.d.ts +71 -0
- package/lib/providers/chat-provider.js +91 -0
- package/lib/providers/device-privilege-provider.d.ts +76 -0
- package/lib/providers/device-privilege-provider.js +415 -0
- package/lib/providers/device-provider.d.ts +404 -0
- package/lib/providers/device-provider.js +1829 -0
- package/lib/providers/device-stream-provider.d.ts +35 -0
- package/lib/providers/device-stream-provider.js +353 -0
- package/lib/providers/dialog-provider.d.ts +135 -0
- package/lib/providers/dialog-provider.js +204 -0
- package/lib/providers/event-provider.d.ts +88 -0
- package/lib/providers/event-provider.js +250 -0
- package/lib/providers/interpreter-provider.d.ts +236 -0
- package/lib/providers/interpreter-provider.js +1143 -0
- package/lib/providers/local-storage-provider.d.ts +17 -0
- package/lib/providers/local-storage-provider.js +31 -0
- package/lib/providers/message-provider.d.ts +69 -0
- package/lib/providers/message-provider.js +98 -0
- package/lib/providers/monitor-provider.d.ts +20 -0
- package/lib/providers/monitor-provider.js +29 -0
- package/lib/providers/phone-audio-provider.d.ts +131 -0
- package/lib/providers/phone-audio-provider.js +515 -0
- package/lib/providers/privilege-provider.d.ts +529 -0
- package/lib/providers/privilege-provider.js +782 -0
- package/lib/providers/renderer-provider.d.ts +85 -0
- package/lib/providers/renderer-provider.js +242 -0
- package/lib/providers/room-provider.d.ts +186 -0
- package/lib/providers/room-provider.js +1019 -0
- package/lib/providers/screen-share-provider.d.ts +65 -0
- package/lib/providers/screen-share-provider.js +238 -0
- package/lib/providers/session-provider.d.ts +56 -0
- package/lib/providers/session-provider.js +49 -0
- package/lib/runtime.d.ts +3 -1
- package/lib/scenes/base.d.ts +10 -0
- package/lib/scenes/base.js +75 -0
- package/lib/scenes/main-scene.d.ts +86 -0
- package/lib/scenes/main-scene.js +551 -0
- package/lib/scenes/waiting-scene.d.ts +61 -0
- package/lib/scenes/waiting-scene.js +236 -0
- package/lib/shared-data-source/chat-data.d.ts +14 -0
- package/lib/shared-data-source/chat-data.js +130 -0
- package/lib/shared-data-source/config.d.ts +16 -0
- package/lib/shared-data-source/config.js +21 -0
- package/lib/shared-data-source/device-privilege-data.d.ts +8 -0
- package/lib/shared-data-source/device-privilege-data.js +25 -0
- package/lib/shared-data-source/interpreter.d.ts +63 -0
- package/lib/shared-data-source/interpreter.js +248 -0
- package/lib/shared-data-source/layout-data.d.ts +29 -0
- package/lib/shared-data-source/layout-data.js +181 -0
- package/lib/shared-data-source/pin-data.d.ts +9 -0
- package/lib/shared-data-source/pin-data.js +24 -0
- package/lib/shared-data-source/setting.d.ts +32 -0
- package/lib/shared-data-source/setting.js +153 -0
- package/lib/shared-data-source/speaker-spotlight.d.ts +5 -0
- package/lib/shared-data-source/speaker-spotlight.js +15 -0
- package/lib/shared-data-source/video-window.d.ts +161 -0
- package/lib/shared-data-source/video-window.js +1202 -0
- package/lib/shared-data-source/waiting-room.d.ts +19 -0
- package/lib/shared-data-source/waiting-room.js +158 -0
- package/lib/translations/enUS.d.ts +43 -17
- package/lib/translations/enUS.js +59 -33
- package/lib/translations/zhCN.d.ts +43 -17
- package/lib/translations/zhCN.js +57 -31
- package/lib/type.d.ts +271 -1
- package/lib/type.js +67 -2
- package/lib/ui-manager.d.ts +20 -13
- package/lib/ui-manager.js +59 -874
- package/lib/ui-node.d.ts +25 -0
- package/lib/ui-node.js +156 -0
- package/lib/ui-scene.d.ts +6 -1
- package/lib/ui-scene.js +372 -42
- package/lib/utilities/constant.d.ts +63 -86
- package/lib/utilities/constant.js +151 -175
- package/lib/utilities/copyText.js +8 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/privilege.d.ts +4 -0
- package/lib/utilities/privilege.js +31 -0
- package/lib/utilities/setting-config-storage.d.ts +12 -0
- package/lib/utilities/setting-config-storage.js +102 -0
- package/lib/utilities/tools.d.ts +37 -3
- package/lib/utilities/tools.js +144 -10
- package/lib/utilities/video-track-render-context.d.ts +3 -4
- package/lib/utilities/video-track-render-context.js +1 -1
- package/package.json +12 -11
- package/public/assets/fcr_leave2.svg +58 -0
- package/public/assets/full-screen-error-boundary-img.png +0 -0
- package/public/assets/leave-meeting.png +0 -0
- package/public/index.html +160 -13
|
@@ -7,6 +7,7 @@ require("core-js/modules/es.error.cause.js");
|
|
|
7
7
|
require("core-js/modules/es.error.to-string.js");
|
|
8
8
|
require("core-js/modules/es.array.is-array.js");
|
|
9
9
|
require("core-js/modules/es.date.to-primitive.js");
|
|
10
|
+
require("core-js/modules/es.function.bind.js");
|
|
10
11
|
require("core-js/modules/es.function.name.js");
|
|
11
12
|
require("core-js/modules/es.map.js");
|
|
12
13
|
require("core-js/modules/es.number.constructor.js");
|
|
@@ -15,6 +16,7 @@ require("core-js/modules/es.object.define-properties.js");
|
|
|
15
16
|
require("core-js/modules/es.object.define-property.js");
|
|
16
17
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17
18
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
19
|
+
require("core-js/modules/es.object.keys.js");
|
|
18
20
|
require("core-js/modules/esnext.function.metadata.js");
|
|
19
21
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
20
22
|
require("core-js/modules/esnext.map.emplace.js");
|
|
@@ -37,9 +39,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
37
39
|
value: true
|
|
38
40
|
});
|
|
39
41
|
exports["default"] = exports.StoreContext = void 0;
|
|
40
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
41
42
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
42
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
43
43
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
44
44
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
45
45
|
require("core-js/modules/es.array.concat.js");
|
|
@@ -48,16 +48,12 @@ require("core-js/modules/es.array.filter.js");
|
|
|
48
48
|
require("core-js/modules/es.array.find.js");
|
|
49
49
|
require("core-js/modules/es.array.find-index.js");
|
|
50
50
|
require("core-js/modules/es.array.for-each.js");
|
|
51
|
-
require("core-js/modules/es.array.includes.js");
|
|
52
51
|
require("core-js/modules/es.array.iterator.js");
|
|
53
52
|
require("core-js/modules/es.array.map.js");
|
|
54
53
|
require("core-js/modules/es.array.push.js");
|
|
55
54
|
require("core-js/modules/es.array.sort.js");
|
|
56
|
-
require("core-js/modules/es.function.bind.js");
|
|
57
|
-
require("core-js/modules/es.object.keys.js");
|
|
58
55
|
require("core-js/modules/es.object.to-string.js");
|
|
59
56
|
require("core-js/modules/es.set.js");
|
|
60
|
-
require("core-js/modules/es.string.includes.js");
|
|
61
57
|
require("core-js/modules/es.string.iterator.js");
|
|
62
58
|
require("core-js/modules/es.weak-map.js");
|
|
63
59
|
require("core-js/modules/esnext.async-iterator.every.js");
|
|
@@ -98,7 +94,6 @@ require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
|
98
94
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
99
95
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
100
96
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
101
|
-
require("core-js/modules/web.timers.js");
|
|
102
97
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
103
98
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
104
99
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -106,22 +101,20 @@ var _mobx = require("mobx");
|
|
|
106
101
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
107
102
|
var _type = require("fcr-core/lib/type");
|
|
108
103
|
var _uuid = require("uuid");
|
|
109
|
-
var _eventStore = require("../../common/event-store");
|
|
110
104
|
var _dialogContent = require("./dialog-content");
|
|
111
|
-
var _fcrCore = require("fcr-core");
|
|
112
105
|
var _constant = require("../../utilities/constant");
|
|
113
106
|
var _type2 = require("agora-rte-sdk/lib/core/scene/type");
|
|
114
|
-
var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
115
|
-
var _type4 = require("agora-rte-sdk/lib/type");
|
|
116
|
-
var _constant2 = require("./constant");
|
|
117
|
-
var _switchOutputLanguageRoom = require("../action-bar/switch-output-language-room");
|
|
118
107
|
var _logger = require("agora-foundation/lib/logger");
|
|
119
|
-
var _store = require("../action-bar/store");
|
|
120
108
|
var _react = require("react");
|
|
121
109
|
var _useLanguageConfig = require("./interpreter-list/interpreter-item/components/pick-language/useLanguageConfig");
|
|
110
|
+
var _type3 = require("./type");
|
|
111
|
+
var _utils = require("./utils");
|
|
112
|
+
var _type4 = require("../../type");
|
|
122
113
|
var _excluded = ["randomKey"];
|
|
123
114
|
var _InterpreterStore;
|
|
124
|
-
var _initProto,
|
|
115
|
+
var _initProto, _init_localInterpreterUsers, _init_interpreterUsersEditState, _init_initUsers, _init_currentDialogId, _openInterpreterStateDecs, _closeInterpreterStateDecs, _setInterpreterListEditStateDecs, _addInterpreterUsersDecs, _deleteInterpreterUsersDecs, _updateInterpreterUsersDecs, _queryInterpreterUsersDecs, _getInterpreterStateDecs, _openUpdateInterpreterStateToastDecs, _updateInterpreterUsersToastDecs, _interpreterUsersJoinToastDecs, _closeConfirmDialogDecs, _openInofDialogDecs, _getInitUsersDecs, _updateUsersDecs, _closeInterpreterDialogDecs, _handleUiEventsDecs, _ref;
|
|
116
|
+
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; }
|
|
117
|
+
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; }
|
|
125
118
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
126
119
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
127
120
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -132,101 +125,104 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
132
125
|
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); }
|
|
133
126
|
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; }
|
|
134
127
|
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; }
|
|
135
|
-
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; }
|
|
136
|
-
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; }
|
|
137
|
-
// 生成本地翻译员初始值
|
|
138
|
-
var getInterpreterItem = function getInterpreterItem() {
|
|
139
|
-
return _objectSpread(_objectSpread({}, _constant2.initInterpreterItemModel), {}, {
|
|
140
|
-
randomKey: (0, _uuid.v4)()
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
128
|
var _A = /*#__PURE__*/new WeakMap();
|
|
144
129
|
var _B = /*#__PURE__*/new WeakMap();
|
|
145
130
|
var _C = /*#__PURE__*/new WeakMap();
|
|
146
131
|
var _D = /*#__PURE__*/new WeakMap();
|
|
147
|
-
|
|
148
|
-
var _F = /*#__PURE__*/new WeakMap();
|
|
149
|
-
var _G = /*#__PURE__*/new WeakMap();
|
|
150
|
-
var _H = /*#__PURE__*/new WeakMap();
|
|
151
|
-
_ref = (_openInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _closeInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _setInterpreterListEditStateDecs = [_mobx.action, _mobx.action.bound], _addInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _deleteInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _updateInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _queryInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _updateInterpreterRoomStatusDecs = [_mobx.action, _mobx.action.bound], _changeMainRoomStreamDecs = [_mobx.action, _mobx.action.bound], _toggleLanguageRoomDecs = [_mobx.action, _mobx.action.bound], _updateLanguageRoomListDecs = [_mobx.action, _mobx.action.bound], _changeInputLanguageDecs = [_mobx.action, _mobx.action.bound], _closeAllLanguageRoomInputDecs = [_mobx.action, _mobx.action.bound], _handleOutputLanguageRoomDecs = [_mobx.action, _mobx.action.bound], _changeOutputLanguageDecs = [_mobx.action, _mobx.action.bound], _bindLocalMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _joinInterpreterRoomDecs = [_mobx.action, _mobx.action.bound], _leaveInterpreterRoomDecs = [_mobx.action, _mobx.action.bound], _getInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _openInterpreterDialogDecs = [_mobx.action, _mobx.action.bound], _closeInterpreterDialogDecs = [_mobx.action, _mobx.action.bound], _getLocalUserByInterpreterDecs = [_mobx.action, _mobx.action.bound], _checkIsSelfOperationDecs = [_mobx.action, _mobx.action.bound], _interpreterUsersUpdatedToastDecs = [_mobx.action, _mobx.action.bound], _interpreterStateUpdatedToastDecs = [_mobx.action, _mobx.action.bound], _openUpdateInterpreterStateToastDecs = [_mobx.action, _mobx.action.bound], _updateInterpreterUsersToastDecs = [_mobx.action, _mobx.action.bound], _interpreterUsersJoinToastDecs = [_mobx.action, _mobx.action.bound], _closeConfirmDialogDecs = [_mobx.action, _mobx.action.bound], _openUpdateLanguageDialogDecs = [_mobx.action, _mobx.action.bound], _openCreateInterpreterStatusToastDecs = [_mobx.action, _mobx.action.bound], _openCancelInterpreterStatusToastDecs = [_mobx.action, _mobx.action.bound], _getInitUsersDecs = [_mobx.action, _mobx.action.bound], _updateUsersDecs = [_mobx.action, _mobx.action.bound], _clearTimerDecs = [_mobx.action, _mobx.action.bound], _clearRetryTaskTimerDecs = [_mobx.action, _mobx.action.bound], _restoreVolumeByMainRoomDecs = [_mobx.action, _mobx.action.bound], _adjustMainRoomVolumeDecs = [_mobx.action, _mobx.action.bound], _setInterpreterRoomControlInfoDecs = [_mobx.action, _mobx.action.bound], _onStreamVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
132
|
+
_ref = (_openInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _closeInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _setInterpreterListEditStateDecs = [_mobx.action, _mobx.action.bound], _addInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _deleteInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _updateInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _queryInterpreterUsersDecs = [_mobx.action, _mobx.action.bound], _getInterpreterStateDecs = [_mobx.action, _mobx.action.bound], _openUpdateInterpreterStateToastDecs = [_mobx.action, _mobx.action.bound], _updateInterpreterUsersToastDecs = [_mobx.action, _mobx.action.bound], _interpreterUsersJoinToastDecs = [_mobx.action, _mobx.action.bound], _closeConfirmDialogDecs = [_mobx.action, _mobx.action.bound], _openInofDialogDecs = [_mobx.action, _mobx.action.bound], _getInitUsersDecs = [_mobx.action, _mobx.action.bound], _updateUsersDecs = [_mobx.action, _mobx.action.bound], _closeInterpreterDialogDecs = [_mobx.action, _mobx.action.bound], _handleUiEventsDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
152
133
|
var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
153
134
|
function InterpreterStore(_ref2) {
|
|
154
135
|
var _this = this;
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
roomStore = _ref2.roomStore,
|
|
160
|
-
deviceStreamStore = _ref2.deviceStreamStore,
|
|
161
|
-
securityStore = _ref2.securityStore;
|
|
136
|
+
var mainRoomControl = _ref2.mainRoomControl,
|
|
137
|
+
eventProvider = _ref2.eventProvider,
|
|
138
|
+
interpreterProvider = _ref2.interpreterProvider,
|
|
139
|
+
sharedInterpreterDataSource = _ref2.sharedInterpreterDataSource;
|
|
162
140
|
(0, _classCallCheck2["default"])(this, InterpreterStore);
|
|
163
141
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
164
|
-
(0, _defineProperty2["default"])(this, "
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
142
|
+
(0, _defineProperty2["default"])(this, "_dialogInfo", {
|
|
143
|
+
interpreterListUpdated: {
|
|
144
|
+
title: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_attention'),
|
|
145
|
+
content: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_by_controller')
|
|
146
|
+
},
|
|
147
|
+
localBecomeInterpreter: {
|
|
148
|
+
title: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_as_interpreter'),
|
|
149
|
+
content: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_open_microphone')
|
|
150
|
+
},
|
|
151
|
+
localNotInterpreter: {
|
|
152
|
+
title: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_permission_revoke'),
|
|
153
|
+
content: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_status_cancel')
|
|
154
|
+
}
|
|
170
155
|
});
|
|
171
156
|
(0, _defineProperty2["default"])(this, "_confirmDialogs", new Set());
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.interpreterUsersJoinToast();
|
|
199
|
-
this._interpreterControl.addObserver({
|
|
200
|
-
onInterpreterStateUpdated: function onInterpreterStateUpdated() {
|
|
201
|
-
_this.interpreterStateUpdatedToast.apply(_this, arguments);
|
|
202
|
-
_this.interpreterState = _this.getInterpreterState();
|
|
203
|
-
_this.queryInterpreterUsers(); // 查询同声传译列表
|
|
204
|
-
_this.updateLanguageRoomList();
|
|
157
|
+
(0, _defineProperty2["default"])(this, "_interpreterProviderObserver", {
|
|
158
|
+
onLocalBecameInterpreter: function onLocalBecameInterpreter(supportedLanguages, outputLanguage) {
|
|
159
|
+
// 本地用户为翻译官进入房间
|
|
160
|
+
_this._interpreterUsersJoinToast(outputLanguage);
|
|
161
|
+
},
|
|
162
|
+
onLocalNotInterpreter: function onLocalNotInterpreter() {
|
|
163
|
+
//本地用户翻译官被取消
|
|
164
|
+
_this._openInofDialog(_this._dialogInfo.localNotInterpreter);
|
|
165
|
+
},
|
|
166
|
+
onLocalBecomeInterpreter: function onLocalBecomeInterpreter(supportedLanguages, outputLanguage) {
|
|
167
|
+
//本地用户被指定为翻译官
|
|
168
|
+
_this._openInofDialog(_this._dialogInfo.localBecomeInterpreter, supportedLanguages);
|
|
169
|
+
},
|
|
170
|
+
onLocalInterpreterUpdated: function onLocalInterpreterUpdated(supportedLanguages, outputLanguage) {
|
|
171
|
+
// 本地翻译官语言变更
|
|
172
|
+
_this._openInofDialog(_this._dialogInfo.interpreterListUpdated, supportedLanguages);
|
|
173
|
+
},
|
|
174
|
+
onInterpreterListUpdated: function onInterpreterListUpdated(interpreterList, operatorUser) {
|
|
175
|
+
// 查询同声传译列表
|
|
176
|
+
_this.queryInterpreterUsers();
|
|
177
|
+
|
|
178
|
+
// 关闭弹窗
|
|
179
|
+
_this.closeInterpreterDialog();
|
|
180
|
+
|
|
181
|
+
// 同声传译列表更新提醒
|
|
182
|
+
_this._updateInterpreterUsersToast(operatorUser);
|
|
205
183
|
},
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
_this.queryInterpreterUsers();
|
|
209
|
-
|
|
184
|
+
onInterpretationEnabled: function onInterpretationEnabled(interpreterList, operatorUser) {
|
|
185
|
+
// 查询同声传译列表
|
|
186
|
+
_this.queryInterpreterUsers();
|
|
187
|
+
|
|
188
|
+
// 关闭弹窗
|
|
189
|
+
_this.closeInterpreterDialog();
|
|
190
|
+
|
|
191
|
+
// 同声传译开启提醒
|
|
192
|
+
_this._openUpdateInterpreterStateToast({
|
|
193
|
+
enable: true
|
|
194
|
+
}, operatorUser);
|
|
210
195
|
},
|
|
211
|
-
|
|
212
|
-
|
|
196
|
+
onInterpretationDisabled: function onInterpretationDisabled(operatorUser) {
|
|
197
|
+
// 查询同声传译列表
|
|
198
|
+
_this.queryInterpreterUsers();
|
|
199
|
+
|
|
200
|
+
// 关闭弹窗
|
|
201
|
+
_this.closeInterpreterDialog();
|
|
202
|
+
|
|
203
|
+
// 同声传译关闭提醒
|
|
204
|
+
_this._openUpdateInterpreterStateToast({
|
|
205
|
+
enable: false
|
|
206
|
+
}, operatorUser);
|
|
207
|
+
|
|
208
|
+
// 关闭消息提示框
|
|
209
|
+
_this._closeConfirmDialog();
|
|
213
210
|
}
|
|
214
211
|
});
|
|
215
|
-
|
|
216
|
-
this._userControl.addObserver({
|
|
212
|
+
(0, _defineProperty2["default"])(this, "_userControlObserver", {
|
|
217
213
|
//成员加入
|
|
218
214
|
onRemoteUsersJoined: function onRemoteUsersJoined(roomId, events) {
|
|
219
215
|
_this._updateUsers({
|
|
220
216
|
roomId: roomId,
|
|
221
217
|
events: events
|
|
222
|
-
},
|
|
218
|
+
}, _type3.UpdateType.JOIN);
|
|
223
219
|
},
|
|
224
220
|
//成员离开
|
|
225
221
|
onRemoteUsersLeft: function onRemoteUsersLeft(roomId, events) {
|
|
226
222
|
_this._updateUsers({
|
|
227
223
|
roomId: roomId,
|
|
228
224
|
events: events
|
|
229
|
-
},
|
|
225
|
+
}, _type3.UpdateType.LEFT);
|
|
230
226
|
},
|
|
231
227
|
onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
|
|
232
228
|
_this._updateUsers({
|
|
@@ -235,34 +231,35 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
235
231
|
});
|
|
236
232
|
}
|
|
237
233
|
});
|
|
238
|
-
this
|
|
239
|
-
onEvent: this.
|
|
234
|
+
(0, _defineProperty2["default"])(this, "_eventProviderObserver", {
|
|
235
|
+
onEvent: this._handleUiEvents
|
|
240
236
|
});
|
|
241
|
-
this
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
this.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
237
|
+
_classPrivateFieldInitSpec(this, _A, _init_localInterpreterUsers(this, []));
|
|
238
|
+
// 本地同声传译列表
|
|
239
|
+
_classPrivateFieldInitSpec(this, _B, _init_interpreterUsersEditState(this, false));
|
|
240
|
+
// 同声传译列表-编辑状态
|
|
241
|
+
_classPrivateFieldInitSpec(this, _C, _init_initUsers(this, []));
|
|
242
|
+
// 历史用户列表
|
|
243
|
+
_classPrivateFieldInitSpec(this, _D, _init_currentDialogId(this, null));
|
|
244
|
+
this._mainRoomControl = mainRoomControl;
|
|
245
|
+
this._userControl = this._mainRoomControl.getUserControl();
|
|
246
|
+
this._eventProvider = eventProvider;
|
|
247
|
+
this._interpreterProvider = interpreterProvider;
|
|
248
|
+
this._sharedInterpreterDataSource = sharedInterpreterDataSource;
|
|
249
|
+
|
|
250
|
+
// 初始化历史参会者列表
|
|
251
|
+
this._getInitUsers();
|
|
252
|
+
this._interpreterProvider.addObserver(this._interpreterProviderObserver);
|
|
253
|
+
|
|
254
|
+
// 监听参会者人员变化
|
|
255
|
+
this._userControl.addObserver(this._userControlObserver);
|
|
256
|
+
this._eventProvider.addObserver(this._eventProviderObserver);
|
|
258
257
|
|
|
259
258
|
// @ts-ignore
|
|
260
259
|
window._interpreterStore = this;
|
|
261
260
|
}
|
|
262
|
-
|
|
263
|
-
// 同声传译——开关------------------------------------
|
|
264
261
|
return (0, _createClass2["default"])(InterpreterStore, [{
|
|
265
|
-
key: "
|
|
262
|
+
key: "localInterpreterUsers",
|
|
266
263
|
get: function get() {
|
|
267
264
|
return _classPrivateFieldGet(_A, this);
|
|
268
265
|
},
|
|
@@ -270,7 +267,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
270
267
|
_classPrivateFieldSet(_A, this, v);
|
|
271
268
|
}
|
|
272
269
|
}, {
|
|
273
|
-
key: "
|
|
270
|
+
key: "interpreterUsersEditState",
|
|
274
271
|
get: function get() {
|
|
275
272
|
return _classPrivateFieldGet(_B, this);
|
|
276
273
|
},
|
|
@@ -278,7 +275,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
278
275
|
_classPrivateFieldSet(_B, this, v);
|
|
279
276
|
}
|
|
280
277
|
}, {
|
|
281
|
-
key: "
|
|
278
|
+
key: "initUsers",
|
|
282
279
|
get: function get() {
|
|
283
280
|
return _classPrivateFieldGet(_C, this);
|
|
284
281
|
},
|
|
@@ -286,7 +283,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
286
283
|
_classPrivateFieldSet(_C, this, v);
|
|
287
284
|
}
|
|
288
285
|
}, {
|
|
289
|
-
key: "
|
|
286
|
+
key: "currentDialogId",
|
|
290
287
|
get: function get() {
|
|
291
288
|
return _classPrivateFieldGet(_D, this);
|
|
292
289
|
},
|
|
@@ -294,56 +291,26 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
294
291
|
_classPrivateFieldSet(_D, this, v);
|
|
295
292
|
}
|
|
296
293
|
}, {
|
|
297
|
-
key: "
|
|
294
|
+
key: "interpreterOff",
|
|
298
295
|
get: function get() {
|
|
299
|
-
return
|
|
300
|
-
},
|
|
301
|
-
set: function set(v) {
|
|
302
|
-
_classPrivateFieldSet(_E, this, v);
|
|
303
|
-
}
|
|
304
|
-
}, {
|
|
305
|
-
key: "initUsers",
|
|
306
|
-
get: function get() {
|
|
307
|
-
return _classPrivateFieldGet(_F, this);
|
|
308
|
-
},
|
|
309
|
-
set: function set(v) {
|
|
310
|
-
_classPrivateFieldSet(_F, this, v);
|
|
311
|
-
}
|
|
312
|
-
}, {
|
|
313
|
-
key: "interpreterState",
|
|
314
|
-
get: function get() {
|
|
315
|
-
return _classPrivateFieldGet(_G, this);
|
|
316
|
-
},
|
|
317
|
-
set: function set(v) {
|
|
318
|
-
_classPrivateFieldSet(_G, this, v);
|
|
319
|
-
}
|
|
320
|
-
}, {
|
|
321
|
-
key: "currentDialogId",
|
|
322
|
-
get: function get() {
|
|
323
|
-
return _classPrivateFieldGet(_H, this);
|
|
324
|
-
},
|
|
325
|
-
set: function set(v) {
|
|
326
|
-
_classPrivateFieldSet(_H, this, v);
|
|
296
|
+
return this._sharedInterpreterDataSource.interpreterOff;
|
|
327
297
|
}
|
|
328
298
|
}, {
|
|
329
299
|
key: "hasEnableInterpreterPermission",
|
|
330
300
|
get: function get() {
|
|
331
|
-
return this.
|
|
301
|
+
return this._interpreterProvider.canEnableInterpretation();
|
|
332
302
|
}
|
|
333
303
|
|
|
334
304
|
// 同声传译列表-表单校验是否通过
|
|
335
305
|
}, {
|
|
336
306
|
key: "interpreterUsersCheckPass",
|
|
337
307
|
get: function get() {
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
-
return key !== 'randomKey';
|
|
341
|
-
});
|
|
308
|
+
var remainingKeys = ['userId', 'userName', 'sourceLanguage', 'targetLanguage'];
|
|
309
|
+
return this.localInterpreterUsers.every(function (obj) {
|
|
342
310
|
return remainingKeys.every(function (key) {
|
|
343
311
|
return obj[key] !== null && obj[key] !== undefined && obj[key] !== '';
|
|
344
312
|
});
|
|
345
313
|
});
|
|
346
|
-
return hasNonNullValuesExcludingKey;
|
|
347
314
|
}
|
|
348
315
|
|
|
349
316
|
// 同声传译列表-翻译官是否全部离线
|
|
@@ -351,20 +318,19 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
351
318
|
key: "interpreterUsersAllOffLine",
|
|
352
319
|
get: function get() {
|
|
353
320
|
var _this2 = this;
|
|
354
|
-
|
|
321
|
+
return this.localInterpreterUsers.every(function (ele) {
|
|
355
322
|
var _this2$initUsers$find;
|
|
356
323
|
return (_this2$initUsers$find = _this2.initUsers.find(function (item) {
|
|
357
324
|
return item.userId === ele.userId;
|
|
358
325
|
})) === null || _this2$initUsers$find === void 0 ? void 0 : _this2$initUsers$find.isOffLine;
|
|
359
326
|
});
|
|
360
|
-
return isAllOffLine;
|
|
361
327
|
}
|
|
362
328
|
|
|
363
329
|
// 语言列表
|
|
364
330
|
}, {
|
|
365
331
|
key: "languageList",
|
|
366
332
|
get: function get() {
|
|
367
|
-
return this.
|
|
333
|
+
return this._interpreterProvider.getOutputLanguageOptionList();
|
|
368
334
|
}
|
|
369
335
|
}, {
|
|
370
336
|
key: "openInterpreterState",
|
|
@@ -376,19 +342,15 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
376
342
|
res = (0, _objectWithoutProperties2["default"])(ele, _excluded);
|
|
377
343
|
return res;
|
|
378
344
|
});
|
|
379
|
-
this.
|
|
380
|
-
this.closeInterpreterDialog();
|
|
345
|
+
this._interpreterProvider.setInterpreterUsers(interpreterUsers);
|
|
381
346
|
}
|
|
382
347
|
}, {
|
|
383
348
|
key: "closeInterpreterState",
|
|
384
349
|
value: function
|
|
385
350
|
// 关闭同声传译
|
|
386
351
|
closeInterpreterState() {
|
|
387
|
-
this.
|
|
388
|
-
this.closeInterpreterDialog();
|
|
352
|
+
this._interpreterProvider.disableInterpretation();
|
|
389
353
|
}
|
|
390
|
-
|
|
391
|
-
// 同声传译——列表------------------------------------
|
|
392
354
|
}, {
|
|
393
355
|
key: "setInterpreterListEditState",
|
|
394
356
|
value: function
|
|
@@ -401,7 +363,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
401
363
|
value: function
|
|
402
364
|
//传译列表-增加
|
|
403
365
|
addInterpreterUsers() {
|
|
404
|
-
this.localInterpreterUsers = [].concat((0, _toConsumableArray2["default"])(this.localInterpreterUsers), [getInterpreterItem()]);
|
|
366
|
+
this.localInterpreterUsers = [].concat((0, _toConsumableArray2["default"])(this.localInterpreterUsers), [(0, _utils.getInterpreterItem)()]);
|
|
405
367
|
}
|
|
406
368
|
}, {
|
|
407
369
|
key: "deleteInterpreterUsers",
|
|
@@ -433,909 +395,53 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
433
395
|
value: function
|
|
434
396
|
//传译列表-查询
|
|
435
397
|
queryInterpreterUsers() {
|
|
436
|
-
var _this$
|
|
437
|
-
var interpreterUsers = ((_this$
|
|
398
|
+
var _this$_interpreterPro;
|
|
399
|
+
var interpreterUsers = ((_this$_interpreterPro = this._interpreterProvider.getInterpreterList()) === null || _this$_interpreterPro === void 0 ? void 0 : _this$_interpreterPro.map(function (ele) {
|
|
438
400
|
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
439
401
|
randomKey: (0, _uuid.v4)()
|
|
440
402
|
});
|
|
441
403
|
})) || [];
|
|
442
|
-
this.
|
|
443
|
-
this.localInterpreterUsers = interpreterUsers.length > 0 ? interpreterUsers : [getInterpreterItem()];
|
|
444
|
-
}
|
|
445
|
-
// 同声传译——列表------------------------------------end
|
|
446
|
-
|
|
447
|
-
// 同步更改的后的语言房间状态
|
|
448
|
-
}, {
|
|
449
|
-
key: "updateInterpreterRoomStatus",
|
|
450
|
-
value: function () {
|
|
451
|
-
var _updateInterpreterRoomStatus = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(executeRoomList) {
|
|
452
|
-
var _this$_languageRoomLi2;
|
|
453
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
454
|
-
while (1) switch (_context.prev = _context.next) {
|
|
455
|
-
case 0:
|
|
456
|
-
this._languageRoomList = (_this$_languageRoomLi2 = this._languageRoomList) === null || _this$_languageRoomLi2 === void 0 ? void 0 : _this$_languageRoomLi2.map(function (ele) {
|
|
457
|
-
var executeRoom = executeRoomList.find(function (item) {
|
|
458
|
-
return item.language === ele.language;
|
|
459
|
-
}) || {};
|
|
460
|
-
return _objectSpread(_objectSpread({}, ele), executeRoom);
|
|
461
|
-
});
|
|
462
|
-
case 1:
|
|
463
|
-
case "end":
|
|
464
|
-
return _context.stop();
|
|
465
|
-
}
|
|
466
|
-
}, _callee, this);
|
|
467
|
-
}));
|
|
468
|
-
function updateInterpreterRoomStatus(_x) {
|
|
469
|
-
return _updateInterpreterRoomStatus.apply(this, arguments);
|
|
470
|
-
}
|
|
471
|
-
return updateInterpreterRoomStatus;
|
|
472
|
-
}() // #region checked
|
|
473
|
-
// 控制主房间说话
|
|
474
|
-
}, {
|
|
475
|
-
key: "changeMainRoomStream",
|
|
476
|
-
value: function () {
|
|
477
|
-
var _changeMainRoomStream = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(_ref3) {
|
|
478
|
-
var _this3 = this;
|
|
479
|
-
var close, callback, localStreamList, micStreams;
|
|
480
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
481
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
482
|
-
case 0:
|
|
483
|
-
close = _ref3.close, callback = _ref3.callback;
|
|
484
|
-
this._clearRetryTaskTimer();
|
|
485
|
-
if (!this._mainRoomControl.getStreamControl()) {
|
|
486
|
-
_context2.next = 8;
|
|
487
|
-
break;
|
|
488
|
-
}
|
|
489
|
-
localStreamList = this._mainRoomControl.getStreamControl().getStreamsByUserId(this._mainRoomControl.getUserControl().getLocalUser().userId);
|
|
490
|
-
micStreams = localStreamList.filter(function (ele) {
|
|
491
|
-
return ele.audioSourceType === _type4.AgoraRteAudioSourceType.MICROPHONE;
|
|
492
|
-
});
|
|
493
|
-
if (!micStreams.length) {
|
|
494
|
-
_context2.next = 8;
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
_context2.next = 8;
|
|
498
|
-
return (0, _constant2.retryTask)(function () {
|
|
499
|
-
return _this3._mainRoomControl.getStreamControl().updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, micStreams[0].streamId, {
|
|
500
|
-
audioPrivilege: close ? _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
501
|
-
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
502
|
-
}));
|
|
503
|
-
}, this._retryTask);
|
|
504
|
-
case 8:
|
|
505
|
-
callback && callback(true);
|
|
506
|
-
case 9:
|
|
507
|
-
case "end":
|
|
508
|
-
return _context2.stop();
|
|
509
|
-
}
|
|
510
|
-
}, _callee2, this);
|
|
511
|
-
}));
|
|
512
|
-
function changeMainRoomStream(_x2) {
|
|
513
|
-
return _changeMainRoomStream.apply(this, arguments);
|
|
514
|
-
}
|
|
515
|
-
return changeMainRoomStream;
|
|
516
|
-
}() // 更新翻译官语言房间状态
|
|
517
|
-
}, {
|
|
518
|
-
key: "toggleLanguageRoom",
|
|
519
|
-
value: function () {
|
|
520
|
-
var _toggleLanguageRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(_ref4) {
|
|
521
|
-
var languageRoomList, actionType, callback, executeRoomList, _languageRoomList;
|
|
522
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
523
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
524
|
-
case 0:
|
|
525
|
-
languageRoomList = _ref4.languageRoomList, actionType = _ref4.actionType, callback = _ref4.callback;
|
|
526
|
-
_context3.prev = 1;
|
|
527
|
-
executeRoomList = [];
|
|
528
|
-
if (!this._languageRoomList) {
|
|
529
|
-
_context3.next = 13;
|
|
530
|
-
break;
|
|
531
|
-
}
|
|
532
|
-
_languageRoomList = this._languageRoomList;
|
|
533
|
-
executeRoomList = languageRoomList.map(function (languageRoom) {
|
|
534
|
-
return _languageRoomList.find(function (ele) {
|
|
535
|
-
return ele.language === languageRoom.value;
|
|
536
|
-
});
|
|
537
|
-
}).filter(function (languageRoom) {
|
|
538
|
-
return !!languageRoom;
|
|
539
|
-
});
|
|
540
|
-
if (!(actionType === _constant2.UpdateType.JOIN)) {
|
|
541
|
-
_context3.next = 11;
|
|
542
|
-
break;
|
|
543
|
-
}
|
|
544
|
-
_context3.next = 9;
|
|
545
|
-
return this.joinInterpreterRoom(executeRoomList);
|
|
546
|
-
case 9:
|
|
547
|
-
_context3.next = 13;
|
|
548
|
-
break;
|
|
549
|
-
case 11:
|
|
550
|
-
_context3.next = 13;
|
|
551
|
-
return this.leaveInterpreterRoom(executeRoomList);
|
|
552
|
-
case 13:
|
|
553
|
-
callback && callback(executeRoomList);
|
|
554
|
-
_context3.next = 19;
|
|
555
|
-
break;
|
|
556
|
-
case 16:
|
|
557
|
-
_context3.prev = 16;
|
|
558
|
-
_context3.t0 = _context3["catch"](1);
|
|
559
|
-
callback && callback([]);
|
|
560
|
-
case 19:
|
|
561
|
-
case "end":
|
|
562
|
-
return _context3.stop();
|
|
563
|
-
}
|
|
564
|
-
}, _callee3, this, [[1, 16]]);
|
|
565
|
-
}));
|
|
566
|
-
function toggleLanguageRoom(_x3) {
|
|
567
|
-
return _toggleLanguageRoom.apply(this, arguments);
|
|
568
|
-
}
|
|
569
|
-
return toggleLanguageRoom;
|
|
570
|
-
}() // 更新语言房间Control
|
|
571
|
-
}, {
|
|
572
|
-
key: "updateLanguageRoomList",
|
|
573
|
-
value: function () {
|
|
574
|
-
var _updateLanguageRoomList = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
575
|
-
var _this4 = this;
|
|
576
|
-
var rooms, newlanguageRoomList;
|
|
577
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
578
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
579
|
-
case 0:
|
|
580
|
-
rooms = this._interpreterControl.getInterpreterRoomList(); //语言房间列表
|
|
581
|
-
newlanguageRoomList = (rooms === null || rooms === void 0 ? void 0 : rooms.map(function (ele) {
|
|
582
|
-
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
583
|
-
control: _this4._interpreterControl.createRoomControl(ele.roomId),
|
|
584
|
-
status: _constant2.UpdateType.LEFT
|
|
585
|
-
});
|
|
586
|
-
}).filter(function (room) {
|
|
587
|
-
var _this4$_languageRoomL;
|
|
588
|
-
return !((_this4$_languageRoomL = _this4._languageRoomList) !== null && _this4$_languageRoomL !== void 0 && _this4$_languageRoomL.find(function (preRomm) {
|
|
589
|
-
return preRomm.roomId === room.roomId;
|
|
590
|
-
}));
|
|
591
|
-
})) || [];
|
|
592
|
-
this._languageRoomList = [].concat((0, _toConsumableArray2["default"])(this._languageRoomList || []), (0, _toConsumableArray2["default"])(newlanguageRoomList));
|
|
593
|
-
case 3:
|
|
594
|
-
case "end":
|
|
595
|
-
return _context4.stop();
|
|
596
|
-
}
|
|
597
|
-
}, _callee4, this);
|
|
598
|
-
}));
|
|
599
|
-
function updateLanguageRoomList() {
|
|
600
|
-
return _updateLanguageRoomList.apply(this, arguments);
|
|
601
|
-
}
|
|
602
|
-
return updateLanguageRoomList;
|
|
603
|
-
}()
|
|
604
|
-
}, {
|
|
605
|
-
key: "_updateUserProperties",
|
|
606
|
-
value: function () {
|
|
607
|
-
var _updateUserProperties2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(language) {
|
|
608
|
-
var interpreterLangCode;
|
|
609
|
-
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
610
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
611
|
-
case 0:
|
|
612
|
-
_context5.prev = 0;
|
|
613
|
-
interpreterLangCode = this._userControl.getUserPropertiesByKeyPath('interpreterLangCode', this._localUser.userId);
|
|
614
|
-
if (!(!language && !interpreterLangCode)) {
|
|
615
|
-
_context5.next = 4;
|
|
616
|
-
break;
|
|
617
|
-
}
|
|
618
|
-
return _context5.abrupt("return");
|
|
619
|
-
case 4:
|
|
620
|
-
_context5.next = 6;
|
|
621
|
-
return this._userControl.updateUserProperties({
|
|
622
|
-
interpreterLangCode: language
|
|
623
|
-
}, {}, this._localUser.userId);
|
|
624
|
-
case 6:
|
|
625
|
-
this.logger.info("interpreterLog- _updateUserProperties interpreterLangCode:".concat(language, " succeed"));
|
|
626
|
-
_context5.next = 12;
|
|
627
|
-
break;
|
|
628
|
-
case 9:
|
|
629
|
-
_context5.prev = 9;
|
|
630
|
-
_context5.t0 = _context5["catch"](0);
|
|
631
|
-
this.logger.info("interpreterLog- _updateUserProperties interpreterLangCode:".concat(language, " fail"));
|
|
632
|
-
case 12:
|
|
633
|
-
case "end":
|
|
634
|
-
return _context5.stop();
|
|
635
|
-
}
|
|
636
|
-
}, _callee5, this, [[0, 9]]);
|
|
637
|
-
}));
|
|
638
|
-
function _updateUserProperties(_x4) {
|
|
639
|
-
return _updateUserProperties2.apply(this, arguments);
|
|
640
|
-
}
|
|
641
|
-
return _updateUserProperties;
|
|
642
|
-
}() // 修改输入的语言频道
|
|
643
|
-
}, {
|
|
644
|
-
key: "changeInputLanguage",
|
|
645
|
-
value: function () {
|
|
646
|
-
var _changeInputLanguage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(_ref5) {
|
|
647
|
-
var _this5 = this;
|
|
648
|
-
var language, options, callback, updateTargetLanguageStreams, updateSourceLanguageStreams, outputLanguageList, _this$getLocalUserByI, interpreter, _this$_languageRoomLi3, _this$_languageRoomLi4, targetLanguage, sourceLanguage, openTargetLanguage, openSourceLanguage, updateTargetLanguage, updateSourceLanguage, sourceLanguageRoomControl, targetLanguageRoomControl;
|
|
649
|
-
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
650
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
651
|
-
case 0:
|
|
652
|
-
language = _ref5.language, options = _ref5.options, callback = _ref5.callback;
|
|
653
|
-
this._clearRetryTaskTimer();
|
|
654
|
-
this._updateUserProperties(language);
|
|
655
|
-
updateTargetLanguageStreams = /*#__PURE__*/function () {
|
|
656
|
-
var _ref6 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(open) {
|
|
657
|
-
var _this5$getLocalUserBy, interpreter, _this5$_languageRoomL, targetLanguage, targetLanguageRoomControl;
|
|
658
|
-
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
659
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
660
|
-
case 0:
|
|
661
|
-
_this5$getLocalUserBy = _this5.getLocalUserByInterpreter(), interpreter = _this5$getLocalUserBy.interpreter;
|
|
662
|
-
if (!interpreter) {
|
|
663
|
-
_context6.next = 7;
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
targetLanguage = interpreter.targetLanguage;
|
|
667
|
-
targetLanguageRoomControl = (_this5$_languageRoomL = _this5._languageRoomList) === null || _this5$_languageRoomL === void 0 || (_this5$_languageRoomL = _this5$_languageRoomL.find(function (ele) {
|
|
668
|
-
return ele.language === targetLanguage;
|
|
669
|
-
})) === null || _this5$_languageRoomL === void 0 ? void 0 : _this5$_languageRoomL.control;
|
|
670
|
-
if (!targetLanguageRoomControl) {
|
|
671
|
-
_context6.next = 7;
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
_context6.next = 7;
|
|
675
|
-
return (0, _constant2.retryTask)(function () {
|
|
676
|
-
return _this5._deviceStreamStore.updateStreams(targetLanguageRoomControl, open);
|
|
677
|
-
}, _this5._retryTask);
|
|
678
|
-
case 7:
|
|
679
|
-
case "end":
|
|
680
|
-
return _context6.stop();
|
|
681
|
-
}
|
|
682
|
-
}, _callee6);
|
|
683
|
-
}));
|
|
684
|
-
return function updateTargetLanguageStreams(_x6) {
|
|
685
|
-
return _ref6.apply(this, arguments);
|
|
686
|
-
};
|
|
687
|
-
}();
|
|
688
|
-
updateSourceLanguageStreams = /*#__PURE__*/function () {
|
|
689
|
-
var _ref7 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(open) {
|
|
690
|
-
var _this5$getLocalUserBy2, interpreter, _this5$_languageRoomL2, sourceLanguage, sourceLanguageRoomControl;
|
|
691
|
-
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
692
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
693
|
-
case 0:
|
|
694
|
-
_this5$getLocalUserBy2 = _this5.getLocalUserByInterpreter(), interpreter = _this5$getLocalUserBy2.interpreter;
|
|
695
|
-
if (!interpreter) {
|
|
696
|
-
_context7.next = 7;
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
sourceLanguage = interpreter.sourceLanguage;
|
|
700
|
-
sourceLanguageRoomControl = (_this5$_languageRoomL2 = _this5._languageRoomList) === null || _this5$_languageRoomL2 === void 0 || (_this5$_languageRoomL2 = _this5$_languageRoomL2.find(function (ele) {
|
|
701
|
-
return ele.language === sourceLanguage;
|
|
702
|
-
})) === null || _this5$_languageRoomL2 === void 0 ? void 0 : _this5$_languageRoomL2.control;
|
|
703
|
-
if (!sourceLanguageRoomControl) {
|
|
704
|
-
_context7.next = 7;
|
|
705
|
-
break;
|
|
706
|
-
}
|
|
707
|
-
_context7.next = 7;
|
|
708
|
-
return (0, _constant2.retryTask)(function () {
|
|
709
|
-
return _this5._deviceStreamStore.updateStreams(sourceLanguageRoomControl, open);
|
|
710
|
-
}, _this5._retryTask);
|
|
711
|
-
case 7:
|
|
712
|
-
case "end":
|
|
713
|
-
return _context7.stop();
|
|
714
|
-
}
|
|
715
|
-
}, _callee7);
|
|
716
|
-
}));
|
|
717
|
-
return function updateSourceLanguageStreams(_x7) {
|
|
718
|
-
return _ref7.apply(this, arguments);
|
|
719
|
-
};
|
|
720
|
-
}();
|
|
721
|
-
outputLanguageList = (0, _toConsumableArray2["default"])(options);
|
|
722
|
-
_this$getLocalUserByI = this.getLocalUserByInterpreter(), interpreter = _this$getLocalUserByI.interpreter;
|
|
723
|
-
if (!interpreter) {
|
|
724
|
-
_context8.next = 29;
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
targetLanguage = interpreter.targetLanguage, sourceLanguage = interpreter.sourceLanguage;
|
|
728
|
-
openTargetLanguage = language === targetLanguage;
|
|
729
|
-
openSourceLanguage = language === sourceLanguage;
|
|
730
|
-
updateTargetLanguage = function updateTargetLanguage() {
|
|
731
|
-
outputLanguageList = (0, _constant2.updateOutputLanguageList)({
|
|
732
|
-
outputLanguageList: outputLanguageList,
|
|
733
|
-
language: targetLanguage,
|
|
734
|
-
open: openTargetLanguage
|
|
735
|
-
});
|
|
736
|
-
};
|
|
737
|
-
updateSourceLanguage = function updateSourceLanguage() {
|
|
738
|
-
outputLanguageList = (0, _constant2.updateOutputLanguageList)({
|
|
739
|
-
outputLanguageList: outputLanguageList,
|
|
740
|
-
language: sourceLanguage,
|
|
741
|
-
open: openSourceLanguage
|
|
742
|
-
});
|
|
743
|
-
};
|
|
744
|
-
if (!this._deviceStore.microphoneEnabled) {
|
|
745
|
-
_context8.next = 22;
|
|
746
|
-
break;
|
|
747
|
-
}
|
|
748
|
-
_context8.next = 16;
|
|
749
|
-
return updateTargetLanguageStreams(openTargetLanguage);
|
|
750
|
-
case 16:
|
|
751
|
-
updateTargetLanguage();
|
|
752
|
-
_context8.next = 19;
|
|
753
|
-
return updateSourceLanguageStreams(openSourceLanguage);
|
|
754
|
-
case 19:
|
|
755
|
-
updateSourceLanguage();
|
|
756
|
-
_context8.next = 25;
|
|
757
|
-
break;
|
|
758
|
-
case 22:
|
|
759
|
-
updateTargetLanguage();
|
|
760
|
-
updateSourceLanguage();
|
|
761
|
-
this._uiEventStore.showToast({
|
|
762
|
-
type: 'info',
|
|
763
|
-
message: (0, _i18n.transI18n)('fmt_interpretation_interpreter_toast_label_open_micro')
|
|
764
|
-
});
|
|
765
|
-
case 25:
|
|
766
|
-
sourceLanguageRoomControl = (_this$_languageRoomLi3 = this._languageRoomList) === null || _this$_languageRoomLi3 === void 0 || (_this$_languageRoomLi3 = _this$_languageRoomLi3.find(function (ele) {
|
|
767
|
-
return ele.language === sourceLanguage;
|
|
768
|
-
})) === null || _this$_languageRoomLi3 === void 0 ? void 0 : _this$_languageRoomLi3.control;
|
|
769
|
-
targetLanguageRoomControl = (_this$_languageRoomLi4 = this._languageRoomList) === null || _this$_languageRoomLi4 === void 0 || (_this$_languageRoomLi4 = _this$_languageRoomLi4.find(function (ele) {
|
|
770
|
-
return ele.language === targetLanguage;
|
|
771
|
-
})) === null || _this$_languageRoomLi4 === void 0 ? void 0 : _this$_languageRoomLi4.control;
|
|
772
|
-
if (sourceLanguageRoomControl && targetLanguageRoomControl) {
|
|
773
|
-
this._setInterpreterRoomControlInfo({
|
|
774
|
-
targetLanguageRoomControl: targetLanguageRoomControl,
|
|
775
|
-
sourceLanguageRoomControl: sourceLanguageRoomControl,
|
|
776
|
-
interpreter: interpreter,
|
|
777
|
-
language: language
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
callback && callback(outputLanguageList);
|
|
781
|
-
case 29:
|
|
782
|
-
case "end":
|
|
783
|
-
return _context8.stop();
|
|
784
|
-
}
|
|
785
|
-
}, _callee8, this);
|
|
786
|
-
}));
|
|
787
|
-
function changeInputLanguage(_x5) {
|
|
788
|
-
return _changeInputLanguage.apply(this, arguments);
|
|
789
|
-
}
|
|
790
|
-
return changeInputLanguage;
|
|
791
|
-
}()
|
|
792
|
-
}, {
|
|
793
|
-
key: "closeAllLanguageRoomInput",
|
|
794
|
-
value: function () {
|
|
795
|
-
var _closeAllLanguageRoomInput = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(_ref8) {
|
|
796
|
-
var _this6 = this;
|
|
797
|
-
var options, callback, _loop, index;
|
|
798
|
-
return _regenerator["default"].wrap(function _callee9$(_context10) {
|
|
799
|
-
while (1) switch (_context10.prev = _context10.next) {
|
|
800
|
-
case 0:
|
|
801
|
-
options = _ref8.options, callback = _ref8.callback;
|
|
802
|
-
_loop = /*#__PURE__*/_regenerator["default"].mark(function _loop() {
|
|
803
|
-
var _this6$_languageRoomL;
|
|
804
|
-
var room, roomControl;
|
|
805
|
-
return _regenerator["default"].wrap(function _loop$(_context9) {
|
|
806
|
-
while (1) switch (_context9.prev = _context9.next) {
|
|
807
|
-
case 0:
|
|
808
|
-
room = options[index];
|
|
809
|
-
roomControl = (_this6$_languageRoomL = _this6._languageRoomList) === null || _this6$_languageRoomL === void 0 || (_this6$_languageRoomL = _this6$_languageRoomL.find(function (ele) {
|
|
810
|
-
return ele.language === room.value;
|
|
811
|
-
})) === null || _this6$_languageRoomL === void 0 ? void 0 : _this6$_languageRoomL.control;
|
|
812
|
-
if (!roomControl) {
|
|
813
|
-
_context9.next = 5;
|
|
814
|
-
break;
|
|
815
|
-
}
|
|
816
|
-
_context9.next = 5;
|
|
817
|
-
return (0, _constant2.retryTask)(function () {
|
|
818
|
-
return _this6._deviceStreamStore.updateStreams(roomControl, false);
|
|
819
|
-
}, _this6._retryTask);
|
|
820
|
-
case 5:
|
|
821
|
-
case "end":
|
|
822
|
-
return _context9.stop();
|
|
823
|
-
}
|
|
824
|
-
}, _loop);
|
|
825
|
-
});
|
|
826
|
-
index = 0;
|
|
827
|
-
case 3:
|
|
828
|
-
if (!(index < options.length)) {
|
|
829
|
-
_context10.next = 8;
|
|
830
|
-
break;
|
|
831
|
-
}
|
|
832
|
-
return _context10.delegateYield(_loop(), "t0", 5);
|
|
833
|
-
case 5:
|
|
834
|
-
index++;
|
|
835
|
-
_context10.next = 3;
|
|
836
|
-
break;
|
|
837
|
-
case 8:
|
|
838
|
-
callback && callback();
|
|
839
|
-
case 9:
|
|
840
|
-
case "end":
|
|
841
|
-
return _context10.stop();
|
|
842
|
-
}
|
|
843
|
-
}, _callee9);
|
|
844
|
-
}));
|
|
845
|
-
function closeAllLanguageRoomInput(_x8) {
|
|
846
|
-
return _closeAllLanguageRoomInput.apply(this, arguments);
|
|
847
|
-
}
|
|
848
|
-
return closeAllLanguageRoomInput;
|
|
849
|
-
}()
|
|
850
|
-
}, {
|
|
851
|
-
key: "handleOutputLanguageRoom",
|
|
852
|
-
value: function () {
|
|
853
|
-
var _handleOutputLanguageRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(_ref9) {
|
|
854
|
-
var _languageRoomList, language, interpreterRoomList, event, isInterpreterLanguageByOrgLanguage, languageRoom;
|
|
855
|
-
return _regenerator["default"].wrap(function _callee10$(_context11) {
|
|
856
|
-
while (1) switch (_context11.prev = _context11.next) {
|
|
857
|
-
case 0:
|
|
858
|
-
_languageRoomList = _ref9._languageRoomList, language = _ref9.language, interpreterRoomList = _ref9.interpreterRoomList, event = _ref9.event;
|
|
859
|
-
isInterpreterLanguageByOrgLanguage = interpreterRoomList.includes(language);
|
|
860
|
-
languageRoom = _languageRoomList.find(function (ele) {
|
|
861
|
-
return ele.language === language;
|
|
862
|
-
});
|
|
863
|
-
if (!languageRoom) {
|
|
864
|
-
_context11.next = 16;
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
867
|
-
if (!isInterpreterLanguageByOrgLanguage) {
|
|
868
|
-
_context11.next = 8;
|
|
869
|
-
break;
|
|
870
|
-
}
|
|
871
|
-
this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_INTERPRETER_REMOTE_AUDIO, {
|
|
872
|
-
roomControl: languageRoom.control,
|
|
873
|
-
event: event
|
|
874
|
-
});
|
|
875
|
-
_context11.next = 15;
|
|
876
|
-
break;
|
|
877
|
-
case 8:
|
|
878
|
-
if (!(event === _store.EventType.STOP)) {
|
|
879
|
-
_context11.next = 13;
|
|
880
|
-
break;
|
|
881
|
-
}
|
|
882
|
-
_context11.next = 11;
|
|
883
|
-
return this.leaveInterpreterRoom([languageRoom], true);
|
|
884
|
-
case 11:
|
|
885
|
-
_context11.next = 15;
|
|
886
|
-
break;
|
|
887
|
-
case 13:
|
|
888
|
-
_context11.next = 15;
|
|
889
|
-
return this.joinInterpreterRoom([languageRoom], true);
|
|
890
|
-
case 15:
|
|
891
|
-
if (event === _store.EventType.STOP) {
|
|
892
|
-
languageRoom.control.getStreamControl().removeObserver({
|
|
893
|
-
onStreamVolumeIndicationUpdated: this._onStreamVolumeIndicationUpdated
|
|
894
|
-
});
|
|
895
|
-
} else {
|
|
896
|
-
languageRoom.control.getStreamControl().addObserver({
|
|
897
|
-
onStreamVolumeIndicationUpdated: this._onStreamVolumeIndicationUpdated
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
case 16:
|
|
901
|
-
case "end":
|
|
902
|
-
return _context11.stop();
|
|
903
|
-
}
|
|
904
|
-
}, _callee10, this);
|
|
905
|
-
}));
|
|
906
|
-
function handleOutputLanguageRoom(_x9) {
|
|
907
|
-
return _handleOutputLanguageRoom.apply(this, arguments);
|
|
908
|
-
}
|
|
909
|
-
return handleOutputLanguageRoom;
|
|
910
|
-
}() // 修改输出的语言频道
|
|
911
|
-
}, {
|
|
912
|
-
key: "changeOutputLanguage",
|
|
913
|
-
value: function () {
|
|
914
|
-
var _changeOutputLanguage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11(_ref10) {
|
|
915
|
-
var language, orgLanguage, callback, _this$getLocalUserByI2, interpreter, interpreterRoomList, _targetLanguage, _sourceLanguage;
|
|
916
|
-
return _regenerator["default"].wrap(function _callee11$(_context12) {
|
|
917
|
-
while (1) switch (_context12.prev = _context12.next) {
|
|
918
|
-
case 0:
|
|
919
|
-
language = _ref10.language, orgLanguage = _ref10.orgLanguage, callback = _ref10.callback;
|
|
920
|
-
this._clearRetryTaskTimer();
|
|
921
|
-
_context12.prev = 2;
|
|
922
|
-
if (!this._languageRoomList) {
|
|
923
|
-
_context12.next = 23;
|
|
924
|
-
break;
|
|
925
|
-
}
|
|
926
|
-
_this$getLocalUserByI2 = this.getLocalUserByInterpreter(), interpreter = _this$getLocalUserByI2.interpreter;
|
|
927
|
-
interpreterRoomList = [];
|
|
928
|
-
if (interpreter) {
|
|
929
|
-
_targetLanguage = interpreter.targetLanguage, _sourceLanguage = interpreter.sourceLanguage;
|
|
930
|
-
interpreterRoomList = [_targetLanguage, _sourceLanguage];
|
|
931
|
-
}
|
|
932
|
-
if (!(language === _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM && orgLanguage !== _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM)) {
|
|
933
|
-
_context12.next = 11;
|
|
934
|
-
break;
|
|
935
|
-
}
|
|
936
|
-
_context12.next = 10;
|
|
937
|
-
return this.handleOutputLanguageRoom({
|
|
938
|
-
_languageRoomList: this._languageRoomList,
|
|
939
|
-
interpreterRoomList: interpreterRoomList,
|
|
940
|
-
language: orgLanguage,
|
|
941
|
-
event: _store.EventType.STOP
|
|
942
|
-
});
|
|
943
|
-
case 10:
|
|
944
|
-
this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_MAINROOM_REMOTE_AUDIO, {
|
|
945
|
-
event: _store.EventType.START
|
|
946
|
-
});
|
|
947
|
-
case 11:
|
|
948
|
-
if (!(language !== _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM && orgLanguage === _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM)) {
|
|
949
|
-
_context12.next = 15;
|
|
950
|
-
break;
|
|
951
|
-
}
|
|
952
|
-
_context12.next = 14;
|
|
953
|
-
return this.handleOutputLanguageRoom({
|
|
954
|
-
_languageRoomList: this._languageRoomList,
|
|
955
|
-
language: language,
|
|
956
|
-
interpreterRoomList: interpreterRoomList,
|
|
957
|
-
event: _store.EventType.START
|
|
958
|
-
});
|
|
959
|
-
case 14:
|
|
960
|
-
this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_MAINROOM_REMOTE_AUDIO, {
|
|
961
|
-
event: _store.EventType.STOP
|
|
962
|
-
});
|
|
963
|
-
case 15:
|
|
964
|
-
if (!(language !== _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM && orgLanguage !== _switchOutputLanguageRoom.CLOSE_ALL_LANGUAGE_ROOM)) {
|
|
965
|
-
_context12.next = 20;
|
|
966
|
-
break;
|
|
967
|
-
}
|
|
968
|
-
_context12.next = 18;
|
|
969
|
-
return this.handleOutputLanguageRoom({
|
|
970
|
-
_languageRoomList: this._languageRoomList,
|
|
971
|
-
language: language,
|
|
972
|
-
interpreterRoomList: interpreterRoomList,
|
|
973
|
-
event: _store.EventType.START
|
|
974
|
-
});
|
|
975
|
-
case 18:
|
|
976
|
-
_context12.next = 20;
|
|
977
|
-
return this.handleOutputLanguageRoom({
|
|
978
|
-
_languageRoomList: this._languageRoomList,
|
|
979
|
-
interpreterRoomList: interpreterRoomList,
|
|
980
|
-
language: orgLanguage,
|
|
981
|
-
event: _store.EventType.STOP
|
|
982
|
-
});
|
|
983
|
-
case 20:
|
|
984
|
-
callback && callback(true);
|
|
985
|
-
_context12.next = 24;
|
|
986
|
-
break;
|
|
987
|
-
case 23:
|
|
988
|
-
callback && callback(false);
|
|
989
|
-
case 24:
|
|
990
|
-
_context12.next = 29;
|
|
991
|
-
break;
|
|
992
|
-
case 26:
|
|
993
|
-
_context12.prev = 26;
|
|
994
|
-
_context12.t0 = _context12["catch"](2);
|
|
995
|
-
callback && callback(false);
|
|
996
|
-
case 29:
|
|
997
|
-
case "end":
|
|
998
|
-
return _context12.stop();
|
|
999
|
-
}
|
|
1000
|
-
}, _callee11, this, [[2, 26]]);
|
|
1001
|
-
}));
|
|
1002
|
-
function changeOutputLanguage(_x10) {
|
|
1003
|
-
return _changeOutputLanguage.apply(this, arguments);
|
|
1004
|
-
}
|
|
1005
|
-
return changeOutputLanguage;
|
|
1006
|
-
}()
|
|
1007
|
-
}, {
|
|
1008
|
-
key: "bindLocalMicrophoneId",
|
|
1009
|
-
value: function bindLocalMicrophoneId(room, _microphoneId) {
|
|
1010
|
-
var microphoneId = _microphoneId || this._deviceStore.currentDeviceId.microphoneDeviceId;
|
|
1011
|
-
if (microphoneId) {
|
|
1012
|
-
var streamList = room.control.getStreamControl().getStreamsByUserId(room.control.getUserControl().getLocalUser().userId);
|
|
1013
|
-
var micStream = streamList.find(function (stream) {
|
|
1014
|
-
return stream.audioSourceType === _fcrCore.FcrAudioSourceType.MICROPHONE;
|
|
1015
|
-
});
|
|
1016
|
-
if (micStream && micStream.audioSourceId !== microphoneId) {
|
|
1017
|
-
var _room$control$getRoom;
|
|
1018
|
-
this.logger.info("bind local microphone id to stream: [".concat(micStream.streamId, "], room: ").concat((_room$control$getRoom = room.control.getRoomInfo()) === null || _room$control$getRoom === void 0 ? void 0 : _room$control$getRoom.roomId));
|
|
1019
|
-
room.control.getStreamControl().bindLocalStreams([{
|
|
1020
|
-
streamId: micStream.streamId,
|
|
1021
|
-
audioSourceId: microphoneId
|
|
1022
|
-
}]);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
404
|
+
this.localInterpreterUsers = interpreterUsers.length > 0 ? interpreterUsers : [(0, _utils.getInterpreterItem)()];
|
|
1025
405
|
}
|
|
1026
|
-
|
|
1027
|
-
// 加入语言房间
|
|
1028
|
-
}, {
|
|
1029
|
-
key: "joinInterpreterRoom",
|
|
1030
|
-
value: function () {
|
|
1031
|
-
var _joinInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12(data, isToggleInterperterRemoteAudio) {
|
|
1032
|
-
var _this7 = this;
|
|
1033
|
-
var _this$getLocalUserByI3, localUser, interpreter, executeRoomList, _loop2, index;
|
|
1034
|
-
return _regenerator["default"].wrap(function _callee12$(_context14) {
|
|
1035
|
-
while (1) switch (_context14.prev = _context14.next) {
|
|
1036
|
-
case 0:
|
|
1037
|
-
_this$getLocalUserByI3 = this.getLocalUserByInterpreter(), localUser = _this$getLocalUserByI3.localUser, interpreter = _this$getLocalUserByI3.interpreter;
|
|
1038
|
-
executeRoomList = (0, _toConsumableArray2["default"])(data);
|
|
1039
|
-
_loop2 = /*#__PURE__*/_regenerator["default"].mark(function _loop2() {
|
|
1040
|
-
var room;
|
|
1041
|
-
return _regenerator["default"].wrap(function _loop2$(_context13) {
|
|
1042
|
-
while (1) switch (_context13.prev = _context13.next) {
|
|
1043
|
-
case 0:
|
|
1044
|
-
room = executeRoomList[index];
|
|
1045
|
-
if (!(room.status === _constant2.UpdateType.LEFT)) {
|
|
1046
|
-
_context13.next = 9;
|
|
1047
|
-
break;
|
|
1048
|
-
}
|
|
1049
|
-
executeRoomList[index].status = _constant2.UpdateType.LOADING;
|
|
1050
|
-
_context13.next = 5;
|
|
1051
|
-
return (0, _constant2.retryTask)(function () {
|
|
1052
|
-
return _this7._roomStore.joinInterpreterRoom({
|
|
1053
|
-
control: room.control,
|
|
1054
|
-
roomJoinOptions: {
|
|
1055
|
-
roomToken: '',
|
|
1056
|
-
streamLatency: _fcrCore.FcrStreamLatencyLevel.ULTRA_LOW,
|
|
1057
|
-
createStreamConfigs: [{
|
|
1058
|
-
videoSourceState: _type3.AgoraRtcMediaSourceState.CLOSE,
|
|
1059
|
-
audioSourceState: _type3.AgoraRtcMediaSourceState.CLOSE,
|
|
1060
|
-
videoSourceId: '',
|
|
1061
|
-
audioSourceId: '',
|
|
1062
|
-
streamName: 'default',
|
|
1063
|
-
streamType: _type2.AgoraRteMediaStreamType.NONE,
|
|
1064
|
-
videoSourceType: _type4.AgoraRteVideoSourceType.CAMERA,
|
|
1065
|
-
audioSourceType: _type4.AgoraRteAudioSourceType.MICROPHONE
|
|
1066
|
-
}],
|
|
1067
|
-
userName: localUser.userName,
|
|
1068
|
-
// userRole: !!interpreter ? FcrUserRole.COHOST : FcrUserRole.PARTICIPANT,
|
|
1069
|
-
userRole: _type.FcrUserRole.PARTICIPANT
|
|
1070
|
-
},
|
|
1071
|
-
language: room.language,
|
|
1072
|
-
isToggleInterperterRemoteAudio: isToggleInterperterRemoteAudio
|
|
1073
|
-
});
|
|
1074
|
-
}, _this7._retryTask);
|
|
1075
|
-
case 5:
|
|
1076
|
-
executeRoomList[index].status = _constant2.UpdateType.JOIN;
|
|
1077
|
-
_this7.bindLocalMicrophoneId(executeRoomList[index]);
|
|
1078
|
-
_context13.next = 10;
|
|
1079
|
-
break;
|
|
1080
|
-
case 9:
|
|
1081
|
-
_this7.logger.info('非离开状态 无法加入房间', room);
|
|
1082
|
-
case 10:
|
|
1083
|
-
case "end":
|
|
1084
|
-
return _context13.stop();
|
|
1085
|
-
}
|
|
1086
|
-
}, _loop2);
|
|
1087
|
-
});
|
|
1088
|
-
index = 0;
|
|
1089
|
-
case 4:
|
|
1090
|
-
if (!(index < executeRoomList.length)) {
|
|
1091
|
-
_context14.next = 9;
|
|
1092
|
-
break;
|
|
1093
|
-
}
|
|
1094
|
-
return _context14.delegateYield(_loop2(), "t0", 6);
|
|
1095
|
-
case 6:
|
|
1096
|
-
index++;
|
|
1097
|
-
_context14.next = 4;
|
|
1098
|
-
break;
|
|
1099
|
-
case 9:
|
|
1100
|
-
this.updateInterpreterRoomStatus(executeRoomList);
|
|
1101
|
-
case 10:
|
|
1102
|
-
case "end":
|
|
1103
|
-
return _context14.stop();
|
|
1104
|
-
}
|
|
1105
|
-
}, _callee12, this);
|
|
1106
|
-
}));
|
|
1107
|
-
function joinInterpreterRoom(_x11, _x12) {
|
|
1108
|
-
return _joinInterpreterRoom.apply(this, arguments);
|
|
1109
|
-
}
|
|
1110
|
-
return joinInterpreterRoom;
|
|
1111
|
-
}() // 离开语言房间
|
|
1112
|
-
}, {
|
|
1113
|
-
key: "leaveInterpreterRoom",
|
|
1114
|
-
value: function () {
|
|
1115
|
-
var _leaveInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13(data, isToggleInterperterRemoteAudio) {
|
|
1116
|
-
var _this8 = this;
|
|
1117
|
-
var executeRoomList, _loop3, index;
|
|
1118
|
-
return _regenerator["default"].wrap(function _callee13$(_context16) {
|
|
1119
|
-
while (1) switch (_context16.prev = _context16.next) {
|
|
1120
|
-
case 0:
|
|
1121
|
-
executeRoomList = (0, _toConsumableArray2["default"])(data);
|
|
1122
|
-
_loop3 = /*#__PURE__*/_regenerator["default"].mark(function _loop3() {
|
|
1123
|
-
var room;
|
|
1124
|
-
return _regenerator["default"].wrap(function _loop3$(_context15) {
|
|
1125
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
1126
|
-
case 0:
|
|
1127
|
-
room = executeRoomList[index];
|
|
1128
|
-
if (!(room.status === _constant2.UpdateType.JOIN)) {
|
|
1129
|
-
_context15.next = 8;
|
|
1130
|
-
break;
|
|
1131
|
-
}
|
|
1132
|
-
executeRoomList[index].status = _constant2.UpdateType.LOADING;
|
|
1133
|
-
_context15.next = 5;
|
|
1134
|
-
return (0, _constant2.retryTask)(function () {
|
|
1135
|
-
return _this8._roomStore.leaveInterpreterRoom({
|
|
1136
|
-
control: room.control,
|
|
1137
|
-
language: room.language,
|
|
1138
|
-
isToggleInterperterRemoteAudio: isToggleInterperterRemoteAudio
|
|
1139
|
-
});
|
|
1140
|
-
}, _this8._retryTask);
|
|
1141
|
-
case 5:
|
|
1142
|
-
executeRoomList[index].status = _constant2.UpdateType.LEFT;
|
|
1143
|
-
_context15.next = 9;
|
|
1144
|
-
break;
|
|
1145
|
-
case 8:
|
|
1146
|
-
_this8.logger.info('非加入状态 无法离开房间', room);
|
|
1147
|
-
case 9:
|
|
1148
|
-
case "end":
|
|
1149
|
-
return _context15.stop();
|
|
1150
|
-
}
|
|
1151
|
-
}, _loop3);
|
|
1152
|
-
});
|
|
1153
|
-
index = 0;
|
|
1154
|
-
case 3:
|
|
1155
|
-
if (!(index < executeRoomList.length)) {
|
|
1156
|
-
_context16.next = 8;
|
|
1157
|
-
break;
|
|
1158
|
-
}
|
|
1159
|
-
return _context16.delegateYield(_loop3(), "t0", 5);
|
|
1160
|
-
case 5:
|
|
1161
|
-
index++;
|
|
1162
|
-
_context16.next = 3;
|
|
1163
|
-
break;
|
|
1164
|
-
case 8:
|
|
1165
|
-
this.updateInterpreterRoomStatus(executeRoomList);
|
|
1166
|
-
case 9:
|
|
1167
|
-
case "end":
|
|
1168
|
-
return _context16.stop();
|
|
1169
|
-
}
|
|
1170
|
-
}, _callee13, this);
|
|
1171
|
-
}));
|
|
1172
|
-
function leaveInterpreterRoom(_x13, _x14) {
|
|
1173
|
-
return _leaveInterpreterRoom.apply(this, arguments);
|
|
1174
|
-
}
|
|
1175
|
-
return leaveInterpreterRoom;
|
|
1176
|
-
}()
|
|
1177
406
|
}, {
|
|
1178
407
|
key: "getInterpreterState",
|
|
1179
408
|
value: function getInterpreterState() {
|
|
1180
|
-
return this.
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
// 获取本地用户关联的翻译官信息
|
|
1210
|
-
getLocalUserByInterpreter() {
|
|
1211
|
-
var localUser = this._localUser; // 本地用户信息
|
|
1212
|
-
var interpreterUsers = this._interpreterControl.getInterpreterUserList(); //翻译官列表
|
|
1213
|
-
var interpreter = interpreterUsers === null || interpreterUsers === void 0 ? void 0 : interpreterUsers.find(function (ele) {
|
|
1214
|
-
return ele.userId === localUser.userId;
|
|
1215
|
-
}); //本地用户关联的翻译官信息
|
|
1216
|
-
return {
|
|
1217
|
-
interpreter: interpreter,
|
|
1218
|
-
localUser: localUser
|
|
1219
|
-
};
|
|
1220
|
-
}
|
|
1221
|
-
}, {
|
|
1222
|
-
key: "checkIsSelfOperation",
|
|
1223
|
-
value: function
|
|
1224
|
-
// 检查操作用户是否是用户本人
|
|
1225
|
-
checkIsSelfOperation(operatorUser) {
|
|
1226
|
-
var userInfo = this._localUser;
|
|
1227
|
-
var isSelfOperation = operatorUser.userId === userInfo.userId;
|
|
1228
|
-
return isSelfOperation;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
// #endregion
|
|
1232
|
-
|
|
1233
|
-
// #region 提示
|
|
1234
|
-
}, {
|
|
1235
|
-
key: "interpreterUsersUpdatedToast",
|
|
1236
|
-
value: function () {
|
|
1237
|
-
var _interpreterUsersUpdatedToast = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14(roomId, users, operatorUser) {
|
|
1238
|
-
var _this$getLocalUserByI4, interpreter, localUser, preInterpreter, isUpdate;
|
|
1239
|
-
return _regenerator["default"].wrap(function _callee14$(_context17) {
|
|
1240
|
-
while (1) switch (_context17.prev = _context17.next) {
|
|
1241
|
-
case 0:
|
|
1242
|
-
if (operatorUser) {
|
|
1243
|
-
this.updateInterpreterUsersToast(roomId, users, operatorUser); // 列表更新提醒
|
|
1244
|
-
}
|
|
1245
|
-
_this$getLocalUserByI4 = this.getLocalUserByInterpreter(), interpreter = _this$getLocalUserByI4.interpreter, localUser = _this$getLocalUserByI4.localUser;
|
|
1246
|
-
preInterpreter = this.orgInterpreterUsers.find(function (ele) {
|
|
1247
|
-
return ele.userId === localUser.userId;
|
|
1248
|
-
});
|
|
1249
|
-
if (this.interpreterState) {
|
|
1250
|
-
if (interpreter) {
|
|
1251
|
-
// 现在是翻译官
|
|
1252
|
-
if (preInterpreter) {
|
|
1253
|
-
// 之前是翻译官
|
|
1254
|
-
isUpdate = preInterpreter.sourceLanguage !== interpreter.sourceLanguage || preInterpreter.targetLanguage !== interpreter.targetLanguage;
|
|
1255
|
-
if (isUpdate) {
|
|
1256
|
-
// 前后两次翻译官配置的语言有过更改
|
|
1257
|
-
this.openUpdateLanguageDialog(interpreter); // 触发翻译官-语言变更提醒
|
|
1258
|
-
}
|
|
1259
|
-
} else {
|
|
1260
|
-
// 之前不是翻译官
|
|
1261
|
-
this.openCreateInterpreterStatusToast(interpreter); // 触发翻译官-创建提醒
|
|
1262
|
-
}
|
|
1263
|
-
} else {
|
|
1264
|
-
// 现在不是翻译官
|
|
1265
|
-
if (preInterpreter) {
|
|
1266
|
-
// 之前是翻译官
|
|
1267
|
-
this.openCancelInterpreterStatusToast(); // 触发翻译官-取消提醒
|
|
1268
|
-
this._setInterpreterRoomControlInfo(null);
|
|
1269
|
-
}
|
|
1270
|
-
this._updateUserProperties('');
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
case 4:
|
|
1274
|
-
case "end":
|
|
1275
|
-
return _context17.stop();
|
|
1276
|
-
}
|
|
1277
|
-
}, _callee14, this);
|
|
1278
|
-
}));
|
|
1279
|
-
function interpreterUsersUpdatedToast(_x15, _x16, _x17) {
|
|
1280
|
-
return _interpreterUsersUpdatedToast.apply(this, arguments);
|
|
1281
|
-
}
|
|
1282
|
-
return interpreterUsersUpdatedToast;
|
|
1283
|
-
}()
|
|
1284
|
-
}, {
|
|
1285
|
-
key: "interpreterStateUpdatedToast",
|
|
1286
|
-
value: function interpreterStateUpdatedToast(roomId, state, operatorUser) {
|
|
1287
|
-
if (operatorUser) {
|
|
1288
|
-
var isSelfOperation = this.checkIsSelfOperation(operatorUser); //是否本人
|
|
1289
|
-
if (!isSelfOperation) {
|
|
1290
|
-
this.openUpdateInterpreterStateToast(roomId, state, operatorUser); // 触发状态变更提醒
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
if (state.enable) {
|
|
1294
|
-
var _this$getLocalUserByI5 = this.getLocalUserByInterpreter(),
|
|
1295
|
-
interpreter = _this$getLocalUserByI5.interpreter;
|
|
1296
|
-
if (interpreter) {
|
|
1297
|
-
this.openCreateInterpreterStatusToast(interpreter); // 触发翻译官-创建提醒
|
|
409
|
+
return this._interpreterProvider.getInterpretationState();
|
|
410
|
+
}
|
|
411
|
+
}, {
|
|
412
|
+
key: "_openUpdateInterpreterStateToast",
|
|
413
|
+
value: function _openUpdateInterpreterStateToast(state, operatorUser) {
|
|
414
|
+
var _this3 = this;
|
|
415
|
+
var isSelfOperation = operatorUser.userId === this._userControl.getLocalUser().userId;
|
|
416
|
+
if (!isSelfOperation) {
|
|
417
|
+
if (state.enable) {
|
|
418
|
+
this._eventProvider.showNotification({
|
|
419
|
+
type: _type4.FcrUINotificationContentType.INTERPRETER_STATUS,
|
|
420
|
+
placement: 'topLeft',
|
|
421
|
+
onClose: function onClose() {
|
|
422
|
+
_this3._eventProvider.sendEvent(_constant.FcrUIAction.COLSE_NOTIFICATION, _type4.FcrUINotificationContentType.INTERPRETER_STATUS);
|
|
423
|
+
},
|
|
424
|
+
data: {
|
|
425
|
+
operatorUser: operatorUser,
|
|
426
|
+
interpreterUserList: this._interpreterProvider.getInterpreterList()
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
} else {
|
|
430
|
+
this._eventProvider.showToast({
|
|
431
|
+
type: 'info',
|
|
432
|
+
message: operatorUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_interpretation_mainwindow_toast_label_interpret_offline_controller', {
|
|
433
|
+
reason1: operatorUser.userName
|
|
434
|
+
}) : (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_by_cocontroller', {
|
|
435
|
+
reason1: operatorUser.userName
|
|
436
|
+
})
|
|
437
|
+
});
|
|
1298
438
|
}
|
|
1299
|
-
} else {
|
|
1300
|
-
this._updateUserProperties('');
|
|
1301
|
-
this._closeConfirmDialog();
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
// 同声传译-状态更新-Toast
|
|
1306
|
-
}, {
|
|
1307
|
-
key: "openUpdateInterpreterStateToast",
|
|
1308
|
-
value: function openUpdateInterpreterStateToast(roomId, state, operatorUser) {
|
|
1309
|
-
var _this9 = this;
|
|
1310
|
-
if (state.enable) {
|
|
1311
|
-
this._uiEventStore.showNotification({
|
|
1312
|
-
type: _eventStore.NotificationContentType.INTERPRETER_STATUS,
|
|
1313
|
-
placement: 'topLeft',
|
|
1314
|
-
onClose: function onClose() {
|
|
1315
|
-
_this9._uiEventStore.sendEvent(_constant.UIAction.COLSE_NOTIFICATION, _eventStore.NotificationContentType.INTERPRETER_STATUS);
|
|
1316
|
-
},
|
|
1317
|
-
data: {
|
|
1318
|
-
operatorUser: operatorUser,
|
|
1319
|
-
interpreterUserList: this._interpreterControl.getInterpreterUserList()
|
|
1320
|
-
}
|
|
1321
|
-
});
|
|
1322
|
-
} else {
|
|
1323
|
-
this._uiEventStore.showToast({
|
|
1324
|
-
type: 'info',
|
|
1325
|
-
message: operatorUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_interpretation_mainwindow_toast_label_interpret_offline_controller', {
|
|
1326
|
-
reason1: operatorUser.userName
|
|
1327
|
-
}) : (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_by_cocontroller', {
|
|
1328
|
-
reason1: operatorUser.userName
|
|
1329
|
-
})
|
|
1330
|
-
});
|
|
1331
|
-
this._setInterpreterRoomControlInfo(null);
|
|
1332
439
|
}
|
|
1333
440
|
}
|
|
1334
|
-
// 同声传译-列表更新-Toast
|
|
1335
441
|
}, {
|
|
1336
|
-
key: "
|
|
1337
|
-
value: function
|
|
1338
|
-
this.
|
|
442
|
+
key: "_updateInterpreterUsersToast",
|
|
443
|
+
value: function _updateInterpreterUsersToast(operatorUser) {
|
|
444
|
+
this._eventProvider.showToast({
|
|
1339
445
|
type: 'info',
|
|
1340
446
|
message: operatorUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_interpretation_mainwindow_toast_label_update_language', {
|
|
1341
447
|
reason1: operatorUser.userName
|
|
@@ -1344,51 +450,44 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1344
450
|
})
|
|
1345
451
|
});
|
|
1346
452
|
}
|
|
1347
|
-
// 翻译官加入房间-Toast
|
|
1348
453
|
}, {
|
|
1349
|
-
key: "
|
|
1350
|
-
value: function
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
type: 'info',
|
|
1358
|
-
message: (0, _i18n.transI18n)('fmt_interpretation_interpreter_toast_label_return_channel', {
|
|
1359
|
-
reason1: language ? _useLanguageConfig.baseLanguageConfig[language].text : ''
|
|
1360
|
-
})
|
|
1361
|
-
});
|
|
1362
|
-
}
|
|
454
|
+
key: "_interpreterUsersJoinToast",
|
|
455
|
+
value: function _interpreterUsersJoinToast(outputLanguage) {
|
|
456
|
+
this._eventProvider.showToast({
|
|
457
|
+
type: 'info',
|
|
458
|
+
message: (0, _i18n.transI18n)('fmt_interpretation_interpreter_toast_label_return_channel', {
|
|
459
|
+
reason1: outputLanguage ? _useLanguageConfig.baseLanguageConfig[outputLanguage].text : ''
|
|
460
|
+
})
|
|
461
|
+
});
|
|
1363
462
|
}
|
|
1364
|
-
|
|
1365
|
-
// 翻译官-语言更新-Dialog
|
|
1366
463
|
}, {
|
|
1367
464
|
key: "_closeConfirmDialog",
|
|
1368
465
|
value: function _closeConfirmDialog() {
|
|
1369
|
-
var
|
|
466
|
+
var _this4 = this;
|
|
1370
467
|
this._confirmDialogs.forEach(function (dialogId) {
|
|
1371
|
-
dialogId &&
|
|
1372
|
-
|
|
468
|
+
dialogId && _this4._eventProvider.closeConfirm(dialogId);
|
|
469
|
+
_this4._confirmDialogs["delete"](dialogId);
|
|
1373
470
|
});
|
|
1374
471
|
}
|
|
1375
472
|
|
|
1376
|
-
//
|
|
473
|
+
// infoDialog
|
|
1377
474
|
}, {
|
|
1378
|
-
key: "
|
|
1379
|
-
value: function
|
|
1380
|
-
var
|
|
475
|
+
key: "_openInofDialog",
|
|
476
|
+
value: function _openInofDialog(params, supportedLanguages) {
|
|
477
|
+
var _this5 = this;
|
|
478
|
+
var content = params.content,
|
|
479
|
+
title = params.title;
|
|
1381
480
|
this._closeConfirmDialog();
|
|
1382
|
-
var dialogId = this.
|
|
1383
|
-
title:
|
|
481
|
+
var dialogId = this._eventProvider.openConfirmDialog({
|
|
482
|
+
title: title,
|
|
1384
483
|
content: (0, _dialogContent.DialogContent)({
|
|
1385
|
-
content:
|
|
1386
|
-
|
|
484
|
+
content: content,
|
|
485
|
+
supportedLanguages: supportedLanguages
|
|
1387
486
|
}),
|
|
1388
487
|
alignCenter: true,
|
|
1389
488
|
onOk: function onOk() {
|
|
1390
|
-
|
|
1391
|
-
|
|
489
|
+
_this5._eventProvider.closeConfirm(dialogId);
|
|
490
|
+
_this5._confirmDialogs["delete"](dialogId);
|
|
1392
491
|
},
|
|
1393
492
|
closable: false,
|
|
1394
493
|
showCancel: false,
|
|
@@ -1399,84 +498,26 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1399
498
|
this._confirmDialogs.add(dialogId);
|
|
1400
499
|
}
|
|
1401
500
|
|
|
1402
|
-
// 翻译官-人员创建-Dialog
|
|
1403
|
-
}, {
|
|
1404
|
-
key: "openCreateInterpreterStatusToast",
|
|
1405
|
-
value: function openCreateInterpreterStatusToast(interpreter) {
|
|
1406
|
-
var _this12 = this;
|
|
1407
|
-
this._closeConfirmDialog();
|
|
1408
|
-
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
1409
|
-
title: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_as_interpreter'),
|
|
1410
|
-
content: (0, _dialogContent.DialogContent)({
|
|
1411
|
-
content: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_open_microphone'),
|
|
1412
|
-
userInfo: interpreter
|
|
1413
|
-
}),
|
|
1414
|
-
alignCenter: true,
|
|
1415
|
-
onOk: function onOk() {
|
|
1416
|
-
_this12._uiEventStore.closeConfirm(dialogId);
|
|
1417
|
-
_this12._confirmDialogs["delete"](dialogId);
|
|
1418
|
-
},
|
|
1419
|
-
closable: false,
|
|
1420
|
-
showCancel: false,
|
|
1421
|
-
okText: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_button_welcome_i_know'),
|
|
1422
|
-
width: 321,
|
|
1423
|
-
height: 234
|
|
1424
|
-
});
|
|
1425
|
-
this._confirmDialogs.add(dialogId);
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
// 翻译官-人员取消-Dialog
|
|
1429
|
-
}, {
|
|
1430
|
-
key: "openCancelInterpreterStatusToast",
|
|
1431
|
-
value: function openCancelInterpreterStatusToast() {
|
|
1432
|
-
var _this13 = this;
|
|
1433
|
-
this._closeConfirmDialog();
|
|
1434
|
-
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
1435
|
-
title: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_permission_revoke'),
|
|
1436
|
-
content: (0, _dialogContent.DialogContent)({
|
|
1437
|
-
content: (0, _i18n.transI18n)('fmt_interpretation_mobile_interpreter_popup_label_status_cancel'),
|
|
1438
|
-
userInfo: null
|
|
1439
|
-
}),
|
|
1440
|
-
alignCenter: true,
|
|
1441
|
-
onOk: function onOk() {
|
|
1442
|
-
_this13._uiEventStore.closeConfirm(dialogId);
|
|
1443
|
-
_this13._confirmDialogs["delete"](dialogId);
|
|
1444
|
-
},
|
|
1445
|
-
closable: false,
|
|
1446
|
-
showCancel: false,
|
|
1447
|
-
okText: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_button_i_know'),
|
|
1448
|
-
width: 321
|
|
1449
|
-
});
|
|
1450
|
-
this._confirmDialogs.add(dialogId);
|
|
1451
|
-
}
|
|
1452
|
-
}, {
|
|
1453
|
-
key: "release",
|
|
1454
|
-
value: function release() {
|
|
1455
|
-
this._clearTimer();
|
|
1456
|
-
this._disposers.forEach(function (disposer) {
|
|
1457
|
-
return disposer();
|
|
1458
|
-
});
|
|
1459
|
-
this._clearRetryTaskTimer();
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
501
|
// 历史参会者列表------------------------------------
|
|
1463
502
|
}, {
|
|
1464
503
|
key: "_getInitUsers",
|
|
1465
504
|
value: function _getInitUsers() {
|
|
1466
505
|
var mainRoomUsers = this._userControl.getUserList();
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
506
|
+
if (mainRoomUsers) {
|
|
507
|
+
this.initUsers = mainRoomUsers.filter(function (user) {
|
|
508
|
+
return user.connectorType === _type2.AgoraRteRoomConnectorType.NONE;
|
|
509
|
+
}).map(function (ele) {
|
|
510
|
+
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
511
|
+
isOffLine: false
|
|
512
|
+
});
|
|
1472
513
|
});
|
|
1473
|
-
}
|
|
514
|
+
}
|
|
1474
515
|
}
|
|
1475
516
|
}, {
|
|
1476
517
|
key: "_updateUsers",
|
|
1477
|
-
value: function _updateUsers(
|
|
1478
|
-
var roomId =
|
|
1479
|
-
events =
|
|
518
|
+
value: function _updateUsers(_ref3, type) {
|
|
519
|
+
var roomId = _ref3.roomId,
|
|
520
|
+
events = _ref3.events;
|
|
1480
521
|
var initUsersCopy = (0, _toConsumableArray2["default"])(this.initUsers);
|
|
1481
522
|
events.forEach(function (joinedEvent) {
|
|
1482
523
|
var modifiedUser = joinedEvent.modifiedUser;
|
|
@@ -1487,7 +528,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1487
528
|
if (initUsersCopy[index]) {
|
|
1488
529
|
if (type) {
|
|
1489
530
|
initUsersCopy[index] = _objectSpread(_objectSpread(_objectSpread({}, initUsersCopy[index]), modifiedUser), {}, {
|
|
1490
|
-
isOffLine:
|
|
531
|
+
isOffLine: _type3.UpdateType.LEFT === type
|
|
1491
532
|
});
|
|
1492
533
|
} else {
|
|
1493
534
|
initUsersCopy[index] = _objectSpread(_objectSpread({}, initUsersCopy[index]), modifiedUser);
|
|
@@ -1495,7 +536,7 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1495
536
|
}
|
|
1496
537
|
} else if (modifiedUser.connectorType === _type2.AgoraRteRoomConnectorType.NONE) {
|
|
1497
538
|
initUsersCopy.push(_objectSpread(_objectSpread({}, modifiedUser), {}, {
|
|
1498
|
-
isOffLine:
|
|
539
|
+
isOffLine: _type3.UpdateType.LEFT === type
|
|
1499
540
|
}));
|
|
1500
541
|
}
|
|
1501
542
|
});
|
|
@@ -1510,123 +551,39 @@ var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1510
551
|
this.initUsers = sortedUsers;
|
|
1511
552
|
}
|
|
1512
553
|
}, {
|
|
1513
|
-
key: "
|
|
1514
|
-
value: function
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
}, {
|
|
1525
|
-
key: "_clearRetryTaskTimer",
|
|
1526
|
-
value: function _clearRetryTaskTimer() {
|
|
1527
|
-
this._retryTask.isAllowRetry = false;
|
|
1528
|
-
if (this._retryTask.timerId) {
|
|
1529
|
-
clearTimeout(this._retryTask.timerId);
|
|
1530
|
-
this._retryTask.timerId = null;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
}, {
|
|
1534
|
-
key: "_setMainRoomVolume",
|
|
1535
|
-
value: function _setMainRoomVolume(volume) {
|
|
1536
|
-
var _this14 = this;
|
|
1537
|
-
this._streamControl.getStreamList().forEach(function (stream) {
|
|
1538
|
-
var needSetVolume = [_type2.AgoraRteMediaStreamType.AUDIO, _type2.AgoraRteMediaStreamType.BOTH].includes(stream.streamType);
|
|
1539
|
-
if (needSetVolume) _this14._streamControl.adjustRemoteAudioStreamVolume(stream.streamId, volume);
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
}, {
|
|
1543
|
-
key: "_restoreVolumeByMainRoom",
|
|
1544
|
-
value: function _restoreVolumeByMainRoom() {
|
|
1545
|
-
var _this15 = this;
|
|
1546
|
-
if (this._volumeTimerId) return;
|
|
1547
|
-
var startValue = 25; // 主房间初始音量
|
|
1548
|
-
var endValue = 100; // 最大音量
|
|
1549
|
-
var duration = 2000; // 在 2 秒内逐渐放大
|
|
1550
|
-
var interval = 50; // 更新间隔为 50ms
|
|
1551
|
-
|
|
1552
|
-
var volume = startValue;
|
|
1553
|
-
var steps = (endValue - startValue) / (duration / interval);
|
|
1554
|
-
this._volumeTimerId = setInterval(function () {
|
|
1555
|
-
volume += steps;
|
|
1556
|
-
if (volume >= endValue) {
|
|
1557
|
-
volume = endValue;
|
|
1558
|
-
_this15._clearTimer();
|
|
554
|
+
key: "closeInterpreterDialog",
|
|
555
|
+
value: function
|
|
556
|
+
// 关闭弹窗
|
|
557
|
+
closeInterpreterDialog() {
|
|
558
|
+
if (this.currentDialogId) {
|
|
559
|
+
this._eventProvider.closeDialog(this.currentDialogId);
|
|
560
|
+
this.currentDialogId = null;
|
|
561
|
+
if (this.interpreterUsersEditState) {
|
|
562
|
+
this.setInterpreterListEditState();
|
|
1559
563
|
}
|
|
1560
|
-
_this15._setMainRoomVolume(volume);
|
|
1561
|
-
}, interval);
|
|
1562
|
-
}
|
|
1563
|
-
}, {
|
|
1564
|
-
key: "_adjustMainRoomVolume",
|
|
1565
|
-
value: function _adjustMainRoomVolume(speaking) {
|
|
1566
|
-
var _this16 = this;
|
|
1567
|
-
if (speaking) {
|
|
1568
|
-
// HLD: 主房输出音量设置为25,语言房间设置输出音频为100
|
|
1569
|
-
this._setMainRoomVolume(25);
|
|
1570
|
-
this._clearTimer();
|
|
1571
|
-
} else {
|
|
1572
|
-
// PRD: 参会人听到的是译员的声音及轻微的原始音频声音。当语言频道内 6 秒内没有译员发言,原始音频的音量将在接下来的 2 秒内逐渐放大到正常音量。
|
|
1573
|
-
this._indicateTimerId = setTimeout(function () {
|
|
1574
|
-
_this16._restoreVolumeByMainRoom();
|
|
1575
|
-
}, 6000);
|
|
1576
564
|
}
|
|
1577
565
|
}
|
|
1578
566
|
}, {
|
|
1579
|
-
key: "
|
|
1580
|
-
value: function
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
key: "_onStreamVolumeIndicationUpdated",
|
|
1585
|
-
value: function _onStreamVolumeIndicationUpdated(roomId, streamId, volume) {
|
|
1586
|
-
// HLD: 判断 volume > 10 ,避免波动, 则认为是在说话
|
|
1587
|
-
this._isSpeaking = Math.floor(volume / 255 * 100) > 10;
|
|
567
|
+
key: "_handleUiEvents",
|
|
568
|
+
value: function _handleUiEvents(action, payload) {
|
|
569
|
+
if (action === _constant.FcrUIAction.OPEN_INTERPRETER_DIALOG) {
|
|
570
|
+
this.currentDialogId = this._eventProvider.openDialog(_constant.FcrUIDialogKey.INTERPRETER);
|
|
571
|
+
}
|
|
1588
572
|
}
|
|
1589
573
|
}, {
|
|
1590
|
-
key: "
|
|
1591
|
-
value: function
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
if (action === _constant.UIAction.CHANGE_INTERPRETER_OUTPUT_LANGUE) {
|
|
1596
|
-
this.changeOutputLanguage(payload);
|
|
1597
|
-
}
|
|
1598
|
-
if (action === _constant.UIAction.OPEN_INTERPRETER_DIALOG) {
|
|
1599
|
-
this.openInterpreterDialog();
|
|
1600
|
-
}
|
|
1601
|
-
if (action === _constant.UIAction.CLOSE_INTERPRETER_DIALOG) {
|
|
1602
|
-
this.closeInterpreterDialog();
|
|
1603
|
-
}
|
|
1604
|
-
if (action === _constant.UIAction.TOGGLE_LANGUAGE_ROOM) {
|
|
1605
|
-
this.toggleLanguageRoom(payload);
|
|
1606
|
-
}
|
|
1607
|
-
if (action === _constant.UIAction.TOGGLE_MAIN_ROOM_INPUT) {
|
|
1608
|
-
this.changeMainRoomStream(payload);
|
|
1609
|
-
}
|
|
1610
|
-
if (action === _constant.UIAction.CLOSE_ALL_LANGUAGE_ROOM_INPUT) {
|
|
1611
|
-
this.closeAllLanguageRoomInput(payload);
|
|
1612
|
-
}
|
|
1613
|
-
if (action === _constant.UIAction.TOGGLE_MAINROOM_REMOTE_AUDIO) {
|
|
1614
|
-
if ((payload === null || payload === void 0 ? void 0 : payload.action) === 'changeOutputByMainRoom') {
|
|
1615
|
-
this._clearRetryTaskTimer();
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
574
|
+
key: "release",
|
|
575
|
+
value: function release() {
|
|
576
|
+
this._interpreterProvider.removeObserver(this._interpreterProviderObserver);
|
|
577
|
+
this._userControl.removeObserver(this._userControlObserver);
|
|
578
|
+
this._eventProvider.removeObserver(this._eventProviderObserver);
|
|
1618
579
|
}
|
|
1619
580
|
}]);
|
|
1620
581
|
}(); // #endregion
|
|
1621
582
|
_InterpreterStore = InterpreterStore;
|
|
1622
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_InterpreterStore, [[_mobx.observable, 1, "
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
_init_initUsers = _applyDecs$e[5];
|
|
1629
|
-
_init_interpreterState = _applyDecs$e[6];
|
|
1630
|
-
_init_currentDialogId = _applyDecs$e[7];
|
|
1631
|
-
_initProto = _applyDecs$e[8];
|
|
583
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_InterpreterStore, [[_mobx.observable, 1, "localInterpreterUsers"], [_mobx.observable, 1, "interpreterUsersEditState"], [_mobx.observable, 1, "initUsers"], [_mobx.observable, 1, "currentDialogId"], [_mobx.computed, 3, "hasEnableInterpreterPermission"], [_mobx.computed, 3, "interpreterUsersCheckPass"], [_mobx.computed, 3, "interpreterUsersAllOffLine"], [_mobx.computed, 3, "languageList"], [_openInterpreterStateDecs, 18, "openInterpreterState"], [_closeInterpreterStateDecs, 18, "closeInterpreterState"], [_setInterpreterListEditStateDecs, 18, "setInterpreterListEditState"], [_addInterpreterUsersDecs, 18, "addInterpreterUsers"], [_deleteInterpreterUsersDecs, 18, "deleteInterpreterUsers"], [_updateInterpreterUsersDecs, 18, "updateInterpreterUsers"], [_queryInterpreterUsersDecs, 18, "queryInterpreterUsers"], [_getInterpreterStateDecs, 18, "getInterpreterState"], [_openUpdateInterpreterStateToastDecs, 18, "_openUpdateInterpreterStateToast"], [_updateInterpreterUsersToastDecs, 18, "_updateInterpreterUsersToast"], [_interpreterUsersJoinToastDecs, 18, "_interpreterUsersJoinToast"], [_closeConfirmDialogDecs, 18, "_closeConfirmDialog"], [_openInofDialogDecs, 18, "_openInofDialog"], [_getInitUsersDecs, 18, "_getInitUsers"], [_updateUsersDecs, 18, "_updateUsers"], [_closeInterpreterDialogDecs, 18, "closeInterpreterDialog"], [_handleUiEventsDecs, 18, "_handleUiEvents"]], []).e, 5);
|
|
584
|
+
_init_localInterpreterUsers = _applyDecs$e[0];
|
|
585
|
+
_init_interpreterUsersEditState = _applyDecs$e[1];
|
|
586
|
+
_init_initUsers = _applyDecs$e[2];
|
|
587
|
+
_init_currentDialogId = _applyDecs$e[3];
|
|
588
|
+
_initProto = _applyDecs$e[4];
|
|
1632
589
|
var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|