fcr-ui-scene 3.6.2 → 3.6.4
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.js +0 -3
- package/lib/creator.d.ts +1 -0
- package/lib/creator.js +64 -50
- package/lib/electron/app.js +33 -14
- package/lib/electron/bootstrap-dev.js +5 -3
- package/lib/electron/bootstrap-sdk.js +4 -10
- package/lib/electron/exit-codes.d.ts +14 -0
- package/lib/electron/exit-codes.js +22 -0
- package/lib/electron/injections.d.ts +3 -2
- package/lib/electron/injections.js +122 -124
- package/lib/electron/ipc/ipc.js +0 -1
- package/lib/electron/main.js +57 -12
- package/lib/electron/tools.js +0 -4
- package/lib/electron/window.js +1 -7
- package/lib/fragments/annotation/index.d.ts +1 -0
- package/lib/fragments/annotation/index.js +54 -40
- package/lib/fragments/annotation/store.d.ts +7 -2
- package/lib/fragments/annotation/store.js +181 -102
- package/lib/fragments/annotation/view.d.ts +1 -0
- package/lib/fragments/annotation/view.js +10 -2
- package/lib/modules/action-bar/components/apps/app-item/index.js +0 -2
- package/lib/modules/action-bar/components/apps/app-list.js +2 -5
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -3
- package/lib/modules/action-bar/components/apps/useWidgetList.js +2 -1
- package/lib/modules/action-bar/components/collapse/index.js +0 -4
- package/lib/modules/action-bar/components/item/index.js +0 -2
- package/lib/modules/action-bar/components/leave/index.js +0 -2
- package/lib/modules/action-bar/components/more/poppover-content.js +0 -4
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +2 -1
- package/lib/modules/action-bar/components/notification-bar/index.js +0 -2
- package/lib/modules/action-bar/components/screen-share/index.js +0 -1
- package/lib/modules/action-bar/components/screen-share/submenu.js +0 -3
- package/lib/modules/action-bar/components/trigger-output-language/index.js +11 -14
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +8 -11
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.js +1 -2
- package/lib/modules/action-bar/store.d.ts +1 -7
- package/lib/modules/action-bar/store.js +67 -118
- package/lib/modules/annotation/board-cursor.css +76 -0
- package/lib/modules/annotation/components/control-bar/index.js +43 -2
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +2 -1
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +5 -2
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +11 -5
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +0 -2
- package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.js +3 -2
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +1 -0
- package/lib/modules/annotation/components/toolbar/store.js +0 -1
- package/lib/modules/annotation/index.d.ts +4 -0
- package/lib/modules/annotation/index.js +3 -1
- package/lib/modules/annotation/store.d.ts +15 -5
- package/lib/modules/annotation/store.js +222 -205
- package/lib/modules/annotation/style.css +3 -3
- package/lib/modules/annotation/view.d.ts +1 -0
- package/lib/modules/annotation/view.js +26 -9
- package/lib/modules/audio-stream/index.js +0 -4
- package/lib/modules/chat/chat-room-store.js +6 -10
- package/lib/modules/chat/components/chat-bar/index.js +0 -2
- package/lib/modules/chat/components/chat-select/index.js +0 -1
- package/lib/modules/chat/components/chat-select/select-item/index.js +2 -5
- package/lib/modules/chat/components/message-list/index.js +1 -3
- package/lib/modules/chat/components/message-list/message-item/index.js +11 -13
- package/lib/modules/chat/index.js +13 -14
- package/lib/modules/chat/store.js +0 -1
- package/lib/modules/chat/view.js +11 -15
- package/lib/modules/components/annotation-menu/index.js +0 -3
- package/lib/modules/components/device-control/components/audio-menu/index.js +2 -1
- package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
- package/lib/modules/components/device-control/store.js +0 -1
- package/lib/modules/components/leave-meeting/components/assign-host.js +4 -5
- package/lib/modules/components/leave-meeting/store.js +11 -12
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +10 -4
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -4
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +3 -4
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +0 -3
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +7 -34
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +11 -3
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +8 -13
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +0 -2
- package/lib/modules/components/member-window/components/member-actions/index.js +1 -33
- package/lib/modules/components/member-window/components/member-actions/provider.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +38 -1
- package/lib/modules/components/member-window/components/member-actions/store.js +120 -13
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +3 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +16 -3
- package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/video-player/index.js +3 -3
- package/lib/modules/components/member-window/index.css +37 -0
- package/lib/modules/components/member-window/index.js +1 -0
- package/lib/modules/components/security-menu/index.js +1 -4
- package/lib/modules/components/tab-frame/index.js +0 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -1
- package/lib/modules/connection-gateway/components/phone/index.js +5 -4
- package/lib/modules/connection-gateway/index.js +1 -2
- package/lib/modules/connection-gateway/store.js +23 -26
- package/lib/modules/control-bar/components/more-actions/index.js +0 -3
- package/lib/modules/control-bar/index.d.ts +0 -4
- package/lib/modules/control-bar/index.js +1 -34
- package/lib/modules/control-bar/store.d.ts +5 -6
- package/lib/modules/control-bar/store.js +70 -104
- package/lib/modules/control-bar/view.js +53 -13
- package/lib/modules/device-pretest/settings/beauty.js +1 -2
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
- package/lib/modules/device-pretest/store.js +2 -4
- package/lib/modules/dialog/components/control-bar/index.d.ts +0 -2
- package/lib/modules/dialog/components/control-bar/index.js +4 -6
- package/lib/modules/dialog/components/dialog-container/component/body.js +0 -2
- package/lib/modules/dialog/components/dialog-container/index.js +1 -2
- package/lib/modules/dialog/components/host-area-container/index.js +0 -3
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -2
- package/lib/modules/dialog/components/pre-setting-container/index.js +1 -2
- package/lib/modules/dialog/components/system-preference/index.js +2 -5
- package/lib/modules/dialog/components/video-window/index.js +0 -2
- package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -1
- package/lib/modules/dialog/hooks/useElectron.js +3 -4
- package/lib/modules/dialog/index.d.ts +0 -3
- package/lib/modules/dialog/index.js +2 -28
- package/lib/modules/dialog/store.d.ts +6 -8
- package/lib/modules/dialog/store.js +22 -60
- package/lib/modules/dialog/view.js +2 -1
- package/lib/modules/event-confirm/components/window/index.js +0 -2
- package/lib/modules/event-confirm/index.js +1 -2
- package/lib/modules/event-confirm/store.js +4 -7
- package/lib/modules/event-confirm/view.js +2 -1
- package/lib/modules/event-sound/index.js +1 -2
- package/lib/modules/event-sound/sound-effect-player.js +2 -2
- package/lib/modules/event-toast/index.js +1 -2
- package/lib/modules/event-toast/store.js +0 -2
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/interpreter/index.js +1 -2
- package/lib/modules/interpreter/interpreter-list/index.js +3 -4
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +2 -5
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +0 -4
- package/lib/modules/interpreter/store.js +5 -10
- package/lib/modules/interpreter/utils.js +15 -14
- package/lib/modules/invite/components/pstn-invite.js +22 -23
- package/lib/modules/invite/components/voip-invite.js +7 -7
- package/lib/modules/invite/enums.js +1 -0
- package/lib/modules/invite/index.js +1 -2
- package/lib/modules/invite/store.js +46 -45
- package/lib/modules/layout/components/CommonVideoRenderer.js +7 -3
- package/lib/modules/layout/components/Gallery.js +5 -3
- package/lib/modules/layout/components/index.js +0 -1
- package/lib/modules/layout/index.js +1 -2
- package/lib/modules/layout/store.d.ts +3 -0
- package/lib/modules/layout/store.js +38 -14
- package/lib/modules/layout/type.d.ts +7 -0
- package/lib/modules/layout/type.js +9 -0
- package/lib/modules/live-streaming/index.dev.js +6 -6
- package/lib/modules/live-streaming/index.js +1 -2
- package/lib/modules/live-streaming/store.js +19 -19
- package/lib/modules/notification/index.js +1 -2
- package/lib/modules/notification/interpreter-status/index.js +2 -1
- package/lib/modules/notification/view.js +1 -2
- package/lib/modules/offscreen-pulling/index.js +0 -1
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/index.js +0 -2
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +0 -1
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +0 -2
- package/lib/modules/participant/index.js +1 -4
- package/lib/modules/participant/member-list-data-source.js +0 -3
- package/lib/modules/participant/store.js +140 -114
- package/lib/modules/pc-audio-connect/index.js +1 -2
- package/lib/modules/pc-audio-connect/store.js +9 -10
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +2 -1
- package/lib/modules/phone-audio-connect/index.js +1 -2
- package/lib/modules/phone-audio-connect/store.js +0 -3
- package/lib/modules/phone-audio-connect/view.js +5 -4
- package/lib/modules/setting/audio-settings/audio-settings.js +1 -4
- package/lib/modules/setting/general-settings/general-settings.js +1 -2
- package/lib/modules/setting/index.d.ts +2 -0
- package/lib/modules/setting/index.js +4 -5
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -2
- package/lib/modules/setting/state/index.js +0 -4
- package/lib/modules/setting/storage-settings/storage-settings.js +4 -4
- package/lib/modules/setting/store.d.ts +8 -10
- package/lib/modules/setting/store.js +33 -35
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/video-settings.js +1 -2
- package/lib/modules/setting/view.js +1 -2
- package/lib/modules/share-screen/components/selection/index.js +16 -9
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.js +3 -3
- package/lib/modules/share-screen/store.d.ts +12 -2
- package/lib/modules/share-screen/store.js +149 -136
- package/lib/modules/state-bar/index.css +8 -6
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +3 -3
- package/lib/modules/state-bar/layout-config.d.ts +1 -0
- package/lib/modules/state-bar/layout-config.js +17 -6
- package/lib/modules/state-bar/live-streaming-state.js +0 -3
- package/lib/modules/state-bar/store.d.ts +5 -1
- package/lib/modules/state-bar/store.js +8 -2
- package/lib/modules/state-bar/view.js +9 -5
- package/lib/modules/video-window/components/members/index.js +2 -1
- package/lib/modules/video-window/components/topControl/index.js +0 -3
- package/lib/modules/video-window/index.js +1 -2
- package/lib/modules/video-window/store.js +0 -4
- package/lib/modules/waiting-room-layout/index.js +1 -2
- package/lib/modules/whiteboard/components/control-bar/store.js +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +1 -4
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -3
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +1 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +1 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +2 -4
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -3
- package/lib/modules/whiteboard/components/toolbar/store.js +64 -37
- package/lib/modules/whiteboard/index.js +5 -8
- package/lib/modules/whiteboard/style.css +12 -4
- package/lib/modules/whiteboard/view.js +10 -2
- package/lib/modules/widget/index.js +1 -2
- package/lib/modules/widget/web-widget.js +1 -1
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +13 -13
- package/lib/providers/ability-provider.d.ts +12 -1
- package/lib/providers/ability-provider.js +8 -1
- package/lib/providers/annotation-provider.d.ts +63 -12
- package/lib/providers/annotation-provider.js +52 -46
- package/lib/providers/device-privilege-provider.js +81 -83
- package/lib/providers/device-provider.d.ts +3 -3
- package/lib/providers/device-provider.js +201 -204
- package/lib/providers/device-stream-provider.js +24 -27
- package/lib/providers/event-provider.d.ts +3 -3
- package/lib/providers/event-provider.js +0 -2
- package/lib/providers/interpreter-provider.js +195 -197
- package/lib/providers/message-provider.js +0 -2
- package/lib/providers/phone-audio-provider.js +17 -19
- package/lib/providers/privilege-provider.js +53 -58
- package/lib/providers/renderer-provider.d.ts +3 -1
- package/lib/providers/renderer-provider.js +18 -4
- package/lib/providers/room-provider.js +31 -33
- package/lib/providers/screen-share-provider.d.ts +1 -0
- package/lib/providers/screen-share-provider.js +97 -103
- package/lib/providers/sharing-provider.d.ts +5 -1
- package/lib/providers/sharing-provider.js +17 -1
- package/lib/providers/user-setting-storage-provider.d.ts +20 -0
- package/lib/providers/user-setting-storage-provider.js +72 -0
- package/lib/providers/widget-provider.js +0 -1
- package/lib/scenes/main-scene.js +13 -16
- package/lib/scenes/waiting-scene.js +4 -4
- package/lib/shared-data-source/chat-data.js +0 -2
- package/lib/shared-data-source/config.d.ts +1 -5
- package/lib/shared-data-source/config.js +11 -81
- package/lib/shared-data-source/interpreter.js +0 -2
- package/lib/shared-data-source/layout-data.js +1 -4
- package/lib/shared-data-source/member-data.js +0 -4
- package/lib/shared-data-source/pin-data.js +0 -1
- package/lib/shared-data-source/screen-share-data.d.ts +6 -2
- package/lib/shared-data-source/screen-share-data.js +2 -2
- package/lib/shared-data-source/security-data.js +0 -1
- package/lib/shared-data-source/setting.d.ts +13 -13
- package/lib/shared-data-source/setting.js +10 -8
- package/lib/shared-data-source/video-window.d.ts +2 -1
- package/lib/shared-data-source/video-window.js +82 -66
- package/lib/shared-data-source/waiting-room.js +0 -2
- package/lib/translations/enUS.d.ts +8 -0
- package/lib/translations/enUS.js +9 -1
- package/lib/translations/zhCN.d.ts +8 -0
- package/lib/translations/zhCN.js +11 -3
- package/lib/type.d.ts +2 -1
- package/lib/type.js +14 -0
- package/lib/ui-scene.js +18 -14
- package/lib/utilities/constant.d.ts +2 -1
- package/lib/utilities/constant.js +8 -0
- package/lib/utilities/copyText.js +12 -12
- package/lib/utilities/hooks.js +1 -2
- package/lib/utilities/logger.js +0 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/privilege.js +0 -3
- package/lib/utilities/renderer-event.js +0 -2
- package/lib/utilities/setting-config-storage.d.ts +7 -6
- package/lib/utilities/setting-config-storage.js +55 -41
- package/lib/utilities/tools.d.ts +1 -0
- package/lib/utilities/tools.js +9 -12
- package/lib/waiting-room-control-manager.js +26 -28
- package/package.json +8 -6
- package/dist/132.js +0 -2
- package/dist/132.js.LICENSE.txt +0 -311
- package/dist/317.js +0 -2
- package/dist/317.js.LICENSE.txt +0 -20
- package/dist/651.js +0 -2
- package/dist/651.js.LICENSE.txt +0 -1
- package/dist/689343b64b60bfb7ffff.png +0 -0
- package/dist/73.js +0 -1
- package/dist/885f9369ea05a8ac0e56.png +0 -0
- package/dist/90f383876a6e93e7c7ca.png +0 -0
- package/dist/9b37584780995fc5df8c.gif +0 -0
- package/dist/annotation.e5cbd3a70b6d42361872.css +0 -1274
- package/dist/annotation.html +0 -1
- package/dist/annotation.js +0 -2
- package/dist/annotation.js.LICENSE.txt +0 -252
- package/dist/assets/browser/images/default1.jpg +0 -0
- package/dist/assets/browser/images/default2.jpg +0 -0
- package/dist/assets/browser/images/default3.jpg +0 -0
- package/dist/assets/browser/images/default4.jpg +0 -0
- package/dist/assets/browser/images/default5.jpg +0 -0
- package/dist/assets/browser/images/default6.jpg +0 -0
- package/dist/assets/browser/images/default7.jpg +0 -0
- package/dist/assets/browser/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/browser/sound_effects/recording_started.mp3 +0 -0
- package/dist/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
- package/dist/assets/browser/sound_effects/speaker_test.mp3 +0 -0
- package/dist/assets/browser/videos/default8.mp4 +0 -0
- package/dist/assets/browser/videos/default9.mp4 +0 -0
- package/dist/assets/cursors/fcr_whiteboard_input.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_pen.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
- package/dist/assets/electron/images/default1.jpg +0 -0
- package/dist/assets/electron/images/default2.jpg +0 -0
- package/dist/assets/electron/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/electron/videos/default8.mp4 +0 -0
- package/dist/assets/fcr_chat_reddot.svg +0 -5
- package/dist/assets/fcr_defaultpage.png +0 -0
- package/dist/assets/fcr_grid_big.svg +0 -3
- package/dist/assets/fcr_leave2.svg +0 -58
- package/dist/assets/fcr_listontop_big.svg +0 -3
- package/dist/assets/full-screen-error-boundary-img.png +0 -0
- package/dist/assets/leave-meeting.png +0 -0
- package/dist/assets/loading.gif +0 -0
- package/dist/assets/login_confirm.png +0 -0
- package/dist/assets/pretest.mp3 +0 -0
- package/dist/assets/state-bar-logo.png +0 -0
- package/dist/assets/step-gradient.svg +0 -10
- package/dist/b74b002687a3a3346bec.png +0 -0
- package/dist/b94869094481702f949b.png +0 -0
- package/dist/ebeace75fd46b90d890e.png +0 -0
- package/dist/electron/app.js +0 -194
- package/dist/electron/bootstrap-dev.js +0 -46
- package/dist/electron/bootstrap-sdk.js +0 -211
- package/dist/electron/default-options.js +0 -25
- package/dist/electron/env.js +0 -13
- package/dist/electron/index.js +0 -20
- package/dist/electron/injections.js +0 -903
- package/dist/electron/ipc/ipc.js +0 -141
- package/dist/electron/ipc/type.js +0 -19
- package/dist/electron/logger.js +0 -65
- package/dist/electron/main.js +0 -94
- package/dist/electron/plugins/devtool-shortcut.js +0 -33
- package/dist/electron/plugins/meeting-state.js +0 -39
- package/dist/electron/plugins/screenshot.js +0 -54
- package/dist/electron/preload.js +0 -108
- package/dist/electron/tools.js +0 -66
- package/dist/electron/window.js +0 -123
- package/dist/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm.js +0 -1
- package/dist/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
- package/dist/fad688b9135b15d6c405.png +0 -0
- package/dist/index.html +0 -224
- package/dist/main.393a2a91ab7fc05ffce6.css +0 -15403
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -272
- package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
|
@@ -42,11 +42,6 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
42
42
|
require("core-js/modules/es.set.js");
|
|
43
43
|
require("core-js/modules/es.string.iterator.js");
|
|
44
44
|
require("core-js/modules/es.weak-map.js");
|
|
45
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
46
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
47
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
48
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
49
|
-
require("core-js/modules/esnext.async-iterator.some.js");
|
|
50
45
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
51
46
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
52
47
|
require("core-js/modules/esnext.iterator.find.js");
|
|
@@ -117,7 +112,6 @@ var _mobx = require("mobx");
|
|
|
117
112
|
var _virtualBackdoundResources = require("../modules/device-pretest/assets/virtual-backdound-resources");
|
|
118
113
|
var _type2 = require("../type");
|
|
119
114
|
var _tools = require("../utilities/tools");
|
|
120
|
-
var _store = require("../modules/setting/store");
|
|
121
115
|
var _logger = require("../utilities/logger");
|
|
122
116
|
var _FcrUIDeviceProviderImpl;
|
|
123
117
|
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, _loadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
|
|
@@ -164,7 +158,7 @@ var _b = /*#__PURE__*/new WeakMap();
|
|
|
164
158
|
var _c = /*#__PURE__*/new WeakMap();
|
|
165
159
|
_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], _loadUiResourcesDecs = [_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
160
|
var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
|
|
167
|
-
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig,
|
|
161
|
+
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig, _userSettingStorageProvider) {
|
|
168
162
|
var _this = this;
|
|
169
163
|
(0, _classCallCheck2["default"])(this, FcrUIDeviceProviderImpl);
|
|
170
164
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
@@ -234,7 +228,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
234
228
|
this._eventProvider = _eventProvider;
|
|
235
229
|
this._mediaControl = _mediaControl;
|
|
236
230
|
this._mediaConfig = _mediaConfig;
|
|
237
|
-
this.
|
|
231
|
+
this._userSettingStorageProvider = _userSettingStorageProvider;
|
|
238
232
|
this._listeners.push((0, _mobx.reaction)(function () {
|
|
239
233
|
return _this.cameraId;
|
|
240
234
|
}, this._handleCameraChanged));
|
|
@@ -489,21 +483,21 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
489
483
|
value: function () {
|
|
490
484
|
var _ifAccessMicrophone = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
491
485
|
var hasSystemPermission;
|
|
492
|
-
return _regenerator["default"].wrap(function
|
|
486
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
493
487
|
while (1) switch (_context.prev = _context.next) {
|
|
494
488
|
case 0:
|
|
495
489
|
hasSystemPermission = true;
|
|
496
490
|
if (!(0, _env.isElectron)()) {
|
|
497
|
-
_context.next =
|
|
491
|
+
_context.next = 2;
|
|
498
492
|
break;
|
|
499
493
|
}
|
|
500
|
-
_context.next =
|
|
494
|
+
_context.next = 1;
|
|
501
495
|
return window.runtime.checkMediaPermission('microphone');
|
|
502
|
-
case
|
|
496
|
+
case 1:
|
|
503
497
|
hasSystemPermission = _context.sent;
|
|
504
|
-
case
|
|
498
|
+
case 2:
|
|
505
499
|
return _context.abrupt("return", hasSystemPermission);
|
|
506
|
-
case
|
|
500
|
+
case 3:
|
|
507
501
|
case "end":
|
|
508
502
|
return _context.stop();
|
|
509
503
|
}
|
|
@@ -519,21 +513,21 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
519
513
|
value: function () {
|
|
520
514
|
var _ifAccessCamera = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
521
515
|
var hasSystemPermission;
|
|
522
|
-
return _regenerator["default"].wrap(function
|
|
516
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
523
517
|
while (1) switch (_context2.prev = _context2.next) {
|
|
524
518
|
case 0:
|
|
525
519
|
hasSystemPermission = true;
|
|
526
520
|
if (!(0, _env.isElectron)()) {
|
|
527
|
-
_context2.next =
|
|
521
|
+
_context2.next = 2;
|
|
528
522
|
break;
|
|
529
523
|
}
|
|
530
|
-
_context2.next =
|
|
524
|
+
_context2.next = 1;
|
|
531
525
|
return window.runtime.checkMediaPermission('camera');
|
|
532
|
-
case
|
|
526
|
+
case 1:
|
|
533
527
|
hasSystemPermission = _context2.sent;
|
|
534
|
-
case
|
|
528
|
+
case 2:
|
|
535
529
|
return _context2.abrupt("return", hasSystemPermission);
|
|
536
|
-
case
|
|
530
|
+
case 3:
|
|
537
531
|
case "end":
|
|
538
532
|
return _context2.stop();
|
|
539
533
|
}
|
|
@@ -681,7 +675,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
681
675
|
}, {
|
|
682
676
|
key: "_initLocalSetting",
|
|
683
677
|
value: function _initLocalSetting() {
|
|
684
|
-
var
|
|
678
|
+
var _this$_userSettingSto;
|
|
679
|
+
var value = (_this$_userSettingSto = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto === void 0 ? void 0 : _this$_userSettingSto.setting;
|
|
685
680
|
if (value) {
|
|
686
681
|
var _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
|
|
687
682
|
var _microphoneVolume = (_value$microphoneVolu = value.microphoneVolume) !== null && _value$microphoneVolu !== void 0 ? _value$microphoneVolu : this.microphoneVolume;
|
|
@@ -698,15 +693,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
698
693
|
var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
699
694
|
var _this2 = this;
|
|
700
695
|
var res;
|
|
701
|
-
return _regenerator["default"].wrap(function
|
|
696
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
702
697
|
while (1) switch (_context5.prev = _context5.next) {
|
|
703
698
|
case 0:
|
|
704
|
-
_context5.next =
|
|
699
|
+
_context5.next = 1;
|
|
705
700
|
return Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
|
|
706
701
|
(0, _mobx.runInAction)(function () {
|
|
707
702
|
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
708
703
|
_this2.cameraList = list;
|
|
709
704
|
if (_this2.cameraList.length > 0) {
|
|
705
|
+
var _this2$_userSettingSt;
|
|
710
706
|
var _cameraId = _this2.cameraList[0].deviceId;
|
|
711
707
|
var defaultCameraDeviceId = _this2._getDefaultDeviceId({
|
|
712
708
|
initValue: _cameraId,
|
|
@@ -715,7 +711,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
715
711
|
});
|
|
716
712
|
_this2.logger.info('[FcrDeviceStore] select default camera id:', defaultCameraDeviceId);
|
|
717
713
|
_this2.setCameraId(defaultCameraDeviceId);
|
|
718
|
-
var localSetting = _this2.
|
|
714
|
+
var localSetting = (_this2$_userSettingSt = _this2._userSettingStorageProvider.read()) === null || _this2$_userSettingSt === void 0 ? void 0 : _this2$_userSettingSt.setting;
|
|
719
715
|
if (localSetting) {
|
|
720
716
|
var _localSetting$enableB, _localSetting$beautyO;
|
|
721
717
|
if (localSetting.enable) {
|
|
@@ -731,7 +727,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
731
727
|
}), this._getMicrophoneList().then(/*#__PURE__*/function () {
|
|
732
728
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
|
|
733
729
|
var defaultMicrophoneDeviceId;
|
|
734
|
-
return _regenerator["default"].wrap(function
|
|
730
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
735
731
|
while (1) switch (_context3.prev = _context3.next) {
|
|
736
732
|
case 0:
|
|
737
733
|
_this2.microphoneList = microphoneList;
|
|
@@ -742,9 +738,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
742
738
|
localKey: 'microphoneDeviceId',
|
|
743
739
|
list: _this2.microphoneList
|
|
744
740
|
});
|
|
745
|
-
_context3.next =
|
|
741
|
+
_context3.next = 1;
|
|
746
742
|
return _this2.setMicrophoneId(defaultMicrophoneDeviceId);
|
|
747
|
-
case
|
|
743
|
+
case 1:
|
|
748
744
|
case "end":
|
|
749
745
|
return _context3.stop();
|
|
750
746
|
}
|
|
@@ -756,7 +752,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
756
752
|
}()), this._getSpeakerList().then(/*#__PURE__*/function () {
|
|
757
753
|
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
|
|
758
754
|
var defaultSpeakerDeviceId;
|
|
759
|
-
return _regenerator["default"].wrap(function
|
|
755
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
760
756
|
while (1) switch (_context4.prev = _context4.next) {
|
|
761
757
|
case 0:
|
|
762
758
|
_this2.speakerList = speakerList;
|
|
@@ -767,9 +763,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
767
763
|
localKey: 'speakerDeviceId',
|
|
768
764
|
list: _this2.speakerList
|
|
769
765
|
});
|
|
770
|
-
_context4.next =
|
|
766
|
+
_context4.next = 1;
|
|
771
767
|
return _this2.setSpeakerId(defaultSpeakerDeviceId);
|
|
772
|
-
case
|
|
768
|
+
case 1:
|
|
773
769
|
case "end":
|
|
774
770
|
return _context4.stop();
|
|
775
771
|
}
|
|
@@ -779,11 +775,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
779
775
|
return _ref3.apply(this, arguments);
|
|
780
776
|
};
|
|
781
777
|
}())]);
|
|
782
|
-
case
|
|
778
|
+
case 1:
|
|
783
779
|
res = _context5.sent;
|
|
784
780
|
this._initLocalSetting();
|
|
785
781
|
return _context5.abrupt("return", res);
|
|
786
|
-
case
|
|
782
|
+
case 2:
|
|
787
783
|
case "end":
|
|
788
784
|
return _context5.stop();
|
|
789
785
|
}
|
|
@@ -1122,30 +1118,30 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1122
1118
|
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(speakerId) {
|
|
1123
1119
|
var _this6 = this;
|
|
1124
1120
|
var speakerDeviceId, defaultDevice;
|
|
1125
|
-
return _regenerator["default"].wrap(function
|
|
1121
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
1126
1122
|
while (1) switch (_context6.prev = _context6.next) {
|
|
1127
1123
|
case 0:
|
|
1128
1124
|
if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
|
|
1129
|
-
_context6.next =
|
|
1125
|
+
_context6.next = 1;
|
|
1130
1126
|
break;
|
|
1131
1127
|
}
|
|
1132
1128
|
return _context6.abrupt("return");
|
|
1133
|
-
case
|
|
1129
|
+
case 1:
|
|
1134
1130
|
if (!speakerId) {
|
|
1135
|
-
_context6.next =
|
|
1131
|
+
_context6.next = 4;
|
|
1136
1132
|
break;
|
|
1137
1133
|
}
|
|
1138
1134
|
speakerDeviceId = speakerId;
|
|
1139
1135
|
if (!(speakerId === DEFAULT_DEVICE_ID)) {
|
|
1140
|
-
_context6.next =
|
|
1136
|
+
_context6.next = 3;
|
|
1141
1137
|
break;
|
|
1142
1138
|
}
|
|
1143
|
-
_context6.next =
|
|
1139
|
+
_context6.next = 2;
|
|
1144
1140
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1145
|
-
case
|
|
1141
|
+
case 2:
|
|
1146
1142
|
defaultDevice = _context6.sent;
|
|
1147
1143
|
speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1148
|
-
case
|
|
1144
|
+
case 3:
|
|
1149
1145
|
if (speakerDeviceId) {
|
|
1150
1146
|
this._mediaControl.setSelectedSpeaker(speakerDeviceId);
|
|
1151
1147
|
}
|
|
@@ -1153,15 +1149,15 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1153
1149
|
_this6._speakerDeviceId = speakerDeviceId;
|
|
1154
1150
|
_this6.speakerId = speakerId;
|
|
1155
1151
|
});
|
|
1156
|
-
_context6.next =
|
|
1152
|
+
_context6.next = 5;
|
|
1157
1153
|
break;
|
|
1158
|
-
case
|
|
1154
|
+
case 4:
|
|
1159
1155
|
this._speakerDeviceId = speakerId;
|
|
1160
1156
|
this.speakerId = speakerId;
|
|
1161
|
-
case
|
|
1157
|
+
case 5:
|
|
1162
1158
|
this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
|
|
1163
1159
|
this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
|
|
1164
|
-
case
|
|
1160
|
+
case 6:
|
|
1165
1161
|
case "end":
|
|
1166
1162
|
return _context6.stop();
|
|
1167
1163
|
}
|
|
@@ -1180,33 +1176,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1180
1176
|
_this$_microphoneAudi6,
|
|
1181
1177
|
_this7 = this;
|
|
1182
1178
|
var microphoneDeviceId, defaultDevice, _microphoneTrack;
|
|
1183
|
-
return _regenerator["default"].wrap(function
|
|
1179
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
1184
1180
|
while (1) switch (_context7.prev = _context7.next) {
|
|
1185
1181
|
case 0:
|
|
1186
1182
|
if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
|
|
1187
|
-
_context7.next =
|
|
1183
|
+
_context7.next = 1;
|
|
1188
1184
|
break;
|
|
1189
1185
|
}
|
|
1190
1186
|
return _context7.abrupt("return");
|
|
1191
|
-
case
|
|
1187
|
+
case 1:
|
|
1192
1188
|
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
|
|
1193
1189
|
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
|
|
1194
1190
|
this.stopMicrophoneTest();
|
|
1195
1191
|
if (!microphoneId) {
|
|
1196
|
-
_context7.next =
|
|
1192
|
+
_context7.next = 4;
|
|
1197
1193
|
break;
|
|
1198
1194
|
}
|
|
1199
1195
|
microphoneDeviceId = microphoneId;
|
|
1200
1196
|
if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
|
|
1201
|
-
_context7.next =
|
|
1197
|
+
_context7.next = 3;
|
|
1202
1198
|
break;
|
|
1203
1199
|
}
|
|
1204
|
-
_context7.next =
|
|
1200
|
+
_context7.next = 2;
|
|
1205
1201
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1206
|
-
case
|
|
1202
|
+
case 2:
|
|
1207
1203
|
defaultDevice = _context7.sent;
|
|
1208
1204
|
microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1209
|
-
case
|
|
1205
|
+
case 3:
|
|
1210
1206
|
if (microphoneDeviceId) {
|
|
1211
1207
|
_microphoneTrack = this._mediaControl.getMicrophoneTrack(microphoneDeviceId);
|
|
1212
1208
|
_microphoneTrack.addObserver(this._microphoneObserver);
|
|
@@ -1219,15 +1215,15 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1219
1215
|
_this7._microphoneDeviceId = microphoneDeviceId;
|
|
1220
1216
|
_this7.microphoneId = microphoneId;
|
|
1221
1217
|
});
|
|
1222
|
-
_context7.next =
|
|
1218
|
+
_context7.next = 5;
|
|
1223
1219
|
break;
|
|
1224
|
-
case
|
|
1220
|
+
case 4:
|
|
1225
1221
|
this._microphoneDeviceId = microphoneId;
|
|
1226
1222
|
this.microphoneId = microphoneId;
|
|
1227
|
-
case
|
|
1223
|
+
case 5:
|
|
1228
1224
|
this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
|
|
1229
1225
|
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
|
|
1230
|
-
case
|
|
1226
|
+
case 6:
|
|
1231
1227
|
case "end":
|
|
1232
1228
|
return _context7.stop();
|
|
1233
1229
|
}
|
|
@@ -1278,11 +1274,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1278
1274
|
var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(uiResource) {
|
|
1279
1275
|
var _this8 = this;
|
|
1280
1276
|
var _uiResource$virtualBa, _uiResource$virtualBa2, _uiResource$soundEffe, images, videos, soundEffects, newList, imageInfoList, videoInfoList, _uiResource$virtualBa3, _uiResource$virtualBa4, _uiResource$soundEffe2, _images, _videos, _soundEffects, handleResourceReady;
|
|
1281
|
-
return _regenerator["default"].wrap(function
|
|
1277
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
1282
1278
|
while (1) switch (_context8.prev = _context8.next) {
|
|
1283
1279
|
case 0:
|
|
1284
1280
|
if ((0, _env.isElectron)()) {
|
|
1285
|
-
_context8.next =
|
|
1281
|
+
_context8.next = 1;
|
|
1286
1282
|
break;
|
|
1287
1283
|
}
|
|
1288
1284
|
images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.filter(function (url) {
|
|
@@ -1325,12 +1321,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1325
1321
|
_this8.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1326
1322
|
});
|
|
1327
1323
|
});
|
|
1328
|
-
_context8.next =
|
|
1324
|
+
_context8.next = 3;
|
|
1329
1325
|
break;
|
|
1330
|
-
case
|
|
1331
|
-
_context8.next =
|
|
1326
|
+
case 1:
|
|
1327
|
+
_context8.next = 2;
|
|
1332
1328
|
return this._loadBuiltinResources();
|
|
1333
|
-
case
|
|
1329
|
+
case 2:
|
|
1334
1330
|
_images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa3 = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa3 === void 0 ? void 0 : _uiResource$virtualBa3.filter(function (url) {
|
|
1335
1331
|
return (0, _tools.isZipUrl)(url);
|
|
1336
1332
|
})) || [];
|
|
@@ -1367,7 +1363,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1367
1363
|
this.loadZipResources(_images, 'image', handleResourceReady);
|
|
1368
1364
|
this.loadZipResources(_videos, 'video', handleResourceReady);
|
|
1369
1365
|
this.loadZipResources(_soundEffects, 'audio', handleResourceReady);
|
|
1370
|
-
case
|
|
1366
|
+
case 3:
|
|
1371
1367
|
case "end":
|
|
1372
1368
|
return _context8.stop();
|
|
1373
1369
|
}
|
|
@@ -1381,24 +1377,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1381
1377
|
}, {
|
|
1382
1378
|
key: "loadZipResources",
|
|
1383
1379
|
value: function () {
|
|
1384
|
-
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1380
|
+
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(zipUrls, type, callback) {
|
|
1385
1381
|
var _this9 = this;
|
|
1386
1382
|
var ps;
|
|
1387
|
-
return _regenerator["default"].wrap(function
|
|
1388
|
-
while (1) switch (
|
|
1383
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
1384
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
1389
1385
|
case 0:
|
|
1390
1386
|
ps = zipUrls.map(/*#__PURE__*/function () {
|
|
1391
1387
|
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(url) {
|
|
1392
1388
|
var filePathList;
|
|
1393
|
-
return _regenerator["default"].wrap(function
|
|
1389
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
1394
1390
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1395
1391
|
case 0:
|
|
1396
|
-
_context9.next =
|
|
1392
|
+
_context9.next = 1;
|
|
1397
1393
|
return _this9._fetchZipAndUnzip(url, type);
|
|
1398
|
-
case
|
|
1394
|
+
case 1:
|
|
1399
1395
|
filePathList = _context9.sent;
|
|
1400
1396
|
callback(filePathList, type);
|
|
1401
|
-
case
|
|
1397
|
+
case 2:
|
|
1402
1398
|
case "end":
|
|
1403
1399
|
return _context9.stop();
|
|
1404
1400
|
}
|
|
@@ -1408,13 +1404,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1408
1404
|
return _ref4.apply(this, arguments);
|
|
1409
1405
|
};
|
|
1410
1406
|
}());
|
|
1411
|
-
|
|
1407
|
+
_context0.next = 1;
|
|
1412
1408
|
return Promise.allSettled(ps);
|
|
1413
|
-
case
|
|
1409
|
+
case 1:
|
|
1414
1410
|
case "end":
|
|
1415
|
-
return
|
|
1411
|
+
return _context0.stop();
|
|
1416
1412
|
}
|
|
1417
|
-
},
|
|
1413
|
+
}, _callee0);
|
|
1418
1414
|
}));
|
|
1419
1415
|
function loadZipResources(_x6, _x7, _x8) {
|
|
1420
1416
|
return _loadZipResources.apply(this, arguments);
|
|
@@ -1424,13 +1420,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1424
1420
|
}, {
|
|
1425
1421
|
key: "release",
|
|
1426
1422
|
value: function release() {
|
|
1427
|
-
var
|
|
1423
|
+
var _this0 = this,
|
|
1428
1424
|
_this$_cameraVideoTra3,
|
|
1429
1425
|
_this$_microphoneAudi8;
|
|
1430
1426
|
if (this._localVideoViewSet.size > 0) {
|
|
1431
1427
|
this._localVideoViewSet.forEach(function (view) {
|
|
1432
|
-
var
|
|
1433
|
-
(
|
|
1428
|
+
var _this0$_cameraVideoTr;
|
|
1429
|
+
(_this0$_cameraVideoTr = _this0._cameraVideoTrack) === null || _this0$_cameraVideoTr === void 0 || _this0$_cameraVideoTr.stopPreview(view);
|
|
1434
1430
|
});
|
|
1435
1431
|
this._localVideoViewSet.clear();
|
|
1436
1432
|
}
|
|
@@ -1447,20 +1443,20 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1447
1443
|
}, {
|
|
1448
1444
|
key: "_fetchZipAndUnzip",
|
|
1449
1445
|
value: function () {
|
|
1450
|
-
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1446
|
+
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(url, type) {
|
|
1451
1447
|
var md5Url;
|
|
1452
|
-
return _regenerator["default"].wrap(function
|
|
1453
|
-
while (1) switch (
|
|
1448
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
1449
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
1454
1450
|
case 0:
|
|
1455
1451
|
md5Url = (0, _imports.md5)(url);
|
|
1456
|
-
return
|
|
1457
|
-
case
|
|
1452
|
+
return _context1.abrupt("return", window.runtime.getResourceByFileType(url, md5Url, type));
|
|
1453
|
+
case 1:
|
|
1458
1454
|
case "end":
|
|
1459
|
-
return
|
|
1455
|
+
return _context1.stop();
|
|
1460
1456
|
}
|
|
1461
|
-
},
|
|
1457
|
+
}, _callee1);
|
|
1462
1458
|
}));
|
|
1463
|
-
function _fetchZipAndUnzip(
|
|
1459
|
+
function _fetchZipAndUnzip(_x0, _x1) {
|
|
1464
1460
|
return _fetchZipAndUnzip2.apply(this, arguments);
|
|
1465
1461
|
}
|
|
1466
1462
|
return _fetchZipAndUnzip;
|
|
@@ -1503,7 +1499,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1503
1499
|
}, {
|
|
1504
1500
|
key: "toggleLocalCameraPreview",
|
|
1505
1501
|
value: function toggleLocalCameraPreview(enabled) {
|
|
1506
|
-
var
|
|
1502
|
+
var _this1 = this;
|
|
1507
1503
|
var localVideoViewSet = this._localVideoViewSet;
|
|
1508
1504
|
var cameraTrack = this._cameraVideoTrack;
|
|
1509
1505
|
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
@@ -1515,7 +1511,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1515
1511
|
localVideoViewSet.forEach(function (view) {
|
|
1516
1512
|
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1517
1513
|
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1518
|
-
isMirror:
|
|
1514
|
+
isMirror: _this1.currentIsMirror
|
|
1519
1515
|
}, view);
|
|
1520
1516
|
});
|
|
1521
1517
|
}
|
|
@@ -1523,24 +1519,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1523
1519
|
}, {
|
|
1524
1520
|
key: "_handleCameraListUpdated",
|
|
1525
1521
|
value: function () {
|
|
1526
|
-
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1527
|
-
var
|
|
1522
|
+
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1523
|
+
var _this10 = this;
|
|
1528
1524
|
var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
|
|
1529
|
-
return _regenerator["default"].wrap(function
|
|
1530
|
-
while (1) switch (
|
|
1525
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
1526
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1531
1527
|
case 0:
|
|
1532
|
-
|
|
1528
|
+
_context10.next = 1;
|
|
1533
1529
|
return this._mediaControl.getCameraList();
|
|
1534
|
-
case
|
|
1535
|
-
cameraList =
|
|
1530
|
+
case 1:
|
|
1531
|
+
cameraList = _context10.sent;
|
|
1536
1532
|
(0, _mobx.runInAction)(function () {
|
|
1537
|
-
|
|
1533
|
+
_this10.cameraList = cameraList;
|
|
1538
1534
|
});
|
|
1539
1535
|
currentDeviceExist = false;
|
|
1540
1536
|
if (this.cameraId) {
|
|
1541
1537
|
currentDeviceExist = this.cameraList.some(function (_ref5) {
|
|
1542
1538
|
var deviceId = _ref5.deviceId;
|
|
1543
|
-
return
|
|
1539
|
+
return _this10.cameraId === deviceId;
|
|
1544
1540
|
});
|
|
1545
1541
|
_cameraEnabled = this.cameraEnabled;
|
|
1546
1542
|
if (!currentDeviceExist) {
|
|
@@ -1565,11 +1561,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1565
1561
|
}
|
|
1566
1562
|
}
|
|
1567
1563
|
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1568
|
-
case
|
|
1564
|
+
case 2:
|
|
1569
1565
|
case "end":
|
|
1570
|
-
return
|
|
1566
|
+
return _context10.stop();
|
|
1571
1567
|
}
|
|
1572
|
-
},
|
|
1568
|
+
}, _callee10, this);
|
|
1573
1569
|
}));
|
|
1574
1570
|
function _handleCameraListUpdated() {
|
|
1575
1571
|
return _handleCameraListUpdated2.apply(this, arguments);
|
|
@@ -1579,19 +1575,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1579
1575
|
}, {
|
|
1580
1576
|
key: "_handleMicrophoneAdded",
|
|
1581
1577
|
value: function () {
|
|
1582
|
-
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1583
|
-
return _regenerator["default"].wrap(function
|
|
1584
|
-
while (1) switch (
|
|
1578
|
+
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
1579
|
+
return _regenerator["default"].wrap(function (_context11) {
|
|
1580
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1585
1581
|
case 0:
|
|
1586
|
-
|
|
1582
|
+
_context11.next = 1;
|
|
1587
1583
|
return this._handleMicrophoneListUpdated();
|
|
1588
|
-
case
|
|
1584
|
+
case 1:
|
|
1589
1585
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1590
|
-
case
|
|
1586
|
+
case 2:
|
|
1591
1587
|
case "end":
|
|
1592
|
-
return
|
|
1588
|
+
return _context11.stop();
|
|
1593
1589
|
}
|
|
1594
|
-
},
|
|
1590
|
+
}, _callee11, this);
|
|
1595
1591
|
}));
|
|
1596
1592
|
function _handleMicrophoneAdded() {
|
|
1597
1593
|
return _handleMicrophoneAdded2.apply(this, arguments);
|
|
@@ -1601,33 +1597,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1601
1597
|
}, {
|
|
1602
1598
|
key: "_handleMicrophoneRemoved",
|
|
1603
1599
|
value: function () {
|
|
1604
|
-
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1605
|
-
var
|
|
1600
|
+
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
1601
|
+
var _this11 = this;
|
|
1606
1602
|
var currentDeviceExist;
|
|
1607
|
-
return _regenerator["default"].wrap(function
|
|
1608
|
-
while (1) switch (
|
|
1603
|
+
return _regenerator["default"].wrap(function (_context12) {
|
|
1604
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1609
1605
|
case 0:
|
|
1610
|
-
|
|
1606
|
+
_context12.next = 1;
|
|
1611
1607
|
return this._handleMicrophoneListUpdated();
|
|
1612
|
-
case
|
|
1608
|
+
case 1:
|
|
1613
1609
|
// 如何设备移除了,应该切到跟随系统
|
|
1614
1610
|
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1615
|
-
return item.deviceId ===
|
|
1611
|
+
return item.deviceId === _this11._microphoneDeviceId;
|
|
1616
1612
|
});
|
|
1617
1613
|
if (currentDeviceExist) {
|
|
1618
|
-
|
|
1614
|
+
_context12.next = 2;
|
|
1619
1615
|
break;
|
|
1620
1616
|
}
|
|
1621
1617
|
this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
|
|
1622
|
-
|
|
1618
|
+
_context12.next = 2;
|
|
1623
1619
|
return this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1624
|
-
case
|
|
1620
|
+
case 2:
|
|
1625
1621
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1626
|
-
case
|
|
1622
|
+
case 3:
|
|
1627
1623
|
case "end":
|
|
1628
|
-
return
|
|
1624
|
+
return _context12.stop();
|
|
1629
1625
|
}
|
|
1630
|
-
},
|
|
1626
|
+
}, _callee12, this);
|
|
1631
1627
|
}));
|
|
1632
1628
|
function _handleMicrophoneRemoved() {
|
|
1633
1629
|
return _handleMicrophoneRemoved2.apply(this, arguments);
|
|
@@ -1637,28 +1633,28 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1637
1633
|
}, {
|
|
1638
1634
|
key: "_handleMicrophoneListUpdated",
|
|
1639
1635
|
value: function () {
|
|
1640
|
-
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1641
|
-
var
|
|
1636
|
+
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
1637
|
+
var _this12 = this;
|
|
1642
1638
|
var microphoneList;
|
|
1643
|
-
return _regenerator["default"].wrap(function
|
|
1644
|
-
while (1) switch (
|
|
1639
|
+
return _regenerator["default"].wrap(function (_context13) {
|
|
1640
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1645
1641
|
case 0:
|
|
1646
|
-
|
|
1642
|
+
_context13.next = 1;
|
|
1647
1643
|
return this._getMicrophoneList();
|
|
1648
|
-
case
|
|
1649
|
-
microphoneList =
|
|
1644
|
+
case 1:
|
|
1645
|
+
microphoneList = _context13.sent;
|
|
1650
1646
|
// 如果选择了跟随系统,浏览器下设备变更时需要更新 track 以保证当前设备 track 正确
|
|
1651
1647
|
if (this.followSystemMicrophoneDevice) {
|
|
1652
1648
|
this._refreshMicrophoneTrack();
|
|
1653
1649
|
}
|
|
1654
1650
|
(0, _mobx.runInAction)(function () {
|
|
1655
|
-
|
|
1651
|
+
_this12.microphoneList = microphoneList;
|
|
1656
1652
|
});
|
|
1657
|
-
case
|
|
1653
|
+
case 2:
|
|
1658
1654
|
case "end":
|
|
1659
|
-
return
|
|
1655
|
+
return _context13.stop();
|
|
1660
1656
|
}
|
|
1661
|
-
},
|
|
1657
|
+
}, _callee13, this);
|
|
1662
1658
|
}));
|
|
1663
1659
|
function _handleMicrophoneListUpdated() {
|
|
1664
1660
|
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
@@ -1673,9 +1669,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1673
1669
|
}, {
|
|
1674
1670
|
key: "_refreshMicrophoneTrack",
|
|
1675
1671
|
value: function _refreshMicrophoneTrack() {
|
|
1676
|
-
var _this$_microphoneAudi9, _this$
|
|
1672
|
+
var _this$_microphoneAudi9, _this$_microphoneAudi0;
|
|
1677
1673
|
(_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
|
|
1678
|
-
(_this$
|
|
1674
|
+
(_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
|
|
1679
1675
|
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
|
|
1680
1676
|
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1681
1677
|
if (this.microphoneEnabled) {
|
|
@@ -1687,19 +1683,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1687
1683
|
}, {
|
|
1688
1684
|
key: "_handleSpeakerAdded",
|
|
1689
1685
|
value: function () {
|
|
1690
|
-
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1691
|
-
return _regenerator["default"].wrap(function
|
|
1692
|
-
while (1) switch (
|
|
1686
|
+
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
|
1687
|
+
return _regenerator["default"].wrap(function (_context14) {
|
|
1688
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1693
1689
|
case 0:
|
|
1694
|
-
|
|
1690
|
+
_context14.next = 1;
|
|
1695
1691
|
return this._handleSpeakerListUpdated();
|
|
1696
|
-
case
|
|
1692
|
+
case 1:
|
|
1697
1693
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1698
|
-
case
|
|
1694
|
+
case 2:
|
|
1699
1695
|
case "end":
|
|
1700
|
-
return
|
|
1696
|
+
return _context14.stop();
|
|
1701
1697
|
}
|
|
1702
|
-
},
|
|
1698
|
+
}, _callee14, this);
|
|
1703
1699
|
}));
|
|
1704
1700
|
function _handleSpeakerAdded() {
|
|
1705
1701
|
return _handleSpeakerAdded2.apply(this, arguments);
|
|
@@ -1709,33 +1705,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1709
1705
|
}, {
|
|
1710
1706
|
key: "_handleSpeakerRemoved",
|
|
1711
1707
|
value: function () {
|
|
1712
|
-
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1713
|
-
var
|
|
1708
|
+
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1709
|
+
var _this13 = this;
|
|
1714
1710
|
var currentDeviceExist;
|
|
1715
|
-
return _regenerator["default"].wrap(function
|
|
1716
|
-
while (1) switch (
|
|
1711
|
+
return _regenerator["default"].wrap(function (_context15) {
|
|
1712
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1717
1713
|
case 0:
|
|
1718
|
-
|
|
1714
|
+
_context15.next = 1;
|
|
1719
1715
|
return this._handleSpeakerListUpdated();
|
|
1720
|
-
case
|
|
1716
|
+
case 1:
|
|
1721
1717
|
// 如何设备移除了,应该切到跟随系统
|
|
1722
1718
|
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1723
|
-
return item.deviceId ===
|
|
1719
|
+
return item.deviceId === _this13._speakerDeviceId;
|
|
1724
1720
|
});
|
|
1725
1721
|
if (currentDeviceExist) {
|
|
1726
|
-
|
|
1722
|
+
_context15.next = 2;
|
|
1727
1723
|
break;
|
|
1728
1724
|
}
|
|
1729
1725
|
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1730
|
-
|
|
1726
|
+
_context15.next = 2;
|
|
1731
1727
|
return this.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1732
|
-
case
|
|
1728
|
+
case 2:
|
|
1733
1729
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1734
|
-
case
|
|
1730
|
+
case 3:
|
|
1735
1731
|
case "end":
|
|
1736
|
-
return
|
|
1732
|
+
return _context15.stop();
|
|
1737
1733
|
}
|
|
1738
|
-
},
|
|
1734
|
+
}, _callee15, this);
|
|
1739
1735
|
}));
|
|
1740
1736
|
function _handleSpeakerRemoved() {
|
|
1741
1737
|
return _handleSpeakerRemoved2.apply(this, arguments);
|
|
@@ -1745,24 +1741,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1745
1741
|
}, {
|
|
1746
1742
|
key: "_handleSpeakerListUpdated",
|
|
1747
1743
|
value: function () {
|
|
1748
|
-
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1749
|
-
var
|
|
1744
|
+
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
|
1745
|
+
var _this14 = this;
|
|
1750
1746
|
var speakerList;
|
|
1751
|
-
return _regenerator["default"].wrap(function
|
|
1752
|
-
while (1) switch (
|
|
1747
|
+
return _regenerator["default"].wrap(function (_context16) {
|
|
1748
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1753
1749
|
case 0:
|
|
1754
|
-
|
|
1750
|
+
_context16.next = 1;
|
|
1755
1751
|
return this._getSpeakerList();
|
|
1756
|
-
case
|
|
1757
|
-
speakerList =
|
|
1752
|
+
case 1:
|
|
1753
|
+
speakerList = _context16.sent;
|
|
1758
1754
|
(0, _mobx.runInAction)(function () {
|
|
1759
|
-
|
|
1755
|
+
_this14.speakerList = speakerList;
|
|
1760
1756
|
});
|
|
1761
|
-
case
|
|
1757
|
+
case 2:
|
|
1762
1758
|
case "end":
|
|
1763
|
-
return
|
|
1759
|
+
return _context16.stop();
|
|
1764
1760
|
}
|
|
1765
|
-
},
|
|
1761
|
+
}, _callee16, this);
|
|
1766
1762
|
}));
|
|
1767
1763
|
function _handleSpeakerListUpdated() {
|
|
1768
1764
|
return _handleSpeakerListUpdated2.apply(this, arguments);
|
|
@@ -1772,19 +1768,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1772
1768
|
}, {
|
|
1773
1769
|
key: "_getMicrophoneList",
|
|
1774
1770
|
value: function () {
|
|
1775
|
-
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1771
|
+
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
|
1776
1772
|
var defaultDevice, list, defaultIdDevice;
|
|
1777
|
-
return _regenerator["default"].wrap(function
|
|
1778
|
-
while (1) switch (
|
|
1773
|
+
return _regenerator["default"].wrap(function (_context17) {
|
|
1774
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1779
1775
|
case 0:
|
|
1780
|
-
|
|
1776
|
+
_context17.next = 1;
|
|
1781
1777
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1782
|
-
case
|
|
1783
|
-
defaultDevice =
|
|
1784
|
-
|
|
1778
|
+
case 1:
|
|
1779
|
+
defaultDevice = _context17.sent;
|
|
1780
|
+
_context17.next = 2;
|
|
1785
1781
|
return this._mediaControl.getMicrophoneList();
|
|
1786
|
-
case
|
|
1787
|
-
list =
|
|
1782
|
+
case 2:
|
|
1783
|
+
list = _context17.sent;
|
|
1788
1784
|
list.forEach(function (item) {
|
|
1789
1785
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1790
1786
|
if (results && results.length > 1) {
|
|
@@ -1815,12 +1811,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1815
1811
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1816
1812
|
});
|
|
1817
1813
|
}
|
|
1818
|
-
return
|
|
1819
|
-
case
|
|
1814
|
+
return _context17.abrupt("return", list);
|
|
1815
|
+
case 3:
|
|
1820
1816
|
case "end":
|
|
1821
|
-
return
|
|
1817
|
+
return _context17.stop();
|
|
1822
1818
|
}
|
|
1823
|
-
},
|
|
1819
|
+
}, _callee17, this);
|
|
1824
1820
|
}));
|
|
1825
1821
|
function _getMicrophoneList() {
|
|
1826
1822
|
return _getMicrophoneList2.apply(this, arguments);
|
|
@@ -1830,19 +1826,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1830
1826
|
}, {
|
|
1831
1827
|
key: "_getSpeakerList",
|
|
1832
1828
|
value: function () {
|
|
1833
|
-
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1829
|
+
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
|
1834
1830
|
var defaultDevice, list, defaultIdDevice;
|
|
1835
|
-
return _regenerator["default"].wrap(function
|
|
1836
|
-
while (1) switch (
|
|
1831
|
+
return _regenerator["default"].wrap(function (_context18) {
|
|
1832
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1837
1833
|
case 0:
|
|
1838
|
-
|
|
1834
|
+
_context18.next = 1;
|
|
1839
1835
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1840
|
-
case
|
|
1841
|
-
defaultDevice =
|
|
1842
|
-
|
|
1836
|
+
case 1:
|
|
1837
|
+
defaultDevice = _context18.sent;
|
|
1838
|
+
_context18.next = 2;
|
|
1843
1839
|
return this._mediaControl.getSpeakerList();
|
|
1844
|
-
case
|
|
1845
|
-
list =
|
|
1840
|
+
case 2:
|
|
1841
|
+
list = _context18.sent;
|
|
1846
1842
|
list.forEach(function (item) {
|
|
1847
1843
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1848
1844
|
if (results && results.length > 1) {
|
|
@@ -1872,12 +1868,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1872
1868
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1873
1869
|
});
|
|
1874
1870
|
}
|
|
1875
|
-
return
|
|
1876
|
-
case
|
|
1871
|
+
return _context18.abrupt("return", list);
|
|
1872
|
+
case 3:
|
|
1877
1873
|
case "end":
|
|
1878
|
-
return
|
|
1874
|
+
return _context18.stop();
|
|
1879
1875
|
}
|
|
1880
|
-
},
|
|
1876
|
+
}, _callee18, this);
|
|
1881
1877
|
}));
|
|
1882
1878
|
function _getSpeakerList() {
|
|
1883
1879
|
return _getSpeakerList2.apply(this, arguments);
|
|
@@ -1892,10 +1888,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1892
1888
|
}, {
|
|
1893
1889
|
key: "_getDefaultDeviceId",
|
|
1894
1890
|
value: function _getDefaultDeviceId(_ref6) {
|
|
1891
|
+
var _this$_userSettingSto2;
|
|
1895
1892
|
var initValue = _ref6.initValue,
|
|
1896
1893
|
localKey = _ref6.localKey,
|
|
1897
1894
|
list = _ref6.list;
|
|
1898
|
-
var localSetting = this.
|
|
1895
|
+
var localSetting = (_this$_userSettingSto2 = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto2 === void 0 ? void 0 : _this$_userSettingSto2.setting;
|
|
1899
1896
|
var defaultValue = initValue;
|
|
1900
1897
|
if (localSetting && localSetting[localKey]) {
|
|
1901
1898
|
var _list$find$deviceId, _list$find;
|
|
@@ -1908,17 +1905,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1908
1905
|
}, {
|
|
1909
1906
|
key: "_loadBuiltinResources",
|
|
1910
1907
|
value: function () {
|
|
1911
|
-
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1908
|
+
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
|
1912
1909
|
var _window$runtime,
|
|
1913
|
-
|
|
1910
|
+
_this15 = this;
|
|
1914
1911
|
var _yield$window$runtime, virtualBackgroundImages, virtualBackgroundVideos, soundEffects, newVirtualBackgroundList, images, videos, sounds;
|
|
1915
|
-
return _regenerator["default"].wrap(function
|
|
1916
|
-
while (1) switch (
|
|
1912
|
+
return _regenerator["default"].wrap(function (_context19) {
|
|
1913
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1917
1914
|
case 0:
|
|
1918
|
-
|
|
1915
|
+
_context19.next = 1;
|
|
1919
1916
|
return (_window$runtime = window.runtime) === null || _window$runtime === void 0 ? void 0 : _window$runtime.loadBuiltinResources();
|
|
1920
|
-
case
|
|
1921
|
-
_yield$window$runtime =
|
|
1917
|
+
case 1:
|
|
1918
|
+
_yield$window$runtime = _context19.sent;
|
|
1922
1919
|
virtualBackgroundImages = _yield$window$runtime.virtualBackgroundImages;
|
|
1923
1920
|
virtualBackgroundVideos = _yield$window$runtime.virtualBackgroundVideos;
|
|
1924
1921
|
soundEffects = _yield$window$runtime.soundEffects;
|
|
@@ -1951,16 +1948,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1951
1948
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(images);
|
|
1952
1949
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(videos);
|
|
1953
1950
|
(0, _mobx.runInAction)(function () {
|
|
1954
|
-
|
|
1951
|
+
_this15._updateVirtualBackgroundList(newVirtualBackgroundList);
|
|
1955
1952
|
sounds.forEach(function (item) {
|
|
1956
|
-
|
|
1953
|
+
_this15.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1957
1954
|
});
|
|
1958
1955
|
});
|
|
1959
|
-
case
|
|
1956
|
+
case 2:
|
|
1960
1957
|
case "end":
|
|
1961
|
-
return
|
|
1958
|
+
return _context19.stop();
|
|
1962
1959
|
}
|
|
1963
|
-
},
|
|
1960
|
+
}, _callee19, this);
|
|
1964
1961
|
}));
|
|
1965
1962
|
function _loadBuiltinResources() {
|
|
1966
1963
|
return _loadBuiltinResources2.apply(this, arguments);
|