fcr-ui-scene 3.7.2 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/creator.d.ts +2 -0
- package/lib/creator.js +37 -44
- package/lib/electron/app.js +7 -0
- package/lib/electron/injections.d.ts +1 -1
- package/lib/electron/injections.js +5 -3
- package/lib/electron/main.js +3 -1
- package/lib/fragments/annotation/index.d.ts +1 -0
- package/lib/fragments/annotation/index.js +13 -7
- package/lib/fragments/annotation/libs.d.ts +7 -6
- package/lib/fragments/annotation/libs.js +9 -8
- package/lib/fragments/annotation/store.d.ts +8 -4
- package/lib/fragments/annotation/store.js +351 -267
- package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
- package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
- package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
- package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
- package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
- package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
- package/lib/fragments/annotation/utils.d.ts +1 -0
- package/lib/fragments/annotation/utils.js +27 -0
- package/lib/fragments/annotation/view.js +1 -6
- package/lib/fragments/base.js +5 -3
- package/lib/fragments/whiteboard/cursor.css +77 -0
- package/lib/fragments/whiteboard/index.d.ts +11 -0
- package/lib/fragments/whiteboard/index.js +91 -0
- package/lib/fragments/whiteboard/store.d.ts +31 -0
- package/lib/fragments/whiteboard/store.js +480 -0
- package/lib/fragments/whiteboard/style.css +4 -0
- package/lib/fragments/whiteboard/view.d.ts +4 -0
- package/lib/fragments/whiteboard/view.js +31 -0
- package/lib/global.css +6 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/modules/action-bar/components/apps/index.js +15 -5
- package/lib/modules/action-bar/components/leave/index.js +4 -11
- package/lib/modules/action-bar/components/screen-share/submenu.js +2 -2
- package/lib/modules/action-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/index.js +2 -1
- package/lib/modules/action-bar/store.d.ts +6 -2
- package/lib/modules/action-bar/store.js +56 -93
- package/lib/modules/action-bar/view.d.ts +1 -0
- package/lib/modules/action-bar/view.js +3 -2
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
- package/lib/modules/annotation/annotation-toolbar-store.js +48 -90
- package/lib/modules/annotation/index.d.ts +2 -0
- package/lib/modules/annotation/index.js +2 -2
- package/lib/modules/annotation/store.d.ts +11 -49
- package/lib/modules/annotation/store.js +144 -429
- package/lib/modules/annotation/view.js +3 -6
- package/lib/modules/audio-stream/index.js +1 -2
- package/lib/modules/chat/components/chat-select/index.js +3 -0
- package/lib/modules/components/control-bar/components/loading/index.css +76 -0
- package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
- package/lib/modules/components/control-bar/components/loading/index.js +64 -0
- package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
- package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
- package/lib/modules/components/control-bar/components/progress/index.js +43 -0
- package/lib/modules/components/control-bar/components/progress/style.css +51 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
- package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
- package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
- package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
- package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
- package/lib/modules/components/control-bar/index.css +87 -0
- package/lib/modules/components/control-bar/index.d.ts +20 -0
- package/lib/modules/components/control-bar/index.js +276 -0
- package/lib/modules/components/device-control/store.js +2 -2
- package/lib/modules/components/leave-meeting/components/index.css +0 -9
- package/lib/modules/components/leave-meeting/index.d.ts +2 -1
- package/lib/modules/components/leave-meeting/index.js +19 -8
- package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
- package/lib/modules/components/leave-meeting/portal.js +29 -0
- package/lib/modules/components/leave-meeting/style.css +9 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
- package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
- package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
- package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
- package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +6 -4
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +77 -41
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +3 -3
- package/lib/modules/components/member-window/components/video-player/index.d.ts +3 -3
- package/lib/modules/components/member-window/index.css +4 -0
- package/lib/modules/components/member-window/types.d.ts +9 -5
- package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
- package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
- package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
- package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
- package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
- package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
- package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
- package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
- package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
- package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
- package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
- package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
- package/lib/modules/components/toolbar/components/item/index.js +165 -0
- package/lib/modules/components/toolbar/components/item/style.css +94 -0
- package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
- package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
- package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
- package/lib/modules/components/toolbar/components/panel/index.js +28 -0
- package/lib/modules/components/toolbar/components/panel/style.css +86 -0
- package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
- package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
- package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
- package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
- package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
- package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
- package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
- package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
- package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
- package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
- package/lib/modules/components/toolbar/index.d.ts +29 -0
- package/lib/modules/components/toolbar/index.js +258 -0
- package/lib/modules/components/toolbar/style.css +85 -0
- package/lib/modules/components/toolbar/types.d.ts +13 -0
- package/lib/modules/components/toolbar/types.js +6 -0
- package/lib/modules/control-bar/components/more-actions/index.js +0 -6
- package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
- package/lib/modules/control-bar/index.js +2 -1
- package/lib/modules/control-bar/store.d.ts +15 -12
- package/lib/modules/control-bar/store.js +68 -29
- package/lib/modules/control-bar/view.js +33 -67
- package/lib/modules/device-pretest/store.js +4 -2
- package/lib/modules/dialog/components/dialog-container/component/body.js +3 -24
- package/lib/modules/dialog/components/dialog-container/index.d.ts +4 -0
- package/lib/modules/dialog/components/dialog-container/index.js +67 -44
- package/lib/modules/dialog/components/normal-window/index.js +4 -0
- package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
- package/lib/modules/dialog/dialogs/control-bar/index.js +26 -35
- package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
- package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
- package/lib/modules/dialog/dialogs/sub-window/index.js +102 -0
- package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
- package/lib/modules/dialog/dialogs/video-window/index.js +31 -25
- package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
- package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
- package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
- package/lib/modules/dialog/hooks/useElectron.js +66 -13
- package/lib/modules/dialog/index.d.ts +6 -3
- package/lib/modules/dialog/index.js +5 -3
- package/lib/modules/dialog/level-config.js +1 -1
- package/lib/modules/dialog/store.d.ts +23 -9
- package/lib/modules/dialog/store.js +84 -12
- package/lib/modules/dialog/type.d.ts +8 -0
- package/lib/modules/event-confirm/components/window/index.d.ts +5 -2
- package/lib/modules/event-confirm/components/window/index.js +38 -14
- package/lib/modules/event-confirm/index.css +3 -2
- package/lib/modules/event-confirm/store.d.ts +10 -5
- package/lib/modules/event-confirm/store.js +68 -20
- package/lib/modules/event-confirm/view.js +10 -8
- package/lib/modules/event-sound/index.d.ts +1 -0
- package/lib/modules/event-sound/index.js +11 -24
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +1 -2
- package/lib/modules/interpreter/store.js +11 -13
- package/lib/modules/invite/components/pstn-invite.js +0 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +26 -26
- package/lib/modules/layout/components/who-is-speaking.js +3 -6
- package/lib/modules/layout/index.d.ts +3 -1
- package/lib/modules/layout/index.js +2 -1
- package/lib/modules/layout/store.d.ts +7 -59
- package/lib/modules/layout/store.js +133 -45
- package/lib/modules/layout/type.d.ts +55 -0
- package/lib/modules/participant/components/can-moveable/index.js +0 -1
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
- package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
- package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
- package/lib/modules/participant/components/participants/index.js +5 -2
- package/lib/modules/participant/components/participants/types.d.ts +3 -0
- package/lib/modules/participant/index.d.ts +2 -0
- package/lib/modules/participant/index.js +2 -1
- package/lib/modules/participant/member-list-data-source.js +3 -5
- package/lib/modules/participant/store.d.ts +5 -1
- package/lib/modules/participant/store.js +51 -44
- package/lib/modules/secondary-window/index.d.ts +50 -0
- package/lib/modules/secondary-window/index.js +113 -0
- package/lib/modules/secondary-window/store.d.ts +76 -0
- package/lib/modules/secondary-window/store.js +407 -0
- package/lib/modules/secondary-window/type.d.ts +110 -0
- package/lib/modules/secondary-window/type.js +35 -0
- package/lib/modules/secondary-window/view.d.ts +6 -0
- package/lib/modules/secondary-window/view.js +257 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +4 -2
- package/lib/modules/setting/config.d.ts +4 -0
- package/lib/modules/setting/config.js +6 -3
- package/lib/modules/setting/general-settings/general-settings.js +9 -0
- package/lib/modules/setting/state/index.js +0 -10
- package/lib/modules/setting/store.d.ts +9 -3
- package/lib/modules/setting/store.js +110 -77
- package/lib/modules/setting/view.js +3 -2
- package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
- package/lib/modules/share-screen/components/control-bar/index.js +17 -12
- package/lib/modules/share-screen/components/selection/index.js +16 -23
- package/lib/modules/share-screen/index.d.ts +4 -1
- package/lib/modules/share-screen/index.js +6 -3
- package/lib/modules/share-screen/store.d.ts +18 -19
- package/lib/modules/share-screen/store.js +101 -151
- package/lib/modules/share-screen/types.d.ts +7 -8
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +2 -1
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/store.d.ts +5 -2
- package/lib/modules/state-bar/store.js +14 -7
- package/lib/modules/state-bar/view.js +3 -3
- package/lib/modules/video-window/components/members/index.js +10 -15
- package/lib/modules/video-window/store.d.ts +1 -0
- package/lib/modules/video-window/store.js +8 -3
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +3 -0
- package/lib/modules/whiteboard/components/control-bar/store.js +20 -11
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
- package/lib/modules/whiteboard/components/toolbar/store.js +2 -2
- package/lib/modules/whiteboard/index.d.ts +20 -17
- package/lib/modules/whiteboard/index.js +167 -132
- package/lib/plugins/module-dev-plugin.js +4 -0
- package/lib/providers/ability-provider.js +2 -0
- package/lib/providers/annotation-provider.js +3 -3
- package/lib/providers/device-privilege-provider.js +13 -12
- package/lib/providers/device-provider.d.ts +40 -31
- package/lib/providers/device-provider.js +657 -713
- package/lib/providers/device-stream-provider.js +4 -4
- package/lib/providers/interpreter-provider.js +7 -9
- package/lib/providers/multi-display-provider.d.ts +90 -0
- package/lib/providers/multi-display-provider.js +593 -0
- package/lib/providers/privilege-provider.d.ts +3 -11
- package/lib/providers/privilege-provider.js +3 -12
- package/lib/providers/renderer-provider.d.ts +3 -3
- package/lib/providers/renderer-provider.js +20 -32
- package/lib/providers/room-provider.js +21 -16
- package/lib/providers/screen-share-provider.d.ts +15 -11
- package/lib/providers/screen-share-provider.js +118 -99
- package/lib/providers/sharing-provider.d.ts +7 -1
- package/lib/providers/sharing-provider.js +39 -3
- package/lib/providers/whiteboard-provider.d.ts +24 -0
- package/lib/providers/whiteboard-provider.js +128 -0
- package/lib/runtime.d.ts +1 -0
- package/lib/scenes/main-scene.d.ts +6 -0
- package/lib/scenes/main-scene.js +44 -2
- package/lib/scenes/waiting-scene.d.ts +0 -2
- package/lib/scenes/waiting-scene.js +0 -6
- package/lib/schema.d.ts +3 -3
- package/lib/schema.js +1 -1
- package/lib/shared-data-source/confirm-data.d.ts +19 -0
- package/lib/shared-data-source/confirm-data.js +119 -15
- package/lib/shared-data-source/member-data.d.ts +2 -2
- package/lib/shared-data-source/screen-share-data.d.ts +35 -28
- package/lib/shared-data-source/screen-share-data.js +19 -8
- package/lib/shared-data-source/setting.js +4 -3
- package/lib/shared-data-source/video-window.js +1 -2
- package/lib/shared-data-source/whiteboard-data.d.ts +70 -0
- package/lib/shared-data-source/whiteboard-data.js +348 -0
- package/lib/translations/enUS.d.ts +1 -0
- package/lib/translations/enUS.js +2 -1
- package/lib/translations/zhCN.d.ts +1 -0
- package/lib/translations/zhCN.js +2 -1
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +77 -24
- package/lib/utilities/constant.d.ts +9 -2
- package/lib/utilities/constant.js +10 -3
- package/lib/utilities/debug.d.ts +4 -0
- package/lib/utilities/debug.js +40 -0
- package/lib/utilities/default-config.d.ts +4 -0
- package/lib/utilities/default-config.js +8 -4
- package/lib/utilities/dialog-utils.d.ts +3 -2
- package/lib/utilities/dialog-utils.js +56 -15
- package/lib/utilities/meeting-detail.js +4 -1
- package/lib/utilities/package-info.d.ts +3 -0
- package/lib/utilities/package-info.js +15 -0
- package/lib/utilities/renderer-event.d.ts +4 -6
- package/lib/utilities/renderer-event.js +23 -43
- package/lib/utilities/renderer.d.ts +1 -1
- package/lib/utilities/renderer.js +44 -10
- package/lib/utilities/shared-storage.d.ts +18 -0
- package/lib/utilities/shared-storage.js +63 -0
- package/lib/utilities/tools.js +2 -1
- package/lib/waiting-room-control-manager.js +6 -6
- package/package.json +6 -7
- package/public/index.html +5 -0
- package/lib/electron/tools.d.ts +0 -5
- package/lib/electron/tools.js +0 -62
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.filter.js");
|
|
9
|
+
require("core-js/modules/es.array.is-array.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.bind.js");
|
|
12
|
+
require("core-js/modules/es.function.name.js");
|
|
13
|
+
require("core-js/modules/es.map.js");
|
|
14
|
+
require("core-js/modules/es.number.constructor.js");
|
|
15
|
+
require("core-js/modules/es.object.create.js");
|
|
16
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
17
|
+
require("core-js/modules/es.object.define-property.js");
|
|
18
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
19
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
20
|
+
require("core-js/modules/es.object.keys.js");
|
|
21
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
22
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
23
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
24
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
25
|
+
require("core-js/modules/esnext.map.every.js");
|
|
26
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
27
|
+
require("core-js/modules/esnext.map.find.js");
|
|
28
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
29
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
30
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
31
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
32
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
33
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
34
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
35
|
+
require("core-js/modules/esnext.map.some.js");
|
|
36
|
+
require("core-js/modules/esnext.map.update.js");
|
|
37
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
38
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
39
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
40
|
+
Object.defineProperty(exports, "__esModule", {
|
|
41
|
+
value: true
|
|
42
|
+
});
|
|
43
|
+
exports.FcrUIMultiDisplayProviderImpl = void 0;
|
|
44
|
+
require("core-js/modules/es.array.concat.js");
|
|
45
|
+
require("core-js/modules/es.array.find.js");
|
|
46
|
+
require("core-js/modules/es.array.for-each.js");
|
|
47
|
+
require("core-js/modules/es.array.iterator.js");
|
|
48
|
+
require("core-js/modules/es.array.push.js");
|
|
49
|
+
require("core-js/modules/es.date.to-json.js");
|
|
50
|
+
require("core-js/modules/es.json.stringify.js");
|
|
51
|
+
require("core-js/modules/es.object.to-string.js");
|
|
52
|
+
require("core-js/modules/es.string.iterator.js");
|
|
53
|
+
require("core-js/modules/es.weak-map.js");
|
|
54
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
55
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
56
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
57
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
58
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
59
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
60
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
61
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
62
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
63
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
64
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
65
|
+
var _env = require("agora-foundation/lib/utilities/env");
|
|
66
|
+
var _imports = require("fcr-core/lib/imports");
|
|
67
|
+
var _type = require("fcr-core/lib/type");
|
|
68
|
+
var _logger = require("../utilities/logger");
|
|
69
|
+
var _mobx = require("mobx");
|
|
70
|
+
var _base = require("../base");
|
|
71
|
+
var _type2 = require("../modules/secondary-window/type");
|
|
72
|
+
var _type3 = require("../type");
|
|
73
|
+
var _FcrUIMultiDisplayProviderImpl;
|
|
74
|
+
var _initProto, _init__displayCount, _init__displayState, _init__secondaryWindowContentType, _init__mainWindowContentType;
|
|
75
|
+
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; }
|
|
76
|
+
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; }
|
|
77
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
78
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
79
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
80
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
81
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
82
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
83
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
84
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
85
|
+
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
86
|
+
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
87
|
+
function getIsSecondaryWindowModeEnabled(displayCount, isDualDisplayMode) {
|
|
88
|
+
return displayCount > 1 && isDualDisplayMode;
|
|
89
|
+
}
|
|
90
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
91
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
92
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
93
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
94
|
+
var FcrUIMultiDisplayProviderImpl = exports.FcrUIMultiDisplayProviderImpl = /*#__PURE__*/function () {
|
|
95
|
+
function FcrUIMultiDisplayProviderImpl(_ref) {
|
|
96
|
+
var eventProvider = _ref.eventProvider,
|
|
97
|
+
sharedSettingDataSource = _ref.sharedSettingDataSource,
|
|
98
|
+
sharedMemberDataSource = _ref.sharedMemberDataSource,
|
|
99
|
+
sharedVideoWindowDataSource = _ref.sharedVideoWindowDataSource,
|
|
100
|
+
sharingProvider = _ref.sharingProvider,
|
|
101
|
+
sharedScreenShareSharedDataSource = _ref.sharedScreenShareSharedDataSource,
|
|
102
|
+
fcrUIMainWindowRenderer = _ref.fcrUIMainWindowRenderer,
|
|
103
|
+
sharedWhiteboardDataSource = _ref.sharedWhiteboardDataSource;
|
|
104
|
+
(0, _classCallCheck2["default"])(this, FcrUIMultiDisplayProviderImpl);
|
|
105
|
+
(0, _defineProperty2["default"])(this, "_logger", (_initProto(this), (0, _logger.createLogger)({
|
|
106
|
+
prefix: 'FcrUIMultiDisplayProvider'
|
|
107
|
+
})));
|
|
108
|
+
(0, _defineProperty2["default"])(this, "_observers", new _imports.AgoraObservable());
|
|
109
|
+
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
110
|
+
(0, _defineProperty2["default"])(this, "_isElectron", (0, _env.isElectron)());
|
|
111
|
+
(0, _defineProperty2["default"])(this, "_contentDistribution", {
|
|
112
|
+
mainWindow: {
|
|
113
|
+
type: _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA
|
|
114
|
+
},
|
|
115
|
+
secondaryWindow: {
|
|
116
|
+
type: _type2.FcrUIDisplayDistributionContentType.HIDDEN
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
_classPrivateFieldInitSpec(this, _A, _init__displayCount(this, 1));
|
|
120
|
+
_classPrivateFieldInitSpec(this, _B, _init__displayState(this, {
|
|
121
|
+
participantCount: 1,
|
|
122
|
+
layoutMode: _type3.FcrUIVideoWindowLayoutType.Gallery,
|
|
123
|
+
isSharing: false,
|
|
124
|
+
sharingBySelf: false,
|
|
125
|
+
sharingStreamId: '',
|
|
126
|
+
sharingType: undefined,
|
|
127
|
+
otherStreamId: '',
|
|
128
|
+
isSharingBoard: false,
|
|
129
|
+
isSharingScreen: false,
|
|
130
|
+
isSecondaryWindowModeEnabled: false
|
|
131
|
+
}));
|
|
132
|
+
_classPrivateFieldInitSpec(this, _C, _init__secondaryWindowContentType(this));
|
|
133
|
+
_classPrivateFieldInitSpec(this, _D, _init__mainWindowContentType(this));
|
|
134
|
+
this._eventProvider = eventProvider;
|
|
135
|
+
this._sharedSettingDataSource = sharedSettingDataSource;
|
|
136
|
+
this._sharedMemberDataSource = sharedMemberDataSource;
|
|
137
|
+
this._sharedVideoWindowDataSource = sharedVideoWindowDataSource;
|
|
138
|
+
this._sharingProvider = sharingProvider;
|
|
139
|
+
this._sharedScreenShareDataSource = sharedScreenShareSharedDataSource;
|
|
140
|
+
this._fcrUIMainWindowRenderer = fcrUIMainWindowRenderer;
|
|
141
|
+
this._sharedWhiteboardDataSource = sharedWhiteboardDataSource;
|
|
142
|
+
if (this._isElectron) {
|
|
143
|
+
window.runtime.screen.addListener('display-added', this._handleDisplayCountUpdated);
|
|
144
|
+
window.runtime.screen.addListener('display-removed', this._handleDisplayCountUpdated);
|
|
145
|
+
this._displayCount = window.runtime.screen.getAllDisplays().length;
|
|
146
|
+
this._initDisplayState();
|
|
147
|
+
this._addReaction();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return (0, _createClass2["default"])(FcrUIMultiDisplayProviderImpl, [{
|
|
151
|
+
key: "_userId",
|
|
152
|
+
get: function get() {
|
|
153
|
+
return this._sharedMemberDataSource.localUser.userId;
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: "_displayCount",
|
|
157
|
+
get: function get() {
|
|
158
|
+
return _classPrivateFieldGet(_A, this);
|
|
159
|
+
},
|
|
160
|
+
set: function set(v) {
|
|
161
|
+
_classPrivateFieldSet(_A, this, v);
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
key: "_displayState",
|
|
165
|
+
get: function get() {
|
|
166
|
+
return _classPrivateFieldGet(_B, this);
|
|
167
|
+
},
|
|
168
|
+
set: function set(v) {
|
|
169
|
+
_classPrivateFieldSet(_B, this, v);
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: "_secondaryWindowContentType",
|
|
173
|
+
get: function get() {
|
|
174
|
+
return _classPrivateFieldGet(_C, this);
|
|
175
|
+
},
|
|
176
|
+
set: function set(v) {
|
|
177
|
+
_classPrivateFieldSet(_C, this, v);
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "_mainWindowContentType",
|
|
181
|
+
get: function get() {
|
|
182
|
+
return _classPrivateFieldGet(_D, this);
|
|
183
|
+
},
|
|
184
|
+
set: function set(v) {
|
|
185
|
+
_classPrivateFieldSet(_D, this, v);
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
key: "contentDistribution",
|
|
189
|
+
get: function get() {
|
|
190
|
+
return this._contentDistribution;
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "displayState",
|
|
194
|
+
get: function get() {
|
|
195
|
+
return this._displayState;
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
key: "displayCount",
|
|
199
|
+
get: function get() {
|
|
200
|
+
return this._displayCount;
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "isActive",
|
|
204
|
+
get: function get() {
|
|
205
|
+
return this._displayState.isSecondaryWindowModeEnabled;
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "mianWindowContentType",
|
|
209
|
+
get: function get() {
|
|
210
|
+
return this._mainWindowContentType;
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "secondaryWindowContentType",
|
|
214
|
+
get: function get() {
|
|
215
|
+
return this._secondaryWindowContentType;
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "isLocalCameraInSecondaryWindow",
|
|
219
|
+
get: function get() {
|
|
220
|
+
return this._secondaryWindowContentType === _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA;
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "addObserver",
|
|
224
|
+
value: function addObserver(observer) {
|
|
225
|
+
this._observers.addObserver(observer);
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "removeObserver",
|
|
229
|
+
value: function removeObserver(observer) {
|
|
230
|
+
this._observers.removeObserver(observer);
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "release",
|
|
234
|
+
value: function release() {
|
|
235
|
+
if (this._isElectron) {
|
|
236
|
+
window.runtime.screen.removeListener('display-added', this._handleDisplayCountUpdated);
|
|
237
|
+
window.runtime.screen.removeListener('display-removed', this._handleDisplayCountUpdated);
|
|
238
|
+
}
|
|
239
|
+
this._fcrUIMainWindowRenderer.removeAllObservers();
|
|
240
|
+
this._observers.removeAllObservers();
|
|
241
|
+
this._disposers.forEach(function (disposer) {
|
|
242
|
+
return disposer();
|
|
243
|
+
});
|
|
244
|
+
this._disposers = [];
|
|
245
|
+
this._logger.info('FcrUIMultiDisplayProvider released');
|
|
246
|
+
}
|
|
247
|
+
}, {
|
|
248
|
+
key: "moveMainWindowToIndexLeastDisplay",
|
|
249
|
+
value: function moveMainWindowToIndexLeastDisplay() {
|
|
250
|
+
if (!this.isActive) {
|
|
251
|
+
this._logger.warn('move: Secondary window mode is not enabled, cannot move main window to least display.');
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
var browserWindow = window.runtime.browserWindow;
|
|
255
|
+
var currentSharingBounds = this._sharedScreenShareDataSource.currentSelectionBounds;
|
|
256
|
+
var mainWindowBounds = browserWindow.getBounds();
|
|
257
|
+
var displayOfCurrentSharingBounds = window.runtime.screen.getDisplayMatching(currentSharingBounds);
|
|
258
|
+
var displaysOfCurrentMainWindow = window.runtime.screen.getDisplayMatching(mainWindowBounds);
|
|
259
|
+
if (displayOfCurrentSharingBounds.id !== displaysOfCurrentMainWindow.id) {
|
|
260
|
+
this._logger.info('Main window is not in the sharing display, no need to move.');
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
var isMaximized = browserWindow.isMaximized();
|
|
264
|
+
this.showMainWindowInIndexLeastDisplay({
|
|
265
|
+
displayOfCurrentSharingBounds: displayOfCurrentSharingBounds,
|
|
266
|
+
isMaximized: isMaximized
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}, {
|
|
270
|
+
key: "showMainWindowInIndexLeastDisplay",
|
|
271
|
+
value: function showMainWindowInIndexLeastDisplay() {
|
|
272
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
273
|
+
var displayOfCurrentSharingBounds = options.displayOfCurrentSharingBounds;
|
|
274
|
+
var _options$isMaximized = options.isMaximized,
|
|
275
|
+
isMaximized = _options$isMaximized === void 0 ? false : _options$isMaximized;
|
|
276
|
+
if (!this.isActive) {
|
|
277
|
+
this._logger.warn('show: Secondary window mode is not enabled, cannot show main window in least display.');
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
var currentSharingBounds = this._sharedScreenShareDataSource.currentSelectionBounds;
|
|
281
|
+
displayOfCurrentSharingBounds = displayOfCurrentSharingBounds || window.runtime.screen.getDisplayMatching(currentSharingBounds);
|
|
282
|
+
var browserWindow = window.runtime.browserWindow;
|
|
283
|
+
var displayOfMainWindow = window.runtime.screen.getAllDisplays().find(function (_ref2) {
|
|
284
|
+
var id = _ref2.id;
|
|
285
|
+
return id !== displayOfCurrentSharingBounds.id;
|
|
286
|
+
});
|
|
287
|
+
if (!displayOfMainWindow) {
|
|
288
|
+
this._logger.error('No available display found to show main window.');
|
|
289
|
+
browserWindow.show();
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
this._logger.info("Showing main window in display: ".concat(displayOfMainWindow.id, " - ").concat(displayOfMainWindow.label));
|
|
293
|
+
var _displayOfMainWindow$ = displayOfMainWindow.bounds,
|
|
294
|
+
x = _displayOfMainWindow$.x,
|
|
295
|
+
y = _displayOfMainWindow$.y,
|
|
296
|
+
width = _displayOfMainWindow$.width,
|
|
297
|
+
height = _displayOfMainWindow$.height;
|
|
298
|
+
var _browserWindow$getBou = browserWindow.getBounds(),
|
|
299
|
+
mainWindowWidth = _browserWindow$getBou.width,
|
|
300
|
+
mainWindowHeight = _browserWindow$getBou.height;
|
|
301
|
+
var bounds = {
|
|
302
|
+
x: x + Math.floor(width / 2 - mainWindowWidth / 2),
|
|
303
|
+
y: y + Math.floor(height / 2 - mainWindowHeight / 2)
|
|
304
|
+
};
|
|
305
|
+
isMaximized && browserWindow.unmaximize();
|
|
306
|
+
browserWindow.setBounds(bounds);
|
|
307
|
+
if (isMaximized) {
|
|
308
|
+
browserWindow.maximize();
|
|
309
|
+
// browserWindow.focus();
|
|
310
|
+
} else {
|
|
311
|
+
browserWindow.show();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
key: "setMainWindowMaximize",
|
|
316
|
+
value: function setMainWindowMaximize() {
|
|
317
|
+
if (!this.isActive) {
|
|
318
|
+
this._logger.warn('makeFullScreen: Secondary window mode is not enabled, cannot make main window full screen.');
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
var browserWindow = window.runtime.browserWindow;
|
|
322
|
+
browserWindow.maximize();
|
|
323
|
+
this._logger.info("Main window set to maximize state.");
|
|
324
|
+
}
|
|
325
|
+
}, {
|
|
326
|
+
key: "_getContentDistribution",
|
|
327
|
+
value: function _getContentDistribution() {
|
|
328
|
+
var state = this.displayState;
|
|
329
|
+
function calculateContentDistribution(state) {
|
|
330
|
+
// 没有开启副屏模式时,隐藏副屏窗口
|
|
331
|
+
if (!state.isSecondaryWindowModeEnabled) {
|
|
332
|
+
return {
|
|
333
|
+
mainWindow: {
|
|
334
|
+
type: state.layoutMode,
|
|
335
|
+
participants: _type2.FcrUIDisplayDistributionParticipants.ALL
|
|
336
|
+
},
|
|
337
|
+
secondaryWindow: {
|
|
338
|
+
type: _type2.FcrUIDisplayDistributionContentType.HIDDEN
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 正在共享屏幕
|
|
345
|
+
*/
|
|
346
|
+
if (state.isSharing) {
|
|
347
|
+
var mainWindow = {
|
|
348
|
+
type: state.layoutMode,
|
|
349
|
+
participants: _type2.FcrUIDisplayDistributionParticipants.ALL
|
|
350
|
+
};
|
|
351
|
+
var secondaryWindow;
|
|
352
|
+
|
|
353
|
+
// 如果自己在共享,则副屏隐藏
|
|
354
|
+
if (state.sharingBySelf) {
|
|
355
|
+
secondaryWindow = {
|
|
356
|
+
type: _type2.FcrUIDisplayDistributionContentType.HIDDEN
|
|
357
|
+
};
|
|
358
|
+
} else {
|
|
359
|
+
// 如果不是自己在共享,则副屏显示共享内容
|
|
360
|
+
secondaryWindow = {
|
|
361
|
+
type: state.sharingType,
|
|
362
|
+
content: state.sharingStreamId
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
mainWindow: mainWindow,
|
|
367
|
+
secondaryWindow: secondaryWindow
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* 没有屏幕共享时
|
|
373
|
+
*/
|
|
374
|
+
// 参会人数少于2人时,主副屏都显示自己
|
|
375
|
+
if (state.participantCount < 2) {
|
|
376
|
+
return {
|
|
377
|
+
mainWindow: {
|
|
378
|
+
type: _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA
|
|
379
|
+
},
|
|
380
|
+
secondaryWindow: {
|
|
381
|
+
type: _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// 参会人数为2人时,主屏显示对方,副屏显示自己
|
|
387
|
+
if (state.participantCount === 2) {
|
|
388
|
+
return {
|
|
389
|
+
mainWindow: {
|
|
390
|
+
type: _type2.FcrUIDisplayDistributionContentType.REMOTE_CAMERA
|
|
391
|
+
},
|
|
392
|
+
secondaryWindow: {
|
|
393
|
+
type: _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// 多人,主屏显示所有人,副屏显示我自己
|
|
399
|
+
return {
|
|
400
|
+
mainWindow: {
|
|
401
|
+
type: state.layoutMode,
|
|
402
|
+
participants: _type2.FcrUIDisplayDistributionParticipants.ALL
|
|
403
|
+
},
|
|
404
|
+
secondaryWindow: {
|
|
405
|
+
type: _type2.FcrUIDisplayDistributionContentType.LOCAL_CAMERA
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
var distribution = calculateContentDistribution(state);
|
|
410
|
+
this._mainWindowContentType = distribution.mainWindow.type;
|
|
411
|
+
this._secondaryWindowContentType = distribution.secondaryWindow.type;
|
|
412
|
+
this._contentDistribution = distribution;
|
|
413
|
+
this._logger.info("getContentDistribution: ".concat(JSON.stringify(distribution)));
|
|
414
|
+
return distribution;
|
|
415
|
+
}
|
|
416
|
+
}, {
|
|
417
|
+
key: "_setDisplayState",
|
|
418
|
+
value: function _setDisplayState(state) {
|
|
419
|
+
this._logger.info("setDisplayState: ".concat(JSON.stringify(state)));
|
|
420
|
+
this._displayState = _objectSpread(_objectSpread({}, this._displayState), state);
|
|
421
|
+
this._handleContentDistributionUpdated();
|
|
422
|
+
}
|
|
423
|
+
}, {
|
|
424
|
+
key: "_addReaction",
|
|
425
|
+
value: function _addReaction() {
|
|
426
|
+
var _this = this;
|
|
427
|
+
this._disposers.push((0, _mobx.reaction)(function () {
|
|
428
|
+
return _this._sharedSettingDataSource.setting.isDualDisplayMode;
|
|
429
|
+
}, function (isDualDisplayMode) {
|
|
430
|
+
_this._setDisplayState({
|
|
431
|
+
isSecondaryWindowModeEnabled: getIsSecondaryWindowModeEnabled(_this._displayCount, isDualDisplayMode)
|
|
432
|
+
});
|
|
433
|
+
}), (0, _mobx.reaction)(function () {
|
|
434
|
+
return _this._sharedMemberDataSource.totalUserCount;
|
|
435
|
+
}, function (participantCount) {
|
|
436
|
+
_this._setDisplayState({
|
|
437
|
+
participantCount: participantCount
|
|
438
|
+
});
|
|
439
|
+
}), (0, _mobx.reaction)(function () {
|
|
440
|
+
return _this._sharedVideoWindowDataSource.layoutType;
|
|
441
|
+
}, function (layoutMode) {
|
|
442
|
+
_this._setDisplayState({
|
|
443
|
+
layoutMode: layoutMode
|
|
444
|
+
});
|
|
445
|
+
}), (0, _mobx.reaction)(function () {
|
|
446
|
+
return _this._sharingProvider.screenSharingState;
|
|
447
|
+
}, function () {
|
|
448
|
+
var state = _objectSpread({}, _this._displayState);
|
|
449
|
+
_this._handleScreenSharingState(state);
|
|
450
|
+
_this._setDisplayState(state);
|
|
451
|
+
}), (0, _mobx.reaction)(function () {
|
|
452
|
+
return _this._sharingProvider.whiteboardState;
|
|
453
|
+
}, function () {
|
|
454
|
+
var state = _objectSpread({}, _this._displayState);
|
|
455
|
+
_this._handleWhiteboardState(state);
|
|
456
|
+
_this._setDisplayState(state);
|
|
457
|
+
}));
|
|
458
|
+
}
|
|
459
|
+
}, {
|
|
460
|
+
key: "_getSharingStream",
|
|
461
|
+
value: function _getSharingStream(ownerId) {
|
|
462
|
+
var stream = this._sharedVideoWindowDataSource.mainList.find(function (item) {
|
|
463
|
+
return item.userId === ownerId;
|
|
464
|
+
});
|
|
465
|
+
if (!stream) {
|
|
466
|
+
this._logger.warn("No sharing stream found for ownerId: ".concat(ownerId));
|
|
467
|
+
}
|
|
468
|
+
return stream;
|
|
469
|
+
}
|
|
470
|
+
}, {
|
|
471
|
+
key: "_handleDisplayCountUpdated",
|
|
472
|
+
value: function _handleDisplayCountUpdated() {
|
|
473
|
+
var count = window.runtime.screen.getAllDisplays().length;
|
|
474
|
+
this._logger.info("notify observers of display count update, prevCont: ".concat(this._displayCount, ", count: ").concat(count));
|
|
475
|
+
this._displayCount = count;
|
|
476
|
+
this._observers.notifyObservers('onDisplayCountUpdated', count);
|
|
477
|
+
var isSecondaryWindowModeEnabled = getIsSecondaryWindowModeEnabled(count, this._sharedSettingDataSource.setting.isDualDisplayMode);
|
|
478
|
+
if (this._displayState.isSecondaryWindowModeEnabled !== isSecondaryWindowModeEnabled) {
|
|
479
|
+
var state = {
|
|
480
|
+
isSecondaryWindowModeEnabled: isSecondaryWindowModeEnabled
|
|
481
|
+
};
|
|
482
|
+
var _this$_displayState = this._displayState,
|
|
483
|
+
sharingBySelf = _this$_displayState.sharingBySelf,
|
|
484
|
+
isSharingScreen = _this$_displayState.isSharingScreen;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* 正在共享的显示器被拔出时,会先触发 FcrUIScreenShareProvider 的 _handleScreenCaptureStateUpdated,然后才触发显示器的移除事件。
|
|
488
|
+
* _handleScreenCaptureStateUpdated 内会设置 localUserScreenSharingState。
|
|
489
|
+
* _sharingProvider.screenSharingState 是通过 fcr core 内的事件设置的,存在延迟的情况。
|
|
490
|
+
*
|
|
491
|
+
* 有一种异常情况:当正在共享的显示器被移除时,本地先关闭屏幕共享,然后才触发显示器移除事件,此时双屏显示处于禁用状态。
|
|
492
|
+
* 这时应该根据屏幕共享的状态来决定是否更新主窗口、悬浮视频窗的显示状态。
|
|
493
|
+
* 但是因为 _sharingProvider.screenSharingState 存在延迟,会导窗口显示异常。
|
|
494
|
+
* 所以这里需要判断 localUserScreenSharingState 和 screenSharingState 是否一致
|
|
495
|
+
* 如果不一致,则重置 displayState 内与屏幕共享相关的状态。
|
|
496
|
+
*/
|
|
497
|
+
var isLocalUserNotScreenSharing = this._sharedScreenShareDataSource.localUserScreenSharingState !== _type.FcrMediaSourceState.OPEN;
|
|
498
|
+
var isSharingScreenBySelf = sharingBySelf && isSharingScreen;
|
|
499
|
+
if (!isSecondaryWindowModeEnabled && isSharingScreenBySelf && isLocalUserNotScreenSharing) {
|
|
500
|
+
state.isSharing = false;
|
|
501
|
+
state.sharingBySelf = false;
|
|
502
|
+
state.sharingType = undefined;
|
|
503
|
+
state.sharingStreamId = '';
|
|
504
|
+
state.isSharingScreen = false;
|
|
505
|
+
}
|
|
506
|
+
this._setDisplayState(state);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}, {
|
|
510
|
+
key: "_handleContentDistributionUpdated",
|
|
511
|
+
value: function _handleContentDistributionUpdated() {
|
|
512
|
+
var distribution = this._getContentDistribution();
|
|
513
|
+
if (distribution.secondaryWindow.type === 'hidden') {
|
|
514
|
+
// this._fcrUIMainWindowRenderer.notifyObservers('onSecondaryWindowHidden');
|
|
515
|
+
this._fcrUIMainWindowRenderer.removeAllObservers();
|
|
516
|
+
} else {
|
|
517
|
+
this._fcrUIMainWindowRenderer.addObserver(this._sharedWhiteboardDataSource.toolbarStateObserver);
|
|
518
|
+
}
|
|
519
|
+
this._logger.info('notify observers of content distribution update');
|
|
520
|
+
this._observers.notifyObservers('onContentDistributionUpdated', distribution);
|
|
521
|
+
}
|
|
522
|
+
}, {
|
|
523
|
+
key: "_initDisplayState",
|
|
524
|
+
value: function _initDisplayState() {
|
|
525
|
+
var state = _objectSpread({}, this._displayState);
|
|
526
|
+
var _this$_sharingProvide = this._sharingProvider,
|
|
527
|
+
screenSharingState = _this$_sharingProvide.screenSharingState,
|
|
528
|
+
whiteboardState = _this$_sharingProvide.whiteboardState;
|
|
529
|
+
state.layoutMode = this._sharedVideoWindowDataSource.layoutType;
|
|
530
|
+
state.participantCount = this._sharedMemberDataSource.totalUserCount;
|
|
531
|
+
state.isSecondaryWindowModeEnabled = getIsSecondaryWindowModeEnabled(this._displayCount, this._sharedSettingDataSource.setting.isDualDisplayMode);
|
|
532
|
+
if (screenSharingState !== _type.FcrScreenSharingState.END) {
|
|
533
|
+
this._handleScreenSharingState(state);
|
|
534
|
+
}
|
|
535
|
+
if (whiteboardState !== _type.FcrWhiteboardState.END) {
|
|
536
|
+
this._handleWhiteboardState(state);
|
|
537
|
+
}
|
|
538
|
+
this._setDisplayState(state);
|
|
539
|
+
}
|
|
540
|
+
}, {
|
|
541
|
+
key: "_handleScreenSharingState",
|
|
542
|
+
value: function _handleScreenSharingState(state) {
|
|
543
|
+
var sharingProvider = this._sharingProvider;
|
|
544
|
+
if (sharingProvider.screenSharingState === _type.FcrScreenSharingState.END) {
|
|
545
|
+
state.isSharing = false;
|
|
546
|
+
state.sharingBySelf = false;
|
|
547
|
+
state.sharingType = undefined;
|
|
548
|
+
state.sharingStreamId = '';
|
|
549
|
+
state.isSharingScreen = false;
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
var stream = this._getSharingStream(sharingProvider.screenSharingOwnerId);
|
|
553
|
+
state.isSharing = true;
|
|
554
|
+
state.isSharingScreen = true;
|
|
555
|
+
if (stream) {
|
|
556
|
+
state.sharingBySelf = stream.isMySelf;
|
|
557
|
+
state.sharingStreamId = stream.videoStreamId || '';
|
|
558
|
+
}
|
|
559
|
+
switch (sharingProvider.screenSharingState) {
|
|
560
|
+
case _type.FcrScreenSharingState.START_ONLY_SCREEN:
|
|
561
|
+
state.sharingType = _type2.FcrUIDisplayDistributionContentType.SHARING_SCREEN;
|
|
562
|
+
break;
|
|
563
|
+
case _type.FcrScreenSharingState.START_WHIT_ANNOTATION:
|
|
564
|
+
state.sharingType = _type2.FcrUIDisplayDistributionContentType.SHARING_SCREEN_WITH_ANNOTATION;
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}, {
|
|
569
|
+
key: "_handleWhiteboardState",
|
|
570
|
+
value: function _handleWhiteboardState(state) {
|
|
571
|
+
var sharingProvider = this._sharingProvider;
|
|
572
|
+
if (sharingProvider.whiteboardState === _type.FcrWhiteboardState.END) {
|
|
573
|
+
state.isSharing = false;
|
|
574
|
+
state.sharingBySelf = false;
|
|
575
|
+
state.sharingType = undefined;
|
|
576
|
+
state.isSharingBoard = false;
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
state.isSharing = true;
|
|
580
|
+
state.sharingBySelf = sharingProvider.whiteboardOwnerId === this._userId;
|
|
581
|
+
state.sharingType = _type2.FcrUIDisplayDistributionContentType.SHARING_WHITEBOARD;
|
|
582
|
+
state.isSharingBoard = true;
|
|
583
|
+
}
|
|
584
|
+
}]);
|
|
585
|
+
}();
|
|
586
|
+
_FcrUIMultiDisplayProviderImpl = FcrUIMultiDisplayProviderImpl;
|
|
587
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIMultiDisplayProviderImpl, [[_mobx.observable, 1, "_displayCount"], [_mobx.observable, 1, "_displayState"], [_mobx.observable, 1, "_secondaryWindowContentType"], [_mobx.observable, 1, "_mainWindowContentType"], [_imports.bound, 2, "moveMainWindowToIndexLeastDisplay"], [_imports.bound, 2, "showMainWindowInIndexLeastDisplay"], [_imports.bound, 2, "setMainWindowMaximize"], [_imports.bound, 2, "_handleDisplayCountUpdated"]], []).e, 5);
|
|
588
|
+
_init__displayCount = _applyDecs$e[0];
|
|
589
|
+
_init__displayState = _applyDecs$e[1];
|
|
590
|
+
_init__secondaryWindowContentType = _applyDecs$e[2];
|
|
591
|
+
_init__mainWindowContentType = _applyDecs$e[3];
|
|
592
|
+
_initProto = _applyDecs$e[4];
|
|
593
|
+
(0, _base.registerDependency)('multiDisplayProvider');
|
|
@@ -130,9 +130,8 @@ export interface FcrUIPrivilegeProvider {
|
|
|
130
130
|
hasMutePermission(targetRole: FcrPrivilegeUserRole | FcrUserRole): boolean;
|
|
131
131
|
/**
|
|
132
132
|
* 是否有权限停止对方的屏幕共享
|
|
133
|
-
* @param targetRole 目标角色
|
|
134
133
|
*/
|
|
135
|
-
hasStopScreenSharePermission(
|
|
134
|
+
hasStopScreenSharePermission(): boolean;
|
|
136
135
|
/**
|
|
137
136
|
* 是否有权限取消静音(让目标角色可以开麦)
|
|
138
137
|
* @param targetRole 目标角色
|
|
@@ -291,11 +290,6 @@ export interface FcrUIPrivilegeProvider {
|
|
|
291
290
|
* 是否允许开启白板
|
|
292
291
|
*/
|
|
293
292
|
hasStartBoardPermission(): boolean;
|
|
294
|
-
/**
|
|
295
|
-
* 是否允许关闭指定角色的白板
|
|
296
|
-
* @param targerRole 目标角色
|
|
297
|
-
*/
|
|
298
|
-
hasCloseBoardPermission(targerRole: FcrPrivilegeUserRole | FcrUserRole): boolean;
|
|
299
293
|
/**
|
|
300
294
|
* 是否允许在白板上书写
|
|
301
295
|
*/
|
|
@@ -385,9 +379,8 @@ export interface FcrUIPrivilegeProvider {
|
|
|
385
379
|
setAllowWaterMarkLine(isWaterMarkEnabled: boolean, type?: FcrLineType): void;
|
|
386
380
|
/**
|
|
387
381
|
* 是否有权限停止他人屏幕共享
|
|
388
|
-
* @param targetRole 目标角色
|
|
389
382
|
*/
|
|
390
|
-
hasStopScreenSharePermission(
|
|
383
|
+
hasStopScreenSharePermission(): boolean;
|
|
391
384
|
/**
|
|
392
385
|
* 将房间内所有用户静音
|
|
393
386
|
*/
|
|
@@ -508,7 +501,7 @@ export declare class FcrUIPrivilegeProviderImpl implements FcrUIPrivilegeProvide
|
|
|
508
501
|
isWaterMarkEnabled: () => boolean;
|
|
509
502
|
hasWaitingRoomPermission: (role?: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
510
503
|
hasMutePermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
511
|
-
hasStopScreenSharePermission: (
|
|
504
|
+
hasStopScreenSharePermission: () => boolean;
|
|
512
505
|
hasUnmutePermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
513
506
|
hasRequestStartAudioPermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
514
507
|
hasRequestStartVideoPermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
@@ -546,7 +539,6 @@ export declare class FcrUIPrivilegeProviderImpl implements FcrUIPrivilegeProvide
|
|
|
546
539
|
hasEndRoomPermission: () => boolean;
|
|
547
540
|
hasAssignHostBeforeLeavingPermission: (role: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
548
541
|
hasStartBoardPermission: () => boolean;
|
|
549
|
-
hasCloseBoardPermission: (targerRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
550
542
|
hasWriteBoardPermission: () => boolean;
|
|
551
543
|
hasAnnotationStartPermission: () => boolean;
|
|
552
544
|
hasAnnotationAllowWritePermission: () => boolean;
|