fcr-ui-scene 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base.d.ts +40 -5
- package/lib/base.js +237 -22
- package/lib/common/device-store.d.ts +14 -23
- package/lib/common/device-store.js +252 -361
- package/lib/common/device-stream-store.d.ts +14 -8
- package/lib/common/device-stream-store.js +116 -254
- package/lib/common/event-store.d.ts +10 -35
- package/lib/common/event-store.js +13 -64
- package/lib/common/security-store.d.ts +39 -47
- package/lib/common/security-store.js +379 -335
- package/lib/creator.d.ts +1 -1
- package/lib/creator.js +4 -9
- package/lib/electron/app.js +4 -2
- package/lib/electron/bootstrap-dev.js +0 -7
- package/lib/electron/bootstrap-sdk.js +10 -0
- package/lib/electron/injections.d.ts +2 -0
- package/lib/electron/injections.js +17 -2
- package/lib/electron/logger.d.ts +0 -4
- package/lib/electron/logger.js +2 -5
- package/lib/electron/main.js +1 -1
- package/lib/electron/plugins/devtool-shortcut.js +10 -1
- package/lib/electron/plugins/meeting-state.js +1 -1
- package/lib/electron/preload.js +3 -1
- package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +1 -44
- package/lib/fragments/control-bar/control-bar-store.js +80 -457
- package/lib/fragments/control-bar/device/index.js +3 -5
- package/lib/fragments/control-bar/index.css +10 -15
- package/lib/fragments/control-bar/index.js +0 -24
- package/lib/fragments/control-bar/more-actions/index.css +0 -53
- package/lib/fragments/control-bar/more-actions/index.js +38 -73
- package/lib/fragments/control-bar/security-content/index.css +0 -75
- package/lib/fragments/control-bar/security-content/index.js +19 -105
- package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
- package/lib/fragments/control-bar/view.js +8 -23
- package/lib/fragments/live-streaming/store.d.ts +1 -1
- package/lib/fragments/live-streaming/store.js +1 -1
- package/lib/fragments/live-streaming/view.js +2 -4
- package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
- package/lib/fragments/share-screen-selection/selection-store.js +1 -1
- package/lib/fragments/share-screen-selection/view.js +20 -20
- package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
- package/lib/fragments/toolbar/components/pen-picker.js +1 -1
- package/lib/fragments/toolbar/components/shape-picker.js +1 -1
- package/lib/fragments/toolbar/components/wrapper.js +1 -1
- package/lib/fragments/toolbar/hooks.js +1 -1
- package/lib/fragments/toolbar/store.d.ts +1 -1
- package/lib/global.css +5 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -4
- package/lib/login-confirm-dialog.d.ts +1 -0
- package/lib/login-confirm-dialog.js +7 -2
- package/lib/modules/Interpreter/action/delete-btn/index.d.ts +2 -2
- package/lib/modules/Interpreter/action/edit-btn/index.js +2 -2
- package/lib/modules/Interpreter/action/switch-btn/index.js +5 -5
- package/lib/modules/Interpreter/dialog-content/index.d.ts +2 -2
- package/lib/modules/Interpreter/dialog-content/index.js +4 -4
- package/lib/modules/Interpreter/index.d.ts +11 -4
- package/lib/modules/Interpreter/index.js +23 -8
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +14 -14
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +2 -2
- package/lib/modules/Interpreter/store.d.ts +23 -84
- package/lib/modules/Interpreter/store.js +204 -1216
- package/lib/modules/Interpreter/type.d.ts +12 -29
- package/lib/modules/Interpreter/type.js +2 -10
- package/lib/modules/Interpreter/utils.d.ts +1 -5
- package/lib/modules/Interpreter/utils.js +28 -86
- package/lib/modules/Interpreter/view.js +19 -3
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -4
- package/lib/modules/action-bar/action-bar-collapes-items.js +21 -38
- package/lib/modules/action-bar/chat/index.js +8 -8
- package/lib/modules/action-bar/components/apps/app-item/index.css +1 -2
- package/lib/modules/action-bar/components/apps/app-item/index.d.ts +1 -10
- package/lib/modules/action-bar/components/apps/appitems.d.ts +1 -3
- package/lib/modules/action-bar/components/apps/index.css +2 -2
- package/lib/modules/action-bar/components/apps/index.js +2 -3
- package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
- package/lib/modules/action-bar/components/collapse/index.js +222 -0
- package/lib/modules/action-bar/components/interpreter/index.d.ts +1 -5
- package/lib/modules/action-bar/components/item/index.d.ts +9 -0
- package/lib/modules/action-bar/components/item/index.js +164 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +1 -8
- package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
- package/lib/modules/action-bar/components/leave/index.js +9 -24
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +1 -16
- package/lib/modules/action-bar/components/more/index.js +13 -9
- package/lib/modules/action-bar/components/more/poppover-content.d.ts +1 -4
- package/lib/modules/action-bar/components/more/poppover-content.js +28 -5
- package/lib/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/components/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/components/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/components/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/components/participants/index.js +2 -2
- package/lib/modules/action-bar/components/placement/index.d.ts +4 -0
- package/lib/modules/action-bar/components/placement/index.js +18 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +1 -3
- package/lib/modules/action-bar/components/screen-share/submenu.js +25 -2
- package/lib/modules/action-bar/components/security/index.js +3 -1
- package/lib/modules/action-bar/components/smaller/index.d.ts +1 -0
- package/lib/modules/action-bar/components/smaller/index.js +52 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.js +215 -0
- package/lib/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.d.ts +2 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.js +230 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +37 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +70 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +209 -0
- package/lib/modules/action-bar/device/index.css +2 -7
- package/lib/modules/action-bar/device/index.js +24 -22
- package/lib/modules/action-bar/enums.d.ts +23 -0
- package/lib/modules/action-bar/enums.js +35 -0
- package/lib/modules/action-bar/index.d.ts +36 -6
- package/lib/modules/action-bar/index.dev.d.ts +0 -1
- package/lib/modules/action-bar/index.dev.js +94 -121
- package/lib/modules/action-bar/index.js +46 -18
- package/lib/modules/action-bar/leave/assign-host.d.ts +0 -3
- package/lib/modules/action-bar/leave/assign-host.js +4 -2
- package/lib/modules/action-bar/leave/index.css +0 -10
- package/lib/modules/action-bar/leave/index.js +34 -84
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +1 -13
- package/lib/modules/action-bar/leave/leave-meeting.js +19 -37
- package/lib/modules/action-bar/live-streaming/index.js +3 -3
- package/lib/modules/action-bar/more/index.js +6 -9
- package/lib/modules/action-bar/more/poppover-content.js +16 -37
- package/lib/modules/action-bar/participants/index.css +0 -12
- package/lib/modules/action-bar/participants/index.js +16 -23
- package/lib/modules/action-bar/record/index.js +4 -4
- package/lib/modules/action-bar/screen-share/index.js +5 -14
- package/lib/modules/action-bar/screen-share/submenu.js +26 -20
- package/lib/modules/action-bar/security/drop-menu.js +22 -137
- package/lib/modules/action-bar/security/index.js +6 -12
- package/lib/modules/action-bar/settings/index.js +4 -4
- package/lib/modules/action-bar/smaller.js +5 -5
- package/lib/modules/action-bar/store.d.ts +84 -98
- package/lib/modules/action-bar/store.js +567 -707
- package/lib/modules/action-bar/types.d.ts +94 -0
- package/lib/modules/action-bar/types.js +6 -0
- package/lib/modules/action-bar/view.d.ts +1 -2
- package/lib/modules/action-bar/view.js +11 -11
- package/lib/modules/audio-stream/index.d.ts +22 -10
- package/lib/modules/audio-stream/index.js +78 -82
- package/lib/modules/chat/chat-bar/index.css +0 -6
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +39 -51
- package/lib/modules/chat/chat-room-store.d.ts +135 -0
- package/lib/modules/chat/chat-room-store.js +954 -0
- package/lib/modules/chat/chat-select/index.css +7 -27
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +4 -18
- package/lib/modules/chat/chat.d.ts +2 -1
- package/lib/modules/chat/chat.js +128 -196
- package/lib/modules/chat/components/chat-action/index.d.ts +1 -0
- package/lib/modules/chat/components/chat-action/index.js +28 -0
- package/lib/modules/chat/components/chat-bar/index.css +85 -0
- package/lib/modules/chat/components/chat-bar/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-bar/index.js +145 -0
- package/lib/modules/chat/components/chat-select/index.css +185 -0
- package/lib/modules/chat/components/chat-select/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-select/index.js +237 -0
- package/lib/modules/chat/components/message-list/index.d.ts +4 -0
- package/lib/modules/chat/components/message-list/index.js +650 -0
- package/lib/modules/chat/index.d.ts +13 -5
- package/lib/modules/chat/index.dev.d.ts +0 -1
- package/lib/modules/chat/index.dev.js +71 -72
- package/lib/modules/chat/index.js +45 -22
- package/lib/modules/chat/message-list.js +51 -68
- package/lib/modules/chat/mock.d.ts +1 -1
- package/lib/modules/chat/store.d.ts +17 -162
- package/lib/modules/chat/store.js +95 -963
- package/lib/modules/chat/types.d.ts +70 -0
- package/lib/modules/chat/types.js +17 -0
- package/lib/modules/chat/view.d.ts +10 -0
- package/lib/modules/chat/view.js +372 -0
- package/lib/modules/components/device-control/components/audio-menu/index.js +2 -2
- package/lib/modules/components/device-control/components/microphone/index.js +7 -7
- package/lib/modules/components/device-control/store.d.ts +11 -12
- package/lib/modules/components/device-control/store.js +46 -49
- package/lib/modules/components/dialog-container/component/body.js +2 -1
- package/lib/modules/components/dialog-container/index.d.ts +2 -2
- package/lib/modules/components/leave-meeting/components/assign-host.d.ts +3 -0
- package/lib/modules/components/leave-meeting/components/assign-host.js +70 -0
- package/lib/modules/components/leave-meeting/components/index.css +125 -0
- package/lib/modules/components/leave-meeting/index.d.ts +4 -0
- package/lib/modules/components/leave-meeting/index.js +147 -0
- package/lib/modules/components/leave-meeting/store.d.ts +31 -0
- package/lib/modules/components/leave-meeting/store.js +292 -0
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +12 -6
- package/lib/modules/components/security-menu/index.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +34 -35
- package/lib/modules/components/tab-frame/index.d.ts +2 -2
- package/lib/modules/components/tab-frame/index.js +26 -5
- package/lib/modules/connection-gateway/components/computer/index.js +4 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +1 -1
- package/lib/modules/connection-gateway/components/phone/index.js +2 -2
- package/lib/modules/connection-gateway/components/tabs/index.js +1 -2
- package/lib/modules/connection-gateway/enums.d.ts +4 -0
- package/lib/modules/connection-gateway/enums.js +12 -0
- package/lib/modules/connection-gateway/index.d.ts +13 -4
- package/lib/modules/connection-gateway/index.js +25 -15
- package/lib/modules/connection-gateway/store.d.ts +22 -18
- package/lib/modules/connection-gateway/store.js +60 -36
- package/lib/modules/connection-gateway/types.d.ts +4 -0
- package/lib/modules/connection-gateway/types.js +6 -0
- package/lib/modules/connection-gateway/view.js +2 -2
- package/lib/modules/control-bar/components/meeting-details/index.js +30 -25
- package/lib/modules/control-bar/components/more-actions/index.css +18 -0
- package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -5
- package/lib/modules/control-bar/components/more-actions/index.js +58 -9
- package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -7
- package/lib/modules/control-bar/components/share-state-nav/index.js +2 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.d.ts +1 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.js +2 -2
- package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -10
- package/lib/modules/control-bar/components/transfer-position-icon/index.js +7 -12
- package/lib/modules/control-bar/enums.d.ts +21 -0
- package/lib/modules/control-bar/enums.js +31 -0
- package/lib/modules/control-bar/index.d.ts +30 -7
- package/lib/modules/control-bar/index.js +46 -27
- package/lib/modules/control-bar/store.d.ts +38 -26
- package/lib/modules/control-bar/store.js +172 -282
- package/lib/modules/control-bar/types.d.ts +20 -0
- package/lib/modules/control-bar/types.js +6 -0
- package/lib/modules/control-bar/view.js +68 -34
- package/lib/modules/device-pretest/index.js +4 -4
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib/modules/device-pretest/store.d.ts +8 -9
- package/lib/modules/device-pretest/store.js +52 -36
- package/lib/modules/dialog/components/Interpreter/electron.js +21 -15
- package/lib/modules/dialog/components/Interpreter/index.js +2 -2
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
- package/lib/modules/dialog/components/chat/electron.js +19 -10
- package/lib/modules/dialog/components/chat/index.js +2 -2
- package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +68 -38
- package/lib/modules/dialog/components/confirm/index.js +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.js +8 -10
- package/lib/modules/dialog/components/connection-gateway/index.css +2 -0
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -1
- package/lib/modules/dialog/components/connection-gateway/index.js +20 -7
- package/lib/modules/dialog/components/connection-gateway/tabs.d.ts +6 -0
- package/lib/modules/dialog/components/connection-gateway/tabs.js +44 -0
- package/lib/modules/dialog/components/control-bar/index.d.ts +5 -1
- package/lib/modules/dialog/components/control-bar/index.js +122 -9
- package/lib/modules/dialog/components/device-setting/electron.js +6 -2
- package/lib/modules/dialog/components/device-setting/index.js +2 -2
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/dialog/components/dialog-container/component/body.js +77 -0
- package/lib/modules/dialog/components/dialog-container/index.css +81 -0
- package/lib/modules/dialog/components/dialog-container/index.d.ts +16 -0
- package/lib/modules/dialog/components/dialog-container/index.js +112 -0
- package/lib/modules/dialog/components/invite/index.js +32 -7
- package/lib/modules/dialog/components/live-streaming/index.js +9 -5
- package/lib/modules/dialog/components/participant/electron.js +11 -5
- package/lib/modules/dialog/components/participant/index.js +4 -3
- package/lib/modules/dialog/components/share-screen-selection/index.js +9 -5
- package/lib/modules/dialog/components/system-preference/electron.js +1 -1
- package/lib/modules/dialog/components/toast/index.js +1 -1
- package/lib/modules/dialog/components/video-window/index.d.ts +2 -0
- package/lib/modules/dialog/components/video-window/index.js +148 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -2
- package/lib/modules/dialog/dialogs.d.ts +2 -5
- package/lib/modules/dialog/dialogs.js +2 -157
- package/lib/modules/dialog/hooks/useElectron.d.ts +3 -25
- package/lib/modules/dialog/hooks/useElectron.js +91 -35
- package/lib/modules/dialog/index.d.ts +30 -4
- package/lib/modules/dialog/index.js +62 -6
- package/lib/modules/dialog/store.d.ts +46 -12
- package/lib/modules/dialog/store.js +121 -65
- package/lib/modules/dialog/types/index.d.ts +14 -3
- package/lib/modules/event-confirm/index.css +1 -1
- package/lib/modules/event-confirm/index.d.ts +13 -6
- package/lib/modules/event-confirm/index.js +28 -11
- package/lib/modules/event-confirm/store.d.ts +9 -3
- package/lib/modules/event-confirm/store.js +16 -7
- package/lib/modules/event-confirm/view.js +5 -1
- package/lib/modules/event-toast/index.d.ts +7 -6
- package/lib/modules/event-toast/index.js +19 -8
- package/lib/modules/event-toast/store.d.ts +8 -3
- package/lib/modules/event-toast/store.js +15 -6
- package/lib/modules/invite/components/error-tips.d.ts +4 -0
- package/lib/modules/invite/components/error-tips.js +18 -0
- package/lib/modules/invite/components/pstn-invite.d.ts +2 -0
- package/lib/modules/invite/components/pstn-invite.js +297 -0
- package/lib/modules/invite/components/voip-invite.d.ts +1 -0
- package/lib/modules/invite/components/voip-invite.js +276 -0
- package/lib/modules/invite/enums.d.ts +22 -0
- package/lib/modules/invite/enums.js +33 -0
- package/lib/modules/invite/index.d.ts +7 -8
- package/lib/modules/invite/index.js +17 -15
- package/lib/modules/invite/pstn-invite.js +9 -7
- package/lib/modules/invite/store.d.ts +11 -26
- package/lib/modules/invite/store.js +55 -25
- package/lib/modules/invite/types.d.ts +14 -0
- package/lib/modules/invite/types.js +6 -0
- package/lib/modules/invite/view.d.ts +0 -4
- package/lib/modules/invite/view.js +7 -11
- package/lib/modules/invite/voip-invite.js +6 -5
- package/lib/modules/layout/components/Aside.js +34 -17
- package/lib/modules/layout/components/Carousel.js +1 -1
- package/lib/modules/layout/components/Gallery.js +1 -1
- package/lib/modules/layout/components/index.d.ts +1 -1
- package/lib/modules/layout/components/index.js +4 -4
- package/lib/modules/layout/components/who-is-speaking.d.ts +2 -0
- package/lib/modules/layout/components/who-is-speaking.js +60 -0
- package/lib/modules/layout/index.d.ts +26 -4
- package/lib/modules/layout/index.dev.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +312 -386
- package/lib/modules/layout/index.js +25 -10
- package/lib/modules/layout/member-window/index.css +18 -116
- package/lib/modules/layout/member-window/index.d.ts +3 -10
- package/lib/modules/layout/member-window/index.js +115 -227
- package/lib/modules/layout/store.d.ts +61 -71
- package/lib/modules/layout/store.js +311 -573
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +127 -2
- package/lib/modules/live-streaming/index.d.ts +15 -7
- package/lib/modules/live-streaming/index.dev.js +13 -13
- package/lib/modules/live-streaming/index.js +20 -15
- package/lib/modules/live-streaming/store.d.ts +21 -14
- package/lib/modules/live-streaming/store.js +84 -144
- package/lib/modules/live-streaming/view.js +2 -2
- package/lib/modules/notification/index.d.ts +9 -11
- package/lib/modules/notification/index.js +21 -14
- package/lib/modules/notification/interpreter-status/index.js +1 -2
- package/lib/modules/notification/store.d.ts +5 -11
- package/lib/modules/notification/store.js +12 -62
- package/lib/modules/notification/view.d.ts +5 -3
- package/lib/modules/notification/view.js +8 -5
- package/lib/modules/offscreen-pulling/index.js +1 -1
- package/lib/modules/participant/attendee/index.css +51 -0
- package/lib/modules/participant/attendee/index.d.ts +5 -8
- package/lib/modules/participant/attendee/index.js +15 -61
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/attendee/index.js +337 -0
- package/lib/modules/participant/components/can-moveable/index.d.ts +1 -0
- package/lib/modules/participant/components/can-moveable/index.js +68 -0
- package/lib/modules/participant/components/drop-menu/index.js +8 -8
- package/lib/modules/participant/components/footer/buttons.d.ts +2 -3
- package/lib/modules/participant/components/footer/buttons.js +2 -3
- package/lib/modules/participant/components/footer/index.js +2 -2
- package/lib/modules/participant/components/mute-all/index.d.ts +3 -4
- package/lib/modules/participant/components/mute-all/index.js +31 -44
- package/lib/modules/participant/components/operate-waitingroom-member/index.d.ts +2 -0
- package/lib/modules/participant/components/operate-waitingroom-member/index.js +48 -0
- package/lib/modules/participant/components/participants/index.js +27 -50
- package/lib/modules/participant/components/user-action/index.d.ts +17 -0
- package/lib/modules/participant/components/user-action/index.js +169 -0
- package/lib/modules/participant/index.d.ts +34 -7
- package/lib/modules/participant/index.dev.d.ts +0 -1
- package/lib/modules/participant/index.dev.js +87 -116
- package/lib/modules/participant/index.js +39 -13
- package/lib/modules/participant/member-list-data-source.d.ts +4 -1
- package/lib/modules/participant/member-list-data-source.js +58 -31
- package/lib/modules/participant/room-control-drop-menu/index.css +0 -37
- package/lib/modules/participant/store.d.ts +58 -25
- package/lib/modules/participant/store.js +321 -298
- package/lib/modules/participant/type.d.ts +45 -1
- package/lib/modules/participant/type.js +15 -1
- package/lib/modules/pc-audio-connect/index.css +12 -0
- package/lib/modules/pc-audio-connect/index.d.ts +22 -0
- package/lib/modules/pc-audio-connect/index.js +68 -0
- package/lib/modules/pc-audio-connect/store.d.ts +46 -0
- package/lib/modules/pc-audio-connect/store.js +301 -0
- package/lib/modules/pc-audio-connect/types.d.ts +0 -0
- package/lib/modules/pc-audio-connect/types.js +1 -0
- package/lib/modules/pc-audio-connect/view.d.ts +3 -0
- package/lib/modules/pc-audio-connect/view.js +66 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.d.ts +10 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +77 -0
- package/lib/modules/phone-audio-connect/components/calling/index.css +72 -0
- package/lib/modules/phone-audio-connect/components/calling/index.d.ts +7 -0
- package/lib/modules/phone-audio-connect/components/calling/index.js +58 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.d.ts +5 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.js +24 -0
- package/lib/modules/phone-audio-connect/components/useing/index.css +46 -0
- package/lib/modules/phone-audio-connect/components/useing/index.d.ts +3 -0
- package/lib/modules/phone-audio-connect/components/useing/index.js +36 -0
- package/lib/modules/phone-audio-connect/enums.d.ts +4 -0
- package/lib/modules/phone-audio-connect/enums.js +12 -0
- package/lib/modules/phone-audio-connect/index.css +56 -0
- package/lib/modules/phone-audio-connect/index.d.ts +16 -0
- package/lib/modules/phone-audio-connect/index.js +63 -0
- package/lib/modules/phone-audio-connect/store.d.ts +46 -0
- package/lib/modules/phone-audio-connect/store.js +320 -0
- package/lib/modules/phone-audio-connect/types.d.ts +4 -0
- package/lib/modules/phone-audio-connect/types.js +6 -0
- package/lib/modules/phone-audio-connect/view.d.ts +3 -0
- package/lib/modules/phone-audio-connect/view.js +184 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +5 -5
- package/lib/modules/setting/index.d.ts +25 -5
- package/lib/modules/setting/index.dev.d.ts +0 -1
- package/lib/modules/setting/index.dev.js +120 -81
- package/lib/modules/setting/index.js +35 -9
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
- package/lib/modules/setting/state/index.js +3 -3
- package/lib/modules/setting/store.d.ts +48 -14
- package/lib/modules/setting/store.js +105 -114
- package/lib/modules/setting/translate-settings/translate-settings.js +3 -3
- package/lib/modules/setting/video-settings/video-settings-basic.js +19 -22
- package/lib/modules/setting/view.js +6 -35
- package/lib/modules/share-screen/components/selection/index.css +70 -0
- package/lib/modules/share-screen/components/selection/index.d.ts +2 -0
- package/lib/modules/share-screen/components/selection/index.js +267 -0
- package/lib/modules/share-screen/components/share-state-bar/index.css +76 -0
- package/lib/modules/share-screen/components/share-state-bar/index.d.ts +4 -0
- package/lib/modules/share-screen/components/share-state-bar/index.js +98 -0
- package/lib/modules/share-screen/index.d.ts +15 -18
- package/lib/modules/share-screen/index.dev.d.ts +0 -1
- package/lib/modules/share-screen/index.dev.js +90 -91
- package/lib/modules/share-screen/index.js +22 -22
- package/lib/modules/share-screen/selection/index.css +0 -4
- package/lib/modules/share-screen/selection/index.js +129 -126
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/share-screen/store.d.ts +36 -32
- package/lib/modules/share-screen/store.js +250 -219
- package/lib/modules/share-screen/types.d.ts +27 -0
- package/lib/modules/share-screen/types.js +6 -0
- package/lib/modules/share-screen/view.js +1 -1
- package/lib/modules/sound-effect/index.d.ts +9 -4
- package/lib/modules/sound-effect/index.js +72 -40
- package/lib/modules/sound-effect/sound-effect-player.js +1 -1
- package/lib/modules/state-bar/index.d.ts +16 -13
- package/lib/modules/state-bar/index.dev.d.ts +0 -1
- package/lib/modules/state-bar/index.dev.js +78 -83
- package/lib/modules/state-bar/index.js +23 -7
- package/lib/modules/state-bar/meeting-details.js +24 -12
- package/lib/modules/state-bar/meeting-network-state.js +1 -1
- package/lib/modules/state-bar/store.d.ts +20 -10
- package/lib/modules/state-bar/store.js +84 -87
- package/lib/modules/state-bar/view.js +2 -2
- package/lib/modules/video-window/deviceState/index.d.ts +2 -2
- package/lib/modules/video-window/deviceState/index.js +4 -6
- package/lib/modules/video-window/index.css +1 -4
- package/lib/modules/video-window/index.d.ts +33 -6
- package/lib/modules/video-window/index.js +63 -15
- package/lib/modules/video-window/members/index.css +1 -0
- package/lib/modules/video-window/members/index.js +25 -11
- package/lib/modules/video-window/store.d.ts +58 -27
- package/lib/modules/video-window/store.js +166 -161
- package/lib/modules/waiting-room-layout/index.d.ts +11 -4
- package/lib/modules/waiting-room-layout/index.js +26 -13
- package/lib/modules/waiting-room-layout/store.d.ts +6 -3
- package/lib/modules/waiting-room-layout/store.js +17 -15
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -4
- package/lib/modules/whiteboard/components/control-bar/store.js +8 -8
- package/lib/modules/whiteboard/index.d.ts +20 -14
- package/lib/modules/whiteboard/index.js +250 -223
- package/lib/modules/whiteboard/view.d.ts +2 -0
- package/lib/modules/whiteboard/view.js +49 -0
- package/lib/plugins/browser-runtime-plugin.js +5 -1
- package/lib/providers/chat-provider.d.ts +71 -0
- package/lib/providers/chat-provider.js +91 -0
- package/lib/providers/device-privilege-provider.d.ts +52 -6
- package/lib/providers/device-privilege-provider.js +212 -183
- package/lib/providers/device-provider.d.ts +203 -45
- package/lib/providers/device-provider.js +486 -398
- package/lib/providers/device-stream-provider.d.ts +12 -13
- package/lib/providers/device-stream-provider.js +86 -193
- package/lib/providers/dialog-provider.d.ts +135 -0
- package/lib/providers/dialog-provider.js +204 -0
- package/lib/providers/event-provider.d.ts +1 -21
- package/lib/providers/event-provider.js +19 -57
- package/lib/providers/interpreter-provider.d.ts +218 -7
- package/lib/providers/interpreter-provider.js +1072 -80
- package/lib/providers/local-storage-provider.d.ts +9 -0
- package/lib/providers/message-provider.d.ts +69 -0
- package/lib/providers/message-provider.js +98 -0
- package/lib/providers/monitor-provider.d.ts +5 -0
- package/lib/providers/phone-audio-provider.d.ts +131 -0
- package/lib/providers/phone-audio-provider.js +515 -0
- package/lib/providers/privilege-provider.d.ts +325 -12
- package/lib/providers/privilege-provider.js +111 -295
- package/lib/providers/renderer-provider.d.ts +46 -4
- package/lib/providers/renderer-provider.js +57 -60
- package/lib/providers/room-provider.d.ts +113 -6
- package/lib/providers/room-provider.js +667 -87
- package/lib/providers/screen-share-provider.d.ts +65 -0
- package/lib/providers/screen-share-provider.js +238 -0
- package/lib/providers/session-provider.d.ts +30 -0
- package/lib/runtime.d.ts +2 -0
- package/lib/scenes/main-scene.d.ts +41 -3
- package/lib/scenes/main-scene.js +407 -246
- package/lib/scenes/waiting-scene.d.ts +34 -4
- package/lib/scenes/waiting-scene.js +163 -56
- package/lib/shared-data-source/chat-data.d.ts +14 -0
- package/lib/shared-data-source/chat-data.js +130 -0
- package/lib/shared-data-source/device-privilege-data.d.ts +8 -0
- package/lib/shared-data-source/device-privilege-data.js +25 -0
- package/lib/shared-data-source/interpreter.d.ts +63 -0
- package/lib/shared-data-source/interpreter.js +248 -0
- package/lib/shared-data-source/layout-data.d.ts +29 -0
- package/lib/shared-data-source/layout-data.js +181 -0
- package/lib/shared-data-source/pin-data.d.ts +9 -0
- package/lib/shared-data-source/pin-data.js +24 -0
- package/lib/shared-data-source/setting.d.ts +32 -0
- package/lib/shared-data-source/setting.js +153 -0
- package/lib/shared-data-source/speaker-spotlight.d.ts +5 -0
- package/lib/shared-data-source/speaker-spotlight.js +15 -0
- package/lib/shared-data-source/video-window.d.ts +161 -0
- package/lib/shared-data-source/video-window.js +1202 -0
- package/lib/shared-data-source/waiting-room.d.ts +19 -0
- package/lib/shared-data-source/waiting-room.js +158 -0
- package/lib/translations/enUS.d.ts +43 -17
- package/lib/translations/enUS.js +59 -33
- package/lib/translations/zhCN.d.ts +43 -17
- package/lib/translations/zhCN.js +57 -31
- package/lib/type.d.ts +270 -25
- package/lib/type.js +67 -2
- package/lib/ui-manager.d.ts +20 -16
- package/lib/ui-manager.js +59 -795
- package/lib/ui-scene.d.ts +6 -1
- package/lib/ui-scene.js +372 -42
- package/lib/utilities/constant.d.ts +63 -86
- package/lib/utilities/constant.js +151 -175
- package/lib/utilities/copyText.js +8 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/privilege.d.ts +4 -0
- package/lib/utilities/privilege.js +31 -0
- package/lib/utilities/setting-config-storage.d.ts +12 -0
- package/lib/utilities/setting-config-storage.js +102 -0
- package/lib/utilities/tools.d.ts +35 -3
- package/lib/utilities/tools.js +104 -2
- package/lib/utilities/video-track-render-context.d.ts +3 -4
- package/lib/utilities/video-track-render-context.js +1 -1
- package/package.json +5 -5
- package/public/assets/full-screen-error-boundary-img.png +0 -0
- package/public/assets/leave-meeting.png +0 -0
- package/public/index.html +24 -14
|
@@ -21,12 +21,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
});
|
|
22
22
|
exports.FcrUIDeviceProviderImpl = exports.DEFAULT_DEVICE_ID = void 0;
|
|
23
23
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
24
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
25
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
26
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
27
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
28
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
29
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
30
24
|
require("core-js/modules/es.array.concat.js");
|
|
31
25
|
require("core-js/modules/es.array.filter.js");
|
|
32
26
|
require("core-js/modules/es.array.find.js");
|
|
@@ -42,6 +36,8 @@ require("core-js/modules/es.map.js");
|
|
|
42
36
|
require("core-js/modules/es.object.assign.js");
|
|
43
37
|
require("core-js/modules/es.object.to-string.js");
|
|
44
38
|
require("core-js/modules/es.promise.js");
|
|
39
|
+
require("core-js/modules/es.promise.all-settled.js");
|
|
40
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
45
41
|
require("core-js/modules/es.set.js");
|
|
46
42
|
require("core-js/modules/es.string.iterator.js");
|
|
47
43
|
require("core-js/modules/es.weak-map.js");
|
|
@@ -98,6 +94,12 @@ require("core-js/modules/esnext.weak-map.emplace.js");
|
|
|
98
94
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
99
95
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
100
96
|
require("core-js/modules/web.timers.js");
|
|
97
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
98
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
99
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
100
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
101
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
102
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
101
103
|
var _imports = require("fcr-core/lib/imports");
|
|
102
104
|
var _base = require("../base");
|
|
103
105
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
@@ -108,10 +110,9 @@ var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
|
108
110
|
var _mobx = require("mobx");
|
|
109
111
|
var _virtualBackdoundResources = require("../modules/device-pretest/assets/virtual-backdound-resources");
|
|
110
112
|
var _type2 = require("../type");
|
|
111
|
-
var _constant = require("../utilities/constant");
|
|
112
113
|
var _tools = require("../utilities/tools");
|
|
113
114
|
var _FcrUIDeviceProviderImpl;
|
|
114
|
-
var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType,
|
|
115
|
+
var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _downloadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
|
|
115
116
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
116
117
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
117
118
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -124,14 +125,6 @@ function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.descr
|
|
|
124
125
|
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; }
|
|
125
126
|
// device id for default device (follow system)
|
|
126
127
|
var DEFAULT_DEVICE_ID = exports.DEFAULT_DEVICE_ID = 'default';
|
|
127
|
-
var mapDevice2Option = function mapDevice2Option(deviceList) {
|
|
128
|
-
return deviceList.map(function (item) {
|
|
129
|
-
return {
|
|
130
|
-
text: item.deviceName,
|
|
131
|
-
value: item.deviceId
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
128
|
var _A = /*#__PURE__*/new WeakMap();
|
|
136
129
|
var _B = /*#__PURE__*/new WeakMap();
|
|
137
130
|
var _C = /*#__PURE__*/new WeakMap();
|
|
@@ -161,8 +154,7 @@ var _Z = /*#__PURE__*/new WeakMap();
|
|
|
161
154
|
var _a = /*#__PURE__*/new WeakMap();
|
|
162
155
|
var _b = /*#__PURE__*/new WeakMap();
|
|
163
156
|
var _c = /*#__PURE__*/new WeakMap();
|
|
164
|
-
|
|
165
|
-
_ref = (_startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _startSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _stopSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _setCurrentIsMirrorDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorPreviewDecs = [_mobx.action, _mobx.action.bound], _setBeautyOptionsDecs = [_mobx.action, _mobx.action.bound], _handleCancelForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _handleForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraEnabledDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _startMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _stopMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _enableVirtualBackgroundDecs = [_mobx.action, _mobx.action.bound], _setEditBeautyKeyDecs = [_mobx.action, _mobx.action.bound], _enableBeautyEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerIdDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerVolumeDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneVolumeDecs = [_mobx.action, _mobx.action.bound], _actionsBeforeJoinDecs = [_mobx.action, _mobx.action.bound], _downloadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleCameraListUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneListUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setAudioConnectedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
157
|
+
_ref = (_startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _startSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _stopSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _setCurrentIsMirrorDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorPreviewDecs = [_mobx.action, _mobx.action.bound], _setBeautyOptionsDecs = [_mobx.action, _mobx.action.bound], _handleCancelForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _handleForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraEnabledDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _startMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _stopMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _enableVirtualBackgroundDecs = [_mobx.action, _mobx.action.bound], _setEditBeautyKeyDecs = [_mobx.action, _mobx.action.bound], _enableBeautyEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerIdDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerVolumeDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneVolumeDecs = [_mobx.action, _mobx.action.bound], _downloadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerAddedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerRemovedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
166
158
|
var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
|
|
167
159
|
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig) {
|
|
168
160
|
var _this = this;
|
|
@@ -187,8 +179,6 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
187
179
|
});
|
|
188
180
|
(0, _defineProperty2["default"])(this, "_defaultMirror", true);
|
|
189
181
|
(0, _defineProperty2["default"])(this, "_volumeIndicationInterval", 200);
|
|
190
|
-
(0, _defineProperty2["default"])(this, "_microponeInitCount", 0);
|
|
191
|
-
(0, _defineProperty2["default"])(this, "_speakerInitCount", 0);
|
|
192
182
|
// real microphone device id
|
|
193
183
|
_classPrivateFieldInitSpec(this, _A, _init__microphoneDeviceId(this, ''));
|
|
194
184
|
// real speaker device id
|
|
@@ -230,8 +220,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
230
220
|
_classPrivateFieldInitSpec(this, _Z, _init_microphoneDetecting(this, false));
|
|
231
221
|
_classPrivateFieldInitSpec(this, _a, _init_speakerDetecting(this, false));
|
|
232
222
|
_classPrivateFieldInitSpec(this, _b, _init_connectType(this, _type2.FcrUIConnectType.NONE));
|
|
233
|
-
_classPrivateFieldInitSpec(this, _c,
|
|
234
|
-
_classPrivateFieldInitSpec(this, _d, _init_isMainRoomAudioOff(this, false));
|
|
223
|
+
_classPrivateFieldInitSpec(this, _c, _init_isMainRoomAudioOff(this, false));
|
|
235
224
|
this._eventProvider = _eventProvider;
|
|
236
225
|
this._mediaControl = _mediaControl;
|
|
237
226
|
this._mediaConfig = _mediaConfig;
|
|
@@ -241,10 +230,10 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
241
230
|
_mediaControl.addObserver({
|
|
242
231
|
onCameraAdded: this._handleCameraListUpdated,
|
|
243
232
|
onCameraRemoved: this._handleCameraListUpdated,
|
|
244
|
-
onMicrophoneAdded: this.
|
|
245
|
-
onMicrophoneRemoved: this.
|
|
246
|
-
onSpeakerAdded: this.
|
|
247
|
-
onSpeakerRemoved: this.
|
|
233
|
+
onMicrophoneAdded: this._handleMicrophoneAdded,
|
|
234
|
+
onMicrophoneRemoved: this._handleMicrophoneRemoved,
|
|
235
|
+
onSpeakerAdded: this._handleSpeakerAdded,
|
|
236
|
+
onSpeakerRemoved: this._handleSpeakerRemoved,
|
|
248
237
|
onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
|
|
249
238
|
onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated
|
|
250
239
|
});
|
|
@@ -477,44 +466,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
477
466
|
_classPrivateFieldSet(_b, this, v);
|
|
478
467
|
}
|
|
479
468
|
}, {
|
|
480
|
-
key: "
|
|
469
|
+
key: "isMainRoomAudioOff",
|
|
481
470
|
get: function get() {
|
|
482
471
|
return _classPrivateFieldGet(_c, this);
|
|
483
472
|
},
|
|
484
473
|
set: function set(v) {
|
|
485
474
|
_classPrivateFieldSet(_c, this, v);
|
|
486
475
|
}
|
|
487
|
-
}, {
|
|
488
|
-
key: "isMainRoomAudioOff",
|
|
489
|
-
get: // openCamera(): void {
|
|
490
|
-
// throw new Error('Method not implemented.');
|
|
491
|
-
// }
|
|
492
|
-
// openMicrophone(): void {
|
|
493
|
-
// throw new Error('Method not implemented.');
|
|
494
|
-
// }
|
|
495
|
-
// closeCamera(): void {
|
|
496
|
-
// throw new Error('Method not implemented.');
|
|
497
|
-
// }
|
|
498
|
-
// closeMicrophone(): void {
|
|
499
|
-
// throw new Error('Method not implemented.');
|
|
500
|
-
// }
|
|
501
|
-
function get() {
|
|
502
|
-
return _classPrivateFieldGet(_d, this);
|
|
503
|
-
},
|
|
504
|
-
set: function set(v) {
|
|
505
|
-
_classPrivateFieldSet(_d, this, v);
|
|
506
|
-
}
|
|
507
|
-
}, {
|
|
508
|
-
key: "toggleCameraVideoOrientation",
|
|
509
|
-
value: function toggleCameraVideoOrientation() {
|
|
510
|
-
var _this$_cameraVideoTra;
|
|
511
|
-
if (this._videoRotation === _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_270) {
|
|
512
|
-
this._videoRotation = _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0;
|
|
513
|
-
} else {
|
|
514
|
-
this._videoRotation = this._videoRotation + 1;
|
|
515
|
-
}
|
|
516
|
-
(_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.setVideoOrientation(this._videoRotation);
|
|
517
|
-
}
|
|
518
476
|
}, {
|
|
519
477
|
key: "ifAccessMicrophone",
|
|
520
478
|
value: function () {
|
|
@@ -594,16 +552,27 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
594
552
|
key: "connectAudio",
|
|
595
553
|
value: function connectAudio(includeMicrophone) {
|
|
596
554
|
if (includeMicrophone) {
|
|
597
|
-
// 如果 hasExecutedConnectAudio == false 且 presetConfig.microphoneExpectedOff == true 时 (第一次加入房间且在房间外设置期望麦克风关闭),
|
|
598
555
|
var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._mediaConfig.microphoneExpectedOff;
|
|
599
556
|
if (!dontNeedOpenMicrophone) {
|
|
600
|
-
|
|
601
|
-
// this._mediaControl.getMicrophoneTrack('default').start();
|
|
557
|
+
this.setMicrophoneEnabled(true);
|
|
602
558
|
}
|
|
603
559
|
}
|
|
560
|
+
if (this.microphoneList.length > 0) {
|
|
561
|
+
this._eventProvider.showToast({
|
|
562
|
+
type: 'normal',
|
|
563
|
+
message: (0, _i18n.transI18n)('fmt_gateway_tips_nodata')
|
|
564
|
+
});
|
|
565
|
+
} else {
|
|
566
|
+
this._eventProvider.showToast({
|
|
567
|
+
type: 'normal',
|
|
568
|
+
message: (0, _i18n.transI18n)('fmt_toolbar_label_nodevice')
|
|
569
|
+
});
|
|
570
|
+
}
|
|
604
571
|
this._hasExecutedConnectAudio = true;
|
|
605
|
-
this._mediaControl.adjustOutputVolume(100);
|
|
572
|
+
// this._mediaControl.adjustOutputVolume(100);
|
|
573
|
+
|
|
606
574
|
this._isAudioConnected = true;
|
|
575
|
+
this.setConnectType(_type2.FcrUIConnectType.COMPUTER);
|
|
607
576
|
this._observable.notifyObservers('onAudioConnected');
|
|
608
577
|
}
|
|
609
578
|
}, {
|
|
@@ -611,9 +580,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
611
580
|
value: function disconnectAudio() {
|
|
612
581
|
this._hasExecutedConnectAudio = true;
|
|
613
582
|
this._isAudioConnected = false;
|
|
614
|
-
|
|
615
|
-
// this._mediaControl.
|
|
616
|
-
this.
|
|
583
|
+
this.setMicrophoneEnabled(false);
|
|
584
|
+
// this._mediaControl.adjustOutputVolume(0);
|
|
585
|
+
this.setConnectType(_type2.FcrUIConnectType.NONE);
|
|
617
586
|
this._observable.notifyObservers('onAudioDisconnected');
|
|
618
587
|
}
|
|
619
588
|
}, {
|
|
@@ -631,21 +600,6 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
631
600
|
get: function get() {
|
|
632
601
|
return this.speakerId === DEFAULT_DEVICE_ID;
|
|
633
602
|
}
|
|
634
|
-
}, {
|
|
635
|
-
key: "cameraDeviceList",
|
|
636
|
-
get: function get() {
|
|
637
|
-
return mapDevice2Option(this.cameraList);
|
|
638
|
-
}
|
|
639
|
-
}, {
|
|
640
|
-
key: "microphoneDeviceList",
|
|
641
|
-
get: function get() {
|
|
642
|
-
return mapDevice2Option(this.microphoneList);
|
|
643
|
-
}
|
|
644
|
-
}, {
|
|
645
|
-
key: "speakerDeviceList",
|
|
646
|
-
get: function get() {
|
|
647
|
-
return mapDevice2Option(this.speakerList);
|
|
648
|
-
}
|
|
649
603
|
}, {
|
|
650
604
|
key: "lastEnableVideoEffectType",
|
|
651
605
|
get: function get() {
|
|
@@ -664,14 +618,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
664
618
|
};
|
|
665
619
|
}
|
|
666
620
|
}, {
|
|
667
|
-
key: "
|
|
668
|
-
|
|
669
|
-
return this.
|
|
670
|
-
}
|
|
671
|
-
}, {
|
|
672
|
-
key: "getMicrophoneTrack",
|
|
673
|
-
value: function getMicrophoneTrack(deviceId) {
|
|
674
|
-
return this._mediaControl.getMicrophoneTrack(deviceId);
|
|
621
|
+
key: "isAudioConnected",
|
|
622
|
+
get: function get() {
|
|
623
|
+
return this._isAudioConnected;
|
|
675
624
|
}
|
|
676
625
|
}, {
|
|
677
626
|
key: "getScreenTrack",
|
|
@@ -703,11 +652,6 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
703
652
|
value: function getDisplayList() {
|
|
704
653
|
return this._mediaControl.getDisplayList();
|
|
705
654
|
}
|
|
706
|
-
}, {
|
|
707
|
-
key: "screenTrack",
|
|
708
|
-
get: function get() {
|
|
709
|
-
return null;
|
|
710
|
-
}
|
|
711
655
|
}, {
|
|
712
656
|
key: "cameraTrack",
|
|
713
657
|
get: function get() {
|
|
@@ -718,21 +662,15 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
718
662
|
get: function get() {
|
|
719
663
|
return this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
|
|
720
664
|
}
|
|
721
|
-
}, {
|
|
722
|
-
key: "setSelectedSpeakerVolume",
|
|
723
|
-
value: function setSelectedSpeakerVolume(volume) {
|
|
724
|
-
this._mediaControl.setSelectedSpeakerVolume(volume);
|
|
725
|
-
}
|
|
726
665
|
}, {
|
|
727
666
|
key: "init",
|
|
728
667
|
value: function () {
|
|
729
|
-
var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
668
|
+
var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
730
669
|
var _this2 = this;
|
|
731
|
-
return _regenerator["default"].wrap(function
|
|
732
|
-
while (1) switch (
|
|
670
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
671
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
733
672
|
case 0:
|
|
734
|
-
|
|
735
|
-
return this._mediaControl.getCameraList().then(function (list) {
|
|
673
|
+
return _context5.abrupt("return", Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
|
|
736
674
|
(0, _mobx.runInAction)(function () {
|
|
737
675
|
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
738
676
|
_this2.cameraList = list;
|
|
@@ -742,28 +680,50 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
742
680
|
_this2.setCameraId(_cameraId);
|
|
743
681
|
}
|
|
744
682
|
});
|
|
745
|
-
})
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
});
|
|
761
|
-
|
|
762
|
-
|
|
683
|
+
}), this._getMicrophoneList().then(/*#__PURE__*/function () {
|
|
684
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
|
|
685
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
686
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
687
|
+
case 0:
|
|
688
|
+
_this2.microphoneList = microphoneList;
|
|
689
|
+
_this2.logger.info('[FcrDeviceStore] init microphone list:', microphoneList);
|
|
690
|
+
// 默认跟随系统
|
|
691
|
+
_context3.next = 4;
|
|
692
|
+
return _this2.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
693
|
+
case 4:
|
|
694
|
+
case "end":
|
|
695
|
+
return _context3.stop();
|
|
696
|
+
}
|
|
697
|
+
}, _callee3);
|
|
698
|
+
}));
|
|
699
|
+
return function (_x) {
|
|
700
|
+
return _ref2.apply(this, arguments);
|
|
701
|
+
};
|
|
702
|
+
}()), this._getSpeakerList().then(/*#__PURE__*/function () {
|
|
703
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
|
|
704
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
705
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
706
|
+
case 0:
|
|
707
|
+
_this2.speakerList = speakerList;
|
|
708
|
+
_this2.logger.info('[FcrDeviceStore] init speaker list:', speakerList);
|
|
709
|
+
// 默认跟随系统
|
|
710
|
+
_context4.next = 4;
|
|
711
|
+
return _this2.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
712
|
+
case 4:
|
|
713
|
+
case "end":
|
|
714
|
+
return _context4.stop();
|
|
715
|
+
}
|
|
716
|
+
}, _callee4);
|
|
717
|
+
}));
|
|
718
|
+
return function (_x2) {
|
|
719
|
+
return _ref3.apply(this, arguments);
|
|
720
|
+
};
|
|
721
|
+
}())]));
|
|
722
|
+
case 1:
|
|
763
723
|
case "end":
|
|
764
|
-
return
|
|
724
|
+
return _context5.stop();
|
|
765
725
|
}
|
|
766
|
-
},
|
|
726
|
+
}, _callee5, this);
|
|
767
727
|
}));
|
|
768
728
|
function init() {
|
|
769
729
|
return _init.apply(this, arguments);
|
|
@@ -796,10 +756,10 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
796
756
|
}, {
|
|
797
757
|
key: "stopPlayLocalVideo",
|
|
798
758
|
value: function stopPlayLocalVideo(view) {
|
|
799
|
-
var _this$
|
|
759
|
+
var _this$_cameraVideoTra;
|
|
800
760
|
if (!view) return;
|
|
801
761
|
this._localVideoViewSet["delete"](view);
|
|
802
|
-
(_this$
|
|
762
|
+
(_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.stopPreview(view);
|
|
803
763
|
}
|
|
804
764
|
}, {
|
|
805
765
|
key: "startSpeakerTest",
|
|
@@ -890,23 +850,28 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
890
850
|
}, {
|
|
891
851
|
key: "setVideoOrientation",
|
|
892
852
|
value: function setVideoOrientation() {
|
|
893
|
-
var _this$
|
|
853
|
+
var _this$_cameraVideoTra2;
|
|
894
854
|
if (this._videoRotation === _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_270) {
|
|
895
855
|
this._videoRotation = _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0;
|
|
896
856
|
} else {
|
|
897
857
|
this._videoRotation = this._videoRotation + 1;
|
|
898
858
|
}
|
|
899
|
-
(_this$
|
|
859
|
+
(_this$_cameraVideoTra2 = this._cameraVideoTrack) === null || _this$_cameraVideoTra2 === void 0 || _this$_cameraVideoTra2.setVideoOrientation(this._videoRotation);
|
|
900
860
|
}
|
|
901
861
|
}, {
|
|
902
862
|
key: "setCameraEnabled",
|
|
903
863
|
value: function setCameraEnabled(enable) {
|
|
904
|
-
|
|
864
|
+
if (enable) {
|
|
865
|
+
this._hasExecutedOpenCamera = true;
|
|
866
|
+
}
|
|
867
|
+
this.startOrStopCamera(enable);
|
|
868
|
+
this.setShowCameraPreview(enable);
|
|
905
869
|
this.cameraEnabled = enable;
|
|
906
870
|
}
|
|
907
871
|
}, {
|
|
908
872
|
key: "setMicrophoneEnabled",
|
|
909
873
|
value: function setMicrophoneEnabled(enable) {
|
|
874
|
+
var _this5 = this;
|
|
910
875
|
var microphoneTrack = this._microphoneAudioTrack;
|
|
911
876
|
if (enable) {
|
|
912
877
|
microphoneTrack === null || microphoneTrack === void 0 || microphoneTrack.start();
|
|
@@ -915,6 +880,21 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
915
880
|
this.microphoneVolumeLevel = 0;
|
|
916
881
|
}
|
|
917
882
|
this.microphoneEnabled = enable;
|
|
883
|
+
|
|
884
|
+
// 如果当前是跟随系统,应该重新获取一次当前系统默认麦克风设备,因为系统默认设备变更没有事件,这里需要进行纠正,否则重新开启设备时,开启的设备就是错的
|
|
885
|
+
if (this.followSystemMicrophoneDevice) {
|
|
886
|
+
this._mediaControl.getSystemSelectedMicrophone().then(function (deviceInfo) {
|
|
887
|
+
var systemSelectedMicrophoneId = deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.deviceId;
|
|
888
|
+
if (systemSelectedMicrophoneId && systemSelectedMicrophoneId !== _this5._microphoneDeviceId) {
|
|
889
|
+
_this5.logger.info('[FcrDeviceStore] system selected microphone id changed, need update microphone track');
|
|
890
|
+
(0, _mobx.runInAction)(function () {
|
|
891
|
+
_this5._microphoneDeviceId = systemSelectedMicrophoneId;
|
|
892
|
+
});
|
|
893
|
+
_this5._refreshMicrophoneTrack();
|
|
894
|
+
_this5._observable.notifyObservers('onMicrophoneChanged', _this5._microphoneDeviceId);
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}
|
|
918
898
|
}
|
|
919
899
|
}, {
|
|
920
900
|
key: "toggleLocalMirror",
|
|
@@ -1071,54 +1051,55 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1071
1051
|
}, {
|
|
1072
1052
|
key: "setSpeakerId",
|
|
1073
1053
|
value: function () {
|
|
1074
|
-
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1075
|
-
var
|
|
1054
|
+
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(speakerId) {
|
|
1055
|
+
var _this6 = this;
|
|
1076
1056
|
var speakerDeviceId, defaultDevice;
|
|
1077
|
-
return _regenerator["default"].wrap(function
|
|
1078
|
-
while (1) switch (
|
|
1057
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
1058
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1079
1059
|
case 0:
|
|
1080
1060
|
if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
|
|
1081
|
-
|
|
1061
|
+
_context6.next = 2;
|
|
1082
1062
|
break;
|
|
1083
1063
|
}
|
|
1084
|
-
return
|
|
1064
|
+
return _context6.abrupt("return");
|
|
1085
1065
|
case 2:
|
|
1086
1066
|
if (!speakerId) {
|
|
1087
|
-
|
|
1067
|
+
_context6.next = 13;
|
|
1088
1068
|
break;
|
|
1089
1069
|
}
|
|
1090
1070
|
speakerDeviceId = speakerId;
|
|
1091
1071
|
if (!(speakerId === DEFAULT_DEVICE_ID)) {
|
|
1092
|
-
|
|
1072
|
+
_context6.next = 9;
|
|
1093
1073
|
break;
|
|
1094
1074
|
}
|
|
1095
|
-
|
|
1075
|
+
_context6.next = 7;
|
|
1096
1076
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1097
1077
|
case 7:
|
|
1098
|
-
defaultDevice =
|
|
1078
|
+
defaultDevice = _context6.sent;
|
|
1099
1079
|
speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1100
1080
|
case 9:
|
|
1101
1081
|
if (speakerDeviceId) {
|
|
1102
1082
|
this._mediaControl.setSelectedSpeaker(speakerDeviceId);
|
|
1103
1083
|
}
|
|
1104
1084
|
(0, _mobx.runInAction)(function () {
|
|
1105
|
-
|
|
1106
|
-
|
|
1085
|
+
_this6._speakerDeviceId = speakerDeviceId;
|
|
1086
|
+
_this6.speakerId = speakerId;
|
|
1107
1087
|
});
|
|
1108
|
-
|
|
1088
|
+
_context6.next = 15;
|
|
1109
1089
|
break;
|
|
1110
1090
|
case 13:
|
|
1111
1091
|
this._speakerDeviceId = speakerId;
|
|
1112
1092
|
this.speakerId = speakerId;
|
|
1113
1093
|
case 15:
|
|
1094
|
+
this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
|
|
1114
1095
|
this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
|
|
1115
|
-
case
|
|
1096
|
+
case 17:
|
|
1116
1097
|
case "end":
|
|
1117
|
-
return
|
|
1098
|
+
return _context6.stop();
|
|
1118
1099
|
}
|
|
1119
|
-
},
|
|
1100
|
+
}, _callee6, this);
|
|
1120
1101
|
}));
|
|
1121
|
-
function setSpeakerId(
|
|
1102
|
+
function setSpeakerId(_x3) {
|
|
1122
1103
|
return _setSpeakerId.apply(this, arguments);
|
|
1123
1104
|
}
|
|
1124
1105
|
return setSpeakerId;
|
|
@@ -1126,36 +1107,36 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1126
1107
|
}, {
|
|
1127
1108
|
key: "setMicrophoneId",
|
|
1128
1109
|
value: function () {
|
|
1129
|
-
var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1110
|
+
var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(microphoneId) {
|
|
1130
1111
|
var _this$_microphoneAudi5,
|
|
1131
1112
|
_this$_microphoneAudi6,
|
|
1132
|
-
|
|
1113
|
+
_this7 = this;
|
|
1133
1114
|
var microphoneDeviceId, defaultDevice, _microphoneTrack;
|
|
1134
|
-
return _regenerator["default"].wrap(function
|
|
1135
|
-
while (1) switch (
|
|
1115
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
1116
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1136
1117
|
case 0:
|
|
1137
1118
|
if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
|
|
1138
|
-
|
|
1119
|
+
_context7.next = 2;
|
|
1139
1120
|
break;
|
|
1140
1121
|
}
|
|
1141
|
-
return
|
|
1122
|
+
return _context7.abrupt("return");
|
|
1142
1123
|
case 2:
|
|
1143
1124
|
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
|
|
1144
1125
|
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
|
|
1145
1126
|
this.stopMicrophoneTest();
|
|
1146
1127
|
if (!microphoneId) {
|
|
1147
|
-
|
|
1128
|
+
_context7.next = 16;
|
|
1148
1129
|
break;
|
|
1149
1130
|
}
|
|
1150
1131
|
microphoneDeviceId = microphoneId;
|
|
1151
1132
|
if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
|
|
1152
|
-
|
|
1133
|
+
_context7.next = 12;
|
|
1153
1134
|
break;
|
|
1154
1135
|
}
|
|
1155
|
-
|
|
1136
|
+
_context7.next = 10;
|
|
1156
1137
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1157
1138
|
case 10:
|
|
1158
|
-
defaultDevice =
|
|
1139
|
+
defaultDevice = _context7.sent;
|
|
1159
1140
|
microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1160
1141
|
case 12:
|
|
1161
1142
|
if (microphoneDeviceId) {
|
|
@@ -1167,23 +1148,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1167
1148
|
this._microphoneAudioTrack = _microphoneTrack;
|
|
1168
1149
|
}
|
|
1169
1150
|
(0, _mobx.runInAction)(function () {
|
|
1170
|
-
|
|
1171
|
-
|
|
1151
|
+
_this7._microphoneDeviceId = microphoneDeviceId;
|
|
1152
|
+
_this7.microphoneId = microphoneId;
|
|
1172
1153
|
});
|
|
1173
|
-
|
|
1154
|
+
_context7.next = 18;
|
|
1174
1155
|
break;
|
|
1175
1156
|
case 16:
|
|
1176
1157
|
this._microphoneDeviceId = microphoneId;
|
|
1177
1158
|
this.microphoneId = microphoneId;
|
|
1178
1159
|
case 18:
|
|
1160
|
+
this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
|
|
1179
1161
|
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
|
|
1180
|
-
case
|
|
1162
|
+
case 20:
|
|
1181
1163
|
case "end":
|
|
1182
|
-
return
|
|
1164
|
+
return _context7.stop();
|
|
1183
1165
|
}
|
|
1184
|
-
},
|
|
1166
|
+
}, _callee7, this);
|
|
1185
1167
|
}));
|
|
1186
|
-
function setMicrophoneId(
|
|
1168
|
+
function setMicrophoneId(_x4) {
|
|
1187
1169
|
return _setMicrophoneId.apply(this, arguments);
|
|
1188
1170
|
}
|
|
1189
1171
|
return setMicrophoneId;
|
|
@@ -1192,6 +1174,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1192
1174
|
key: "setSpeakerVolume",
|
|
1193
1175
|
value: function setSpeakerVolume(value) {
|
|
1194
1176
|
this.speakerVolume = value;
|
|
1177
|
+
this._mediaControl.setSelectedSpeakerVolume(value);
|
|
1195
1178
|
}
|
|
1196
1179
|
}, {
|
|
1197
1180
|
key: "setMicrophoneVolume",
|
|
@@ -1200,14 +1183,6 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1200
1183
|
this.microphoneVolume = value;
|
|
1201
1184
|
(_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.adjustVolume(value);
|
|
1202
1185
|
}
|
|
1203
|
-
}, {
|
|
1204
|
-
key: "actionsBeforeJoin",
|
|
1205
|
-
value: function actionsBeforeJoin() {
|
|
1206
|
-
// 未开启摄像头, 需要关闭摄像头加入房间
|
|
1207
|
-
if (!this.cameraEnabled) {
|
|
1208
|
-
this.startOrStopCamera(false);
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
1186
|
}, {
|
|
1212
1187
|
key: "startOrStopCamera",
|
|
1213
1188
|
value: function startOrStopCamera(enable) {
|
|
@@ -1229,42 +1204,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1229
1204
|
value: function setShowCameraPreview(enable) {
|
|
1230
1205
|
this.showCameraPreview = enable;
|
|
1231
1206
|
}
|
|
1232
|
-
}, {
|
|
1233
|
-
key: "handleRealCameraEnabledChanged",
|
|
1234
|
-
value: function handleRealCameraEnabledChanged(realEnable) {
|
|
1235
|
-
this.startOrStopCamera(realEnable);
|
|
1236
|
-
this.setShowCameraPreview(realEnable);
|
|
1237
|
-
}
|
|
1238
|
-
}, {
|
|
1239
|
-
key: "handleCameraChanged",
|
|
1240
|
-
value: function handleCameraChanged(enabled) {
|
|
1241
|
-
var _this7 = this;
|
|
1242
|
-
var localVideoViewSet = this._localVideoViewSet;
|
|
1243
|
-
var cameraTrack = this._cameraVideoTrack;
|
|
1244
|
-
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
1245
|
-
localVideoViewSet.forEach(function (view) {
|
|
1246
|
-
cameraTrack.stopPreview(view);
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
if (enabled) {
|
|
1250
|
-
localVideoViewSet.forEach(function (view) {
|
|
1251
|
-
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1252
|
-
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1253
|
-
isMirror: _this7.currentIsMirror
|
|
1254
|
-
}, view);
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
1207
|
}, {
|
|
1259
1208
|
key: "downloadUiResources",
|
|
1260
1209
|
value: function () {
|
|
1261
|
-
var _downloadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1210
|
+
var _downloadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(uiResource) {
|
|
1262
1211
|
var _uiResource$virtualBa,
|
|
1263
1212
|
_this8 = this,
|
|
1264
1213
|
_uiResource$virtualBa2,
|
|
1265
1214
|
_uiResource$soundEffe;
|
|
1266
|
-
return _regenerator["default"].wrap(function
|
|
1267
|
-
while (1) switch (
|
|
1215
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
1216
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1268
1217
|
case 0:
|
|
1269
1218
|
Promise.all([// images
|
|
1270
1219
|
uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.map(function (url) {
|
|
@@ -1314,11 +1263,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1314
1263
|
})]);
|
|
1315
1264
|
case 1:
|
|
1316
1265
|
case "end":
|
|
1317
|
-
return
|
|
1266
|
+
return _context8.stop();
|
|
1318
1267
|
}
|
|
1319
|
-
},
|
|
1268
|
+
}, _callee8);
|
|
1320
1269
|
}));
|
|
1321
|
-
function downloadUiResources(
|
|
1270
|
+
function downloadUiResources(_x5) {
|
|
1322
1271
|
return _downloadUiResources.apply(this, arguments);
|
|
1323
1272
|
}
|
|
1324
1273
|
return downloadUiResources;
|
|
@@ -1327,7 +1276,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1327
1276
|
key: "release",
|
|
1328
1277
|
value: function release() {
|
|
1329
1278
|
var _this9 = this,
|
|
1330
|
-
_this$
|
|
1279
|
+
_this$_cameraVideoTra3,
|
|
1331
1280
|
_this$_microphoneAudi8;
|
|
1332
1281
|
if (this._localVideoViewSet.size > 0) {
|
|
1333
1282
|
this._localVideoViewSet.forEach(function (view) {
|
|
@@ -1336,74 +1285,23 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1336
1285
|
});
|
|
1337
1286
|
this._localVideoViewSet.clear();
|
|
1338
1287
|
}
|
|
1339
|
-
(_this$
|
|
1288
|
+
(_this$_cameraVideoTra3 = this._cameraVideoTrack) === null || _this$_cameraVideoTra3 === void 0 || _this$_cameraVideoTra3.stop();
|
|
1340
1289
|
this._cameraVideoTrack = undefined;
|
|
1341
1290
|
(_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
|
|
1342
1291
|
this._microphoneAudioTrack = undefined;
|
|
1343
1292
|
}
|
|
1344
|
-
}, {
|
|
1345
|
-
key: "joinAudioByComputer",
|
|
1346
|
-
value: function () {
|
|
1347
|
-
var _joinAudioByComputer = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
1348
|
-
var list;
|
|
1349
|
-
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
1350
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
1351
|
-
case 0:
|
|
1352
|
-
list = this.microphoneList;
|
|
1353
|
-
if (!(list.length > 0)) {
|
|
1354
|
-
_context7.next = 7;
|
|
1355
|
-
break;
|
|
1356
|
-
}
|
|
1357
|
-
_context7.next = 4;
|
|
1358
|
-
return this.setMicrophoneId('default');
|
|
1359
|
-
case 4:
|
|
1360
|
-
this._eventProvider.showToast({
|
|
1361
|
-
type: 'normal',
|
|
1362
|
-
message: (0, _i18n.transI18n)('fmt_gateway_tips_nodata')
|
|
1363
|
-
});
|
|
1364
|
-
_context7.next = 10;
|
|
1365
|
-
break;
|
|
1366
|
-
case 7:
|
|
1367
|
-
_context7.next = 9;
|
|
1368
|
-
return this.setMicrophoneId('NO_DEVICE');
|
|
1369
|
-
case 9:
|
|
1370
|
-
this._eventProvider.showToast({
|
|
1371
|
-
type: 'normal',
|
|
1372
|
-
message: (0, _i18n.transI18n)('fmt_toolbar_label_nodevice')
|
|
1373
|
-
});
|
|
1374
|
-
case 10:
|
|
1375
|
-
this.setConnectType(_type2.FcrUIConnectType.COMPUTER);
|
|
1376
|
-
this._eventProvider.sendEvent(_constant.FcrUIAction.CONNECT_AUDIO);
|
|
1377
|
-
case 12:
|
|
1378
|
-
case "end":
|
|
1379
|
-
return _context7.stop();
|
|
1380
|
-
}
|
|
1381
|
-
}, _callee7, this);
|
|
1382
|
-
}));
|
|
1383
|
-
function joinAudioByComputer() {
|
|
1384
|
-
return _joinAudioByComputer.apply(this, arguments);
|
|
1385
|
-
}
|
|
1386
|
-
return joinAudioByComputer;
|
|
1387
|
-
}()
|
|
1388
|
-
}, {
|
|
1389
|
-
key: "stopAudioByComputer",
|
|
1390
|
-
value: function stopAudioByComputer() {
|
|
1391
|
-
this.setMicrophoneId('');
|
|
1392
|
-
this.setConnectType(_type2.FcrUIConnectType.NONE);
|
|
1393
|
-
this._eventProvider.sendEvent(_constant.FcrUIAction.DISCONNECT_AUDIO);
|
|
1394
|
-
}
|
|
1395
1293
|
}, {
|
|
1396
1294
|
key: "_fileToUiData",
|
|
1397
1295
|
value: function () {
|
|
1398
|
-
var _fileToUiData2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1399
|
-
return _regenerator["default"].wrap(function
|
|
1400
|
-
while (1) switch (
|
|
1296
|
+
var _fileToUiData2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(resource, type) {
|
|
1297
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
1298
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1401
1299
|
case 0:
|
|
1402
1300
|
if (!(typeof resource !== 'string')) {
|
|
1403
|
-
|
|
1301
|
+
_context9.next = 2;
|
|
1404
1302
|
break;
|
|
1405
1303
|
}
|
|
1406
|
-
return
|
|
1304
|
+
return _context9.abrupt("return");
|
|
1407
1305
|
case 2:
|
|
1408
1306
|
if (type === 'image' && (0, _tools.isPngOrJpg)(resource) || type === 'video' && (0, _tools.isMp4)(resource)) {
|
|
1409
1307
|
this._updateVirtualBackgroundList([].concat((0, _toConsumableArray2["default"])(this.virtualBackgroundList), [{
|
|
@@ -1421,11 +1319,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1421
1319
|
}
|
|
1422
1320
|
case 4:
|
|
1423
1321
|
case "end":
|
|
1424
|
-
return
|
|
1322
|
+
return _context9.stop();
|
|
1425
1323
|
}
|
|
1426
|
-
},
|
|
1324
|
+
}, _callee9, this);
|
|
1427
1325
|
}));
|
|
1428
|
-
function _fileToUiData(
|
|
1326
|
+
function _fileToUiData(_x6, _x7) {
|
|
1429
1327
|
return _fileToUiData2.apply(this, arguments);
|
|
1430
1328
|
}
|
|
1431
1329
|
return _fileToUiData;
|
|
@@ -1438,34 +1336,34 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1438
1336
|
}, {
|
|
1439
1337
|
key: "_fetchZipAndUnzip",
|
|
1440
1338
|
value: function () {
|
|
1441
|
-
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1339
|
+
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(url, type) {
|
|
1442
1340
|
var _this10 = this;
|
|
1443
1341
|
var md5Url, resource;
|
|
1444
|
-
return _regenerator["default"].wrap(function
|
|
1445
|
-
while (1) switch (
|
|
1342
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1343
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1446
1344
|
case 0:
|
|
1447
1345
|
if ((0, _tools.isResourceZipUrl)(url)) {
|
|
1448
|
-
|
|
1346
|
+
_context10.next = 2;
|
|
1449
1347
|
break;
|
|
1450
1348
|
}
|
|
1451
|
-
return
|
|
1349
|
+
return _context10.abrupt("return", []);
|
|
1452
1350
|
case 2:
|
|
1453
1351
|
md5Url = (0, _imports.md5)(url);
|
|
1454
|
-
|
|
1352
|
+
_context10.next = 5;
|
|
1455
1353
|
return window.runtime.getResourceByFileType(url, md5Url, type);
|
|
1456
1354
|
case 5:
|
|
1457
|
-
resource =
|
|
1355
|
+
resource = _context10.sent;
|
|
1458
1356
|
resource.forEach(function (item) {
|
|
1459
1357
|
_this10._fileToUiData(item, type);
|
|
1460
1358
|
});
|
|
1461
|
-
return
|
|
1359
|
+
return _context10.abrupt("return", []);
|
|
1462
1360
|
case 8:
|
|
1463
1361
|
case "end":
|
|
1464
|
-
return
|
|
1362
|
+
return _context10.stop();
|
|
1465
1363
|
}
|
|
1466
|
-
},
|
|
1364
|
+
}, _callee10);
|
|
1467
1365
|
}));
|
|
1468
|
-
function _fetchZipAndUnzip(
|
|
1366
|
+
function _fetchZipAndUnzip(_x8, _x9) {
|
|
1469
1367
|
return _fetchZipAndUnzip2.apply(this, arguments);
|
|
1470
1368
|
}
|
|
1471
1369
|
return _fetchZipAndUnzip;
|
|
@@ -1503,26 +1401,49 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1503
1401
|
key: "_handleCameraChanged",
|
|
1504
1402
|
value: function _handleCameraChanged() {
|
|
1505
1403
|
var enabled = this.showCameraPreview;
|
|
1506
|
-
this.
|
|
1404
|
+
this.toggleLocalCameraPreview(enabled);
|
|
1405
|
+
}
|
|
1406
|
+
}, {
|
|
1407
|
+
key: "toggleLocalCameraPreview",
|
|
1408
|
+
value: function toggleLocalCameraPreview(enabled) {
|
|
1409
|
+
var _this11 = this;
|
|
1410
|
+
var localVideoViewSet = this._localVideoViewSet;
|
|
1411
|
+
var cameraTrack = this._cameraVideoTrack;
|
|
1412
|
+
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
1413
|
+
localVideoViewSet.forEach(function (view) {
|
|
1414
|
+
cameraTrack.stopPreview(view);
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
if (enabled) {
|
|
1418
|
+
localVideoViewSet.forEach(function (view) {
|
|
1419
|
+
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1420
|
+
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1421
|
+
isMirror: _this11.currentIsMirror
|
|
1422
|
+
}, view);
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1507
1425
|
}
|
|
1508
1426
|
}, {
|
|
1509
1427
|
key: "_handleCameraListUpdated",
|
|
1510
1428
|
value: function () {
|
|
1511
|
-
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1512
|
-
var
|
|
1513
|
-
var currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
|
|
1514
|
-
return _regenerator["default"].wrap(function
|
|
1515
|
-
while (1) switch (
|
|
1429
|
+
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
1430
|
+
var _this12 = this;
|
|
1431
|
+
var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
|
|
1432
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1433
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1516
1434
|
case 0:
|
|
1517
|
-
|
|
1435
|
+
_context11.next = 2;
|
|
1518
1436
|
return this._mediaControl.getCameraList();
|
|
1519
1437
|
case 2:
|
|
1520
|
-
|
|
1438
|
+
cameraList = _context11.sent;
|
|
1439
|
+
(0, _mobx.runInAction)(function () {
|
|
1440
|
+
_this12.cameraList = cameraList;
|
|
1441
|
+
});
|
|
1521
1442
|
currentDeviceExist = false;
|
|
1522
1443
|
if (this.cameraId) {
|
|
1523
|
-
currentDeviceExist = this.cameraList.some(function (
|
|
1524
|
-
var deviceId =
|
|
1525
|
-
return
|
|
1444
|
+
currentDeviceExist = this.cameraList.some(function (_ref4) {
|
|
1445
|
+
var deviceId = _ref4.deviceId;
|
|
1446
|
+
return _this12.cameraId === deviceId;
|
|
1526
1447
|
});
|
|
1527
1448
|
_cameraEnabled = this.cameraEnabled;
|
|
1528
1449
|
if (!currentDeviceExist) {
|
|
@@ -1547,11 +1468,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1547
1468
|
}
|
|
1548
1469
|
}
|
|
1549
1470
|
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1550
|
-
case
|
|
1471
|
+
case 8:
|
|
1551
1472
|
case "end":
|
|
1552
|
-
return
|
|
1473
|
+
return _context11.stop();
|
|
1553
1474
|
}
|
|
1554
|
-
},
|
|
1475
|
+
}, _callee11, this);
|
|
1555
1476
|
}));
|
|
1556
1477
|
function _handleCameraListUpdated() {
|
|
1557
1478
|
return _handleCameraListUpdated2.apply(this, arguments);
|
|
@@ -1559,145 +1480,313 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1559
1480
|
return _handleCameraListUpdated;
|
|
1560
1481
|
}()
|
|
1561
1482
|
}, {
|
|
1562
|
-
key: "
|
|
1483
|
+
key: "_handleMicrophoneAdded",
|
|
1563
1484
|
value: function () {
|
|
1564
|
-
var
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1568
|
-
while (1) switch (_context11.prev = _context11.next) {
|
|
1485
|
+
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
1486
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
1487
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1569
1488
|
case 0:
|
|
1570
|
-
|
|
1571
|
-
return this.
|
|
1489
|
+
_context12.next = 2;
|
|
1490
|
+
return this._handleMicrophoneListUpdated();
|
|
1572
1491
|
case 2:
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
});
|
|
1599
|
-
if (this.followSystemMicrophoneDevice) {
|
|
1600
|
-
if (defaultDevice && defaultDevice.deviceId !== this._microphoneDeviceId) {
|
|
1601
|
-
this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1492
|
+
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1493
|
+
case 3:
|
|
1494
|
+
case "end":
|
|
1495
|
+
return _context12.stop();
|
|
1496
|
+
}
|
|
1497
|
+
}, _callee12, this);
|
|
1498
|
+
}));
|
|
1499
|
+
function _handleMicrophoneAdded() {
|
|
1500
|
+
return _handleMicrophoneAdded2.apply(this, arguments);
|
|
1501
|
+
}
|
|
1502
|
+
return _handleMicrophoneAdded;
|
|
1503
|
+
}()
|
|
1504
|
+
}, {
|
|
1505
|
+
key: "_handleMicrophoneRemoved",
|
|
1506
|
+
value: function () {
|
|
1507
|
+
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
1508
|
+
var _this13 = this;
|
|
1509
|
+
var currentDeviceExist;
|
|
1510
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
1511
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1512
|
+
case 0:
|
|
1513
|
+
_context13.next = 2;
|
|
1514
|
+
return this._handleMicrophoneListUpdated();
|
|
1515
|
+
case 2:
|
|
1516
|
+
// 如何设备移除了,应该切到跟随系统
|
|
1604
1517
|
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1605
|
-
return item.deviceId ===
|
|
1518
|
+
return item.deviceId === _this13._microphoneDeviceId;
|
|
1606
1519
|
});
|
|
1607
|
-
if (
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
}
|
|
1611
|
-
if (defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceId) {
|
|
1612
|
-
hasNewDeviceJoin = this._microponeInitCount < microphoneList.length;
|
|
1613
|
-
_id = hasNewDeviceJoin ? defaultDevice.deviceId : DEFAULT_DEVICE_ID;
|
|
1614
|
-
this.setMicrophoneId(_id);
|
|
1520
|
+
if (currentDeviceExist) {
|
|
1521
|
+
_context13.next = 7;
|
|
1522
|
+
break;
|
|
1615
1523
|
}
|
|
1616
|
-
this.
|
|
1524
|
+
this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
|
|
1525
|
+
_context13.next = 7;
|
|
1526
|
+
return this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1527
|
+
case 7:
|
|
1617
1528
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1618
|
-
case
|
|
1529
|
+
case 8:
|
|
1619
1530
|
case "end":
|
|
1620
|
-
return
|
|
1531
|
+
return _context13.stop();
|
|
1621
1532
|
}
|
|
1622
|
-
},
|
|
1533
|
+
}, _callee13, this);
|
|
1534
|
+
}));
|
|
1535
|
+
function _handleMicrophoneRemoved() {
|
|
1536
|
+
return _handleMicrophoneRemoved2.apply(this, arguments);
|
|
1537
|
+
}
|
|
1538
|
+
return _handleMicrophoneRemoved;
|
|
1539
|
+
}()
|
|
1540
|
+
}, {
|
|
1541
|
+
key: "_handleMicrophoneListUpdated",
|
|
1542
|
+
value: function () {
|
|
1543
|
+
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
|
1544
|
+
var _this14 = this;
|
|
1545
|
+
var microphoneList;
|
|
1546
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
1547
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1548
|
+
case 0:
|
|
1549
|
+
_context14.next = 2;
|
|
1550
|
+
return this._getMicrophoneList();
|
|
1551
|
+
case 2:
|
|
1552
|
+
microphoneList = _context14.sent;
|
|
1553
|
+
// 如果选择了跟随系统,浏览器下设备变更时需要更新 track 以保证当前设备 track 正确
|
|
1554
|
+
if (this.followSystemMicrophoneDevice) {
|
|
1555
|
+
this._refreshMicrophoneTrack();
|
|
1556
|
+
}
|
|
1557
|
+
(0, _mobx.runInAction)(function () {
|
|
1558
|
+
_this14.microphoneList = microphoneList;
|
|
1559
|
+
});
|
|
1560
|
+
case 5:
|
|
1561
|
+
case "end":
|
|
1562
|
+
return _context14.stop();
|
|
1563
|
+
}
|
|
1564
|
+
}, _callee14, this);
|
|
1623
1565
|
}));
|
|
1624
1566
|
function _handleMicrophoneListUpdated() {
|
|
1625
1567
|
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
1626
1568
|
}
|
|
1627
1569
|
return _handleMicrophoneListUpdated;
|
|
1628
1570
|
}()
|
|
1571
|
+
/**
|
|
1572
|
+
* 某些情况下需要重新创建 Track,比如:
|
|
1573
|
+
* 1.浏览器中耳机插入,可能导致系统默认设备变更,此时应该重新创建 track
|
|
1574
|
+
* 2.客户端中,系统默认设备变更时,并不会有回调发生,但是需要在下次开启或关闭设备时纠正当前系统设备ID
|
|
1575
|
+
*/
|
|
1576
|
+
}, {
|
|
1577
|
+
key: "_refreshMicrophoneTrack",
|
|
1578
|
+
value: function _refreshMicrophoneTrack() {
|
|
1579
|
+
var _this$_microphoneAudi9, _this$_microphoneAudi10;
|
|
1580
|
+
(_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
|
|
1581
|
+
(_this$_microphoneAudi10 = this._microphoneAudioTrack) === null || _this$_microphoneAudi10 === void 0 || _this$_microphoneAudi10.stop();
|
|
1582
|
+
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
|
|
1583
|
+
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1584
|
+
if (this.microphoneEnabled) {
|
|
1585
|
+
this._microphoneAudioTrack.start();
|
|
1586
|
+
} else {
|
|
1587
|
+
this._microphoneAudioTrack.stop();
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}, {
|
|
1591
|
+
key: "_handleSpeakerAdded",
|
|
1592
|
+
value: function () {
|
|
1593
|
+
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1594
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
1595
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1596
|
+
case 0:
|
|
1597
|
+
_context15.next = 2;
|
|
1598
|
+
return this._handleSpeakerListUpdated();
|
|
1599
|
+
case 2:
|
|
1600
|
+
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1601
|
+
case 3:
|
|
1602
|
+
case "end":
|
|
1603
|
+
return _context15.stop();
|
|
1604
|
+
}
|
|
1605
|
+
}, _callee15, this);
|
|
1606
|
+
}));
|
|
1607
|
+
function _handleSpeakerAdded() {
|
|
1608
|
+
return _handleSpeakerAdded2.apply(this, arguments);
|
|
1609
|
+
}
|
|
1610
|
+
return _handleSpeakerAdded;
|
|
1611
|
+
}()
|
|
1612
|
+
}, {
|
|
1613
|
+
key: "_handleSpeakerRemoved",
|
|
1614
|
+
value: function () {
|
|
1615
|
+
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
|
1616
|
+
var _this15 = this;
|
|
1617
|
+
var currentDeviceExist;
|
|
1618
|
+
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
|
1619
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1620
|
+
case 0:
|
|
1621
|
+
_context16.next = 2;
|
|
1622
|
+
return this._handleSpeakerListUpdated();
|
|
1623
|
+
case 2:
|
|
1624
|
+
// 如何设备移除了,应该切到跟随系统
|
|
1625
|
+
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1626
|
+
return item.deviceId === _this15._speakerDeviceId;
|
|
1627
|
+
});
|
|
1628
|
+
if (currentDeviceExist) {
|
|
1629
|
+
_context16.next = 7;
|
|
1630
|
+
break;
|
|
1631
|
+
}
|
|
1632
|
+
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1633
|
+
_context16.next = 7;
|
|
1634
|
+
return this.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1635
|
+
case 7:
|
|
1636
|
+
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1637
|
+
case 8:
|
|
1638
|
+
case "end":
|
|
1639
|
+
return _context16.stop();
|
|
1640
|
+
}
|
|
1641
|
+
}, _callee16, this);
|
|
1642
|
+
}));
|
|
1643
|
+
function _handleSpeakerRemoved() {
|
|
1644
|
+
return _handleSpeakerRemoved2.apply(this, arguments);
|
|
1645
|
+
}
|
|
1646
|
+
return _handleSpeakerRemoved;
|
|
1647
|
+
}()
|
|
1629
1648
|
}, {
|
|
1630
1649
|
key: "_handleSpeakerListUpdated",
|
|
1631
1650
|
value: function () {
|
|
1632
|
-
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1633
|
-
var
|
|
1634
|
-
var speakerList
|
|
1635
|
-
return _regenerator["default"].wrap(function
|
|
1636
|
-
while (1) switch (
|
|
1651
|
+
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
|
1652
|
+
var _this16 = this;
|
|
1653
|
+
var speakerList;
|
|
1654
|
+
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
|
1655
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1637
1656
|
case 0:
|
|
1638
|
-
|
|
1639
|
-
return this.
|
|
1657
|
+
_context17.next = 2;
|
|
1658
|
+
return this._getSpeakerList();
|
|
1640
1659
|
case 2:
|
|
1641
|
-
speakerList =
|
|
1642
|
-
_context12.next = 5;
|
|
1643
|
-
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1644
|
-
case 5:
|
|
1645
|
-
defaultDevice = _context12.sent;
|
|
1660
|
+
speakerList = _context17.sent;
|
|
1646
1661
|
(0, _mobx.runInAction)(function () {
|
|
1647
|
-
|
|
1648
|
-
|
|
1662
|
+
_this16.speakerList = speakerList;
|
|
1663
|
+
});
|
|
1664
|
+
case 4:
|
|
1665
|
+
case "end":
|
|
1666
|
+
return _context17.stop();
|
|
1667
|
+
}
|
|
1668
|
+
}, _callee17, this);
|
|
1669
|
+
}));
|
|
1670
|
+
function _handleSpeakerListUpdated() {
|
|
1671
|
+
return _handleSpeakerListUpdated2.apply(this, arguments);
|
|
1672
|
+
}
|
|
1673
|
+
return _handleSpeakerListUpdated;
|
|
1674
|
+
}()
|
|
1675
|
+
}, {
|
|
1676
|
+
key: "_getMicrophoneList",
|
|
1677
|
+
value: function () {
|
|
1678
|
+
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
|
1679
|
+
var defaultDevice, list, defaultIdDevice;
|
|
1680
|
+
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
|
1681
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1682
|
+
case 0:
|
|
1683
|
+
_context18.next = 2;
|
|
1684
|
+
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1685
|
+
case 2:
|
|
1686
|
+
defaultDevice = _context18.sent;
|
|
1687
|
+
_context18.next = 5;
|
|
1688
|
+
return this._mediaControl.getMicrophoneList();
|
|
1689
|
+
case 5:
|
|
1690
|
+
list = _context18.sent;
|
|
1691
|
+
list.forEach(function (item) {
|
|
1692
|
+
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1693
|
+
if (results && results.length > 1) {
|
|
1694
|
+
item.deviceName = results[1];
|
|
1695
|
+
}
|
|
1696
|
+
});
|
|
1697
|
+
|
|
1698
|
+
// 过滤掉虚拟声卡
|
|
1699
|
+
list = list.filter(function (item) {
|
|
1700
|
+
return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
|
|
1701
|
+
});
|
|
1702
|
+
// 加入默认设备
|
|
1703
|
+
defaultIdDevice = list.find(function (item) {
|
|
1704
|
+
return item.deviceId === DEFAULT_DEVICE_ID;
|
|
1705
|
+
}); // 设备列表中没有默认设备,但是系统默认设备存在
|
|
1706
|
+
if (!defaultIdDevice && defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceName) {
|
|
1707
|
+
list.unshift({
|
|
1708
|
+
deviceId: DEFAULT_DEVICE_ID,
|
|
1709
|
+
deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1710
|
+
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1711
|
+
})
|
|
1649
1712
|
});
|
|
1650
|
-
|
|
1651
|
-
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
// 设备列表中有默认设备
|
|
1716
|
+
if (defaultIdDevice && defaultIdDevice.deviceName) {
|
|
1717
|
+
defaultIdDevice.deviceName = (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1718
|
+
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1652
1719
|
});
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1720
|
+
}
|
|
1721
|
+
return _context18.abrupt("return", list);
|
|
1722
|
+
case 12:
|
|
1723
|
+
case "end":
|
|
1724
|
+
return _context18.stop();
|
|
1725
|
+
}
|
|
1726
|
+
}, _callee18, this);
|
|
1727
|
+
}));
|
|
1728
|
+
function _getMicrophoneList() {
|
|
1729
|
+
return _getMicrophoneList2.apply(this, arguments);
|
|
1730
|
+
}
|
|
1731
|
+
return _getMicrophoneList;
|
|
1732
|
+
}()
|
|
1733
|
+
}, {
|
|
1734
|
+
key: "_getSpeakerList",
|
|
1735
|
+
value: function () {
|
|
1736
|
+
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
|
1737
|
+
var defaultDevice, list, defaultIdDevice;
|
|
1738
|
+
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
|
1739
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1740
|
+
case 0:
|
|
1741
|
+
_context19.next = 2;
|
|
1742
|
+
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1743
|
+
case 2:
|
|
1744
|
+
defaultDevice = _context19.sent;
|
|
1745
|
+
_context19.next = 5;
|
|
1746
|
+
return this._mediaControl.getSpeakerList();
|
|
1747
|
+
case 5:
|
|
1748
|
+
list = _context19.sent;
|
|
1749
|
+
list.forEach(function (item) {
|
|
1750
|
+
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1751
|
+
if (results && results.length > 1) {
|
|
1752
|
+
item.deviceName = results[1];
|
|
1664
1753
|
}
|
|
1665
1754
|
});
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
}
|
|
1671
|
-
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1672
|
-
return item.deviceId === _this13._speakerDeviceId;
|
|
1755
|
+
|
|
1756
|
+
// 过滤掉虚拟声卡
|
|
1757
|
+
list = list.filter(function (item) {
|
|
1758
|
+
return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
|
|
1673
1759
|
});
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1760
|
+
defaultIdDevice = list.find(function (item) {
|
|
1761
|
+
return item.deviceId === DEFAULT_DEVICE_ID;
|
|
1762
|
+
}); // 设备列表中没有默认设备,但是系统默认设备存在
|
|
1763
|
+
if (!defaultIdDevice && defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceName) {
|
|
1764
|
+
list.unshift({
|
|
1765
|
+
deviceId: DEFAULT_DEVICE_ID,
|
|
1766
|
+
deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1767
|
+
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1768
|
+
})
|
|
1769
|
+
});
|
|
1677
1770
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1771
|
+
|
|
1772
|
+
// 设备列表中有默认设备
|
|
1773
|
+
if (defaultIdDevice && defaultIdDevice.deviceName) {
|
|
1774
|
+
defaultIdDevice.deviceName = (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1775
|
+
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1776
|
+
});
|
|
1682
1777
|
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
case 13:
|
|
1778
|
+
return _context19.abrupt("return", list);
|
|
1779
|
+
case 12:
|
|
1686
1780
|
case "end":
|
|
1687
|
-
return
|
|
1781
|
+
return _context19.stop();
|
|
1688
1782
|
}
|
|
1689
|
-
},
|
|
1783
|
+
}, _callee19, this);
|
|
1690
1784
|
}));
|
|
1691
|
-
function
|
|
1692
|
-
return
|
|
1785
|
+
function _getSpeakerList() {
|
|
1786
|
+
return _getSpeakerList2.apply(this, arguments);
|
|
1693
1787
|
}
|
|
1694
|
-
return
|
|
1788
|
+
return _getSpeakerList;
|
|
1695
1789
|
}()
|
|
1696
|
-
}, {
|
|
1697
|
-
key: "setAudioConnected",
|
|
1698
|
-
value: function setAudioConnected(enable) {
|
|
1699
|
-
this.isAudioConnected = enable;
|
|
1700
|
-
}
|
|
1701
1790
|
}, {
|
|
1702
1791
|
key: "setMainRoomAudioOff",
|
|
1703
1792
|
value: function setMainRoomAudioOff(enable) {
|
|
@@ -1706,7 +1795,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1706
1795
|
}]);
|
|
1707
1796
|
}();
|
|
1708
1797
|
_FcrUIDeviceProviderImpl = FcrUIDeviceProviderImpl;
|
|
1709
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDeviceId"], [_mobx.observable, 1, "_speakerDeviceId"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "microphoneId"], [_mobx.observable, 1, "speakerId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "virtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "beautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "virtualBackgroundList"], [_mobx.observable, 1, "soundEffectList"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "connectType"], [_mobx.observable, 1, "
|
|
1798
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDeviceId"], [_mobx.observable, 1, "_speakerDeviceId"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "microphoneId"], [_mobx.observable, 1, "speakerId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "virtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "beautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "virtualBackgroundList"], [_mobx.observable, 1, "soundEffectList"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "connectType"], [_mobx.observable, 1, "isMainRoomAudioOff"], [_imports.bound, 2, "connectAudio"], [_imports.bound, 2, "disconnectAudio"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_startSpeakerTestDecs, 18, "startSpeakerTest"], [_stopSpeakerTestDecs, 18, "stopSpeakerTest"], [_setCurrentIsMirrorDecs, 18, "setCurrentIsMirror"], [_toggleLocalMirrorPreviewDecs, 18, "toggleLocalMirrorPreview"], [_setBeautyOptionsDecs, 18, "setBeautyOptions"], [_handleCancelForceOpenVideoEffectDecs, 18, "handleCancelForceOpenVideoEffect"], [_handleForceOpenVideoEffectDecs, 18, "handleForceOpenVideoEffect"], [_imports.bound, 2, "setVideoOrientation"], [_setCameraEnabledDecs, 18, "setCameraEnabled"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_downloadUiResourcesDecs, 18, "downloadUiResources"], [_setConnectTypeDecs, 18, "setConnectType"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSpeakerTestVolumeIndicationUpdatedDecs, 18, "_handleSpeakerTestVolumeIndicationUpdated"], [_handleSpeakerVolumeUpdatedDecs, 18, "_handleSpeakerVolumeUpdated"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [_imports.bound, 2, "_handleCameraChanged"], [_imports.bound, 2, "toggleLocalCameraPreview"], [_imports.bound, 2, "_handleCameraListUpdated"], [_imports.bound, 2, "_handleMicrophoneAdded"], [_imports.bound, 2, "_handleMicrophoneRemoved"], [_imports.bound, 2, "_handleMicrophoneListUpdated"], [_handleSpeakerAddedDecs, 18, "_handleSpeakerAdded"], [_handleSpeakerRemovedDecs, 18, "_handleSpeakerRemoved"], [_handleSpeakerListUpdatedDecs, 18, "_handleSpeakerListUpdated"], [_setMainRoomAudioOffDecs, 18, "setMainRoomAudioOff"]], []).e, 30);
|
|
1710
1799
|
_init__microphoneDeviceId = _applyDecs$e[0];
|
|
1711
1800
|
_init__speakerDeviceId = _applyDecs$e[1];
|
|
1712
1801
|
_init_currentIsMirror = _applyDecs$e[2];
|
|
@@ -1735,7 +1824,6 @@ _init_soundEffectList = _applyDecs$e[24];
|
|
|
1735
1824
|
_init_microphoneDetecting = _applyDecs$e[25];
|
|
1736
1825
|
_init_speakerDetecting = _applyDecs$e[26];
|
|
1737
1826
|
_init_connectType = _applyDecs$e[27];
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
_initProto = _applyDecs$e[30];
|
|
1827
|
+
_init_isMainRoomAudioOff = _applyDecs$e[28];
|
|
1828
|
+
_initProto = _applyDecs$e[29];
|
|
1741
1829
|
(0, _base.registerDependency)('deviceProvider');
|