fcr-ui-scene 3.8.1 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules/dialog/dialogs/connection-gateway/tabs.d.ts +0 -1
- package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +2 -13
- package/lib/modules/invite/index.d.ts +4 -1
- package/lib/modules/invite/index.js +5 -2
- package/lib/modules/invite/store.d.ts +4 -0
- package/lib/modules/invite/store.js +48 -9
- package/lib/modules/invite/view.d.ts +4 -1
- package/lib/modules/invite/view.js +25 -10
- package/lib/modules/pc-audio-connect/main-scene/index.d.ts +0 -1
- package/lib/modules/pc-audio-connect/main-scene/index.js +2 -4
- package/lib/modules/pc-audio-connect/main-scene/store.d.ts +0 -3
- package/lib/modules/pc-audio-connect/main-scene/store.js +7 -43
- package/lib/modules/widget/store.electron.js +1 -1
- package/lib/scenes/main-scene.js +3 -2
- package/lib-es/assets/mic-loading.gif +0 -0
- package/lib-es/base.js +335 -0
- package/lib-es/creator/index.js +543 -0
- package/lib-es/creator/provider-initializer.browser.js +322 -0
- package/lib-es/creator/provider-initializer.electron.js +359 -0
- package/lib-es/creator/type.js +1 -0
- package/lib-es/electron/app.js +247 -0
- package/lib-es/electron/asar-validation.js +106 -0
- package/lib-es/electron/bootstrap-dev.js +45 -0
- package/lib-es/electron/bootstrap-sdk.js +198 -0
- package/lib-es/electron/default-options.js +18 -0
- package/lib-es/electron/env.js +8 -0
- package/lib-es/electron/exit-codes.js +20 -0
- package/lib-es/electron/hang-detection/index.js +2 -0
- package/lib-es/electron/hang-detection/manager.js +225 -0
- package/lib-es/electron/hang-detection/types.js +1 -0
- package/lib-es/electron/index.js +2 -0
- package/lib-es/electron/injections.js +830 -0
- package/lib-es/electron/ipc/ipc.js +134 -0
- package/lib-es/electron/ipc/type.js +22 -0
- package/lib-es/electron/ipc-protocol.js +58 -0
- package/lib-es/electron/logger.js +57 -0
- package/lib-es/electron/main.js +116 -0
- package/lib-es/electron/plugins/devtool-shortcut.js +26 -0
- package/lib-es/electron/plugins/meeting-state.js +32 -0
- package/lib-es/electron/plugins/screenshot.js +46 -0
- package/lib-es/electron/preload.js +42 -0
- package/lib-es/electron/process-manager/constants.js +1 -0
- package/lib-es/electron/process-manager/event-manager.js +242 -0
- package/lib-es/electron/process-manager/index.js +842 -0
- package/lib-es/electron/process-manager/state-manager.js +354 -0
- package/lib-es/electron/process-manager/types.js +78 -0
- package/lib-es/electron/sdk-helper.js +305 -0
- package/lib-es/electron/struct.js +21 -0
- package/lib-es/electron/until.js +64 -0
- package/lib-es/electron/window-proxy/browser-window-proxy.js +720 -0
- package/lib-es/electron/window-proxy/main-process-handler.js +441 -0
- package/lib-es/electron/window.js +91 -0
- package/lib-es/fragments/annotation/index.js +130 -0
- package/lib-es/fragments/annotation/libs.js +86 -0
- package/lib-es/fragments/annotation/store.js +866 -0
- package/lib-es/fragments/annotation/style.css +9 -0
- package/lib-es/fragments/annotation/toolbar/components/color-tool/color-panel/index.js +40 -0
- package/lib-es/fragments/annotation/toolbar/components/color-tool/index.js +48 -0
- package/lib-es/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/index.js +55 -0
- package/lib-es/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/libs.js +57 -0
- package/lib-es/fragments/annotation/toolbar/components/graphic-tool/index.js +62 -0
- package/lib-es/fragments/annotation/toolbar/components/item/item.js +106 -0
- package/lib-es/fragments/annotation/toolbar/components/item/style.css +45 -0
- package/lib-es/fragments/annotation/toolbar/components/panel/index.js +15 -0
- package/lib-es/fragments/annotation/toolbar/components/panel/style.css +24 -0
- package/lib-es/fragments/annotation/toolbar/components/pen-tool/index.js +54 -0
- package/lib-es/fragments/annotation/toolbar/components/pen-tool/pen-panel/index.js +28 -0
- package/lib-es/fragments/annotation/toolbar/components/tips/index.js +18 -0
- package/lib-es/fragments/annotation/toolbar/components/tips/style.css +19 -0
- package/lib-es/fragments/annotation/toolbar/store.js +292 -0
- package/lib-es/fragments/annotation/toolbar/style.css +55 -0
- package/lib-es/fragments/annotation/toolbar/view.js +140 -0
- package/lib-es/fragments/annotation/utils.js +20 -0
- package/lib-es/fragments/annotation/view.js +59 -0
- package/lib-es/fragments/base.js +40 -0
- package/lib-es/fragments/whiteboard/cursor.css +77 -0
- package/lib-es/fragments/whiteboard/index.js +80 -0
- package/lib-es/fragments/whiteboard/store.js +487 -0
- package/lib-es/fragments/whiteboard/style.css +4 -0
- package/lib-es/fragments/whiteboard/view.js +24 -0
- package/lib-es/global.css +62 -0
- package/lib-es/global.d.ts +27 -0
- package/lib-es/hooks/i18n.js +10 -0
- package/lib-es/index.js +38 -0
- package/lib-es/modules/action-bar/components/apps/index.js +43 -0
- package/lib-es/modules/action-bar/components/board/index.js +25 -0
- package/lib-es/modules/action-bar/components/breakout-room/index.js +23 -0
- package/lib-es/modules/action-bar/components/chat/index.css +88 -0
- package/lib-es/modules/action-bar/components/chat/index.js +126 -0
- package/lib-es/modules/action-bar/components/collapse/index.js +203 -0
- package/lib-es/modules/action-bar/components/confirm-leave-meeting/index.js +70 -0
- package/lib-es/modules/action-bar/components/interpreter/index.js +34 -0
- package/lib-es/modules/action-bar/components/item/index.js +158 -0
- package/lib-es/modules/action-bar/components/leave/index.js +118 -0
- package/lib-es/modules/action-bar/components/live-streaming/index.js +32 -0
- package/lib-es/modules/action-bar/components/more/index.css +114 -0
- package/lib-es/modules/action-bar/components/more/index.js +79 -0
- package/lib-es/modules/action-bar/components/more/poppover-content.js +410 -0
- package/lib-es/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
- package/lib-es/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
- package/lib-es/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
- package/lib-es/modules/action-bar/components/notification-bar/components/interpreter/index.js +93 -0
- package/lib-es/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
- package/lib-es/modules/action-bar/components/notification-bar/components/virtual-image/index.js +25 -0
- package/lib-es/modules/action-bar/components/notification-bar/index.css +74 -0
- package/lib-es/modules/action-bar/components/notification-bar/index.js +96 -0
- package/lib-es/modules/action-bar/components/participants/index.css +21 -0
- package/lib-es/modules/action-bar/components/participants/index.js +52 -0
- package/lib-es/modules/action-bar/components/placement/index.js +10 -0
- package/lib-es/modules/action-bar/components/record/index.css +39 -0
- package/lib-es/modules/action-bar/components/record/index.js +89 -0
- package/lib-es/modules/action-bar/components/record/popover.js +50 -0
- package/lib-es/modules/action-bar/components/record/stop-record-dialog.js +41 -0
- package/lib-es/modules/action-bar/components/respond/index.js +25 -0
- package/lib-es/modules/action-bar/components/screen-share/index.browser.js +61 -0
- package/lib-es/modules/action-bar/components/screen-share/index.electron.js +78 -0
- package/lib-es/modules/action-bar/components/screen-share/index.js +4 -0
- package/lib-es/modules/action-bar/components/screen-share/submenu.js +219 -0
- package/lib-es/modules/action-bar/components/security/index.js +42 -0
- package/lib-es/modules/action-bar/components/settings/index.js +29 -0
- package/lib-es/modules/action-bar/components/smaller/index.js +45 -0
- package/lib-es/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
- package/lib-es/modules/action-bar/components/trigger-output-language/index.css +86 -0
- package/lib-es/modules/action-bar/components/trigger-output-language/index.js +228 -0
- package/lib-es/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
- package/lib-es/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +62 -0
- package/lib-es/modules/action-bar/components/trigger-subscribe-language/index.js +216 -0
- package/lib-es/modules/action-bar/constants.js +1 -0
- package/lib-es/modules/action-bar/enums.js +28 -0
- package/lib-es/modules/action-bar/index.css +358 -0
- package/lib-es/modules/action-bar/main-scene/index.js +123 -0
- package/lib-es/modules/action-bar/main-scene/store.base.js +1486 -0
- package/lib-es/modules/action-bar/main-scene/store.browser.js +105 -0
- package/lib-es/modules/action-bar/main-scene/store.electron.js +94 -0
- package/lib-es/modules/action-bar/main-scene/view.js +105 -0
- package/lib-es/modules/action-bar/type.js +6 -0
- package/lib-es/modules/action-bar/waiting-scene/index.js +94 -0
- package/lib-es/modules/action-bar/waiting-scene/store.base.js +88 -0
- package/lib-es/modules/action-bar/waiting-scene/store.browser.js +17 -0
- package/lib-es/modules/action-bar/waiting-scene/store.electron.js +37 -0
- package/lib-es/modules/action-bar/waiting-scene/view.js +116 -0
- package/lib-es/modules/audio-stream/index.js +393 -0
- package/lib-es/modules/caption/draggable-container/index.css +10 -0
- package/lib-es/modules/caption/draggable-container/index.js +159 -0
- package/lib-es/modules/caption/index.js +117 -0
- package/lib-es/modules/caption/store.js +352 -0
- package/lib-es/modules/caption/type.js +7 -0
- package/lib-es/modules/caption/view.css +158 -0
- package/lib-es/modules/caption/view.js +266 -0
- package/lib-es/modules/chat/chat-room-store.js +923 -0
- package/lib-es/modules/chat/components/chat-action/index.js +21 -0
- package/lib-es/modules/chat/components/chat-bar/index.css +89 -0
- package/lib-es/modules/chat/components/chat-bar/index.js +141 -0
- package/lib-es/modules/chat/components/chat-select/index.css +185 -0
- package/lib-es/modules/chat/components/chat-select/index.js +100 -0
- package/lib-es/modules/chat/components/chat-select/select-input/index.js +27 -0
- package/lib-es/modules/chat/components/chat-select/select-item/index.js +150 -0
- package/lib-es/modules/chat/components/chat-tabs/index.js +53 -0
- package/lib-es/modules/chat/components/message-list/chat-empty/index.js +18 -0
- package/lib-es/modules/chat/components/message-list/history-unread-message-button/index.js +48 -0
- package/lib-es/modules/chat/components/message-list/index.js +327 -0
- package/lib-es/modules/chat/components/message-list/message-item/index.js +343 -0
- package/lib-es/modules/chat/components/message-list/scroll-bottom-button/index.js +60 -0
- package/lib-es/modules/chat/index.css +124 -0
- package/lib-es/modules/chat/index.dev.js +71 -0
- package/lib-es/modules/chat/index.js +168 -0
- package/lib-es/modules/chat/mock.js +276 -0
- package/lib-es/modules/chat/store.js +359 -0
- package/lib-es/modules/chat/types.js +12 -0
- package/lib-es/modules/chat/util.js +63 -0
- package/lib-es/modules/chat/view.js +312 -0
- package/lib-es/modules/components/annotation-menu/index.js +104 -0
- package/lib-es/modules/components/apps/app-item/index.css +49 -0
- package/lib-es/modules/components/apps/app-item/index.js +130 -0
- package/lib-es/modules/components/apps/app-list.js +49 -0
- package/lib-es/modules/components/apps/index.css +9 -0
- package/lib-es/modules/components/apps/types.js +1 -0
- package/lib-es/modules/components/caption-menu/index.css +58 -0
- package/lib-es/modules/components/caption-menu/index.js +108 -0
- package/lib-es/modules/components/caption-menu/participants-privilege-control-options.js +65 -0
- package/lib-es/modules/components/caption-menu/steps/index.css +73 -0
- package/lib-es/modules/components/caption-menu/steps/index.js +49 -0
- package/lib-es/modules/components/caption-menu/translation-setting-options.js +180 -0
- package/lib-es/modules/components/control-bar/components/loading/index.css +76 -0
- package/lib-es/modules/components/control-bar/components/loading/index.js +56 -0
- package/lib-es/modules/components/control-bar/components/loading/loading.png +0 -0
- package/lib-es/modules/components/control-bar/components/progress/index.js +36 -0
- package/lib-es/modules/components/control-bar/components/progress/style.css +51 -0
- package/lib-es/modules/components/control-bar/components/switch-theme/index.css +101 -0
- package/lib-es/modules/components/control-bar/components/switch-theme/index.js +86 -0
- package/lib-es/modules/components/control-bar/components/switch-theme/item.js +46 -0
- package/lib-es/modules/components/control-bar/components/switch-theme/libs.js +24 -0
- package/lib-es/modules/components/control-bar/index.css +99 -0
- package/lib-es/modules/components/control-bar/index.js +357 -0
- package/lib-es/modules/components/device-control/components/audio-menu/index.js +167 -0
- package/lib-es/modules/components/device-control/components/carmera/index.js +108 -0
- package/lib-es/modules/components/device-control/components/microphone/index.js +182 -0
- package/lib-es/modules/components/device-control/components/none-menu/index.js +61 -0
- package/lib-es/modules/components/device-control/components/phone-menu/index.js +54 -0
- package/lib-es/modules/components/device-control/components/video-menu/index.js +105 -0
- package/lib-es/modules/components/device-control/hooks/index.js +34 -0
- package/lib-es/modules/components/device-control/index.css +177 -0
- package/lib-es/modules/components/device-control/index.js +14 -0
- package/lib-es/modules/components/device-control/main-scene/store.js +88 -0
- package/lib-es/modules/components/device-control/store.base.js +242 -0
- package/lib-es/modules/components/device-control/type.js +1 -0
- package/lib-es/modules/components/device-control/waiting-scene/store.js +84 -0
- package/lib-es/modules/components/leave-meeting/components/assign-host.js +101 -0
- package/lib-es/modules/components/leave-meeting/components/index.css +151 -0
- package/lib-es/modules/components/leave-meeting/index.js +148 -0
- package/lib-es/modules/components/leave-meeting/main-scene/store.js +107 -0
- package/lib-es/modules/components/leave-meeting/portal.js +22 -0
- package/lib-es/modules/components/leave-meeting/store.base.js +299 -0
- package/lib-es/modules/components/leave-meeting/style.css +9 -0
- package/lib-es/modules/components/leave-meeting/type.js +1 -0
- package/lib-es/modules/components/leave-meeting/waiting-scene/store.js +98 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/audio-control.js +35 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +162 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/icon-status.js +80 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/layout/index.js +23 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +128 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/share-status.js +34 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/user-info.js +105 -0
- package/lib-es/modules/components/member-window/components/member-actions/components/user-tag.js +51 -0
- package/lib-es/modules/components/member-window/components/member-actions/index.js +98 -0
- package/lib-es/modules/components/member-window/components/member-actions/libs/index.js +14 -0
- package/lib-es/modules/components/member-window/components/member-actions/provider.js +70 -0
- package/lib-es/modules/components/member-window/components/member-actions/store.js +430 -0
- package/lib-es/modules/components/member-window/components/mic-volume.js +16 -0
- package/lib-es/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +104 -0
- package/lib-es/modules/components/member-window/components/video-player/components/local-video-player.js +1 -0
- package/lib-es/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +60 -0
- package/lib-es/modules/components/member-window/components/video-player/components/remote-video-player.js +1 -0
- package/lib-es/modules/components/member-window/components/video-player/components/zoomable-container.js +223 -0
- package/lib-es/modules/components/member-window/components/video-player/index.js +37 -0
- package/lib-es/modules/components/member-window/index.css +502 -0
- package/lib-es/modules/components/member-window/index.js +179 -0
- package/lib-es/modules/components/member-window/types.js +1 -0
- package/lib-es/modules/components/security-menu/index.css +42 -0
- package/lib-es/modules/components/security-menu/index.js +472 -0
- package/lib-es/modules/components/security-menu/store.js +388 -0
- package/lib-es/modules/components/security-menu/type.js +1 -0
- package/lib-es/modules/components/tab-frame/index.css +40 -0
- package/lib-es/modules/components/tab-frame/index.js +51 -0
- package/lib-es/modules/components/toolbar/components/capture-tool/index.js +58 -0
- package/lib-es/modules/components/toolbar/components/clean-tool/index.js +63 -0
- package/lib-es/modules/components/toolbar/components/color-tool/color-panel/index.js +70 -0
- package/lib-es/modules/components/toolbar/components/color-tool/index.js +58 -0
- package/lib-es/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +57 -0
- package/lib-es/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +57 -0
- package/lib-es/modules/components/toolbar/components/graphic-tool/index.js +72 -0
- package/lib-es/modules/components/toolbar/components/group-tool/index.js +35 -0
- package/lib-es/modules/components/toolbar/components/icons/fold-icon.js +33 -0
- package/lib-es/modules/components/toolbar/components/icons/move-icon.js +59 -0
- package/lib-es/modules/components/toolbar/components/item/index.js +157 -0
- package/lib-es/modules/components/toolbar/components/item/style.css +94 -0
- package/lib-es/modules/components/toolbar/components/multiple-color-tool/index.js +67 -0
- package/lib-es/modules/components/toolbar/components/panel/index.js +21 -0
- package/lib-es/modules/components/toolbar/components/panel/style.css +86 -0
- package/lib-es/modules/components/toolbar/components/pen-tool/index.js +54 -0
- package/lib-es/modules/components/toolbar/components/pen-tool/pen-panel/index.js +32 -0
- package/lib-es/modules/components/toolbar/components/save-draft/index.js +51 -0
- package/lib-es/modules/components/toolbar/components/vertical-frame/index.js +176 -0
- package/lib-es/modules/components/toolbar/hooks/use-resize-visible.js +64 -0
- package/lib-es/modules/components/toolbar/index.js +235 -0
- package/lib-es/modules/components/toolbar/style.css +85 -0
- package/lib-es/modules/components/toolbar/types.js +1 -0
- package/lib-es/modules/connection-gateway/components/computer/index.css +12 -0
- package/lib-es/modules/connection-gateway/components/computer/index.js +59 -0
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.css +36 -0
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.js +71 -0
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.css +72 -0
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.js +51 -0
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.css +10 -0
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.js +17 -0
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.css +46 -0
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.js +29 -0
- package/lib-es/modules/connection-gateway/components/phone/index.css +49 -0
- package/lib-es/modules/connection-gateway/components/phone/index.js +177 -0
- package/lib-es/modules/connection-gateway/enums.js +5 -0
- package/lib-es/modules/connection-gateway/index.css +6 -0
- package/lib-es/modules/connection-gateway/index.js +60 -0
- package/lib-es/modules/connection-gateway/store.js +709 -0
- package/lib-es/modules/connection-gateway/types.js +1 -0
- package/lib-es/modules/connection-gateway/view.js +31 -0
- package/lib-es/modules/control-bar/components/apps-popover/index.js +34 -0
- package/lib-es/modules/control-bar/components/boundary-detector.js +49 -0
- package/lib-es/modules/control-bar/components/carmera/index.js +107 -0
- package/lib-es/modules/control-bar/components/cloud-recording-buttons.js +109 -0
- package/lib-es/modules/control-bar/components/meeting-details/index.css +133 -0
- package/lib-es/modules/control-bar/components/meeting-details/index.js +230 -0
- package/lib-es/modules/control-bar/components/microphone/index.js +185 -0
- package/lib-es/modules/control-bar/components/more-actions/index.css +103 -0
- package/lib-es/modules/control-bar/components/more-actions/index.js +158 -0
- package/lib-es/modules/control-bar/components/share-audio/index.css +90 -0
- package/lib-es/modules/control-bar/components/share-audio/index.js +142 -0
- package/lib-es/modules/control-bar/components/share-state-nav/index.css +79 -0
- package/lib-es/modules/control-bar/components/share-state-nav/index.js +122 -0
- package/lib-es/modules/control-bar/components/stop-live-streaming/index.js +29 -0
- package/lib-es/modules/control-bar/components/stop-live-streaming/stop-button.js +28 -0
- package/lib-es/modules/control-bar/components/transfer-position-icon/index.js +34 -0
- package/lib-es/modules/control-bar/context.js +5 -0
- package/lib-es/modules/control-bar/enums.js +27 -0
- package/lib-es/modules/control-bar/hooks.js +168 -0
- package/lib-es/modules/control-bar/index.css +340 -0
- package/lib-es/modules/control-bar/index.dev.js +37 -0
- package/lib-es/modules/control-bar/index.js +144 -0
- package/lib-es/modules/control-bar/store.js +781 -0
- package/lib-es/modules/control-bar/type.js +1 -0
- package/lib-es/modules/control-bar/view.js +663 -0
- package/lib-es/modules/device-pretest/assets/virtual-backdound-resources.js +14 -0
- package/lib-es/modules/device-pretest/audio-preview/microphone-detection.js +64 -0
- package/lib-es/modules/device-pretest/audio-preview/speaker-control.js +58 -0
- package/lib-es/modules/device-pretest/audio-preview/speaker-detection.js +63 -0
- package/lib-es/modules/device-pretest/index.css +123 -0
- package/lib-es/modules/device-pretest/index.js +234 -0
- package/lib-es/modules/device-pretest/settings/beauty.js +107 -0
- package/lib-es/modules/device-pretest/settings/camera-select.js +45 -0
- package/lib-es/modules/device-pretest/settings/video-effect.js +43 -0
- package/lib-es/modules/device-pretest/settings/video-settings-basic.js +137 -0
- package/lib-es/modules/device-pretest/settings/virtual-background-setting.js +94 -0
- package/lib-es/modules/device-pretest/store.js +437 -0
- package/lib-es/modules/dialog/components/confirm/index.css +24 -0
- package/lib-es/modules/dialog/components/confirm/index.js +154 -0
- package/lib-es/modules/dialog/components/dialog-container/component/body.js +103 -0
- package/lib-es/modules/dialog/components/dialog-container/index.css +112 -0
- package/lib-es/modules/dialog/components/dialog-container/index.js +135 -0
- package/lib-es/modules/dialog/components/host-area-container/index.js +146 -0
- package/lib-es/modules/dialog/components/normal-window/index.js +53 -0
- package/lib-es/modules/dialog/dialogs/annotation-tool/index.js +47 -0
- package/lib-es/modules/dialog/dialogs/caption/index.js +35 -0
- package/lib-es/modules/dialog/dialogs/chat/components/actions.js +36 -0
- package/lib-es/modules/dialog/dialogs/chat/index.js +74 -0
- package/lib-es/modules/dialog/dialogs/confirm/index.css +24 -0
- package/lib-es/modules/dialog/dialogs/confirm/index.js +51 -0
- package/lib-es/modules/dialog/dialogs/confirm-leave-meeting/index.js +38 -0
- package/lib-es/modules/dialog/dialogs/connection-gateway/index.js +40 -0
- package/lib-es/modules/dialog/dialogs/connection-gateway/tabs.js +40 -0
- package/lib-es/modules/dialog/dialogs/control-bar/index.js +29 -0
- package/lib-es/modules/dialog/dialogs/control-bar-leave-meeting/index.js +33 -0
- package/lib-es/modules/dialog/dialogs/device-setting/index.css +26 -0
- package/lib-es/modules/dialog/dialogs/device-setting/index.js +36 -0
- package/lib-es/modules/dialog/dialogs/end-meeting/index.js +48 -0
- package/lib-es/modules/dialog/dialogs/interpreter/index.css +30 -0
- package/lib-es/modules/dialog/dialogs/interpreter/index.js +38 -0
- package/lib-es/modules/dialog/dialogs/invite/index.js +51 -0
- package/lib-es/modules/dialog/dialogs/live-streaming/index.js +30 -0
- package/lib-es/modules/dialog/dialogs/mute-all/index.css +20 -0
- package/lib-es/modules/dialog/dialogs/mute-all/index.js +42 -0
- package/lib-es/modules/dialog/dialogs/participant/components/actions.js +23 -0
- package/lib-es/modules/dialog/dialogs/participant/components/title.js +9 -0
- package/lib-es/modules/dialog/dialogs/participant/index.js +52 -0
- package/lib-es/modules/dialog/dialogs/rename/index.js +43 -0
- package/lib-es/modules/dialog/dialogs/sample-dialog/index.js +48 -0
- package/lib-es/modules/dialog/dialogs/share-screen-selection/index.js +32 -0
- package/lib-es/modules/dialog/dialogs/sub-window/index.js +31 -0
- package/lib-es/modules/dialog/dialogs/subtitles-history/index.js +44 -0
- package/lib-es/modules/dialog/dialogs/system-preference/assets/bg1.png +0 -0
- package/lib-es/modules/dialog/dialogs/system-preference/assets/bg2.png +0 -0
- package/lib-es/modules/dialog/dialogs/system-preference/assets/fcr_png_host.png +0 -0
- package/lib-es/modules/dialog/dialogs/system-preference/electron.js +31 -0
- package/lib-es/modules/dialog/dialogs/system-preference/index.css +52 -0
- package/lib-es/modules/dialog/dialogs/system-preference/index.js +130 -0
- package/lib-es/modules/dialog/dialogs/toast/index.js +28 -0
- package/lib-es/modules/dialog/dialogs/video-window/index.js +55 -0
- package/lib-es/modules/dialog/dialogs/whiteboard/index.js +60 -0
- package/lib-es/modules/dialog/dialogs/widget/index.js +40 -0
- package/lib-es/modules/dialog/hooks/use-web-drag.js +64 -0
- package/lib-es/modules/dialog/index.css +56 -0
- package/lib-es/modules/dialog/index.js +70 -0
- package/lib-es/modules/dialog/level-config.js +11 -0
- package/lib-es/modules/dialog/store.base.js +272 -0
- package/lib-es/modules/dialog/store.browser.js +135 -0
- package/lib-es/modules/dialog/store.electron.js +284 -0
- package/lib-es/modules/dialog/type.js +1 -0
- package/lib-es/modules/dialog/view.js +28 -0
- package/lib-es/modules/event-sound/enum.js +13 -0
- package/lib-es/modules/event-sound/index.js +49 -0
- package/lib-es/modules/event-sound/sound-effect-player.js +49 -0
- package/lib-es/modules/event-sound/store.js +275 -0
- package/lib-es/modules/event-sound/type.js +1 -0
- package/lib-es/modules/event-toast/index.css +25 -0
- package/lib-es/modules/event-toast/index.js +82 -0
- package/lib-es/modules/event-toast/store.base.js +193 -0
- package/lib-es/modules/event-toast/store.browser.js +23 -0
- package/lib-es/modules/event-toast/store.electron.js +138 -0
- package/lib-es/modules/event-toast/type.js +1 -0
- package/lib-es/modules/event-toast/view.js +37 -0
- package/lib-es/modules/interpreter/action/add-btn/index.css +4 -0
- package/lib-es/modules/interpreter/action/add-btn/index.js +35 -0
- package/lib-es/modules/interpreter/action/delete-btn/index.css +14 -0
- package/lib-es/modules/interpreter/action/delete-btn/index.js +31 -0
- package/lib-es/modules/interpreter/action/edit-btn/index.js +39 -0
- package/lib-es/modules/interpreter/action/switch-btn/index.css +3 -0
- package/lib-es/modules/interpreter/action/switch-btn/index.js +44 -0
- package/lib-es/modules/interpreter/dialog-content/index.css +33 -0
- package/lib-es/modules/interpreter/dialog-content/index.js +30 -0
- package/lib-es/modules/interpreter/footer/index.css +11 -0
- package/lib-es/modules/interpreter/footer/index.js +18 -0
- package/lib-es/modules/interpreter/index.css +4 -0
- package/lib-es/modules/interpreter/index.js +109 -0
- package/lib-es/modules/interpreter/interpreter-list/index.css +8 -0
- package/lib-es/modules/interpreter/interpreter-list/index.js +30 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +46 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +173 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ar.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_cn.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_de.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_en.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_es.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_fr.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_hi.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_id.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_it.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_jp.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ko.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ms.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_pt.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ru.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_th.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_tr.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_vi.png +0 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +169 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +46 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +120 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +51 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/index.css +32 -0
- package/lib-es/modules/interpreter/interpreter-list/interpreter-item/index.js +40 -0
- package/lib-es/modules/interpreter/loading-wrapper/index.css +53 -0
- package/lib-es/modules/interpreter/loading-wrapper/index.js +20 -0
- package/lib-es/modules/interpreter/store.js +614 -0
- package/lib-es/modules/interpreter/tooltip-wrapper/index.js +23 -0
- package/lib-es/modules/interpreter/type.js +5 -0
- package/lib-es/modules/interpreter/utils.js +54 -0
- package/lib-es/modules/interpreter/view.js +62 -0
- package/lib-es/modules/invite/components/error-tips.js +11 -0
- package/lib-es/modules/invite/components/pstn-invite.js +245 -0
- package/lib-es/modules/invite/components/voip-invite.css +26 -0
- package/lib-es/modules/invite/components/voip-invite.js +265 -0
- package/lib-es/modules/invite/enums.js +27 -0
- package/lib-es/modules/invite/index.css +331 -0
- package/lib-es/modules/invite/index.js +64 -0
- package/lib-es/modules/invite/store.js +578 -0
- package/lib-es/modules/invite/types.js +1 -0
- package/lib-es/modules/invite/view.js +46 -0
- package/lib-es/modules/layout/components/Aside.js +208 -0
- package/lib-es/modules/layout/components/Carousel.js +192 -0
- package/lib-es/modules/layout/components/CommonVideoRenderer.js +265 -0
- package/lib-es/modules/layout/components/Gallery.js +256 -0
- package/lib-es/modules/layout/components/index.css +653 -0
- package/lib-es/modules/layout/components/index.js +5 -0
- package/lib-es/modules/layout/components/utils.js +3 -0
- package/lib-es/modules/layout/components/who-is-speaking.js +49 -0
- package/lib-es/modules/layout/index.css +59 -0
- package/lib-es/modules/layout/index.dev.js +313 -0
- package/lib-es/modules/layout/index.js +74 -0
- package/lib-es/modules/layout/store.base.js +1468 -0
- package/lib-es/modules/layout/store.browser.js +49 -0
- package/lib-es/modules/layout/store.electron.js +175 -0
- package/lib-es/modules/layout/type.js +59 -0
- package/lib-es/modules/layout/view.js +149 -0
- package/lib-es/modules/live-streaming/index.css +0 -0
- package/lib-es/modules/live-streaming/index.dev.js +56 -0
- package/lib-es/modules/live-streaming/index.js +60 -0
- package/lib-es/modules/live-streaming/store.js +246 -0
- package/lib-es/modules/live-streaming/type.js +1 -0
- package/lib-es/modules/live-streaming/view.js +26 -0
- package/lib-es/modules/notification/index.css +77 -0
- package/lib-es/modules/notification/index.js +59 -0
- package/lib-es/modules/notification/interpreter-status/index.css +76 -0
- package/lib-es/modules/notification/interpreter-status/index.js +55 -0
- package/lib-es/modules/notification/store.js +122 -0
- package/lib-es/modules/notification/type.js +1 -0
- package/lib-es/modules/notification/view.js +127 -0
- package/lib-es/modules/offscreen-pulling/index.js +122 -0
- package/lib-es/modules/participant/components/can-moveable/index.js +59 -0
- package/lib-es/modules/participant/components/confirm-input/index.css +4 -0
- package/lib-es/modules/participant/components/confirm-input/index.js +112 -0
- package/lib-es/modules/participant/components/mute-all/index.js +67 -0
- package/lib-es/modules/participant/components/operate-waitingroom-member/index.js +40 -0
- package/lib-es/modules/participant/components/participants/components/footer/components/buttons.js +45 -0
- package/lib-es/modules/participant/components/participants/components/footer/components/drop-menu/index.css +83 -0
- package/lib-es/modules/participant/components/participants/components/footer/components/drop-menu/index.js +156 -0
- package/lib-es/modules/participant/components/participants/components/footer/components/drop-menu/util.js +21 -0
- package/lib-es/modules/participant/components/participants/components/footer/index.js +42 -0
- package/lib-es/modules/participant/components/participants/components/merge/index.js +40 -0
- package/lib-es/modules/participant/components/participants/components/render-tab/index.js +42 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +40 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +21 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.js +32 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.css +87 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.js +138 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.js +25 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +70 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.js +20 -0
- package/lib-es/modules/participant/components/participants/components/render-user/components/user-action/index.js +70 -0
- package/lib-es/modules/participant/components/participants/components/render-user/index.js +16 -0
- package/lib-es/modules/participant/components/participants/index.js +71 -0
- package/lib-es/modules/participant/index.css +102 -0
- package/lib-es/modules/participant/index.dev.js +87 -0
- package/lib-es/modules/participant/index.js +137 -0
- package/lib-es/modules/participant/member-list-data-source.js +297 -0
- package/lib-es/modules/participant/store.base.js +2354 -0
- package/lib-es/modules/participant/store.browser.js +117 -0
- package/lib-es/modules/participant/store.electron.js +124 -0
- package/lib-es/modules/participant/struct.js +55 -0
- package/lib-es/modules/participant/type.js +7 -0
- package/lib-es/modules/participant/view.js +18 -0
- package/lib-es/modules/pc-audio-connect/index.css +12 -0
- package/lib-es/modules/pc-audio-connect/main-scene/index.js +67 -0
- package/lib-es/modules/pc-audio-connect/main-scene/store.js +313 -0
- package/lib-es/modules/pc-audio-connect/types.js +1 -0
- package/lib-es/modules/pc-audio-connect/view.js +60 -0
- package/lib-es/modules/pc-audio-connect/waiting-scene/index.js +61 -0
- package/lib-es/modules/pc-audio-connect/waiting-scene/store.js +293 -0
- package/lib-es/modules/phone-audio-connect/components/callinfo/index.css +36 -0
- package/lib-es/modules/phone-audio-connect/components/callinfo/index.js +71 -0
- package/lib-es/modules/phone-audio-connect/components/calling/index.css +72 -0
- package/lib-es/modules/phone-audio-connect/components/calling/index.js +51 -0
- package/lib-es/modules/phone-audio-connect/components/remeber/index.css +10 -0
- package/lib-es/modules/phone-audio-connect/components/remeber/index.js +17 -0
- package/lib-es/modules/phone-audio-connect/components/useing/index.css +46 -0
- package/lib-es/modules/phone-audio-connect/components/useing/index.js +29 -0
- package/lib-es/modules/phone-audio-connect/enums.js +5 -0
- package/lib-es/modules/phone-audio-connect/index.css +56 -0
- package/lib-es/modules/phone-audio-connect/index.js +52 -0
- package/lib-es/modules/phone-audio-connect/store.js +317 -0
- package/lib-es/modules/phone-audio-connect/types.js +1 -0
- package/lib-es/modules/phone-audio-connect/view.js +177 -0
- package/lib-es/modules/secondary-window/index.js +147 -0
- package/lib-es/modules/secondary-window/store.js +502 -0
- package/lib-es/modules/secondary-window/type.js +28 -0
- package/lib-es/modules/secondary-window/view.js +281 -0
- package/lib-es/modules/setting/audio-settings/audio-settings.js +292 -0
- package/lib-es/modules/setting/audio-settings/index.css +195 -0
- package/lib-es/modules/setting/audio-whiteList/audio-device-adaptation.js +62 -0
- package/lib-es/modules/setting/audio-whiteList/audio-whiteList-manager.js +368 -0
- package/lib-es/modules/setting/caption_and_transcribing/index.css +88 -0
- package/lib-es/modules/setting/caption_and_transcribing/index.js +89 -0
- package/lib-es/modules/setting/general-settings/general-settings.js +148 -0
- package/lib-es/modules/setting/general-settings/index.css +41 -0
- package/lib-es/modules/setting/index.css +112 -0
- package/lib-es/modules/setting/index.dev.js +120 -0
- package/lib-es/modules/setting/index.js +145 -0
- package/lib-es/modules/setting/minutes-settings/index.css +65 -0
- package/lib-es/modules/setting/minutes-settings/minutes-settings.js +146 -0
- package/lib-es/modules/setting/state/index.css +207 -0
- package/lib-es/modules/setting/state/index.js +322 -0
- package/lib-es/modules/setting/storage-settings/index.css +91 -0
- package/lib-es/modules/setting/storage-settings/storage-settings.js +65 -0
- package/lib-es/modules/setting/store.base.js +1440 -0
- package/lib-es/modules/setting/store.browser.js +43 -0
- package/lib-es/modules/setting/store.electron.js +168 -0
- package/lib-es/modules/setting/translate-settings/index.css +47 -0
- package/lib-es/modules/setting/translate-settings/language-select.js +40 -0
- package/lib-es/modules/setting/translate-settings/translate-settings.js +131 -0
- package/lib-es/modules/setting/type.js +14 -0
- package/lib-es/modules/setting/video-settings/index.css +357 -0
- package/lib-es/modules/setting/video-settings/video-settings-basic.js +131 -0
- package/lib-es/modules/setting/video-settings/video-settings.js +167 -0
- package/lib-es/modules/setting/view.js +147 -0
- package/lib-es/modules/share-screen/components/control-bar/index.css +75 -0
- package/lib-es/modules/share-screen/components/control-bar/index.js +92 -0
- package/lib-es/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.js +38 -0
- package/lib-es/modules/share-screen/components/control-bar/items/full-container-btn/index.js +25 -0
- package/lib-es/modules/share-screen/components/control-bar/items/original-size-btn/index.js +25 -0
- package/lib-es/modules/share-screen/components/control-bar/items/zoom-in-btn/index.js +25 -0
- package/lib-es/modules/share-screen/components/control-bar/items/zoom-out-btn/index.js +25 -0
- package/lib-es/modules/share-screen/components/selection/index.css +73 -0
- package/lib-es/modules/share-screen/components/selection/index.js +220 -0
- package/lib-es/modules/share-screen/components/share-scenario/index.js +40 -0
- package/lib-es/modules/share-screen/components/share-state-bar/index.css +76 -0
- package/lib-es/modules/share-screen/components/share-state-bar/index.js +90 -0
- package/lib-es/modules/share-screen/index.css +0 -0
- package/lib-es/modules/share-screen/index.dev.js +90 -0
- package/lib-es/modules/share-screen/index.js +99 -0
- package/lib-es/modules/share-screen/store.base.js +464 -0
- package/lib-es/modules/share-screen/store.browser.js +36 -0
- package/lib-es/modules/share-screen/store.electron.js +429 -0
- package/lib-es/modules/share-screen/type.js +8 -0
- package/lib-es/modules/share-screen/view.js +24 -0
- package/lib-es/modules/state-bar/assets/fcr_grid_big.svg +3 -0
- package/lib-es/modules/state-bar/assets/fcr_listontop_big.svg +3 -0
- package/lib-es/modules/state-bar/assets/live-streaming.gif +0 -0
- package/lib-es/modules/state-bar/index.css +706 -0
- package/lib-es/modules/state-bar/index.dev.js +78 -0
- package/lib-es/modules/state-bar/index.js +41 -0
- package/lib-es/modules/state-bar/layout-config.js +168 -0
- package/lib-es/modules/state-bar/live-streaming-state.js +169 -0
- package/lib-es/modules/state-bar/main-scene/index.js +39 -0
- package/lib-es/modules/state-bar/main-scene/store.base.js +137 -0
- package/lib-es/modules/state-bar/main-scene/store.browser.js +80 -0
- package/lib-es/modules/state-bar/main-scene/store.electron.js +107 -0
- package/lib-es/modules/state-bar/meeting-detail.css +137 -0
- package/lib-es/modules/state-bar/meeting-details.js +219 -0
- package/lib-es/modules/state-bar/meeting-network-state.css +150 -0
- package/lib-es/modules/state-bar/meeting-network-state.js +107 -0
- package/lib-es/modules/state-bar/meeting-time.js +25 -0
- package/lib-es/modules/state-bar/network-quality.js +26 -0
- package/lib-es/modules/state-bar/recording.js +103 -0
- package/lib-es/modules/state-bar/store.base.electron.js +108 -0
- package/lib-es/modules/state-bar/store.base.js +616 -0
- package/lib-es/modules/state-bar/subtitles-history-state.js +101 -0
- package/lib-es/modules/state-bar/type.js +1 -0
- package/lib-es/modules/state-bar/view.js +241 -0
- package/lib-es/modules/state-bar/waiting-scene/index.js +39 -0
- package/lib-es/modules/state-bar/waiting-scene/store.base.js +48 -0
- package/lib-es/modules/state-bar/waiting-scene/store.browser.js +80 -0
- package/lib-es/modules/state-bar/waiting-scene/store.electron.js +99 -0
- package/lib-es/modules/subtitles-history/components/actions.js +29 -0
- package/lib-es/modules/subtitles-history/components/list-item.js +95 -0
- package/lib-es/modules/subtitles-history/components/list.js +175 -0
- package/lib-es/modules/subtitles-history/components/respond-dialog-content.js +36 -0
- package/lib-es/modules/subtitles-history/components/settings/index.css +5 -0
- package/lib-es/modules/subtitles-history/components/settings/index.js +46 -0
- package/lib-es/modules/subtitles-history/components/timer.js +36 -0
- package/lib-es/modules/subtitles-history/components/title.js +8 -0
- package/lib-es/modules/subtitles-history/empty.js +14 -0
- package/lib-es/modules/subtitles-history/index.css +129 -0
- package/lib-es/modules/subtitles-history/index.js +89 -0
- package/lib-es/modules/subtitles-history/store.base.js +790 -0
- package/lib-es/modules/subtitles-history/store.electron.js +148 -0
- package/lib-es/modules/subtitles-history/type.js +1 -0
- package/lib-es/modules/subtitles-history/view.js +96 -0
- package/lib-es/modules/video-window/components/deviceState/index.js +68 -0
- package/lib-es/modules/video-window/components/members/index.css +51 -0
- package/lib-es/modules/video-window/components/members/index.js +116 -0
- package/lib-es/modules/video-window/components/speaking/index.css +86 -0
- package/lib-es/modules/video-window/components/speaking/index.js +40 -0
- package/lib-es/modules/video-window/components/topControl/index.css +35 -0
- package/lib-es/modules/video-window/components/topControl/index.js +68 -0
- package/lib-es/modules/video-window/index.css +21 -0
- package/lib-es/modules/video-window/index.js +82 -0
- package/lib-es/modules/video-window/popover-watcher.js +69 -0
- package/lib-es/modules/video-window/store.js +512 -0
- package/lib-es/modules/video-window/type.js +19 -0
- package/lib-es/modules/video-window/view.js +107 -0
- package/lib-es/modules/waiting-room-layout/index.css +96 -0
- package/lib-es/modules/waiting-room-layout/index.js +67 -0
- package/lib-es/modules/waiting-room-layout/store.js +231 -0
- package/lib-es/modules/waiting-room-layout/view.js +87 -0
- package/lib-es/modules/whiteboard/components/control-bar/index.css +52 -0
- package/lib-es/modules/whiteboard/components/control-bar/index.js +151 -0
- package/lib-es/modules/whiteboard/components/control-bar/store.js +298 -0
- package/lib-es/modules/whiteboard/components/loading/index.css +76 -0
- package/lib-es/modules/whiteboard/components/loading/index.js +57 -0
- package/lib-es/modules/whiteboard/components/loading/loading.png +0 -0
- package/lib-es/modules/whiteboard/components/multi-window/index.css +63 -0
- package/lib-es/modules/whiteboard/components/multi-window/index.js +31 -0
- package/lib-es/modules/whiteboard/components/pagination/index.css +228 -0
- package/lib-es/modules/whiteboard/components/pagination/index.js +155 -0
- package/lib-es/modules/whiteboard/components/pagination/store.js +10 -0
- package/lib-es/modules/whiteboard/components/progress/index.js +36 -0
- package/lib-es/modules/whiteboard/components/progress/style.css +51 -0
- package/lib-es/modules/whiteboard/components/scene-pagination.js +23 -0
- package/lib-es/modules/whiteboard/components/switch-theme/index.css +99 -0
- package/lib-es/modules/whiteboard/components/switch-theme/index.js +89 -0
- package/lib-es/modules/whiteboard/components/switch-theme/item.js +46 -0
- package/lib-es/modules/whiteboard/components/switch-theme/libs.js +24 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +30 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +101 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +67 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/color-picker/index.js +40 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/eraser-picker.js +136 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/expansion/index.js +85 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +46 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/history.js +70 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +33 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/icons/move-icon.js +59 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/item/index.js +35 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/move-handle.js +127 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/pen-picker.js +147 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +78 -0
- package/lib-es/modules/whiteboard/components/toolbar/components/shape-picker.js +202 -0
- package/lib-es/modules/whiteboard/components/toolbar/hooks/index.js +285 -0
- package/lib-es/modules/whiteboard/components/toolbar/index.js +72 -0
- package/lib-es/modules/whiteboard/components/toolbar/store.js +484 -0
- package/lib-es/modules/whiteboard/components/toolbar/style.css +591 -0
- package/lib-es/modules/whiteboard/context.js +28 -0
- package/lib-es/modules/whiteboard/index.js +67 -0
- package/lib-es/modules/whiteboard/libs/theme.js +24 -0
- package/lib-es/modules/whiteboard/store.browser.js +20 -0
- package/lib-es/modules/whiteboard/store.electron.js +163 -0
- package/lib-es/modules/whiteboard/store.js +457 -0
- package/lib-es/modules/whiteboard/style.css +140 -0
- package/lib-es/modules/whiteboard/type.js +52 -0
- package/lib-es/modules/whiteboard/utils.js +29 -0
- package/lib-es/modules/whiteboard/view.js +105 -0
- package/lib-es/modules/widget/index.css +9 -0
- package/lib-es/modules/widget/index.js +129 -0
- package/lib-es/modules/widget/store.base.js +35 -0
- package/lib-es/modules/widget/store.browser.js +74 -0
- package/lib-es/modules/widget/store.electron.js +127 -0
- package/lib-es/modules/widget/type.js +1 -0
- package/lib-es/modules/widget/view.js +49 -0
- package/lib-es/modules/widget/web-widget.js +263 -0
- package/lib-es/object-manager.js +194 -0
- package/lib-es/plugins/browser-runtime-plugin.js +0 -0
- package/lib-es/plugins/css-preset-plugin.js +18 -0
- package/lib-es/plugins/electron-rtc-plugin.js +3 -0
- package/lib-es/plugins/module-dev-plugin.js +162 -0
- package/lib-es/plugins/multi-lang-plugin.js +18 -0
- package/lib-es/plugins/rtm-plugin.js +3 -0
- package/lib-es/plugins/web-rtc-plugin.js +3 -0
- package/lib-es/providers/ability-provider.js +76 -0
- package/lib-es/providers/annotation/provider.js +61 -0
- package/lib-es/providers/annotation/type.js +1 -0
- package/lib-es/providers/app-list-provider.js +392 -0
- package/lib-es/providers/board-share/bar-control/base.js +318 -0
- package/lib-es/providers/board-share/bar-control/browser.js +34 -0
- package/lib-es/providers/board-share/bar-control/electron.js +211 -0
- package/lib-es/providers/board-share/provider.base.js +406 -0
- package/lib-es/providers/board-share/provider.browser.js +147 -0
- package/lib-es/providers/board-share/provider.electron.js +162 -0
- package/lib-es/providers/board-share/struct.js +16 -0
- package/lib-es/providers/board-share/type.js +1 -0
- package/lib-es/providers/chat-provider.js +166 -0
- package/lib-es/providers/device-privilege-provider.js +402 -0
- package/lib-es/providers/device-provider.js +2148 -0
- package/lib-es/providers/device-stream-provider.js +418 -0
- package/lib-es/providers/dialog/provider.base.js +282 -0
- package/lib-es/providers/dialog/provider.browser.js +160 -0
- package/lib-es/providers/dialog/provider.electron.js +273 -0
- package/lib-es/providers/dialog/type.js +8 -0
- package/lib-es/providers/event-provider.js +50 -0
- package/lib-es/providers/facility/provider.base.js +152 -0
- package/lib-es/providers/facility/provider.browser.js +67 -0
- package/lib-es/providers/facility/provider.electron.js +83 -0
- package/lib-es/providers/facility/struct.js +6 -0
- package/lib-es/providers/facility/type.js +1 -0
- package/lib-es/providers/interpreter-provider.js +955 -0
- package/lib-es/providers/local-storage-provider.js +37 -0
- package/lib-es/providers/message/provider.js +97 -0
- package/lib-es/providers/message/struct.js +5 -0
- package/lib-es/providers/message/type.js +1 -0
- package/lib-es/providers/monitor-provider.js +22 -0
- package/lib-es/providers/mouse-detect/provider.js +312 -0
- package/lib-es/providers/mouse-detect/struct.js +5 -0
- package/lib-es/providers/mouse-detect/type.js +1 -0
- package/lib-es/providers/multi-display-provider.js +603 -0
- package/lib-es/providers/phone-audio-provider.js +512 -0
- package/lib-es/providers/privilege-provider.js +1158 -0
- package/lib-es/providers/renderer-provider.js +310 -0
- package/lib-es/providers/room-provider/room-provider.js +730 -0
- package/lib-es/providers/room-provider/waiting-room-control-manager.js +224 -0
- package/lib-es/providers/screen-share/constant.js +1 -0
- package/lib-es/providers/screen-share/provider.base.js +511 -0
- package/lib-es/providers/screen-share/provider.browser.js +290 -0
- package/lib-es/providers/screen-share/provider.electron.js +486 -0
- package/lib-es/providers/screen-share/strategy/browser.js +306 -0
- package/lib-es/providers/screen-share/strategy/electron.js +364 -0
- package/lib-es/providers/screen-share/strategy/type.js +31 -0
- package/lib-es/providers/screen-share/stream-state-sync.js +312 -0
- package/lib-es/providers/screen-share/struct.js +60 -0
- package/lib-es/providers/screen-share/type.js +1 -0
- package/lib-es/providers/session-provider.js +42 -0
- package/lib-es/providers/setting-storage/provider.base.js +6 -0
- package/lib-es/providers/setting-storage/provider.browser.js +57 -0
- package/lib-es/providers/setting-storage/provider.electron.js +55 -0
- package/lib-es/providers/setting-storage/type.js +1 -0
- package/lib-es/providers/stt-provider/stt-provider.js +1000 -0
- package/lib-es/providers/stt-provider/type.js +14 -0
- package/lib-es/providers/widget-provider.js +236 -0
- package/lib-es/providers/window/main-window.js +259 -0
- package/lib-es/providers/window/provider.js +158 -0
- package/lib-es/providers/window/renderer-window.js +576 -0
- package/lib-es/providers/window/type.js +1 -0
- package/lib-es/runtime.js +1 -0
- package/lib-es/scenes/main-scene.js +696 -0
- package/lib-es/scenes/type.js +1 -0
- package/lib-es/scenes/waiting-scene.js +155 -0
- package/lib-es/schema.js +88 -0
- package/lib-es/shared-context/board-context.js +7 -0
- package/lib-es/shared-context/dialog-context.js +3 -0
- package/lib-es/shared-context/video-track-render-context.js +2 -0
- package/lib-es/shared-data/app-list-data.js +122 -0
- package/lib-es/shared-data/chat-data.js +135 -0
- package/lib-es/shared-data/config.js +38 -0
- package/lib-es/shared-data/confirm-data.js +195 -0
- package/lib-es/shared-data/device-privilege-data.js +18 -0
- package/lib-es/shared-data/interpreter.js +235 -0
- package/lib-es/shared-data/layout-data.js +211 -0
- package/lib-es/shared-data/meeting-time.js +409 -0
- package/lib-es/shared-data/member-data.js +482 -0
- package/lib-es/shared-data/pin-data.js +107 -0
- package/lib-es/shared-data/screen-share/index.js +188 -0
- package/lib-es/shared-data/screen-share/type.js +1 -0
- package/lib-es/shared-data/security-data.js +153 -0
- package/lib-es/shared-data/setting.js +244 -0
- package/lib-es/shared-data/speaker-spotlight.js +11 -0
- package/lib-es/shared-data/stt-setting.ts/constant.js +27 -0
- package/lib-es/shared-data/stt-setting.ts/index.js +195 -0
- package/lib-es/shared-data/stt-setting.ts/type.js +7 -0
- package/lib-es/shared-data/video-window.js +1248 -0
- package/lib-es/shared-data/waiting-room.js +216 -0
- package/lib-es/shared-data/widget-data.js +42 -0
- package/lib-es/translations/enUS.js +2075 -0
- package/lib-es/translations/zhCN.js +2073 -0
- package/lib-es/type.js +149 -0
- package/lib-es/ui-manager.js +213 -0
- package/lib-es/ui-scene-switch.js +572 -0
- package/lib-es/utilities/browser-api.js +74 -0
- package/lib-es/utilities/constant.js +190 -0
- package/lib-es/utilities/debug.js +33 -0
- package/lib-es/utilities/default-config.js +89 -0
- package/lib-es/utilities/dialog-utils.js +210 -0
- package/lib-es/utilities/focus-helper.js +26 -0
- package/lib-es/utilities/hooks.js +82 -0
- package/lib-es/utilities/i18n-common-data.js +7 -0
- package/lib-es/utilities/logger.js +48 -0
- package/lib-es/utilities/meeting-detail.js +74 -0
- package/lib-es/utilities/mute-action.js +41 -0
- package/lib-es/utilities/package-info.js +7 -0
- package/lib-es/utilities/parameters.js +47 -0
- package/lib-es/utilities/platform.js +7 -0
- package/lib-es/utilities/privilege.js +21 -0
- package/lib-es/utilities/regex.js +7 -0
- package/lib-es/utilities/renderer.js +430 -0
- package/lib-es/utilities/shared-storage.js +56 -0
- package/lib-es/utilities/tools.js +252 -0
- package/lib-es/utilities/ui-resources.js +84 -0
- package/lib-es/utilities/useNamespace.js +59 -0
- package/lib-es/utilities/validate-params.js +9 -0
- package/package.json +11 -9
|
@@ -0,0 +1,2148 @@
|
|
|
1
|
+
import "core-js/modules/es.symbol.js";
|
|
2
|
+
import "core-js/modules/es.symbol.description.js";
|
|
3
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
|
4
|
+
import "core-js/modules/es.error.cause.js";
|
|
5
|
+
import "core-js/modules/es.error.to-string.js";
|
|
6
|
+
import "core-js/modules/es.array.is-array.js";
|
|
7
|
+
import "core-js/modules/es.date.to-primitive.js";
|
|
8
|
+
import "core-js/modules/es.function.bind.js";
|
|
9
|
+
import "core-js/modules/es.number.constructor.js";
|
|
10
|
+
import "core-js/modules/es.object.create.js";
|
|
11
|
+
import "core-js/modules/es.object.define-property.js";
|
|
12
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
13
|
+
import "core-js/modules/esnext.function.metadata.js";
|
|
14
|
+
import "core-js/modules/esnext.symbol.metadata.js";
|
|
15
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
16
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
17
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
18
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
19
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
20
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
21
|
+
var _FcrUIDeviceProviderImpl;
|
|
22
|
+
var _initProto, _init__microphoneEnabled, _init__isMicrophoneWorking, _init__microphoneDevice, _init__microphone, _init__speakerDevice, _init__speaker, _init__cameraDevice, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraEnabled, _init_showCameraPreview, _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_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _handleCameraEnabledChangedDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setMainRoomAudioOffDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _startOrStopCameraDecs, _setShowCameraPreviewDecs, _loadUiResourcesDecs, _setConnectTypeDecs, _toggleLocalCameraPreviewDecs, _getLoopbackDeviceIdDecs, _initDeviceListDecs, _handleMicrophoneAudioTrackDecs, _handleMicrophoneStateUpdatedDecs, _handleMicrophoneEnabledChangedDecs, _handleCameraVideoTrackDecs, _handleSpeakerDetectingChangedDecs, _stopSelectedSpeakerTestDecs, _handleMicrophoneDetectingChangedDecs, _stopMicrophoneTestDecs2, _updateVirtualBackgroundListDecs, _handleSystemSelectedSpeakerChangedDecs, _handleSystemSelectedMicrophoneChangedDecs, _correctSystemSelectedMicrophoneDeviceIdDecs, _handleSelectedSpeakerVolumeUpdatedDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _getMicrophoneListDecs, _getSpeakerListDecs, _formatDeviceListDecs, _loadBuiltinResourcesDecs, _ref;
|
|
23
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
24
|
+
import "core-js/modules/es.array.concat.js";
|
|
25
|
+
import "core-js/modules/es.array.filter.js";
|
|
26
|
+
import "core-js/modules/es.array.find.js";
|
|
27
|
+
import "core-js/modules/es.array.for-each.js";
|
|
28
|
+
import "core-js/modules/es.array.iterator.js";
|
|
29
|
+
import "core-js/modules/es.array.map.js";
|
|
30
|
+
import "core-js/modules/es.array.push.js";
|
|
31
|
+
import "core-js/modules/es.array.reduce.js";
|
|
32
|
+
import "core-js/modules/es.array.slice.js";
|
|
33
|
+
import "core-js/modules/es.array.some.js";
|
|
34
|
+
import "core-js/modules/es.array.sort.js";
|
|
35
|
+
import "core-js/modules/es.array.unshift.js";
|
|
36
|
+
import "core-js/modules/es.function.name.js";
|
|
37
|
+
import "core-js/modules/es.map.js";
|
|
38
|
+
import "core-js/modules/es.object.assign.js";
|
|
39
|
+
import "core-js/modules/es.object.keys.js";
|
|
40
|
+
import "core-js/modules/es.object.to-string.js";
|
|
41
|
+
import "core-js/modules/es.promise.js";
|
|
42
|
+
import "core-js/modules/es.promise.all-settled.js";
|
|
43
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
44
|
+
import "core-js/modules/es.set.js";
|
|
45
|
+
import "core-js/modules/es.string.iterator.js";
|
|
46
|
+
import "core-js/modules/es.weak-map.js";
|
|
47
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
48
|
+
import "core-js/modules/esnext.iterator.filter.js";
|
|
49
|
+
import "core-js/modules/esnext.iterator.find.js";
|
|
50
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
51
|
+
import "core-js/modules/esnext.iterator.map.js";
|
|
52
|
+
import "core-js/modules/esnext.iterator.reduce.js";
|
|
53
|
+
import "core-js/modules/esnext.iterator.some.js";
|
|
54
|
+
import "core-js/modules/esnext.map.delete-all.js";
|
|
55
|
+
import "core-js/modules/esnext.map.emplace.js";
|
|
56
|
+
import "core-js/modules/esnext.map.every.js";
|
|
57
|
+
import "core-js/modules/esnext.map.filter.js";
|
|
58
|
+
import "core-js/modules/esnext.map.find.js";
|
|
59
|
+
import "core-js/modules/esnext.map.find-key.js";
|
|
60
|
+
import "core-js/modules/esnext.map.includes.js";
|
|
61
|
+
import "core-js/modules/esnext.map.key-of.js";
|
|
62
|
+
import "core-js/modules/esnext.map.map-keys.js";
|
|
63
|
+
import "core-js/modules/esnext.map.map-values.js";
|
|
64
|
+
import "core-js/modules/esnext.map.merge.js";
|
|
65
|
+
import "core-js/modules/esnext.map.reduce.js";
|
|
66
|
+
import "core-js/modules/esnext.map.some.js";
|
|
67
|
+
import "core-js/modules/esnext.map.update.js";
|
|
68
|
+
import "core-js/modules/esnext.set.add-all.js";
|
|
69
|
+
import "core-js/modules/esnext.set.delete-all.js";
|
|
70
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
|
71
|
+
import "core-js/modules/esnext.set.difference.js";
|
|
72
|
+
import "core-js/modules/esnext.set.every.js";
|
|
73
|
+
import "core-js/modules/esnext.set.filter.js";
|
|
74
|
+
import "core-js/modules/esnext.set.find.js";
|
|
75
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
|
76
|
+
import "core-js/modules/esnext.set.intersection.js";
|
|
77
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
|
78
|
+
import "core-js/modules/esnext.set.is-disjoint-from.js";
|
|
79
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
|
80
|
+
import "core-js/modules/esnext.set.is-subset-of.js";
|
|
81
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
|
82
|
+
import "core-js/modules/esnext.set.is-superset-of.js";
|
|
83
|
+
import "core-js/modules/esnext.set.join.js";
|
|
84
|
+
import "core-js/modules/esnext.set.map.js";
|
|
85
|
+
import "core-js/modules/esnext.set.reduce.js";
|
|
86
|
+
import "core-js/modules/esnext.set.some.js";
|
|
87
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
|
88
|
+
import "core-js/modules/esnext.set.symmetric-difference.js";
|
|
89
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
|
90
|
+
import "core-js/modules/esnext.set.union.js";
|
|
91
|
+
import "core-js/modules/esnext.weak-map.delete-all.js";
|
|
92
|
+
import "core-js/modules/esnext.weak-map.emplace.js";
|
|
93
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
94
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
95
|
+
import "core-js/modules/web.timers.js";
|
|
96
|
+
import "core-js/modules/web.url.js";
|
|
97
|
+
import "core-js/modules/web.url.to-json.js";
|
|
98
|
+
import "core-js/modules/web.url-search-params.js";
|
|
99
|
+
import "core-js/modules/web.url-search-params.delete.js";
|
|
100
|
+
import "core-js/modules/web.url-search-params.has.js";
|
|
101
|
+
import "core-js/modules/web.url-search-params.size.js";
|
|
102
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
103
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
104
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
105
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
106
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
107
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
108
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
109
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
110
|
+
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
111
|
+
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
112
|
+
import { AgoraObservable, bound, jsonstring } from 'fcr-core/lib/imports';
|
|
113
|
+
import { FcrMediaSourceState } from 'fcr-core/lib/type';
|
|
114
|
+
import { isElectron } from 'agora-foundation/lib/utilities/env';
|
|
115
|
+
import { FcrVideoRenderMode } from 'fcr-core';
|
|
116
|
+
import { FcrVideoOrientation } from 'fcr-core/lib/type';
|
|
117
|
+
import { DEFAULT_BEAUTY_VALUE } from 'agora-ui-foundation/lib/components/local-video-player';
|
|
118
|
+
import { transI18n } from 'agora-ui-foundation/lib/i18n';
|
|
119
|
+
import { observable, reaction, runInAction, action, computed } from 'mobx';
|
|
120
|
+
import { VirtualOption } from '../modules/device-pretest/assets/virtual-backdound-resources';
|
|
121
|
+
import { FcrUIVideoEffectType, FcrUIConnectType, FcrUIAiDenoiseLevel, FcrUIMicrophoneState } from '../type';
|
|
122
|
+
import { convertToFixedNumber, isPngOrJpg, getFileNameWithoutExtension, isMp4, isMp3OrWav, matchVirtualSoundCardPattern, isZipUrl, isMp3OrWavUrl } from '../utilities/tools';
|
|
123
|
+
import { createLogger } from '../utilities/logger';
|
|
124
|
+
import clone from 'lodash/clone';
|
|
125
|
+
// device id for default device (follow system)
|
|
126
|
+
export var DEFAULT_DEVICE_ID = 'default';
|
|
127
|
+
var getDeviceVolumeLevel = function getDeviceVolumeLevel(volume) {
|
|
128
|
+
return Math.floor(volume / 255 * 100);
|
|
129
|
+
};
|
|
130
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
131
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
132
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
133
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
134
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
135
|
+
var _F = /*#__PURE__*/new WeakMap();
|
|
136
|
+
var _G = /*#__PURE__*/new WeakMap();
|
|
137
|
+
var _H = /*#__PURE__*/new WeakMap();
|
|
138
|
+
var _I = /*#__PURE__*/new WeakMap();
|
|
139
|
+
var _J = /*#__PURE__*/new WeakMap();
|
|
140
|
+
var _K = /*#__PURE__*/new WeakMap();
|
|
141
|
+
var _L = /*#__PURE__*/new WeakMap();
|
|
142
|
+
var _M = /*#__PURE__*/new WeakMap();
|
|
143
|
+
var _N = /*#__PURE__*/new WeakMap();
|
|
144
|
+
var _O = /*#__PURE__*/new WeakMap();
|
|
145
|
+
var _P = /*#__PURE__*/new WeakMap();
|
|
146
|
+
var _Q = /*#__PURE__*/new WeakMap();
|
|
147
|
+
var _R = /*#__PURE__*/new WeakMap();
|
|
148
|
+
var _S = /*#__PURE__*/new WeakMap();
|
|
149
|
+
var _T = /*#__PURE__*/new WeakMap();
|
|
150
|
+
var _U = /*#__PURE__*/new WeakMap();
|
|
151
|
+
var _V = /*#__PURE__*/new WeakMap();
|
|
152
|
+
var _W = /*#__PURE__*/new WeakMap();
|
|
153
|
+
var _X = /*#__PURE__*/new WeakMap();
|
|
154
|
+
var _Y = /*#__PURE__*/new WeakMap();
|
|
155
|
+
var _Z = /*#__PURE__*/new WeakMap();
|
|
156
|
+
var _a = /*#__PURE__*/new WeakMap();
|
|
157
|
+
var _b = /*#__PURE__*/new WeakMap();
|
|
158
|
+
var _c = /*#__PURE__*/new WeakMap();
|
|
159
|
+
_ref = (_startPlayLocalVideoDecs = [action, action.bound], _stopPlayLocalVideoDecs = [action, action.bound], _startSpeakerTestDecs = [action, action.bound], _stopSpeakerTestDecs = [action, action.bound], _setCurrentIsMirrorDecs = [action, action.bound], _toggleLocalMirrorPreviewDecs = [action, action.bound], _setBeautyOptionsDecs = [action, action.bound], _handleCancelForceOpenVideoEffectDecs = [action, action.bound], _handleForceOpenVideoEffectDecs = [action, action.bound], _setCameraEnabledDecs = [action, action.bound], _handleCameraEnabledChangedDecs = [action, action.bound], _setMicrophoneEnabledDecs = [action, action.bound], _toggleLocalMirrorDecs = [action, action.bound], _resetMirrorDecs = [action, action.bound], _startMicrophoneTestDecs = [action, action.bound], _stopMicrophoneTestDecs = [action, action.bound], _enableVirtualBackgroundDecs = [action, action.bound], _setEditBeautyKeyDecs = [action, action.bound], _enableBeautyEffectDecs = [action, action.bound], _setCameraIdDecs = [action, action.bound], _setMainRoomAudioOffDecs = [action, action.bound], _setSpeakerIdDecs = [action, action.bound], _setMicrophoneIdDecs = [action, action.bound], _setSpeakerVolumeDecs = [action, action.bound], _setMicrophoneVolumeDecs = [action, action.bound], _startOrStopCameraDecs = [action, action.bound], _setShowCameraPreviewDecs = [action, action.bound], _loadUiResourcesDecs = [action, action.bound], _setConnectTypeDecs = [action, action.bound], _toggleLocalCameraPreviewDecs = [action, action.bound], _getLoopbackDeviceIdDecs = [action, action.bound], _initDeviceListDecs = [action, action.bound], _handleMicrophoneAudioTrackDecs = [action, action.bound], _handleMicrophoneStateUpdatedDecs = [action, action.bound], _handleMicrophoneEnabledChangedDecs = [action, action.bound], _handleCameraVideoTrackDecs = [action, action.bound], _handleSpeakerDetectingChangedDecs = [action, action.bound], _stopSelectedSpeakerTestDecs = [action, action.bound], _handleMicrophoneDetectingChangedDecs = [action, action.bound], _stopMicrophoneTestDecs2 = [action, action.bound], _updateVirtualBackgroundListDecs = [action, action.bound], _handleSystemSelectedSpeakerChangedDecs = [action, action.bound], _handleSystemSelectedMicrophoneChangedDecs = [action, action.bound], _correctSystemSelectedMicrophoneDeviceIdDecs = [action, action.bound], _handleSelectedSpeakerVolumeUpdatedDecs = [action, action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [action, action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [action, action.bound], _handleSpeakerAddedDecs = [action, action.bound], _handleSpeakerRemovedDecs = [action, action.bound], _handleSpeakerListUpdatedDecs = [action, action.bound], _getMicrophoneListDecs = [action, action.bound], _getSpeakerListDecs = [action, action.bound], _formatDeviceListDecs = [action, action.bound], _loadBuiltinResourcesDecs = [action, action.bound], "logger");
|
|
160
|
+
export var FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
|
|
161
|
+
function FcrUIDeviceProviderImpl(_renderer, _facilityProvider, _messageProvider, _mediaControl, _sharedSettingDataSource) {
|
|
162
|
+
var _this = this;
|
|
163
|
+
_classCallCheck(this, FcrUIDeviceProviderImpl);
|
|
164
|
+
_defineProperty(this, _ref, (_initProto(this), createLogger({
|
|
165
|
+
prefix: 'FcrUIDeviceProviderImpl'
|
|
166
|
+
})));
|
|
167
|
+
_defineProperty(this, "_observable", new AgoraObservable());
|
|
168
|
+
_defineProperty(this, "_disposer", []);
|
|
169
|
+
_defineProperty(this, "_hasExecutedOpenCamera", false);
|
|
170
|
+
_defineProperty(this, "_hasExecutedConnectAudio", false);
|
|
171
|
+
_defineProperty(this, "_isAudioConnected", false);
|
|
172
|
+
_defineProperty(this, "_cameraVideoTrack", null);
|
|
173
|
+
_defineProperty(this, "_microphoneAudioTrack", null);
|
|
174
|
+
_defineProperty(this, "_localVideoViewSet", new Set());
|
|
175
|
+
_defineProperty(this, "_videoRotation", FcrVideoOrientation.VIDEO_ORIENTATION_0);
|
|
176
|
+
_defineProperty(this, "_released", false);
|
|
177
|
+
// 强制开启美颜
|
|
178
|
+
_defineProperty(this, "_isForceEnableBeauty", false);
|
|
179
|
+
// 强制开启虚拟背景
|
|
180
|
+
_defineProperty(this, "_isForceEnableVirtualBackground", false);
|
|
181
|
+
// 上次操作特效的类型
|
|
182
|
+
_defineProperty(this, "_lastEnableVideoEffectType", FcrUIVideoEffectType.NONE);
|
|
183
|
+
// microphone observer
|
|
184
|
+
_defineProperty(this, "_microphoneObserver", {
|
|
185
|
+
onVolumeIndicationUpdated: this._handleMicrophoneVolumeIndicationUpdated,
|
|
186
|
+
onMicrophoneStateUpdated: this._handleMicrophoneStateUpdated
|
|
187
|
+
});
|
|
188
|
+
_defineProperty(this, "_mediaControlObserver", {
|
|
189
|
+
onCameraAdded: this._handleCameraAdded,
|
|
190
|
+
onCameraRemoved: this._handleCameraRemoved,
|
|
191
|
+
onMicrophoneAdded: this._handleMicrophoneAdded,
|
|
192
|
+
onMicrophoneRemoved: this._handleMicrophoneRemoved,
|
|
193
|
+
onSpeakerAdded: this._handleSpeakerAdded,
|
|
194
|
+
onSpeakerRemoved: this._handleSpeakerRemoved,
|
|
195
|
+
onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
|
|
196
|
+
onSelectedSpeakerVolumeUpdated: this._handleSelectedSpeakerVolumeUpdated,
|
|
197
|
+
onSystemSelectedSpeakerChanged: this._handleSystemSelectedSpeakerChanged,
|
|
198
|
+
onSystemSelectedMicrophoneChanged: this._handleSystemSelectedMicrophoneChanged
|
|
199
|
+
});
|
|
200
|
+
_defineProperty(this, "_defaultMirror", true);
|
|
201
|
+
_defineProperty(this, "_volumeIndicationInterval", 200);
|
|
202
|
+
_defineProperty(this, "_soundEffectPlayUrlMap", new Map());
|
|
203
|
+
_defineProperty(this, "_soundEffectFilePathMap", new Map());
|
|
204
|
+
_classPrivateFieldInitSpec(this, _A, _init__microphoneEnabled(this, false));
|
|
205
|
+
_classPrivateFieldInitSpec(this, _B, _init__isMicrophoneWorking(this, false));
|
|
206
|
+
_classPrivateFieldInitSpec(this, _C, _init__microphoneDevice(this, {
|
|
207
|
+
id: null,
|
|
208
|
+
name: null,
|
|
209
|
+
productId: '',
|
|
210
|
+
vendorId: ''
|
|
211
|
+
}));
|
|
212
|
+
_classPrivateFieldInitSpec(this, _D, _init__microphone(this, {
|
|
213
|
+
id: DEFAULT_DEVICE_ID
|
|
214
|
+
}));
|
|
215
|
+
_classPrivateFieldInitSpec(this, _E, _init__speakerDevice(this, {
|
|
216
|
+
id: null,
|
|
217
|
+
name: null,
|
|
218
|
+
productId: '',
|
|
219
|
+
vendorId: ''
|
|
220
|
+
}));
|
|
221
|
+
_classPrivateFieldInitSpec(this, _F, _init__speaker(this, {
|
|
222
|
+
id: DEFAULT_DEVICE_ID
|
|
223
|
+
}));
|
|
224
|
+
_classPrivateFieldInitSpec(this, _G, _init__cameraDevice(this, {
|
|
225
|
+
id: null
|
|
226
|
+
}));
|
|
227
|
+
// 是否开启镜像
|
|
228
|
+
_classPrivateFieldInitSpec(this, _H, _init_currentIsMirror(this, true));
|
|
229
|
+
// 是否展示展示强制开启特效弹窗
|
|
230
|
+
_classPrivateFieldInitSpec(this, _I, _init_showForceOpenEffectDialog(this, false));
|
|
231
|
+
_classPrivateFieldInitSpec(this, _J, _init_cameraEnabled(this, false));
|
|
232
|
+
_classPrivateFieldInitSpec(this, _K, _init_showCameraPreview(this, false));
|
|
233
|
+
// @observable accessor microphoneEnabled = false;
|
|
234
|
+
_classPrivateFieldInitSpec(this, _L, _init_cameraList(this, []));
|
|
235
|
+
_classPrivateFieldInitSpec(this, _M, _init_microphoneList(this, []));
|
|
236
|
+
_classPrivateFieldInitSpec(this, _N, _init_microphoneVolumeLevel(this, 0));
|
|
237
|
+
_classPrivateFieldInitSpec(this, _O, _init_speakerList(this, []));
|
|
238
|
+
_classPrivateFieldInitSpec(this, _P, _init_isLocalMirrorEnabled(this, false));
|
|
239
|
+
_classPrivateFieldInitSpec(this, _Q, _init_isLocalEditBeautyOptions(this, false));
|
|
240
|
+
_classPrivateFieldInitSpec(this, _R, _init_speakerVolumeLevel(this, 0));
|
|
241
|
+
_classPrivateFieldInitSpec(this, _S, _init_speakerVolume(this, 0));
|
|
242
|
+
_classPrivateFieldInitSpec(this, _T, _init_microphoneVolume(this, 100));
|
|
243
|
+
_classPrivateFieldInitSpec(this, _U, _init_virtualBackgroundName(this, 'None'));
|
|
244
|
+
_classPrivateFieldInitSpec(this, _V, _init_enableBeauty(this, false));
|
|
245
|
+
_classPrivateFieldInitSpec(this, _W, _init_beautyKey(this, 'none'));
|
|
246
|
+
_classPrivateFieldInitSpec(this, _X, _init_beautyOptions(this, {
|
|
247
|
+
lighteningContrastLevel: 0,
|
|
248
|
+
lighteningLevel: DEFAULT_BEAUTY_VALUE,
|
|
249
|
+
smoothnessLevel: DEFAULT_BEAUTY_VALUE,
|
|
250
|
+
sharpnessLevel: DEFAULT_BEAUTY_VALUE,
|
|
251
|
+
rednessLevel: DEFAULT_BEAUTY_VALUE
|
|
252
|
+
}));
|
|
253
|
+
_classPrivateFieldInitSpec(this, _Y, _init_virtualBackgroundList(this, []));
|
|
254
|
+
_classPrivateFieldInitSpec(this, _Z, _init_microphoneDetecting(this, false));
|
|
255
|
+
_classPrivateFieldInitSpec(this, _a, _init_speakerDetecting(this, false));
|
|
256
|
+
_classPrivateFieldInitSpec(this, _b, _init_connectType(this, FcrUIConnectType.NONE));
|
|
257
|
+
_classPrivateFieldInitSpec(this, _c, _init_isMainRoomAudioOff(this, false));
|
|
258
|
+
this._renderer = _renderer;
|
|
259
|
+
this._facilityProvider = _facilityProvider;
|
|
260
|
+
this._messageProvider = _messageProvider;
|
|
261
|
+
this._mediaControl = _mediaControl;
|
|
262
|
+
this._sharedSettingDataSource = _sharedSettingDataSource;
|
|
263
|
+
this._disposer.push(reaction(function () {
|
|
264
|
+
return _this.cameraEnabled;
|
|
265
|
+
}, this._handleCameraEnabledChanged), reaction(function () {
|
|
266
|
+
return _this._cameraDevice;
|
|
267
|
+
}, this._handleCameraDeviceIdChanged), reaction(function () {
|
|
268
|
+
return _this._microphoneEnabled;
|
|
269
|
+
}, this._handleMicrophoneEnabledChanged), reaction(function () {
|
|
270
|
+
return _this._microphone;
|
|
271
|
+
}, this._handleMicrophoneIdChanged), reaction(function () {
|
|
272
|
+
return _this._microphoneDevice;
|
|
273
|
+
}, this._handleMicrophoneDeviceIdChanged), reaction(function () {
|
|
274
|
+
return _this._speaker;
|
|
275
|
+
}, this._handleSpeakerIdChanged), reaction(function () {
|
|
276
|
+
return _this._speakerDevice;
|
|
277
|
+
}, this._handleSpeakerDeviceIdChanged), reaction(function () {
|
|
278
|
+
return _this.speakerDetecting;
|
|
279
|
+
}, this._handleSpeakerDetectingChanged), reaction(function () {
|
|
280
|
+
return _this.microphoneDetecting;
|
|
281
|
+
}, this._handleMicrophoneDetectingChanged));
|
|
282
|
+
this._mediaControl.addObserver(this._mediaControlObserver);
|
|
283
|
+
this._initDeviceList();
|
|
284
|
+
runInAction(function () {
|
|
285
|
+
_this.speakerVolume = _this._mediaControl.getSelectedSpeakerVolume();
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
return _createClass(FcrUIDeviceProviderImpl, [{
|
|
289
|
+
key: "_microphoneEnabled",
|
|
290
|
+
get: function get() {
|
|
291
|
+
return _classPrivateFieldGet(_A, this);
|
|
292
|
+
},
|
|
293
|
+
set: function set(v) {
|
|
294
|
+
_classPrivateFieldSet(_A, this, v);
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
key: "_isMicrophoneWorking",
|
|
298
|
+
get: function get() {
|
|
299
|
+
return _classPrivateFieldGet(_B, this);
|
|
300
|
+
},
|
|
301
|
+
set: function set(v) {
|
|
302
|
+
_classPrivateFieldSet(_B, this, v);
|
|
303
|
+
}
|
|
304
|
+
}, {
|
|
305
|
+
key: "_microphoneDevice",
|
|
306
|
+
get: function get() {
|
|
307
|
+
return _classPrivateFieldGet(_C, this);
|
|
308
|
+
},
|
|
309
|
+
set: function set(v) {
|
|
310
|
+
_classPrivateFieldSet(_C, this, v);
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
313
|
+
key: "_microphone",
|
|
314
|
+
get: function get() {
|
|
315
|
+
return _classPrivateFieldGet(_D, this);
|
|
316
|
+
},
|
|
317
|
+
set: function set(v) {
|
|
318
|
+
_classPrivateFieldSet(_D, this, v);
|
|
319
|
+
}
|
|
320
|
+
}, {
|
|
321
|
+
key: "_speakerDevice",
|
|
322
|
+
get: function get() {
|
|
323
|
+
return _classPrivateFieldGet(_E, this);
|
|
324
|
+
},
|
|
325
|
+
set: function set(v) {
|
|
326
|
+
_classPrivateFieldSet(_E, this, v);
|
|
327
|
+
}
|
|
328
|
+
}, {
|
|
329
|
+
key: "_speaker",
|
|
330
|
+
get: function get() {
|
|
331
|
+
return _classPrivateFieldGet(_F, this);
|
|
332
|
+
},
|
|
333
|
+
set: function set(v) {
|
|
334
|
+
_classPrivateFieldSet(_F, this, v);
|
|
335
|
+
}
|
|
336
|
+
}, {
|
|
337
|
+
key: "_cameraDevice",
|
|
338
|
+
get: function get() {
|
|
339
|
+
return _classPrivateFieldGet(_G, this);
|
|
340
|
+
},
|
|
341
|
+
set: function set(v) {
|
|
342
|
+
_classPrivateFieldSet(_G, this, v);
|
|
343
|
+
}
|
|
344
|
+
}, {
|
|
345
|
+
key: "currentIsMirror",
|
|
346
|
+
get: function get() {
|
|
347
|
+
return _classPrivateFieldGet(_H, this);
|
|
348
|
+
},
|
|
349
|
+
set: function set(v) {
|
|
350
|
+
_classPrivateFieldSet(_H, this, v);
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "showForceOpenEffectDialog",
|
|
354
|
+
get: function get() {
|
|
355
|
+
return _classPrivateFieldGet(_I, this);
|
|
356
|
+
},
|
|
357
|
+
set: function set(v) {
|
|
358
|
+
_classPrivateFieldSet(_I, this, v);
|
|
359
|
+
}
|
|
360
|
+
}, {
|
|
361
|
+
key: "cameraEnabled",
|
|
362
|
+
get: function get() {
|
|
363
|
+
return _classPrivateFieldGet(_J, this);
|
|
364
|
+
},
|
|
365
|
+
set: function set(v) {
|
|
366
|
+
_classPrivateFieldSet(_J, this, v);
|
|
367
|
+
}
|
|
368
|
+
}, {
|
|
369
|
+
key: "showCameraPreview",
|
|
370
|
+
get: function get() {
|
|
371
|
+
return _classPrivateFieldGet(_K, this);
|
|
372
|
+
},
|
|
373
|
+
set: function set(v) {
|
|
374
|
+
_classPrivateFieldSet(_K, this, v);
|
|
375
|
+
}
|
|
376
|
+
}, {
|
|
377
|
+
key: "cameraList",
|
|
378
|
+
get: function get() {
|
|
379
|
+
return _classPrivateFieldGet(_L, this);
|
|
380
|
+
},
|
|
381
|
+
set: function set(v) {
|
|
382
|
+
_classPrivateFieldSet(_L, this, v);
|
|
383
|
+
}
|
|
384
|
+
}, {
|
|
385
|
+
key: "microphoneList",
|
|
386
|
+
get: function get() {
|
|
387
|
+
return _classPrivateFieldGet(_M, this);
|
|
388
|
+
},
|
|
389
|
+
set: function set(v) {
|
|
390
|
+
_classPrivateFieldSet(_M, this, v);
|
|
391
|
+
}
|
|
392
|
+
}, {
|
|
393
|
+
key: "microphoneVolumeLevel",
|
|
394
|
+
get: function get() {
|
|
395
|
+
return _classPrivateFieldGet(_N, this);
|
|
396
|
+
},
|
|
397
|
+
set: function set(v) {
|
|
398
|
+
_classPrivateFieldSet(_N, this, v);
|
|
399
|
+
}
|
|
400
|
+
}, {
|
|
401
|
+
key: "speakerList",
|
|
402
|
+
get: function get() {
|
|
403
|
+
return _classPrivateFieldGet(_O, this);
|
|
404
|
+
},
|
|
405
|
+
set: function set(v) {
|
|
406
|
+
_classPrivateFieldSet(_O, this, v);
|
|
407
|
+
}
|
|
408
|
+
}, {
|
|
409
|
+
key: "isLocalMirrorEnabled",
|
|
410
|
+
get: function get() {
|
|
411
|
+
return _classPrivateFieldGet(_P, this);
|
|
412
|
+
},
|
|
413
|
+
set: function set(v) {
|
|
414
|
+
_classPrivateFieldSet(_P, this, v);
|
|
415
|
+
}
|
|
416
|
+
}, {
|
|
417
|
+
key: "isLocalEditBeautyOptions",
|
|
418
|
+
get: function get() {
|
|
419
|
+
return _classPrivateFieldGet(_Q, this);
|
|
420
|
+
},
|
|
421
|
+
set: function set(v) {
|
|
422
|
+
_classPrivateFieldSet(_Q, this, v);
|
|
423
|
+
}
|
|
424
|
+
}, {
|
|
425
|
+
key: "speakerVolumeLevel",
|
|
426
|
+
get: function get() {
|
|
427
|
+
return _classPrivateFieldGet(_R, this);
|
|
428
|
+
},
|
|
429
|
+
set: function set(v) {
|
|
430
|
+
_classPrivateFieldSet(_R, this, v);
|
|
431
|
+
}
|
|
432
|
+
}, {
|
|
433
|
+
key: "speakerVolume",
|
|
434
|
+
get: function get() {
|
|
435
|
+
return _classPrivateFieldGet(_S, this);
|
|
436
|
+
},
|
|
437
|
+
set: function set(v) {
|
|
438
|
+
_classPrivateFieldSet(_S, this, v);
|
|
439
|
+
}
|
|
440
|
+
}, {
|
|
441
|
+
key: "microphoneVolume",
|
|
442
|
+
get: function get() {
|
|
443
|
+
return _classPrivateFieldGet(_T, this);
|
|
444
|
+
},
|
|
445
|
+
set: function set(v) {
|
|
446
|
+
_classPrivateFieldSet(_T, this, v);
|
|
447
|
+
}
|
|
448
|
+
}, {
|
|
449
|
+
key: "virtualBackgroundName",
|
|
450
|
+
get: function get() {
|
|
451
|
+
return _classPrivateFieldGet(_U, this);
|
|
452
|
+
},
|
|
453
|
+
set: function set(v) {
|
|
454
|
+
_classPrivateFieldSet(_U, this, v);
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
key: "enableBeauty",
|
|
458
|
+
get: function get() {
|
|
459
|
+
return _classPrivateFieldGet(_V, this);
|
|
460
|
+
},
|
|
461
|
+
set: function set(v) {
|
|
462
|
+
_classPrivateFieldSet(_V, this, v);
|
|
463
|
+
}
|
|
464
|
+
}, {
|
|
465
|
+
key: "beautyKey",
|
|
466
|
+
get: function get() {
|
|
467
|
+
return _classPrivateFieldGet(_W, this);
|
|
468
|
+
},
|
|
469
|
+
set: function set(v) {
|
|
470
|
+
_classPrivateFieldSet(_W, this, v);
|
|
471
|
+
}
|
|
472
|
+
}, {
|
|
473
|
+
key: "beautyOptions",
|
|
474
|
+
get: function get() {
|
|
475
|
+
return _classPrivateFieldGet(_X, this);
|
|
476
|
+
},
|
|
477
|
+
set: function set(v) {
|
|
478
|
+
_classPrivateFieldSet(_X, this, v);
|
|
479
|
+
}
|
|
480
|
+
}, {
|
|
481
|
+
key: "virtualBackgroundList",
|
|
482
|
+
get: function get() {
|
|
483
|
+
return _classPrivateFieldGet(_Y, this);
|
|
484
|
+
},
|
|
485
|
+
set: function set(v) {
|
|
486
|
+
_classPrivateFieldSet(_Y, this, v);
|
|
487
|
+
}
|
|
488
|
+
}, {
|
|
489
|
+
key: "microphoneDetecting",
|
|
490
|
+
get: function get() {
|
|
491
|
+
return _classPrivateFieldGet(_Z, this);
|
|
492
|
+
},
|
|
493
|
+
set: function set(v) {
|
|
494
|
+
_classPrivateFieldSet(_Z, this, v);
|
|
495
|
+
}
|
|
496
|
+
}, {
|
|
497
|
+
key: "speakerDetecting",
|
|
498
|
+
get: function get() {
|
|
499
|
+
return _classPrivateFieldGet(_a, this);
|
|
500
|
+
},
|
|
501
|
+
set: function set(v) {
|
|
502
|
+
_classPrivateFieldSet(_a, this, v);
|
|
503
|
+
}
|
|
504
|
+
}, {
|
|
505
|
+
key: "connectType",
|
|
506
|
+
get: function get() {
|
|
507
|
+
return _classPrivateFieldGet(_b, this);
|
|
508
|
+
},
|
|
509
|
+
set: function set(v) {
|
|
510
|
+
_classPrivateFieldSet(_b, this, v);
|
|
511
|
+
}
|
|
512
|
+
}, {
|
|
513
|
+
key: "isMainRoomAudioOff",
|
|
514
|
+
get: function get() {
|
|
515
|
+
return _classPrivateFieldGet(_c, this);
|
|
516
|
+
},
|
|
517
|
+
set: function set(v) {
|
|
518
|
+
_classPrivateFieldSet(_c, this, v);
|
|
519
|
+
}
|
|
520
|
+
}, {
|
|
521
|
+
key: "ifAccessMicrophone",
|
|
522
|
+
value: function () {
|
|
523
|
+
var _ifAccessMicrophone = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
524
|
+
var hasSystemPermission;
|
|
525
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
526
|
+
while (1) switch (_context.prev = _context.next) {
|
|
527
|
+
case 0:
|
|
528
|
+
hasSystemPermission = true;
|
|
529
|
+
if (!isElectron()) {
|
|
530
|
+
_context.next = 2;
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
_context.next = 1;
|
|
534
|
+
return this._facilityProvider.checkMicrophonePermission();
|
|
535
|
+
case 1:
|
|
536
|
+
hasSystemPermission = _context.sent;
|
|
537
|
+
case 2:
|
|
538
|
+
return _context.abrupt("return", hasSystemPermission);
|
|
539
|
+
case 3:
|
|
540
|
+
case "end":
|
|
541
|
+
return _context.stop();
|
|
542
|
+
}
|
|
543
|
+
}, _callee, this);
|
|
544
|
+
}));
|
|
545
|
+
function ifAccessMicrophone() {
|
|
546
|
+
return _ifAccessMicrophone.apply(this, arguments);
|
|
547
|
+
}
|
|
548
|
+
return ifAccessMicrophone;
|
|
549
|
+
}()
|
|
550
|
+
}, {
|
|
551
|
+
key: "ifAccessCamera",
|
|
552
|
+
value: function () {
|
|
553
|
+
var _ifAccessCamera = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
554
|
+
var hasSystemPermission;
|
|
555
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
556
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
557
|
+
case 0:
|
|
558
|
+
hasSystemPermission = true;
|
|
559
|
+
if (!isElectron()) {
|
|
560
|
+
_context2.next = 2;
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
_context2.next = 1;
|
|
564
|
+
return this._facilityProvider.checkCameraPermission();
|
|
565
|
+
case 1:
|
|
566
|
+
hasSystemPermission = _context2.sent;
|
|
567
|
+
case 2:
|
|
568
|
+
return _context2.abrupt("return", hasSystemPermission);
|
|
569
|
+
case 3:
|
|
570
|
+
case "end":
|
|
571
|
+
return _context2.stop();
|
|
572
|
+
}
|
|
573
|
+
}, _callee2, this);
|
|
574
|
+
}));
|
|
575
|
+
function ifAccessCamera() {
|
|
576
|
+
return _ifAccessCamera.apply(this, arguments);
|
|
577
|
+
}
|
|
578
|
+
return ifAccessCamera;
|
|
579
|
+
}()
|
|
580
|
+
}, {
|
|
581
|
+
key: "ifNeedExecuteAutoConnectAudio",
|
|
582
|
+
value: function ifNeedExecuteAutoConnectAudio() {
|
|
583
|
+
return this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
|
|
584
|
+
}
|
|
585
|
+
}, {
|
|
586
|
+
key: "ifNeedExecuteConnectAudioOption",
|
|
587
|
+
value: function ifNeedExecuteConnectAudioOption() {
|
|
588
|
+
return !this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
|
|
589
|
+
}
|
|
590
|
+
}, {
|
|
591
|
+
key: "ifNeedExecuteOpenCamera",
|
|
592
|
+
value: function ifNeedExecuteOpenCamera() {
|
|
593
|
+
return !this._hasExecutedOpenCamera && !this._sharedSettingDataSource.media.cameraExpectedOff;
|
|
594
|
+
}
|
|
595
|
+
}, {
|
|
596
|
+
key: "connectAudio",
|
|
597
|
+
value: function connectAudio(includeMicrophone) {
|
|
598
|
+
if (includeMicrophone) {
|
|
599
|
+
var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._sharedSettingDataSource.media.microphoneExpectedOff;
|
|
600
|
+
if (!dontNeedOpenMicrophone) {
|
|
601
|
+
this.setMicrophoneEnabled(true);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
if (this.microphoneList.length > 0) {
|
|
605
|
+
this._messageProvider.showToast({
|
|
606
|
+
type: 'normal',
|
|
607
|
+
message: transI18n('fmt_gateway_tips_nodata')
|
|
608
|
+
});
|
|
609
|
+
} else {
|
|
610
|
+
this._messageProvider.showToast({
|
|
611
|
+
type: 'normal',
|
|
612
|
+
message: transI18n('fmt_toolbar_label_nodevice')
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
this._hasExecutedConnectAudio = true;
|
|
616
|
+
// this._mediaControl.adjustOutputVolume(100);
|
|
617
|
+
|
|
618
|
+
this._isAudioConnected = true;
|
|
619
|
+
this.setConnectType(FcrUIConnectType.COMPUTER);
|
|
620
|
+
this._observable.notifyObservers('onAudioConnected');
|
|
621
|
+
}
|
|
622
|
+
}, {
|
|
623
|
+
key: "disconnectAudio",
|
|
624
|
+
value: function disconnectAudio() {
|
|
625
|
+
this._hasExecutedConnectAudio = true;
|
|
626
|
+
this._isAudioConnected = false;
|
|
627
|
+
this.setMicrophoneEnabled(false);
|
|
628
|
+
// this._mediaControl.adjustOutputVolume(0);
|
|
629
|
+
this.setConnectType(FcrUIConnectType.NONE);
|
|
630
|
+
this._observable.notifyObservers('onAudioDisconnected');
|
|
631
|
+
}
|
|
632
|
+
}, {
|
|
633
|
+
key: "cameraId",
|
|
634
|
+
get: function get() {
|
|
635
|
+
return this._cameraDevice.id || '';
|
|
636
|
+
}
|
|
637
|
+
}, {
|
|
638
|
+
key: "speakerId",
|
|
639
|
+
get: function get() {
|
|
640
|
+
return this._speaker.id;
|
|
641
|
+
}
|
|
642
|
+
}, {
|
|
643
|
+
key: "microphoneId",
|
|
644
|
+
get: function get() {
|
|
645
|
+
return this._microphone.id;
|
|
646
|
+
}
|
|
647
|
+
}, {
|
|
648
|
+
key: "defaultMirror",
|
|
649
|
+
get: function get() {
|
|
650
|
+
return this._defaultMirror;
|
|
651
|
+
}
|
|
652
|
+
}, {
|
|
653
|
+
key: "followSystemMicrophoneDevice",
|
|
654
|
+
get: function get() {
|
|
655
|
+
return this._microphone.id === DEFAULT_DEVICE_ID;
|
|
656
|
+
}
|
|
657
|
+
}, {
|
|
658
|
+
key: "followSystemSpeakerDevice",
|
|
659
|
+
get: function get() {
|
|
660
|
+
return this._speaker.id === DEFAULT_DEVICE_ID;
|
|
661
|
+
}
|
|
662
|
+
}, {
|
|
663
|
+
key: "lastEnableVideoEffectType",
|
|
664
|
+
get: function get() {
|
|
665
|
+
return this._lastEnableVideoEffectType;
|
|
666
|
+
},
|
|
667
|
+
set: function set(type) {
|
|
668
|
+
this._lastEnableVideoEffectType = type;
|
|
669
|
+
}
|
|
670
|
+
}, {
|
|
671
|
+
key: "currentDeviceId",
|
|
672
|
+
get: function get() {
|
|
673
|
+
return {
|
|
674
|
+
cameraDeviceId: this._cameraDevice.id || '',
|
|
675
|
+
microphoneDeviceId: this._microphoneDevice.id || '',
|
|
676
|
+
speakerDeviceId: this._speakerDevice.id || ''
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
}, {
|
|
680
|
+
key: "currentDeviceName",
|
|
681
|
+
get: function get() {
|
|
682
|
+
return {
|
|
683
|
+
microphoneDeviceName: this._microphoneDevice.name || '',
|
|
684
|
+
speakerDeviceName: this._speakerDevice.name || ''
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
}, {
|
|
688
|
+
key: "isAudioConnected",
|
|
689
|
+
get: function get() {
|
|
690
|
+
return this._isAudioConnected;
|
|
691
|
+
}
|
|
692
|
+
}, {
|
|
693
|
+
key: "shouldEnableMicBeforeSession",
|
|
694
|
+
get: function get() {
|
|
695
|
+
return !this._sharedSettingDataSource.media.microphoneExpectedOff && this._sharedSettingDataSource.media.autoConnectAudio;
|
|
696
|
+
}
|
|
697
|
+
}, {
|
|
698
|
+
key: "microphoneEnabled",
|
|
699
|
+
get: function get() {
|
|
700
|
+
return this._microphoneEnabled && !this.speakerDetecting && this._isMicrophoneWorking;
|
|
701
|
+
}
|
|
702
|
+
}, {
|
|
703
|
+
key: "microphoneState",
|
|
704
|
+
get: function get() {
|
|
705
|
+
if (this.speakerDetecting) {
|
|
706
|
+
return FcrUIMicrophoneState.MUTE;
|
|
707
|
+
}
|
|
708
|
+
if (this._microphoneEnabled && this._isMicrophoneWorking) {
|
|
709
|
+
return FcrUIMicrophoneState.UNMUTE;
|
|
710
|
+
}
|
|
711
|
+
if (this._microphoneEnabled && !this._isMicrophoneWorking) {
|
|
712
|
+
return FcrUIMicrophoneState.OPENING;
|
|
713
|
+
}
|
|
714
|
+
if (!this._microphoneEnabled) {
|
|
715
|
+
return FcrUIMicrophoneState.MUTE;
|
|
716
|
+
}
|
|
717
|
+
return FcrUIMicrophoneState.MUTE;
|
|
718
|
+
}
|
|
719
|
+
}, {
|
|
720
|
+
key: "soundEffectPlayUrlMap",
|
|
721
|
+
get: function get() {
|
|
722
|
+
return this._soundEffectPlayUrlMap;
|
|
723
|
+
}
|
|
724
|
+
}, {
|
|
725
|
+
key: "soundEffectFilePathMap",
|
|
726
|
+
get: function get() {
|
|
727
|
+
return this._soundEffectFilePathMap;
|
|
728
|
+
}
|
|
729
|
+
}, {
|
|
730
|
+
key: "resetDevice",
|
|
731
|
+
value: function resetDevice() {
|
|
732
|
+
this._hasExecutedOpenCamera = false;
|
|
733
|
+
this._hasExecutedConnectAudio = false;
|
|
734
|
+
this._isAudioConnected = false;
|
|
735
|
+
this.setCameraEnabled(false);
|
|
736
|
+
this.setMicrophoneEnabled(false);
|
|
737
|
+
this.setConnectType(FcrUIConnectType.NONE);
|
|
738
|
+
this._observable.notifyObservers('onAudioDisconnected');
|
|
739
|
+
}
|
|
740
|
+
}, {
|
|
741
|
+
key: "release",
|
|
742
|
+
value: function release() {
|
|
743
|
+
var _this$_cameraVideoTra, _this$_microphoneAudi;
|
|
744
|
+
this._released = true;
|
|
745
|
+
this._mediaControl.removeObserver(this._mediaControlObserver);
|
|
746
|
+
this._toggleLocalCameraPreview(false);
|
|
747
|
+
this._localVideoViewSet.clear();
|
|
748
|
+
(_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.stop();
|
|
749
|
+
this._cameraVideoTrack = null;
|
|
750
|
+
this._stopSelectedSpeakerTest();
|
|
751
|
+
this._stopMicrophoneTest();
|
|
752
|
+
(_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 || _this$_microphoneAudi.stop();
|
|
753
|
+
this._microphoneAudioTrack = null;
|
|
754
|
+
this._isMicrophoneWorking = false;
|
|
755
|
+
this._disposer.forEach(function (disposer) {
|
|
756
|
+
return disposer();
|
|
757
|
+
});
|
|
758
|
+
this._disposer = [];
|
|
759
|
+
}
|
|
760
|
+
}, {
|
|
761
|
+
key: "getScreenTrack",
|
|
762
|
+
value: function getScreenTrack(id) {
|
|
763
|
+
return this._mediaControl.getScreenTrack(id);
|
|
764
|
+
}
|
|
765
|
+
}, {
|
|
766
|
+
key: "getLoopbackTrack",
|
|
767
|
+
value: function getLoopbackTrack(id) {
|
|
768
|
+
return this._mediaControl.getLoopbackTrack(id);
|
|
769
|
+
}
|
|
770
|
+
}, {
|
|
771
|
+
key: "isCapabilitySupported",
|
|
772
|
+
value: function isCapabilitySupported(type) {
|
|
773
|
+
return this._mediaControl.isCapabilitySupported(type);
|
|
774
|
+
}
|
|
775
|
+
}, {
|
|
776
|
+
key: "getWindowList",
|
|
777
|
+
value: function getWindowList() {
|
|
778
|
+
return this._mediaControl.getWindowList();
|
|
779
|
+
}
|
|
780
|
+
}, {
|
|
781
|
+
key: "getDisplayList",
|
|
782
|
+
value: function getDisplayList() {
|
|
783
|
+
return this._mediaControl.getDisplayList();
|
|
784
|
+
}
|
|
785
|
+
}, {
|
|
786
|
+
key: "cameraTrack",
|
|
787
|
+
get: function get() {
|
|
788
|
+
return this._cameraVideoTrack;
|
|
789
|
+
}
|
|
790
|
+
}, {
|
|
791
|
+
key: "microphoneTrack",
|
|
792
|
+
get: function get() {
|
|
793
|
+
return this._microphoneAudioTrack;
|
|
794
|
+
}
|
|
795
|
+
}, {
|
|
796
|
+
key: "addObserver",
|
|
797
|
+
value: function addObserver(observer) {
|
|
798
|
+
this._observable.addObserver(observer);
|
|
799
|
+
}
|
|
800
|
+
}, {
|
|
801
|
+
key: "removeObserver",
|
|
802
|
+
value: function removeObserver(observer) {
|
|
803
|
+
this._observable.removeObserver(observer);
|
|
804
|
+
}
|
|
805
|
+
}, {
|
|
806
|
+
key: "startPlayLocalVideo",
|
|
807
|
+
value: function startPlayLocalVideo(view) {
|
|
808
|
+
var isMirror = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.currentIsMirror;
|
|
809
|
+
if (!this._cameraVideoTrack || !view) return;
|
|
810
|
+
this._localVideoViewSet.add(view);
|
|
811
|
+
this._cameraVideoTrack.startPreview({
|
|
812
|
+
renderMode: FcrVideoRenderMode.HIDDEN,
|
|
813
|
+
isMirror: isMirror
|
|
814
|
+
}, view);
|
|
815
|
+
this.currentIsMirror = isMirror;
|
|
816
|
+
}
|
|
817
|
+
}, {
|
|
818
|
+
key: "stopPlayLocalVideo",
|
|
819
|
+
value: function stopPlayLocalVideo(view) {
|
|
820
|
+
var _this$_cameraVideoTra2;
|
|
821
|
+
if (!view) return;
|
|
822
|
+
this._localVideoViewSet["delete"](view);
|
|
823
|
+
(_this$_cameraVideoTra2 = this._cameraVideoTrack) === null || _this$_cameraVideoTra2 === void 0 || _this$_cameraVideoTra2.stopPreview(view);
|
|
824
|
+
}
|
|
825
|
+
}, {
|
|
826
|
+
key: "startSpeakerTest",
|
|
827
|
+
value: function startSpeakerTest() {
|
|
828
|
+
this.speakerDetecting = true;
|
|
829
|
+
}
|
|
830
|
+
}, {
|
|
831
|
+
key: "stopSpeakerTest",
|
|
832
|
+
value: function stopSpeakerTest() {
|
|
833
|
+
this.speakerDetecting = false;
|
|
834
|
+
}
|
|
835
|
+
}, {
|
|
836
|
+
key: "setCurrentIsMirror",
|
|
837
|
+
value: function setCurrentIsMirror(isMirror) {
|
|
838
|
+
this.currentIsMirror = isMirror;
|
|
839
|
+
}
|
|
840
|
+
}, {
|
|
841
|
+
key: "toggleLocalMirrorPreview",
|
|
842
|
+
value: function toggleLocalMirrorPreview(mirror) {
|
|
843
|
+
var _this2 = this;
|
|
844
|
+
this.setCurrentIsMirror(mirror);
|
|
845
|
+
this._localVideoViewSet.forEach(function (view) {
|
|
846
|
+
var _this2$_cameraVideoTr, _this2$_cameraVideoTr2;
|
|
847
|
+
(_this2$_cameraVideoTr = _this2._cameraVideoTrack) === null || _this2$_cameraVideoTr === void 0 || _this2$_cameraVideoTr.stopPreview(view);
|
|
848
|
+
(_this2$_cameraVideoTr2 = _this2._cameraVideoTrack) === null || _this2$_cameraVideoTr2 === void 0 || _this2$_cameraVideoTr2.startPreview({
|
|
849
|
+
renderMode: FcrVideoRenderMode.HIDDEN,
|
|
850
|
+
isMirror: mirror
|
|
851
|
+
}, view);
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
}, {
|
|
855
|
+
key: "setBeautyOptions",
|
|
856
|
+
value: function setBeautyOptions(beautyOption) {
|
|
857
|
+
Object.assign(this.beautyOptions, beautyOption);
|
|
858
|
+
if (!this._cameraVideoTrack) return;
|
|
859
|
+
this._cameraVideoTrack.getVideoEffectEnhancer().setBeautyOptions({
|
|
860
|
+
lighteningContrastLevel: convertToFixedNumber(this.beautyOptions.lighteningContrastLevel),
|
|
861
|
+
lighteningLevel: convertToFixedNumber(this.beautyOptions.lighteningLevel),
|
|
862
|
+
smoothnessLevel: convertToFixedNumber(this.beautyOptions.smoothnessLevel),
|
|
863
|
+
sharpnessLevel: convertToFixedNumber(this.beautyOptions.sharpnessLevel),
|
|
864
|
+
rednessLevel: convertToFixedNumber(this.beautyOptions.rednessLevel)
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}, {
|
|
868
|
+
key: "handleCancelForceOpenVideoEffect",
|
|
869
|
+
value: function handleCancelForceOpenVideoEffect() {
|
|
870
|
+
this.showForceOpenEffectDialog = false;
|
|
871
|
+
}
|
|
872
|
+
}, {
|
|
873
|
+
key: "handleForceOpenVideoEffect",
|
|
874
|
+
value: function handleForceOpenVideoEffect() {
|
|
875
|
+
var _this3 = this;
|
|
876
|
+
var reset = function reset() {
|
|
877
|
+
_this3.lastEnableVideoEffectType = FcrUIVideoEffectType.NONE;
|
|
878
|
+
_this3.showForceOpenEffectDialog = false;
|
|
879
|
+
};
|
|
880
|
+
if (this.lastEnableVideoEffectType === FcrUIVideoEffectType.BEAUTY) {
|
|
881
|
+
this._isForceEnableBeauty = true;
|
|
882
|
+
this.enableBeautyEffect(true);
|
|
883
|
+
reset();
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
if (this.lastEnableVideoEffectType === FcrUIVideoEffectType.VIRTUAL_BACKGROUND) {
|
|
887
|
+
this._isForceEnableVirtualBackground = true;
|
|
888
|
+
this.enableVirtualBackground(true);
|
|
889
|
+
reset();
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}, {
|
|
894
|
+
key: "setVideoOrientation",
|
|
895
|
+
value: function setVideoOrientation() {
|
|
896
|
+
var _this$_cameraVideoTra3;
|
|
897
|
+
if (this._videoRotation === FcrVideoOrientation.VIDEO_ORIENTATION_270) {
|
|
898
|
+
this._videoRotation = FcrVideoOrientation.VIDEO_ORIENTATION_0;
|
|
899
|
+
} else {
|
|
900
|
+
this._videoRotation = this._videoRotation + 1;
|
|
901
|
+
}
|
|
902
|
+
(_this$_cameraVideoTra3 = this._cameraVideoTrack) === null || _this$_cameraVideoTra3 === void 0 || _this$_cameraVideoTra3.setVideoOrientation(this._videoRotation);
|
|
903
|
+
}
|
|
904
|
+
}, {
|
|
905
|
+
key: "setCameraEnabled",
|
|
906
|
+
value: function setCameraEnabled(enable) {
|
|
907
|
+
this.cameraEnabled = enable;
|
|
908
|
+
}
|
|
909
|
+
}, {
|
|
910
|
+
key: "_handleCameraEnabledChanged",
|
|
911
|
+
value: function _handleCameraEnabledChanged() {
|
|
912
|
+
if (this.cameraEnabled) {
|
|
913
|
+
this._hasExecutedOpenCamera = true;
|
|
914
|
+
}
|
|
915
|
+
this._handleCameraVideoTrack();
|
|
916
|
+
this.setShowCameraPreview(this.cameraEnabled);
|
|
917
|
+
}
|
|
918
|
+
}, {
|
|
919
|
+
key: "setMicrophoneEnabled",
|
|
920
|
+
value: function setMicrophoneEnabled(enable) {
|
|
921
|
+
this._microphoneEnabled = enable;
|
|
922
|
+
}
|
|
923
|
+
}, {
|
|
924
|
+
key: "toggleLocalMirror",
|
|
925
|
+
value: function toggleLocalMirror(enable) {
|
|
926
|
+
this._defaultMirror = enable;
|
|
927
|
+
this.isLocalMirrorEnabled = enable;
|
|
928
|
+
this.toggleLocalMirrorPreview(enable);
|
|
929
|
+
}
|
|
930
|
+
}, {
|
|
931
|
+
key: "resetMirror",
|
|
932
|
+
value: function resetMirror() {
|
|
933
|
+
this.isLocalMirrorEnabled = false;
|
|
934
|
+
this.setCurrentIsMirror(false);
|
|
935
|
+
}
|
|
936
|
+
}, {
|
|
937
|
+
key: "startMicrophoneTest",
|
|
938
|
+
value: function startMicrophoneTest() {
|
|
939
|
+
this.microphoneDetecting = true;
|
|
940
|
+
}
|
|
941
|
+
}, {
|
|
942
|
+
key: "stopMicrophoneTest",
|
|
943
|
+
value: function stopMicrophoneTest() {
|
|
944
|
+
this.microphoneDetecting = false;
|
|
945
|
+
}
|
|
946
|
+
}, {
|
|
947
|
+
key: "enableVirtualBackground",
|
|
948
|
+
value: function enableVirtualBackground(enable, source) {
|
|
949
|
+
if (!this._cameraVideoTrack) return;
|
|
950
|
+
if (!enable) {
|
|
951
|
+
this.virtualBackgroundName = 'None';
|
|
952
|
+
} else {
|
|
953
|
+
if (source) {
|
|
954
|
+
this.virtualBackgroundName = source.name;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
var videoEffectEnhancer = this._cameraVideoTrack.getVideoEffectEnhancer();
|
|
958
|
+
if (source) {
|
|
959
|
+
videoEffectEnhancer.setVirtualBackgroundOptions({
|
|
960
|
+
source: source === null || source === void 0 ? void 0 : source.path,
|
|
961
|
+
type: source === null || source === void 0 ? void 0 : source.type
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
if (!enable) {
|
|
965
|
+
this._isForceEnableVirtualBackground = false;
|
|
966
|
+
videoEffectEnhancer.disableVirtualBackground();
|
|
967
|
+
} else {
|
|
968
|
+
var isSatisfyVirtualBackgroundRequirements = videoEffectEnhancer.checkSatisfyVirtualBackgroundRequirements() || this._isForceEnableVirtualBackground;
|
|
969
|
+
if (isSatisfyVirtualBackgroundRequirements) {
|
|
970
|
+
videoEffectEnhancer.enableVirtualBackground();
|
|
971
|
+
} else {
|
|
972
|
+
this.showForceOpenEffectDialog = true;
|
|
973
|
+
this.lastEnableVideoEffectType = FcrUIVideoEffectType.VIRTUAL_BACKGROUND;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}, {
|
|
978
|
+
key: "setEditBeautyKey",
|
|
979
|
+
value: function setEditBeautyKey(key) {
|
|
980
|
+
this.isLocalEditBeautyOptions = key !== 'none';
|
|
981
|
+
this.beautyKey = key;
|
|
982
|
+
}
|
|
983
|
+
}, {
|
|
984
|
+
key: "enableBeautyEffect",
|
|
985
|
+
value: function enableBeautyEffect(enable) {
|
|
986
|
+
if (!this._cameraVideoTrack) return;
|
|
987
|
+
var videoEffectEnhancer = this._cameraVideoTrack.getVideoEffectEnhancer();
|
|
988
|
+
if (enable) {
|
|
989
|
+
var isSatisfyBeautyRequirements = videoEffectEnhancer.checkSatisfyBeautyRequirements() || this._isForceEnableBeauty;
|
|
990
|
+
1;
|
|
991
|
+
if (isSatisfyBeautyRequirements) {
|
|
992
|
+
this.enableBeauty = true;
|
|
993
|
+
this.setBeautyOptions(this.beautyOptions);
|
|
994
|
+
videoEffectEnhancer.enableBeauty();
|
|
995
|
+
} else {
|
|
996
|
+
this.showForceOpenEffectDialog = true;
|
|
997
|
+
this.enableBeauty = false;
|
|
998
|
+
this.lastEnableVideoEffectType = FcrUIVideoEffectType.BEAUTY;
|
|
999
|
+
}
|
|
1000
|
+
} else {
|
|
1001
|
+
this.enableBeauty = false;
|
|
1002
|
+
this.setEditBeautyKey('none');
|
|
1003
|
+
this._isForceEnableBeauty = false;
|
|
1004
|
+
videoEffectEnhancer.disableBeauty();
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// 高保真
|
|
1009
|
+
}, {
|
|
1010
|
+
key: "enableAudioHiFiMode",
|
|
1011
|
+
value: function enableAudioHiFiMode(enable) {
|
|
1012
|
+
if (!this._microphoneAudioTrack) return;
|
|
1013
|
+
if (enable) {
|
|
1014
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().enableHiFiMode();
|
|
1015
|
+
return;
|
|
1016
|
+
} else {
|
|
1017
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().disableHiFiMode();
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
// 回声消除
|
|
1022
|
+
}, {
|
|
1023
|
+
key: "enableAudioEchoCancellation",
|
|
1024
|
+
value: function enableAudioEchoCancellation(enable) {
|
|
1025
|
+
if (!this._microphoneAudioTrack) return;
|
|
1026
|
+
if (enable) {
|
|
1027
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().enableEchoCancellation();
|
|
1028
|
+
} else {
|
|
1029
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().disableEchoCancellation();
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// 立体声
|
|
1034
|
+
}, {
|
|
1035
|
+
key: "enableAudioStereo",
|
|
1036
|
+
value: function enableAudioStereo(enable) {
|
|
1037
|
+
if (!this._microphoneAudioTrack) return;
|
|
1038
|
+
if (enable) {
|
|
1039
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().enableStereoMode();
|
|
1040
|
+
} else {
|
|
1041
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().disableStereoMode();
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// 噪音抑制等级
|
|
1046
|
+
}, {
|
|
1047
|
+
key: "setNoiseLevel",
|
|
1048
|
+
value: function setNoiseLevel(level) {
|
|
1049
|
+
if (!this._microphoneAudioTrack) return;
|
|
1050
|
+
if (level === FcrUIAiDenoiseLevel.CLOSE) {
|
|
1051
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().disableAiDenoiser();
|
|
1052
|
+
} else {
|
|
1053
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().enableAiDenoiser();
|
|
1054
|
+
this._microphoneAudioTrack.getAudioEffectEnhancer().setAiDenoiseLevel(level);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}, {
|
|
1058
|
+
key: "setCameraId",
|
|
1059
|
+
value: function setCameraId(cameraId) {
|
|
1060
|
+
this._cameraDevice = {
|
|
1061
|
+
id: cameraId
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
}, {
|
|
1065
|
+
key: "setMainRoomAudioOff",
|
|
1066
|
+
value: function setMainRoomAudioOff(enable) {
|
|
1067
|
+
this.isMainRoomAudioOff = enable;
|
|
1068
|
+
}
|
|
1069
|
+
}, {
|
|
1070
|
+
key: "setSpeakerId",
|
|
1071
|
+
value: function setSpeakerId(speakerId) {
|
|
1072
|
+
this._speaker = {
|
|
1073
|
+
id: speakerId
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
}, {
|
|
1077
|
+
key: "setMicrophoneId",
|
|
1078
|
+
value: function setMicrophoneId(microphoneId) {
|
|
1079
|
+
this._microphone = {
|
|
1080
|
+
id: microphoneId
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
}, {
|
|
1084
|
+
key: "setSpeakerVolume",
|
|
1085
|
+
value: function setSpeakerVolume(value) {
|
|
1086
|
+
this.speakerVolume = value;
|
|
1087
|
+
this._mediaControl.setSelectedSpeakerVolume(value);
|
|
1088
|
+
this._observable.notifyObservers('onSpeakerVolumeChanged', value);
|
|
1089
|
+
}
|
|
1090
|
+
}, {
|
|
1091
|
+
key: "setMicrophoneVolume",
|
|
1092
|
+
value: function setMicrophoneVolume(value) {
|
|
1093
|
+
var _this$_microphoneAudi2;
|
|
1094
|
+
this.microphoneVolume = value;
|
|
1095
|
+
(_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 || _this$_microphoneAudi2.adjustVolume(value);
|
|
1096
|
+
}
|
|
1097
|
+
}, {
|
|
1098
|
+
key: "startOrStopCamera",
|
|
1099
|
+
value: function startOrStopCamera(enable) {
|
|
1100
|
+
this._handleCameraVideoTrack(enable);
|
|
1101
|
+
}
|
|
1102
|
+
}, {
|
|
1103
|
+
key: "setShowCameraPreview",
|
|
1104
|
+
value: function setShowCameraPreview(enable) {
|
|
1105
|
+
this.showCameraPreview = enable;
|
|
1106
|
+
}
|
|
1107
|
+
}, {
|
|
1108
|
+
key: "loadUiResources",
|
|
1109
|
+
value: function () {
|
|
1110
|
+
var _loadUiResources = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(uiResource) {
|
|
1111
|
+
var _this4 = this;
|
|
1112
|
+
var _uiResource$virtualBa, _uiResource$virtualBa2, _uiResource$soundEffe, images, videos, soundEffectAudios, _soundEffectPlayUrlMap, newList, imageInfoList, videoInfoList, _uiResource$virtualBa3, _uiResource$virtualBa4, _uiResource$soundEffe2, _images, _videos, _soundEffectAudios, handleVideoAndImageResourceReady, handleAudioZipResourceReady, handleAudioResourceReady;
|
|
1113
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
1114
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1115
|
+
case 0:
|
|
1116
|
+
if (isElectron()) {
|
|
1117
|
+
_context3.next = 1;
|
|
1118
|
+
break;
|
|
1119
|
+
}
|
|
1120
|
+
images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.filter(function (url) {
|
|
1121
|
+
return isPngOrJpg(url);
|
|
1122
|
+
})) || [];
|
|
1123
|
+
videos = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa2 = uiResource.virtualBackgroundVideos) === null || _uiResource$virtualBa2 === void 0 ? void 0 : _uiResource$virtualBa2.filter(function (url) {
|
|
1124
|
+
return isMp4(url);
|
|
1125
|
+
})) || [];
|
|
1126
|
+
soundEffectAudios = (_uiResource$soundEffe = uiResource === null || uiResource === void 0 ? void 0 : uiResource.soundEffectAudios) !== null && _uiResource$soundEffe !== void 0 ? _uiResource$soundEffe : {};
|
|
1127
|
+
_soundEffectPlayUrlMap = new Map();
|
|
1128
|
+
Object.keys(soundEffectAudios).forEach(function (key) {
|
|
1129
|
+
var url = soundEffectAudios[key];
|
|
1130
|
+
if (url && isMp3OrWav(url)) {
|
|
1131
|
+
_soundEffectPlayUrlMap.set(key, url);
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
newList = this.virtualBackgroundList.slice();
|
|
1135
|
+
imageInfoList = images.map(function (url) {
|
|
1136
|
+
return {
|
|
1137
|
+
url: url,
|
|
1138
|
+
name: getFileNameWithoutExtension(url),
|
|
1139
|
+
path: url,
|
|
1140
|
+
type: VirtualOption.IMG
|
|
1141
|
+
};
|
|
1142
|
+
}) || [];
|
|
1143
|
+
newList = newList.concat(imageInfoList);
|
|
1144
|
+
videoInfoList = videos.map(function (url) {
|
|
1145
|
+
return {
|
|
1146
|
+
url: url,
|
|
1147
|
+
name: getFileNameWithoutExtension(url),
|
|
1148
|
+
path: url,
|
|
1149
|
+
type: VirtualOption.VIDEO
|
|
1150
|
+
};
|
|
1151
|
+
}) || [];
|
|
1152
|
+
newList = newList.concat(videoInfoList);
|
|
1153
|
+
runInAction(function () {
|
|
1154
|
+
_this4._updateVirtualBackgroundList(newList);
|
|
1155
|
+
_this4._soundEffectPlayUrlMap = _soundEffectPlayUrlMap;
|
|
1156
|
+
});
|
|
1157
|
+
_context3.next = 3;
|
|
1158
|
+
break;
|
|
1159
|
+
case 1:
|
|
1160
|
+
_context3.next = 2;
|
|
1161
|
+
return this._loadBuiltinResources();
|
|
1162
|
+
case 2:
|
|
1163
|
+
_images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa3 = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa3 === void 0 ? void 0 : _uiResource$virtualBa3.filter(function (url) {
|
|
1164
|
+
return isZipUrl(url);
|
|
1165
|
+
})) || [];
|
|
1166
|
+
_videos = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa4 = uiResource.virtualBackgroundVideos) === null || _uiResource$virtualBa4 === void 0 ? void 0 : _uiResource$virtualBa4.filter(function (url) {
|
|
1167
|
+
return isZipUrl(url);
|
|
1168
|
+
})) || [];
|
|
1169
|
+
_soundEffectAudios = (_uiResource$soundEffe2 = uiResource === null || uiResource === void 0 ? void 0 : uiResource.soundEffectAudios) !== null && _uiResource$soundEffe2 !== void 0 ? _uiResource$soundEffe2 : {};
|
|
1170
|
+
handleVideoAndImageResourceReady = function handleVideoAndImageResourceReady(filePathList, type) {
|
|
1171
|
+
var list = _this4.virtualBackgroundList.slice();
|
|
1172
|
+
var resourceType = type === 'image' ? VirtualOption.IMG : VirtualOption.VIDEO;
|
|
1173
|
+
list = filePathList.map(function (resource) {
|
|
1174
|
+
return {
|
|
1175
|
+
name: getFileNameWithoutExtension(resource),
|
|
1176
|
+
path: resource,
|
|
1177
|
+
type: resourceType,
|
|
1178
|
+
url: URL.createObjectURL(_this4._renderer.fileToBlob(resource, type))
|
|
1179
|
+
};
|
|
1180
|
+
});
|
|
1181
|
+
var newList = _this4.virtualBackgroundList.concat(list);
|
|
1182
|
+
_this4._updateVirtualBackgroundList(newList);
|
|
1183
|
+
};
|
|
1184
|
+
handleAudioZipResourceReady = function handleAudioZipResourceReady(effectName) {
|
|
1185
|
+
return function (filePathList) {
|
|
1186
|
+
if (filePathList.length > 0) {
|
|
1187
|
+
var firstAudioFilePath = filePathList[0];
|
|
1188
|
+
runInAction(function () {
|
|
1189
|
+
_this4._soundEffectFilePathMap.set(effectName, firstAudioFilePath);
|
|
1190
|
+
_this4._soundEffectPlayUrlMap.set(effectName, URL.createObjectURL(_this4._renderer.fileToBlob(firstAudioFilePath, 'audio')));
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
handleAudioResourceReady = function handleAudioResourceReady(effectName) {
|
|
1196
|
+
return function (filePath) {
|
|
1197
|
+
runInAction(function () {
|
|
1198
|
+
_this4._soundEffectFilePathMap.set(effectName, filePath);
|
|
1199
|
+
_this4._soundEffectPlayUrlMap.set(effectName, URL.createObjectURL(_this4._renderer.fileToBlob(filePath, 'audio')));
|
|
1200
|
+
});
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
this.loadZipResources(_images, 'image', handleVideoAndImageResourceReady);
|
|
1204
|
+
this.loadZipResources(_videos, 'video', handleVideoAndImageResourceReady);
|
|
1205
|
+
Object.keys(_soundEffectAudios).forEach(function (key) {
|
|
1206
|
+
var effectName = key;
|
|
1207
|
+
var url = _soundEffectAudios[effectName];
|
|
1208
|
+
if (url && isZipUrl(url)) {
|
|
1209
|
+
_this4.loadZipResources([url], 'audio', handleAudioZipResourceReady(effectName))["catch"](function (e) {
|
|
1210
|
+
_this4.logger.error(e);
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
if (url && isMp3OrWavUrl(url)) {
|
|
1214
|
+
_this4.loadFileResources(url, 'audio', handleAudioResourceReady(effectName))["catch"](function (e) {
|
|
1215
|
+
_this4.logger.error(e);
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
case 3:
|
|
1220
|
+
case "end":
|
|
1221
|
+
return _context3.stop();
|
|
1222
|
+
}
|
|
1223
|
+
}, _callee3, this);
|
|
1224
|
+
}));
|
|
1225
|
+
function loadUiResources(_x) {
|
|
1226
|
+
return _loadUiResources.apply(this, arguments);
|
|
1227
|
+
}
|
|
1228
|
+
return loadUiResources;
|
|
1229
|
+
}()
|
|
1230
|
+
}, {
|
|
1231
|
+
key: "loadZipResources",
|
|
1232
|
+
value: function () {
|
|
1233
|
+
var _loadZipResources = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(zipUrls, type, callback) {
|
|
1234
|
+
var _this5 = this;
|
|
1235
|
+
var ps;
|
|
1236
|
+
return _regeneratorRuntime.wrap(function (_context5) {
|
|
1237
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1238
|
+
case 0:
|
|
1239
|
+
ps = zipUrls.map(/*#__PURE__*/function () {
|
|
1240
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(url) {
|
|
1241
|
+
var filePathList;
|
|
1242
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
1243
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1244
|
+
case 0:
|
|
1245
|
+
_context4.next = 1;
|
|
1246
|
+
return _this5._renderer.downloadAndExtractResourceFileFromZip(url, type);
|
|
1247
|
+
case 1:
|
|
1248
|
+
filePathList = _context4.sent;
|
|
1249
|
+
callback(filePathList, type);
|
|
1250
|
+
case 2:
|
|
1251
|
+
case "end":
|
|
1252
|
+
return _context4.stop();
|
|
1253
|
+
}
|
|
1254
|
+
}, _callee4);
|
|
1255
|
+
}));
|
|
1256
|
+
return function (_x5) {
|
|
1257
|
+
return _ref2.apply(this, arguments);
|
|
1258
|
+
};
|
|
1259
|
+
}());
|
|
1260
|
+
_context5.next = 1;
|
|
1261
|
+
return Promise.allSettled(ps);
|
|
1262
|
+
case 1:
|
|
1263
|
+
case "end":
|
|
1264
|
+
return _context5.stop();
|
|
1265
|
+
}
|
|
1266
|
+
}, _callee5);
|
|
1267
|
+
}));
|
|
1268
|
+
function loadZipResources(_x2, _x3, _x4) {
|
|
1269
|
+
return _loadZipResources.apply(this, arguments);
|
|
1270
|
+
}
|
|
1271
|
+
return loadZipResources;
|
|
1272
|
+
}()
|
|
1273
|
+
}, {
|
|
1274
|
+
key: "loadFileResources",
|
|
1275
|
+
value: function () {
|
|
1276
|
+
var _loadFileResources = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(fileUrl, type, callback) {
|
|
1277
|
+
var filePath;
|
|
1278
|
+
return _regeneratorRuntime.wrap(function (_context6) {
|
|
1279
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1280
|
+
case 0:
|
|
1281
|
+
_context6.next = 1;
|
|
1282
|
+
return this._renderer.downloadResourceFile(fileUrl, type);
|
|
1283
|
+
case 1:
|
|
1284
|
+
filePath = _context6.sent;
|
|
1285
|
+
callback(filePath);
|
|
1286
|
+
case 2:
|
|
1287
|
+
case "end":
|
|
1288
|
+
return _context6.stop();
|
|
1289
|
+
}
|
|
1290
|
+
}, _callee6, this);
|
|
1291
|
+
}));
|
|
1292
|
+
function loadFileResources(_x6, _x7, _x8) {
|
|
1293
|
+
return _loadFileResources.apply(this, arguments);
|
|
1294
|
+
}
|
|
1295
|
+
return loadFileResources;
|
|
1296
|
+
}()
|
|
1297
|
+
}, {
|
|
1298
|
+
key: "toggleAGC",
|
|
1299
|
+
value: function toggleAGC(enable) {
|
|
1300
|
+
if (!this._microphoneAudioTrack) return;
|
|
1301
|
+
if (enable) {
|
|
1302
|
+
return this._microphoneAudioTrack.getAudioEffectEnhancer().enableAGC();
|
|
1303
|
+
} else {
|
|
1304
|
+
return this._microphoneAudioTrack.getAudioEffectEnhancer().disableAGC();
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}, {
|
|
1308
|
+
key: "setConnectType",
|
|
1309
|
+
value: function setConnectType(connectType) {
|
|
1310
|
+
this.connectType = connectType;
|
|
1311
|
+
}
|
|
1312
|
+
}, {
|
|
1313
|
+
key: "toggleLocalCameraPreview",
|
|
1314
|
+
value: function toggleLocalCameraPreview(enabled) {
|
|
1315
|
+
return this._toggleLocalCameraPreview(enabled);
|
|
1316
|
+
}
|
|
1317
|
+
}, {
|
|
1318
|
+
key: "getLoopbackDeviceId",
|
|
1319
|
+
value: function getLoopbackDeviceId() {
|
|
1320
|
+
if (isElectron()) {
|
|
1321
|
+
var loopbackList = this._mediaControl.getLoopbackList();
|
|
1322
|
+
if (loopbackList.length > 0) {
|
|
1323
|
+
return loopbackList[0].deviceId;
|
|
1324
|
+
}
|
|
1325
|
+
return null;
|
|
1326
|
+
} else {
|
|
1327
|
+
return 'default';
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}, {
|
|
1331
|
+
key: "_initDeviceList",
|
|
1332
|
+
value: function _initDeviceList() {
|
|
1333
|
+
var _this6 = this;
|
|
1334
|
+
// this.toggleAGC(true);
|
|
1335
|
+
Promise.all([this._mediaControl.getCameraList().then(function (list) {
|
|
1336
|
+
if (_this6._released) return;
|
|
1337
|
+
_this6.cameraList = list;
|
|
1338
|
+
_this6.logger.info("[FcrDeviceStore] init camera list: ".concat(jsonstring(list)));
|
|
1339
|
+
if (_this6.cameraList.length > 0) {
|
|
1340
|
+
var defaultCameraDeviceId = _this6.cameraList[0].deviceId;
|
|
1341
|
+
_this6.logger.info('[FcrDeviceStore] select default camera id:', defaultCameraDeviceId);
|
|
1342
|
+
_this6.setCameraId(defaultCameraDeviceId);
|
|
1343
|
+
}
|
|
1344
|
+
}), this._getMicrophoneList().then(/*#__PURE__*/function () {
|
|
1345
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(microphoneList) {
|
|
1346
|
+
return _regeneratorRuntime.wrap(function (_context7) {
|
|
1347
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1348
|
+
case 0:
|
|
1349
|
+
if (!_this6._released) {
|
|
1350
|
+
_context7.next = 1;
|
|
1351
|
+
break;
|
|
1352
|
+
}
|
|
1353
|
+
return _context7.abrupt("return");
|
|
1354
|
+
case 1:
|
|
1355
|
+
_this6.microphoneList = microphoneList;
|
|
1356
|
+
_this6.logger.info("[FcrDeviceStore] init microphone list: ".concat(jsonstring(microphoneList)));
|
|
1357
|
+
if (_this6.microphoneList.length > 0) {
|
|
1358
|
+
// 默认跟随系统
|
|
1359
|
+
_this6.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1360
|
+
}
|
|
1361
|
+
case 2:
|
|
1362
|
+
case "end":
|
|
1363
|
+
return _context7.stop();
|
|
1364
|
+
}
|
|
1365
|
+
}, _callee7);
|
|
1366
|
+
}));
|
|
1367
|
+
return function (_x9) {
|
|
1368
|
+
return _ref3.apply(this, arguments);
|
|
1369
|
+
};
|
|
1370
|
+
}()), this._getSpeakerList().then(/*#__PURE__*/function () {
|
|
1371
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(speakerList) {
|
|
1372
|
+
return _regeneratorRuntime.wrap(function (_context8) {
|
|
1373
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1374
|
+
case 0:
|
|
1375
|
+
if (!_this6._released) {
|
|
1376
|
+
_context8.next = 1;
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
return _context8.abrupt("return");
|
|
1380
|
+
case 1:
|
|
1381
|
+
_this6.speakerList = speakerList;
|
|
1382
|
+
_this6.logger.info("[FcrDeviceStore] init speaker list: ".concat(jsonstring(speakerList)));
|
|
1383
|
+
if (_this6.speakerList.length > 0) {
|
|
1384
|
+
// 默认跟随系统
|
|
1385
|
+
_this6.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1386
|
+
}
|
|
1387
|
+
case 2:
|
|
1388
|
+
case "end":
|
|
1389
|
+
return _context8.stop();
|
|
1390
|
+
}
|
|
1391
|
+
}, _callee8);
|
|
1392
|
+
}));
|
|
1393
|
+
return function (_x0) {
|
|
1394
|
+
return _ref4.apply(this, arguments);
|
|
1395
|
+
};
|
|
1396
|
+
}())]);
|
|
1397
|
+
}
|
|
1398
|
+
}, {
|
|
1399
|
+
key: "_handleMicrophoneAudioTrack",
|
|
1400
|
+
value: function _handleMicrophoneAudioTrack() {
|
|
1401
|
+
if (!this._microphoneAudioTrack) {
|
|
1402
|
+
this.logger.warn('microphone audio track is not set');
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
if (this._microphoneEnabled) {
|
|
1406
|
+
this._microphoneAudioTrack.start();
|
|
1407
|
+
} else {
|
|
1408
|
+
this._isMicrophoneWorking = false;
|
|
1409
|
+
this._microphoneAudioTrack.stop();
|
|
1410
|
+
this.microphoneVolumeLevel = 0;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
}, {
|
|
1414
|
+
key: "_handleMicrophoneStateUpdated",
|
|
1415
|
+
value: function _handleMicrophoneStateUpdated(deviceId, state) {
|
|
1416
|
+
this._isMicrophoneWorking = this._microphoneDevice.id === deviceId && state === FcrMediaSourceState.OPEN;
|
|
1417
|
+
}
|
|
1418
|
+
}, {
|
|
1419
|
+
key: "_handleMicrophoneEnabledChanged",
|
|
1420
|
+
value: function _handleMicrophoneEnabledChanged() {
|
|
1421
|
+
this._handleMicrophoneAudioTrack();
|
|
1422
|
+
}
|
|
1423
|
+
}, {
|
|
1424
|
+
key: "_handleCameraVideoTrack",
|
|
1425
|
+
value: function _handleCameraVideoTrack() {
|
|
1426
|
+
var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.cameraEnabled;
|
|
1427
|
+
var cameraTrack = this._cameraVideoTrack;
|
|
1428
|
+
if (!cameraTrack) {
|
|
1429
|
+
this.logger.warn('camera video track is not set');
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
if (enable) {
|
|
1433
|
+
cameraTrack.start();
|
|
1434
|
+
} else {
|
|
1435
|
+
this._toggleLocalCameraPreview(enable);
|
|
1436
|
+
cameraTrack.stop();
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}, {
|
|
1440
|
+
key: "_handleCameraDeviceIdChanged",
|
|
1441
|
+
value: function _handleCameraDeviceIdChanged() {
|
|
1442
|
+
if (!this._cameraDevice.id) {
|
|
1443
|
+
this.logger.warn('camera id is not set');
|
|
1444
|
+
return;
|
|
1445
|
+
} else {
|
|
1446
|
+
var _this$_cameraVideoTra4, _this$_cameraVideoTra5;
|
|
1447
|
+
(_this$_cameraVideoTra4 = this._cameraVideoTrack) === null || _this$_cameraVideoTra4 === void 0 || _this$_cameraVideoTra4.stopTest();
|
|
1448
|
+
(_this$_cameraVideoTra5 = this._cameraVideoTrack) === null || _this$_cameraVideoTra5 === void 0 || _this$_cameraVideoTra5.stop();
|
|
1449
|
+
this._cameraVideoTrack = this._mediaControl.getCameraTrack(this._cameraDevice.id);
|
|
1450
|
+
this._handleCameraVideoTrack();
|
|
1451
|
+
if (this.showCameraPreview) {
|
|
1452
|
+
this.logger.debug("start camera video track showCameraPreview:".concat(this.showCameraPreview, ",cameraEnabled:").concat(this.cameraEnabled));
|
|
1453
|
+
this._cameraVideoTrack.start();
|
|
1454
|
+
}
|
|
1455
|
+
this._observable.notifyObservers('onCameraChanged', this._cameraDevice.id);
|
|
1456
|
+
}
|
|
1457
|
+
this._toggleLocalCameraPreview(this.showCameraPreview);
|
|
1458
|
+
}
|
|
1459
|
+
}, {
|
|
1460
|
+
key: "_handleSpeakerDetectingChanged",
|
|
1461
|
+
value: function _handleSpeakerDetectingChanged() {
|
|
1462
|
+
var _this7 = this;
|
|
1463
|
+
if (this._microphoneEnabled) {
|
|
1464
|
+
if (this.speakerDetecting) {
|
|
1465
|
+
var _this$_microphoneAudi3;
|
|
1466
|
+
(_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.stop();
|
|
1467
|
+
} else {
|
|
1468
|
+
var _this$_microphoneAudi4;
|
|
1469
|
+
(_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.start();
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
if (this.speakerDetecting) {
|
|
1473
|
+
var startSelectedSpeakerTest = function startSelectedSpeakerTest() {
|
|
1474
|
+
var soundUrl = isElectron() ? _this7._soundEffectFilePathMap.get('speakerTest') : _this7._soundEffectPlayUrlMap.get('speakerTest');
|
|
1475
|
+
if (!soundUrl) {
|
|
1476
|
+
_this7.logger.error('speakerTest soundUrl is not set');
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1479
|
+
_this7._mediaControl.startSelectedSpeakerTest(soundUrl, _this7._volumeIndicationInterval);
|
|
1480
|
+
};
|
|
1481
|
+
startSelectedSpeakerTest();
|
|
1482
|
+
var sleep = 3000;
|
|
1483
|
+
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
1484
|
+
this._playAudioTimer = setInterval(function () {
|
|
1485
|
+
startSelectedSpeakerTest();
|
|
1486
|
+
}, sleep);
|
|
1487
|
+
} else {
|
|
1488
|
+
this._stopSelectedSpeakerTest();
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}, {
|
|
1492
|
+
key: "_stopSelectedSpeakerTest",
|
|
1493
|
+
value: function _stopSelectedSpeakerTest() {
|
|
1494
|
+
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
1495
|
+
this._mediaControl.stopSelectedSpeakerTest();
|
|
1496
|
+
this.speakerVolumeLevel = 0;
|
|
1497
|
+
}
|
|
1498
|
+
}, {
|
|
1499
|
+
key: "_handleMicrophoneDetectingChanged",
|
|
1500
|
+
value: function _handleMicrophoneDetectingChanged() {
|
|
1501
|
+
if (this.microphoneDetecting) {
|
|
1502
|
+
var _this$_microphoneAudi5;
|
|
1503
|
+
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.startTest(this._volumeIndicationInterval);
|
|
1504
|
+
} else {
|
|
1505
|
+
this._stopMicrophoneTest();
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
}, {
|
|
1509
|
+
key: "_stopMicrophoneTest",
|
|
1510
|
+
value: function _stopMicrophoneTest() {
|
|
1511
|
+
var _this$_microphoneAudi6;
|
|
1512
|
+
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stopTest();
|
|
1513
|
+
this.microphoneVolumeLevel = 0;
|
|
1514
|
+
}
|
|
1515
|
+
}, {
|
|
1516
|
+
key: "_handleMicrophoneIdChanged",
|
|
1517
|
+
value: function () {
|
|
1518
|
+
var _handleMicrophoneIdChanged2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
1519
|
+
var _this8 = this;
|
|
1520
|
+
var _this$microphoneList$, _this$microphoneList$2, _this$microphoneList$3, name, productId, vendorId;
|
|
1521
|
+
return _regeneratorRuntime.wrap(function (_context9) {
|
|
1522
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1523
|
+
case 0:
|
|
1524
|
+
if (!this.followSystemMicrophoneDevice) {
|
|
1525
|
+
name = ((_this$microphoneList$ = this.microphoneList.find(function (item) {
|
|
1526
|
+
return item.deviceId === _this8._microphone.id;
|
|
1527
|
+
})) === null || _this$microphoneList$ === void 0 ? void 0 : _this$microphoneList$.deviceName) || null;
|
|
1528
|
+
productId = ((_this$microphoneList$2 = this.microphoneList.find(function (item) {
|
|
1529
|
+
return item.deviceId === _this8._microphone.id;
|
|
1530
|
+
})) === null || _this$microphoneList$2 === void 0 ? void 0 : _this$microphoneList$2.productId) || null;
|
|
1531
|
+
vendorId = ((_this$microphoneList$3 = this.microphoneList.find(function (item) {
|
|
1532
|
+
return item.deviceId === _this8._microphone.id;
|
|
1533
|
+
})) === null || _this$microphoneList$3 === void 0 ? void 0 : _this$microphoneList$3.vendorId) || null;
|
|
1534
|
+
this._microphoneDevice = {
|
|
1535
|
+
id: this._microphone.id,
|
|
1536
|
+
name: name,
|
|
1537
|
+
productId: productId,
|
|
1538
|
+
vendorId: vendorId
|
|
1539
|
+
};
|
|
1540
|
+
} else {
|
|
1541
|
+
this._correctSystemSelectedMicrophoneDeviceId();
|
|
1542
|
+
}
|
|
1543
|
+
this._mediaControl.observeSystemSelectedMicrophoneChanged(this.followSystemMicrophoneDevice);
|
|
1544
|
+
case 1:
|
|
1545
|
+
case "end":
|
|
1546
|
+
return _context9.stop();
|
|
1547
|
+
}
|
|
1548
|
+
}, _callee9, this);
|
|
1549
|
+
}));
|
|
1550
|
+
function _handleMicrophoneIdChanged() {
|
|
1551
|
+
return _handleMicrophoneIdChanged2.apply(this, arguments);
|
|
1552
|
+
}
|
|
1553
|
+
return _handleMicrophoneIdChanged;
|
|
1554
|
+
}()
|
|
1555
|
+
}, {
|
|
1556
|
+
key: "_handleMicrophoneDeviceIdChanged",
|
|
1557
|
+
value: function _handleMicrophoneDeviceIdChanged() {
|
|
1558
|
+
if (!this._microphoneDevice.id) {
|
|
1559
|
+
this.logger.debug('setSelectedMicrophone failed');
|
|
1560
|
+
this._microphone.id = DEFAULT_DEVICE_ID;
|
|
1561
|
+
} else {
|
|
1562
|
+
var _this$_microphoneAudi7, _this$_microphoneAudi8;
|
|
1563
|
+
this._isMicrophoneWorking = false;
|
|
1564
|
+
(_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.removeObserver(this._microphoneObserver);
|
|
1565
|
+
(_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
|
|
1566
|
+
this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
|
|
1567
|
+
this._microphoneAudioTrack.addObserver(this._microphoneObserver);
|
|
1568
|
+
this._handleMicrophoneAudioTrack();
|
|
1569
|
+
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDevice.id, this._microphoneDevice.productId, this._microphoneDevice.vendorId);
|
|
1570
|
+
this.setNoiseLevel(this._sharedSettingDataSource.setting.noiseReduce);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}, {
|
|
1574
|
+
key: "_handleSpeakerDeviceIdChanged",
|
|
1575
|
+
value: function _handleSpeakerDeviceIdChanged() {
|
|
1576
|
+
if (!this._speakerDevice.id) {
|
|
1577
|
+
this.logger.debug('setSelectedSpeaker failed');
|
|
1578
|
+
this._speaker.id = DEFAULT_DEVICE_ID;
|
|
1579
|
+
} else {
|
|
1580
|
+
this.logger.info("_handleSpeakerDeviceIdChanged deviceName:".concat(this._speakerDevice.name, ", deviceId: ").concat(this._speakerDevice.id));
|
|
1581
|
+
this._mediaControl.setSelectedSpeaker(this._speakerDevice.id);
|
|
1582
|
+
this._observable.notifyObservers('onSpeakerChanged', this._speakerDevice.id, this._speakerDevice.productId, this._speakerDevice.vendorId);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}, {
|
|
1586
|
+
key: "_handleSpeakerIdChanged",
|
|
1587
|
+
value: function () {
|
|
1588
|
+
var _handleSpeakerIdChanged2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee0() {
|
|
1589
|
+
var _this9 = this;
|
|
1590
|
+
var _this$speakerList$fin, _this$speakerList$fin2, _this$speakerList$fin3, name, productId, vendorId;
|
|
1591
|
+
return _regeneratorRuntime.wrap(function (_context0) {
|
|
1592
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
1593
|
+
case 0:
|
|
1594
|
+
if (!this.followSystemSpeakerDevice) {
|
|
1595
|
+
name = ((_this$speakerList$fin = this.speakerList.find(function (item) {
|
|
1596
|
+
return item.deviceId === _this9._speaker.id;
|
|
1597
|
+
})) === null || _this$speakerList$fin === void 0 ? void 0 : _this$speakerList$fin.deviceName) || null;
|
|
1598
|
+
productId = ((_this$speakerList$fin2 = this.speakerList.find(function (item) {
|
|
1599
|
+
return item.deviceId === _this9._speaker.id;
|
|
1600
|
+
})) === null || _this$speakerList$fin2 === void 0 ? void 0 : _this$speakerList$fin2.productId) || null;
|
|
1601
|
+
vendorId = ((_this$speakerList$fin3 = this.speakerList.find(function (item) {
|
|
1602
|
+
return item.deviceId === _this9._speaker.id;
|
|
1603
|
+
})) === null || _this$speakerList$fin3 === void 0 ? void 0 : _this$speakerList$fin3.vendorId) || null;
|
|
1604
|
+
this._speakerDevice = {
|
|
1605
|
+
id: this._speaker.id,
|
|
1606
|
+
name: name,
|
|
1607
|
+
productId: productId,
|
|
1608
|
+
vendorId: vendorId
|
|
1609
|
+
};
|
|
1610
|
+
} else {
|
|
1611
|
+
this._correctSystemSpeakerDeviceId();
|
|
1612
|
+
}
|
|
1613
|
+
this._mediaControl.observeSystemSelectedSpeakerChanged(this.followSystemSpeakerDevice);
|
|
1614
|
+
case 1:
|
|
1615
|
+
case "end":
|
|
1616
|
+
return _context0.stop();
|
|
1617
|
+
}
|
|
1618
|
+
}, _callee0, this);
|
|
1619
|
+
}));
|
|
1620
|
+
function _handleSpeakerIdChanged() {
|
|
1621
|
+
return _handleSpeakerIdChanged2.apply(this, arguments);
|
|
1622
|
+
}
|
|
1623
|
+
return _handleSpeakerIdChanged;
|
|
1624
|
+
}()
|
|
1625
|
+
}, {
|
|
1626
|
+
key: "_updateVirtualBackgroundList",
|
|
1627
|
+
value: function _updateVirtualBackgroundList(list) {
|
|
1628
|
+
// 按照 mp4 和 png/jpg 分类, mp4 在前
|
|
1629
|
+
this.virtualBackgroundList = list.sort(function (a, b) {
|
|
1630
|
+
if (a.type === VirtualOption.VIDEO && b.type === VirtualOption.IMG) {
|
|
1631
|
+
return -1;
|
|
1632
|
+
}
|
|
1633
|
+
if (a.type === VirtualOption.IMG && b.type === VirtualOption.VIDEO) {
|
|
1634
|
+
return 1;
|
|
1635
|
+
}
|
|
1636
|
+
return 0;
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
}, {
|
|
1640
|
+
key: "_handleSystemSelectedSpeakerChanged",
|
|
1641
|
+
value: function _handleSystemSelectedSpeakerChanged(speaker) {
|
|
1642
|
+
this._correctSystemSpeakerDeviceId();
|
|
1643
|
+
}
|
|
1644
|
+
}, {
|
|
1645
|
+
key: "_correctSystemSpeakerDeviceId",
|
|
1646
|
+
value: function () {
|
|
1647
|
+
var _correctSystemSpeakerDeviceId2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee1() {
|
|
1648
|
+
var defaultDevice;
|
|
1649
|
+
return _regeneratorRuntime.wrap(function (_context1) {
|
|
1650
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
1651
|
+
case 0:
|
|
1652
|
+
_context1.next = 1;
|
|
1653
|
+
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1654
|
+
case 1:
|
|
1655
|
+
defaultDevice = _context1.sent;
|
|
1656
|
+
if (!(defaultDevice === undefined)) {
|
|
1657
|
+
_context1.next = 2;
|
|
1658
|
+
break;
|
|
1659
|
+
}
|
|
1660
|
+
this.logger.error('get system selected speaker device failed');
|
|
1661
|
+
return _context1.abrupt("return");
|
|
1662
|
+
case 2:
|
|
1663
|
+
this.logger.debug("system selected speaker changed : ".concat(defaultDevice.deviceName));
|
|
1664
|
+
this._observable.notifyObservers('onSystemSelectedDeviceChanged', defaultDevice);
|
|
1665
|
+
this._speakerDevice = {
|
|
1666
|
+
id: defaultDevice.deviceId,
|
|
1667
|
+
name: defaultDevice.deviceName,
|
|
1668
|
+
productId: defaultDevice.productId || null,
|
|
1669
|
+
vendorId: defaultDevice.vendorId || null
|
|
1670
|
+
};
|
|
1671
|
+
case 3:
|
|
1672
|
+
case "end":
|
|
1673
|
+
return _context1.stop();
|
|
1674
|
+
}
|
|
1675
|
+
}, _callee1, this);
|
|
1676
|
+
}));
|
|
1677
|
+
function _correctSystemSpeakerDeviceId() {
|
|
1678
|
+
return _correctSystemSpeakerDeviceId2.apply(this, arguments);
|
|
1679
|
+
}
|
|
1680
|
+
return _correctSystemSpeakerDeviceId;
|
|
1681
|
+
}()
|
|
1682
|
+
}, {
|
|
1683
|
+
key: "_handleSystemSelectedMicrophoneChanged",
|
|
1684
|
+
value: function _handleSystemSelectedMicrophoneChanged(microphone) {
|
|
1685
|
+
this._correctSystemSelectedMicrophoneDeviceId();
|
|
1686
|
+
}
|
|
1687
|
+
}, {
|
|
1688
|
+
key: "_correctSystemSelectedMicrophoneDeviceId",
|
|
1689
|
+
value: function () {
|
|
1690
|
+
var _correctSystemSelectedMicrophoneDeviceId2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
1691
|
+
var defaultDevice;
|
|
1692
|
+
return _regeneratorRuntime.wrap(function (_context10) {
|
|
1693
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1694
|
+
case 0:
|
|
1695
|
+
_context10.next = 1;
|
|
1696
|
+
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1697
|
+
case 1:
|
|
1698
|
+
defaultDevice = _context10.sent;
|
|
1699
|
+
if (!(defaultDevice === undefined)) {
|
|
1700
|
+
_context10.next = 2;
|
|
1701
|
+
break;
|
|
1702
|
+
}
|
|
1703
|
+
this.logger.error('get system selected speaker device failed');
|
|
1704
|
+
return _context10.abrupt("return");
|
|
1705
|
+
case 2:
|
|
1706
|
+
this._observable.notifyObservers('onSystemSelectedDeviceChanged', defaultDevice);
|
|
1707
|
+
this.logger.debug("system selected microphone changed : ".concat(defaultDevice.deviceName));
|
|
1708
|
+
this._microphoneDevice = {
|
|
1709
|
+
id: defaultDevice.deviceId,
|
|
1710
|
+
name: defaultDevice.deviceName,
|
|
1711
|
+
productId: defaultDevice.productId || null,
|
|
1712
|
+
vendorId: defaultDevice.vendorId || null
|
|
1713
|
+
};
|
|
1714
|
+
case 3:
|
|
1715
|
+
case "end":
|
|
1716
|
+
return _context10.stop();
|
|
1717
|
+
}
|
|
1718
|
+
}, _callee10, this);
|
|
1719
|
+
}));
|
|
1720
|
+
function _correctSystemSelectedMicrophoneDeviceId() {
|
|
1721
|
+
return _correctSystemSelectedMicrophoneDeviceId2.apply(this, arguments);
|
|
1722
|
+
}
|
|
1723
|
+
return _correctSystemSelectedMicrophoneDeviceId;
|
|
1724
|
+
}()
|
|
1725
|
+
}, {
|
|
1726
|
+
key: "_handleSelectedSpeakerVolumeUpdated",
|
|
1727
|
+
value: function _handleSelectedSpeakerVolumeUpdated(volume) {
|
|
1728
|
+
this.speakerVolume = volume;
|
|
1729
|
+
}
|
|
1730
|
+
}, {
|
|
1731
|
+
key: "_handleSpeakerTestVolumeIndicationUpdated",
|
|
1732
|
+
value: function _handleSpeakerTestVolumeIndicationUpdated(volume) {
|
|
1733
|
+
this.speakerVolumeLevel = getDeviceVolumeLevel(volume);
|
|
1734
|
+
}
|
|
1735
|
+
}, {
|
|
1736
|
+
key: "_handleMicrophoneVolumeIndicationUpdated",
|
|
1737
|
+
value: function _handleMicrophoneVolumeIndicationUpdated(_, volume) {
|
|
1738
|
+
this.microphoneVolumeLevel = getDeviceVolumeLevel(volume);
|
|
1739
|
+
}
|
|
1740
|
+
}, {
|
|
1741
|
+
key: "_toggleLocalCameraPreview",
|
|
1742
|
+
value: function _toggleLocalCameraPreview(enabled) {
|
|
1743
|
+
var _this0 = this;
|
|
1744
|
+
var localVideoViewSet = this._localVideoViewSet;
|
|
1745
|
+
var cameraTrack = this._cameraVideoTrack;
|
|
1746
|
+
if (!cameraTrack) {
|
|
1747
|
+
this.logger.warn('camera video track is not set');
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
if (!enabled) {
|
|
1751
|
+
localVideoViewSet.forEach(function (view) {
|
|
1752
|
+
cameraTrack.stopPreview(view);
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
if (enabled) {
|
|
1756
|
+
localVideoViewSet.forEach(function (view) {
|
|
1757
|
+
cameraTrack.startPreview({
|
|
1758
|
+
renderMode: FcrVideoRenderMode.HIDDEN,
|
|
1759
|
+
isMirror: _this0.currentIsMirror
|
|
1760
|
+
}, view);
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
}, {
|
|
1765
|
+
key: "_handleCameraAdded",
|
|
1766
|
+
value: function _handleCameraAdded() {
|
|
1767
|
+
this._handleCameraListUpdated();
|
|
1768
|
+
}
|
|
1769
|
+
}, {
|
|
1770
|
+
key: "_handleCameraRemoved",
|
|
1771
|
+
value: function () {
|
|
1772
|
+
var _handleCameraRemoved2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
1773
|
+
var _this1 = this;
|
|
1774
|
+
var currentDeviceExist, defaultDeviceId;
|
|
1775
|
+
return _regeneratorRuntime.wrap(function (_context11) {
|
|
1776
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1777
|
+
case 0:
|
|
1778
|
+
_context11.next = 1;
|
|
1779
|
+
return this._handleCameraListUpdated();
|
|
1780
|
+
case 1:
|
|
1781
|
+
currentDeviceExist = this.cameraList.some(function (_ref5) {
|
|
1782
|
+
var deviceId = _ref5.deviceId;
|
|
1783
|
+
return _this1._cameraDevice.id === deviceId;
|
|
1784
|
+
});
|
|
1785
|
+
if (!currentDeviceExist) {
|
|
1786
|
+
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1787
|
+
defaultDeviceId = this.cameraList.length > 0 ? this.cameraList[0].deviceId : '';
|
|
1788
|
+
this.setCameraId(defaultDeviceId);
|
|
1789
|
+
if (this.cameraEnabled) {
|
|
1790
|
+
this.setCameraEnabled(false);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
case 2:
|
|
1794
|
+
case "end":
|
|
1795
|
+
return _context11.stop();
|
|
1796
|
+
}
|
|
1797
|
+
}, _callee11, this);
|
|
1798
|
+
}));
|
|
1799
|
+
function _handleCameraRemoved() {
|
|
1800
|
+
return _handleCameraRemoved2.apply(this, arguments);
|
|
1801
|
+
}
|
|
1802
|
+
return _handleCameraRemoved;
|
|
1803
|
+
}()
|
|
1804
|
+
}, {
|
|
1805
|
+
key: "_handleCameraListUpdated",
|
|
1806
|
+
value: function () {
|
|
1807
|
+
var _handleCameraListUpdated2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
1808
|
+
var cameraList;
|
|
1809
|
+
return _regeneratorRuntime.wrap(function (_context12) {
|
|
1810
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1811
|
+
case 0:
|
|
1812
|
+
_context12.next = 1;
|
|
1813
|
+
return this._mediaControl.getCameraList();
|
|
1814
|
+
case 1:
|
|
1815
|
+
cameraList = _context12.sent;
|
|
1816
|
+
this.cameraList = cameraList;
|
|
1817
|
+
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1818
|
+
case 2:
|
|
1819
|
+
case "end":
|
|
1820
|
+
return _context12.stop();
|
|
1821
|
+
}
|
|
1822
|
+
}, _callee12, this);
|
|
1823
|
+
}));
|
|
1824
|
+
function _handleCameraListUpdated() {
|
|
1825
|
+
return _handleCameraListUpdated2.apply(this, arguments);
|
|
1826
|
+
}
|
|
1827
|
+
return _handleCameraListUpdated;
|
|
1828
|
+
}()
|
|
1829
|
+
}, {
|
|
1830
|
+
key: "_handleMicrophoneAdded",
|
|
1831
|
+
value: function _handleMicrophoneAdded() {
|
|
1832
|
+
this._handleMicrophoneListUpdated();
|
|
1833
|
+
}
|
|
1834
|
+
}, {
|
|
1835
|
+
key: "_handleMicrophoneRemoved",
|
|
1836
|
+
value: function () {
|
|
1837
|
+
var _handleMicrophoneRemoved2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
1838
|
+
var _this10 = this;
|
|
1839
|
+
var currentDeviceExist;
|
|
1840
|
+
return _regeneratorRuntime.wrap(function (_context13) {
|
|
1841
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1842
|
+
case 0:
|
|
1843
|
+
_context13.next = 1;
|
|
1844
|
+
return this._handleMicrophoneListUpdated();
|
|
1845
|
+
case 1:
|
|
1846
|
+
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1847
|
+
return item.deviceId === _this10._microphoneDevice.id;
|
|
1848
|
+
});
|
|
1849
|
+
if (!currentDeviceExist) {
|
|
1850
|
+
this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
|
|
1851
|
+
this.setMicrophoneId(DEFAULT_DEVICE_ID);
|
|
1852
|
+
}
|
|
1853
|
+
case 2:
|
|
1854
|
+
case "end":
|
|
1855
|
+
return _context13.stop();
|
|
1856
|
+
}
|
|
1857
|
+
}, _callee13, this);
|
|
1858
|
+
}));
|
|
1859
|
+
function _handleMicrophoneRemoved() {
|
|
1860
|
+
return _handleMicrophoneRemoved2.apply(this, arguments);
|
|
1861
|
+
}
|
|
1862
|
+
return _handleMicrophoneRemoved;
|
|
1863
|
+
}()
|
|
1864
|
+
}, {
|
|
1865
|
+
key: "_handleMicrophoneListUpdated",
|
|
1866
|
+
value: function () {
|
|
1867
|
+
var _handleMicrophoneListUpdated2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
1868
|
+
var microphoneList;
|
|
1869
|
+
return _regeneratorRuntime.wrap(function (_context14) {
|
|
1870
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1871
|
+
case 0:
|
|
1872
|
+
_context14.next = 1;
|
|
1873
|
+
return this._getMicrophoneList();
|
|
1874
|
+
case 1:
|
|
1875
|
+
microphoneList = _context14.sent;
|
|
1876
|
+
this.microphoneList = microphoneList;
|
|
1877
|
+
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1878
|
+
case 2:
|
|
1879
|
+
case "end":
|
|
1880
|
+
return _context14.stop();
|
|
1881
|
+
}
|
|
1882
|
+
}, _callee14, this);
|
|
1883
|
+
}));
|
|
1884
|
+
function _handleMicrophoneListUpdated() {
|
|
1885
|
+
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
1886
|
+
}
|
|
1887
|
+
return _handleMicrophoneListUpdated;
|
|
1888
|
+
}()
|
|
1889
|
+
}, {
|
|
1890
|
+
key: "_handleSpeakerAdded",
|
|
1891
|
+
value: function _handleSpeakerAdded() {
|
|
1892
|
+
this._handleSpeakerListUpdated();
|
|
1893
|
+
}
|
|
1894
|
+
}, {
|
|
1895
|
+
key: "_handleSpeakerRemoved",
|
|
1896
|
+
value: function () {
|
|
1897
|
+
var _handleSpeakerRemoved2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
|
|
1898
|
+
var _this11 = this;
|
|
1899
|
+
var currentDeviceExist;
|
|
1900
|
+
return _regeneratorRuntime.wrap(function (_context15) {
|
|
1901
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1902
|
+
case 0:
|
|
1903
|
+
_context15.next = 1;
|
|
1904
|
+
return this._handleSpeakerListUpdated();
|
|
1905
|
+
case 1:
|
|
1906
|
+
// 如何设备移除了,应该切到跟随系统
|
|
1907
|
+
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1908
|
+
return item.deviceId === _this11._speakerDevice.id;
|
|
1909
|
+
});
|
|
1910
|
+
if (!currentDeviceExist) {
|
|
1911
|
+
this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
|
|
1912
|
+
this.setSpeakerId(DEFAULT_DEVICE_ID);
|
|
1913
|
+
}
|
|
1914
|
+
case 2:
|
|
1915
|
+
case "end":
|
|
1916
|
+
return _context15.stop();
|
|
1917
|
+
}
|
|
1918
|
+
}, _callee15, this);
|
|
1919
|
+
}));
|
|
1920
|
+
function _handleSpeakerRemoved() {
|
|
1921
|
+
return _handleSpeakerRemoved2.apply(this, arguments);
|
|
1922
|
+
}
|
|
1923
|
+
return _handleSpeakerRemoved;
|
|
1924
|
+
}()
|
|
1925
|
+
}, {
|
|
1926
|
+
key: "_handleSpeakerListUpdated",
|
|
1927
|
+
value: function () {
|
|
1928
|
+
var _handleSpeakerListUpdated2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
|
1929
|
+
var speakerList;
|
|
1930
|
+
return _regeneratorRuntime.wrap(function (_context16) {
|
|
1931
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1932
|
+
case 0:
|
|
1933
|
+
_context16.next = 1;
|
|
1934
|
+
return this._getSpeakerList();
|
|
1935
|
+
case 1:
|
|
1936
|
+
speakerList = _context16.sent;
|
|
1937
|
+
this.speakerList = speakerList;
|
|
1938
|
+
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1939
|
+
case 2:
|
|
1940
|
+
case "end":
|
|
1941
|
+
return _context16.stop();
|
|
1942
|
+
}
|
|
1943
|
+
}, _callee16, this);
|
|
1944
|
+
}));
|
|
1945
|
+
function _handleSpeakerListUpdated() {
|
|
1946
|
+
return _handleSpeakerListUpdated2.apply(this, arguments);
|
|
1947
|
+
}
|
|
1948
|
+
return _handleSpeakerListUpdated;
|
|
1949
|
+
}()
|
|
1950
|
+
}, {
|
|
1951
|
+
key: "_getMicrophoneList",
|
|
1952
|
+
value: function () {
|
|
1953
|
+
var _getMicrophoneList2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
|
1954
|
+
var systemSelectedMicrophone, deviceList, formatDeviceList;
|
|
1955
|
+
return _regeneratorRuntime.wrap(function (_context17) {
|
|
1956
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1957
|
+
case 0:
|
|
1958
|
+
_context17.next = 1;
|
|
1959
|
+
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1960
|
+
case 1:
|
|
1961
|
+
systemSelectedMicrophone = _context17.sent;
|
|
1962
|
+
_context17.next = 2;
|
|
1963
|
+
return this._mediaControl.getMicrophoneList();
|
|
1964
|
+
case 2:
|
|
1965
|
+
deviceList = _context17.sent;
|
|
1966
|
+
formatDeviceList = this._formatDeviceList(deviceList, systemSelectedMicrophone);
|
|
1967
|
+
return _context17.abrupt("return", formatDeviceList);
|
|
1968
|
+
case 3:
|
|
1969
|
+
case "end":
|
|
1970
|
+
return _context17.stop();
|
|
1971
|
+
}
|
|
1972
|
+
}, _callee17, this);
|
|
1973
|
+
}));
|
|
1974
|
+
function _getMicrophoneList() {
|
|
1975
|
+
return _getMicrophoneList2.apply(this, arguments);
|
|
1976
|
+
}
|
|
1977
|
+
return _getMicrophoneList;
|
|
1978
|
+
}()
|
|
1979
|
+
}, {
|
|
1980
|
+
key: "_getSpeakerList",
|
|
1981
|
+
value: function () {
|
|
1982
|
+
var _getSpeakerList2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
|
|
1983
|
+
var systemSelectedSpeaker, deviceList, formatDeviceList;
|
|
1984
|
+
return _regeneratorRuntime.wrap(function (_context18) {
|
|
1985
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1986
|
+
case 0:
|
|
1987
|
+
_context18.next = 1;
|
|
1988
|
+
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1989
|
+
case 1:
|
|
1990
|
+
systemSelectedSpeaker = _context18.sent;
|
|
1991
|
+
_context18.next = 2;
|
|
1992
|
+
return this._mediaControl.getSpeakerList();
|
|
1993
|
+
case 2:
|
|
1994
|
+
deviceList = _context18.sent;
|
|
1995
|
+
formatDeviceList = this._formatDeviceList(deviceList, systemSelectedSpeaker);
|
|
1996
|
+
return _context18.abrupt("return", formatDeviceList);
|
|
1997
|
+
case 3:
|
|
1998
|
+
case "end":
|
|
1999
|
+
return _context18.stop();
|
|
2000
|
+
}
|
|
2001
|
+
}, _callee18, this);
|
|
2002
|
+
}));
|
|
2003
|
+
function _getSpeakerList() {
|
|
2004
|
+
return _getSpeakerList2.apply(this, arguments);
|
|
2005
|
+
}
|
|
2006
|
+
return _getSpeakerList;
|
|
2007
|
+
}()
|
|
2008
|
+
}, {
|
|
2009
|
+
key: "_formatDeviceList",
|
|
2010
|
+
value: function _formatDeviceList(deviceList, systemSelectedDevice) {
|
|
2011
|
+
var defaultDeviceName = transI18n('fmt_device_label_speaker_follow_system', {
|
|
2012
|
+
reason1: transI18n('fmt_device_label_speaker_default')
|
|
2013
|
+
});
|
|
2014
|
+
var formatDeviceList = deviceList.reduce(function (deviceList, deviceInfo) {
|
|
2015
|
+
deviceInfo = clone(deviceInfo);
|
|
2016
|
+
var results = /^default \((.*)\)$/.exec(deviceInfo.deviceName);
|
|
2017
|
+
if (results && results.length > 1) {
|
|
2018
|
+
deviceInfo.deviceName = results[1];
|
|
2019
|
+
}
|
|
2020
|
+
var isNotVirtualSoundCard = !matchVirtualSoundCardPattern(deviceInfo.deviceName);
|
|
2021
|
+
if (isNotVirtualSoundCard) {
|
|
2022
|
+
if (deviceInfo.deviceId === DEFAULT_DEVICE_ID) {
|
|
2023
|
+
deviceInfo.deviceName = defaultDeviceName;
|
|
2024
|
+
}
|
|
2025
|
+
deviceList.push(deviceInfo);
|
|
2026
|
+
}
|
|
2027
|
+
return deviceList;
|
|
2028
|
+
}, []);
|
|
2029
|
+
var defaultIdDevice = formatDeviceList.find(function (item) {
|
|
2030
|
+
return item.deviceId === DEFAULT_DEVICE_ID;
|
|
2031
|
+
});
|
|
2032
|
+
|
|
2033
|
+
// 设备列表中没有默认设备,但是系统默认设备存在
|
|
2034
|
+
if (!defaultIdDevice && systemSelectedDevice !== null && systemSelectedDevice !== void 0 && systemSelectedDevice.deviceName) {
|
|
2035
|
+
formatDeviceList.unshift({
|
|
2036
|
+
deviceId: DEFAULT_DEVICE_ID,
|
|
2037
|
+
deviceName: defaultDeviceName
|
|
2038
|
+
});
|
|
2039
|
+
} else {
|
|
2040
|
+
formatDeviceList.sort(function (a, b) {
|
|
2041
|
+
if (a.deviceId === DEFAULT_DEVICE_ID) return -1;
|
|
2042
|
+
if (b.deviceId === DEFAULT_DEVICE_ID) return 1;
|
|
2043
|
+
return 0;
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
2046
|
+
return formatDeviceList;
|
|
2047
|
+
}
|
|
2048
|
+
}, {
|
|
2049
|
+
key: "_loadBuiltinResources",
|
|
2050
|
+
value: function () {
|
|
2051
|
+
var _loadBuiltinResources2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
2052
|
+
var _this12 = this;
|
|
2053
|
+
var _yield$this$_renderer, _yield$this$_renderer2, virtualBackgroundImages, _yield$this$_renderer3, virtualBackgroundVideos, _yield$this$_renderer4, soundEffectAudios, newVirtualBackgroundList, images, videos, soundEffectPlayUrlMap, soundEffectFilePathMap;
|
|
2054
|
+
return _regeneratorRuntime.wrap(function (_context19) {
|
|
2055
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2056
|
+
case 0:
|
|
2057
|
+
_context19.next = 1;
|
|
2058
|
+
return this._renderer.loadBuiltinResources();
|
|
2059
|
+
case 1:
|
|
2060
|
+
_yield$this$_renderer = _context19.sent;
|
|
2061
|
+
_yield$this$_renderer2 = _yield$this$_renderer.virtualBackgroundImages;
|
|
2062
|
+
virtualBackgroundImages = _yield$this$_renderer2 === void 0 ? [] : _yield$this$_renderer2;
|
|
2063
|
+
_yield$this$_renderer3 = _yield$this$_renderer.virtualBackgroundVideos;
|
|
2064
|
+
virtualBackgroundVideos = _yield$this$_renderer3 === void 0 ? [] : _yield$this$_renderer3;
|
|
2065
|
+
_yield$this$_renderer4 = _yield$this$_renderer.soundEffectAudios;
|
|
2066
|
+
soundEffectAudios = _yield$this$_renderer4 === void 0 ? {} : _yield$this$_renderer4;
|
|
2067
|
+
newVirtualBackgroundList = this.virtualBackgroundList.slice();
|
|
2068
|
+
images = virtualBackgroundImages.map(function (item) {
|
|
2069
|
+
return {
|
|
2070
|
+
name: getFileNameWithoutExtension(item),
|
|
2071
|
+
path: item,
|
|
2072
|
+
type: VirtualOption.IMG,
|
|
2073
|
+
url: URL.createObjectURL(_this12._renderer.fileToBlob(item, 'image'))
|
|
2074
|
+
};
|
|
2075
|
+
});
|
|
2076
|
+
videos = virtualBackgroundVideos.map(function (item) {
|
|
2077
|
+
return {
|
|
2078
|
+
name: getFileNameWithoutExtension(item),
|
|
2079
|
+
path: item,
|
|
2080
|
+
type: VirtualOption.VIDEO,
|
|
2081
|
+
url: URL.createObjectURL(_this12._renderer.fileToBlob(item, 'video'))
|
|
2082
|
+
};
|
|
2083
|
+
});
|
|
2084
|
+
soundEffectPlayUrlMap = new Map();
|
|
2085
|
+
soundEffectFilePathMap = new Map();
|
|
2086
|
+
Object.keys(soundEffectAudios).forEach(function (key) {
|
|
2087
|
+
var effectName = key;
|
|
2088
|
+
var filePath = soundEffectAudios[effectName];
|
|
2089
|
+
soundEffectPlayUrlMap.set(effectName, URL.createObjectURL(_this12._renderer.fileToBlob(filePath, 'audio')));
|
|
2090
|
+
soundEffectFilePathMap.set(effectName, filePath);
|
|
2091
|
+
});
|
|
2092
|
+
this.logger.info('load builtin image ui resources:', jsonstring(images));
|
|
2093
|
+
this.logger.info('load builtin video ui resources:', jsonstring(videos));
|
|
2094
|
+
this.logger.info('load builtin sound ui resources:', jsonstring(soundEffectPlayUrlMap));
|
|
2095
|
+
newVirtualBackgroundList = newVirtualBackgroundList.concat(images);
|
|
2096
|
+
newVirtualBackgroundList = newVirtualBackgroundList.concat(videos);
|
|
2097
|
+
runInAction(function () {
|
|
2098
|
+
_this12._updateVirtualBackgroundList(newVirtualBackgroundList);
|
|
2099
|
+
_this12._soundEffectFilePathMap = soundEffectFilePathMap;
|
|
2100
|
+
_this12._soundEffectPlayUrlMap = soundEffectPlayUrlMap;
|
|
2101
|
+
});
|
|
2102
|
+
case 2:
|
|
2103
|
+
case "end":
|
|
2104
|
+
return _context19.stop();
|
|
2105
|
+
}
|
|
2106
|
+
}, _callee19, this);
|
|
2107
|
+
}));
|
|
2108
|
+
function _loadBuiltinResources() {
|
|
2109
|
+
return _loadBuiltinResources2.apply(this, arguments);
|
|
2110
|
+
}
|
|
2111
|
+
return _loadBuiltinResources;
|
|
2112
|
+
}()
|
|
2113
|
+
}]);
|
|
2114
|
+
}();
|
|
2115
|
+
_FcrUIDeviceProviderImpl = FcrUIDeviceProviderImpl;
|
|
2116
|
+
var _applyDecs$e = _applyDecs(_FcrUIDeviceProviderImpl, [[observable, 1, "_microphoneEnabled"], [observable, 1, "_isMicrophoneWorking"], [observable, 1, "_microphoneDevice"], [observable, 1, "_microphone"], [observable, 1, "_speakerDevice"], [observable, 1, "_speaker"], [observable, 1, "_cameraDevice"], [observable, 1, "currentIsMirror"], [observable, 1, "showForceOpenEffectDialog"], [observable, 1, "cameraEnabled"], [observable, 1, "showCameraPreview"], [observable, 1, "cameraList"], [observable, 1, "microphoneList"], [observable, 1, "microphoneVolumeLevel"], [observable, 1, "speakerList"], [observable, 1, "isLocalMirrorEnabled"], [observable, 1, "isLocalEditBeautyOptions"], [observable, 1, "speakerVolumeLevel"], [observable, 1, "speakerVolume"], [observable, 1, "microphoneVolume"], [observable, 1, "virtualBackgroundName"], [observable, 1, "enableBeauty"], [observable, 1, "beautyKey"], [observable, 1, "beautyOptions"], [observable, 1, "virtualBackgroundList"], [observable, 1, "microphoneDetecting"], [observable, 1, "speakerDetecting"], [observable, 1, "connectType"], [observable, 1, "isMainRoomAudioOff"], [bound, 2, "connectAudio"], [bound, 2, "disconnectAudio"], [computed, 3, "microphoneEnabled"], [computed, 3, "microphoneState"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_startSpeakerTestDecs, 18, "startSpeakerTest"], [_stopSpeakerTestDecs, 18, "stopSpeakerTest"], [_setCurrentIsMirrorDecs, 18, "setCurrentIsMirror"], [_toggleLocalMirrorPreviewDecs, 18, "toggleLocalMirrorPreview"], [_setBeautyOptionsDecs, 18, "setBeautyOptions"], [_handleCancelForceOpenVideoEffectDecs, 18, "handleCancelForceOpenVideoEffect"], [_handleForceOpenVideoEffectDecs, 18, "handleForceOpenVideoEffect"], [bound, 2, "setVideoOrientation"], [_setCameraEnabledDecs, 18, "setCameraEnabled"], [_handleCameraEnabledChangedDecs, 18, "_handleCameraEnabledChanged"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_setMainRoomAudioOffDecs, 18, "setMainRoomAudioOff"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_startOrStopCameraDecs, 18, "startOrStopCamera"], [_setShowCameraPreviewDecs, 18, "setShowCameraPreview"], [_loadUiResourcesDecs, 18, "loadUiResources"], [bound, 2, "loadZipResources"], [bound, 2, "loadFileResources"], [bound, 2, "toggleAGC"], [_setConnectTypeDecs, 18, "setConnectType"], [_toggleLocalCameraPreviewDecs, 18, "toggleLocalCameraPreview"], [_getLoopbackDeviceIdDecs, 18, "getLoopbackDeviceId"], [_initDeviceListDecs, 18, "_initDeviceList"], [_handleMicrophoneAudioTrackDecs, 18, "_handleMicrophoneAudioTrack"], [_handleMicrophoneStateUpdatedDecs, 18, "_handleMicrophoneStateUpdated"], [_handleMicrophoneEnabledChangedDecs, 18, "_handleMicrophoneEnabledChanged"], [_handleCameraVideoTrackDecs, 18, "_handleCameraVideoTrack"], [bound, 2, "_handleCameraDeviceIdChanged"], [_handleSpeakerDetectingChangedDecs, 18, "_handleSpeakerDetectingChanged"], [_stopSelectedSpeakerTestDecs, 18, "_stopSelectedSpeakerTest"], [_handleMicrophoneDetectingChangedDecs, 18, "_handleMicrophoneDetectingChanged"], [_stopMicrophoneTestDecs2, 18, "_stopMicrophoneTest"], [bound, 2, "_handleMicrophoneIdChanged"], [bound, 2, "_handleMicrophoneDeviceIdChanged"], [bound, 2, "_handleSpeakerDeviceIdChanged"], [bound, 2, "_handleSpeakerIdChanged"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSystemSelectedSpeakerChangedDecs, 18, "_handleSystemSelectedSpeakerChanged"], [_handleSystemSelectedMicrophoneChangedDecs, 18, "_handleSystemSelectedMicrophoneChanged"], [_correctSystemSelectedMicrophoneDeviceIdDecs, 18, "_correctSystemSelectedMicrophoneDeviceId"], [_handleSelectedSpeakerVolumeUpdatedDecs, 18, "_handleSelectedSpeakerVolumeUpdated"], [_handleSpeakerTestVolumeIndicationUpdatedDecs, 18, "_handleSpeakerTestVolumeIndicationUpdated"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [bound, 2, "_toggleLocalCameraPreview"], [bound, 2, "_handleCameraAdded"], [bound, 2, "_handleCameraRemoved"], [bound, 2, "_handleCameraListUpdated"], [bound, 2, "_handleMicrophoneAdded"], [bound, 2, "_handleMicrophoneRemoved"], [bound, 2, "_handleMicrophoneListUpdated"], [_handleSpeakerAddedDecs, 18, "_handleSpeakerAdded"], [_handleSpeakerRemovedDecs, 18, "_handleSpeakerRemoved"], [_handleSpeakerListUpdatedDecs, 18, "_handleSpeakerListUpdated"], [_getMicrophoneListDecs, 18, "_getMicrophoneList"], [_getSpeakerListDecs, 18, "_getSpeakerList"], [_formatDeviceListDecs, 18, "_formatDeviceList"], [_loadBuiltinResourcesDecs, 18, "_loadBuiltinResources"]], []).e;
|
|
2117
|
+
var _applyDecs$e2 = _slicedToArray(_applyDecs$e, 30);
|
|
2118
|
+
_init__microphoneEnabled = _applyDecs$e2[0];
|
|
2119
|
+
_init__isMicrophoneWorking = _applyDecs$e2[1];
|
|
2120
|
+
_init__microphoneDevice = _applyDecs$e2[2];
|
|
2121
|
+
_init__microphone = _applyDecs$e2[3];
|
|
2122
|
+
_init__speakerDevice = _applyDecs$e2[4];
|
|
2123
|
+
_init__speaker = _applyDecs$e2[5];
|
|
2124
|
+
_init__cameraDevice = _applyDecs$e2[6];
|
|
2125
|
+
_init_currentIsMirror = _applyDecs$e2[7];
|
|
2126
|
+
_init_showForceOpenEffectDialog = _applyDecs$e2[8];
|
|
2127
|
+
_init_cameraEnabled = _applyDecs$e2[9];
|
|
2128
|
+
_init_showCameraPreview = _applyDecs$e2[10];
|
|
2129
|
+
_init_cameraList = _applyDecs$e2[11];
|
|
2130
|
+
_init_microphoneList = _applyDecs$e2[12];
|
|
2131
|
+
_init_microphoneVolumeLevel = _applyDecs$e2[13];
|
|
2132
|
+
_init_speakerList = _applyDecs$e2[14];
|
|
2133
|
+
_init_isLocalMirrorEnabled = _applyDecs$e2[15];
|
|
2134
|
+
_init_isLocalEditBeautyOptions = _applyDecs$e2[16];
|
|
2135
|
+
_init_speakerVolumeLevel = _applyDecs$e2[17];
|
|
2136
|
+
_init_speakerVolume = _applyDecs$e2[18];
|
|
2137
|
+
_init_microphoneVolume = _applyDecs$e2[19];
|
|
2138
|
+
_init_virtualBackgroundName = _applyDecs$e2[20];
|
|
2139
|
+
_init_enableBeauty = _applyDecs$e2[21];
|
|
2140
|
+
_init_beautyKey = _applyDecs$e2[22];
|
|
2141
|
+
_init_beautyOptions = _applyDecs$e2[23];
|
|
2142
|
+
_init_virtualBackgroundList = _applyDecs$e2[24];
|
|
2143
|
+
_init_microphoneDetecting = _applyDecs$e2[25];
|
|
2144
|
+
_init_speakerDetecting = _applyDecs$e2[26];
|
|
2145
|
+
_init_connectType = _applyDecs$e2[27];
|
|
2146
|
+
_init_isMainRoomAudioOff = _applyDecs$e2[28];
|
|
2147
|
+
_initProto = _applyDecs$e2[29];
|
|
2148
|
+
_applyDecs$e;
|