fcr-ui-scene 3.6.4 → 3.7.1
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/creator.d.ts +4 -3
- package/lib/creator.js +146 -111
- package/lib/electron/app.js +1 -1
- package/lib/electron/bootstrap-sdk.js +49 -4
- package/lib/electron/injections.d.ts +5 -1
- package/lib/electron/injections.js +14 -2
- package/lib/electron/ipc/type.d.ts +8 -4
- package/lib/electron/ipc/type.js +10 -4
- package/lib/electron/logger.js +1 -1
- package/lib/electron/main.js +5 -2
- package/lib/electron/preload.js +34 -5
- package/lib/fragments/annotation/index.d.ts +2 -2
- package/lib/fragments/annotation/index.js +38 -28
- package/lib/fragments/annotation/libs.d.ts +2 -2
- package/lib/fragments/annotation/store.d.ts +21 -4
- package/lib/fragments/annotation/store.js +281 -84
- package/lib/fragments/annotation/style.css +9 -0
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.js +1 -1
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.js +1 -1
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.d.ts +26 -2
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.js +57 -8
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.js +36 -3
- package/lib/fragments/annotation/view.d.ts +1 -0
- package/lib/fragments/annotation/view.js +52 -10
- package/lib/modules/action-bar/components/apps/index.js +54 -38
- package/lib/modules/action-bar/components/chat/index.js +13 -34
- package/lib/modules/action-bar/components/collapse/index.js +1 -1
- package/lib/modules/action-bar/components/leave/index.js +9 -9
- package/lib/modules/action-bar/components/more/index.js +26 -27
- package/lib/modules/action-bar/components/participants/index.js +23 -39
- package/lib/modules/action-bar/components/record/index.js +7 -13
- package/lib/modules/action-bar/components/screen-share/index.js +4 -24
- package/lib/modules/action-bar/components/security/index.js +29 -34
- package/lib/modules/action-bar/components/settings/index.js +13 -19
- package/lib/modules/action-bar/index.d.ts +4 -0
- package/lib/modules/action-bar/index.js +3 -1
- package/lib/modules/action-bar/store.d.ts +16 -6
- package/lib/modules/action-bar/store.js +63 -25
- package/lib/modules/action-bar/types.d.ts +3 -3
- package/lib/modules/action-bar/view.js +2 -3
- package/lib/modules/annotation/annotation-index.d.ts +2 -0
- package/lib/modules/annotation/annotation-index.js +80 -0
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +82 -0
- package/lib/modules/annotation/annotation-toolbar-store.js +501 -0
- package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/annotation/components/color-picker/components/color.js +38 -0
- package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/panel.js +109 -0
- package/lib/modules/annotation/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/picker.js +75 -0
- package/lib/modules/annotation/components/color-picker/index.d.ts +2 -0
- package/lib/modules/annotation/components/color-picker/index.js +47 -0
- package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
- package/lib/modules/annotation/components/eraser-picker.js +144 -0
- package/lib/modules/annotation/components/expansion/index.d.ts +1 -0
- package/lib/modules/annotation/components/expansion/index.js +100 -0
- package/lib/modules/annotation/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/annotation/components/extra-tool-picker.js +62 -0
- package/lib/modules/annotation/components/history.d.ts +2 -0
- package/lib/modules/annotation/components/history.js +78 -0
- package/lib/modules/annotation/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/annotation/components/icons/fold-icon.js +41 -0
- package/lib/modules/annotation/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/annotation/components/icons/move-icon.js +66 -0
- package/lib/modules/annotation/components/item/index.d.ts +1 -0
- package/lib/modules/annotation/components/item/index.js +43 -0
- package/lib/modules/annotation/components/move-handle.d.ts +5 -0
- package/lib/modules/annotation/components/move-handle.js +134 -0
- package/lib/modules/annotation/components/pen-picker.d.ts +4 -0
- package/lib/modules/annotation/components/pen-picker.js +155 -0
- package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
- package/lib/modules/annotation/components/screen-capture-picker.js +85 -0
- package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
- package/lib/modules/annotation/components/shape-picker.js +210 -0
- package/lib/modules/annotation/hooks/index.d.ts +14 -0
- package/lib/modules/annotation/hooks/index.js +292 -0
- package/lib/modules/annotation/index.d.ts +4 -1
- package/lib/modules/annotation/index.js +20 -22
- package/lib/modules/annotation/store.d.ts +59 -18
- package/lib/modules/annotation/store.js +503 -263
- package/lib/modules/annotation/style.css +10 -0
- package/lib/modules/annotation/view.js +9 -11
- package/lib/modules/chat/chat-room-store.js +5 -2
- package/lib/modules/chat/components/chat-select/index.js +1 -1
- package/lib/modules/chat/components/chat-select/select-item/index.js +10 -3
- package/lib/modules/chat/components/message-list/message-item/index.js +4 -2
- package/lib/modules/chat/index.d.ts +2 -0
- package/lib/modules/chat/index.js +13 -3
- package/lib/modules/chat/store.d.ts +3 -0
- package/lib/modules/chat/store.js +12 -6
- package/lib/modules/chat/types.d.ts +1 -0
- package/lib/modules/chat/types.js +2 -1
- package/lib/modules/chat/util.js +2 -1
- package/lib/modules/chat/view.js +6 -3
- package/lib/modules/{action-bar/components → components}/apps/app-item/index.d.ts +1 -1
- package/lib/modules/components/apps/app-list.d.ts +3 -0
- package/lib/modules/{action-bar/components → components}/apps/app-list.js +2 -4
- package/lib/modules/components/apps/types.d.ts +14 -0
- package/lib/modules/components/apps/types.js +6 -0
- package/lib/modules/components/device-control/components/carmera/index.js +71 -68
- package/lib/modules/components/device-control/components/microphone/index.js +99 -97
- package/lib/modules/components/device-control/store.d.ts +1 -1
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +7 -7
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -7
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +19 -36
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +1 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +9 -2
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +0 -3
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +15 -11
- package/lib/modules/components/member-window/components/member-actions/index.js +10 -2
- package/lib/modules/components/member-window/components/member-actions/libs/index.js +2 -2
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +12 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +75 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +1 -7
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +7 -47
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +12 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +68 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +1 -9
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +7 -49
- package/lib/modules/components/member-window/components/video-player/components/zoomable-container.d.ts +15 -0
- package/lib/modules/components/member-window/components/video-player/components/zoomable-container.js +255 -0
- 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 +8 -2
- package/lib/modules/components/member-window/index.css +16 -6
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +12 -4
- package/lib/modules/components/member-window/types.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +6 -5
- package/lib/modules/control-bar/components/annotation-button/index.js +21 -8
- package/lib/modules/control-bar/components/more-actions/index.css +13 -0
- package/lib/modules/control-bar/components/more-actions/index.js +1 -1
- package/lib/modules/control-bar/components/share-audio/index.css +90 -0
- package/lib/modules/control-bar/components/share-audio/index.d.ts +15 -0
- package/lib/modules/control-bar/components/share-audio/index.js +173 -0
- package/lib/modules/control-bar/components/share-state-nav/index.css +5 -0
- package/lib/modules/control-bar/components/share-state-nav/index.js +14 -2
- package/lib/modules/control-bar/index.d.ts +2 -0
- package/lib/modules/control-bar/index.js +9 -1
- package/lib/modules/control-bar/store.d.ts +16 -7
- package/lib/modules/control-bar/store.js +36 -12
- package/lib/modules/control-bar/view.d.ts +4 -0
- package/lib/modules/control-bar/view.js +180 -90
- package/lib/modules/device-pretest/store.d.ts +1 -1
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -1
- package/lib/modules/dialog/components/dialog-container/index.css +1 -0
- package/lib/modules/dialog/components/dialog-container/index.d.ts +2 -1
- package/lib/modules/dialog/components/dialog-container/index.js +27 -10
- package/lib/modules/dialog/components/host-area-container/index.js +4 -4
- package/lib/modules/dialog/components/normal-window/index.d.ts +19 -0
- package/lib/modules/dialog/components/normal-window/index.js +69 -0
- package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.js +17 -15
- package/lib/modules/dialog/dialogs/chat/components/actions.d.ts +1 -0
- package/lib/modules/dialog/dialogs/chat/components/actions.js +33 -0
- package/lib/modules/dialog/{components → dialogs}/chat/index.d.ts +1 -1
- package/lib/modules/dialog/dialogs/chat/index.js +59 -0
- package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +6 -0
- package/lib/modules/dialog/{components → dialogs}/confirm-leave-meeting/index.js +13 -37
- package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.js +19 -12
- package/lib/modules/dialog/{components → dialogs}/control-bar/index.js +2 -2
- package/lib/modules/dialog/{components → dialogs}/device-setting/index.js +20 -13
- package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +12 -0
- package/lib/modules/dialog/dialogs/end-meeting/index.js +45 -0
- package/lib/modules/dialog/{components/interpreter/electron.js → dialogs/interpreter/index.js} +17 -11
- package/lib/modules/dialog/dialogs/invite/index.d.ts +3 -0
- package/lib/modules/dialog/{components → dialogs}/invite/index.js +9 -25
- package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +2 -0
- package/lib/modules/dialog/{components → dialogs}/live-streaming/index.js +11 -34
- package/lib/modules/dialog/dialogs/participant/components/actions.d.ts +1 -0
- package/lib/modules/dialog/dialogs/participant/components/actions.js +32 -0
- package/lib/modules/dialog/dialogs/participant/components/title.d.ts +1 -0
- package/lib/modules/dialog/dialogs/participant/components/title.js +19 -0
- package/lib/modules/dialog/dialogs/participant/index.d.ts +2 -0
- package/lib/modules/dialog/dialogs/participant/index.js +53 -0
- package/lib/modules/dialog/dialogs/pre-setting/index.js +62 -0
- package/lib/modules/dialog/dialogs/rename/index.js +35 -0
- package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/{components → dialogs}/video-window/index.js +11 -8
- package/lib/modules/dialog/{components → dialogs}/whiteboard/index.js +2 -3
- package/lib/modules/dialog/{components → dialogs}/widget/electron.js +1 -1
- package/lib/modules/dialog/{components → dialogs}/widget/index.js +1 -1
- package/lib/modules/dialog/hooks/use-web-drag.d.ts +8 -0
- package/lib/modules/dialog/hooks/use-web-drag.js +73 -0
- package/lib/modules/dialog/hooks/useElectron.d.ts +2 -7
- package/lib/modules/dialog/hooks/useElectron.js +46 -156
- package/lib/modules/dialog/index.d.ts +4 -0
- package/lib/modules/dialog/index.js +4 -2
- package/lib/modules/dialog/level-config.d.ts +11 -0
- package/lib/modules/dialog/level-config.js +21 -0
- package/lib/modules/dialog/store.d.ts +15 -6
- package/lib/modules/dialog/store.js +40 -54
- package/lib/modules/dialog/type.d.ts +15 -12
- package/lib/modules/event-confirm/components/window/index.d.ts +1 -4
- package/lib/modules/event-confirm/components/window/index.js +34 -23
- package/lib/modules/event-confirm/index.d.ts +2 -0
- package/lib/modules/event-confirm/index.js +3 -2
- package/lib/modules/event-confirm/store.d.ts +9 -1
- package/lib/modules/event-confirm/store.js +24 -16
- package/lib/modules/event-confirm/view.js +11 -22
- package/lib/modules/event-sound/index.d.ts +2 -0
- package/lib/modules/event-sound/index.js +8 -1
- package/lib/modules/event-toast/index.css +10 -0
- package/lib/modules/event-toast/store.d.ts +1 -1
- package/lib/modules/event-toast/store.js +17 -15
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +4 -2
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +2 -1
- package/lib/modules/interpreter/store.d.ts +1 -0
- package/lib/modules/interpreter/store.js +12 -5
- package/lib/modules/interpreter/view.js +7 -1
- package/lib/modules/layout/components/Aside.js +4 -0
- package/lib/modules/layout/components/Carousel.js +3 -1
- package/lib/modules/layout/components/CommonVideoRenderer.d.ts +3 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +13 -9
- package/lib/modules/layout/components/Gallery.js +11 -3
- package/lib/modules/layout/index.css +1 -0
- package/lib/modules/layout/index.d.ts +2 -0
- package/lib/modules/layout/index.js +4 -3
- package/lib/modules/layout/store.d.ts +9 -5
- package/lib/modules/layout/store.js +38 -46
- package/lib/modules/participant/components/confirm-input/index.css +4 -0
- package/lib/modules/participant/components/confirm-input/index.d.ts +1 -0
- package/lib/modules/participant/components/confirm-input/index.js +2 -1
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +2 -1
- package/lib/modules/participant/components/participants/components/participants/index.js +11 -3
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +7 -3
- package/lib/modules/participant/components/participants/types.d.ts +1 -0
- package/lib/modules/participant/store.d.ts +2 -1
- package/lib/modules/participant/store.js +23 -9
- package/lib/modules/phone-audio-connect/store.d.ts +4 -4
- package/lib/modules/setting/audio-settings/audio-settings.js +6 -17
- package/lib/modules/setting/config.d.ts +16 -0
- package/lib/modules/setting/config.js +17 -1
- package/lib/modules/setting/index.d.ts +2 -4
- package/lib/modules/setting/index.js +7 -16
- package/lib/modules/setting/minutes-settings/minutes-settings.js +0 -4
- package/lib/modules/setting/state/index.js +5 -5
- package/lib/modules/setting/store.d.ts +37 -33
- package/lib/modules/setting/store.js +275 -261
- package/lib/modules/setting/translate-settings/language-select.js +0 -2
- package/lib/modules/setting/video-settings/video-settings-basic.js +6 -6
- package/lib/modules/setting/video-settings/video-settings.js +2 -2
- package/lib/modules/setting/view.js +1 -1
- package/lib/modules/share-screen/components/control-bar/index.css +75 -0
- package/lib/modules/share-screen/components/control-bar/index.d.ts +3 -0
- package/lib/modules/share-screen/components/control-bar/index.js +88 -0
- package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.d.ts +8 -0
- package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.js +46 -0
- package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.js +32 -0
- package/lib/modules/share-screen/components/selection/index.js +28 -14
- package/lib/modules/share-screen/components/share-scenario/index.d.ts +5 -0
- package/lib/modules/share-screen/components/share-scenario/index.js +47 -0
- package/lib/modules/share-screen/index.d.ts +4 -2
- package/lib/modules/share-screen/index.js +11 -2
- package/lib/modules/share-screen/store.d.ts +32 -11
- package/lib/modules/share-screen/store.js +273 -192
- package/lib/modules/share-screen/view.js +2 -2
- package/lib/modules/state-bar/index.js +2 -3
- package/lib/modules/state-bar/layout-config.d.ts +2 -4
- package/lib/modules/state-bar/layout-config.js +10 -5
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/store.d.ts +7 -7
- package/lib/modules/state-bar/store.js +17 -15
- package/lib/modules/state-bar/view.js +19 -23
- package/lib/modules/video-window/components/members/index.js +3 -2
- package/lib/modules/video-window/index.js +0 -3
- package/lib/modules/waiting-room-layout/index.css +3 -3
- package/lib/modules/waiting-room-layout/index.js +2 -2
- package/lib/modules/waiting-room-layout/view.js +1 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +4 -4
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +0 -14
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +4 -155
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +4 -2
- package/lib/modules/whiteboard/components/toolbar/store.js +37 -25
- package/lib/modules/whiteboard/components/toolbar/style.css +1 -0
- package/lib/modules/whiteboard/index.d.ts +3 -1
- package/lib/modules/whiteboard/index.js +26 -23
- package/lib/modules/widget/view.js +4 -0
- package/lib/providers/ability-provider.d.ts +2 -0
- package/lib/providers/annotation-provider.d.ts +43 -47
- package/lib/providers/annotation-provider.js +94 -142
- package/lib/providers/app-list-provider.d.ts +98 -0
- package/lib/providers/app-list-provider.js +251 -0
- package/lib/providers/device-provider.d.ts +31 -23
- package/lib/providers/device-provider.js +495 -444
- package/lib/providers/device-stream-provider.js +2 -2
- package/lib/providers/event-provider.d.ts +0 -4
- package/lib/providers/event-provider.js +0 -10
- package/lib/providers/interpreter-provider.js +10 -7
- package/lib/providers/privilege-provider.d.ts +1 -1
- package/lib/providers/privilege-provider.js +3 -2
- package/lib/providers/renderer-provider.d.ts +1 -0
- package/lib/providers/renderer-provider.js +7 -2
- package/lib/providers/room-provider.d.ts +5 -1
- package/lib/providers/room-provider.js +44 -16
- package/lib/providers/screen-share-provider.d.ts +73 -17
- package/lib/providers/screen-share-provider.js +222 -100
- package/lib/providers/sharing-provider.d.ts +0 -1
- package/lib/providers/sharing-provider.js +3 -9
- package/lib/providers/user-setting-storage-provider.d.ts +1 -0
- package/lib/providers/user-setting-storage-provider.js +5 -12
- package/lib/providers/widget-provider.d.ts +19 -0
- package/lib/providers/widget-provider.js +28 -2
- package/lib/runtime.d.ts +10 -1
- package/lib/scenes/main-scene.d.ts +12 -2
- package/lib/scenes/main-scene.js +54 -28
- package/lib/scenes/waiting-scene.d.ts +11 -0
- package/lib/scenes/waiting-scene.js +34 -8
- package/lib/schema.d.ts +6 -0
- package/lib/schema.js +5 -1
- package/lib/shared-data-source/annotation-data.d.ts +17 -0
- package/lib/shared-data-source/annotation-data.js +110 -0
- package/lib/shared-data-source/app-list-data.d.ts +34 -0
- package/lib/shared-data-source/app-list-data.js +133 -0
- package/lib/shared-data-source/config.d.ts +26 -7
- package/lib/shared-data-source/config.js +29 -11
- package/lib/shared-data-source/confirm-data.d.ts +25 -0
- package/lib/shared-data-source/confirm-data.js +97 -0
- package/lib/shared-data-source/interpreter.d.ts +1 -0
- package/lib/shared-data-source/layout-data.d.ts +2 -0
- package/lib/shared-data-source/layout-data.js +14 -3
- package/lib/shared-data-source/meeting-time.d.ts +23 -1
- package/lib/shared-data-source/meeting-time.js +160 -43
- package/lib/shared-data-source/member-data.d.ts +10 -9
- package/lib/shared-data-source/member-data.js +55 -48
- package/lib/shared-data-source/screen-share-data.d.ts +100 -17
- package/lib/shared-data-source/screen-share-data.js +142 -22
- package/lib/shared-data-source/setting.d.ts +36 -4
- package/lib/shared-data-source/setting.js +92 -57
- package/lib/shared-data-source/video-window.d.ts +3 -0
- package/lib/shared-data-source/video-window.js +52 -30
- package/lib/shared-data-source/waiting-room.js +4 -2
- package/lib/translations/enUS.d.ts +62 -7
- package/lib/translations/enUS.js +71 -14
- package/lib/translations/zhCN.d.ts +62 -7
- package/lib/translations/zhCN.js +73 -16
- package/lib/type.d.ts +23 -5
- package/lib/type.js +6 -2
- package/lib/ui-manager.d.ts +5 -16
- package/lib/ui-manager.js +15 -57
- package/lib/ui-scene.d.ts +31 -6
- package/lib/ui-scene.js +180 -169
- package/lib/utilities/constant.d.ts +67 -63
- package/lib/utilities/constant.js +65 -61
- package/lib/utilities/dialog-utils.d.ts +66 -0
- package/lib/utilities/dialog-utils.js +188 -0
- package/lib/utilities/logger.js +3 -3
- package/lib/utilities/meeting-detail.js +1 -1
- package/lib/utilities/parameters.d.ts +1 -0
- package/lib/utilities/parameters.js +5 -1
- package/lib/utilities/renderer-event.d.ts +1 -1
- package/lib/utilities/screen-capture-permission.d.ts +1 -0
- package/lib/utilities/screen-capture-permission.js +9 -1
- package/lib/utilities/tools.d.ts +0 -66
- package/lib/utilities/tools.js +9 -186
- package/package.json +5 -6
- package/public/index.html +11 -1
- package/lib/modules/action-bar/components/apps/app-list.d.ts +0 -3
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +0 -17
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -30
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +0 -10
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +0 -36
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +0 -14
- package/lib/modules/action-bar/components/apps/useInterpreter.js +0 -37
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +0 -16
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +0 -41
- package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +0 -10
- package/lib/modules/action-bar/components/apps/useWidgetList.js +0 -39
- package/lib/modules/annotation/components/control-bar/index.css +0 -48
- package/lib/modules/annotation/components/control-bar/index.d.ts +0 -3
- package/lib/modules/annotation/components/control-bar/index.js +0 -142
- package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
- package/lib/modules/annotation/components/toolbar/index.js +0 -1
- package/lib/modules/dialog/components/chat/electron.d.ts +0 -2
- package/lib/modules/dialog/components/chat/electron.js +0 -35
- package/lib/modules/dialog/components/chat/index.js +0 -67
- package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +0 -6
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +0 -5
- package/lib/modules/dialog/components/connection-gateway/electron.js +0 -33
- package/lib/modules/dialog/components/device-setting/electron.d.ts +0 -2
- package/lib/modules/dialog/components/device-setting/electron.js +0 -37
- package/lib/modules/dialog/components/interpreter/electron.d.ts +0 -2
- package/lib/modules/dialog/components/interpreter/index.js +0 -33
- package/lib/modules/dialog/components/invite/index.d.ts +0 -3
- package/lib/modules/dialog/components/live-streaming/index.d.ts +0 -4
- package/lib/modules/dialog/components/participant/electron.d.ts +0 -2
- package/lib/modules/dialog/components/participant/electron.js +0 -35
- package/lib/modules/dialog/components/participant/index.d.ts +0 -2
- package/lib/modules/dialog/components/participant/index.js +0 -65
- package/lib/modules/dialog/components/pre-setting/electron.d.ts +0 -2
- package/lib/modules/dialog/components/pre-setting/electron.js +0 -51
- package/lib/modules/dialog/components/pre-setting/index.js +0 -38
- package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +0 -8
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -78
- package/lib/modules/dialog/components/pre-setting-container/index.css +0 -82
- package/lib/modules/dialog/components/pre-setting-container/index.d.ts +0 -18
- package/lib/modules/dialog/components/pre-setting-container/index.js +0 -116
- package/lib/modules/dialog/components/rename/index.js +0 -72
- package/lib/modules/dialog/dialogs.d.ts +0 -3
- package/lib/modules/dialog/dialogs.js +0 -28
- package/lib/utilities/setting-config-storage.d.ts +0 -18
- package/lib/utilities/setting-config-storage.js +0 -133
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.d.ts +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/app-item/index.css +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/app-item/index.js +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/confirm/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/confirm/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/control-bar/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/device-setting/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/device-setting/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/interpreter/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/interpreter/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/rename/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg1.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg2.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/fcr_png_host.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/toast/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/toast/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/video-window/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/whiteboard/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/widget/electron.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/widget/index.d.ts +0 -0
|
@@ -114,7 +114,7 @@ var _type2 = require("../type");
|
|
|
114
114
|
var _tools = require("../utilities/tools");
|
|
115
115
|
var _logger = require("../utilities/logger");
|
|
116
116
|
var _FcrUIDeviceProviderImpl;
|
|
117
|
-
var _initProto,
|
|
117
|
+
var _initProto, _init__microphoneDevice, _init__microphone, _init__speakerDevice, _init__speaker, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _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, _initDeviceListDecs, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _handleSpeakerDetectingChangedDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _handleMicrophoneAudioTrackDecs, _setMicrophoneEnabledDecs, _handleMicrophoneEnabledChangedDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _handleMicrophoneDetectingChangedDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _loadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSystemSelectedSpeakerChangedDecs, _handleSystemSelectedMicrophoneChangedDecs, _correctSystemSelectedMicrophoneDeviceIdDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
|
|
118
118
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
119
119
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
120
120
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -156,19 +156,20 @@ var _Z = /*#__PURE__*/new WeakMap();
|
|
|
156
156
|
var _a = /*#__PURE__*/new WeakMap();
|
|
157
157
|
var _b = /*#__PURE__*/new WeakMap();
|
|
158
158
|
var _c = /*#__PURE__*/new WeakMap();
|
|
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");
|
|
159
|
+
_ref = (_initDeviceListDecs = [_mobx.action, _mobx.action.bound], _startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerDetectingChangedDecs = [_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], _handleMicrophoneAudioTrackDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneEnabledChangedDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneDetectingChangedDecs = [_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], _handleSystemSelectedSpeakerChangedDecs = [_mobx.action, _mobx.action.bound], _handleSystemSelectedMicrophoneChangedDecs = [_mobx.action, _mobx.action.bound], _correctSystemSelectedMicrophoneDeviceIdDecs = [_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");
|
|
160
160
|
var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
|
|
161
|
-
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl,
|
|
161
|
+
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _sharedSettingDataSource) {
|
|
162
162
|
var _this = this;
|
|
163
163
|
(0, _classCallCheck2["default"])(this, FcrUIDeviceProviderImpl);
|
|
164
164
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
165
165
|
prefix: 'FcrUIDeviceProviderImpl'
|
|
166
166
|
})));
|
|
167
167
|
(0, _defineProperty2["default"])(this, "_observable", new _imports.AgoraObservable());
|
|
168
|
-
(0, _defineProperty2["default"])(this, "
|
|
168
|
+
(0, _defineProperty2["default"])(this, "_disposer", []);
|
|
169
169
|
(0, _defineProperty2["default"])(this, "_hasExecutedOpenCamera", false);
|
|
170
170
|
(0, _defineProperty2["default"])(this, "_hasExecutedConnectAudio", false);
|
|
171
171
|
(0, _defineProperty2["default"])(this, "_isAudioConnected", false);
|
|
172
|
+
(0, _defineProperty2["default"])(this, "_microphoneAudioTrack", null);
|
|
172
173
|
(0, _defineProperty2["default"])(this, "_localVideoViewSet", new Set());
|
|
173
174
|
(0, _defineProperty2["default"])(this, "_videoRotation", _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0);
|
|
174
175
|
// 强制开启美颜
|
|
@@ -181,22 +182,44 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
181
182
|
(0, _defineProperty2["default"])(this, "_microphoneObserver", {
|
|
182
183
|
onVolumeIndicationUpdated: this._handleMicrophoneVolumeIndicationUpdated
|
|
183
184
|
});
|
|
185
|
+
(0, _defineProperty2["default"])(this, "_mediaControlObserver", {
|
|
186
|
+
onCameraAdded: this._handleCameraListUpdated,
|
|
187
|
+
onCameraRemoved: this._handleCameraListUpdated,
|
|
188
|
+
onMicrophoneAdded: this._handleMicrophoneAdded,
|
|
189
|
+
onMicrophoneRemoved: this._handleMicrophoneRemoved,
|
|
190
|
+
onSpeakerAdded: this._handleSpeakerAdded,
|
|
191
|
+
onSpeakerRemoved: this._handleSpeakerRemoved,
|
|
192
|
+
onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
|
|
193
|
+
onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated,
|
|
194
|
+
onSystemSelectedSpeakerChanged: this._handleSystemSelectedSpeakerChanged,
|
|
195
|
+
onSystemSelectedMicrophoneChanged: this._handleSystemSelectedMicrophoneChanged
|
|
196
|
+
});
|
|
184
197
|
(0, _defineProperty2["default"])(this, "_defaultMirror", true);
|
|
185
198
|
(0, _defineProperty2["default"])(this, "_volumeIndicationInterval", 200);
|
|
186
199
|
// real microphone device id
|
|
187
|
-
_classPrivateFieldInitSpec(this, _A,
|
|
200
|
+
_classPrivateFieldInitSpec(this, _A, _init__microphoneDevice(this, {
|
|
201
|
+
id: null
|
|
202
|
+
}));
|
|
203
|
+
_classPrivateFieldInitSpec(this, _B, _init__microphone(this, {
|
|
204
|
+
id: DEFAULT_DEVICE_ID
|
|
205
|
+
}));
|
|
188
206
|
// real speaker device id
|
|
189
|
-
|
|
207
|
+
// @observable private accessor _speakerDeviceId = '';
|
|
208
|
+
_classPrivateFieldInitSpec(this, _C, _init__speakerDevice(this, {
|
|
209
|
+
id: null
|
|
210
|
+
}));
|
|
211
|
+
_classPrivateFieldInitSpec(this, _D, _init__speaker(this, {
|
|
212
|
+
id: DEFAULT_DEVICE_ID
|
|
213
|
+
}));
|
|
190
214
|
// 是否开启镜像
|
|
191
|
-
_classPrivateFieldInitSpec(this,
|
|
215
|
+
_classPrivateFieldInitSpec(this, _E, _init_currentIsMirror(this, true));
|
|
192
216
|
// 是否展示展示强制开启特效弹窗
|
|
193
|
-
_classPrivateFieldInitSpec(this,
|
|
217
|
+
_classPrivateFieldInitSpec(this, _F, _init_showForceOpenEffectDialog(this, false));
|
|
194
218
|
// selected camera id, it is the real device id
|
|
195
|
-
_classPrivateFieldInitSpec(this,
|
|
219
|
+
_classPrivateFieldInitSpec(this, _G, _init_cameraId(this, ''));
|
|
196
220
|
// selected microphone id, for ui display, could be 'default' or real device id
|
|
197
|
-
_classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, 'default'));
|
|
198
221
|
// selected speaker id, for ui display, could be 'default' or real device id
|
|
199
|
-
|
|
222
|
+
// @observable accessor speakerId = DEFAULT_DEVICE_ID;
|
|
200
223
|
_classPrivateFieldInitSpec(this, _H, _init_cameraEnabled(this, false));
|
|
201
224
|
_classPrivateFieldInitSpec(this, _I, _init_showCameraPreview(this, false));
|
|
202
225
|
_classPrivateFieldInitSpec(this, _J, _init_microphoneEnabled(this, false));
|
|
@@ -227,27 +250,31 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
227
250
|
_classPrivateFieldInitSpec(this, _c, _init_isMainRoomAudioOff(this, false));
|
|
228
251
|
this._eventProvider = _eventProvider;
|
|
229
252
|
this._mediaControl = _mediaControl;
|
|
230
|
-
this.
|
|
231
|
-
this.
|
|
232
|
-
this._listeners.push((0, _mobx.reaction)(function () {
|
|
253
|
+
this._sharedSettingDataSource = _sharedSettingDataSource;
|
|
254
|
+
this._disposer.push((0, _mobx.reaction)(function () {
|
|
233
255
|
return _this.cameraId;
|
|
234
|
-
}, this._handleCameraChanged))
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
})
|
|
256
|
+
}, this._handleCameraChanged), (0, _mobx.reaction)(function () {
|
|
257
|
+
return _this.microphoneEnabled;
|
|
258
|
+
}, this._handleMicrophoneEnabledChanged), (0, _mobx.reaction)(function () {
|
|
259
|
+
return _this._microphone;
|
|
260
|
+
}, this._handleMicrophoneIdChanged), (0, _mobx.reaction)(function () {
|
|
261
|
+
return _this._microphoneDevice;
|
|
262
|
+
}, this._handleMicrophoneDeviceIdChanged), (0, _mobx.reaction)(function () {
|
|
263
|
+
return _this._speaker;
|
|
264
|
+
}, this._handleSpeakerIdChanged), (0, _mobx.reaction)(function () {
|
|
265
|
+
return _this._speakerDevice;
|
|
266
|
+
}, this._handleSpeakerDeviceIdChanged), (0, _mobx.reaction)(function () {
|
|
267
|
+
return _this.speakerDetecting;
|
|
268
|
+
}, this._handleSpeakerDetectingChanged), (0, _mobx.reaction)(function () {
|
|
269
|
+
return _this.microphoneDetecting;
|
|
270
|
+
}, this._handleMicrophoneDetectingChanged));
|
|
271
|
+
this._mediaControl.addObserver(this._mediaControlObserver);
|
|
245
272
|
(0, _mobx.runInAction)(function () {
|
|
246
273
|
_this.speakerVolume = _this._mediaControl.getSelectedSpeakerVolume();
|
|
247
274
|
});
|
|
248
275
|
}
|
|
249
276
|
return (0, _createClass2["default"])(FcrUIDeviceProviderImpl, [{
|
|
250
|
-
key: "
|
|
277
|
+
key: "_microphoneDevice",
|
|
251
278
|
get: function get() {
|
|
252
279
|
return _classPrivateFieldGet(_A, this);
|
|
253
280
|
},
|
|
@@ -255,7 +282,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
255
282
|
_classPrivateFieldSet(_A, this, v);
|
|
256
283
|
}
|
|
257
284
|
}, {
|
|
258
|
-
key: "
|
|
285
|
+
key: "_microphone",
|
|
259
286
|
get: function get() {
|
|
260
287
|
return _classPrivateFieldGet(_B, this);
|
|
261
288
|
},
|
|
@@ -263,7 +290,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
263
290
|
_classPrivateFieldSet(_B, this, v);
|
|
264
291
|
}
|
|
265
292
|
}, {
|
|
266
|
-
key: "
|
|
293
|
+
key: "_speakerDevice",
|
|
267
294
|
get: function get() {
|
|
268
295
|
return _classPrivateFieldGet(_C, this);
|
|
269
296
|
},
|
|
@@ -271,7 +298,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
271
298
|
_classPrivateFieldSet(_C, this, v);
|
|
272
299
|
}
|
|
273
300
|
}, {
|
|
274
|
-
key: "
|
|
301
|
+
key: "_speaker",
|
|
275
302
|
get: function get() {
|
|
276
303
|
return _classPrivateFieldGet(_D, this);
|
|
277
304
|
},
|
|
@@ -279,7 +306,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
279
306
|
_classPrivateFieldSet(_D, this, v);
|
|
280
307
|
}
|
|
281
308
|
}, {
|
|
282
|
-
key: "
|
|
309
|
+
key: "currentIsMirror",
|
|
283
310
|
get: function get() {
|
|
284
311
|
return _classPrivateFieldGet(_E, this);
|
|
285
312
|
},
|
|
@@ -287,7 +314,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
287
314
|
_classPrivateFieldSet(_E, this, v);
|
|
288
315
|
}
|
|
289
316
|
}, {
|
|
290
|
-
key: "
|
|
317
|
+
key: "showForceOpenEffectDialog",
|
|
291
318
|
get: function get() {
|
|
292
319
|
return _classPrivateFieldGet(_F, this);
|
|
293
320
|
},
|
|
@@ -295,7 +322,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
295
322
|
_classPrivateFieldSet(_F, this, v);
|
|
296
323
|
}
|
|
297
324
|
}, {
|
|
298
|
-
key: "
|
|
325
|
+
key: "cameraId",
|
|
299
326
|
get: function get() {
|
|
300
327
|
return _classPrivateFieldGet(_G, this);
|
|
301
328
|
},
|
|
@@ -541,23 +568,23 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
541
568
|
}, {
|
|
542
569
|
key: "ifNeedExecuteAutoConnectAudio",
|
|
543
570
|
value: function ifNeedExecuteAutoConnectAudio() {
|
|
544
|
-
return this.
|
|
571
|
+
return this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
|
|
545
572
|
}
|
|
546
573
|
}, {
|
|
547
574
|
key: "ifNeedExecuteConnectAudioOption",
|
|
548
575
|
value: function ifNeedExecuteConnectAudioOption() {
|
|
549
|
-
return !this.
|
|
576
|
+
return !this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
|
|
550
577
|
}
|
|
551
578
|
}, {
|
|
552
579
|
key: "ifNeedExecuteOpenCamera",
|
|
553
580
|
value: function ifNeedExecuteOpenCamera() {
|
|
554
|
-
return !this._hasExecutedOpenCamera && !this.
|
|
581
|
+
return !this._hasExecutedOpenCamera && !this._sharedSettingDataSource.media.cameraExpectedOff;
|
|
555
582
|
}
|
|
556
583
|
}, {
|
|
557
584
|
key: "connectAudio",
|
|
558
585
|
value: function connectAudio(includeMicrophone) {
|
|
559
586
|
if (includeMicrophone) {
|
|
560
|
-
var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this.
|
|
587
|
+
var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._sharedSettingDataSource.media.microphoneExpectedOff;
|
|
561
588
|
if (!dontNeedOpenMicrophone) {
|
|
562
589
|
this.setMicrophoneEnabled(true);
|
|
563
590
|
}
|
|
@@ -590,6 +617,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
590
617
|
this.setConnectType(_type2.FcrUIConnectType.NONE);
|
|
591
618
|
this._observable.notifyObservers('onAudioDisconnected');
|
|
592
619
|
}
|
|
620
|
+
}, {
|
|
621
|
+
key: "speakerId",
|
|
622
|
+
get: function get() {
|
|
623
|
+
return this._speaker.id;
|
|
624
|
+
}
|
|
625
|
+
}, {
|
|
626
|
+
key: "microphoneId",
|
|
627
|
+
get: function get() {
|
|
628
|
+
return this._microphone.id;
|
|
629
|
+
}
|
|
593
630
|
}, {
|
|
594
631
|
key: "defaultMirror",
|
|
595
632
|
get: function get() {
|
|
@@ -598,12 +635,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
598
635
|
}, {
|
|
599
636
|
key: "followSystemMicrophoneDevice",
|
|
600
637
|
get: function get() {
|
|
601
|
-
return this.
|
|
638
|
+
return this._microphone.id === DEFAULT_DEVICE_ID;
|
|
602
639
|
}
|
|
603
640
|
}, {
|
|
604
641
|
key: "followSystemSpeakerDevice",
|
|
605
642
|
get: function get() {
|
|
606
|
-
return this.
|
|
643
|
+
return this._speaker.id === DEFAULT_DEVICE_ID;
|
|
607
644
|
}
|
|
608
645
|
}, {
|
|
609
646
|
key: "lastEnableVideoEffectType",
|
|
@@ -618,8 +655,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
618
655
|
get: function get() {
|
|
619
656
|
return {
|
|
620
657
|
cameraDeviceId: this.cameraId,
|
|
621
|
-
microphoneDeviceId: this.
|
|
622
|
-
speakerDeviceId: this.
|
|
658
|
+
microphoneDeviceId: this._microphoneDevice.id || '',
|
|
659
|
+
speakerDeviceId: this._speakerDevice.id || ''
|
|
623
660
|
};
|
|
624
661
|
}
|
|
625
662
|
}, {
|
|
@@ -630,7 +667,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
630
667
|
}, {
|
|
631
668
|
key: "shouldEnableMicBeforeSession",
|
|
632
669
|
get: function get() {
|
|
633
|
-
return !this.
|
|
670
|
+
return !this._sharedSettingDataSource.media.microphoneExpectedOff && this._sharedSettingDataSource.media.autoConnectAudio;
|
|
634
671
|
}
|
|
635
672
|
}, {
|
|
636
673
|
key: "getScreenTrack",
|
|
@@ -670,76 +707,36 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
670
707
|
}, {
|
|
671
708
|
key: "microphoneTrack",
|
|
672
709
|
get: function get() {
|
|
673
|
-
return this._mediaControl.getMicrophoneTrack(this.
|
|
674
|
-
}
|
|
675
|
-
}, {
|
|
676
|
-
key: "_initLocalSetting",
|
|
677
|
-
value: function _initLocalSetting() {
|
|
678
|
-
var _this$_userSettingSto;
|
|
679
|
-
var value = (_this$_userSettingSto = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto === void 0 ? void 0 : _this$_userSettingSto.setting;
|
|
680
|
-
if (value) {
|
|
681
|
-
var _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
|
|
682
|
-
var _microphoneVolume = (_value$microphoneVolu = value.microphoneVolume) !== null && _value$microphoneVolu !== void 0 ? _value$microphoneVolu : this.microphoneVolume;
|
|
683
|
-
var _isLocalMirrorEnabled = (_value$isLocalMirrorE = value.isLocalMirrorEnabled) !== null && _value$isLocalMirrorE !== void 0 ? _value$isLocalMirrorE : this.isLocalMirrorEnabled;
|
|
684
|
-
var editBeautyKey = (_value$editBeautyKey = value.editBeautyKey) !== null && _value$editBeautyKey !== void 0 ? _value$editBeautyKey : this.beautyKey;
|
|
685
|
-
this.setEditBeautyKey(editBeautyKey);
|
|
686
|
-
this.toggleLocalMirror(_isLocalMirrorEnabled);
|
|
687
|
-
this.setMicrophoneVolume(_microphoneVolume);
|
|
688
|
-
}
|
|
710
|
+
return this._microphoneDevice.id ? this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id) : null;
|
|
689
711
|
}
|
|
690
712
|
}, {
|
|
691
|
-
key: "
|
|
713
|
+
key: "initDeviceList",
|
|
692
714
|
value: function () {
|
|
693
|
-
var
|
|
715
|
+
var _initDeviceList = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
694
716
|
var _this2 = this;
|
|
695
|
-
var res;
|
|
696
717
|
return _regenerator["default"].wrap(function (_context5) {
|
|
697
718
|
while (1) switch (_context5.prev = _context5.next) {
|
|
698
719
|
case 0:
|
|
699
|
-
_context5.
|
|
700
|
-
return Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
|
|
720
|
+
return _context5.abrupt("return", Promise.all([this._mediaControl.getCameraList().then(function (list) {
|
|
701
721
|
(0, _mobx.runInAction)(function () {
|
|
702
722
|
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
703
723
|
_this2.cameraList = list;
|
|
704
724
|
if (_this2.cameraList.length > 0) {
|
|
705
|
-
var _this2
|
|
706
|
-
var _cameraId = _this2.cameraList[0].deviceId;
|
|
707
|
-
var defaultCameraDeviceId = _this2._getDefaultDeviceId({
|
|
708
|
-
initValue: _cameraId,
|
|
709
|
-
localKey: 'cameraDeviceId',
|
|
710
|
-
list: _this2.cameraList
|
|
711
|
-
});
|
|
725
|
+
var defaultCameraDeviceId = _this2.cameraList[0].deviceId;
|
|
712
726
|
_this2.logger.info('[FcrDeviceStore] select default camera id:', defaultCameraDeviceId);
|
|
713
727
|
_this2.setCameraId(defaultCameraDeviceId);
|
|
714
|
-
var localSetting = (_this2$_userSettingSt = _this2._userSettingStorageProvider.read()) === null || _this2$_userSettingSt === void 0 ? void 0 : _this2$_userSettingSt.setting;
|
|
715
|
-
if (localSetting) {
|
|
716
|
-
var _localSetting$enableB, _localSetting$beautyO;
|
|
717
|
-
if (localSetting.enable) {
|
|
718
|
-
_this2.enableVirtualBackground(localSetting.enable, localSetting.source);
|
|
719
|
-
}
|
|
720
|
-
var _enableBeauty = (_localSetting$enableB = localSetting.enableBeauty) !== null && _localSetting$enableB !== void 0 ? _localSetting$enableB : _this2.enableBeauty;
|
|
721
|
-
var _beautyOptions = (_localSetting$beautyO = localSetting.beautyOptions) !== null && _localSetting$beautyO !== void 0 ? _localSetting$beautyO : _this2.beautyOptions;
|
|
722
|
-
_this2.enableBeautyEffect(_enableBeauty);
|
|
723
|
-
_this2.setBeautyOptions(_beautyOptions);
|
|
724
|
-
}
|
|
725
728
|
}
|
|
726
729
|
});
|
|
727
730
|
}), this._getMicrophoneList().then(/*#__PURE__*/function () {
|
|
728
731
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
|
|
729
|
-
var defaultMicrophoneDeviceId;
|
|
730
732
|
return _regenerator["default"].wrap(function (_context3) {
|
|
731
733
|
while (1) switch (_context3.prev = _context3.next) {
|
|
732
734
|
case 0:
|
|
733
735
|
_this2.microphoneList = microphoneList;
|
|
734
736
|
_this2.logger.info('[FcrDeviceStore] init microphone list:', microphoneList);
|
|
735
737
|
// 默认跟随系统
|
|
736
|
-
defaultMicrophoneDeviceId = _this2._getDefaultDeviceId({
|
|
737
|
-
initValue: DEFAULT_DEVICE_ID,
|
|
738
|
-
localKey: 'microphoneDeviceId',
|
|
739
|
-
list: _this2.microphoneList
|
|
740
|
-
});
|
|
741
738
|
_context3.next = 1;
|
|
742
|
-
return _this2.setMicrophoneId(
|
|
739
|
+
return _this2.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
743
740
|
case 1:
|
|
744
741
|
case "end":
|
|
745
742
|
return _context3.stop();
|
|
@@ -751,20 +748,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
751
748
|
};
|
|
752
749
|
}()), this._getSpeakerList().then(/*#__PURE__*/function () {
|
|
753
750
|
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
|
|
754
|
-
var defaultSpeakerDeviceId;
|
|
755
751
|
return _regenerator["default"].wrap(function (_context4) {
|
|
756
752
|
while (1) switch (_context4.prev = _context4.next) {
|
|
757
753
|
case 0:
|
|
758
754
|
_this2.speakerList = speakerList;
|
|
759
755
|
_this2.logger.info('[FcrDeviceStore] init speaker list:', speakerList);
|
|
760
756
|
// 默认跟随系统
|
|
761
|
-
defaultSpeakerDeviceId = _this2._getDefaultDeviceId({
|
|
762
|
-
initValue: DEFAULT_DEVICE_ID,
|
|
763
|
-
localKey: 'speakerDeviceId',
|
|
764
|
-
list: _this2.speakerList
|
|
765
|
-
});
|
|
766
757
|
_context4.next = 1;
|
|
767
|
-
return _this2.setSpeakerId(
|
|
758
|
+
return _this2.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
768
759
|
case 1:
|
|
769
760
|
case "end":
|
|
770
761
|
return _context4.stop();
|
|
@@ -774,21 +765,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
774
765
|
return function (_x2) {
|
|
775
766
|
return _ref3.apply(this, arguments);
|
|
776
767
|
};
|
|
777
|
-
}())]);
|
|
768
|
+
}())]));
|
|
778
769
|
case 1:
|
|
779
|
-
res = _context5.sent;
|
|
780
|
-
this._initLocalSetting();
|
|
781
|
-
return _context5.abrupt("return", res);
|
|
782
|
-
case 2:
|
|
783
770
|
case "end":
|
|
784
771
|
return _context5.stop();
|
|
785
772
|
}
|
|
786
773
|
}, _callee5, this);
|
|
787
774
|
}));
|
|
788
|
-
function
|
|
789
|
-
return
|
|
775
|
+
function initDeviceList() {
|
|
776
|
+
return _initDeviceList.apply(this, arguments);
|
|
790
777
|
}
|
|
791
|
-
return
|
|
778
|
+
return initDeviceList;
|
|
792
779
|
}()
|
|
793
780
|
}, {
|
|
794
781
|
key: "addObserver",
|
|
@@ -821,35 +808,45 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
821
808
|
this._localVideoViewSet["delete"](view);
|
|
822
809
|
(_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.stopPreview(view);
|
|
823
810
|
}
|
|
811
|
+
}, {
|
|
812
|
+
key: "_handleSpeakerDetectingChanged",
|
|
813
|
+
value: function _handleSpeakerDetectingChanged() {
|
|
814
|
+
var _this3 = this;
|
|
815
|
+
if (this.microphoneEnabled) {
|
|
816
|
+
if (this.speakerDetecting) {
|
|
817
|
+
var _this$_microphoneAudi;
|
|
818
|
+
(_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 || _this$_microphoneAudi.stop();
|
|
819
|
+
} else {
|
|
820
|
+
var _this$_microphoneAudi2;
|
|
821
|
+
(_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 || _this$_microphoneAudi2.start();
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
825
|
+
if (this.speakerDetecting) {
|
|
826
|
+
var startSelectedSpeakerTest = function startSelectedSpeakerTest() {
|
|
827
|
+
var _this3$soundEffectLis, _this3$soundEffectLis2;
|
|
828
|
+
var soundUrl = (0, _env.isElectron)() ? (_this3$soundEffectLis = _this3.soundEffectList.get('speaker_test')) === null || _this3$soundEffectLis === void 0 ? void 0 : _this3$soundEffectLis.md5Url : (_this3$soundEffectLis2 = _this3.soundEffectList.get('speaker_test')) === null || _this3$soundEffectLis2 === void 0 ? void 0 : _this3$soundEffectLis2.url;
|
|
829
|
+
_this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', _this3._volumeIndicationInterval);
|
|
830
|
+
};
|
|
831
|
+
startSelectedSpeakerTest();
|
|
832
|
+
var sleep = 3000;
|
|
833
|
+
this._playAudioTimer = setInterval(function () {
|
|
834
|
+
startSelectedSpeakerTest();
|
|
835
|
+
}, sleep);
|
|
836
|
+
} else {
|
|
837
|
+
this._mediaControl.stopSelectedSpeakerTest();
|
|
838
|
+
this.speakerVolumeLevel = 0;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
824
841
|
}, {
|
|
825
842
|
key: "startSpeakerTest",
|
|
826
843
|
value: function startSpeakerTest() {
|
|
827
|
-
var _this$_microphoneAudi,
|
|
828
|
-
_this$soundEffectList,
|
|
829
|
-
_this$soundEffectList2,
|
|
830
|
-
_this3 = this;
|
|
831
|
-
if (!this._speakerDeviceId) return;
|
|
832
|
-
this.microphoneEnabled && ((_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 ? void 0 : _this$_microphoneAudi.stop());
|
|
833
|
-
this._mediaControl.setSelectedSpeaker(this._speakerDeviceId);
|
|
834
|
-
var soundUrl = (0, _env.isElectron)() ? (_this$soundEffectList = this.soundEffectList.get('speaker_test')) === null || _this$soundEffectList === void 0 ? void 0 : _this$soundEffectList.md5Url : (_this$soundEffectList2 = this.soundEffectList.get('speaker_test')) === null || _this$soundEffectList2 === void 0 ? void 0 : _this$soundEffectList2.url;
|
|
835
|
-
var interval = this._volumeIndicationInterval;
|
|
836
|
-
var sleep = 3000;
|
|
837
|
-
this._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
|
|
838
844
|
this.speakerDetecting = true;
|
|
839
|
-
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
840
|
-
this._playAudioTimer = setInterval(function () {
|
|
841
|
-
_this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
|
|
842
|
-
}, sleep);
|
|
843
845
|
}
|
|
844
846
|
}, {
|
|
845
847
|
key: "stopSpeakerTest",
|
|
846
848
|
value: function stopSpeakerTest() {
|
|
847
|
-
var _this$_microphoneAudi2;
|
|
848
|
-
this.speakerVolumeLevel = 0;
|
|
849
|
-
this.microphoneEnabled && ((_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 ? void 0 : _this$_microphoneAudi2.start());
|
|
850
849
|
this.speakerDetecting = false;
|
|
851
|
-
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
852
|
-
this._mediaControl.stopSelectedSpeakerTest();
|
|
853
850
|
}
|
|
854
851
|
}, {
|
|
855
852
|
key: "setCurrentIsMirror",
|
|
@@ -929,32 +926,28 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
929
926
|
this.cameraEnabled = enable;
|
|
930
927
|
}
|
|
931
928
|
}, {
|
|
932
|
-
key: "
|
|
933
|
-
value: function
|
|
934
|
-
var _this5 = this;
|
|
929
|
+
key: "_handleMicrophoneAudioTrack",
|
|
930
|
+
value: function _handleMicrophoneAudioTrack() {
|
|
935
931
|
var microphoneTrack = this._microphoneAudioTrack;
|
|
936
|
-
if (
|
|
937
|
-
|
|
932
|
+
if (!microphoneTrack) return;
|
|
933
|
+
if (this.microphoneEnabled) {
|
|
934
|
+
var _this$_microphoneAudi3;
|
|
935
|
+
(_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.start();
|
|
938
936
|
} else {
|
|
939
|
-
|
|
937
|
+
var _this$_microphoneAudi4;
|
|
938
|
+
(_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.stop();
|
|
940
939
|
this.microphoneVolumeLevel = 0;
|
|
941
940
|
}
|
|
941
|
+
}
|
|
942
|
+
}, {
|
|
943
|
+
key: "setMicrophoneEnabled",
|
|
944
|
+
value: function setMicrophoneEnabled(enable) {
|
|
942
945
|
this.microphoneEnabled = enable;
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
if (systemSelectedMicrophoneId && systemSelectedMicrophoneId !== _this5._microphoneDeviceId) {
|
|
949
|
-
_this5.logger.info('[FcrDeviceStore] system selected microphone id changed, need update microphone track');
|
|
950
|
-
(0, _mobx.runInAction)(function () {
|
|
951
|
-
_this5._microphoneDeviceId = systemSelectedMicrophoneId;
|
|
952
|
-
});
|
|
953
|
-
_this5._refreshMicrophoneTrack();
|
|
954
|
-
_this5._observable.notifyObservers('onMicrophoneChanged', _this5._microphoneDeviceId);
|
|
955
|
-
}
|
|
956
|
-
});
|
|
957
|
-
}
|
|
946
|
+
}
|
|
947
|
+
}, {
|
|
948
|
+
key: "_handleMicrophoneEnabledChanged",
|
|
949
|
+
value: function _handleMicrophoneEnabledChanged() {
|
|
950
|
+
this._handleMicrophoneAudioTrack();
|
|
958
951
|
}
|
|
959
952
|
}, {
|
|
960
953
|
key: "toggleLocalMirror",
|
|
@@ -969,21 +962,27 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
969
962
|
this.isLocalMirrorEnabled = false;
|
|
970
963
|
this.setCurrentIsMirror(false);
|
|
971
964
|
}
|
|
965
|
+
}, {
|
|
966
|
+
key: "_handleMicrophoneDetectingChanged",
|
|
967
|
+
value: function _handleMicrophoneDetectingChanged() {
|
|
968
|
+
if (this.microphoneDetecting) {
|
|
969
|
+
var _this$_microphoneAudi5;
|
|
970
|
+
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.startTest(this._volumeIndicationInterval);
|
|
971
|
+
} else {
|
|
972
|
+
var _this$_microphoneAudi6;
|
|
973
|
+
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stopTest();
|
|
974
|
+
this.microphoneVolumeLevel = 0;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
972
977
|
}, {
|
|
973
978
|
key: "startMicrophoneTest",
|
|
974
979
|
value: function startMicrophoneTest() {
|
|
975
|
-
var _this$_microphoneAudi3;
|
|
976
|
-
if (!this._microphoneDeviceId) return;
|
|
977
980
|
this.microphoneDetecting = true;
|
|
978
|
-
(_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.startTest(this._volumeIndicationInterval);
|
|
979
981
|
}
|
|
980
982
|
}, {
|
|
981
983
|
key: "stopMicrophoneTest",
|
|
982
984
|
value: function stopMicrophoneTest() {
|
|
983
|
-
var _this$_microphoneAudi4;
|
|
984
|
-
this.microphoneVolumeLevel = 0;
|
|
985
985
|
this.microphoneDetecting = false;
|
|
986
|
-
(_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.stopTest();
|
|
987
986
|
}
|
|
988
987
|
}, {
|
|
989
988
|
key: "enableVirtualBackground",
|
|
@@ -1045,8 +1044,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1045
1044
|
}, {
|
|
1046
1045
|
key: "enableAudioHiFiMode",
|
|
1047
1046
|
value: function enableAudioHiFiMode(enable) {
|
|
1048
|
-
if (!this.
|
|
1049
|
-
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this.
|
|
1047
|
+
if (!this._microphoneDevice.id) return;
|
|
1048
|
+
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1050
1049
|
if (enable) {
|
|
1051
1050
|
microphoneAudioTrack.getAudioEffectEnhancer().enableHiFiMode();
|
|
1052
1051
|
return;
|
|
@@ -1058,8 +1057,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1058
1057
|
}, {
|
|
1059
1058
|
key: "enableAudioEchoCancellation",
|
|
1060
1059
|
value: function enableAudioEchoCancellation(enable) {
|
|
1061
|
-
if (!this.
|
|
1062
|
-
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this.
|
|
1060
|
+
if (!this._microphoneDevice.id) return;
|
|
1061
|
+
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1063
1062
|
if (enable) {
|
|
1064
1063
|
microphoneAudioTrack.getAudioEffectEnhancer().enableEchoCancellation();
|
|
1065
1064
|
return;
|
|
@@ -1071,8 +1070,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1071
1070
|
}, {
|
|
1072
1071
|
key: "enableAudioStereo",
|
|
1073
1072
|
value: function enableAudioStereo(enable) {
|
|
1074
|
-
if (!this.
|
|
1075
|
-
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this.
|
|
1073
|
+
if (!this._microphoneDevice.id) return;
|
|
1074
|
+
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1076
1075
|
if (enable) {
|
|
1077
1076
|
microphoneAudioTrack.getAudioEffectEnhancer().enableStereoMode();
|
|
1078
1077
|
return;
|
|
@@ -1084,8 +1083,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1084
1083
|
}, {
|
|
1085
1084
|
key: "setNoiseLevel",
|
|
1086
1085
|
value: function setNoiseLevel(level) {
|
|
1087
|
-
if (!this.
|
|
1088
|
-
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this.
|
|
1086
|
+
if (!this._microphoneDevice.id) return;
|
|
1087
|
+
var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1089
1088
|
if (level === _type2.FcrUIAiDenoiseLevel.CLOSE) {
|
|
1090
1089
|
microphoneAudioTrack.getAudioEffectEnhancer().disableAiDenoiser();
|
|
1091
1090
|
} else {
|
|
@@ -1113,122 +1112,122 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1113
1112
|
this._observable.notifyObservers('onCameraChanged', cameraId);
|
|
1114
1113
|
}
|
|
1115
1114
|
}, {
|
|
1116
|
-
key: "
|
|
1115
|
+
key: "_handleMicrophoneIdChanged",
|
|
1117
1116
|
value: function () {
|
|
1118
|
-
var
|
|
1119
|
-
var _this6 = this;
|
|
1120
|
-
var speakerDeviceId, defaultDevice;
|
|
1117
|
+
var _handleMicrophoneIdChanged2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
1121
1118
|
return _regenerator["default"].wrap(function (_context6) {
|
|
1122
1119
|
while (1) switch (_context6.prev = _context6.next) {
|
|
1123
1120
|
case 0:
|
|
1124
|
-
if (!
|
|
1125
|
-
|
|
1126
|
-
|
|
1121
|
+
if (!this.followSystemMicrophoneDevice) {
|
|
1122
|
+
this._microphoneDevice = {
|
|
1123
|
+
id: this._microphone.id
|
|
1124
|
+
};
|
|
1125
|
+
} else {
|
|
1126
|
+
this._correctSystemSelectedMicrophoneDeviceId();
|
|
1127
1127
|
}
|
|
1128
|
-
|
|
1128
|
+
this._mediaControl.observeSystemSelectedMicrophoneChanged(this.followSystemMicrophoneDevice);
|
|
1129
1129
|
case 1:
|
|
1130
|
-
if (!speakerId) {
|
|
1131
|
-
_context6.next = 4;
|
|
1132
|
-
break;
|
|
1133
|
-
}
|
|
1134
|
-
speakerDeviceId = speakerId;
|
|
1135
|
-
if (!(speakerId === DEFAULT_DEVICE_ID)) {
|
|
1136
|
-
_context6.next = 3;
|
|
1137
|
-
break;
|
|
1138
|
-
}
|
|
1139
|
-
_context6.next = 2;
|
|
1140
|
-
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1141
|
-
case 2:
|
|
1142
|
-
defaultDevice = _context6.sent;
|
|
1143
|
-
speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1144
|
-
case 3:
|
|
1145
|
-
if (speakerDeviceId) {
|
|
1146
|
-
this._mediaControl.setSelectedSpeaker(speakerDeviceId);
|
|
1147
|
-
}
|
|
1148
|
-
(0, _mobx.runInAction)(function () {
|
|
1149
|
-
_this6._speakerDeviceId = speakerDeviceId;
|
|
1150
|
-
_this6.speakerId = speakerId;
|
|
1151
|
-
});
|
|
1152
|
-
_context6.next = 5;
|
|
1153
|
-
break;
|
|
1154
|
-
case 4:
|
|
1155
|
-
this._speakerDeviceId = speakerId;
|
|
1156
|
-
this.speakerId = speakerId;
|
|
1157
|
-
case 5:
|
|
1158
|
-
this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
|
|
1159
|
-
this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
|
|
1160
|
-
case 6:
|
|
1161
1130
|
case "end":
|
|
1162
1131
|
return _context6.stop();
|
|
1163
1132
|
}
|
|
1164
1133
|
}, _callee6, this);
|
|
1165
1134
|
}));
|
|
1166
|
-
function
|
|
1167
|
-
return
|
|
1135
|
+
function _handleMicrophoneIdChanged() {
|
|
1136
|
+
return _handleMicrophoneIdChanged2.apply(this, arguments);
|
|
1168
1137
|
}
|
|
1169
|
-
return
|
|
1138
|
+
return _handleMicrophoneIdChanged;
|
|
1170
1139
|
}()
|
|
1171
1140
|
}, {
|
|
1172
|
-
key: "
|
|
1141
|
+
key: "_handleMicrophoneDeviceIdChanged",
|
|
1142
|
+
value: function _handleMicrophoneDeviceIdChanged() {
|
|
1143
|
+
if (!this._microphoneDevice.id) {
|
|
1144
|
+
this.logger.debug('setSelectedMicrophone failed');
|
|
1145
|
+
this._microphone.id = DEFAULT_DEVICE_ID;
|
|
1146
|
+
} else {
|
|
1147
|
+
var _this$_microphoneAudi7, _this$_microphoneAudi8;
|
|
1148
|
+
(_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.removeObserver(this._microphoneObserver);
|
|
1149
|
+
(_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
|
|
1150
|
+
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1151
|
+
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1152
|
+
this._handleMicrophoneAudioTrack();
|
|
1153
|
+
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDevice.id);
|
|
1154
|
+
this.setNoiseLevel(this._sharedSettingDataSource.setting.noiseReduce);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}, {
|
|
1158
|
+
key: "_handleSpeakerDeviceIdChanged",
|
|
1159
|
+
value: function _handleSpeakerDeviceIdChanged() {
|
|
1160
|
+
if (!this._speakerDevice.id) {
|
|
1161
|
+
this.logger.debug('setSelectedSpeaker failed');
|
|
1162
|
+
this._speaker.id = DEFAULT_DEVICE_ID;
|
|
1163
|
+
} else {
|
|
1164
|
+
this._mediaControl.setSelectedSpeaker(this._speakerDevice.id);
|
|
1165
|
+
this._observable.notifyObservers('onSpeakerChanged', this._speakerDevice.id);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}, {
|
|
1169
|
+
key: "_handleSpeakerIdChanged",
|
|
1173
1170
|
value: function () {
|
|
1174
|
-
var
|
|
1175
|
-
var _this$_microphoneAudi5,
|
|
1176
|
-
_this$_microphoneAudi6,
|
|
1177
|
-
_this7 = this;
|
|
1178
|
-
var microphoneDeviceId, defaultDevice, _microphoneTrack;
|
|
1171
|
+
var _handleSpeakerIdChanged2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
1179
1172
|
return _regenerator["default"].wrap(function (_context7) {
|
|
1180
1173
|
while (1) switch (_context7.prev = _context7.next) {
|
|
1181
1174
|
case 0:
|
|
1182
|
-
if (!
|
|
1183
|
-
|
|
1184
|
-
|
|
1175
|
+
if (!this.followSystemSpeakerDevice) {
|
|
1176
|
+
this._speakerDevice = {
|
|
1177
|
+
id: this._speaker.id
|
|
1178
|
+
};
|
|
1179
|
+
} else {
|
|
1180
|
+
this._correctSystemSpeakerDeviceId();
|
|
1185
1181
|
}
|
|
1186
|
-
|
|
1182
|
+
this._mediaControl.observeSystemSelectedSpeakerChanged(this.followSystemSpeakerDevice);
|
|
1187
1183
|
case 1:
|
|
1188
|
-
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
|
|
1189
|
-
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
|
|
1190
|
-
this.stopMicrophoneTest();
|
|
1191
|
-
if (!microphoneId) {
|
|
1192
|
-
_context7.next = 4;
|
|
1193
|
-
break;
|
|
1194
|
-
}
|
|
1195
|
-
microphoneDeviceId = microphoneId;
|
|
1196
|
-
if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
|
|
1197
|
-
_context7.next = 3;
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
_context7.next = 2;
|
|
1201
|
-
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1202
|
-
case 2:
|
|
1203
|
-
defaultDevice = _context7.sent;
|
|
1204
|
-
microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
1205
|
-
case 3:
|
|
1206
|
-
if (microphoneDeviceId) {
|
|
1207
|
-
_microphoneTrack = this._mediaControl.getMicrophoneTrack(microphoneDeviceId);
|
|
1208
|
-
_microphoneTrack.addObserver(this._microphoneObserver);
|
|
1209
|
-
if (this.microphoneEnabled) {
|
|
1210
|
-
_microphoneTrack.start();
|
|
1211
|
-
}
|
|
1212
|
-
this._microphoneAudioTrack = _microphoneTrack;
|
|
1213
|
-
}
|
|
1214
|
-
(0, _mobx.runInAction)(function () {
|
|
1215
|
-
_this7._microphoneDeviceId = microphoneDeviceId;
|
|
1216
|
-
_this7.microphoneId = microphoneId;
|
|
1217
|
-
});
|
|
1218
|
-
_context7.next = 5;
|
|
1219
|
-
break;
|
|
1220
|
-
case 4:
|
|
1221
|
-
this._microphoneDeviceId = microphoneId;
|
|
1222
|
-
this.microphoneId = microphoneId;
|
|
1223
|
-
case 5:
|
|
1224
|
-
this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
|
|
1225
|
-
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
|
|
1226
|
-
case 6:
|
|
1227
1184
|
case "end":
|
|
1228
1185
|
return _context7.stop();
|
|
1229
1186
|
}
|
|
1230
1187
|
}, _callee7, this);
|
|
1231
1188
|
}));
|
|
1189
|
+
function _handleSpeakerIdChanged() {
|
|
1190
|
+
return _handleSpeakerIdChanged2.apply(this, arguments);
|
|
1191
|
+
}
|
|
1192
|
+
return _handleSpeakerIdChanged;
|
|
1193
|
+
}()
|
|
1194
|
+
}, {
|
|
1195
|
+
key: "setSpeakerId",
|
|
1196
|
+
value: function () {
|
|
1197
|
+
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(speakerId) {
|
|
1198
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
1199
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1200
|
+
case 0:
|
|
1201
|
+
this._speaker = {
|
|
1202
|
+
id: speakerId
|
|
1203
|
+
};
|
|
1204
|
+
case 1:
|
|
1205
|
+
case "end":
|
|
1206
|
+
return _context8.stop();
|
|
1207
|
+
}
|
|
1208
|
+
}, _callee8, this);
|
|
1209
|
+
}));
|
|
1210
|
+
function setSpeakerId(_x3) {
|
|
1211
|
+
return _setSpeakerId.apply(this, arguments);
|
|
1212
|
+
}
|
|
1213
|
+
return setSpeakerId;
|
|
1214
|
+
}()
|
|
1215
|
+
}, {
|
|
1216
|
+
key: "setMicrophoneId",
|
|
1217
|
+
value: function () {
|
|
1218
|
+
var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(microphoneId) {
|
|
1219
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
1220
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1221
|
+
case 0:
|
|
1222
|
+
this._microphone = {
|
|
1223
|
+
id: microphoneId
|
|
1224
|
+
};
|
|
1225
|
+
case 1:
|
|
1226
|
+
case "end":
|
|
1227
|
+
return _context9.stop();
|
|
1228
|
+
}
|
|
1229
|
+
}, _callee9, this);
|
|
1230
|
+
}));
|
|
1232
1231
|
function setMicrophoneId(_x4) {
|
|
1233
1232
|
return _setMicrophoneId.apply(this, arguments);
|
|
1234
1233
|
}
|
|
@@ -1243,9 +1242,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1243
1242
|
}, {
|
|
1244
1243
|
key: "setMicrophoneVolume",
|
|
1245
1244
|
value: function setMicrophoneVolume(value) {
|
|
1246
|
-
var _this$
|
|
1245
|
+
var _this$_microphoneAudi9;
|
|
1247
1246
|
this.microphoneVolume = value;
|
|
1248
|
-
(_this$
|
|
1247
|
+
(_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.adjustVolume(value);
|
|
1249
1248
|
}
|
|
1250
1249
|
}, {
|
|
1251
1250
|
key: "startOrStopCamera",
|
|
@@ -1271,14 +1270,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1271
1270
|
}, {
|
|
1272
1271
|
key: "loadUiResources",
|
|
1273
1272
|
value: function () {
|
|
1274
|
-
var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1275
|
-
var
|
|
1273
|
+
var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(uiResource) {
|
|
1274
|
+
var _this5 = this;
|
|
1276
1275
|
var _uiResource$virtualBa, _uiResource$virtualBa2, _uiResource$soundEffe, images, videos, soundEffects, newList, imageInfoList, videoInfoList, _uiResource$virtualBa3, _uiResource$virtualBa4, _uiResource$soundEffe2, _images, _videos, _soundEffects, handleResourceReady;
|
|
1277
|
-
return _regenerator["default"].wrap(function (
|
|
1278
|
-
while (1) switch (
|
|
1276
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
1277
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
1279
1278
|
case 0:
|
|
1280
1279
|
if ((0, _env.isElectron)()) {
|
|
1281
|
-
|
|
1280
|
+
_context0.next = 1;
|
|
1282
1281
|
break;
|
|
1283
1282
|
}
|
|
1284
1283
|
images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.filter(function (url) {
|
|
@@ -1310,7 +1309,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1310
1309
|
}) || [];
|
|
1311
1310
|
newList = newList.concat(videoInfoList);
|
|
1312
1311
|
(0, _mobx.runInAction)(function () {
|
|
1313
|
-
|
|
1312
|
+
_this5._updateVirtualBackgroundList(newList);
|
|
1314
1313
|
var soundEffectInfoList = soundEffects.map(function (url) {
|
|
1315
1314
|
return {
|
|
1316
1315
|
url: url,
|
|
@@ -1318,13 +1317,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1318
1317
|
};
|
|
1319
1318
|
}) || [];
|
|
1320
1319
|
soundEffectInfoList.forEach(function (item) {
|
|
1321
|
-
|
|
1320
|
+
_this5.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1322
1321
|
});
|
|
1323
1322
|
});
|
|
1324
|
-
|
|
1323
|
+
_context0.next = 3;
|
|
1325
1324
|
break;
|
|
1326
1325
|
case 1:
|
|
1327
|
-
|
|
1326
|
+
_context0.next = 2;
|
|
1328
1327
|
return this._loadBuiltinResources();
|
|
1329
1328
|
case 2:
|
|
1330
1329
|
_images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa3 = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa3 === void 0 ? void 0 : _uiResource$virtualBa3.filter(function (url) {
|
|
@@ -1338,7 +1337,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1338
1337
|
})) || [];
|
|
1339
1338
|
handleResourceReady = function handleResourceReady(filePathList, type) {
|
|
1340
1339
|
if (type === 'image' || type === 'video') {
|
|
1341
|
-
var list =
|
|
1340
|
+
var list = _this5.virtualBackgroundList.slice();
|
|
1342
1341
|
var resourceType = type === 'image' ? _virtualBackdoundResources.VirtualOption.IMG : _virtualBackdoundResources.VirtualOption.VIDEO;
|
|
1343
1342
|
list = filePathList.map(function (resource) {
|
|
1344
1343
|
return {
|
|
@@ -1348,12 +1347,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1348
1347
|
url: URL.createObjectURL(window.runtime.fileToBlob(resource, type))
|
|
1349
1348
|
};
|
|
1350
1349
|
});
|
|
1351
|
-
var _newList =
|
|
1352
|
-
|
|
1350
|
+
var _newList = _this5.virtualBackgroundList.concat(list);
|
|
1351
|
+
_this5._updateVirtualBackgroundList(_newList);
|
|
1353
1352
|
} else if (type === 'audio') {
|
|
1354
1353
|
filePathList.forEach(function (resource) {
|
|
1355
1354
|
var key = (0, _tools.getFileNameWithoutExtension)(resource);
|
|
1356
|
-
|
|
1355
|
+
_this5.soundEffectList.set(key, {
|
|
1357
1356
|
md5Url: resource,
|
|
1358
1357
|
url: URL.createObjectURL(window.runtime.fileToBlob(resource, type))
|
|
1359
1358
|
});
|
|
@@ -1365,9 +1364,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1365
1364
|
this.loadZipResources(_soundEffects, 'audio', handleResourceReady);
|
|
1366
1365
|
case 3:
|
|
1367
1366
|
case "end":
|
|
1368
|
-
return
|
|
1367
|
+
return _context0.stop();
|
|
1369
1368
|
}
|
|
1370
|
-
},
|
|
1369
|
+
}, _callee0, this);
|
|
1371
1370
|
}));
|
|
1372
1371
|
function loadUiResources(_x5) {
|
|
1373
1372
|
return _loadUiResources.apply(this, arguments);
|
|
@@ -1377,63 +1376,78 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1377
1376
|
}, {
|
|
1378
1377
|
key: "loadZipResources",
|
|
1379
1378
|
value: function () {
|
|
1380
|
-
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1381
|
-
var
|
|
1379
|
+
var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(zipUrls, type, callback) {
|
|
1380
|
+
var _this6 = this;
|
|
1382
1381
|
var ps;
|
|
1383
|
-
return _regenerator["default"].wrap(function (
|
|
1384
|
-
while (1) switch (
|
|
1382
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
1383
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1385
1384
|
case 0:
|
|
1386
1385
|
ps = zipUrls.map(/*#__PURE__*/function () {
|
|
1387
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1386
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(url) {
|
|
1388
1387
|
var filePathList;
|
|
1389
|
-
return _regenerator["default"].wrap(function (
|
|
1390
|
-
while (1) switch (
|
|
1388
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
1389
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
1391
1390
|
case 0:
|
|
1392
|
-
|
|
1393
|
-
return
|
|
1391
|
+
_context1.next = 1;
|
|
1392
|
+
return _this6._fetchZipAndUnzip(url, type);
|
|
1394
1393
|
case 1:
|
|
1395
|
-
filePathList =
|
|
1394
|
+
filePathList = _context1.sent;
|
|
1396
1395
|
callback(filePathList, type);
|
|
1397
1396
|
case 2:
|
|
1398
1397
|
case "end":
|
|
1399
|
-
return
|
|
1398
|
+
return _context1.stop();
|
|
1400
1399
|
}
|
|
1401
|
-
},
|
|
1400
|
+
}, _callee1);
|
|
1402
1401
|
}));
|
|
1403
1402
|
return function (_x9) {
|
|
1404
1403
|
return _ref4.apply(this, arguments);
|
|
1405
1404
|
};
|
|
1406
1405
|
}());
|
|
1407
|
-
|
|
1406
|
+
_context10.next = 1;
|
|
1408
1407
|
return Promise.allSettled(ps);
|
|
1409
1408
|
case 1:
|
|
1410
1409
|
case "end":
|
|
1411
|
-
return
|
|
1410
|
+
return _context10.stop();
|
|
1412
1411
|
}
|
|
1413
|
-
},
|
|
1412
|
+
}, _callee10);
|
|
1414
1413
|
}));
|
|
1415
1414
|
function loadZipResources(_x6, _x7, _x8) {
|
|
1416
1415
|
return _loadZipResources.apply(this, arguments);
|
|
1417
1416
|
}
|
|
1418
1417
|
return loadZipResources;
|
|
1419
1418
|
}()
|
|
1419
|
+
}, {
|
|
1420
|
+
key: "toggleAGC",
|
|
1421
|
+
value: function toggleAGC(enable) {
|
|
1422
|
+
if (enable) {
|
|
1423
|
+
return this._mediaControl.enableAGC();
|
|
1424
|
+
} else {
|
|
1425
|
+
return this._mediaControl.disableAGC();
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1420
1428
|
}, {
|
|
1421
1429
|
key: "release",
|
|
1422
1430
|
value: function release() {
|
|
1423
|
-
var
|
|
1431
|
+
var _this7 = this,
|
|
1424
1432
|
_this$_cameraVideoTra3,
|
|
1425
|
-
_this$
|
|
1433
|
+
_this$_microphoneAudi0;
|
|
1434
|
+
this._mediaControl.removeObserver(this._mediaControlObserver);
|
|
1426
1435
|
if (this._localVideoViewSet.size > 0) {
|
|
1427
1436
|
this._localVideoViewSet.forEach(function (view) {
|
|
1428
|
-
var
|
|
1429
|
-
(
|
|
1437
|
+
var _this7$_cameraVideoTr;
|
|
1438
|
+
(_this7$_cameraVideoTr = _this7._cameraVideoTrack) === null || _this7$_cameraVideoTr === void 0 || _this7$_cameraVideoTr.stopPreview(view);
|
|
1430
1439
|
});
|
|
1431
1440
|
this._localVideoViewSet.clear();
|
|
1432
1441
|
}
|
|
1442
|
+
this.speakerDetecting = false;
|
|
1443
|
+
this.microphoneDetecting = false;
|
|
1433
1444
|
(_this$_cameraVideoTra3 = this._cameraVideoTrack) === null || _this$_cameraVideoTra3 === void 0 || _this$_cameraVideoTra3.stop();
|
|
1445
|
+
(_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
|
|
1434
1446
|
this._cameraVideoTrack = undefined;
|
|
1435
|
-
|
|
1436
|
-
this.
|
|
1447
|
+
this._microphoneAudioTrack = null;
|
|
1448
|
+
this._disposer.forEach(function (disposer) {
|
|
1449
|
+
return disposer();
|
|
1450
|
+
});
|
|
1437
1451
|
}
|
|
1438
1452
|
}, {
|
|
1439
1453
|
key: "setConnectType",
|
|
@@ -1443,18 +1457,18 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1443
1457
|
}, {
|
|
1444
1458
|
key: "_fetchZipAndUnzip",
|
|
1445
1459
|
value: function () {
|
|
1446
|
-
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1460
|
+
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11(url, type) {
|
|
1447
1461
|
var md5Url;
|
|
1448
|
-
return _regenerator["default"].wrap(function (
|
|
1449
|
-
while (1) switch (
|
|
1462
|
+
return _regenerator["default"].wrap(function (_context11) {
|
|
1463
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1450
1464
|
case 0:
|
|
1451
1465
|
md5Url = (0, _imports.md5)(url);
|
|
1452
|
-
return
|
|
1466
|
+
return _context11.abrupt("return", window.runtime.getResourceByFileType(url, md5Url, type));
|
|
1453
1467
|
case 1:
|
|
1454
1468
|
case "end":
|
|
1455
|
-
return
|
|
1469
|
+
return _context11.stop();
|
|
1456
1470
|
}
|
|
1457
|
-
},
|
|
1471
|
+
}, _callee11);
|
|
1458
1472
|
}));
|
|
1459
1473
|
function _fetchZipAndUnzip(_x0, _x1) {
|
|
1460
1474
|
return _fetchZipAndUnzip2.apply(this, arguments);
|
|
@@ -1475,6 +1489,70 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1475
1489
|
return 0;
|
|
1476
1490
|
});
|
|
1477
1491
|
}
|
|
1492
|
+
}, {
|
|
1493
|
+
key: "_handleSystemSelectedSpeakerChanged",
|
|
1494
|
+
value: function _handleSystemSelectedSpeakerChanged(speaker) {
|
|
1495
|
+
this._correctSystemSpeakerDeviceId();
|
|
1496
|
+
}
|
|
1497
|
+
}, {
|
|
1498
|
+
key: "_correctSystemSpeakerDeviceId",
|
|
1499
|
+
value: function () {
|
|
1500
|
+
var _correctSystemSpeakerDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
1501
|
+
var defaultDevice;
|
|
1502
|
+
return _regenerator["default"].wrap(function (_context12) {
|
|
1503
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1504
|
+
case 0:
|
|
1505
|
+
_context12.next = 1;
|
|
1506
|
+
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1507
|
+
case 1:
|
|
1508
|
+
defaultDevice = _context12.sent;
|
|
1509
|
+
this.logger.debug("system selected speaker changed : ".concat(defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceName));
|
|
1510
|
+
this._speakerDevice = {
|
|
1511
|
+
id: (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || null
|
|
1512
|
+
};
|
|
1513
|
+
case 2:
|
|
1514
|
+
case "end":
|
|
1515
|
+
return _context12.stop();
|
|
1516
|
+
}
|
|
1517
|
+
}, _callee12, this);
|
|
1518
|
+
}));
|
|
1519
|
+
function _correctSystemSpeakerDeviceId() {
|
|
1520
|
+
return _correctSystemSpeakerDeviceId2.apply(this, arguments);
|
|
1521
|
+
}
|
|
1522
|
+
return _correctSystemSpeakerDeviceId;
|
|
1523
|
+
}()
|
|
1524
|
+
}, {
|
|
1525
|
+
key: "_handleSystemSelectedMicrophoneChanged",
|
|
1526
|
+
value: function _handleSystemSelectedMicrophoneChanged(microphone) {
|
|
1527
|
+
this._correctSystemSelectedMicrophoneDeviceId();
|
|
1528
|
+
}
|
|
1529
|
+
}, {
|
|
1530
|
+
key: "_correctSystemSelectedMicrophoneDeviceId",
|
|
1531
|
+
value: function () {
|
|
1532
|
+
var _correctSystemSelectedMicrophoneDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
1533
|
+
var defaultDevice;
|
|
1534
|
+
return _regenerator["default"].wrap(function (_context13) {
|
|
1535
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1536
|
+
case 0:
|
|
1537
|
+
_context13.next = 1;
|
|
1538
|
+
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1539
|
+
case 1:
|
|
1540
|
+
defaultDevice = _context13.sent;
|
|
1541
|
+
this.logger.debug("system selected microphone changed : ".concat(defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceName));
|
|
1542
|
+
this._microphoneDevice = {
|
|
1543
|
+
id: (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || null
|
|
1544
|
+
};
|
|
1545
|
+
case 2:
|
|
1546
|
+
case "end":
|
|
1547
|
+
return _context13.stop();
|
|
1548
|
+
}
|
|
1549
|
+
}, _callee13, this);
|
|
1550
|
+
}));
|
|
1551
|
+
function _correctSystemSelectedMicrophoneDeviceId() {
|
|
1552
|
+
return _correctSystemSelectedMicrophoneDeviceId2.apply(this, arguments);
|
|
1553
|
+
}
|
|
1554
|
+
return _correctSystemSelectedMicrophoneDeviceId;
|
|
1555
|
+
}()
|
|
1478
1556
|
}, {
|
|
1479
1557
|
key: "_handleSpeakerTestVolumeIndicationUpdated",
|
|
1480
1558
|
value: function _handleSpeakerTestVolumeIndicationUpdated(volume) {
|
|
@@ -1499,7 +1577,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1499
1577
|
}, {
|
|
1500
1578
|
key: "toggleLocalCameraPreview",
|
|
1501
1579
|
value: function toggleLocalCameraPreview(enabled) {
|
|
1502
|
-
var
|
|
1580
|
+
var _this8 = this;
|
|
1503
1581
|
var localVideoViewSet = this._localVideoViewSet;
|
|
1504
1582
|
var cameraTrack = this._cameraVideoTrack;
|
|
1505
1583
|
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
@@ -1511,7 +1589,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1511
1589
|
localVideoViewSet.forEach(function (view) {
|
|
1512
1590
|
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1513
1591
|
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1514
|
-
isMirror:
|
|
1592
|
+
isMirror: _this8.currentIsMirror
|
|
1515
1593
|
}, view);
|
|
1516
1594
|
});
|
|
1517
1595
|
}
|
|
@@ -1519,24 +1597,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1519
1597
|
}, {
|
|
1520
1598
|
key: "_handleCameraListUpdated",
|
|
1521
1599
|
value: function () {
|
|
1522
|
-
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1523
|
-
var
|
|
1600
|
+
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
|
|
1601
|
+
var _this9 = this;
|
|
1524
1602
|
var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
|
|
1525
|
-
return _regenerator["default"].wrap(function (
|
|
1526
|
-
while (1) switch (
|
|
1603
|
+
return _regenerator["default"].wrap(function (_context14) {
|
|
1604
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1527
1605
|
case 0:
|
|
1528
|
-
|
|
1606
|
+
_context14.next = 1;
|
|
1529
1607
|
return this._mediaControl.getCameraList();
|
|
1530
1608
|
case 1:
|
|
1531
|
-
cameraList =
|
|
1609
|
+
cameraList = _context14.sent;
|
|
1532
1610
|
(0, _mobx.runInAction)(function () {
|
|
1533
|
-
|
|
1611
|
+
_this9.cameraList = cameraList;
|
|
1534
1612
|
});
|
|
1535
1613
|
currentDeviceExist = false;
|
|
1536
1614
|
if (this.cameraId) {
|
|
1537
1615
|
currentDeviceExist = this.cameraList.some(function (_ref5) {
|
|
1538
1616
|
var deviceId = _ref5.deviceId;
|
|
1539
|
-
return
|
|
1617
|
+
return _this9.cameraId === deviceId;
|
|
1540
1618
|
});
|
|
1541
1619
|
_cameraEnabled = this.cameraEnabled;
|
|
1542
1620
|
if (!currentDeviceExist) {
|
|
@@ -1563,9 +1641,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1563
1641
|
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1564
1642
|
case 2:
|
|
1565
1643
|
case "end":
|
|
1566
|
-
return
|
|
1644
|
+
return _context14.stop();
|
|
1567
1645
|
}
|
|
1568
|
-
},
|
|
1646
|
+
}, _callee14, this);
|
|
1569
1647
|
}));
|
|
1570
1648
|
function _handleCameraListUpdated() {
|
|
1571
1649
|
return _handleCameraListUpdated2.apply(this, arguments);
|
|
@@ -1575,19 +1653,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1575
1653
|
}, {
|
|
1576
1654
|
key: "_handleMicrophoneAdded",
|
|
1577
1655
|
value: function () {
|
|
1578
|
-
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1579
|
-
return _regenerator["default"].wrap(function (
|
|
1580
|
-
while (1) switch (
|
|
1656
|
+
var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
1657
|
+
return _regenerator["default"].wrap(function (_context15) {
|
|
1658
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1581
1659
|
case 0:
|
|
1582
|
-
|
|
1660
|
+
_context15.next = 1;
|
|
1583
1661
|
return this._handleMicrophoneListUpdated();
|
|
1584
1662
|
case 1:
|
|
1585
|
-
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1586
|
-
case 2:
|
|
1587
1663
|
case "end":
|
|
1588
|
-
return
|
|
1664
|
+
return _context15.stop();
|
|
1589
1665
|
}
|
|
1590
|
-
},
|
|
1666
|
+
}, _callee15, this);
|
|
1591
1667
|
}));
|
|
1592
1668
|
function _handleMicrophoneAdded() {
|
|
1593
1669
|
return _handleMicrophoneAdded2.apply(this, arguments);
|
|
@@ -1597,105 +1673,97 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1597
1673
|
}, {
|
|
1598
1674
|
key: "_handleMicrophoneRemoved",
|
|
1599
1675
|
value: function () {
|
|
1600
|
-
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
return _regenerator["default"].wrap(function (_context12) {
|
|
1604
|
-
while (1) switch (_context12.prev = _context12.next) {
|
|
1676
|
+
var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
|
|
1677
|
+
return _regenerator["default"].wrap(function (_context16) {
|
|
1678
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1605
1679
|
case 0:
|
|
1606
|
-
|
|
1680
|
+
_context16.next = 1;
|
|
1607
1681
|
return this._handleMicrophoneListUpdated();
|
|
1608
1682
|
case 1:
|
|
1609
|
-
|
|
1683
|
+
_context16.next = 2;
|
|
1684
|
+
return this._correctMicrophoneDeviceId();
|
|
1685
|
+
case 2:
|
|
1686
|
+
case "end":
|
|
1687
|
+
return _context16.stop();
|
|
1688
|
+
}
|
|
1689
|
+
}, _callee16, this);
|
|
1690
|
+
}));
|
|
1691
|
+
function _handleMicrophoneRemoved() {
|
|
1692
|
+
return _handleMicrophoneRemoved2.apply(this, arguments);
|
|
1693
|
+
}
|
|
1694
|
+
return _handleMicrophoneRemoved;
|
|
1695
|
+
}()
|
|
1696
|
+
}, {
|
|
1697
|
+
key: "_correctMicrophoneDeviceId",
|
|
1698
|
+
value: function () {
|
|
1699
|
+
var _correctMicrophoneDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
|
|
1700
|
+
var _this0 = this;
|
|
1701
|
+
var currentDeviceExist;
|
|
1702
|
+
return _regenerator["default"].wrap(function (_context17) {
|
|
1703
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1704
|
+
case 0:
|
|
1610
1705
|
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1611
|
-
return item.deviceId ===
|
|
1706
|
+
return item.deviceId === _this0._microphoneDevice.id;
|
|
1612
1707
|
});
|
|
1613
1708
|
if (currentDeviceExist) {
|
|
1614
|
-
|
|
1709
|
+
_context17.next = 1;
|
|
1615
1710
|
break;
|
|
1616
1711
|
}
|
|
1617
1712
|
this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
|
|
1618
|
-
|
|
1713
|
+
_context17.next = 1;
|
|
1619
1714
|
return this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1620
|
-
case
|
|
1621
|
-
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1622
|
-
case 3:
|
|
1715
|
+
case 1:
|
|
1623
1716
|
case "end":
|
|
1624
|
-
return
|
|
1717
|
+
return _context17.stop();
|
|
1625
1718
|
}
|
|
1626
|
-
},
|
|
1719
|
+
}, _callee17, this);
|
|
1627
1720
|
}));
|
|
1628
|
-
function
|
|
1629
|
-
return
|
|
1721
|
+
function _correctMicrophoneDeviceId() {
|
|
1722
|
+
return _correctMicrophoneDeviceId2.apply(this, arguments);
|
|
1630
1723
|
}
|
|
1631
|
-
return
|
|
1724
|
+
return _correctMicrophoneDeviceId;
|
|
1632
1725
|
}()
|
|
1633
1726
|
}, {
|
|
1634
1727
|
key: "_handleMicrophoneListUpdated",
|
|
1635
1728
|
value: function () {
|
|
1636
|
-
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1637
|
-
var _this12 = this;
|
|
1729
|
+
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
|
|
1638
1730
|
var microphoneList;
|
|
1639
|
-
return _regenerator["default"].wrap(function (
|
|
1640
|
-
while (1) switch (
|
|
1731
|
+
return _regenerator["default"].wrap(function (_context18) {
|
|
1732
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1641
1733
|
case 0:
|
|
1642
|
-
|
|
1734
|
+
_context18.next = 1;
|
|
1643
1735
|
return this._getMicrophoneList();
|
|
1644
1736
|
case 1:
|
|
1645
|
-
microphoneList =
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
this._refreshMicrophoneTrack();
|
|
1649
|
-
}
|
|
1650
|
-
(0, _mobx.runInAction)(function () {
|
|
1651
|
-
_this12.microphoneList = microphoneList;
|
|
1652
|
-
});
|
|
1737
|
+
microphoneList = _context18.sent;
|
|
1738
|
+
this.microphoneList = microphoneList;
|
|
1739
|
+
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1653
1740
|
case 2:
|
|
1654
1741
|
case "end":
|
|
1655
|
-
return
|
|
1742
|
+
return _context18.stop();
|
|
1656
1743
|
}
|
|
1657
|
-
},
|
|
1744
|
+
}, _callee18, this);
|
|
1658
1745
|
}));
|
|
1659
1746
|
function _handleMicrophoneListUpdated() {
|
|
1660
1747
|
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
1661
1748
|
}
|
|
1662
1749
|
return _handleMicrophoneListUpdated;
|
|
1663
1750
|
}()
|
|
1664
|
-
/**
|
|
1665
|
-
* 某些情况下需要重新创建 Track,比如:
|
|
1666
|
-
* 1.浏览器中耳机插入,可能导致系统默认设备变更,此时应该重新创建 track
|
|
1667
|
-
* 2.客户端中,系统默认设备变更时,并不会有回调发生,但是需要在下次开启或关闭设备时纠正当前系统设备ID
|
|
1668
|
-
*/
|
|
1669
|
-
}, {
|
|
1670
|
-
key: "_refreshMicrophoneTrack",
|
|
1671
|
-
value: function _refreshMicrophoneTrack() {
|
|
1672
|
-
var _this$_microphoneAudi9, _this$_microphoneAudi0;
|
|
1673
|
-
(_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
|
|
1674
|
-
(_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
|
|
1675
|
-
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
|
|
1676
|
-
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1677
|
-
if (this.microphoneEnabled) {
|
|
1678
|
-
this._microphoneAudioTrack.start();
|
|
1679
|
-
} else {
|
|
1680
|
-
this._microphoneAudioTrack.stop();
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
1751
|
}, {
|
|
1684
1752
|
key: "_handleSpeakerAdded",
|
|
1685
1753
|
value: function () {
|
|
1686
|
-
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1687
|
-
return _regenerator["default"].wrap(function (
|
|
1688
|
-
while (1) switch (
|
|
1754
|
+
var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
|
|
1755
|
+
return _regenerator["default"].wrap(function (_context19) {
|
|
1756
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1689
1757
|
case 0:
|
|
1690
|
-
|
|
1758
|
+
_context19.next = 1;
|
|
1691
1759
|
return this._handleSpeakerListUpdated();
|
|
1692
1760
|
case 1:
|
|
1693
1761
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1694
1762
|
case 2:
|
|
1695
1763
|
case "end":
|
|
1696
|
-
return
|
|
1764
|
+
return _context19.stop();
|
|
1697
1765
|
}
|
|
1698
|
-
},
|
|
1766
|
+
}, _callee19, this);
|
|
1699
1767
|
}));
|
|
1700
1768
|
function _handleSpeakerAdded() {
|
|
1701
1769
|
return _handleSpeakerAdded2.apply(this, arguments);
|
|
@@ -1705,33 +1773,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1705
1773
|
}, {
|
|
1706
1774
|
key: "_handleSpeakerRemoved",
|
|
1707
1775
|
value: function () {
|
|
1708
|
-
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1709
|
-
var
|
|
1776
|
+
var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee20() {
|
|
1777
|
+
var _this1 = this;
|
|
1710
1778
|
var currentDeviceExist;
|
|
1711
|
-
return _regenerator["default"].wrap(function (
|
|
1712
|
-
while (1) switch (
|
|
1779
|
+
return _regenerator["default"].wrap(function (_context20) {
|
|
1780
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
1713
1781
|
case 0:
|
|
1714
|
-
|
|
1782
|
+
_context20.next = 1;
|
|
1715
1783
|
return this._handleSpeakerListUpdated();
|
|
1716
1784
|
case 1:
|
|
1717
1785
|
// 如何设备移除了,应该切到跟随系统
|
|
1718
1786
|
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1719
|
-
return item.deviceId ===
|
|
1787
|
+
return item.deviceId === _this1._speakerDevice.id;
|
|
1720
1788
|
});
|
|
1721
1789
|
if (currentDeviceExist) {
|
|
1722
|
-
|
|
1790
|
+
_context20.next = 2;
|
|
1723
1791
|
break;
|
|
1724
1792
|
}
|
|
1725
1793
|
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1726
|
-
|
|
1794
|
+
_context20.next = 2;
|
|
1727
1795
|
return this.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1728
1796
|
case 2:
|
|
1729
1797
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1730
1798
|
case 3:
|
|
1731
1799
|
case "end":
|
|
1732
|
-
return
|
|
1800
|
+
return _context20.stop();
|
|
1733
1801
|
}
|
|
1734
|
-
},
|
|
1802
|
+
}, _callee20, this);
|
|
1735
1803
|
}));
|
|
1736
1804
|
function _handleSpeakerRemoved() {
|
|
1737
1805
|
return _handleSpeakerRemoved2.apply(this, arguments);
|
|
@@ -1741,24 +1809,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1741
1809
|
}, {
|
|
1742
1810
|
key: "_handleSpeakerListUpdated",
|
|
1743
1811
|
value: function () {
|
|
1744
|
-
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1745
|
-
var
|
|
1812
|
+
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee21() {
|
|
1813
|
+
var _this10 = this;
|
|
1746
1814
|
var speakerList;
|
|
1747
|
-
return _regenerator["default"].wrap(function (
|
|
1748
|
-
while (1) switch (
|
|
1815
|
+
return _regenerator["default"].wrap(function (_context21) {
|
|
1816
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1749
1817
|
case 0:
|
|
1750
|
-
|
|
1818
|
+
_context21.next = 1;
|
|
1751
1819
|
return this._getSpeakerList();
|
|
1752
1820
|
case 1:
|
|
1753
|
-
speakerList =
|
|
1821
|
+
speakerList = _context21.sent;
|
|
1754
1822
|
(0, _mobx.runInAction)(function () {
|
|
1755
|
-
|
|
1823
|
+
_this10.speakerList = speakerList;
|
|
1756
1824
|
});
|
|
1757
1825
|
case 2:
|
|
1758
1826
|
case "end":
|
|
1759
|
-
return
|
|
1827
|
+
return _context21.stop();
|
|
1760
1828
|
}
|
|
1761
|
-
},
|
|
1829
|
+
}, _callee21, this);
|
|
1762
1830
|
}));
|
|
1763
1831
|
function _handleSpeakerListUpdated() {
|
|
1764
1832
|
return _handleSpeakerListUpdated2.apply(this, arguments);
|
|
@@ -1768,19 +1836,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1768
1836
|
}, {
|
|
1769
1837
|
key: "_getMicrophoneList",
|
|
1770
1838
|
value: function () {
|
|
1771
|
-
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1839
|
+
var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee22() {
|
|
1772
1840
|
var defaultDevice, list, defaultIdDevice;
|
|
1773
|
-
return _regenerator["default"].wrap(function (
|
|
1774
|
-
while (1) switch (
|
|
1841
|
+
return _regenerator["default"].wrap(function (_context22) {
|
|
1842
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1775
1843
|
case 0:
|
|
1776
|
-
|
|
1844
|
+
_context22.next = 1;
|
|
1777
1845
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1778
1846
|
case 1:
|
|
1779
|
-
defaultDevice =
|
|
1780
|
-
|
|
1847
|
+
defaultDevice = _context22.sent;
|
|
1848
|
+
_context22.next = 2;
|
|
1781
1849
|
return this._mediaControl.getMicrophoneList();
|
|
1782
1850
|
case 2:
|
|
1783
|
-
list =
|
|
1851
|
+
list = _context22.sent;
|
|
1784
1852
|
list.forEach(function (item) {
|
|
1785
1853
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1786
1854
|
if (results && results.length > 1) {
|
|
@@ -1811,12 +1879,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1811
1879
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1812
1880
|
});
|
|
1813
1881
|
}
|
|
1814
|
-
return
|
|
1882
|
+
return _context22.abrupt("return", list);
|
|
1815
1883
|
case 3:
|
|
1816
1884
|
case "end":
|
|
1817
|
-
return
|
|
1885
|
+
return _context22.stop();
|
|
1818
1886
|
}
|
|
1819
|
-
},
|
|
1887
|
+
}, _callee22, this);
|
|
1820
1888
|
}));
|
|
1821
1889
|
function _getMicrophoneList() {
|
|
1822
1890
|
return _getMicrophoneList2.apply(this, arguments);
|
|
@@ -1826,19 +1894,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1826
1894
|
}, {
|
|
1827
1895
|
key: "_getSpeakerList",
|
|
1828
1896
|
value: function () {
|
|
1829
|
-
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1897
|
+
var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee23() {
|
|
1830
1898
|
var defaultDevice, list, defaultIdDevice;
|
|
1831
|
-
return _regenerator["default"].wrap(function (
|
|
1832
|
-
while (1) switch (
|
|
1899
|
+
return _regenerator["default"].wrap(function (_context23) {
|
|
1900
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1833
1901
|
case 0:
|
|
1834
|
-
|
|
1902
|
+
_context23.next = 1;
|
|
1835
1903
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1836
1904
|
case 1:
|
|
1837
|
-
defaultDevice =
|
|
1838
|
-
|
|
1905
|
+
defaultDevice = _context23.sent;
|
|
1906
|
+
_context23.next = 2;
|
|
1839
1907
|
return this._mediaControl.getSpeakerList();
|
|
1840
1908
|
case 2:
|
|
1841
|
-
list =
|
|
1909
|
+
list = _context23.sent;
|
|
1842
1910
|
list.forEach(function (item) {
|
|
1843
1911
|
var results = /^default \((.*)\)$/.exec(item.deviceName);
|
|
1844
1912
|
if (results && results.length > 1) {
|
|
@@ -1868,12 +1936,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1868
1936
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
1869
1937
|
});
|
|
1870
1938
|
}
|
|
1871
|
-
return
|
|
1939
|
+
return _context23.abrupt("return", list);
|
|
1872
1940
|
case 3:
|
|
1873
1941
|
case "end":
|
|
1874
|
-
return
|
|
1942
|
+
return _context23.stop();
|
|
1875
1943
|
}
|
|
1876
|
-
},
|
|
1944
|
+
}, _callee23, this);
|
|
1877
1945
|
}));
|
|
1878
1946
|
function _getSpeakerList() {
|
|
1879
1947
|
return _getSpeakerList2.apply(this, arguments);
|
|
@@ -1885,37 +1953,20 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1885
1953
|
value: function setMainRoomAudioOff(enable) {
|
|
1886
1954
|
this.isMainRoomAudioOff = enable;
|
|
1887
1955
|
}
|
|
1888
|
-
}, {
|
|
1889
|
-
key: "_getDefaultDeviceId",
|
|
1890
|
-
value: function _getDefaultDeviceId(_ref6) {
|
|
1891
|
-
var _this$_userSettingSto2;
|
|
1892
|
-
var initValue = _ref6.initValue,
|
|
1893
|
-
localKey = _ref6.localKey,
|
|
1894
|
-
list = _ref6.list;
|
|
1895
|
-
var localSetting = (_this$_userSettingSto2 = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto2 === void 0 ? void 0 : _this$_userSettingSto2.setting;
|
|
1896
|
-
var defaultValue = initValue;
|
|
1897
|
-
if (localSetting && localSetting[localKey]) {
|
|
1898
|
-
var _list$find$deviceId, _list$find;
|
|
1899
|
-
defaultValue = (_list$find$deviceId = (_list$find = list.find(function (item) {
|
|
1900
|
-
return item.deviceId === localSetting[localKey];
|
|
1901
|
-
})) === null || _list$find === void 0 ? void 0 : _list$find.deviceId) !== null && _list$find$deviceId !== void 0 ? _list$find$deviceId : defaultValue;
|
|
1902
|
-
}
|
|
1903
|
-
return defaultValue;
|
|
1904
|
-
}
|
|
1905
1956
|
}, {
|
|
1906
1957
|
key: "_loadBuiltinResources",
|
|
1907
1958
|
value: function () {
|
|
1908
|
-
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1959
|
+
var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee24() {
|
|
1909
1960
|
var _window$runtime,
|
|
1910
|
-
|
|
1961
|
+
_this11 = this;
|
|
1911
1962
|
var _yield$window$runtime, virtualBackgroundImages, virtualBackgroundVideos, soundEffects, newVirtualBackgroundList, images, videos, sounds;
|
|
1912
|
-
return _regenerator["default"].wrap(function (
|
|
1913
|
-
while (1) switch (
|
|
1963
|
+
return _regenerator["default"].wrap(function (_context24) {
|
|
1964
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1914
1965
|
case 0:
|
|
1915
|
-
|
|
1966
|
+
_context24.next = 1;
|
|
1916
1967
|
return (_window$runtime = window.runtime) === null || _window$runtime === void 0 ? void 0 : _window$runtime.loadBuiltinResources();
|
|
1917
1968
|
case 1:
|
|
1918
|
-
_yield$window$runtime =
|
|
1969
|
+
_yield$window$runtime = _context24.sent;
|
|
1919
1970
|
virtualBackgroundImages = _yield$window$runtime.virtualBackgroundImages;
|
|
1920
1971
|
virtualBackgroundVideos = _yield$window$runtime.virtualBackgroundVideos;
|
|
1921
1972
|
soundEffects = _yield$window$runtime.soundEffects;
|
|
@@ -1948,16 +1999,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1948
1999
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(images);
|
|
1949
2000
|
newVirtualBackgroundList = newVirtualBackgroundList.concat(videos);
|
|
1950
2001
|
(0, _mobx.runInAction)(function () {
|
|
1951
|
-
|
|
2002
|
+
_this11._updateVirtualBackgroundList(newVirtualBackgroundList);
|
|
1952
2003
|
sounds.forEach(function (item) {
|
|
1953
|
-
|
|
2004
|
+
_this11.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
|
|
1954
2005
|
});
|
|
1955
2006
|
});
|
|
1956
2007
|
case 2:
|
|
1957
2008
|
case "end":
|
|
1958
|
-
return
|
|
2009
|
+
return _context24.stop();
|
|
1959
2010
|
}
|
|
1960
|
-
},
|
|
2011
|
+
}, _callee24, this);
|
|
1961
2012
|
}));
|
|
1962
2013
|
function _loadBuiltinResources() {
|
|
1963
2014
|
return _loadBuiltinResources2.apply(this, arguments);
|
|
@@ -1967,14 +2018,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1967
2018
|
}]);
|
|
1968
2019
|
}();
|
|
1969
2020
|
_FcrUIDeviceProviderImpl = FcrUIDeviceProviderImpl;
|
|
1970
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
2021
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDevice"], [_mobx.observable, 1, "_microphone"], [_mobx.observable, 1, "_speakerDevice"], [_mobx.observable, 1, "_speaker"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_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"], [_initDeviceListDecs, 18, "initDeviceList"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_handleSpeakerDetectingChangedDecs, 18, "_handleSpeakerDetectingChanged"], [_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"], [_handleMicrophoneAudioTrackDecs, 18, "_handleMicrophoneAudioTrack"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_handleMicrophoneEnabledChangedDecs, 18, "_handleMicrophoneEnabledChanged"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_handleMicrophoneDetectingChangedDecs, 18, "_handleMicrophoneDetectingChanged"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_imports.bound, 2, "_handleMicrophoneIdChanged"], [_imports.bound, 2, "_handleMicrophoneDeviceIdChanged"], [_imports.bound, 2, "_handleSpeakerDeviceIdChanged"], [_imports.bound, 2, "_handleSpeakerIdChanged"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_loadUiResourcesDecs, 18, "loadUiResources"], [_imports.bound, 2, "toggleAGC"], [_setConnectTypeDecs, 18, "setConnectType"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSystemSelectedSpeakerChangedDecs, 18, "_handleSystemSelectedSpeakerChanged"], [_handleSystemSelectedMicrophoneChangedDecs, 18, "_handleSystemSelectedMicrophoneChanged"], [_correctSystemSelectedMicrophoneDeviceIdDecs, 18, "_correctSystemSelectedMicrophoneDeviceId"], [_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);
|
|
2022
|
+
_init__microphoneDevice = _applyDecs$e[0];
|
|
2023
|
+
_init__microphone = _applyDecs$e[1];
|
|
2024
|
+
_init__speakerDevice = _applyDecs$e[2];
|
|
2025
|
+
_init__speaker = _applyDecs$e[3];
|
|
2026
|
+
_init_currentIsMirror = _applyDecs$e[4];
|
|
2027
|
+
_init_showForceOpenEffectDialog = _applyDecs$e[5];
|
|
2028
|
+
_init_cameraId = _applyDecs$e[6];
|
|
1978
2029
|
_init_cameraEnabled = _applyDecs$e[7];
|
|
1979
2030
|
_init_showCameraPreview = _applyDecs$e[8];
|
|
1980
2031
|
_init_microphoneEnabled = _applyDecs$e[9];
|