fcr-ui-scene 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ scenes/base.d.ts +10 -0
- package/lib/ scenes/base.js +75 -0
- package/lib/ scenes/main-scene.d.ts +43 -0
- package/lib/ scenes/main-scene.js +368 -0
- package/lib/ scenes/waiting-scene.d.ts +31 -0
- package/lib/ scenes/waiting-scene.js +119 -0
- package/lib/common/device-store.d.ts +1 -2
- package/lib/common/device-store.js +169 -153
- package/lib/common/device-stream-store.d.ts +5 -29
- package/lib/common/device-stream-store.js +47 -93
- package/lib/common/room-store.js +4 -4
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +16 -17
- package/lib/common/type.d.ts +8 -0
- package/lib/common/type.js +6 -0
- package/lib/creator.js +3 -3
- package/lib/electron/app.js +21 -5
- package/lib/electron/bootstrap-sdk.js +1 -2
- package/lib/electron/injections.d.ts +1 -1
- package/lib/error-fallback.css +62 -0
- package/lib/error-fallback.d.ts +2 -0
- package/lib/error-fallback.js +19 -0
- package/lib/modules/Interpreter/action/delete-btn/index.d.ts +1 -1
- package/lib/modules/Interpreter/action/edit-btn/index.d.ts +0 -1
- package/lib/modules/Interpreter/action/edit-btn/index.js +0 -2
- package/lib/modules/Interpreter/action/switch-btn/index.css +3 -0
- package/lib/modules/Interpreter/action/switch-btn/index.d.ts +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.js +3 -3
- package/lib/modules/Interpreter/footer/index.css +4 -3
- package/lib/modules/Interpreter/index.d.ts +2 -17
- package/lib/modules/Interpreter/index.js +2 -18
- package/lib/modules/Interpreter/interpreter-list/index.css +5 -1
- package/lib/modules/Interpreter/interpreter-list/index.d.ts +1 -0
- package/lib/modules/Interpreter/interpreter-list/index.js +3 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +0 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +1 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +1 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +1 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +55 -81
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +6 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +58 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +1 -1
- package/lib/modules/Interpreter/store.d.ts +36 -29
- package/lib/modules/Interpreter/store.js +575 -606
- package/lib/modules/Interpreter/type.d.ts +41 -0
- package/lib/modules/Interpreter/type.js +20 -0
- package/lib/modules/Interpreter/utils.d.ts +12 -0
- package/lib/modules/Interpreter/utils.js +139 -0
- package/lib/modules/Interpreter/view.d.ts +0 -1
- package/lib/modules/Interpreter/view.js +3 -5
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +11 -11
- package/lib/modules/action-bar/apps/useInterpreter.js +4 -2
- package/lib/modules/action-bar/components/apps/app-item/index.css +35 -0
- package/lib/modules/action-bar/components/apps/app-item/index.d.ts +12 -0
- package/lib/modules/action-bar/components/apps/app-item/index.js +61 -0
- package/lib/modules/action-bar/components/apps/appitems.d.ts +5 -0
- package/lib/modules/action-bar/components/apps/appitems.js +45 -0
- package/lib/modules/action-bar/components/apps/index.css +8 -0
- package/lib/modules/action-bar/components/apps/index.d.ts +4 -0
- package/lib/modules/action-bar/components/apps/index.js +57 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +9 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +29 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +10 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +36 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +14 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.js +37 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +16 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +41 -0
- package/lib/modules/action-bar/components/board/index.d.ts +4 -0
- package/lib/modules/action-bar/components/board/index.js +34 -0
- package/lib/modules/action-bar/components/breakout-room/index.d.ts +4 -0
- package/lib/modules/action-bar/components/breakout-room/index.js +32 -0
- package/lib/modules/action-bar/components/chat/index.css +80 -0
- package/lib/modules/action-bar/components/chat/index.d.ts +5 -0
- package/lib/modules/action-bar/components/chat/index.js +154 -0
- package/lib/modules/action-bar/components/device/index.css +162 -0
- package/lib/modules/action-bar/components/device/index.d.ts +8 -0
- package/lib/modules/action-bar/components/device/index.js +611 -0
- package/lib/modules/action-bar/components/interpreter/index.d.ts +6 -0
- package/lib/modules/action-bar/components/interpreter/index.js +41 -0
- package/lib/modules/action-bar/components/item.d.ts +27 -0
- package/lib/modules/action-bar/components/item.js +164 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +10 -0
- package/lib/modules/action-bar/components/leave/assign-host.js +64 -0
- package/lib/modules/action-bar/components/leave/index.css +126 -0
- package/lib/modules/action-bar/components/leave/index.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/index.js +159 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +18 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.js +153 -0
- package/lib/modules/action-bar/components/live-streaming/index.d.ts +4 -0
- package/lib/modules/action-bar/components/live-streaming/index.js +39 -0
- package/lib/modules/action-bar/components/more/index.css +114 -0
- package/lib/modules/action-bar/components/more/index.d.ts +5 -0
- package/lib/modules/action-bar/components/more/index.js +83 -0
- package/lib/modules/action-bar/components/more/poppover-content.d.ts +8 -0
- package/lib/modules/action-bar/components/more/poppover-content.js +400 -0
- package/lib/modules/action-bar/components/participants/index.css +21 -0
- package/lib/modules/action-bar/components/participants/index.d.ts +5 -0
- package/lib/modules/action-bar/components/participants/index.js +83 -0
- package/lib/modules/action-bar/components/record/index.css +39 -0
- package/lib/modules/action-bar/components/record/index.d.ts +5 -0
- package/lib/modules/action-bar/components/record/index.js +166 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +5 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.js +48 -0
- package/lib/modules/action-bar/components/respond/index.d.ts +4 -0
- package/lib/modules/action-bar/components/respond/index.js +32 -0
- package/lib/modules/action-bar/components/screen-share/index.d.ts +4 -0
- package/lib/modules/action-bar/components/screen-share/index.js +106 -0
- package/lib/modules/action-bar/components/screen-share/submenu.d.ts +1 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +154 -0
- package/lib/modules/action-bar/components/security/index.d.ts +4 -0
- package/lib/modules/action-bar/components/security/index.js +58 -0
- package/lib/modules/action-bar/components/settings/index.d.ts +4 -0
- package/lib/modules/action-bar/components/settings/index.js +42 -0
- package/lib/modules/action-bar/index.css +23 -1
- package/lib/modules/action-bar/index.d.ts +2 -22
- package/lib/modules/action-bar/index.dev.js +37 -16
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/screen-share/index.js +5 -0
- package/lib/modules/action-bar/security/index.js +1 -0
- package/lib/modules/action-bar/smaller.js +2 -2
- package/lib/modules/action-bar/store.d.ts +6 -7
- package/lib/modules/action-bar/store.js +114 -128
- package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +15 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.js +220 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +14 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +4 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +36 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/view.js +6 -6
- package/lib/modules/audio-stream/index.d.ts +2 -15
- package/lib/modules/audio-stream/index.js +1 -3
- package/lib/modules/chat/chat-bar/index.css +5 -0
- package/lib/modules/chat/chat-bar/index.js +16 -14
- package/lib/modules/chat/chat-select/index.css +6 -3
- package/lib/modules/chat/chat.js +7 -6
- package/lib/modules/chat/index.css +10 -0
- package/lib/modules/chat/index.d.ts +2 -12
- package/lib/modules/chat/index.dev.js +14 -3
- package/lib/modules/chat/index.js +7 -20
- package/lib/modules/chat/message-list.js +1 -0
- package/lib/modules/chat/store.js +1 -1
- package/lib/modules/components/device-control/components/audio-menu/index.js +4 -4
- package/lib/modules/components/device-control/index.css +3 -0
- package/lib/modules/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/components/dialog-container/component/body.js +46 -0
- package/lib/modules/components/dialog-container/index.css +78 -0
- package/lib/modules/components/dialog-container/index.d.ts +11 -0
- package/lib/modules/components/dialog-container/index.js +110 -0
- package/lib/modules/components/member-window/index.css +419 -0
- package/lib/modules/components/member-window/index.d.ts +76 -0
- package/lib/modules/components/member-window/index.js +888 -0
- package/lib/modules/components/security-menu/index.css +9 -0
- package/lib/modules/components/security-menu/index.js +74 -23
- package/lib/modules/components/tab-frame/index.css +40 -0
- package/lib/modules/components/tab-frame/index.d.ts +12 -0
- package/lib/modules/components/tab-frame/index.js +57 -0
- package/lib/modules/connection-gateway/components/computer/index.css +1 -0
- package/lib/modules/connection-gateway/components/phone/index.css +1 -1
- package/lib/modules/connection-gateway/index.d.ts +2 -9
- package/lib/modules/connection-gateway/store.d.ts +3 -11
- package/lib/modules/connection-gateway/store.js +1 -17
- package/lib/modules/connection-gateway/view.js +21 -4
- package/lib/modules/control-bar/components/cloud-recording-buttons.js +1 -1
- package/lib/modules/control-bar/index.d.ts +2 -16
- package/lib/modules/control-bar/index.js +10 -19
- package/lib/modules/control-bar/store.d.ts +3 -16
- package/lib/modules/control-bar/store.js +23 -5
- package/lib/modules/control-bar/view.js +17 -10
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib/modules/dialog/components/Interpreter/electron.js +3 -25
- package/lib/modules/dialog/components/Interpreter/index.js +14 -43
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
- package/lib/modules/dialog/components/chat/electron.js +6 -13
- package/lib/modules/dialog/components/chat/index.d.ts +1 -4
- package/lib/modules/dialog/components/chat/index.js +35 -41
- package/lib/modules/dialog/components/confirm/index.js +6 -7
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.js +9 -28
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +0 -1
- package/lib/modules/dialog/components/connection-gateway/index.js +11 -56
- package/lib/modules/dialog/components/control-bar/index.js +6 -7
- package/lib/modules/dialog/components/device-setting/electron.js +4 -26
- package/lib/modules/dialog/components/device-setting/index.js +13 -41
- package/lib/modules/dialog/components/invite/index.js +16 -35
- package/lib/modules/dialog/components/live-streaming/index.js +18 -53
- package/lib/modules/dialog/components/participant/electron.js +4 -17
- package/lib/modules/dialog/components/participant/index.js +35 -26
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +3 -6
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +4 -14
- package/lib/modules/dialog/components/share-screen-selection/index.js +20 -5
- package/lib/modules/dialog/components/system-preference/electron.js +5 -8
- package/lib/modules/dialog/components/system-preference/index.js +4 -15
- package/lib/modules/dialog/components/toast/index.js +8 -12
- package/lib/modules/dialog/dialogs.js +2 -1
- package/lib/modules/dialog/hooks/useElectron.d.ts +6 -0
- package/lib/modules/dialog/hooks/useElectron.js +51 -9
- package/lib/modules/dialog/index.css +0 -2
- package/lib/modules/dialog/index.d.ts +2 -17
- package/lib/modules/dialog/store.d.ts +7 -39
- package/lib/modules/dialog/store.js +53 -152
- package/lib/modules/dialog/types/index.d.ts +59 -0
- package/lib/modules/event-confirm/view.js +4 -1
- package/lib/modules/invite/view.d.ts +4 -0
- package/lib/modules/invite/view.js +18 -22
- package/lib/modules/invite/voip-invite.js +3 -3
- package/lib/modules/layout/components/Aside.js +11 -1
- package/lib/modules/layout/components/Carousel.js +1 -1
- package/lib/modules/layout/components/Layout.js +7 -4
- package/lib/modules/layout/components/index.css +6 -1
- package/lib/modules/layout/index.js +8 -7
- package/lib/modules/layout/member-window/index.css +22 -9
- package/lib/modules/layout/member-window/index.js +16 -3
- package/lib/modules/layout/store.d.ts +1 -1
- package/lib/modules/layout/store.js +1 -7
- package/lib/modules/layout/video-window-datasource.js +11 -3
- package/lib/modules/notification/index.css +1 -0
- package/lib/modules/participant/attendee/index.css +1 -0
- package/lib/modules/participant/attendee/index.js +2 -1
- package/lib/modules/participant/components/drop-menu/index.css +1 -0
- package/lib/modules/participant/components/drop-menu/index.js +9 -9
- package/lib/modules/participant/index.css +5 -0
- package/lib/modules/participant/index.d.ts +2 -17
- package/lib/modules/participant/index.dev.js +38 -27
- package/lib/modules/participant/store.d.ts +4 -17
- package/lib/modules/participant/store.js +13 -13
- package/lib/modules/setting/audio-settings/audio-settings.js +13 -10
- package/lib/modules/setting/audio-settings/index.css +26 -1
- package/lib/modules/setting/general-settings/index.css +1 -1
- package/lib/modules/setting/index.css +2 -1
- package/lib/modules/setting/index.d.ts +2 -15
- package/lib/modules/setting/index.dev.js +19 -10
- package/lib/modules/setting/store.d.ts +5 -18
- package/lib/modules/setting/store.js +48 -20
- package/lib/modules/setting/translate-settings/index.css +3 -1
- package/lib/modules/setting/video-settings/index.css +5 -2
- package/lib/modules/share-screen/index.dev.js +20 -19
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/selection/index.js +83 -97
- package/lib/modules/share-screen/store.js +16 -36
- package/lib/modules/sound-effect/index.d.ts +2 -13
- package/lib/modules/sound-effect/index.js +1 -2
- package/lib/modules/state-bar/index.css +13 -2
- package/lib/modules/state-bar/index.d.ts +1 -5
- package/lib/modules/state-bar/index.dev.js +1 -1
- package/lib/modules/state-bar/index.js +0 -27
- package/lib/modules/state-bar/layout-config.js +1 -1
- package/lib/modules/state-bar/meeting-network-state.css +1 -1
- package/lib/modules/state-bar/recording.js +7 -4
- package/lib/modules/state-bar/view.js +1 -1
- package/lib/modules/video-window/index.d.ts +2 -2
- package/lib/modules/video-window/store.d.ts +2 -1
- package/lib/modules/video-window/store.js +2 -2
- package/lib/modules/waiting-room-layout/index.css +1 -3
- package/lib/modules/waiting-room-layout/index.d.ts +3 -1
- package/lib/modules/waiting-room-layout/index.js +10 -3
- package/lib/modules/whiteboard/index.d.ts +2 -13
- package/lib/modules/whiteboard/index.js +4 -5
- package/lib/providers/device-privilege-provider.d.ts +30 -0
- package/lib/providers/device-privilege-provider.js +386 -0
- package/lib/providers/device-provider.d.ts +246 -0
- package/lib/providers/device-provider.js +1741 -0
- package/lib/providers/device-stream-provider.d.ts +36 -0
- package/lib/providers/device-stream-provider.js +460 -0
- package/lib/providers/event-provider.d.ts +108 -0
- package/lib/providers/event-provider.js +288 -0
- package/lib/providers/interpreter-provider.d.ts +25 -0
- package/lib/providers/interpreter-provider.js +151 -0
- package/lib/providers/local-storage-provider.d.ts +8 -0
- package/lib/providers/local-storage-provider.js +31 -0
- package/lib/providers/monitor-provider.d.ts +15 -0
- package/lib/providers/monitor-provider.js +29 -0
- package/lib/providers/privilege-provider.d.ts +216 -0
- package/lib/providers/privilege-provider.js +966 -0
- package/lib/providers/renderer-provider.d.ts +43 -0
- package/lib/providers/renderer-provider.js +245 -0
- package/lib/providers/room-provider.d.ts +79 -0
- package/lib/providers/room-provider.js +439 -0
- package/lib/providers/session-provider.d.ts +26 -0
- package/lib/providers/session-provider.js +49 -0
- package/lib/runtime.d.ts +1 -1
- package/lib/scenes/base.d.ts +10 -0
- package/lib/scenes/base.js +75 -0
- package/lib/scenes/main-scene.d.ts +48 -0
- package/lib/scenes/main-scene.js +390 -0
- package/lib/scenes/waiting-scene.d.ts +31 -0
- package/lib/scenes/waiting-scene.js +129 -0
- package/lib/shared-data-source/config.d.ts +16 -0
- package/lib/shared-data-source/config.js +21 -0
- package/lib/type.d.ts +26 -1
- package/lib/ui-manager.d.ts +3 -0
- package/lib/ui-manager.js +154 -233
- package/lib/ui-node.d.ts +25 -0
- package/lib/ui-node.js +156 -0
- package/lib/utilities/constant.d.ts +15 -15
- package/lib/utilities/constant.js +15 -15
- package/lib/utilities/tools.d.ts +2 -0
- package/lib/utilities/tools.js +42 -10
- package/package.json +12 -11
- package/public/assets/fcr_leave2.svg +58 -0
- package/public/index.html +150 -13
|
@@ -37,9 +37,7 @@ require("core-js/modules/es.array.push.js");
|
|
|
37
37
|
require("core-js/modules/es.array.some.js");
|
|
38
38
|
require("core-js/modules/es.array.sort.js");
|
|
39
39
|
require("core-js/modules/es.array.unshift.js");
|
|
40
|
-
require("core-js/modules/es.date.to-json.js");
|
|
41
40
|
require("core-js/modules/es.function.name.js");
|
|
42
|
-
require("core-js/modules/es.json.stringify.js");
|
|
43
41
|
require("core-js/modules/es.map.js");
|
|
44
42
|
require("core-js/modules/es.object.assign.js");
|
|
45
43
|
require("core-js/modules/es.object.to-string.js");
|
|
@@ -211,9 +209,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
211
209
|
// selected camera id, it is the real device id
|
|
212
210
|
_classPrivateFieldInitSpec(this, _E, _init_cameraId(this, ''));
|
|
213
211
|
// selected microphone id, for ui display, could be 'default' or real device id
|
|
214
|
-
_classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, ''));
|
|
212
|
+
_classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, 'default'));
|
|
215
213
|
// selected speaker id, for ui display, could be 'default' or real device id
|
|
216
|
-
_classPrivateFieldInitSpec(this, _G, _init_speakerId(this, ''));
|
|
214
|
+
_classPrivateFieldInitSpec(this, _G, _init_speakerId(this, 'default'));
|
|
217
215
|
_classPrivateFieldInitSpec(this, _H, _init_cameraEnabled(this, false));
|
|
218
216
|
_classPrivateFieldInitSpec(this, _I, _init_showCameraPreview(this, false));
|
|
219
217
|
_classPrivateFieldInitSpec(this, _J, _init_microphoneEnabled(this, false));
|
|
@@ -261,9 +259,6 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
261
259
|
(0, _mobx.runInAction)(function () {
|
|
262
260
|
_this.speakerVolume = _this.mediaControl.getSelectedSpeakerVolume();
|
|
263
261
|
});
|
|
264
|
-
this._handleCameraListUpdated();
|
|
265
|
-
this._handleMicrophoneListUpdated();
|
|
266
|
-
this._handleSpeakerListUpdated();
|
|
267
262
|
}
|
|
268
263
|
return (0, _createClass2["default"])(FcrDeviceStore, [{
|
|
269
264
|
key: "_microphoneDeviceId",
|
|
@@ -557,6 +552,53 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
557
552
|
speakerDeviceId: this._speakerDeviceId
|
|
558
553
|
};
|
|
559
554
|
}
|
|
555
|
+
}, {
|
|
556
|
+
key: "init",
|
|
557
|
+
value: function () {
|
|
558
|
+
var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
559
|
+
var _this2 = this;
|
|
560
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
561
|
+
while (1) switch (_context.prev = _context.next) {
|
|
562
|
+
case 0:
|
|
563
|
+
_context.next = 2;
|
|
564
|
+
return this._mediaControl.getCameraList().then(function (list) {
|
|
565
|
+
(0, _mobx.runInAction)(function () {
|
|
566
|
+
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
567
|
+
_this2.cameraList = list;
|
|
568
|
+
if (_this2.cameraList.length > 0) {
|
|
569
|
+
var _cameraId = _this2.cameraList[0].deviceId;
|
|
570
|
+
_this2.logger.info('[FcrDeviceStore] select default camera id:', _cameraId);
|
|
571
|
+
_this2.setCameraId(_cameraId);
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
case 2:
|
|
576
|
+
_context.next = 4;
|
|
577
|
+
return this._mediaControl.getMicrophoneList().then(function (list) {
|
|
578
|
+
(0, _mobx.runInAction)(function () {
|
|
579
|
+
_this2.logger.info('[FcrDeviceStore] init microphone list:', list);
|
|
580
|
+
_this2.microphoneList = list;
|
|
581
|
+
});
|
|
582
|
+
});
|
|
583
|
+
case 4:
|
|
584
|
+
_context.next = 6;
|
|
585
|
+
return this._mediaControl.getSpeakerList().then(function (list) {
|
|
586
|
+
(0, _mobx.runInAction)(function () {
|
|
587
|
+
_this2.logger.info('[FcrDeviceStore] init speaker list:', list);
|
|
588
|
+
_this2.speakerList = list;
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
case 6:
|
|
592
|
+
case "end":
|
|
593
|
+
return _context.stop();
|
|
594
|
+
}
|
|
595
|
+
}, _callee, this);
|
|
596
|
+
}));
|
|
597
|
+
function init() {
|
|
598
|
+
return _init.apply(this, arguments);
|
|
599
|
+
}
|
|
600
|
+
return init;
|
|
601
|
+
}()
|
|
560
602
|
}, {
|
|
561
603
|
key: "addObserver",
|
|
562
604
|
value: function addObserver(observer) {
|
|
@@ -594,7 +636,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
594
636
|
var _this$_microphoneAudi,
|
|
595
637
|
_this$soundEffectList,
|
|
596
638
|
_this$soundEffectList2,
|
|
597
|
-
|
|
639
|
+
_this3 = this;
|
|
598
640
|
if (!this._speakerDeviceId) return;
|
|
599
641
|
this.microphoneEnabled && ((_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 ? void 0 : _this$_microphoneAudi.stop());
|
|
600
642
|
this._mediaControl.setSelectedSpeaker(this._speakerDeviceId);
|
|
@@ -605,7 +647,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
605
647
|
this.speakerDetecting = true;
|
|
606
648
|
this._playAudioTimer && clearInterval(this._playAudioTimer);
|
|
607
649
|
this._playAudioTimer = setInterval(function () {
|
|
608
|
-
|
|
650
|
+
_this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
|
|
609
651
|
}, sleep);
|
|
610
652
|
}
|
|
611
653
|
}, {
|
|
@@ -626,12 +668,12 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
626
668
|
}, {
|
|
627
669
|
key: "toggleLocalMirrorPreview",
|
|
628
670
|
value: function toggleLocalMirrorPreview(mirror) {
|
|
629
|
-
var
|
|
671
|
+
var _this4 = this;
|
|
630
672
|
this.setCurrentIsMirror(mirror);
|
|
631
673
|
this._localVideoViewSet.forEach(function (view) {
|
|
632
|
-
var
|
|
633
|
-
(
|
|
634
|
-
(
|
|
674
|
+
var _this4$_cameraVideoTr, _this4$_cameraVideoTr2;
|
|
675
|
+
(_this4$_cameraVideoTr = _this4._cameraVideoTrack) === null || _this4$_cameraVideoTr === void 0 || _this4$_cameraVideoTr.stopPreview(view);
|
|
676
|
+
(_this4$_cameraVideoTr2 = _this4._cameraVideoTrack) === null || _this4$_cameraVideoTr2 === void 0 || _this4$_cameraVideoTr2.startPreview({
|
|
635
677
|
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
636
678
|
isMirror: mirror
|
|
637
679
|
}, view);
|
|
@@ -858,41 +900,41 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
858
900
|
}, {
|
|
859
901
|
key: "setSpeakerId",
|
|
860
902
|
value: function () {
|
|
861
|
-
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
862
|
-
var
|
|
903
|
+
var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(speakerId) {
|
|
904
|
+
var _this5 = this;
|
|
863
905
|
var speakerDeviceId, defaultDevice;
|
|
864
|
-
return _regenerator["default"].wrap(function
|
|
865
|
-
while (1) switch (
|
|
906
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
907
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
866
908
|
case 0:
|
|
867
909
|
if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
|
|
868
|
-
|
|
910
|
+
_context2.next = 2;
|
|
869
911
|
break;
|
|
870
912
|
}
|
|
871
|
-
return
|
|
913
|
+
return _context2.abrupt("return");
|
|
872
914
|
case 2:
|
|
873
915
|
if (!speakerId) {
|
|
874
|
-
|
|
916
|
+
_context2.next = 13;
|
|
875
917
|
break;
|
|
876
918
|
}
|
|
877
919
|
speakerDeviceId = speakerId;
|
|
878
920
|
if (!(speakerId === DEFAULT_DEVICE_ID)) {
|
|
879
|
-
|
|
921
|
+
_context2.next = 9;
|
|
880
922
|
break;
|
|
881
923
|
}
|
|
882
|
-
|
|
924
|
+
_context2.next = 7;
|
|
883
925
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
884
926
|
case 7:
|
|
885
|
-
defaultDevice =
|
|
927
|
+
defaultDevice = _context2.sent;
|
|
886
928
|
speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
887
929
|
case 9:
|
|
888
930
|
if (speakerDeviceId) {
|
|
889
931
|
this._mediaControl.setSelectedSpeaker(speakerDeviceId);
|
|
890
932
|
}
|
|
891
933
|
(0, _mobx.runInAction)(function () {
|
|
892
|
-
|
|
893
|
-
|
|
934
|
+
_this5._speakerDeviceId = speakerDeviceId;
|
|
935
|
+
_this5.speakerId = speakerId;
|
|
894
936
|
});
|
|
895
|
-
|
|
937
|
+
_context2.next = 15;
|
|
896
938
|
break;
|
|
897
939
|
case 13:
|
|
898
940
|
this._speakerDeviceId = speakerId;
|
|
@@ -901,9 +943,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
901
943
|
this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
|
|
902
944
|
case 16:
|
|
903
945
|
case "end":
|
|
904
|
-
return
|
|
946
|
+
return _context2.stop();
|
|
905
947
|
}
|
|
906
|
-
},
|
|
948
|
+
}, _callee2, this);
|
|
907
949
|
}));
|
|
908
950
|
function setSpeakerId(_x) {
|
|
909
951
|
return _setSpeakerId.apply(this, arguments);
|
|
@@ -913,36 +955,36 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
913
955
|
}, {
|
|
914
956
|
key: "setMicrophoneId",
|
|
915
957
|
value: function () {
|
|
916
|
-
var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
958
|
+
var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneId) {
|
|
917
959
|
var _this$_microphoneAudi5,
|
|
918
960
|
_this$_microphoneAudi6,
|
|
919
|
-
|
|
961
|
+
_this6 = this;
|
|
920
962
|
var microphoneDeviceId, defaultDevice, microphoneTrack;
|
|
921
|
-
return _regenerator["default"].wrap(function
|
|
922
|
-
while (1) switch (
|
|
963
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
964
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
923
965
|
case 0:
|
|
924
966
|
if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
|
|
925
|
-
|
|
967
|
+
_context3.next = 2;
|
|
926
968
|
break;
|
|
927
969
|
}
|
|
928
|
-
return
|
|
970
|
+
return _context3.abrupt("return");
|
|
929
971
|
case 2:
|
|
930
972
|
(_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
|
|
931
973
|
(_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
|
|
932
974
|
this.stopMicrophoneTest();
|
|
933
975
|
if (!microphoneId) {
|
|
934
|
-
|
|
976
|
+
_context3.next = 16;
|
|
935
977
|
break;
|
|
936
978
|
}
|
|
937
979
|
microphoneDeviceId = microphoneId;
|
|
938
980
|
if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
|
|
939
|
-
|
|
981
|
+
_context3.next = 12;
|
|
940
982
|
break;
|
|
941
983
|
}
|
|
942
|
-
|
|
984
|
+
_context3.next = 10;
|
|
943
985
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
944
986
|
case 10:
|
|
945
|
-
defaultDevice =
|
|
987
|
+
defaultDevice = _context3.sent;
|
|
946
988
|
microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
|
|
947
989
|
case 12:
|
|
948
990
|
if (microphoneDeviceId) {
|
|
@@ -954,10 +996,10 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
954
996
|
this._microphoneAudioTrack = microphoneTrack;
|
|
955
997
|
}
|
|
956
998
|
(0, _mobx.runInAction)(function () {
|
|
957
|
-
|
|
958
|
-
|
|
999
|
+
_this6._microphoneDeviceId = microphoneDeviceId;
|
|
1000
|
+
_this6.microphoneId = microphoneId;
|
|
959
1001
|
});
|
|
960
|
-
|
|
1002
|
+
_context3.next = 18;
|
|
961
1003
|
break;
|
|
962
1004
|
case 16:
|
|
963
1005
|
this._microphoneDeviceId = microphoneId;
|
|
@@ -966,9 +1008,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
966
1008
|
this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
|
|
967
1009
|
case 19:
|
|
968
1010
|
case "end":
|
|
969
|
-
return
|
|
1011
|
+
return _context3.stop();
|
|
970
1012
|
}
|
|
971
|
-
},
|
|
1013
|
+
}, _callee3, this);
|
|
972
1014
|
}));
|
|
973
1015
|
function setMicrophoneId(_x2) {
|
|
974
1016
|
return _setMicrophoneId.apply(this, arguments);
|
|
@@ -1025,7 +1067,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1025
1067
|
}, {
|
|
1026
1068
|
key: "handleCameraChanged",
|
|
1027
1069
|
value: function handleCameraChanged(enabled) {
|
|
1028
|
-
var
|
|
1070
|
+
var _this7 = this;
|
|
1029
1071
|
var localVideoViewSet = this._localVideoViewSet;
|
|
1030
1072
|
var cameraTrack = this._cameraVideoTrack;
|
|
1031
1073
|
if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
|
|
@@ -1037,7 +1079,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1037
1079
|
localVideoViewSet.forEach(function (view) {
|
|
1038
1080
|
cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
|
|
1039
1081
|
renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
|
|
1040
|
-
isMirror:
|
|
1082
|
+
isMirror: _this7.currentIsMirror
|
|
1041
1083
|
}, view);
|
|
1042
1084
|
});
|
|
1043
1085
|
}
|
|
@@ -1045,65 +1087,65 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1045
1087
|
}, {
|
|
1046
1088
|
key: "downloadUiResources",
|
|
1047
1089
|
value: function () {
|
|
1048
|
-
var _downloadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1090
|
+
var _downloadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(uiResource) {
|
|
1049
1091
|
var _uiResource$virtualBa,
|
|
1050
|
-
|
|
1092
|
+
_this8 = this,
|
|
1051
1093
|
_uiResource$virtualBa2,
|
|
1052
1094
|
_uiResource$soundEffe;
|
|
1053
|
-
return _regenerator["default"].wrap(function
|
|
1054
|
-
while (1) switch (
|
|
1095
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
1096
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1055
1097
|
case 0:
|
|
1056
1098
|
Promise.all([// images
|
|
1057
1099
|
uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.map(function (url) {
|
|
1058
1100
|
if ((0, _tools.isPngOrJpg)(url) && !(0, _env.isElectron)()) {
|
|
1059
1101
|
(0, _mobx.runInAction)(function () {
|
|
1060
|
-
|
|
1102
|
+
_this8.virtualBackgroundList.push({
|
|
1061
1103
|
url: url,
|
|
1062
1104
|
name: (0, _tools.getFileNameWithoutExtension)(url),
|
|
1063
1105
|
path: url,
|
|
1064
1106
|
type: _virtualBackdoundResources.VirtualOption.IMG
|
|
1065
1107
|
});
|
|
1066
|
-
|
|
1108
|
+
_this8._updateVirtualBackgroundList(_this8.virtualBackgroundList);
|
|
1067
1109
|
});
|
|
1068
1110
|
} else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
|
|
1069
|
-
return
|
|
1111
|
+
return _this8._fetchZipAndUnzip(url, 'image');
|
|
1070
1112
|
}
|
|
1071
1113
|
return Promise.resolve();
|
|
1072
1114
|
}), // videos
|
|
1073
1115
|
uiResource === null || uiResource === void 0 || (_uiResource$virtualBa2 = uiResource.virtualBackgroundVideos) === null || _uiResource$virtualBa2 === void 0 ? void 0 : _uiResource$virtualBa2.map(function (url) {
|
|
1074
1116
|
if ((0, _tools.isMp4)(url) && !(0, _env.isElectron)()) {
|
|
1075
1117
|
(0, _mobx.runInAction)(function () {
|
|
1076
|
-
|
|
1118
|
+
_this8.virtualBackgroundList.push({
|
|
1077
1119
|
url: url,
|
|
1078
1120
|
name: (0, _tools.getFileNameWithoutExtension)(url),
|
|
1079
1121
|
path: url,
|
|
1080
1122
|
type: _virtualBackdoundResources.VirtualOption.VIDEO
|
|
1081
1123
|
});
|
|
1082
|
-
|
|
1124
|
+
_this8._updateVirtualBackgroundList(_this8.virtualBackgroundList);
|
|
1083
1125
|
});
|
|
1084
1126
|
} else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
|
|
1085
|
-
return
|
|
1127
|
+
return _this8._fetchZipAndUnzip(url, 'video');
|
|
1086
1128
|
}
|
|
1087
1129
|
return Promise.resolve();
|
|
1088
1130
|
}), // sound effect audios
|
|
1089
1131
|
uiResource === null || uiResource === void 0 || (_uiResource$soundEffe = uiResource.soundEffectAudios) === null || _uiResource$soundEffe === void 0 ? void 0 : _uiResource$soundEffe.map(function (url) {
|
|
1090
1132
|
if ((0, _tools.isMp3OrWav)(url) && !(0, _env.isElectron)()) {
|
|
1091
1133
|
(0, _mobx.runInAction)(function () {
|
|
1092
|
-
|
|
1134
|
+
_this8.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(url), {
|
|
1093
1135
|
url: url,
|
|
1094
1136
|
md5Url: (0, _jsMd.md5)(url)
|
|
1095
1137
|
});
|
|
1096
1138
|
});
|
|
1097
1139
|
} else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
|
|
1098
|
-
return
|
|
1140
|
+
return _this8._fetchZipAndUnzip(url, 'audio');
|
|
1099
1141
|
}
|
|
1100
1142
|
return Promise.resolve();
|
|
1101
1143
|
})]);
|
|
1102
1144
|
case 1:
|
|
1103
1145
|
case "end":
|
|
1104
|
-
return
|
|
1146
|
+
return _context4.stop();
|
|
1105
1147
|
}
|
|
1106
|
-
},
|
|
1148
|
+
}, _callee4);
|
|
1107
1149
|
}));
|
|
1108
1150
|
function downloadUiResources(_x3) {
|
|
1109
1151
|
return _downloadUiResources.apply(this, arguments);
|
|
@@ -1113,13 +1155,13 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1113
1155
|
}, {
|
|
1114
1156
|
key: "release",
|
|
1115
1157
|
value: function release() {
|
|
1116
|
-
var
|
|
1158
|
+
var _this9 = this,
|
|
1117
1159
|
_this$_cameraVideoTra3,
|
|
1118
1160
|
_this$_microphoneAudi8;
|
|
1119
1161
|
if (this._localVideoViewSet.size > 0) {
|
|
1120
1162
|
this._localVideoViewSet.forEach(function (view) {
|
|
1121
|
-
var
|
|
1122
|
-
(
|
|
1163
|
+
var _this9$_cameraVideoTr;
|
|
1164
|
+
(_this9$_cameraVideoTr = _this9._cameraVideoTrack) === null || _this9$_cameraVideoTr === void 0 || _this9$_cameraVideoTr.stopPreview(view);
|
|
1123
1165
|
});
|
|
1124
1166
|
this._localVideoViewSet.clear();
|
|
1125
1167
|
}
|
|
@@ -1131,27 +1173,27 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1131
1173
|
}, {
|
|
1132
1174
|
key: "joinAudioByComputer",
|
|
1133
1175
|
value: function () {
|
|
1134
|
-
var _joinAudioByComputer = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1176
|
+
var _joinAudioByComputer = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
1135
1177
|
var list;
|
|
1136
|
-
return _regenerator["default"].wrap(function
|
|
1137
|
-
while (1) switch (
|
|
1178
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
1179
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1138
1180
|
case 0:
|
|
1139
1181
|
list = this.microphoneList;
|
|
1140
1182
|
if (!(list.length > 0)) {
|
|
1141
|
-
|
|
1183
|
+
_context5.next = 7;
|
|
1142
1184
|
break;
|
|
1143
1185
|
}
|
|
1144
|
-
|
|
1186
|
+
_context5.next = 4;
|
|
1145
1187
|
return this.setMicrophoneId('default');
|
|
1146
1188
|
case 4:
|
|
1147
1189
|
this._uiEventStore.showToast({
|
|
1148
1190
|
type: 'normal',
|
|
1149
1191
|
message: (0, _i18n.transI18n)('fmt_gateway_tips_nodata')
|
|
1150
1192
|
});
|
|
1151
|
-
|
|
1193
|
+
_context5.next = 10;
|
|
1152
1194
|
break;
|
|
1153
1195
|
case 7:
|
|
1154
|
-
|
|
1196
|
+
_context5.next = 9;
|
|
1155
1197
|
return this.setMicrophoneId('NO_DEVICE');
|
|
1156
1198
|
case 9:
|
|
1157
1199
|
this._uiEventStore.showToast({
|
|
@@ -1163,9 +1205,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1163
1205
|
this._uiEventStore.sendEvent(_constant.UIAction.CONNECT_AUDIO);
|
|
1164
1206
|
case 12:
|
|
1165
1207
|
case "end":
|
|
1166
|
-
return
|
|
1208
|
+
return _context5.stop();
|
|
1167
1209
|
}
|
|
1168
|
-
},
|
|
1210
|
+
}, _callee5, this);
|
|
1169
1211
|
}));
|
|
1170
1212
|
function joinAudioByComputer() {
|
|
1171
1213
|
return _joinAudioByComputer.apply(this, arguments);
|
|
@@ -1182,15 +1224,15 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1182
1224
|
}, {
|
|
1183
1225
|
key: "_fileToUiData",
|
|
1184
1226
|
value: function () {
|
|
1185
|
-
var _fileToUiData2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1186
|
-
return _regenerator["default"].wrap(function
|
|
1187
|
-
while (1) switch (
|
|
1227
|
+
var _fileToUiData2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resource, type) {
|
|
1228
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
1229
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1188
1230
|
case 0:
|
|
1189
1231
|
if (!(typeof resource !== 'string')) {
|
|
1190
|
-
|
|
1232
|
+
_context6.next = 2;
|
|
1191
1233
|
break;
|
|
1192
1234
|
}
|
|
1193
|
-
return
|
|
1235
|
+
return _context6.abrupt("return");
|
|
1194
1236
|
case 2:
|
|
1195
1237
|
if (type === 'image' && (0, _tools.isPngOrJpg)(resource) || type === 'video' && (0, _tools.isMp4)(resource)) {
|
|
1196
1238
|
this._updateVirtualBackgroundList([].concat((0, _toConsumableArray2["default"])(this.virtualBackgroundList), [{
|
|
@@ -1208,41 +1250,15 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1208
1250
|
}
|
|
1209
1251
|
case 4:
|
|
1210
1252
|
case "end":
|
|
1211
|
-
return
|
|
1253
|
+
return _context6.stop();
|
|
1212
1254
|
}
|
|
1213
|
-
},
|
|
1255
|
+
}, _callee6, this);
|
|
1214
1256
|
}));
|
|
1215
1257
|
function _fileToUiData(_x4, _x5) {
|
|
1216
1258
|
return _fileToUiData2.apply(this, arguments);
|
|
1217
1259
|
}
|
|
1218
1260
|
return _fileToUiData;
|
|
1219
1261
|
}()
|
|
1220
|
-
}, {
|
|
1221
|
-
key: "openFirstCamera",
|
|
1222
|
-
value: function openFirstCamera() {
|
|
1223
|
-
var _this9 = this;
|
|
1224
|
-
this.mediaControl.getCameraList().then(function (cameraList) {
|
|
1225
|
-
_this9.logger.info("[DeviceStore] get camera list: ".concat(JSON.stringify(cameraList)));
|
|
1226
|
-
if (cameraList.length) {
|
|
1227
|
-
_this9.logger.info("[DeviceStore] select first camera: ".concat(cameraList[0].deviceId));
|
|
1228
|
-
_this9.setCameraId(cameraList[0].deviceId);
|
|
1229
|
-
_this9.setCameraEnabled(true);
|
|
1230
|
-
}
|
|
1231
|
-
});
|
|
1232
|
-
}
|
|
1233
|
-
}, {
|
|
1234
|
-
key: "openFirstMicrophone",
|
|
1235
|
-
value: function openFirstMicrophone() {
|
|
1236
|
-
var _this10 = this;
|
|
1237
|
-
this.mediaControl.getMicrophoneList().then(function (microphoneList) {
|
|
1238
|
-
_this10.logger.info("[DeviceStore] get microphone list: ".concat(JSON.stringify(microphoneList)));
|
|
1239
|
-
if (microphoneList.length) {
|
|
1240
|
-
_this10.logger.info("[DeviceStore] select first microphone: ".concat(microphoneList[0].deviceId));
|
|
1241
|
-
_this10.setMicrophoneId(microphoneList[0].deviceId);
|
|
1242
|
-
_this10.setMicrophoneEnabled(true);
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
1262
|
}, {
|
|
1247
1263
|
key: "setConnectType",
|
|
1248
1264
|
value: function setConnectType(connectType) {
|
|
@@ -1251,32 +1267,32 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1251
1267
|
}, {
|
|
1252
1268
|
key: "_fetchZipAndUnzip",
|
|
1253
1269
|
value: function () {
|
|
1254
|
-
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1255
|
-
var
|
|
1270
|
+
var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(url, type) {
|
|
1271
|
+
var _this10 = this;
|
|
1256
1272
|
var md5Url, resource;
|
|
1257
|
-
return _regenerator["default"].wrap(function
|
|
1258
|
-
while (1) switch (
|
|
1273
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
1274
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
1259
1275
|
case 0:
|
|
1260
1276
|
if ((0, _tools.isResourceZipUrl)(url)) {
|
|
1261
|
-
|
|
1277
|
+
_context7.next = 2;
|
|
1262
1278
|
break;
|
|
1263
1279
|
}
|
|
1264
|
-
return
|
|
1280
|
+
return _context7.abrupt("return", []);
|
|
1265
1281
|
case 2:
|
|
1266
1282
|
md5Url = (0, _jsMd.md5)(url);
|
|
1267
|
-
|
|
1283
|
+
_context7.next = 5;
|
|
1268
1284
|
return window.runtime.getResourceByFileType(url, md5Url, type);
|
|
1269
1285
|
case 5:
|
|
1270
|
-
resource =
|
|
1286
|
+
resource = _context7.sent;
|
|
1271
1287
|
resource.forEach(function (item) {
|
|
1272
|
-
|
|
1288
|
+
_this10._fileToUiData(item, type);
|
|
1273
1289
|
});
|
|
1274
|
-
return
|
|
1290
|
+
return _context7.abrupt("return", []);
|
|
1275
1291
|
case 8:
|
|
1276
1292
|
case "end":
|
|
1277
|
-
return
|
|
1293
|
+
return _context7.stop();
|
|
1278
1294
|
}
|
|
1279
|
-
},
|
|
1295
|
+
}, _callee7);
|
|
1280
1296
|
}));
|
|
1281
1297
|
function _fetchZipAndUnzip(_x6, _x7) {
|
|
1282
1298
|
return _fetchZipAndUnzip2.apply(this, arguments);
|
|
@@ -1321,21 +1337,21 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1321
1337
|
}, {
|
|
1322
1338
|
key: "_handleCameraListUpdated",
|
|
1323
1339
|
value: function () {
|
|
1324
|
-
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1325
|
-
var
|
|
1340
|
+
var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
1341
|
+
var _this11 = this;
|
|
1326
1342
|
var currentDeviceExist, cameraEnabled, deviceId, _deviceId;
|
|
1327
|
-
return _regenerator["default"].wrap(function
|
|
1328
|
-
while (1) switch (
|
|
1343
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
1344
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1329
1345
|
case 0:
|
|
1330
|
-
|
|
1346
|
+
_context8.next = 2;
|
|
1331
1347
|
return this._mediaControl.getCameraList();
|
|
1332
1348
|
case 2:
|
|
1333
|
-
this.cameraList =
|
|
1349
|
+
this.cameraList = _context8.sent;
|
|
1334
1350
|
currentDeviceExist = false;
|
|
1335
1351
|
if (this.cameraId) {
|
|
1336
1352
|
currentDeviceExist = this.cameraList.some(function (_ref2) {
|
|
1337
1353
|
var deviceId = _ref2.deviceId;
|
|
1338
|
-
return
|
|
1354
|
+
return _this11.cameraId === deviceId;
|
|
1339
1355
|
});
|
|
1340
1356
|
cameraEnabled = this.cameraEnabled;
|
|
1341
1357
|
if (!currentDeviceExist) {
|
|
@@ -1362,9 +1378,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1362
1378
|
this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
|
|
1363
1379
|
case 7:
|
|
1364
1380
|
case "end":
|
|
1365
|
-
return
|
|
1381
|
+
return _context8.stop();
|
|
1366
1382
|
}
|
|
1367
|
-
},
|
|
1383
|
+
}, _callee8, this);
|
|
1368
1384
|
}));
|
|
1369
1385
|
function _handleCameraListUpdated() {
|
|
1370
1386
|
return _handleCameraListUpdated2.apply(this, arguments);
|
|
@@ -1374,29 +1390,29 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1374
1390
|
}, {
|
|
1375
1391
|
key: "_handleMicrophoneListUpdated",
|
|
1376
1392
|
value: function () {
|
|
1377
|
-
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1378
|
-
var
|
|
1393
|
+
var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
1394
|
+
var _this12 = this;
|
|
1379
1395
|
var microphoneList, defaultDevice, currentDeviceExist, hasNewDeviceJoin, id;
|
|
1380
|
-
return _regenerator["default"].wrap(function
|
|
1381
|
-
while (1) switch (
|
|
1396
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
1397
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
1382
1398
|
case 0:
|
|
1383
|
-
|
|
1399
|
+
_context9.next = 2;
|
|
1384
1400
|
return this._mediaControl.getMicrophoneList();
|
|
1385
1401
|
case 2:
|
|
1386
|
-
microphoneList =
|
|
1387
|
-
|
|
1402
|
+
microphoneList = _context9.sent;
|
|
1403
|
+
_context9.next = 5;
|
|
1388
1404
|
return this._mediaControl.getSystemSelectedMicrophone();
|
|
1389
1405
|
case 5:
|
|
1390
|
-
defaultDevice =
|
|
1406
|
+
defaultDevice = _context9.sent;
|
|
1391
1407
|
(0, _mobx.runInAction)(function () {
|
|
1392
|
-
|
|
1408
|
+
_this12.microphoneList = microphoneList.filter(function (item) {
|
|
1393
1409
|
return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
|
|
1394
1410
|
});
|
|
1395
|
-
var defaultIdDevice =
|
|
1411
|
+
var defaultIdDevice = _this12.microphoneList.find(function (item) {
|
|
1396
1412
|
return item.deviceId === DEFAULT_DEVICE_ID;
|
|
1397
1413
|
});
|
|
1398
1414
|
if (!defaultIdDevice && defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceName) {
|
|
1399
|
-
|
|
1415
|
+
_this12.microphoneList.unshift({
|
|
1400
1416
|
deviceId: DEFAULT_DEVICE_ID,
|
|
1401
1417
|
deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1402
1418
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
@@ -1415,7 +1431,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1415
1431
|
}
|
|
1416
1432
|
}
|
|
1417
1433
|
currentDeviceExist = this.microphoneList.find(function (item) {
|
|
1418
|
-
return item.deviceId ===
|
|
1434
|
+
return item.deviceId === _this12._microphoneDeviceId;
|
|
1419
1435
|
});
|
|
1420
1436
|
if (!currentDeviceExist) {
|
|
1421
1437
|
this.logger.info('[FcrDeviceStore] current microphone is unplugged, switch to follow system');
|
|
@@ -1430,9 +1446,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1430
1446
|
this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
|
|
1431
1447
|
case 13:
|
|
1432
1448
|
case "end":
|
|
1433
|
-
return
|
|
1449
|
+
return _context9.stop();
|
|
1434
1450
|
}
|
|
1435
|
-
},
|
|
1451
|
+
}, _callee9, this);
|
|
1436
1452
|
}));
|
|
1437
1453
|
function _handleMicrophoneListUpdated() {
|
|
1438
1454
|
return _handleMicrophoneListUpdated2.apply(this, arguments);
|
|
@@ -1442,29 +1458,29 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1442
1458
|
}, {
|
|
1443
1459
|
key: "_handleSpeakerListUpdated",
|
|
1444
1460
|
value: function () {
|
|
1445
|
-
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1446
|
-
var
|
|
1461
|
+
var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1462
|
+
var _this13 = this;
|
|
1447
1463
|
var speakerList, defaultDevice, currentDeviceExist, hasNewDeviceJoin, id;
|
|
1448
|
-
return _regenerator["default"].wrap(function
|
|
1449
|
-
while (1) switch (
|
|
1464
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1465
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1450
1466
|
case 0:
|
|
1451
|
-
|
|
1467
|
+
_context10.next = 2;
|
|
1452
1468
|
return this._mediaControl.getSpeakerList();
|
|
1453
1469
|
case 2:
|
|
1454
|
-
speakerList =
|
|
1455
|
-
|
|
1470
|
+
speakerList = _context10.sent;
|
|
1471
|
+
_context10.next = 5;
|
|
1456
1472
|
return this._mediaControl.getSystemSelectedSpeaker();
|
|
1457
1473
|
case 5:
|
|
1458
|
-
defaultDevice =
|
|
1474
|
+
defaultDevice = _context10.sent;
|
|
1459
1475
|
(0, _mobx.runInAction)(function () {
|
|
1460
|
-
|
|
1476
|
+
_this13.speakerList = speakerList.filter(function (item) {
|
|
1461
1477
|
return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
|
|
1462
1478
|
});
|
|
1463
|
-
var defaultIdDevice =
|
|
1479
|
+
var defaultIdDevice = _this13.speakerList.find(function (item) {
|
|
1464
1480
|
return item.deviceId === DEFAULT_DEVICE_ID;
|
|
1465
1481
|
});
|
|
1466
1482
|
if (!defaultIdDevice) {
|
|
1467
|
-
|
|
1483
|
+
_this13.speakerList.unshift({
|
|
1468
1484
|
deviceId: DEFAULT_DEVICE_ID,
|
|
1469
1485
|
deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
|
|
1470
1486
|
reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
|
|
@@ -1482,7 +1498,7 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1482
1498
|
}
|
|
1483
1499
|
}
|
|
1484
1500
|
currentDeviceExist = this.speakerList.find(function (item) {
|
|
1485
|
-
return item.deviceId ===
|
|
1501
|
+
return item.deviceId === _this13._speakerDeviceId;
|
|
1486
1502
|
});
|
|
1487
1503
|
if (!currentDeviceExist) {
|
|
1488
1504
|
this.logger.info('[FcrDeviceStore] current speaker is unplugged, switch to follow system');
|
|
@@ -1497,9 +1513,9 @@ var FcrDeviceStore = exports.FcrDeviceStore = /*#__PURE__*/function () {
|
|
|
1497
1513
|
this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
|
|
1498
1514
|
case 13:
|
|
1499
1515
|
case "end":
|
|
1500
|
-
return
|
|
1516
|
+
return _context10.stop();
|
|
1501
1517
|
}
|
|
1502
|
-
},
|
|
1518
|
+
}, _callee10, this);
|
|
1503
1519
|
}));
|
|
1504
1520
|
function _handleSpeakerListUpdated() {
|
|
1505
1521
|
return _handleSpeakerListUpdated2.apply(this, arguments);
|