fcr-ui-scene 3.4.1 → 3.4.3
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 +234 -22
- package/lib/common/device-store.d.ts +3 -2
- package/lib/common/device-store.js +174 -194
- package/lib/common/device-stream-store.d.ts +27 -7
- package/lib/common/device-stream-store.js +190 -176
- package/lib/common/event-store.d.ts +4 -13
- package/lib/common/event-store.js +7 -18
- package/lib/common/room-store.js +6 -6
- package/lib/common/security-store.d.ts +19 -9
- package/lib/common/security-store.js +27 -39
- package/lib/creator.d.ts +1 -1
- package/lib/creator.js +4 -9
- package/lib/electron/app.js +5 -4
- package/lib/electron/bootstrap-dev.js +0 -9
- package/lib/electron/bootstrap-sdk.js +10 -2
- package/lib/electron/injections.d.ts +2 -0
- package/lib/electron/injections.js +17 -7
- 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/electron/tools.js +0 -4
- package/lib/electron/window.js +0 -2
- package/lib/fragments/control-bar/control-bar-store.d.ts +1 -0
- package/lib/fragments/control-bar/control-bar-store.js +9 -4
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +31 -12
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +117 -16
- 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/action-bar/action-bar-collapes-items.d.ts +1 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +11 -11
- package/lib/modules/action-bar/apps/useInterpreter.js +2 -4
- 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/app-item/index.js +0 -2
- package/lib/modules/action-bar/components/apps/appitems.d.ts +1 -3
- package/lib/modules/action-bar/components/apps/appitems.js +2 -5
- 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/apps/useAppItemOptions.js +0 -1
- package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
- package/lib/modules/action-bar/components/collapse/index.js +218 -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.js → item/index.js} +2 -4
- 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 -26
- 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 -9
- package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/interpreter/index.js +2 -1
- package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/virtual-image/index.js +1 -1
- package/lib/modules/action-bar/{notification-bar → components/notification-bar}/index.js +1 -3
- 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-output-language/index.d.ts +2 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.js +231 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/{trigger-output-language-room → components/trigger-subscribe-language}/guide-tooltip/index.js +14 -19
- 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 +206 -0
- package/lib/modules/action-bar/device/index.js +3 -1
- 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/more/index.js +3 -6
- package/lib/modules/action-bar/screen-share/index.js +0 -5
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/smaller.js +2 -2
- package/lib/modules/action-bar/store.d.ts +84 -98
- package/lib/modules/action-bar/store.js +567 -713
- package/lib/modules/action-bar/switch-output-language-room/index.js +8 -2
- package/lib/modules/action-bar/types.d.ts +94 -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 -85
- package/lib/modules/chat/chat-bar/index.css +0 -5
- package/lib/modules/chat/chat-bar/index.js +14 -16
- package/lib/modules/chat/chat-room-store.d.ts +135 -0
- package/lib/modules/chat/chat-room-store.js +950 -0
- package/lib/modules/chat/chat-select/index.css +3 -6
- package/lib/modules/chat/chat-select/index.js +1 -15
- package/lib/modules/chat/chat.js +6 -7
- 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 +143 -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 +234 -0
- package/lib/modules/chat/components/message-list/index.d.ts +4 -0
- package/lib/modules/chat/components/message-list/index.js +648 -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 +1 -4
- 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 -964
- 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 +368 -0
- package/lib/modules/components/device-control/components/audio-menu/index.js +4 -3
- package/lib/modules/components/device-control/components/microphone/index.js +7 -7
- package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
- package/lib/modules/components/device-control/store.d.ts +11 -12
- package/lib/modules/components/device-control/store.js +46 -50
- 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 +290 -0
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +12 -10
- package/lib/modules/components/security-menu/index.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +35 -39
- package/lib/modules/components/tab-frame/index.d.ts +2 -2
- package/lib/modules/components/tab-frame/index.js +24 -7
- 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/components/callinfo/index.js +2 -1
- package/lib/modules/connection-gateway/components/phone/index.js +4 -3
- 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 -40
- 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 +25 -28
- 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 +48 -11
- 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 -29
- package/lib/modules/control-bar/store.d.ts +38 -26
- package/lib/modules/control-bar/store.js +172 -286
- 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 -36
- package/lib/modules/device-pretest/index.js +4 -4
- package/lib/modules/device-pretest/settings/beauty.js +2 -1
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
- package/lib/modules/device-pretest/store.d.ts +8 -9
- package/lib/modules/device-pretest/store.js +51 -37
- 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/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.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.js +75 -0
- package/lib/modules/{components → dialog/components}/dialog-container/index.css +6 -3
- package/lib/modules/{components → dialog/components}/dialog-container/index.d.ts +7 -2
- package/lib/modules/{components → dialog/components}/dialog-container/index.js +27 -25
- package/lib/modules/dialog/components/interpreter/electron.js +37 -0
- package/lib/modules/dialog/components/{Interpreter → interpreter}/index.js +2 -2
- 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/remove-admit-waiting-room/electron.js +6 -3
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +14 -4
- 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/system-preference/index.js +0 -2
- 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 +90 -36
- package/lib/modules/dialog/index.d.ts +30 -4
- package/lib/modules/dialog/index.js +61 -7
- package/lib/modules/dialog/store.d.ts +46 -12
- package/lib/modules/dialog/store.js +121 -68
- package/lib/modules/dialog/types/index.d.ts +14 -3
- package/lib/modules/dialog/view.js +2 -1
- 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 -10
- package/lib/modules/event-confirm/view.js +7 -6
- 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 -8
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.d.ts +2 -2
- package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.js +2 -2
- package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.js +5 -5
- package/lib/modules/{Interpreter → interpreter}/constant.d.ts +0 -4
- package/lib/modules/{Interpreter → interpreter}/constant.js +3 -45
- package/lib/modules/{Interpreter → interpreter}/dialog-content/index.d.ts +2 -2
- package/lib/modules/{Interpreter → interpreter}/dialog-content/index.js +4 -4
- package/lib/modules/interpreter/index.d.ts +15 -0
- package/lib/modules/{Interpreter → interpreter}/index.js +23 -8
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.js +2 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.js +5 -8
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.js +14 -18
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.d.ts +2 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.js +2 -2
- package/lib/modules/interpreter/store.d.ts +50 -0
- package/lib/modules/interpreter/store.js +584 -0
- package/lib/modules/interpreter/type.d.ts +24 -0
- package/lib/modules/interpreter/type.js +12 -0
- package/lib/modules/{Interpreter → interpreter}/utils.d.ts +1 -5
- package/lib/modules/interpreter/utils.js +80 -0
- package/lib/modules/{Interpreter → interpreter}/view.js +19 -3
- 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 +288 -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 +34 -0
- package/lib/modules/invite/index.d.ts +7 -8
- package/lib/modules/invite/index.js +17 -15
- package/lib/modules/invite/store.d.ts +13 -26
- package/lib/modules/invite/store.js +62 -26
- 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 +3 -3
- package/lib/modules/layout/components/Aside.js +34 -17
- package/lib/modules/layout/components/Carousel.js +3 -2
- package/lib/modules/layout/components/Gallery.js +3 -3
- package/lib/modules/layout/components/Layout.js +4 -7
- package/lib/modules/layout/components/index.d.ts +1 -1
- package/lib/modules/layout/components/index.js +4 -5
- 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 +9 -22
- package/lib/modules/layout/member-window/index.d.ts +1 -1
- package/lib/modules/layout/member-window/index.js +26 -27
- package/lib/modules/layout/store.d.ts +61 -71
- package/lib/modules/layout/store.js +311 -576
- package/lib/modules/layout/type.js +2 -0
- package/lib/modules/layout/video-window-datasource.js +0 -4
- 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 +83 -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 +3 -3
- 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 -2
- 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 -64
- 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 +334 -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 -11
- 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 -51
- package/lib/modules/participant/components/user-action/index.d.ts +17 -0
- package/lib/modules/participant/components/user-action/index.js +167 -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 -15
- package/lib/modules/participant/member-list-data-source.d.ts +4 -1
- package/lib/modules/participant/member-list-data-source.js +57 -33
- package/lib/modules/participant/store.d.ts +58 -25
- package/lib/modules/participant/store.js +321 -303
- 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 +300 -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 +78 -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 +317 -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 +185 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +6 -6
- 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 +3 -2
- package/lib/modules/setting/state/index.js +3 -7
- package/lib/modules/setting/store.d.ts +48 -14
- package/lib/modules/setting/store.js +105 -118
- package/lib/modules/setting/translate-settings/translate-settings.js +4 -4
- 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 -2
- package/lib/modules/share-screen/selection/index.js +97 -83
- package/lib/modules/share-screen/store.d.ts +36 -32
- package/lib/modules/share-screen/store.js +249 -222
- 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 -41
- 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/layout-config.js +2 -1
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/meeting-details.js +31 -24
- 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 -88
- 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 +27 -12
- package/lib/modules/video-window/store.d.ts +58 -27
- package/lib/modules/video-window/store.js +166 -165
- package/lib/modules/video-window/topControl/index.js +0 -2
- 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/components/switch-theme/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -4
- package/lib/modules/whiteboard/index.d.ts +20 -14
- package/lib/modules/whiteboard/index.js +250 -227
- 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 -185
- package/lib/providers/device-provider.d.ts +203 -45
- package/lib/providers/device-provider.js +486 -403
- package/lib/providers/device-stream-provider.d.ts +12 -13
- package/lib/providers/device-stream-provider.js +86 -194
- package/lib/providers/dialog-provider.d.ts +135 -0
- package/lib/providers/dialog-provider.js +202 -0
- package/lib/providers/event-provider.d.ts +1 -21
- package/lib/providers/event-provider.js +19 -59
- package/lib/providers/interpreter-provider.d.ts +218 -7
- package/lib/providers/interpreter-provider.js +1069 -81
- 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 +96 -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 +512 -0
- package/lib/providers/privilege-provider.d.ts +325 -12
- package/lib/providers/privilege-provider.js +111 -299
- package/lib/providers/renderer-provider.d.ts +46 -4
- package/lib/providers/renderer-provider.js +57 -61
- package/lib/providers/room-provider.d.ts +113 -6
- package/lib/providers/room-provider.js +665 -88
- package/lib/providers/screen-share-provider.d.ts +65 -0
- package/lib/providers/screen-share-provider.js +237 -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 -248
- 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/{common/remote-renderer.js → shared-data-source/chat-data.js} +67 -77
- 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 +246 -0
- package/lib/shared-data-source/layout-data.d.ts +29 -0
- package/lib/shared-data-source/layout-data.js +178 -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 +151 -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 +1198 -0
- package/lib/shared-data-source/waiting-room.d.ts +19 -0
- package/lib/shared-data-source/waiting-room.js +157 -0
- package/lib/translations/enUS.d.ts +48 -17
- package/lib/translations/enUS.js +67 -35
- package/lib/translations/zhCN.d.ts +48 -17
- package/lib/translations/zhCN.js +68 -36
- package/lib/type.d.ts +270 -25
- package/lib/type.js +81 -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 +371 -43
- package/lib/utilities/constant.d.ts +63 -86
- package/lib/utilities/constant.js +158 -175
- package/lib/utilities/copyText.js +8 -7
- package/lib/utilities/meeting-detail.d.ts +2 -0
- package/lib/utilities/meeting-detail.js +39 -0
- package/lib/utilities/privilege.d.ts +4 -0
- package/lib/utilities/privilege.js +29 -0
- package/lib/utilities/renderer-event.js +0 -2
- package/lib/utilities/renderer.js +0 -1
- package/lib/utilities/setting-config-storage.d.ts +12 -0
- package/lib/utilities/setting-config-storage.js +100 -0
- package/lib/utilities/tools.d.ts +35 -3
- package/lib/utilities/tools.js +103 -4
- package/lib/utilities/video-track-render-context.d.ts +3 -4
- package/lib/utilities/video-track-render-context.js +1 -1
- package/package.json +10 -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
- package/lib/ scenes/base.d.ts +0 -10
- package/lib/ scenes/base.js +0 -75
- package/lib/ scenes/main-scene.d.ts +0 -43
- package/lib/ scenes/main-scene.js +0 -368
- package/lib/ scenes/waiting-scene.d.ts +0 -31
- package/lib/ scenes/waiting-scene.js +0 -119
- package/lib/common/remote-renderer.d.ts +0 -15
- package/lib/common/type.d.ts +0 -8
- package/lib/electron/bootstrap.d.ts +0 -1
- package/lib/electron/bootstrap.js +0 -56
- package/lib/electron/dev.d.ts +0 -1
- package/lib/electron/dev.js +0 -51
- package/lib/error-fallback.css +0 -62
- package/lib/error-fallback.d.ts +0 -2
- package/lib/error-fallback.js +0 -19
- package/lib/modules/Interpreter/context.d.ts +0 -2
- package/lib/modules/Interpreter/context.js +0 -9
- package/lib/modules/Interpreter/index.d.ts +0 -8
- package/lib/modules/Interpreter/store.d.ts +0 -111
- package/lib/modules/Interpreter/store.js +0 -1601
- package/lib/modules/Interpreter/type.d.ts +0 -41
- package/lib/modules/Interpreter/type.js +0 -20
- package/lib/modules/Interpreter/utils.js +0 -139
- package/lib/modules/action-bar/components/device/index.css +0 -162
- package/lib/modules/action-bar/components/device/index.d.ts +0 -8
- package/lib/modules/action-bar/components/device/index.js +0 -611
- package/lib/modules/action-bar/components/item.d.ts +0 -27
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +0 -15
- package/lib/modules/action-bar/trigger-input-language-room/index.js +0 -220
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +0 -10
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +0 -8
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +0 -14
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +0 -4
- package/lib/modules/action-bar/trigger-output-language-room/index.js +0 -98
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +0 -5
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +0 -66
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +0 -5
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +0 -36
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +0 -12
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +0 -138
- package/lib/modules/components/dialog-container/component/body.js +0 -46
- package/lib/modules/dialog/components/Interpreter/electron.js +0 -31
- package/lib/modules/dialog/components/Interpreter/user-queue/index.css +0 -36
- package/lib/modules/dialog/components/Interpreter/user-queue/index.d.ts +0 -3
- package/lib/modules/dialog/components/Interpreter/user-queue/index.js +0 -47
- package/lib/modules/notification/context.d.ts +0 -2
- package/lib/modules/notification/context.js +0 -9
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -278
- package/lib/scenes/base.d.ts +0 -10
- package/lib/scenes/base.js +0 -75
- package/lib/ui-node.d.ts +0 -25
- package/lib/ui-node.js +0 -156
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar/assets}/dome.png +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar/assets}/fcr_translateswitch.png +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/interpreter/index.css +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/interpreter/index.d.ts +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/virtual-image/index.css +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/components/virtual-image/index.d.ts +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/index.css +0 -0
- /package/lib/modules/action-bar/{notification-bar → components/notification-bar}/index.d.ts +0 -0
- /package/lib/modules/action-bar/{trigger-input-language-room → components/trigger-output-language}/fcr_translateswitch.png +0 -0
- /package/lib/modules/action-bar/{trigger-input-language-room → components/trigger-output-language}/index.css +0 -0
- /package/lib/modules/action-bar/{trigger-output-language-room → components/trigger-subscribe-language}/guide-tooltip/index.css +0 -0
- /package/lib/modules/action-bar/{Interpreter → interpreter}/index.d.ts +0 -0
- /package/lib/modules/action-bar/{Interpreter → interpreter}/index.js +0 -0
- /package/lib/{common/type.js → modules/action-bar/types.js} +0 -0
- /package/lib/modules/{components → dialog/components}/dialog-container/component/body.d.ts +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/electron.d.ts +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/index.css +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/config.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/config.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/dialog-content/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/interpreter-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/interpreter-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/set-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/set-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/tooltip-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/tooltip-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ar.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_cn.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_de.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_en.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_es.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_fr.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_hi.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_id.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_it.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_jp.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ko.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ms.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_pt.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ru.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_th.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_tr.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_vi.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/option-Item.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/tooltip-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/tooltip-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/view.d.ts +0 -0
|
@@ -1,1601 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
|
4
|
-
require("core-js/modules/es.symbol.description.js");
|
|
5
|
-
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
-
require("core-js/modules/es.error.cause.js");
|
|
7
|
-
require("core-js/modules/es.error.to-string.js");
|
|
8
|
-
require("core-js/modules/es.array.is-array.js");
|
|
9
|
-
require("core-js/modules/es.date.to-primitive.js");
|
|
10
|
-
require("core-js/modules/es.function.name.js");
|
|
11
|
-
require("core-js/modules/es.map.js");
|
|
12
|
-
require("core-js/modules/es.number.constructor.js");
|
|
13
|
-
require("core-js/modules/es.object.create.js");
|
|
14
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
15
|
-
require("core-js/modules/es.object.define-property.js");
|
|
16
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
18
|
-
require("core-js/modules/esnext.function.metadata.js");
|
|
19
|
-
require("core-js/modules/esnext.map.delete-all.js");
|
|
20
|
-
require("core-js/modules/esnext.map.emplace.js");
|
|
21
|
-
require("core-js/modules/esnext.map.every.js");
|
|
22
|
-
require("core-js/modules/esnext.map.filter.js");
|
|
23
|
-
require("core-js/modules/esnext.map.find.js");
|
|
24
|
-
require("core-js/modules/esnext.map.find-key.js");
|
|
25
|
-
require("core-js/modules/esnext.map.includes.js");
|
|
26
|
-
require("core-js/modules/esnext.map.key-of.js");
|
|
27
|
-
require("core-js/modules/esnext.map.map-keys.js");
|
|
28
|
-
require("core-js/modules/esnext.map.map-values.js");
|
|
29
|
-
require("core-js/modules/esnext.map.merge.js");
|
|
30
|
-
require("core-js/modules/esnext.map.reduce.js");
|
|
31
|
-
require("core-js/modules/esnext.map.some.js");
|
|
32
|
-
require("core-js/modules/esnext.map.update.js");
|
|
33
|
-
require("core-js/modules/esnext.symbol.metadata.js");
|
|
34
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
35
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
36
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37
|
-
value: true
|
|
38
|
-
});
|
|
39
|
-
exports["default"] = exports.StoreContext = void 0;
|
|
40
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
41
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
42
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
43
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
44
|
-
require("core-js/modules/es.array.concat.js");
|
|
45
|
-
require("core-js/modules/es.array.every.js");
|
|
46
|
-
require("core-js/modules/es.array.filter.js");
|
|
47
|
-
require("core-js/modules/es.array.find.js");
|
|
48
|
-
require("core-js/modules/es.array.find-index.js");
|
|
49
|
-
require("core-js/modules/es.array.for-each.js");
|
|
50
|
-
require("core-js/modules/es.array.includes.js");
|
|
51
|
-
require("core-js/modules/es.array.iterator.js");
|
|
52
|
-
require("core-js/modules/es.array.map.js");
|
|
53
|
-
require("core-js/modules/es.array.push.js");
|
|
54
|
-
require("core-js/modules/es.array.some.js");
|
|
55
|
-
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
|
-
require("core-js/modules/es.object.to-string.js");
|
|
59
|
-
require("core-js/modules/es.set.js");
|
|
60
|
-
require("core-js/modules/es.string.includes.js");
|
|
61
|
-
require("core-js/modules/es.string.iterator.js");
|
|
62
|
-
require("core-js/modules/es.weak-map.js");
|
|
63
|
-
require("core-js/modules/esnext.async-iterator.every.js");
|
|
64
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
65
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
66
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
67
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
68
|
-
require("core-js/modules/esnext.async-iterator.some.js");
|
|
69
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
70
|
-
require("core-js/modules/esnext.iterator.every.js");
|
|
71
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
72
|
-
require("core-js/modules/esnext.iterator.find.js");
|
|
73
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
74
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
75
|
-
require("core-js/modules/esnext.iterator.some.js");
|
|
76
|
-
require("core-js/modules/esnext.set.add-all.js");
|
|
77
|
-
require("core-js/modules/esnext.set.delete-all.js");
|
|
78
|
-
require("core-js/modules/esnext.set.difference.v2.js");
|
|
79
|
-
require("core-js/modules/esnext.set.difference.js");
|
|
80
|
-
require("core-js/modules/esnext.set.every.js");
|
|
81
|
-
require("core-js/modules/esnext.set.filter.js");
|
|
82
|
-
require("core-js/modules/esnext.set.find.js");
|
|
83
|
-
require("core-js/modules/esnext.set.intersection.v2.js");
|
|
84
|
-
require("core-js/modules/esnext.set.intersection.js");
|
|
85
|
-
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
|
86
|
-
require("core-js/modules/esnext.set.is-disjoint-from.js");
|
|
87
|
-
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
|
88
|
-
require("core-js/modules/esnext.set.is-subset-of.js");
|
|
89
|
-
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
|
90
|
-
require("core-js/modules/esnext.set.is-superset-of.js");
|
|
91
|
-
require("core-js/modules/esnext.set.join.js");
|
|
92
|
-
require("core-js/modules/esnext.set.map.js");
|
|
93
|
-
require("core-js/modules/esnext.set.reduce.js");
|
|
94
|
-
require("core-js/modules/esnext.set.some.js");
|
|
95
|
-
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
|
96
|
-
require("core-js/modules/esnext.set.symmetric-difference.js");
|
|
97
|
-
require("core-js/modules/esnext.set.union.v2.js");
|
|
98
|
-
require("core-js/modules/esnext.set.union.js");
|
|
99
|
-
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
100
|
-
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
101
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
102
|
-
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
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
106
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
107
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
108
|
-
var _mobx = require("mobx");
|
|
109
|
-
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
110
|
-
var _type = require("fcr-core/lib/type");
|
|
111
|
-
var _uuid = require("uuid");
|
|
112
|
-
var _eventStore = require("../../common/event-store");
|
|
113
|
-
var _dialogContent = require("./dialog-content");
|
|
114
|
-
var _fcrCore = require("fcr-core");
|
|
115
|
-
var _constant = require("../../utilities/constant");
|
|
116
|
-
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
|
-
var _logger = require("agora-foundation/lib/logger");
|
|
120
|
-
var _store = require("../action-bar/store");
|
|
121
|
-
var _react = require("react");
|
|
122
|
-
var _useLanguageConfig = require("./interpreter-list/interpreter-item/components/pick-language/useLanguageConfig");
|
|
123
|
-
var _constant2 = require("../action-bar/trigger-output-language-room/constant");
|
|
124
|
-
var _type5 = require("./type");
|
|
125
|
-
var _utils = require("./utils");
|
|
126
|
-
var _excluded = ["randomKey"];
|
|
127
|
-
var _InterpreterStore;
|
|
128
|
-
var _initProto, _init__isSpeaking, _init__languageRoomLisByStatus, _init_localInterpreterUsers, _init_orgInterpreterUsers, _init_interpreterUsersEditState, _init_initUsers, _init_interpreterState, _init_currentDialogId, _init_retryTaskTimeoutId, _init__language, _openInterpreterStateDecs, _closeInterpreterStateDecs, _setInterpreterListEditStateDecs, _addInterpreterUsersDecs, _deleteInterpreterUsersDecs, _updateInterpreterUsersDecs, _queryInterpreterUsersDecs, _setMainRoomStreamDecs, _setLanguageRoomJoinOrLeaveDecs, _updateInterpreterDecs, _resetInterpreterDecs, _setInputLanguageRoomDecs, _initLanguageRoomListByStatusDecs, _updateLanguageRoomListByStatusDecs, _updateUserPropertiesDecs, _updateStreamsDecs, _triggerLanguageRoomStreamDecs, _handleOutputLanguageRoomDecs, _triggerOutputLanguageDecs, _joinInterpreterRoomDecs, _leaveInterpreterRoomDecs, _bindLocalMicrophoneIdDecs, _getInterpreterStateDecs, _openInterpreterDialogDecs, _closeInterpreterDialogDecs, _getLocalUserByInterpreterDecs, _checkIsSelfOperationDecs, _interpreterUsersUpdatedToastDecs, _interpreterStateUpdatedToastDecs, _openUpdateInterpreterStateToastDecs, _updateInterpreterUsersToastDecs, _interpreterUsersJoinToastDecs, _closeConfirmDialogDecs, _openUpdateLanguageDialogDecs, _openCreateInterpreterStatusToastDecs, _openCancelInterpreterStatusToastDecs, _getInitUsersDecs, _updateUsersDecs, _clearTimerDecs, _clearRetryTaskTimerDecs, _restoreVolumeByMainRoomDecs, _adjustMainRoomVolumeDecs, _onStreamVolumeIndicationUpdatedDecs, _ref;
|
|
129
|
-
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
|
-
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
|
-
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
132
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
133
|
-
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
134
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
135
|
-
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
136
|
-
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
137
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
138
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
139
|
-
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
140
|
-
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
141
|
-
var _A = /*#__PURE__*/new WeakMap();
|
|
142
|
-
var _B = /*#__PURE__*/new WeakMap();
|
|
143
|
-
var _C = /*#__PURE__*/new WeakMap();
|
|
144
|
-
var _D = /*#__PURE__*/new WeakMap();
|
|
145
|
-
var _E = /*#__PURE__*/new WeakMap();
|
|
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");
|
|
152
|
-
var InterpreterStore = exports["default"] = /*#__PURE__*/function () {
|
|
153
|
-
function InterpreterStore(_ref2) {
|
|
154
|
-
var _this = this;
|
|
155
|
-
var roomControl = _ref2.roomControl,
|
|
156
|
-
uiEventStore = _ref2.uiEventStore,
|
|
157
|
-
deviceStore = _ref2.deviceStore,
|
|
158
|
-
roomStore = _ref2.roomStore,
|
|
159
|
-
deviceStreamStore = _ref2.deviceStreamStore,
|
|
160
|
-
securityStore = _ref2.securityStore;
|
|
161
|
-
(0, _classCallCheck2["default"])(this, InterpreterStore);
|
|
162
|
-
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
163
|
-
(0, _defineProperty2["default"])(this, "_indicateTimerId", null);
|
|
164
|
-
(0, _defineProperty2["default"])(this, "_volumeTimerId", null);
|
|
165
|
-
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
166
|
-
(0, _defineProperty2["default"])(this, "_retryTask", {
|
|
167
|
-
timerId: null,
|
|
168
|
-
isAllowRetry: true
|
|
169
|
-
});
|
|
170
|
-
(0, _defineProperty2["default"])(this, "_confirmDialogs", new Set());
|
|
171
|
-
_classPrivateFieldInitSpec(this, _A, _init__isSpeaking(this, false));
|
|
172
|
-
_classPrivateFieldInitSpec(this, _B, _init__languageRoomLisByStatus(this, []));
|
|
173
|
-
// 语言房间列表
|
|
174
|
-
_classPrivateFieldInitSpec(this, _C, _init_localInterpreterUsers(this, []));
|
|
175
|
-
// 本地同声传译列表
|
|
176
|
-
_classPrivateFieldInitSpec(this, _D, _init_orgInterpreterUsers(this, []));
|
|
177
|
-
// 服务端原始同声传译列表 作对比用
|
|
178
|
-
_classPrivateFieldInitSpec(this, _E, _init_interpreterUsersEditState(this, false));
|
|
179
|
-
// 同声传译列表-编辑状态
|
|
180
|
-
_classPrivateFieldInitSpec(this, _F, _init_initUsers(this, []));
|
|
181
|
-
// 历史用户列表
|
|
182
|
-
_classPrivateFieldInitSpec(this, _G, _init_interpreterState(this));
|
|
183
|
-
_classPrivateFieldInitSpec(this, _H, _init_currentDialogId(this, null));
|
|
184
|
-
_classPrivateFieldInitSpec(this, _I, _init_retryTaskTimeoutId(this, null));
|
|
185
|
-
_classPrivateFieldInitSpec(this, _J, _init__language(this, null));
|
|
186
|
-
this._mainRoomControl = roomControl;
|
|
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(); // 查询同声传译列表
|
|
206
|
-
},
|
|
207
|
-
onInterpreterUsersUpdated: function onInterpreterUsersUpdated(roomId, users, operatorUser) {
|
|
208
|
-
_this.interpreterUsersUpdatedToast(roomId, users, operatorUser);
|
|
209
|
-
_this.queryInterpreterUsers(); // 查询同声传译列表
|
|
210
|
-
_this.interpreterUsersEditState = false;
|
|
211
|
-
},
|
|
212
|
-
onInterpreterRoomListUpdated: function onInterpreterRoomListUpdated() {
|
|
213
|
-
_this._initLanguageRoomListByStatus();
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
// 监听参会者人员变化
|
|
217
|
-
this._userControl.addObserver({
|
|
218
|
-
//成员加入
|
|
219
|
-
onRemoteUsersJoined: function onRemoteUsersJoined(roomId, events) {
|
|
220
|
-
_this._updateUsers({
|
|
221
|
-
roomId: roomId,
|
|
222
|
-
events: events
|
|
223
|
-
}, _type5.UpdateType.JOIN);
|
|
224
|
-
},
|
|
225
|
-
//成员离开
|
|
226
|
-
onRemoteUsersLeft: function onRemoteUsersLeft(roomId, events) {
|
|
227
|
-
_this._updateUsers({
|
|
228
|
-
roomId: roomId,
|
|
229
|
-
events: events
|
|
230
|
-
}, _type5.UpdateType.LEFT);
|
|
231
|
-
},
|
|
232
|
-
onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
|
|
233
|
-
_this._updateUsers({
|
|
234
|
-
roomId: roomId,
|
|
235
|
-
events: [event]
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
this._uiEventStore.addObserver({
|
|
240
|
-
onEvent: this._handleUiEvents.bind(this)
|
|
241
|
-
});
|
|
242
|
-
this._deviceStore.addObserver({
|
|
243
|
-
onMicrophoneChanged: function onMicrophoneChanged(microphoneId) {
|
|
244
|
-
var _this$_languageRoomLi;
|
|
245
|
-
(_this$_languageRoomLi = _this._languageRoomLisByStatus) === null || _this$_languageRoomLi === void 0 || _this$_languageRoomLi.forEach(function (room) {
|
|
246
|
-
if (room.status === _type5.UpdateType.JOIN) {
|
|
247
|
-
_this.bindLocalMicrophoneId(room, microphoneId);
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
this._disposers.push((0, _mobx.reaction)(function () {
|
|
253
|
-
return _this._isSpeaking;
|
|
254
|
-
}, function (speaking) {
|
|
255
|
-
_this._adjustMainRoomVolume(speaking);
|
|
256
|
-
}, {
|
|
257
|
-
delay: 500
|
|
258
|
-
}), (0, _mobx.reaction)(function () {
|
|
259
|
-
return _this._deviceStore.microphoneEnabled;
|
|
260
|
-
}, /*#__PURE__*/function () {
|
|
261
|
-
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(microphoneEnabled) {
|
|
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
|
-
}()));
|
|
281
|
-
|
|
282
|
-
// @ts-ignore
|
|
283
|
-
window._interpreterStore = this;
|
|
284
|
-
}
|
|
285
|
-
return (0, _createClass2["default"])(InterpreterStore, [{
|
|
286
|
-
key: "_isSpeaking",
|
|
287
|
-
get: function get() {
|
|
288
|
-
return _classPrivateFieldGet(_A, this);
|
|
289
|
-
},
|
|
290
|
-
set: function set(v) {
|
|
291
|
-
_classPrivateFieldSet(_A, this, v);
|
|
292
|
-
}
|
|
293
|
-
}, {
|
|
294
|
-
key: "_languageRoomLisByStatus",
|
|
295
|
-
get: function get() {
|
|
296
|
-
return _classPrivateFieldGet(_B, this);
|
|
297
|
-
},
|
|
298
|
-
set: function set(v) {
|
|
299
|
-
_classPrivateFieldSet(_B, this, v);
|
|
300
|
-
}
|
|
301
|
-
}, {
|
|
302
|
-
key: "localInterpreterUsers",
|
|
303
|
-
get: function get() {
|
|
304
|
-
return _classPrivateFieldGet(_C, this);
|
|
305
|
-
},
|
|
306
|
-
set: function set(v) {
|
|
307
|
-
_classPrivateFieldSet(_C, this, v);
|
|
308
|
-
}
|
|
309
|
-
}, {
|
|
310
|
-
key: "orgInterpreterUsers",
|
|
311
|
-
get: function get() {
|
|
312
|
-
return _classPrivateFieldGet(_D, this);
|
|
313
|
-
},
|
|
314
|
-
set: function set(v) {
|
|
315
|
-
_classPrivateFieldSet(_D, this, v);
|
|
316
|
-
}
|
|
317
|
-
}, {
|
|
318
|
-
key: "interpreterUsersEditState",
|
|
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",
|
|
335
|
-
get: function get() {
|
|
336
|
-
return _classPrivateFieldGet(_G, this);
|
|
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);
|
|
364
|
-
}
|
|
365
|
-
}, {
|
|
366
|
-
key: "hasEnableInterpreterPermission",
|
|
367
|
-
get: function get() {
|
|
368
|
-
return this._securityStore.hasEnableInterpreterPermission();
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// 同声传译列表-表单校验是否通过
|
|
372
|
-
}, {
|
|
373
|
-
key: "interpreterUsersCheckPass",
|
|
374
|
-
get: function get() {
|
|
375
|
-
var remainingKeys = Object.keys(_type5.initInterpreterItemModel).filter(function (key) {
|
|
376
|
-
return key !== 'randomKey';
|
|
377
|
-
});
|
|
378
|
-
return this.localInterpreterUsers.every(function (obj) {
|
|
379
|
-
return remainingKeys.every(function (key) {
|
|
380
|
-
return obj[key] !== null && obj[key] !== undefined && obj[key] !== '';
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// 同声传译列表-翻译官是否全部离线
|
|
386
|
-
}, {
|
|
387
|
-
key: "interpreterUsersAllOffLine",
|
|
388
|
-
get: function get() {
|
|
389
|
-
var _this2 = this;
|
|
390
|
-
return this.localInterpreterUsers.every(function (ele) {
|
|
391
|
-
var _this2$initUsers$find;
|
|
392
|
-
return (_this2$initUsers$find = _this2.initUsers.find(function (item) {
|
|
393
|
-
return item.userId === ele.userId;
|
|
394
|
-
})) === null || _this2$initUsers$find === void 0 ? void 0 : _this2$initUsers$find.isOffLine;
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// 语言列表
|
|
399
|
-
}, {
|
|
400
|
-
key: "languageList",
|
|
401
|
-
get: function get() {
|
|
402
|
-
return this._interpreterControl.getInterpreterLanguageList();
|
|
403
|
-
}
|
|
404
|
-
}, {
|
|
405
|
-
key: "openInterpreterState",
|
|
406
|
-
value: function
|
|
407
|
-
// 开启同声传译
|
|
408
|
-
openInterpreterState() {
|
|
409
|
-
var interpreterUsers = this.localInterpreterUsers.map(function (ele) {
|
|
410
|
-
var randomKey = ele.randomKey,
|
|
411
|
-
res = (0, _objectWithoutProperties2["default"])(ele, _excluded);
|
|
412
|
-
return res;
|
|
413
|
-
});
|
|
414
|
-
this._interpreterControl.setInterpreterUsers(interpreterUsers);
|
|
415
|
-
this.closeInterpreterDialog();
|
|
416
|
-
}
|
|
417
|
-
}, {
|
|
418
|
-
key: "closeInterpreterState",
|
|
419
|
-
value: function
|
|
420
|
-
// 关闭同声传译
|
|
421
|
-
closeInterpreterState() {
|
|
422
|
-
this._interpreterControl.close();
|
|
423
|
-
this.closeInterpreterDialog();
|
|
424
|
-
}
|
|
425
|
-
}, {
|
|
426
|
-
key: "setInterpreterListEditState",
|
|
427
|
-
value: function
|
|
428
|
-
// 传译列表-设置编辑状态
|
|
429
|
-
setInterpreterListEditState() {
|
|
430
|
-
this.interpreterUsersEditState = !this.interpreterUsersEditState;
|
|
431
|
-
}
|
|
432
|
-
}, {
|
|
433
|
-
key: "addInterpreterUsers",
|
|
434
|
-
value: function
|
|
435
|
-
//传译列表-增加
|
|
436
|
-
addInterpreterUsers() {
|
|
437
|
-
this.localInterpreterUsers = [].concat((0, _toConsumableArray2["default"])(this.localInterpreterUsers), [(0, _utils.getInterpreterItem)()]);
|
|
438
|
-
}
|
|
439
|
-
}, {
|
|
440
|
-
key: "deleteInterpreterUsers",
|
|
441
|
-
value: function
|
|
442
|
-
//传译列表-删除
|
|
443
|
-
deleteInterpreterUsers(data) {
|
|
444
|
-
this.localInterpreterUsers = this.localInterpreterUsers.filter(function (ele) {
|
|
445
|
-
return ele.randomKey !== data.randomKey;
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
}, {
|
|
449
|
-
key: "updateInterpreterUsers",
|
|
450
|
-
value: function
|
|
451
|
-
//传译列表-更新
|
|
452
|
-
updateInterpreterUsers(data) {
|
|
453
|
-
var index = this.localInterpreterUsers.findIndex(function (ele) {
|
|
454
|
-
return ele.randomKey === data.randomKey;
|
|
455
|
-
});
|
|
456
|
-
var updateInterpreterListModel = (0, _toConsumableArray2["default"])(this.localInterpreterUsers);
|
|
457
|
-
if (index > -1) {
|
|
458
|
-
updateInterpreterListModel[index] = data;
|
|
459
|
-
} else {
|
|
460
|
-
updateInterpreterListModel.push(data);
|
|
461
|
-
}
|
|
462
|
-
this.localInterpreterUsers = updateInterpreterListModel;
|
|
463
|
-
}
|
|
464
|
-
}, {
|
|
465
|
-
key: "queryInterpreterUsers",
|
|
466
|
-
value: function
|
|
467
|
-
//传译列表-查询
|
|
468
|
-
queryInterpreterUsers() {
|
|
469
|
-
var _this$_interpreterCon;
|
|
470
|
-
var interpreterUsers = ((_this$_interpreterCon = this._interpreterControl.getInterpreterUserList()) === null || _this$_interpreterCon === void 0 ? void 0 : _this$_interpreterCon.map(function (ele) {
|
|
471
|
-
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
472
|
-
randomKey: (0, _uuid.v4)()
|
|
473
|
-
});
|
|
474
|
-
})) || [];
|
|
475
|
-
this.orgInterpreterUsers = interpreterUsers;
|
|
476
|
-
this.localInterpreterUsers = interpreterUsers.length > 0 ? interpreterUsers : [(0, _utils.getInterpreterItem)()];
|
|
477
|
-
}
|
|
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
|
-
}, {
|
|
1163
|
-
key: "getInterpreterState",
|
|
1164
|
-
value: function getInterpreterState() {
|
|
1165
|
-
return this._interpreterControl.getState().enable;
|
|
1166
|
-
}
|
|
1167
|
-
}, {
|
|
1168
|
-
key: "openInterpreterDialog",
|
|
1169
|
-
value: function
|
|
1170
|
-
// 开启弹窗
|
|
1171
|
-
openInterpreterDialog() {
|
|
1172
|
-
this.currentDialogId = this._uiEventStore.openDialog(_constant.DialogKey.INTERPRETER);
|
|
1173
|
-
}
|
|
1174
|
-
}, {
|
|
1175
|
-
key: "closeInterpreterDialog",
|
|
1176
|
-
value: function
|
|
1177
|
-
// 关闭弹窗
|
|
1178
|
-
closeInterpreterDialog() {
|
|
1179
|
-
if (this.currentDialogId) {
|
|
1180
|
-
this._uiEventStore.closeDialog(this.currentDialogId);
|
|
1181
|
-
this.currentDialogId = null;
|
|
1182
|
-
if (this.interpreterUsersEditState) {
|
|
1183
|
-
this.setInterpreterListEditState();
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
}, {
|
|
1188
|
-
key: "_getLocalUserByInterpreter",
|
|
1189
|
-
value: function
|
|
1190
|
-
// 获取本地用户关联的翻译官信息
|
|
1191
|
-
_getLocalUserByInterpreter() {
|
|
1192
|
-
var localUser = this._localUser; // 本地用户信息
|
|
1193
|
-
var interpreterUsers = this._interpreterControl.getInterpreterUserList(); //翻译官列表
|
|
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); // 触发翻译官-创建提醒
|
|
1274
|
-
}
|
|
1275
|
-
} else {
|
|
1276
|
-
this._updateUserProperties('');
|
|
1277
|
-
this._closeConfirmDialog();
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
// 同声传译-状态更新-Toast
|
|
1282
|
-
}, {
|
|
1283
|
-
key: "openUpdateInterpreterStateToast",
|
|
1284
|
-
value: function openUpdateInterpreterStateToast(roomId, state, operatorUser) {
|
|
1285
|
-
var _this8 = this;
|
|
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({
|
|
1314
|
-
type: 'info',
|
|
1315
|
-
message: operatorUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_interpretation_mainwindow_toast_label_update_language', {
|
|
1316
|
-
reason1: operatorUser.userName
|
|
1317
|
-
}) : (0, _i18n.transI18n)('fmt_interpretation_mobile_toast_controller_toast_label_update_interpreter_by_cocontroller', {
|
|
1318
|
-
reason1: operatorUser.userName
|
|
1319
|
-
})
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
// 翻译官加入房间-Toast
|
|
1323
|
-
}, {
|
|
1324
|
-
key: "interpreterUsersJoinToast",
|
|
1325
|
-
value: function interpreterUsersJoinToast() {
|
|
1326
|
-
var _this$_getLocalUserBy6 = this._getLocalUserByInterpreter(),
|
|
1327
|
-
interpreter = _this$_getLocalUserBy6.interpreter;
|
|
1328
|
-
if (this.interpreterState && interpreter) {
|
|
1329
|
-
var _this$_interpreterCon2;
|
|
1330
|
-
var language = (_this$_interpreterCon2 = this._interpreterControl.getInterpreterRoomList()) === null || _this$_interpreterCon2 === void 0 ? void 0 : _this$_interpreterCon2[1].language;
|
|
1331
|
-
this._uiEventStore.showToast({
|
|
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
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
// 翻译官-语言更新-Dialog
|
|
1341
|
-
}, {
|
|
1342
|
-
key: "_closeConfirmDialog",
|
|
1343
|
-
value: function _closeConfirmDialog() {
|
|
1344
|
-
var _this9 = this;
|
|
1345
|
-
this._confirmDialogs.forEach(function (dialogId) {
|
|
1346
|
-
dialogId && _this9._uiEventStore.closeConfirm(dialogId);
|
|
1347
|
-
_this9._confirmDialogs["delete"](dialogId);
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
// 翻译官-语言更新-Dialog
|
|
1352
|
-
}, {
|
|
1353
|
-
key: "openUpdateLanguageDialog",
|
|
1354
|
-
value: function openUpdateLanguageDialog(interpreter) {
|
|
1355
|
-
var _this10 = this;
|
|
1356
|
-
this._closeConfirmDialog();
|
|
1357
|
-
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
1358
|
-
title: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_attention'),
|
|
1359
|
-
content: (0, _dialogContent.DialogContent)({
|
|
1360
|
-
content: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_label_language_change_by_controller'),
|
|
1361
|
-
userInfo: interpreter
|
|
1362
|
-
}),
|
|
1363
|
-
alignCenter: true,
|
|
1364
|
-
onOk: function onOk() {
|
|
1365
|
-
_this10._uiEventStore.closeConfirm(dialogId);
|
|
1366
|
-
_this10._confirmDialogs["delete"](dialogId);
|
|
1367
|
-
},
|
|
1368
|
-
closable: false,
|
|
1369
|
-
showCancel: false,
|
|
1370
|
-
okText: (0, _i18n.transI18n)('fmt_interpretation_interpreter_popup_button_i_know'),
|
|
1371
|
-
width: 321,
|
|
1372
|
-
height: 234
|
|
1373
|
-
});
|
|
1374
|
-
this._confirmDialogs.add(dialogId);
|
|
1375
|
-
}
|
|
1376
|
-
|
|
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
|
-
// 历史参会者列表------------------------------------
|
|
1438
|
-
}, {
|
|
1439
|
-
key: "_getInitUsers",
|
|
1440
|
-
value: function _getInitUsers() {
|
|
1441
|
-
var mainRoomUsers = this._userControl.getUserList();
|
|
1442
|
-
this.initUsers = mainRoomUsers.filter(function (user) {
|
|
1443
|
-
return user.connectorType === _type2.AgoraRteRoomConnectorType.NONE;
|
|
1444
|
-
}).map(function (ele) {
|
|
1445
|
-
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
1446
|
-
isOffLine: false
|
|
1447
|
-
});
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
}, {
|
|
1451
|
-
key: "_updateUsers",
|
|
1452
|
-
value: function _updateUsers(_ref13, type) {
|
|
1453
|
-
var roomId = _ref13.roomId,
|
|
1454
|
-
events = _ref13.events;
|
|
1455
|
-
var initUsersCopy = (0, _toConsumableArray2["default"])(this.initUsers);
|
|
1456
|
-
events.forEach(function (joinedEvent) {
|
|
1457
|
-
var modifiedUser = joinedEvent.modifiedUser;
|
|
1458
|
-
var index = initUsersCopy.findIndex(function (item) {
|
|
1459
|
-
return item.userId === modifiedUser.userId;
|
|
1460
|
-
});
|
|
1461
|
-
if (index > -1) {
|
|
1462
|
-
if (initUsersCopy[index]) {
|
|
1463
|
-
if (type) {
|
|
1464
|
-
initUsersCopy[index] = _objectSpread(_objectSpread(_objectSpread({}, initUsersCopy[index]), modifiedUser), {}, {
|
|
1465
|
-
isOffLine: _type5.UpdateType.LEFT === type
|
|
1466
|
-
});
|
|
1467
|
-
} else {
|
|
1468
|
-
initUsersCopy[index] = _objectSpread(_objectSpread({}, initUsersCopy[index]), modifiedUser);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
} else if (modifiedUser.connectorType === _type2.AgoraRteRoomConnectorType.NONE) {
|
|
1472
|
-
initUsersCopy.push(_objectSpread(_objectSpread({}, modifiedUser), {}, {
|
|
1473
|
-
isOffLine: _type5.UpdateType.LEFT === type
|
|
1474
|
-
}));
|
|
1475
|
-
}
|
|
1476
|
-
});
|
|
1477
|
-
var collator = new Intl.Collator('zh');
|
|
1478
|
-
var sortedUsers = initUsersCopy.sort(function (preUser, nextUser) {
|
|
1479
|
-
if (preUser.userRole === nextUser.userRole) {
|
|
1480
|
-
return collator.compare(preUser.userName, nextUser.userName);
|
|
1481
|
-
} else {
|
|
1482
|
-
return preUser.userRole - nextUser.userRole;
|
|
1483
|
-
}
|
|
1484
|
-
});
|
|
1485
|
-
this.initUsers = sortedUsers;
|
|
1486
|
-
}
|
|
1487
|
-
}, {
|
|
1488
|
-
key: "_clearTimer",
|
|
1489
|
-
value: function _clearTimer() {
|
|
1490
|
-
if (this._indicateTimerId) {
|
|
1491
|
-
clearTimeout(this._indicateTimerId);
|
|
1492
|
-
this._indicateTimerId = null;
|
|
1493
|
-
}
|
|
1494
|
-
if (this._volumeTimerId) {
|
|
1495
|
-
clearInterval(this._volumeTimerId);
|
|
1496
|
-
this._volumeTimerId = null;
|
|
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();
|
|
1534
|
-
}
|
|
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
|
-
}
|
|
1552
|
-
}
|
|
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
|
-
}, {
|
|
1560
|
-
key: "_handleUiEvents",
|
|
1561
|
-
value: function _handleUiEvents(action, payload) {
|
|
1562
|
-
if (action === _constant.UIAction.TOGGLE_INTERPRETER_OUTPUT_LANGUE) {
|
|
1563
|
-
this.triggerOutputLanguage(payload);
|
|
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
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
}]);
|
|
1587
|
-
}(); // #endregion
|
|
1588
|
-
_InterpreterStore = InterpreterStore;
|
|
1589
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_InterpreterStore, [[_mobx.observable, 1, "_isSpeaking"], [_mobx.observable, 1, "_languageRoomLisByStatus"], [_mobx.observable, 1, "localInterpreterUsers"], [_mobx.observable, 1, "orgInterpreterUsers"], [_mobx.observable, 1, "interpreterUsersEditState"], [_mobx.observable, 1, "initUsers"], [_mobx.observable, 1, "interpreterState"], [_mobx.observable, 1, "currentDialogId"], [_mobx.observable, 1, "retryTaskTimeoutId"], [_mobx.observable, 1, "_language"], [_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"], [_setMainRoomStreamDecs, 18, "_setMainRoomStream"], [_setLanguageRoomJoinOrLeaveDecs, 18, "_setLanguageRoomJoinOrLeave"], [_updateInterpreterDecs, 18, "_updateInterpreter"], [_resetInterpreterDecs, 18, "_resetInterpreter"], [_setInputLanguageRoomDecs, 18, "_setInputLanguageRoom"], [_initLanguageRoomListByStatusDecs, 18, "_initLanguageRoomListByStatus"], [_updateLanguageRoomListByStatusDecs, 18, "_updateLanguageRoomListByStatus"], [_updateUserPropertiesDecs, 18, "_updateUserProperties"], [_updateStreamsDecs, 18, "_updateStreams"], [_triggerLanguageRoomStreamDecs, 18, "_triggerLanguageRoomStream"], [_handleOutputLanguageRoomDecs, 18, "handleOutputLanguageRoom"], [_triggerOutputLanguageDecs, 18, "triggerOutputLanguage"], [_joinInterpreterRoomDecs, 18, "joinInterpreterRoom"], [_leaveInterpreterRoomDecs, 18, "leaveInterpreterRoom"], [_bindLocalMicrophoneIdDecs, 18, "bindLocalMicrophoneId"], [_getInterpreterStateDecs, 18, "getInterpreterState"], [_openInterpreterDialogDecs, 18, "openInterpreterDialog"], [_closeInterpreterDialogDecs, 18, "closeInterpreterDialog"], [_getLocalUserByInterpreterDecs, 18, "_getLocalUserByInterpreter"], [_checkIsSelfOperationDecs, 18, "checkIsSelfOperation"], [_interpreterUsersUpdatedToastDecs, 18, "interpreterUsersUpdatedToast"], [_interpreterStateUpdatedToastDecs, 18, "interpreterStateUpdatedToast"], [_openUpdateInterpreterStateToastDecs, 18, "openUpdateInterpreterStateToast"], [_updateInterpreterUsersToastDecs, 18, "updateInterpreterUsersToast"], [_interpreterUsersJoinToastDecs, 18, "interpreterUsersJoinToast"], [_closeConfirmDialogDecs, 18, "_closeConfirmDialog"], [_openUpdateLanguageDialogDecs, 18, "openUpdateLanguageDialog"], [_openCreateInterpreterStatusToastDecs, 18, "openCreateInterpreterStatusToast"], [_openCancelInterpreterStatusToastDecs, 18, "openCancelInterpreterStatusToast"], [_getInitUsersDecs, 18, "_getInitUsers"], [_updateUsersDecs, 18, "_updateUsers"], [_clearTimerDecs, 18, "_clearTimer"], [_clearRetryTaskTimerDecs, 18, "_clearRetryTaskTimer"], [_restoreVolumeByMainRoomDecs, 18, "_restoreVolumeByMainRoom"], [_adjustMainRoomVolumeDecs, 18, "_adjustMainRoomVolume"], [_onStreamVolumeIndicationUpdatedDecs, 18, "_onStreamVolumeIndicationUpdated"]], []).e, 11);
|
|
1590
|
-
_init__isSpeaking = _applyDecs$e[0];
|
|
1591
|
-
_init__languageRoomLisByStatus = _applyDecs$e[1];
|
|
1592
|
-
_init_localInterpreterUsers = _applyDecs$e[2];
|
|
1593
|
-
_init_orgInterpreterUsers = _applyDecs$e[3];
|
|
1594
|
-
_init_interpreterUsersEditState = _applyDecs$e[4];
|
|
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];
|
|
1601
|
-
var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|