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