fcr-ui-scene 3.1.0 → 3.2.0
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/dist/132.js +2 -0
- package/dist/132.js.LICENSE.txt +311 -0
- package/dist/651.js +2 -0
- package/dist/651.js.LICENSE.txt +1 -0
- package/dist/73.js +1 -0
- package/dist/index.html +13 -0
- package/dist/main.da7c203ab32d15742cfe.css +11760 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +254 -0
- package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +3 -4
- package/lib/common/device-store.js +167 -83
- package/lib/common/device-stream-store.d.ts +3 -2
- package/lib/common/device-stream-store.js +94 -72
- package/lib/common/event-store.d.ts +3 -1
- package/lib/common/event-store.js +5 -0
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +136 -101
- package/lib/electron/app.d.ts +1 -0
- package/lib/electron/app.js +148 -0
- package/lib/electron/default-options.d.ts +2 -0
- package/lib/electron/default-options.js +25 -0
- package/lib/electron/env.d.ts +5 -0
- package/lib/electron/env.js +13 -0
- package/lib/electron/index.d.ts +2 -0
- package/lib/electron/index.js +20 -0
- package/lib/electron/injections.d.ts +44 -0
- package/lib/electron/injections.js +705 -0
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.d.ts +2 -0
- package/lib/electron/main.js +79 -0
- package/lib/electron/plugins/screenshot.d.ts +2 -0
- package/lib/electron/plugins/screenshot.js +49 -0
- package/lib/electron/preload.js +36 -0
- package/lib/electron/tools.d.ts +5 -0
- package/lib/electron/tools.js +66 -0
- package/lib/electron/window.d.ts +12 -0
- package/lib/electron/window.js +124 -0
- package/lib/fragments/control-bar/context.d.ts +0 -1
- package/lib/fragments/control-bar/control-bar-store.js +23 -2
- package/lib/fragments/control-bar/device/index.js +7 -0
- package/lib/fragments/control-bar/index.js +11 -1
- package/lib/fragments/control-bar/more-actions/index.js +5 -0
- package/lib/fragments/control-bar/security-content/index.js +3 -0
- package/lib/fragments/live-streaming/context.d.ts +0 -1
- package/lib/fragments/live-streaming/store.js +27 -17
- package/lib/fragments/share-screen-selection/context.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.js +34 -33
- package/lib/fragments/share-screen-selection/view.js +7 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
- package/lib/fragments/toolbar/components/color-picker.js +3 -1
- package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +2 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
- package/lib/fragments/toolbar/components/shape-picker.js +2 -0
- package/lib/fragments/toolbar/hooks.d.ts +1 -1
- package/lib/fragments/toolbar/hooks.js +13 -8
- package/lib/fragments/toolbar/store.d.ts +4 -4
- package/lib/fragments/toolbar/store.js +20 -2
- package/lib/fragments/toolbar/view.js +2 -0
- package/lib/global.d.ts +1 -0
- package/lib/hooks/meeting-time.d.ts +2 -2
- package/lib/modules/action-bar/action-bar-collapes-items.js +9 -0
- package/lib/modules/action-bar/chat/index.js +1 -1
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +2 -0
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.d.ts +2 -2
- package/lib/modules/action-bar/index.dev.js +7 -6
- package/lib/modules/action-bar/item-placement.d.ts +1 -2
- package/lib/modules/action-bar/item.js +5 -0
- package/lib/modules/action-bar/leave/assign-host.js +5 -3
- package/lib/modules/action-bar/leave/index.js +6 -1
- package/lib/modules/action-bar/more/poppover-content.js +10 -0
- package/lib/modules/action-bar/screen-share/submenu.js +1 -0
- package/lib/modules/action-bar/security/drop-menu.js +34 -1
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/settings/index.js +1 -1
- package/lib/modules/action-bar/store.d.ts +9 -17
- package/lib/modules/action-bar/store.js +67 -49
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +7 -0
- package/lib/modules/chat/chat-select/index.css +5 -0
- package/lib/modules/chat/chat-select/index.js +29 -3
- package/lib/modules/chat/chat.d.ts +1 -1
- package/lib/modules/chat/chat.js +28 -4
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +3 -3
- package/lib/modules/chat/index.js +19 -3
- package/lib/modules/chat/message-list.js +24 -3
- package/lib/modules/chat/store.d.ts +3 -3
- package/lib/modules/chat/store.js +45 -79
- package/lib/modules/chat/util.js +1 -1
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
- package/lib/modules/connection-gateway/components/phone/index.js +2 -0
- package/lib/modules/connection-gateway/index.d.ts +2 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +1 -2
- package/lib/modules/connection-gateway/store.js +41 -14
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.js +2 -1
- package/lib/modules/device-pretest/settings/beauty.js +2 -0
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
- package/lib/modules/device-pretest/store.js +28 -9
- package/lib/modules/dialog/components/chat/electron.js +1 -1
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +2 -2
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +1 -1
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +72 -0
- package/lib/modules/dialog/components/device-setting/index.css +27 -0
- package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
- package/lib/modules/dialog/components/device-setting/index.js +60 -0
- package/lib/modules/dialog/components/participant/electron.js +6 -1
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/context.d.ts +0 -1
- package/lib/modules/dialog/dialogs.d.ts +0 -2
- package/lib/modules/dialog/dialogs.js +46 -91
- package/lib/modules/dialog/index.css +5 -6
- package/lib/modules/dialog/index.d.ts +1 -1
- package/lib/modules/dialog/index.js +17 -0
- package/lib/modules/dialog/store.d.ts +2 -2
- package/lib/modules/dialog/store.js +36 -7
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-toast/context.d.ts +0 -1
- package/lib/modules/event-toast/store.js +16 -0
- package/lib/modules/invite/context.d.ts +0 -1
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +3 -1
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +27 -7
- package/lib/modules/invite/voip-invite.js +1 -1
- package/lib/modules/layout/components/Aside.js +4 -1
- package/lib/modules/layout/components/Carousel.js +6 -5
- package/lib/modules/layout/components/Gallery.js +9 -8
- package/lib/modules/layout/components/index.css +11 -1
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +11 -11
- package/lib/modules/layout/index.js +0 -6
- package/lib/modules/layout/member-window/index.css +5 -5
- package/lib/modules/layout/member-window/index.d.ts +7 -6
- package/lib/modules/layout/member-window/index.js +50 -10
- package/lib/modules/layout/store.d.ts +44 -49
- package/lib/modules/layout/store.js +406 -338
- package/lib/modules/layout/type.d.ts +2 -1
- package/lib/modules/layout/video-window-datasource.d.ts +14 -8
- package/lib/modules/layout/video-window-datasource.js +129 -78
- package/lib/modules/live-streaming/context.d.ts +0 -1
- package/lib/modules/live-streaming/index.d.ts +2 -2
- package/lib/modules/live-streaming/index.dev.js +4 -3
- package/lib/modules/live-streaming/store.d.ts +2 -2
- package/lib/modules/live-streaming/store.js +32 -11
- package/lib/modules/participant/attendee/index.js +10 -0
- package/lib/modules/participant/attendee/participants-more-action.js +5 -2
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.d.ts +3 -3
- package/lib/modules/participant/index.dev.js +13 -11
- package/lib/modules/participant/member-list-data-source.d.ts +3 -3
- package/lib/modules/participant/member-list-data-source.js +29 -3
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +31 -31
- package/lib/modules/participant/store.js +203 -157
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +5 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
- package/lib/modules/setting/audio-settings/index.css +2 -2
- package/lib/modules/setting/context.d.ts +0 -1
- package/lib/modules/setting/general-settings/general-settings.js +2 -1
- package/lib/modules/setting/general-settings/index.css +2 -2
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +13 -11
- package/lib/modules/setting/index.js +16 -0
- package/lib/modules/setting/minutes-settings/index.css +65 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
- package/lib/modules/setting/state/index.css +0 -4
- package/lib/modules/setting/state/index.js +11 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.d.ts +6 -4
- package/lib/modules/setting/store.js +68 -40
- package/lib/modules/setting/translate-settings/index.css +45 -0
- package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
- package/lib/modules/{device-settings/video-settings/camera-select.js → setting/translate-settings/language-select.js} +16 -17
- package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
- package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
- package/lib/modules/setting/video-settings/index.css +7 -1
- package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
- package/lib/modules/setting/video-settings/video-settings.js +5 -1
- package/lib/modules/setting/view.js +34 -2
- package/lib/modules/share-screen/index.d.ts +2 -2
- package/lib/modules/share-screen/index.dev.js +14 -12
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.js +44 -6
- package/lib/modules/share-screen/share-state-bar/index.css +49 -11
- package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
- package/lib/modules/share-screen/share-state-bar/index.js +51 -20
- package/lib/modules/share-screen/store.d.ts +18 -11
- package/lib/modules/share-screen/store.js +656 -570
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.d.ts +1 -1
- package/lib/modules/state-bar/index.dev.js +11 -9
- package/lib/modules/state-bar/layout-config.js +2 -0
- package/lib/modules/state-bar/live-streaming-state.js +3 -0
- package/lib/modules/state-bar/recording.js +6 -6
- package/lib/modules/state-bar/store.d.ts +4 -4
- package/lib/modules/state-bar/store.js +50 -5
- package/lib/modules/state-bar/view.js +3 -2
- package/lib/modules/video-window/context.d.ts +0 -1
- package/lib/modules/video-window/deviceState/index.d.ts +3 -3
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +3 -2
- package/lib/modules/video-window/store.js +35 -6
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/whiteboard/app.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
- package/lib/modules/whiteboard/components/loading/index.js +2 -2
- package/lib/modules/whiteboard/components/multi-window/index.js +2 -2
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +1 -1
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.js +9 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +22 -4
- package/lib/modules/whiteboard/context.d.ts +3 -3
- package/lib/modules/whiteboard/context.js +2 -2
- package/lib/modules/whiteboard/index.d.ts +6 -7
- package/lib/modules/whiteboard/index.js +292 -253
- package/lib/modules/whiteboard/type.d.ts +4 -12
- package/lib/modules/whiteboard/type.js +6 -16
- package/lib/modules/whiteboard/utils.d.ts +1 -0
- package/lib/modules/whiteboard/utils.js +12 -1
- package/lib/plugins/browser-runtime-plugin.js +2 -4
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/plugins/multi-lang-plugin.d.ts +1 -5
- package/lib/plugins/multi-lang-plugin.js +2 -0
- package/lib/runtime.d.ts +84 -0
- package/lib/translations/enUS.d.ts +148 -1
- package/lib/translations/enUS.js +156 -7
- package/lib/translations/zhCN.d.ts +148 -1
- package/lib/translations/zhCN.js +152 -3
- package/lib/ui-manager.d.ts +2 -2
- package/lib/ui-manager.js +37 -20
- package/lib/ui-scene.js +6 -1
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +4 -1
- package/lib/utilities/constant.js +3 -0
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.js +9 -4
- package/lib/utilities/tools.js +5 -2
- package/lib/utilities/ui-resources.d.ts +2 -2
- package/lib/utilities/ui-resources.js +20 -3
- package/lib/utilities/video-track-render-context.d.ts +0 -1
- package/package.json +10 -8
- package/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +0 -16
- package/lib/common/device-streams-store.d.ts +0 -34
- package/lib/common/device-streams-store.js +0 -403
- package/lib/fragments/participant/context.d.ts +0 -3
- package/lib/fragments/participant/context.js +0 -9
- package/lib/fragments/participant/index.css +0 -20
- package/lib/fragments/participant/index.d.ts +0 -9
- package/lib/fragments/participant/index.js +0 -90
- package/lib/fragments/participant/room-control-drop-menu/index.css +0 -19
- package/lib/fragments/participant/room-control-drop-menu/index.d.ts +0 -2
- package/lib/fragments/participant/room-control-drop-menu/index.js +0 -134
- package/lib/fragments/participant/store.d.ts +0 -34
- package/lib/fragments/participant/store.js +0 -326
- package/lib/fragments/participant/view.d.ts +0 -2
- package/lib/fragments/participant/view.js +0 -86
- package/lib/fragments/state-bar/index.d.ts +0 -9
- package/lib/fragments/state-bar/index.js +0 -68
- package/lib/fragments/type.d.ts +0 -2
- package/lib/fragments/type.js +0 -6
- package/lib/modules/connection-gateway/components/computer/menu.d.ts +0 -0
- package/lib/modules/connection-gateway/components/computer/menu.js +0 -1
- package/lib/modules/device-settings/audio-settings/audio-settings.d.ts +0 -4
- package/lib/modules/device-settings/audio-settings/audio-settings.js +0 -297
- package/lib/modules/device-settings/audio-settings/index.css +0 -139
- package/lib/modules/device-settings/audio-settings/microphone-detection.d.ts +0 -2
- package/lib/modules/device-settings/audio-settings/microphone-detection.js +0 -68
- package/lib/modules/device-settings/audio-settings/speaker-detection.d.ts +0 -2
- package/lib/modules/device-settings/audio-settings/speaker-detection.js +0 -72
- package/lib/modules/device-settings/common/advance-link.d.ts +0 -3
- package/lib/modules/device-settings/common/advance-link.js +0 -27
- package/lib/modules/device-settings/common/index.css +0 -26
- package/lib/modules/device-settings/common/useNamespace.d.ts +0 -15
- package/lib/modules/device-settings/common/useNamespace.js +0 -66
- package/lib/modules/device-settings/context.d.ts +0 -3
- package/lib/modules/device-settings/context.js +0 -9
- package/lib/modules/device-settings/dialog-wrapper.d.ts +0 -2
- package/lib/modules/device-settings/dialog-wrapper.js +0 -110
- package/lib/modules/device-settings/general-settings/general-settings.d.ts +0 -4
- package/lib/modules/device-settings/general-settings/general-settings.js +0 -66
- package/lib/modules/device-settings/general-settings/index.css +0 -26
- package/lib/modules/device-settings/index.css +0 -109
- package/lib/modules/device-settings/index.d.ts +0 -21
- package/lib/modules/device-settings/index.dev.js +0 -112
- package/lib/modules/device-settings/index.js +0 -84
- package/lib/modules/device-settings/state/index.css +0 -211
- package/lib/modules/device-settings/state/index.d.ts +0 -4
- package/lib/modules/device-settings/state/index.js +0 -330
- package/lib/modules/device-settings/storage-settings/index.css +0 -91
- package/lib/modules/device-settings/storage-settings/storage-settings.d.ts +0 -3
- package/lib/modules/device-settings/storage-settings/storage-settings.js +0 -84
- package/lib/modules/device-settings/store.d.ts +0 -205
- package/lib/modules/device-settings/store.js +0 -1035
- package/lib/modules/device-settings/video-settings/camera-select.d.ts +0 -2
- package/lib/modules/device-settings/video-settings/index.css +0 -327
- package/lib/modules/device-settings/video-settings/local-video-player.d.ts +0 -3
- package/lib/modules/device-settings/video-settings/local-video-player.js +0 -37
- package/lib/modules/device-settings/video-settings/mirror-toggle.d.ts +0 -2
- package/lib/modules/device-settings/video-settings/mirror-toggle.js +0 -62
- package/lib/modules/device-settings/video-settings/video-settings-basic.d.ts +0 -9
- package/lib/modules/device-settings/video-settings/video-settings-basic.js +0 -177
- package/lib/modules/device-settings/video-settings/video-settings.d.ts +0 -6
- package/lib/modules/device-settings/video-settings/video-settings.js +0 -185
- package/lib/modules/device-settings/view.d.ts +0 -10
- package/lib/modules/device-settings/view.js +0 -193
- package/lib/modules/layout/components/UserWindow.d.ts +0 -8
- package/lib/modules/layout/components/UserWindow.js +0 -513
- package/lib/modules/layout/hooks.d.ts +0 -14
- package/lib/modules/layout/hooks.js +0 -48
- package/lib/modules/share-screen/context.d.ts +0 -3
- package/lib/modules/share-screen/context.js +0 -9
- package/lib/modules/whiteboard/i18n/config.d.ts +0 -1
- package/lib/modules/whiteboard/i18n/config.js +0 -15
- package/lib/modules/whiteboard/i18n/en/index.d.ts +0 -32
- package/lib/modules/whiteboard/i18n/en/index.js +0 -38
- package/lib/modules/whiteboard/i18n/zh/index.d.ts +0 -32
- package/lib/modules/whiteboard/i18n/zh/index.js +0 -38
- /package/lib/{modules/device-settings/index.dev.d.ts → electron/preload.d.ts} +0 -0
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
|
4
|
-
require("core-js/modules/es.symbol.description.js");
|
|
5
|
-
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
-
require("core-js/modules/es.error.cause.js");
|
|
7
|
-
require("core-js/modules/es.error.to-string.js");
|
|
8
|
-
require("core-js/modules/es.array.is-array.js");
|
|
9
|
-
require("core-js/modules/es.array.iterator.js");
|
|
10
|
-
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
-
require("core-js/modules/es.function.bind.js");
|
|
12
|
-
require("core-js/modules/es.function.name.js");
|
|
13
|
-
require("core-js/modules/es.map.js");
|
|
14
|
-
require("core-js/modules/es.number.constructor.js");
|
|
15
|
-
require("core-js/modules/es.object.create.js");
|
|
16
|
-
require("core-js/modules/es.object.define-property.js");
|
|
17
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
|
-
require("core-js/modules/es.string.iterator.js");
|
|
19
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
21
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
22
|
-
Object.defineProperty(exports, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
});
|
|
25
|
-
exports.matchVirtualSoundCardPattern = exports.FcrDeviceStreamsStore = void 0;
|
|
26
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
27
|
-
require("core-js/modules/es.array.find.js");
|
|
28
|
-
require("core-js/modules/es.array.push.js");
|
|
29
|
-
require("core-js/modules/es.array.reduce.js");
|
|
30
|
-
require("core-js/modules/es.object.to-string.js");
|
|
31
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
32
|
-
require("core-js/modules/es.regexp.test.js");
|
|
33
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
34
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
35
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
36
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
37
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
38
|
-
var _type = require("agora-edu-core/lib/type");
|
|
39
|
-
var _decorator = require("agora-foundation/lib/decorator");
|
|
40
|
-
var _mobx = require("mobx");
|
|
41
|
-
var _toast = require("agora-ui-foundation/lib/components/toast");
|
|
42
|
-
var _type2 = require("agora-rte-sdk/lib/core/scene/type");
|
|
43
|
-
var _constant = require("../utilities/constant");
|
|
44
|
-
var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
45
|
-
var _logger = require("agora-foundation/lib/logger");
|
|
46
|
-
var _rendererEvent = require("../utilities/renderer-event");
|
|
47
|
-
var _FcrDeviceStreamsStore;
|
|
48
|
-
var _initProto, _enableCameraWithStreamDecs, _enableMicrophoneWithStreamDecs, _handleCameraEnabledChangedDecs, _handleMicrophoneEnabledChangedDecs, _ref;
|
|
49
|
-
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)]; } }; }
|
|
50
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
51
|
-
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); }
|
|
52
|
-
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; }
|
|
53
|
-
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; }
|
|
54
|
-
_ref = (_enableCameraWithStreamDecs = [_mobx.action, _mobx.action.bound], _enableMicrophoneWithStreamDecs = [_mobx.action, _mobx.action.bound], _handleCameraEnabledChangedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneEnabledChangedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
55
|
-
var FcrDeviceStreamsStore = exports.FcrDeviceStreamsStore = /*#__PURE__*/function () {
|
|
56
|
-
// @computed
|
|
57
|
-
// get followSystemMicrophoneDevice() {
|
|
58
|
-
// return this._deviceStore.microphoneId === 'default';
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
// @computed
|
|
62
|
-
// get followSystemSpeakerDevice() {
|
|
63
|
-
// return this._deviceStore.speakerId === 'default';
|
|
64
|
-
// }
|
|
65
|
-
|
|
66
|
-
function FcrDeviceStreamsStore(_ref2) {
|
|
67
|
-
var _this = this;
|
|
68
|
-
var mediaControl = _ref2.mediaControl,
|
|
69
|
-
roomControl = _ref2.roomControl,
|
|
70
|
-
securityStore = _ref2.securityStore,
|
|
71
|
-
deviceStore = _ref2.deviceStore;
|
|
72
|
-
(0, _classCallCheck2["default"])(this, FcrDeviceStreamsStore);
|
|
73
|
-
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
74
|
-
(0, _defineProperty2["default"])(this, "_listeners", []);
|
|
75
|
-
this._deviceStore = deviceStore;
|
|
76
|
-
this._deviceStore.disposeCameraAndAudioReactions();
|
|
77
|
-
this._listeners.push((0, _mobx.reaction)(function () {
|
|
78
|
-
return _this._deviceStore.cameraId;
|
|
79
|
-
}, this._handleCameraChanged), (0, _mobx.reaction)(function () {
|
|
80
|
-
return _this._deviceStore.microphoneDeviceId;
|
|
81
|
-
}, this._handleMicrophoneChanged));
|
|
82
|
-
this._roomControl = roomControl;
|
|
83
|
-
this._mediaControl = mediaControl;
|
|
84
|
-
this._securityStore = securityStore;
|
|
85
|
-
var streamControl = this._roomControl.getStreamControl();
|
|
86
|
-
streamControl.addObserver({
|
|
87
|
-
onStreamsAdded: function onStreamsAdded(_, e) {
|
|
88
|
-
var _e$find;
|
|
89
|
-
var localCameraStream = (_e$find = e.find(function (event) {
|
|
90
|
-
return event.modifiedStream.owner.userId === _this._localUser.userId && event.modifiedStream.videoSourceType === _type3.AgoraRtcVideoSourceType.CAMERA;
|
|
91
|
-
})) === null || _e$find === void 0 ? void 0 : _e$find.modifiedStream;
|
|
92
|
-
if (localCameraStream) {
|
|
93
|
-
_this.bindLocalAudioStream();
|
|
94
|
-
_this.bindLocalVideoStream();
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
onStreamsUpdated: function onStreamsUpdated(_, e) {
|
|
98
|
-
var _e$find2;
|
|
99
|
-
var localCameraStream = (_e$find2 = e.find(function (event) {
|
|
100
|
-
return event.modifiedStream.owner.userId === _this._localUser.userId && event.modifiedStream.videoSourceType === _type3.AgoraRtcVideoSourceType.CAMERA;
|
|
101
|
-
})) === null || _e$find2 === void 0 ? void 0 : _e$find2.modifiedStream;
|
|
102
|
-
if (localCameraStream) {
|
|
103
|
-
if (localCameraStream.streamType === _type2.AgoraRteMediaStreamType.AUDIO || localCameraStream.streamType === _type2.AgoraRteMediaStreamType.NONE) {
|
|
104
|
-
if (_this._deviceStore.cameraEnabled) {
|
|
105
|
-
_this.enableCameraWithStream(false);
|
|
106
|
-
_toast.FcrToastApi.open({
|
|
107
|
-
toastProps: {
|
|
108
|
-
type: 'error',
|
|
109
|
-
content: '您已经被主持人关闭摄像头'
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (localCameraStream.streamType === _type2.AgoraRteMediaStreamType.VIDEO || localCameraStream.streamType === _type2.AgoraRteMediaStreamType.NONE) {
|
|
115
|
-
if (_this._deviceStore.microphoneEnabled) {
|
|
116
|
-
_this.enableMicrophoneWithStream(false);
|
|
117
|
-
_toast.FcrToastApi.open({
|
|
118
|
-
toastProps: {
|
|
119
|
-
type: 'error',
|
|
120
|
-
content: '您已经被主持人静音'
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
_this.bindLocalAudioStream();
|
|
126
|
-
_this.bindLocalVideoStream();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
if (this._deviceStore.cameraEnabled) {
|
|
131
|
-
this._deviceStore.enableCamera(false);
|
|
132
|
-
this.enableCameraWithStream(true);
|
|
133
|
-
}
|
|
134
|
-
if (this._deviceStore.microphoneEnabled) {
|
|
135
|
-
this._deviceStore.enableMicrophone(false);
|
|
136
|
-
this.enableMicrophoneWithStream(true);
|
|
137
|
-
}
|
|
138
|
-
this._initLocalStream();
|
|
139
|
-
}
|
|
140
|
-
return (0, _createClass2["default"])(FcrDeviceStreamsStore, [{
|
|
141
|
-
key: "_localUser",
|
|
142
|
-
get: function get() {
|
|
143
|
-
return this._roomControl.getUserControl().getLocalUser();
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
key: "_localCameraStream",
|
|
147
|
-
get: function get() {
|
|
148
|
-
var localStreams = this._roomControl.getStreamControl().getStreamsByUserId(this._localUser.userId);
|
|
149
|
-
return localStreams.find(function (stream) {
|
|
150
|
-
return stream.videoSourceType === _type3.AgoraRtcVideoSourceType.CAMERA;
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "_canStartLocalVideo",
|
|
155
|
-
get: function get() {
|
|
156
|
-
return this._securityStore.hasStartVideoPermission(_type.FcrPrivilegeUserRole.SELF);
|
|
157
|
-
}
|
|
158
|
-
}, {
|
|
159
|
-
key: "_canStartLocalAudio",
|
|
160
|
-
get: function get() {
|
|
161
|
-
return this._securityStore.hasUnmutePermission(_type.FcrPrivilegeUserRole.SELF);
|
|
162
|
-
}
|
|
163
|
-
}, {
|
|
164
|
-
key: "bindLocalAudioStream",
|
|
165
|
-
value: function bindLocalAudioStream() {
|
|
166
|
-
var streamControl = this._roomControl.getStreamControl();
|
|
167
|
-
var localCameraStream = this._localCameraStream;
|
|
168
|
-
if (localCameraStream && this._deviceStore.microphoneDeviceId && localCameraStream.audioSourceId !== this._deviceStore.microphoneDeviceId) {
|
|
169
|
-
streamControl.bindLocalStreams([{
|
|
170
|
-
streamId: localCameraStream.streamId,
|
|
171
|
-
audioSourceId: this._deviceStore.microphoneDeviceId
|
|
172
|
-
}]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}, {
|
|
176
|
-
key: "bindLocalVideoStream",
|
|
177
|
-
value: function bindLocalVideoStream() {
|
|
178
|
-
var streamControl = this._roomControl.getStreamControl();
|
|
179
|
-
var localCameraStream = this._localCameraStream;
|
|
180
|
-
if (localCameraStream && this._deviceStore.cameraId && localCameraStream.videoSourceId !== this._deviceStore.cameraId) {
|
|
181
|
-
streamControl.bindLocalStreams([{
|
|
182
|
-
streamId: localCameraStream.streamId,
|
|
183
|
-
videoSourceId: this._deviceStore.cameraId
|
|
184
|
-
}]);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, {
|
|
188
|
-
key: "enableCameraWithStream",
|
|
189
|
-
value: function () {
|
|
190
|
-
var _enableCameraWithStream = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(enable) {
|
|
191
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
192
|
-
while (1) switch (_context.prev = _context.next) {
|
|
193
|
-
case 0:
|
|
194
|
-
if (this._deviceStore.cameraId) {
|
|
195
|
-
_context.next = 2;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
return _context.abrupt("return");
|
|
199
|
-
case 2:
|
|
200
|
-
if (!(enable && !this._canStartLocalVideo)) {
|
|
201
|
-
_context.next = 5;
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
_toast.FcrToastApi.open({
|
|
205
|
-
toastProps: {
|
|
206
|
-
type: 'warn',
|
|
207
|
-
content: 'You have no permission to start video'
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
return _context.abrupt("return");
|
|
211
|
-
case 5:
|
|
212
|
-
if (!(this._localCameraStream && enable)) {
|
|
213
|
-
_context.next = 9;
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
if (!(this._localCameraStream.streamType === _type.FcrStreamType.NONE || this._localCameraStream.streamType === _type.FcrStreamType.AUDIO)) {
|
|
217
|
-
_context.next = 9;
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
_context.next = 9;
|
|
221
|
-
return this._publishLocalStream();
|
|
222
|
-
case 9:
|
|
223
|
-
this._deviceStore.setCameraEnabled(enable);
|
|
224
|
-
this._handleCameraEnabledChanged();
|
|
225
|
-
case 11:
|
|
226
|
-
case "end":
|
|
227
|
-
return _context.stop();
|
|
228
|
-
}
|
|
229
|
-
}, _callee, this);
|
|
230
|
-
}));
|
|
231
|
-
function enableCameraWithStream(_x) {
|
|
232
|
-
return _enableCameraWithStream.apply(this, arguments);
|
|
233
|
-
}
|
|
234
|
-
return enableCameraWithStream;
|
|
235
|
-
}()
|
|
236
|
-
}, {
|
|
237
|
-
key: "enableMicrophoneWithStream",
|
|
238
|
-
value: function () {
|
|
239
|
-
var _enableMicrophoneWithStream = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(enable) {
|
|
240
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
241
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
242
|
-
case 0:
|
|
243
|
-
if (this._deviceStore.microphoneDeviceId) {
|
|
244
|
-
_context2.next = 2;
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
return _context2.abrupt("return");
|
|
248
|
-
case 2:
|
|
249
|
-
if (!(enable && !this._canStartLocalAudio)) {
|
|
250
|
-
_context2.next = 5;
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
_toast.FcrToastApi.open({
|
|
254
|
-
toastProps: {
|
|
255
|
-
type: 'warn',
|
|
256
|
-
content: 'You have no permission to start audio'
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
return _context2.abrupt("return");
|
|
260
|
-
case 5:
|
|
261
|
-
if (!(this._localCameraStream && enable)) {
|
|
262
|
-
_context2.next = 9;
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
if (!(this._localCameraStream.streamType === _type.FcrStreamType.NONE || this._localCameraStream.streamType === _type.FcrStreamType.VIDEO)) {
|
|
266
|
-
_context2.next = 9;
|
|
267
|
-
break;
|
|
268
|
-
}
|
|
269
|
-
_context2.next = 9;
|
|
270
|
-
return this._publishLocalStream();
|
|
271
|
-
case 9:
|
|
272
|
-
this._deviceStore.microphoneEnabled = enable;
|
|
273
|
-
this._handleMicrophoneEnabledChanged();
|
|
274
|
-
case 11:
|
|
275
|
-
case "end":
|
|
276
|
-
return _context2.stop();
|
|
277
|
-
}
|
|
278
|
-
}, _callee2, this);
|
|
279
|
-
}));
|
|
280
|
-
function enableMicrophoneWithStream(_x2) {
|
|
281
|
-
return _enableMicrophoneWithStream.apply(this, arguments);
|
|
282
|
-
}
|
|
283
|
-
return enableMicrophoneWithStream;
|
|
284
|
-
}()
|
|
285
|
-
}, {
|
|
286
|
-
key: "_initLocalStream",
|
|
287
|
-
value: function _initLocalStream() {
|
|
288
|
-
if (this._localCameraStream) {
|
|
289
|
-
this.bindLocalVideoStream();
|
|
290
|
-
this.bindLocalAudioStream();
|
|
291
|
-
}
|
|
292
|
-
this._publishLocalStream();
|
|
293
|
-
}
|
|
294
|
-
}, {
|
|
295
|
-
key: "_handleCameraChanged",
|
|
296
|
-
value: function _handleCameraChanged() {
|
|
297
|
-
this.bindLocalVideoStream();
|
|
298
|
-
this.enableCameraWithStream(this._deviceStore.cameraEnabled);
|
|
299
|
-
}
|
|
300
|
-
}, {
|
|
301
|
-
key: "_handleMicrophoneChanged",
|
|
302
|
-
value: function _handleMicrophoneChanged(microphoneId, prevMicrophoneId) {
|
|
303
|
-
var _this2 = this;
|
|
304
|
-
if (prevMicrophoneId) {
|
|
305
|
-
var microphoneTrack = this._mediaControl.getMicrophoneAudioTrack(prevMicrophoneId);
|
|
306
|
-
microphoneTrack.stop();
|
|
307
|
-
}
|
|
308
|
-
this.bindLocalAudioStream();
|
|
309
|
-
if (microphoneId) {
|
|
310
|
-
var _microphoneTrack = this._mediaControl.getMicrophoneAudioTrack(microphoneId);
|
|
311
|
-
this._mediaControl.enableAudioVolumeIndication(500, 1);
|
|
312
|
-
_microphoneTrack.addObserver({
|
|
313
|
-
onMicrophoneStateUpdated: function onMicrophoneStateUpdated() {},
|
|
314
|
-
onAudioVolumeUpdated: function onAudioVolumeUpdated(_deviceId, level) {
|
|
315
|
-
(0, _mobx.runInAction)(function () {
|
|
316
|
-
_this2._deviceStore.microphoneVolumeLevel = level;
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
this.enableMicrophoneWithStream(this._deviceStore.microphoneEnabled);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}, {
|
|
324
|
-
key: "_handleCameraEnabledChanged",
|
|
325
|
-
value: function _handleCameraEnabledChanged() {
|
|
326
|
-
if (!this._deviceStore.cameraId) return;
|
|
327
|
-
var enabled = this._deviceStore.cameraEnabled;
|
|
328
|
-
var cameraTrack = this._deviceStore.mediaControl.getCameraVideoTrack(this._deviceStore.cameraId);
|
|
329
|
-
if (enabled) {
|
|
330
|
-
cameraTrack.start();
|
|
331
|
-
window.runtime.sendEvent({
|
|
332
|
-
action: _constant.RendererEventAction.UNMUTE_LOCAL_VIDEO,
|
|
333
|
-
payload: null
|
|
334
|
-
});
|
|
335
|
-
} else {
|
|
336
|
-
cameraTrack.stop();
|
|
337
|
-
window.runtime.sendEvent({
|
|
338
|
-
action: _constant.RendererEventAction.MUTE_LOCAL_VIDEO,
|
|
339
|
-
payload: null
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}, {
|
|
344
|
-
key: "_handleMicrophoneEnabledChanged",
|
|
345
|
-
value: function _handleMicrophoneEnabledChanged() {
|
|
346
|
-
if (!this._deviceStore.microphoneDeviceId) return;
|
|
347
|
-
var enabled = this._deviceStore.microphoneEnabled;
|
|
348
|
-
var microphoneTrack = this._mediaControl.getMicrophoneAudioTrack(this._deviceStore.microphoneDeviceId);
|
|
349
|
-
if (enabled) {
|
|
350
|
-
microphoneTrack.start();
|
|
351
|
-
(0, _rendererEvent.sendEvent)({
|
|
352
|
-
action: _constant.RendererEventAction.UNMUTE_LOCAL_AUDIO,
|
|
353
|
-
payload: null
|
|
354
|
-
});
|
|
355
|
-
} else {
|
|
356
|
-
microphoneTrack.stop();
|
|
357
|
-
(0, _rendererEvent.sendEvent)({
|
|
358
|
-
action: _constant.RendererEventAction.MUTE_LOCAL_AUDIO,
|
|
359
|
-
payload: null
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}, {
|
|
364
|
-
key: "_publishLocalStream",
|
|
365
|
-
value: function () {
|
|
366
|
-
var _publishLocalStream2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
367
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
368
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
369
|
-
case 0:
|
|
370
|
-
if (this._localCameraStream) {
|
|
371
|
-
_context3.next = 2;
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
return _context3.abrupt("return");
|
|
375
|
-
case 2:
|
|
376
|
-
_context3.next = 4;
|
|
377
|
-
return this._roomControl.getStreamControl().updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._localCameraStream.streamId, {
|
|
378
|
-
audioPrivilege: _type.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
379
|
-
videoPrivilege: _type.FcrStreamPrivilegeOperation.HAS_PRIVILEGE
|
|
380
|
-
}));
|
|
381
|
-
case 4:
|
|
382
|
-
case "end":
|
|
383
|
-
return _context3.stop();
|
|
384
|
-
}
|
|
385
|
-
}, _callee3, this);
|
|
386
|
-
}));
|
|
387
|
-
function _publishLocalStream() {
|
|
388
|
-
return _publishLocalStream2.apply(this, arguments);
|
|
389
|
-
}
|
|
390
|
-
return _publishLocalStream;
|
|
391
|
-
}()
|
|
392
|
-
}]);
|
|
393
|
-
}();
|
|
394
|
-
_FcrDeviceStreamsStore = FcrDeviceStreamsStore;
|
|
395
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrDeviceStreamsStore, [[_decorator.bound, 2, "bindLocalAudioStream"], [_decorator.bound, 2, "bindLocalVideoStream"], [_enableCameraWithStreamDecs, 18, "enableCameraWithStream"], [_enableMicrophoneWithStreamDecs, 18, "enableMicrophoneWithStream"], [_decorator.bound, 2, "_handleCameraChanged"], [_decorator.bound, 2, "_handleMicrophoneChanged"], [_handleCameraEnabledChangedDecs, 18, "_handleCameraEnabledChanged"], [_handleMicrophoneEnabledChangedDecs, 18, "_handleMicrophoneEnabledChanged"]], []).e, 1);
|
|
396
|
-
_initProto = _applyDecs$e[0];
|
|
397
|
-
var virtualSoundCardPatternList = [/BlackHole/i, /SoundFlower/i, /AgoraALD/i];
|
|
398
|
-
var matchVirtualSoundCardPattern = exports.matchVirtualSoundCardPattern = function matchVirtualSoundCardPattern(deviceName) {
|
|
399
|
-
return virtualSoundCardPatternList.reduce(function (prev, pattern) {
|
|
400
|
-
pattern.test(deviceName) && (prev = true);
|
|
401
|
-
return prev;
|
|
402
|
-
}, false);
|
|
403
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.StoreContext = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
html,
|
|
2
|
-
body,
|
|
3
|
-
#root {
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
.draggable {
|
|
7
|
-
-webkit-app-region: drag;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.participants-container {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-wrap: wrap;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
width: 100%;
|
|
15
|
-
min-width: 320px;
|
|
16
|
-
min-height: 560px;
|
|
17
|
-
height: 100%;
|
|
18
|
-
border: 1px solid var(--fcr_ui_scene_line1);
|
|
19
|
-
border-radius: var(--fcr_cornerradius_s);
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseFragment } from '../base';
|
|
2
|
-
export declare class ShareScreenSelection extends BaseFragment {
|
|
3
|
-
get name(): "participant";
|
|
4
|
-
private _store;
|
|
5
|
-
constructor(runtime: Runtime);
|
|
6
|
-
get component(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
onEvent(event: RendererCustomEvent): void;
|
|
8
|
-
}
|
|
9
|
-
export declare const windowOptions: Electron.BrowserWindowConstructorOptions;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
require("core-js/modules/es.reflect.construct.js");
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.windowOptions = exports.ShareScreenSelection = void 0;
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
var _constant = require("../../utilities/constant");
|
|
16
|
-
var _base = require("../base");
|
|
17
|
-
var _context = require("./context");
|
|
18
|
-
var _store = _interopRequireDefault(require("./store"));
|
|
19
|
-
var _view = require("./view");
|
|
20
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
var ShareScreenSelection = exports.ShareScreenSelection = /*#__PURE__*/function (_BaseFragment) {
|
|
24
|
-
function ShareScreenSelection(runtime) {
|
|
25
|
-
var _this;
|
|
26
|
-
(0, _classCallCheck2["default"])(this, ShareScreenSelection);
|
|
27
|
-
_this = _callSuper(this, ShareScreenSelection, [runtime]);
|
|
28
|
-
_this._store = new _store["default"]();
|
|
29
|
-
return _this;
|
|
30
|
-
}
|
|
31
|
-
(0, _inherits2["default"])(ShareScreenSelection, _BaseFragment);
|
|
32
|
-
return (0, _createClass2["default"])(ShareScreenSelection, [{
|
|
33
|
-
key: "name",
|
|
34
|
-
get: function get() {
|
|
35
|
-
return 'participant';
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
key: "component",
|
|
39
|
-
get: function get() {
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.StoreContext.Provider, {
|
|
41
|
-
value: this._store,
|
|
42
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_view.Participant, {})
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
key: "onEvent",
|
|
47
|
-
value: function onEvent(event) {
|
|
48
|
-
var action = event.action,
|
|
49
|
-
payload = event.payload;
|
|
50
|
-
switch (action) {
|
|
51
|
-
case _constant.RendererEventAction.INIT_PARTICIPANT_LIST:
|
|
52
|
-
this._store.initParticipantList(payload);
|
|
53
|
-
break;
|
|
54
|
-
case _constant.RendererEventAction.UPDATE_PARTICIPANT:
|
|
55
|
-
this._store.setParticipantList(payload);
|
|
56
|
-
break;
|
|
57
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_CHANGE_SELF_NAME:
|
|
58
|
-
this._store.setAllowChangeSelfName(payload.allow);
|
|
59
|
-
break;
|
|
60
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_CHAT:
|
|
61
|
-
this._store.setAllowChat(payload.allow);
|
|
62
|
-
break;
|
|
63
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_JOIN_WITH_MUTE_AUDIO:
|
|
64
|
-
this._store.setAllowJoinWithMuteAudio(payload.allow);
|
|
65
|
-
break;
|
|
66
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_SHARE_SCREEN:
|
|
67
|
-
this._store.setAllowShareScreen(payload.allow);
|
|
68
|
-
break;
|
|
69
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_VIDEO:
|
|
70
|
-
this._store.setAllowUnmuteSelfVideo(payload.allow);
|
|
71
|
-
break;
|
|
72
|
-
case _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_AUDIO:
|
|
73
|
-
this._store.setAllowUnmuteSelfAudio(payload.allow);
|
|
74
|
-
break;
|
|
75
|
-
case _constant.RendererEventAction.MAIN_SET_LOCK_ROOM:
|
|
76
|
-
this._store.setLockRoomEnabled(payload.allow);
|
|
77
|
-
break;
|
|
78
|
-
case _constant.RendererEventAction.MAIN_SET_ENABLE_WAITING_ROOM:
|
|
79
|
-
this._store.setWaitingRoomEnabled(payload.allow);
|
|
80
|
-
break;
|
|
81
|
-
default:
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}]);
|
|
86
|
-
}(_base.BaseFragment);
|
|
87
|
-
var windowOptions = exports.windowOptions = {
|
|
88
|
-
width: 790,
|
|
89
|
-
height: 550
|
|
90
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.room-control-drop-with-under-line {
|
|
2
|
-
position: relative;
|
|
3
|
-
/* margin: 8px 0; */
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.room-control-drop-with-under-line::after {
|
|
7
|
-
content: '';
|
|
8
|
-
position: absolute;
|
|
9
|
-
left: -10px;
|
|
10
|
-
right: -10px;
|
|
11
|
-
bottom: -12px;
|
|
12
|
-
border-top: 1px solid var(--fcr_ui_scene_line1);
|
|
13
|
-
margin: 8px 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.room-control-drop-disable {
|
|
17
|
-
opacity: 0.5;
|
|
18
|
-
cursor: not-allowed;
|
|
19
|
-
}
|