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
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.array.filter.js");
|
|
5
|
+
require("core-js/modules/es.array.for-each.js");
|
|
6
|
+
require("core-js/modules/es.array.push.js");
|
|
7
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
8
|
+
require("core-js/modules/es.object.define-property.js");
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
+
require("core-js/modules/es.object.keys.js");
|
|
12
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
18
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
19
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
20
|
+
Object.defineProperty(exports, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
exports.FcrUIEventProviderImpl = void 0;
|
|
24
|
+
require("core-js/modules/es.array.concat.js");
|
|
25
|
+
require("core-js/modules/es.date.now.js");
|
|
26
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
27
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
28
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
30
|
+
var _constant = require("../utilities/constant");
|
|
31
|
+
var _logger = require("agora-foundation/lib/logger");
|
|
32
|
+
var _chat = require("../modules/chat");
|
|
33
|
+
var _base = require("../base");
|
|
34
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
|
+
var FcrUIEventProviderImpl = exports.FcrUIEventProviderImpl = /*#__PURE__*/function () {
|
|
37
|
+
function FcrUIEventProviderImpl() {
|
|
38
|
+
(0, _classCallCheck2["default"])(this, FcrUIEventProviderImpl);
|
|
39
|
+
(0, _defineProperty2["default"])(this, "logger", (0, _logger.getLogger)());
|
|
40
|
+
(0, _defineProperty2["default"])(this, "_observable", new _observable.AgoraObservable());
|
|
41
|
+
}
|
|
42
|
+
return (0, _createClass2["default"])(FcrUIEventProviderImpl, [{
|
|
43
|
+
key: "sendEvent",
|
|
44
|
+
value: function sendEvent(action, payload) {
|
|
45
|
+
var start = Date.now();
|
|
46
|
+
try {
|
|
47
|
+
this._observable.notifyObservers('onEvent', action, payload);
|
|
48
|
+
} finally {
|
|
49
|
+
var end = Date.now();
|
|
50
|
+
var time = end - start;
|
|
51
|
+
if (time >= 10) {
|
|
52
|
+
this.logger.warn("[FcrUIEventStore] sendEvent ".concat(_constant.FcrUIAction[action], ", payload: ").concat(payload, ", handlers took: ").concat(end - start, "ms"));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "showToast",
|
|
58
|
+
value: function showToast(params) {
|
|
59
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_DIALOG, {
|
|
60
|
+
dialogKey: _constant.FcrUIDialogKey.SHOW_TOAST,
|
|
61
|
+
dialogId: "".concat(_constant.FcrUIDialogKey.SHOW_TOAST, "_").concat(Date.now()),
|
|
62
|
+
params: params
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "showNotification",
|
|
67
|
+
value: function showNotification(params) {
|
|
68
|
+
this.sendEvent(_constant.FcrUIAction.SHOW_NOTIFICATION, params);
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "closeNotification",
|
|
72
|
+
value: function closeNotification(key) {
|
|
73
|
+
this.sendEvent(_constant.FcrUIAction.COLSE_NOTIFICATION, key);
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "showChatToast",
|
|
77
|
+
value: function showChatToast(params) {
|
|
78
|
+
this.sendEvent(_constant.FcrUIAction.SHOW_TOAST, _objectSpread(_objectSpread({}, params), {}, {
|
|
79
|
+
customRootClass: _chat.CHAT_WRAPPER_CLASS
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 默认同一个 title 或 content 的 confirm 窗口只打开一个实例
|
|
85
|
+
* @param key 可以通过 key 区分相同 title 或 content 的 confirm 窗口
|
|
86
|
+
* @param duration 可以通过 duration 配置自动关闭时间
|
|
87
|
+
* @mulitple 可以通过 mulitple 配置打开多个实例(忽略 key)
|
|
88
|
+
* */
|
|
89
|
+
}, {
|
|
90
|
+
key: "openConfirmDialog",
|
|
91
|
+
value: function openConfirmDialog(params, mulitple) {
|
|
92
|
+
var dialogKey = _constant.FcrUIDialogKey.CONFIRM;
|
|
93
|
+
var dialogId = mulitple ? "".concat(dialogKey, "_").concat(Date.now()) : "".concat(dialogKey, "_").concat(params.key || params.title || params.content);
|
|
94
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_DIALOG, {
|
|
95
|
+
dialogKey: dialogKey,
|
|
96
|
+
dialogId: dialogId,
|
|
97
|
+
params: params
|
|
98
|
+
});
|
|
99
|
+
return dialogId;
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "openDialog",
|
|
103
|
+
value: function openDialog(dialogKey, instanceId, params) {
|
|
104
|
+
var dialogId = "".concat(dialogKey, "_").concat(instanceId || dialogKey);
|
|
105
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_DIALOG, {
|
|
106
|
+
dialogKey: dialogKey,
|
|
107
|
+
dialogId: dialogId,
|
|
108
|
+
params: params
|
|
109
|
+
});
|
|
110
|
+
return dialogId;
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "closeDialog",
|
|
114
|
+
value: function closeDialog(dialogId) {
|
|
115
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_DIALOG, {
|
|
116
|
+
dialogId: dialogId
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "closeConfirm",
|
|
121
|
+
value: function closeConfirm(dialogId) {
|
|
122
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_DIALOG, {
|
|
123
|
+
dialogId: dialogId,
|
|
124
|
+
dialogKey: _constant.FcrUIDialogKey.CONFIRM
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "startShareScreen",
|
|
129
|
+
value: function startShareScreen() {
|
|
130
|
+
this.sendEvent(_constant.FcrUIAction.START_SHARE_SCREEN);
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "stopShareScreen",
|
|
134
|
+
value: function stopShareScreen() {
|
|
135
|
+
this.sendEvent(_constant.FcrUIAction.STOP_SHARE_SCREEN);
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
key: "updateAside",
|
|
139
|
+
value: function updateAside(params) {
|
|
140
|
+
this.sendEvent(_constant.FcrUIAction.UPDATE_ASIDE, params);
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
key: "receiveNewChatMessages",
|
|
144
|
+
value: function receiveNewChatMessages(params) {
|
|
145
|
+
this.sendEvent(_constant.FcrUIAction.RECEIVE_NEW_CHAT_MESSAGES, params);
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
key: "toggleLayout",
|
|
149
|
+
value: function toggleLayout(params) {
|
|
150
|
+
this.sendEvent(_constant.FcrUIAction.TOGGLE_LAYOUT, params);
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
key: "notifyLayoutChanged",
|
|
154
|
+
value: function notifyLayoutChanged(params) {
|
|
155
|
+
this.sendEvent(_constant.FcrUIAction.LAYOUT_CHANGED, params);
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "toggleLayoutSize",
|
|
159
|
+
value: function toggleLayoutSize(params) {
|
|
160
|
+
this.sendEvent(_constant.FcrUIAction.TOGGLE_LAYOUT_SIZE, params);
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "notifyLayoutSizeChanged",
|
|
164
|
+
value: function notifyLayoutSizeChanged(params) {
|
|
165
|
+
this.sendEvent(_constant.FcrUIAction.LAYOUT_SIZE_CHANGED, params);
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "setMainSpeaker",
|
|
169
|
+
value: function setMainSpeaker(params) {
|
|
170
|
+
this.sendEvent(_constant.FcrUIAction.SET_MAIN_SPEAKER, params);
|
|
171
|
+
}
|
|
172
|
+
}, {
|
|
173
|
+
key: "setUserPinState",
|
|
174
|
+
value: function setUserPinState(userId) {
|
|
175
|
+
this.sendEvent(_constant.FcrUIAction.SET_USER_PIN_STATE, {
|
|
176
|
+
userId: userId
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "updateShareState",
|
|
181
|
+
value: function updateShareState(isOpen) {
|
|
182
|
+
this.sendEvent(_constant.FcrUIAction.UPDATE_SHARE_STATE, {
|
|
183
|
+
isOpen: isOpen
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}, {
|
|
187
|
+
key: "openDeviceSettingDialog",
|
|
188
|
+
value: function openDeviceSettingDialog() {
|
|
189
|
+
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
190
|
+
var dialogId = this.openDialog(_constant.FcrUIDialogKey.DEVICE_SETTINGS);
|
|
191
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_DEVICE_SETTING_DIALOG, _objectSpread({
|
|
192
|
+
dialogId: dialogId
|
|
193
|
+
}, config));
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
key: "closeDeviceSettingDialog",
|
|
197
|
+
value: function closeDeviceSettingDialog() {
|
|
198
|
+
this.closeDialog(_constant.FcrUIDialogKey.DEVICE_SETTINGS);
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
key: "openLiveStreamingDialog",
|
|
202
|
+
value: function openLiveStreamingDialog() {
|
|
203
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_LIVE_STEAMING_DIALOG);
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "closeLiveStreamingDialog",
|
|
207
|
+
value: function closeLiveStreamingDialog() {
|
|
208
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_LIVE_STEAMING_DIALOG);
|
|
209
|
+
}
|
|
210
|
+
}, {
|
|
211
|
+
key: "stopLiveStreaming",
|
|
212
|
+
value: function stopLiveStreaming() {
|
|
213
|
+
this.sendEvent(_constant.FcrUIAction.STOP_LIVE_STREAMING);
|
|
214
|
+
}
|
|
215
|
+
}, {
|
|
216
|
+
key: "openInviteDialog",
|
|
217
|
+
value: function openInviteDialog() {
|
|
218
|
+
this.sendEvent(_constant.FcrUIAction.OPEN_INVITE_DIALOG);
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "closeInviteDialog",
|
|
222
|
+
value: function closeInviteDialog() {
|
|
223
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_INVITE_DIALOG);
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
key: "closeWaitingRoomDialog",
|
|
227
|
+
value: function closeWaitingRoomDialog() {
|
|
228
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_WAITING_ROOM_DIALOG);
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
key: "closeRemoveAdmitWaitingRoomDialog",
|
|
232
|
+
value: function closeRemoveAdmitWaitingRoomDialog(dialogKey) {
|
|
233
|
+
this.sendEvent(_constant.FcrUIAction.CLOSE_REMOVE_ADMIT_WAITING_ROOM_DIALOG, dialogKey);
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
key: "exitRoom",
|
|
237
|
+
value: function exitRoom(reason, roomType) {
|
|
238
|
+
this.sendEvent(_constant.FcrUIAction.EXIT_ROOM, {
|
|
239
|
+
reason: reason,
|
|
240
|
+
roomType: roomType
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}, {
|
|
244
|
+
key: "cloudRecording",
|
|
245
|
+
value: function cloudRecording(action) {
|
|
246
|
+
this.sendEvent(_constant.FcrUIAction.CLOUD_RECORDING, {
|
|
247
|
+
action: action
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "notifySpotlightStreamChanged",
|
|
252
|
+
value: function notifySpotlightStreamChanged(params) {
|
|
253
|
+
this.sendEvent(_constant.FcrUIAction.SPOTLIGHT_STREAM_CHANGED, params);
|
|
254
|
+
}
|
|
255
|
+
}, {
|
|
256
|
+
key: "notifyCustomSettingsChanged",
|
|
257
|
+
value: function notifyCustomSettingsChanged(settings) {
|
|
258
|
+
this.sendEvent(_constant.FcrUIAction.CUSTOM_SETTINGS_CHANGED, settings);
|
|
259
|
+
}
|
|
260
|
+
}, {
|
|
261
|
+
key: "addObserver",
|
|
262
|
+
value: function addObserver(observer) {
|
|
263
|
+
this._observable.addObserver(observer);
|
|
264
|
+
}
|
|
265
|
+
}, {
|
|
266
|
+
key: "removeObserver",
|
|
267
|
+
value: function removeObserver(observer) {
|
|
268
|
+
this._observable.removeObserver(observer);
|
|
269
|
+
}
|
|
270
|
+
}, {
|
|
271
|
+
key: "notifyChatUpdateTarget",
|
|
272
|
+
value: function notifyChatUpdateTarget(user, roomType) {
|
|
273
|
+
this.sendEvent(_constant.FcrUIAction.CHAT_UPDATE_TARGET, {
|
|
274
|
+
user: user,
|
|
275
|
+
roomType: roomType
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
key: "notifyChatResetTarget",
|
|
280
|
+
value: function notifyChatResetTarget() {
|
|
281
|
+
this.sendEvent(_constant.FcrUIAction.CHAT_RESET_TARGET);
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
key: "release",
|
|
285
|
+
value: function release() {}
|
|
286
|
+
}]);
|
|
287
|
+
}();
|
|
288
|
+
(0, _base.registerDependency)('eventProvider');
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FcrUIJoinInterpreterRoom, FcrUILeaveInterpreterRoom } from '../type';
|
|
2
|
+
import { FcrInterpreterRoomControl } from 'fcr-core/lib/room-control/interpreter-control/types';
|
|
3
|
+
export type FcrUIInterpreterRoomObserver = {
|
|
4
|
+
onJoinInterpretingRoom?: (param: FcrUIJoinInterpreterRoom) => void;
|
|
5
|
+
onJoinInterpretingRoomSuccess?: (param: FcrUIJoinInterpreterRoom) => void;
|
|
6
|
+
onJoinInterpretingRoomFailed?: (param: FcrUIJoinInterpreterRoom) => void;
|
|
7
|
+
onLeaveInterpretingRoom?: (param: FcrUILeaveInterpreterRoom) => void;
|
|
8
|
+
onLeaveInterpretingRoomFailed?: (param: FcrUILeaveInterpreterRoom) => void;
|
|
9
|
+
onLeaveInterpretingRoomSuccess?: (param: FcrUILeaveInterpreterRoom) => void;
|
|
10
|
+
};
|
|
11
|
+
export interface FcrUIInterpreterProvider {
|
|
12
|
+
joinInterpreterRoom(param: FcrUIJoinInterpreterRoom): Promise<void>;
|
|
13
|
+
leaveInterpreterRoom(param: FcrUILeaveInterpreterRoom): Promise<void>;
|
|
14
|
+
updateInterpreterRoomStreams(roomControl: FcrInterpreterRoomControl | null, open: boolean): void;
|
|
15
|
+
addObserver(observer: FcrUIInterpreterRoomObserver): void;
|
|
16
|
+
removeObserver(observer: FcrUIInterpreterRoomObserver): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class FcrUIInterpreterProviderImpl implements FcrUIInterpreterProvider {
|
|
19
|
+
private _observable;
|
|
20
|
+
joinInterpreterRoom(param: FcrUIJoinInterpreterRoom): Promise<void>;
|
|
21
|
+
leaveInterpreterRoom(param: FcrUILeaveInterpreterRoom): Promise<void>;
|
|
22
|
+
updateInterpreterRoomStreams(roomControl: FcrInterpreterRoomControl | null, open: boolean): Promise<void>;
|
|
23
|
+
addObserver(observer: FcrUIInterpreterRoomObserver): void;
|
|
24
|
+
removeObserver(observer: FcrUIInterpreterRoomObserver): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.FcrUIInterpreterProviderImpl = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
require("core-js/modules/es.array.join.js");
|
|
11
|
+
require("core-js/modules/es.array.map.js");
|
|
12
|
+
require("core-js/modules/es.object.keys.js");
|
|
13
|
+
require("core-js/modules/esnext.async-iterator.map.js");
|
|
14
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
15
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
+
var _logger = require("agora-foundation/lib/logger");
|
|
20
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
21
|
+
var _base = require("../base");
|
|
22
|
+
var _fcrCore = require("fcr-core");
|
|
23
|
+
var FcrUIInterpreterProviderImpl = exports.FcrUIInterpreterProviderImpl = /*#__PURE__*/function () {
|
|
24
|
+
function FcrUIInterpreterProviderImpl() {
|
|
25
|
+
(0, _classCallCheck2["default"])(this, FcrUIInterpreterProviderImpl);
|
|
26
|
+
// @internal
|
|
27
|
+
(0, _defineProperty2["default"])(this, "logger", (0, _logger.getLogger)());
|
|
28
|
+
(0, _defineProperty2["default"])(this, "_observable", new _observable.AgoraObservable());
|
|
29
|
+
}
|
|
30
|
+
return (0, _createClass2["default"])(FcrUIInterpreterProviderImpl, [{
|
|
31
|
+
key: "joinInterpreterRoom",
|
|
32
|
+
value: // 加入语言房间
|
|
33
|
+
function () {
|
|
34
|
+
var _joinInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(param) {
|
|
35
|
+
var control, roomJoinOptions;
|
|
36
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
control = param.control, roomJoinOptions = param.roomJoinOptions;
|
|
40
|
+
_context.prev = 1;
|
|
41
|
+
this._observable.notifyObservers('onJoinInterpretingRoom', param);
|
|
42
|
+
_context.next = 5;
|
|
43
|
+
return control.join(roomJoinOptions);
|
|
44
|
+
case 5:
|
|
45
|
+
this.logger.info("interpreterLog-joinInterpreterRoom succeed", param.language);
|
|
46
|
+
this._observable.notifyObservers('onJoinInterpretingRoomSuccess', param);
|
|
47
|
+
_context.next = 13;
|
|
48
|
+
break;
|
|
49
|
+
case 9:
|
|
50
|
+
_context.prev = 9;
|
|
51
|
+
_context.t0 = _context["catch"](1);
|
|
52
|
+
this.logger.info("interpreterLog-joinInterpreterRoom fail", param.language);
|
|
53
|
+
this._observable.notifyObservers('onJoinInterpretingRoomFailed', param);
|
|
54
|
+
case 13:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee, this, [[1, 9]]);
|
|
59
|
+
}));
|
|
60
|
+
function joinInterpreterRoom(_x) {
|
|
61
|
+
return _joinInterpreterRoom.apply(this, arguments);
|
|
62
|
+
}
|
|
63
|
+
return joinInterpreterRoom;
|
|
64
|
+
}() // 离开语言房间
|
|
65
|
+
}, {
|
|
66
|
+
key: "leaveInterpreterRoom",
|
|
67
|
+
value: function () {
|
|
68
|
+
var _leaveInterpreterRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(param) {
|
|
69
|
+
var control;
|
|
70
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
71
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
control = param.control;
|
|
74
|
+
_context2.prev = 1;
|
|
75
|
+
this._observable.notifyObservers('onLeaveInterpretingRoom', param);
|
|
76
|
+
_context2.next = 5;
|
|
77
|
+
return control.leave();
|
|
78
|
+
case 5:
|
|
79
|
+
this.logger.info("interpreterLog-leaveInterpreterRoom succeed", param.language);
|
|
80
|
+
this._observable.notifyObservers('onLeaveInterpretingRoomSuccess', param);
|
|
81
|
+
_context2.next = 13;
|
|
82
|
+
break;
|
|
83
|
+
case 9:
|
|
84
|
+
_context2.prev = 9;
|
|
85
|
+
_context2.t0 = _context2["catch"](1);
|
|
86
|
+
this.logger.info("interpreterLog-leaveInterpreterRoom fail", param.language);
|
|
87
|
+
this._observable.notifyObservers('onLeaveInterpretingRoomFailed', param);
|
|
88
|
+
case 13:
|
|
89
|
+
case "end":
|
|
90
|
+
return _context2.stop();
|
|
91
|
+
}
|
|
92
|
+
}, _callee2, this, [[1, 9]]);
|
|
93
|
+
}));
|
|
94
|
+
function leaveInterpreterRoom(_x2) {
|
|
95
|
+
return _leaveInterpreterRoom.apply(this, arguments);
|
|
96
|
+
}
|
|
97
|
+
return leaveInterpreterRoom;
|
|
98
|
+
}() // 控制翻译房间输出流权限
|
|
99
|
+
}, {
|
|
100
|
+
key: "updateInterpreterRoomStreams",
|
|
101
|
+
value: function () {
|
|
102
|
+
var _updateInterpreterRoomStreams = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(roomControl, open) {
|
|
103
|
+
var streamControl, streamMap, streamList, stream;
|
|
104
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
105
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
106
|
+
case 0:
|
|
107
|
+
if (!roomControl) {
|
|
108
|
+
_context3.next = 9;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
streamControl = roomControl.getStreamControl();
|
|
112
|
+
streamMap = streamControl.getStreams();
|
|
113
|
+
streamList = Object.keys(streamMap).map(function (key) {
|
|
114
|
+
return streamMap[key];
|
|
115
|
+
});
|
|
116
|
+
if (!(streamList.length > 0)) {
|
|
117
|
+
_context3.next = 9;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
stream = streamList[0][0];
|
|
121
|
+
_context3.next = 8;
|
|
122
|
+
return streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, stream.streamId, {
|
|
123
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION,
|
|
124
|
+
audioPrivilege: open ? _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE
|
|
125
|
+
}));
|
|
126
|
+
case 8:
|
|
127
|
+
this.logger.info("interpreterLog- ".concat(open ? 'ON' : 'OFF', " interpreterRoom input streams"), stream.streamId);
|
|
128
|
+
case 9:
|
|
129
|
+
case "end":
|
|
130
|
+
return _context3.stop();
|
|
131
|
+
}
|
|
132
|
+
}, _callee3, this);
|
|
133
|
+
}));
|
|
134
|
+
function updateInterpreterRoomStreams(_x3, _x4) {
|
|
135
|
+
return _updateInterpreterRoomStreams.apply(this, arguments);
|
|
136
|
+
}
|
|
137
|
+
return updateInterpreterRoomStreams;
|
|
138
|
+
}()
|
|
139
|
+
}, {
|
|
140
|
+
key: "addObserver",
|
|
141
|
+
value: function addObserver(observer) {
|
|
142
|
+
this._observable.addObserver(observer);
|
|
143
|
+
}
|
|
144
|
+
}, {
|
|
145
|
+
key: "removeObserver",
|
|
146
|
+
value: function removeObserver(observer) {
|
|
147
|
+
this._observable.removeObserver(observer);
|
|
148
|
+
}
|
|
149
|
+
}]);
|
|
150
|
+
}();
|
|
151
|
+
(0, _base.registerDependency)('interpreterProvider');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface FcrUILocalStorageProvider {
|
|
2
|
+
write(key: string, value: any): number;
|
|
3
|
+
read(key: string): string | null;
|
|
4
|
+
}
|
|
5
|
+
export declare class FcrUILocalStorageProviderImpl implements FcrUILocalStorageProvider {
|
|
6
|
+
write(key: string, value: any): number;
|
|
7
|
+
read(key: string): string | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.FcrUILocalStorageProviderImpl = void 0;
|
|
9
|
+
require("core-js/modules/es.date.to-json.js");
|
|
10
|
+
require("core-js/modules/es.json.stringify.js");
|
|
11
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
var _base = require("../base");
|
|
14
|
+
var FcrUILocalStorageProviderImpl = exports.FcrUILocalStorageProviderImpl = /*#__PURE__*/function () {
|
|
15
|
+
function FcrUILocalStorageProviderImpl() {
|
|
16
|
+
(0, _classCallCheck2["default"])(this, FcrUILocalStorageProviderImpl);
|
|
17
|
+
}
|
|
18
|
+
return (0, _createClass2["default"])(FcrUILocalStorageProviderImpl, [{
|
|
19
|
+
key: "write",
|
|
20
|
+
value: function write(key, value) {
|
|
21
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
key: "read",
|
|
26
|
+
value: function read(key) {
|
|
27
|
+
return localStorage.getItem(key);
|
|
28
|
+
}
|
|
29
|
+
}]);
|
|
30
|
+
}();
|
|
31
|
+
(0, _base.registerDependency)('localStorageProvider');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FcrPerformanceInfo } from 'fcr-core/lib/type';
|
|
2
|
+
import { FcrMonitorControl } from 'fcr-core';
|
|
3
|
+
export interface FcrUIMonitorObserver {
|
|
4
|
+
onPerformanceInfoUpdated?: (status: FcrPerformanceInfo) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface FcrUIMonitorProvider {
|
|
7
|
+
addObserver(observer: FcrUIMonitorObserver): void;
|
|
8
|
+
removeObserver(observer: FcrUIMonitorObserver): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class FcrUIMonitorProviderImpl implements FcrUIMonitorProvider {
|
|
11
|
+
private _monitorControl;
|
|
12
|
+
constructor(_monitorControl: FcrMonitorControl);
|
|
13
|
+
addObserver(observer: FcrUIMonitorObserver): void;
|
|
14
|
+
removeObserver(observer: FcrUIMonitorObserver): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.FcrUIMonitorProviderImpl = void 0;
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _base = require("../base");
|
|
12
|
+
var FcrUIMonitorProviderImpl = exports.FcrUIMonitorProviderImpl = /*#__PURE__*/function () {
|
|
13
|
+
function FcrUIMonitorProviderImpl(_monitorControl) {
|
|
14
|
+
(0, _classCallCheck2["default"])(this, FcrUIMonitorProviderImpl);
|
|
15
|
+
this._monitorControl = _monitorControl;
|
|
16
|
+
}
|
|
17
|
+
return (0, _createClass2["default"])(FcrUIMonitorProviderImpl, [{
|
|
18
|
+
key: "addObserver",
|
|
19
|
+
value: function addObserver(observer) {
|
|
20
|
+
this._monitorControl.addObserver(observer);
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
key: "removeObserver",
|
|
24
|
+
value: function removeObserver(observer) {
|
|
25
|
+
this._monitorControl.removeObserver(observer);
|
|
26
|
+
}
|
|
27
|
+
}]);
|
|
28
|
+
}();
|
|
29
|
+
(0, _base.registerDependency)('monitorProvider');
|