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
|
@@ -6,13 +6,16 @@ require("core-js/modules/es.symbol.to-primitive.js");
|
|
|
6
6
|
require("core-js/modules/es.error.cause.js");
|
|
7
7
|
require("core-js/modules/es.error.to-string.js");
|
|
8
8
|
require("core-js/modules/es.array.is-array.js");
|
|
9
|
+
require("core-js/modules/es.array.iterator.js");
|
|
9
10
|
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.bind.js");
|
|
10
12
|
require("core-js/modules/es.function.name.js");
|
|
11
13
|
require("core-js/modules/es.map.js");
|
|
12
14
|
require("core-js/modules/es.number.constructor.js");
|
|
13
15
|
require("core-js/modules/es.object.create.js");
|
|
14
16
|
require("core-js/modules/es.object.define-property.js");
|
|
15
17
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
|
+
require("core-js/modules/es.string.iterator.js");
|
|
16
19
|
require("core-js/modules/esnext.function.metadata.js");
|
|
17
20
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
18
21
|
require("core-js/modules/esnext.map.emplace.js");
|
|
@@ -29,6 +32,7 @@ require("core-js/modules/esnext.map.reduce.js");
|
|
|
29
32
|
require("core-js/modules/esnext.map.some.js");
|
|
30
33
|
require("core-js/modules/esnext.map.update.js");
|
|
31
34
|
require("core-js/modules/esnext.symbol.metadata.js");
|
|
35
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
32
36
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
33
37
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
34
38
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -41,32 +45,24 @@ require("core-js/modules/es.array.filter.js");
|
|
|
41
45
|
require("core-js/modules/es.array.find.js");
|
|
42
46
|
require("core-js/modules/es.array.for-each.js");
|
|
43
47
|
require("core-js/modules/es.array.includes.js");
|
|
44
|
-
require("core-js/modules/es.array.iterator.js");
|
|
45
48
|
require("core-js/modules/es.array.map.js");
|
|
46
49
|
require("core-js/modules/es.array.push.js");
|
|
47
50
|
require("core-js/modules/es.date.to-json.js");
|
|
48
|
-
require("core-js/modules/es.function.bind.js");
|
|
49
51
|
require("core-js/modules/es.json.stringify.js");
|
|
50
52
|
require("core-js/modules/es.object.keys.js");
|
|
51
53
|
require("core-js/modules/es.object.to-string.js");
|
|
52
|
-
require("core-js/modules/es.promise.js");
|
|
53
54
|
require("core-js/modules/es.regexp.constructor.js");
|
|
54
55
|
require("core-js/modules/es.regexp.dot-all.js");
|
|
55
56
|
require("core-js/modules/es.regexp.exec.js");
|
|
56
57
|
require("core-js/modules/es.regexp.sticky.js");
|
|
57
58
|
require("core-js/modules/es.regexp.test.js");
|
|
58
59
|
require("core-js/modules/es.regexp.to-string.js");
|
|
59
|
-
require("core-js/modules/es.string.iterator.js");
|
|
60
|
-
require("core-js/modules/es.weak-map.js");
|
|
61
60
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
62
61
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
63
62
|
require("core-js/modules/esnext.iterator.find.js");
|
|
64
63
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
65
64
|
require("core-js/modules/esnext.iterator.map.js");
|
|
66
|
-
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
67
|
-
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
68
65
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
69
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
70
66
|
require("core-js/modules/web.timers.js");
|
|
71
67
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
72
68
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -77,32 +73,25 @@ var _react = require("react");
|
|
|
77
73
|
var _constant = require("../../utilities/constant");
|
|
78
74
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
79
75
|
var _rendererEvent = require("../../utilities/renderer-event");
|
|
80
|
-
var _type = require("
|
|
76
|
+
var _type = require("fcr-core/lib/type");
|
|
81
77
|
var _annotationProvider = require("../../providers/annotation-provider");
|
|
82
78
|
var _mobx = require("mobx");
|
|
83
79
|
var _fcrCore = require("fcr-core");
|
|
84
80
|
var _type2 = require("fcr-core/lib/room-control/sharing-control/type");
|
|
85
81
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
86
82
|
var _logger = require("../../utilities/logger");
|
|
87
|
-
var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
|
|
88
83
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
89
84
|
var _type3 = require("../whiteboard/type");
|
|
90
|
-
var _type4 = require("fcr-core/lib/type");
|
|
91
85
|
var _annotationToolbarStore = require("./annotation-toolbar-store");
|
|
86
|
+
var _sharedStorage = require("../../utilities/shared-storage");
|
|
92
87
|
var _AnnotationStore;
|
|
93
|
-
var _initProto,
|
|
94
|
-
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
95
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
96
|
-
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
97
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
98
|
-
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"); }
|
|
88
|
+
var _initProto, _handleBoardDomLoadDecs, _closeAnnotationDecs, _mountDecs, _ref;
|
|
99
89
|
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)]; } }; }
|
|
100
90
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
101
91
|
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); }
|
|
102
92
|
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; }
|
|
103
93
|
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; }
|
|
104
|
-
|
|
105
|
-
_ref = (_handleReceiverBoardDecs = [_mobx.action, _mobx.action.bound], _handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _handleBoardContainerDomLoadDecs = [_mobx.action, _mobx.action.bound], _annotationaEndEffectThenCloseBoardDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _annotationStartTriggerEffectDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
94
|
+
_ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeAnnotationDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
106
95
|
var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
107
96
|
function AnnotationStore(_ref2) {
|
|
108
97
|
var _this = this;
|
|
@@ -115,21 +104,20 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
115
104
|
sharedScreenSharedDataSource = _ref2.sharedScreenSharedDataSource,
|
|
116
105
|
privilegeProvider = _ref2.privilegeProvider,
|
|
117
106
|
messageProvider = _ref2.messageProvider,
|
|
118
|
-
localStorageProvider = _ref2.localStorageProvider,
|
|
119
107
|
eventProvider = _ref2.eventProvider,
|
|
120
108
|
abilityProvider = _ref2.abilityProvider,
|
|
121
|
-
sharedAnnotationDataSource = _ref2.sharedAnnotationDataSource
|
|
109
|
+
sharedAnnotationDataSource = _ref2.sharedAnnotationDataSource,
|
|
110
|
+
sharedConfigDataSource = _ref2.sharedConfigDataSource;
|
|
122
111
|
(0, _classCallCheck2["default"])(this, AnnotationStore);
|
|
123
112
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
124
113
|
prefix: 'AnnotationStore'
|
|
125
114
|
})));
|
|
126
115
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
127
|
-
(0, _defineProperty2["default"])(this, "_annotationControl", undefined);
|
|
128
116
|
(0, _defineProperty2["default"])(this, "_resizeWatcherTimer", null);
|
|
129
117
|
(0, _defineProperty2["default"])(this, "_shareScreenOwnerId", '');
|
|
130
118
|
(0, _defineProperty2["default"])(this, "_currentShareInfo", {
|
|
131
119
|
id: '',
|
|
132
|
-
type: _type.
|
|
120
|
+
type: _type.FcrScreenCaptureType.SCREEN,
|
|
133
121
|
bounds: {
|
|
134
122
|
x: 0,
|
|
135
123
|
y: 0,
|
|
@@ -153,82 +141,52 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
153
141
|
(0, _defineProperty2["default"])(this, "_annotationObserver", {
|
|
154
142
|
onConnectionStateUpdated: this._handleOnAnnotationConnectionStateUpdated
|
|
155
143
|
});
|
|
156
|
-
// 接收端是否全部的前提工作都做完了,做完了,放出承载节点
|
|
157
|
-
// 在承载节点的handleDomLoaded后,挂载白板
|
|
158
|
-
_classPrivateFieldInitSpec(this, _A, _init_receiverAllOpenStateReady(this, false));
|
|
159
|
-
(0, _defineProperty2["default"])(this, "_toolbarStore", undefined);
|
|
160
|
-
(0, _defineProperty2["default"])(this, "_boardOriginWidth", 0);
|
|
161
144
|
(0, _defineProperty2["default"])(this, "_prevSetLocalVideoSize", {
|
|
162
145
|
width: 0,
|
|
163
146
|
height: 0
|
|
164
147
|
});
|
|
165
|
-
(0, _defineProperty2["default"])(this, "_mounted", false);
|
|
166
148
|
(0, _defineProperty2["default"])(this, "_streamObserver", {
|
|
167
|
-
onLocalVideoStatsUpdated: this._handleOnLocalVideoStatsUpdated
|
|
149
|
+
onLocalVideoStatsUpdated: this._handleOnLocalVideoStatsUpdated
|
|
168
150
|
});
|
|
169
|
-
(0, _defineProperty2["default"])(this, "_annotationEndLock", null);
|
|
170
|
-
localStorageProvider.write('annotation_nickname', memberDataSource.localUser.userName);
|
|
171
151
|
this._dialogProvider = dialogProvider;
|
|
172
152
|
this._annotationProvider = annotationProvider;
|
|
173
153
|
this._sharingProvider = sharingProvider;
|
|
174
154
|
this._memberDataSource = memberDataSource;
|
|
175
155
|
this._roomControl = roomControl;
|
|
176
|
-
this._streamControl = this._roomControl.getStreamControl();
|
|
177
|
-
this._streamControl.addObserver(this._streamObserver);
|
|
178
156
|
this._sharedSecuritySharedDataSource = sharedSecuritySharedDataSource;
|
|
179
157
|
this._sharedScreenSharedDataSource = sharedScreenSharedDataSource;
|
|
180
|
-
this._dialogProvider.addObserver(this._dialogObserver);
|
|
181
158
|
this._privilegeProvider = privilegeProvider;
|
|
182
159
|
this._messageProvider = messageProvider;
|
|
183
160
|
this._eventProvider = eventProvider;
|
|
184
161
|
this._abilityProvider = abilityProvider;
|
|
185
162
|
this._sharedAnnotationDataSource = sharedAnnotationDataSource;
|
|
163
|
+
this._streamControl = this._roomControl.getStreamControl();
|
|
186
164
|
this._sharingControl = this._sharingProvider.getSharingControl();
|
|
165
|
+
this._annotationControl = this._sharingProvider.getSharingControl().getAnnotationControl();
|
|
166
|
+
this._dialogProvider.addObserver(this._dialogObserver);
|
|
167
|
+
this._streamControl.addObserver(this._streamObserver);
|
|
187
168
|
this._sharingControl.addObserver(this._sharingObserver);
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
169
|
+
this._annotationControl.addObserver(this._annotationObserver);
|
|
170
|
+
this._toolbarStore = new _annotationToolbarStore.AnnotationReceiverToolbarStore(this._annotationControl, this._roomControl, this._eventProvider, this._sharedAnnotationDataSource);
|
|
171
|
+
var screenSharingOwner = this._sharedScreenSharedDataSource.screenSharingOwner;
|
|
172
|
+
var screenShareOwnerExists = !!screenSharingOwner;
|
|
173
|
+
var isAnnotationActive = this._sharingControl.getScreenSharingState() === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION;
|
|
174
|
+
if (screenShareOwnerExists) {
|
|
175
|
+
this._shareScreenOwnerId = screenSharingOwner.userId;
|
|
176
|
+
if (isAnnotationActive) {
|
|
177
|
+
this._openAnnotation();
|
|
194
178
|
}
|
|
195
179
|
}
|
|
196
|
-
this._disposers.push(
|
|
197
|
-
// reaction(
|
|
198
|
-
// () => this.annotating,
|
|
199
|
-
// (annotating) => {
|
|
200
|
-
// if (this._isLocalUserSharingOwner) {
|
|
201
|
-
// if (annotating) {
|
|
202
|
-
// this._removeWindowResizeListenner();
|
|
203
|
-
// } else {
|
|
204
|
-
// this._addWindowResizeListenner();
|
|
205
|
-
// }
|
|
206
|
-
// }
|
|
207
|
-
// },
|
|
208
|
-
// ),
|
|
209
|
-
// reaction(
|
|
210
|
-
// () => this._sharedScreenSharedDataSource.screenShareVideoRatio,
|
|
211
|
-
// (ratio) => {
|
|
212
|
-
// if (ratio > 0) {
|
|
213
|
-
// this.handleReceiverBoard(ratio);
|
|
214
|
-
// }
|
|
215
|
-
// },
|
|
216
|
-
// ),
|
|
217
|
-
(0, _mobx.reaction)(function () {
|
|
180
|
+
this._disposers.push((0, _mobx.reaction)(function () {
|
|
218
181
|
return _this.sharingInReplace;
|
|
219
182
|
}, function (sharingInReplace) {
|
|
220
183
|
// web 被替换时不需要走这个逻辑
|
|
221
184
|
if (sharingInReplace && (0, _env.isElectron)() && _this._isLocalUserSharingOwner) {
|
|
222
|
-
// await new Promise((resolve) => {
|
|
223
|
-
// // 延迟两秒,等待标注内容清理,清理方法在 sdk 中虽然看起来是同步的,但是实际上会有无法清理的情况出现
|
|
224
|
-
// sendEvent({ action: ToolbarEvents.CLEAN, payload: null });
|
|
225
|
-
// setTimeout(() => resolve(true), 1000);
|
|
226
|
-
// });
|
|
227
185
|
(0, _rendererEvent.sendEvent)({
|
|
228
186
|
action: _type3.ToolbarEvents.CLEAN,
|
|
229
187
|
payload: null
|
|
230
188
|
});
|
|
231
|
-
_this.logger.info("
|
|
189
|
+
_this.logger.info("sharingInReplace changed to ".concat(sharingInReplace, ", currentShareInfo is ").concat(JSON.stringify(_this._currentShareInfo)));
|
|
232
190
|
_this._removeWindowResizeListenner();
|
|
233
191
|
_this._annotationProvider.hideAnnotationWindow();
|
|
234
192
|
_this._annotationProvider.setBoundsToAnnotationWindow();
|
|
@@ -236,19 +194,11 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
236
194
|
return _this.screenSharingStarted(true);
|
|
237
195
|
}, 200);
|
|
238
196
|
}
|
|
239
|
-
}), (0, _mobx.reaction)(function () {
|
|
240
|
-
return _this.annotationHasStart;
|
|
241
|
-
}, function (hasStart) {
|
|
242
|
-
if (hasStart && !_this._isLocalUserSharingOwner) {
|
|
243
|
-
/** 不是发起端并且annotation白板变为了连接状态 */
|
|
244
|
-
_this.logger.info('[Annotation] start step2 ===> annotation board has connected, then we trigger effect');
|
|
245
|
-
_this._annotationStartTriggerEffect();
|
|
246
|
-
}
|
|
247
197
|
}), (0, _mobx.reaction)(function () {
|
|
248
198
|
return _this._sharedScreenSharedDataSource.localUserScreenSharingState;
|
|
249
199
|
}, function (state) {
|
|
250
200
|
if (state === _fcrCore.FcrMediaSourceState.CLOSE && _this._isLocalUserSharingOwner) {
|
|
251
|
-
_this.logger.info('
|
|
201
|
+
_this.logger.info('localUserScreenSharingState is close, isReplaceScreen is ', _this.sharingInReplace);
|
|
252
202
|
if (!_this.sharingInReplace && (0, _env.isElectron)()) {
|
|
253
203
|
_this._annotationProvider.closeAnnotationWindow();
|
|
254
204
|
_this._removeWindowResizeListenner();
|
|
@@ -265,24 +215,16 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
265
215
|
});
|
|
266
216
|
}
|
|
267
217
|
if (!canWrite) {
|
|
268
|
-
_this.
|
|
218
|
+
_this._annotationProvider.setIsShowToolbar(false);
|
|
269
219
|
}
|
|
270
|
-
}), (0, _mobx.reaction)(function () {
|
|
271
|
-
return _this.isShowToolbar;
|
|
272
|
-
}, function (isShow) {
|
|
273
|
-
var _this$_toolbarStore;
|
|
274
|
-
(_this$_toolbarStore = _this._toolbarStore) === null || _this$_toolbarStore === void 0 || _this$_toolbarStore.resetToolbarVars();
|
|
275
220
|
}));
|
|
221
|
+
(0, _sharedStorage.setAnnotationRtmAppId)(sharedConfigDataSource.creatorConfig.appId);
|
|
222
|
+
(0, _sharedStorage.setAnnotationNickName)(memberDataSource.localUser.userName);
|
|
223
|
+
|
|
224
|
+
// @ts-ignore
|
|
225
|
+
window._annotationStore = this;
|
|
276
226
|
}
|
|
277
227
|
return (0, _createClass2["default"])(AnnotationStore, [{
|
|
278
|
-
key: "receiverAllOpenStateReady",
|
|
279
|
-
get: function get() {
|
|
280
|
-
return _classPrivateFieldGet(_A, this);
|
|
281
|
-
},
|
|
282
|
-
set: function set(v) {
|
|
283
|
-
_classPrivateFieldSet(_A, this, v);
|
|
284
|
-
}
|
|
285
|
-
}, {
|
|
286
228
|
key: "screenShareVideoRatio",
|
|
287
229
|
get: function get() {
|
|
288
230
|
return this._sharedScreenSharedDataSource.screenShareVideoRatio;
|
|
@@ -386,239 +328,127 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
386
328
|
}, {
|
|
387
329
|
key: "currentTool",
|
|
388
330
|
get: function get() {
|
|
389
|
-
var _this$
|
|
390
|
-
return (_this$
|
|
331
|
+
var _this$_toolbarStore;
|
|
332
|
+
return (_this$_toolbarStore = this._toolbarStore) === null || _this$_toolbarStore === void 0 ? void 0 : _this$_toolbarStore.observables.currentTool;
|
|
391
333
|
}
|
|
392
334
|
}, {
|
|
393
335
|
key: "boardMainWindow",
|
|
394
336
|
get: function get() {
|
|
395
337
|
return this._sharedAnnotationDataSource.boardMainWindow;
|
|
396
338
|
}
|
|
397
|
-
}, {
|
|
398
|
-
key: "handleReceiverBoard",
|
|
399
|
-
value: function handleReceiverBoard(paramRatio) {
|
|
400
|
-
if (this._boardContainerDom && this._boardDom) {
|
|
401
|
-
var _this$boardMainWindow;
|
|
402
|
-
var _this$_boardContainer = this._boardContainerDom.getBoundingClientRect(),
|
|
403
|
-
height = _this$_boardContainer.height;
|
|
404
|
-
var ratio = (0, _isNumber["default"])(paramRatio) ? paramRatio : this._sharedScreenSharedDataSource.screenShareVideoRatio;
|
|
405
|
-
var newWidth = height * ratio;
|
|
406
|
-
this._boardOriginWidth = newWidth;
|
|
407
|
-
this._boardDom.style.width = "".concat(newWidth, "px");
|
|
408
|
-
this._boardDom.style.height = "".concat(height, "px");
|
|
409
|
-
(_this$boardMainWindow = this.boardMainWindow) === null || _this$boardMainWindow === void 0 || _this$boardMainWindow.updateWindowSize({
|
|
410
|
-
width: newWidth,
|
|
411
|
-
height: height
|
|
412
|
-
});
|
|
413
|
-
this.logger.info("[Annotation] [drawReceiverBoard] ratio: ".concat(ratio, ", width: ").concat(newWidth, " , height: ").concat(height));
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
339
|
}, {
|
|
417
340
|
key: "handleBoardDomLoad",
|
|
418
341
|
value: function handleBoardDomLoad(ref) {
|
|
342
|
+
var isDomChanged = this._boardDom !== ref;
|
|
419
343
|
this._boardDom = ref;
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
// this._boardOriginWidth = height * this._sharedScreenSharedDataSource.screenShareVideoRatio;
|
|
427
|
-
// }
|
|
428
|
-
this._mount();
|
|
429
|
-
} else {
|
|
430
|
-
this._mounted = false;
|
|
431
|
-
this._boardOriginWidth = 0;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}, {
|
|
435
|
-
key: "handleBoardContainerDomLoad",
|
|
436
|
-
value: function handleBoardContainerDomLoad(ref) {
|
|
437
|
-
if (ref) {
|
|
438
|
-
this._boardContainerDom = ref;
|
|
344
|
+
if (isDomChanged) {
|
|
345
|
+
if (ref) {
|
|
346
|
+
this._mount();
|
|
347
|
+
} else {
|
|
348
|
+
this.logger.info("board dom unmount");
|
|
349
|
+
}
|
|
439
350
|
}
|
|
440
351
|
}
|
|
441
352
|
}, {
|
|
442
353
|
key: "screenSharingStarted",
|
|
443
354
|
value: function screenSharingStarted(isReplaceScreen) {
|
|
444
355
|
this._currentShareInfo = this._annotationProvider.currentShareInfo;
|
|
445
|
-
this.logger.info("
|
|
356
|
+
this.logger.info("screenSharingStarting with currentShareInfo: ".concat(JSON.stringify(this._currentShareInfo)));
|
|
446
357
|
this._annotationProvider.setBoundsToAnnotationWindow();
|
|
447
358
|
this._removeWindowResizeListenner();
|
|
448
359
|
if (isReplaceScreen) {
|
|
449
360
|
this._annotationProvider.showAnnotationWindow();
|
|
450
361
|
} else {
|
|
451
362
|
this._annotationProvider.openAnnotationWindow();
|
|
452
|
-
this.logger.info('
|
|
363
|
+
this.logger.info('screenSharingStarted will add window resize listenner');
|
|
453
364
|
}
|
|
454
|
-
this.
|
|
365
|
+
this._addWindowResizeListener();
|
|
455
366
|
}
|
|
456
367
|
}, {
|
|
457
368
|
key: "release",
|
|
458
369
|
value: function release() {
|
|
459
|
-
this.
|
|
370
|
+
this._closeAnnotation();
|
|
371
|
+
this._removeWindowResizeListenner();
|
|
460
372
|
this._disposers.forEach(function (disposer) {
|
|
461
373
|
return disposer();
|
|
462
374
|
});
|
|
463
375
|
this._dialogProvider.removeObserver(this._dialogObserver);
|
|
464
376
|
this._streamControl.removeObserver(this._streamObserver);
|
|
465
377
|
this._sharingControl.removeObserver(this._sharingObserver);
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
468
|
-
}
|
|
469
|
-
}, {
|
|
470
|
-
key: "_clearCurrentAnnotationControl",
|
|
471
|
-
value: function _clearCurrentAnnotationControl() {
|
|
472
|
-
if (this._annotationControl) {
|
|
473
|
-
this._annotationControl.removeObserver(this._annotationObserver);
|
|
474
|
-
this._annotationControl = undefined;
|
|
475
|
-
}
|
|
378
|
+
this._annotationControl.removeObserver(this._annotationObserver);
|
|
379
|
+
this._toolbarStore.release();
|
|
476
380
|
}
|
|
477
381
|
}, {
|
|
478
|
-
key: "
|
|
479
|
-
value: function
|
|
480
|
-
|
|
481
|
-
var newAnnotationControl = this._sharingProvider.getSharingControl().getAnnotationControl();
|
|
482
|
-
this._annotationControl = newAnnotationControl;
|
|
483
|
-
newAnnotationControl === null || newAnnotationControl === void 0 || newAnnotationControl.addObserver(this._annotationObserver);
|
|
484
|
-
return this._annotationControl;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* 根据 发起屏幕共享状态,是startOnlyScreen,且自己本人是发起端
|
|
489
|
-
* 则发起端: 同步bounds与updateViewPort并进行打开fragment
|
|
490
|
-
*/
|
|
491
|
-
}, {
|
|
492
|
-
key: "_annotationSenderMainStart",
|
|
493
|
-
value: (function () {
|
|
494
|
-
var _annotationSenderMainStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
382
|
+
key: "_startShareScreen",
|
|
383
|
+
value: function () {
|
|
384
|
+
var _startShareScreen2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
495
385
|
return _regenerator["default"].wrap(function (_context) {
|
|
496
386
|
while (1) switch (_context.prev = _context.next) {
|
|
497
387
|
case 0:
|
|
498
388
|
this.logger.info('annotation sender main start');
|
|
499
|
-
if (
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
if (!this._annotationEndLock) {
|
|
504
|
-
_context.next = 1;
|
|
505
|
-
break;
|
|
389
|
+
if (this._isLocalUserSharingOwner) {
|
|
390
|
+
this.logger.info('annotation sender main start in sender branch');
|
|
391
|
+
this.screenSharingStarted(false);
|
|
506
392
|
}
|
|
507
|
-
this.logger.info('annotation sender main start in await lock');
|
|
508
|
-
_context.next = 1;
|
|
509
|
-
return this._annotationEndLock;
|
|
510
393
|
case 1:
|
|
511
|
-
this.logger.info('annotation sender main start in sender branch');
|
|
512
|
-
this.screenSharingStarted(false);
|
|
513
|
-
case 2:
|
|
514
394
|
case "end":
|
|
515
395
|
return _context.stop();
|
|
516
396
|
}
|
|
517
397
|
}, _callee, this);
|
|
518
398
|
}));
|
|
519
|
-
function
|
|
520
|
-
return
|
|
399
|
+
function _startShareScreen() {
|
|
400
|
+
return _startShareScreen2.apply(this, arguments);
|
|
521
401
|
}
|
|
522
|
-
return
|
|
402
|
+
return _startShareScreen;
|
|
523
403
|
}()
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}, {
|
|
530
|
-
key: "_annotationReceiverMainStart",
|
|
531
|
-
value: (function () {
|
|
532
|
-
var _annotationReceiverMainStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
404
|
+
}, {
|
|
405
|
+
key: "_openAnnotation",
|
|
406
|
+
value: function () {
|
|
407
|
+
var _openAnnotation2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
408
|
+
var screenShareOwnerId, localUserId, canStartAnnotation;
|
|
533
409
|
return _regenerator["default"].wrap(function (_context2) {
|
|
534
410
|
while (1) switch (_context2.prev = _context2.next) {
|
|
535
411
|
case 0:
|
|
536
|
-
this.
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
412
|
+
if (!this._isLocalUserSharingOwner) {
|
|
413
|
+
screenShareOwnerId = this._shareScreenOwnerId;
|
|
414
|
+
localUserId = this._memberDataSource.localUser.userId;
|
|
415
|
+
canStartAnnotation = this._checkIfAnnotationCanStart();
|
|
416
|
+
this.logger.info("can start annotation: ".concat(canStartAnnotation));
|
|
417
|
+
if (canStartAnnotation && screenShareOwnerId !== localUserId) {
|
|
418
|
+
this._annotationControl.open();
|
|
419
|
+
}
|
|
544
420
|
}
|
|
545
|
-
this.logger.info('[Annotation] receiver main start in await lock');
|
|
546
|
-
_context2.next = 1;
|
|
547
|
-
return this._annotationEndLock;
|
|
548
421
|
case 1:
|
|
549
|
-
this.logger.info('[Annotation] receiver main start in receiver branch');
|
|
550
|
-
this._connectAnnotaionBoard(this._shareScreenOwnerId);
|
|
551
|
-
case 2:
|
|
552
422
|
case "end":
|
|
553
423
|
return _context2.stop();
|
|
554
424
|
}
|
|
555
425
|
}, _callee2, this);
|
|
556
426
|
}));
|
|
557
|
-
function
|
|
558
|
-
return
|
|
427
|
+
function _openAnnotation() {
|
|
428
|
+
return _openAnnotation2.apply(this, arguments);
|
|
559
429
|
}
|
|
560
|
-
return
|
|
430
|
+
return _openAnnotation;
|
|
561
431
|
}()
|
|
562
|
-
/**
|
|
563
|
-
* 根据 1.白板的连接状态变为未连接状态 2.屏幕共享结束后
|
|
564
|
-
* 进行后置的 工具栏,画布清理和toast提示 + 关闭白板卸载节点的操作
|
|
565
|
-
*/
|
|
566
|
-
)
|
|
567
|
-
}, {
|
|
568
|
-
key: "_annotationaEndEffectThenCloseBoard",
|
|
569
|
-
value: function _annotationaEndEffectThenCloseBoard() {
|
|
570
|
-
var _this2 = this;
|
|
571
|
-
this._annotationEndLock = new Promise(function (resolve) {
|
|
572
|
-
try {
|
|
573
|
-
var _this2$_toolbarStore;
|
|
574
|
-
(_this2$_toolbarStore = _this2._toolbarStore) === null || _this2$_toolbarStore === void 0 || _this2$_toolbarStore.resetToolbarVars();
|
|
575
|
-
_this2._messageProvider.showToast({
|
|
576
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_toast_annotation_controls_screen_sharing_disabled'),
|
|
577
|
-
type: 'info'
|
|
578
|
-
});
|
|
579
|
-
_this2._setIsShowToolbar(false);
|
|
580
|
-
_this2._clearAnnotationWhiteboardToolbar();
|
|
581
|
-
_this2._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
|
|
582
|
-
_this2._unmount();
|
|
583
|
-
} catch (e) {} finally {
|
|
584
|
-
console.log('[Annotation]: annotation receiver end resolve');
|
|
585
|
-
resolve();
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
432
|
}, {
|
|
590
|
-
key: "
|
|
591
|
-
value: function
|
|
592
|
-
this.
|
|
433
|
+
key: "_closeAnnotation",
|
|
434
|
+
value: function _closeAnnotation() {
|
|
435
|
+
this._toolbarStore.resetToolbarVars();
|
|
436
|
+
this._annotationProvider.setIsShowToolbar(false);
|
|
437
|
+
this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
|
|
438
|
+
this._annotationControl.close();
|
|
593
439
|
}
|
|
594
440
|
}, {
|
|
595
441
|
key: "_mount",
|
|
596
442
|
value: function _mount() {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
this.
|
|
443
|
+
this.logger.info("start mount, board main window exists: ".concat(!!this.boardMainWindow, ", dom exists: ").concat(!!this._boardDom));
|
|
444
|
+
if (this.boardMainWindow && this._boardDom) {
|
|
445
|
+
if (this._boardDom.hasChildNodes()) {
|
|
446
|
+
this.logger.warn('mount board main window while board dom is not empty, clear it');
|
|
447
|
+
this._boardDom.innerHTML = '';
|
|
448
|
+
}
|
|
600
449
|
var view = this.boardMainWindow.getContentView();
|
|
601
450
|
this._boardDom.appendChild(view);
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}, {
|
|
606
|
-
key: "_unmount",
|
|
607
|
-
value: function _unmount() {
|
|
608
|
-
this.logger.info('[Annotation] unmount ');
|
|
609
|
-
if (this._mounted && this.boardMainWindow) {
|
|
610
|
-
this._deleteBoardDomContent();
|
|
611
|
-
this.logger.info('[Annotation] unmount remove mainWindow contentView');
|
|
612
|
-
this._close();
|
|
613
|
-
}
|
|
614
|
-
this._mounted = false;
|
|
615
|
-
}
|
|
616
|
-
}, {
|
|
617
|
-
key: "_close",
|
|
618
|
-
value: function _close() {
|
|
619
|
-
if (this._annotationControl) {
|
|
620
|
-
this.logger.info('[Annotation] core close');
|
|
621
|
-
this._annotationControl.close();
|
|
451
|
+
this.logger.info('finished mount mainWindow contentView');
|
|
622
452
|
}
|
|
623
453
|
}
|
|
624
454
|
}, {
|
|
@@ -644,7 +474,7 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
644
474
|
key: "_updateAnnotationBounds",
|
|
645
475
|
value: function _updateAnnotationBounds(bounds) {
|
|
646
476
|
if (bounds) this._currentShareInfo.bounds = bounds;
|
|
647
|
-
this.logger.info("
|
|
477
|
+
this.logger.info("update annotation bounds: ".concat(JSON.stringify(bounds), ", currentShareInfo: ").concat(JSON.stringify(this._currentShareInfo)));
|
|
648
478
|
(0, _rendererEvent.sendEvent)({
|
|
649
479
|
action: _constant.FcrUIRendererEventAction.SET_CURRENT_SHARE_SCREEN_BOUNDS,
|
|
650
480
|
payload: bounds || this._annotationProvider.currentShareInfo.bounds
|
|
@@ -655,10 +485,10 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
655
485
|
}, {
|
|
656
486
|
key: "_updateBoundsByActiveWindow",
|
|
657
487
|
value: function _updateBoundsByActiveWindow() {
|
|
658
|
-
var
|
|
488
|
+
var _this2 = this;
|
|
659
489
|
var windows = window.runtime.getWindows();
|
|
660
490
|
var activeWindow = windows.find(function (win) {
|
|
661
|
-
return win.id === +
|
|
491
|
+
return win.id === +_this2._currentShareInfo.id;
|
|
662
492
|
});
|
|
663
493
|
var _this$_currentShareIn = this._currentShareInfo,
|
|
664
494
|
id = _this$_currentShareIn.id,
|
|
@@ -675,86 +505,32 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
675
505
|
ax = _ref3.x,
|
|
676
506
|
ay = _ref3.y;
|
|
677
507
|
var isNewBounds = aw !== width || ah !== height || ax !== x || ay !== y;
|
|
678
|
-
// this.logger.info(
|
|
679
|
-
// `updateBoundsByActiveWindow ${JSON.stringify({
|
|
680
|
-
// activeBounds,
|
|
681
|
-
// width,
|
|
682
|
-
// height,
|
|
683
|
-
// isSharingWindow,
|
|
684
|
-
// isNewBounds,
|
|
685
|
-
// activeWindow,
|
|
686
|
-
// id,
|
|
687
|
-
// })}`,
|
|
688
|
-
// );
|
|
689
508
|
if (isSharingWindow && isNewBounds) {
|
|
690
509
|
this._updateAnnotationBounds(activeBounds);
|
|
691
|
-
// this.logger.info('The window bounds is the different as the current share bounds');
|
|
692
510
|
}
|
|
693
511
|
}
|
|
694
512
|
}, {
|
|
695
|
-
key: "
|
|
696
|
-
value: function
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}, 2000);
|
|
703
|
-
}
|
|
513
|
+
key: "_addWindowResizeListener",
|
|
514
|
+
value: function _addWindowResizeListener() {
|
|
515
|
+
// if (!this._resizeWatcherTimer && isElectron()) {
|
|
516
|
+
// this._resizeWatcherTimer = setInterval(() => {
|
|
517
|
+
// this._updateBoundsByActiveWindow();
|
|
518
|
+
// }, 2000);
|
|
519
|
+
// }
|
|
704
520
|
}
|
|
705
521
|
}, {
|
|
706
522
|
key: "_removeWindowResizeListenner",
|
|
707
523
|
value: function _removeWindowResizeListenner() {
|
|
708
|
-
if (this._resizeWatcherTimer &&
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}, {
|
|
714
|
-
key: "_checkSharingwindowBackupSize",
|
|
715
|
-
value: function _checkSharingwindowBackupSize() {
|
|
716
|
-
var size = this._sharingProvider.getSharingControl().getSharingWindowSize();
|
|
717
|
-
this.logger.info('[Annotation][checkSharingwindowBackupSize] default size: ', size);
|
|
718
|
-
return !!(size && size.width > 0 && size.height > 0);
|
|
719
|
-
}
|
|
720
|
-
}, {
|
|
721
|
-
key: "_setBoardDomWithBackupWindowSize",
|
|
722
|
-
value: function _setBoardDomWithBackupWindowSize(containerHeight) {
|
|
723
|
-
var size = this._sharingProvider.getSharingControl().getSharingWindowSize();
|
|
724
|
-
var getWidth = size.width;
|
|
725
|
-
var getHeight = size.height;
|
|
726
|
-
var ratio = getWidth / getHeight;
|
|
727
|
-
var newWidth = containerHeight * ratio;
|
|
728
|
-
this._boardOriginWidth = newWidth;
|
|
729
|
-
if (this._boardDom) {
|
|
730
|
-
var _this$boardMainWindow2;
|
|
731
|
-
this._boardDom.style.width = "".concat(newWidth, "px");
|
|
732
|
-
this._boardDom.style.height = "".concat(containerHeight, "px");
|
|
733
|
-
(_this$boardMainWindow2 = this.boardMainWindow) === null || _this$boardMainWindow2 === void 0 || _this$boardMainWindow2.updateWindowSize({
|
|
734
|
-
width: newWidth,
|
|
735
|
-
height: containerHeight
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
}, {
|
|
740
|
-
key: "_renewAnnotationWhiteboardToolbar",
|
|
741
|
-
value: function _renewAnnotationWhiteboardToolbar() {
|
|
742
|
-
this._toolbarStore = new _annotationToolbarStore.AnnotationReceiverToolbarStore(this._annotationControl, this._roomControl, this._annotationProvider, this._eventProvider, this._sharedAnnotationDataSource);
|
|
743
|
-
this.logger.info('[Annotation][renewAnnotationWhiteboardToolbar] is done');
|
|
744
|
-
this.receiverAllOpenStateReady = true;
|
|
745
|
-
}
|
|
746
|
-
}, {
|
|
747
|
-
key: "_clearAnnotationWhiteboardToolbar",
|
|
748
|
-
value: function _clearAnnotationWhiteboardToolbar() {
|
|
749
|
-
this._toolbarStore = undefined;
|
|
750
|
-
this.logger.info('[Annotation][clearAnnotationWhiteboardToolbar] is done');
|
|
751
|
-
this.receiverAllOpenStateReady = false;
|
|
524
|
+
// if (this._resizeWatcherTimer && isElectron()) {
|
|
525
|
+
// clearInterval(this._resizeWatcherTimer);
|
|
526
|
+
// this._resizeWatcherTimer = null;
|
|
527
|
+
// }
|
|
752
528
|
}
|
|
753
529
|
}, {
|
|
754
|
-
key: "
|
|
755
|
-
value: function
|
|
530
|
+
key: "_checkIfAnnotationCanStart",
|
|
531
|
+
value: function _checkIfAnnotationCanStart() {
|
|
756
532
|
var streams = this._streamControl.getStreams();
|
|
757
|
-
var
|
|
533
|
+
var notSupportPlatform = [_type.FcrPlatform.WEB_DESKTOP, _type.FcrPlatform.WEB_MOBILE, _type.FcrPlatform.IOS];
|
|
758
534
|
var streamLists = Object.keys(streams).map(function (key) {
|
|
759
535
|
return streams[key];
|
|
760
536
|
});
|
|
@@ -765,9 +541,10 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
765
541
|
}).filter(Boolean);
|
|
766
542
|
if (screenShareStreams.length > 0) {
|
|
767
543
|
var screenShareOwnerInfo = screenShareStreams[0];
|
|
768
|
-
var
|
|
769
|
-
this.logger.info("
|
|
770
|
-
|
|
544
|
+
var participantPlatform = screenShareOwnerInfo.owner.platform;
|
|
545
|
+
this.logger.info("current share participant platform: ".concat(participantPlatform));
|
|
546
|
+
notSupportPlatform.includes(participantPlatform);
|
|
547
|
+
if (!notSupportPlatform.includes(participantPlatform)) {
|
|
771
548
|
return true;
|
|
772
549
|
} else {
|
|
773
550
|
return false;
|
|
@@ -775,90 +552,30 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
775
552
|
}
|
|
776
553
|
return false;
|
|
777
554
|
}
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* 接收端step1
|
|
781
|
-
* 判断状态,打开批注(core: 进入房间,初始化白板APP)
|
|
782
|
-
*/
|
|
783
|
-
}, {
|
|
784
|
-
key: "_connectAnnotaionBoard",
|
|
785
|
-
value: function _connectAnnotaionBoard(screenShareOwnerId) {
|
|
786
|
-
if (this._participantShareCanWeAnnotation()) {
|
|
787
|
-
this.logger.info('[Annotation] we can receive annotation from share platform');
|
|
788
|
-
this._getCurrentAnnotationControl();
|
|
789
|
-
if (this._annotationControl) {
|
|
790
|
-
if (screenShareOwnerId !== this._memberDataSource.localUser.userId) {
|
|
791
|
-
this._deleteBoardDomContent();
|
|
792
|
-
this.logger.info('[Annotation] start step1 == > receiver enter core open');
|
|
793
|
-
this._annotationControl.open();
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* 接收端step2
|
|
801
|
-
* 白板连接成功,进行后置副作用操作
|
|
802
|
-
*/
|
|
803
|
-
}, {
|
|
804
|
-
key: "_annotationStartTriggerEffect",
|
|
805
|
-
value: (function () {
|
|
806
|
-
var _annotationStartTriggerEffect2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
807
|
-
return _regenerator["default"].wrap(function (_context3) {
|
|
808
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
809
|
-
case 0:
|
|
810
|
-
if (!this._annotationEndLock) {
|
|
811
|
-
_context3.next = 1;
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
this.logger.info('annotation start in await lock');
|
|
815
|
-
_context3.next = 1;
|
|
816
|
-
return this._annotationEndLock;
|
|
817
|
-
case 1:
|
|
818
|
-
this.logger.info('annotation start after await lock');
|
|
819
|
-
this._renewAnnotationWhiteboardToolbar();
|
|
820
|
-
case 2:
|
|
821
|
-
case "end":
|
|
822
|
-
return _context3.stop();
|
|
823
|
-
}
|
|
824
|
-
}, _callee3, this);
|
|
825
|
-
}));
|
|
826
|
-
function _annotationStartTriggerEffect() {
|
|
827
|
-
return _annotationStartTriggerEffect2.apply(this, arguments);
|
|
828
|
-
}
|
|
829
|
-
return _annotationStartTriggerEffect;
|
|
830
|
-
}())
|
|
831
555
|
}, {
|
|
832
556
|
key: "_handleOnScreenSharingUpdated",
|
|
833
557
|
value: function _handleOnScreenSharingUpdated(ownerStream, state) {
|
|
834
558
|
this._shareScreenOwnerId = (ownerStream === null || ownerStream === void 0 ? void 0 : ownerStream.owner.userId) || '';
|
|
835
|
-
// if (state === FcrScreenSharingState.START_WHIT_ANNOTATION) {
|
|
836
|
-
// this.logger.info('[Annotation] transaction main start');
|
|
837
|
-
// this._annotationMainStart();
|
|
838
|
-
// } else {
|
|
839
|
-
// this.logger.info('[Annotation] main end , because current sharing not with annotation');
|
|
840
|
-
// if (this._isLocalUserSharingOwner) {
|
|
841
|
-
// /** 屏幕共享的状态没有包含批注,当前是发起者,则关闭fragment */
|
|
842
|
-
// this._annotationProvider.closeAnnotationWindow();
|
|
843
|
-
// } else {
|
|
844
|
-
// /** 屏幕共享的状态没有包含批注,接收端进行总体的关闭 */
|
|
845
|
-
// this._annotationaEndEffectThenCloseBoard();
|
|
846
|
-
// }
|
|
847
|
-
// }
|
|
848
559
|
if (state === _type2.FcrScreenSharingState.START_ONLY_SCREEN) {
|
|
849
|
-
this.
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
this.
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
this.logger.info(
|
|
560
|
+
this._startShareScreen();
|
|
561
|
+
}
|
|
562
|
+
if (state === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION) {
|
|
563
|
+
this._openAnnotation();
|
|
564
|
+
}
|
|
565
|
+
if (state === _type2.FcrScreenSharingState.END) {
|
|
566
|
+
this.logger.info("annotation state chagned to ends, is local user sharing owner: ".concat(this._isLocalUserSharingOwner));
|
|
856
567
|
if (this._isLocalUserSharingOwner) {
|
|
857
568
|
/** 屏幕共享的状态没有包含批注,当前是发起者,则关闭fragment */
|
|
858
569
|
this._annotationProvider.closeAnnotationWindow();
|
|
859
570
|
} else {
|
|
860
571
|
/** 屏幕共享的状态没有包含批注,接收端进行总体的关闭 */
|
|
861
|
-
this.
|
|
572
|
+
this._closeAnnotation();
|
|
573
|
+
if (state === _type2.FcrScreenSharingState.END) {
|
|
574
|
+
this._messageProvider.showToast({
|
|
575
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_toast_annotation_controls_screen_sharing_disabled'),
|
|
576
|
+
type: 'info'
|
|
577
|
+
});
|
|
578
|
+
}
|
|
862
579
|
}
|
|
863
580
|
}
|
|
864
581
|
}
|
|
@@ -866,40 +583,38 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
|
|
|
866
583
|
key: "_handleOnAnnotationConnectionStateUpdated",
|
|
867
584
|
value: function _handleOnAnnotationConnectionStateUpdated(state) {
|
|
868
585
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
869
|
-
var
|
|
870
|
-
|
|
871
|
-
|
|
586
|
+
var mainWindow = this._annotationControl.getMainWindow();
|
|
587
|
+
if (!mainWindow) {
|
|
588
|
+
this.logger.error('main window is not available');
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
872
591
|
this._sharedAnnotationDataSource.setBoardMainWindow(mainWindow);
|
|
873
592
|
this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.START);
|
|
593
|
+
this._mount();
|
|
594
|
+
this._resetAnnotationToolbarState();
|
|
874
595
|
} else {
|
|
875
|
-
if (state === _fcrCore.FcrConnectionState.DISCONNECTED || state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
876
|
-
this.logger.info('[Annotation] main end because annotation board not connected');
|
|
877
|
-
/** 批注白板的连接状态没有连接成功,进行总体的关闭 */
|
|
878
|
-
this._annotationaEndEffectThenCloseBoard();
|
|
879
|
-
}
|
|
880
|
-
this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
}, {
|
|
884
|
-
key: "_deleteBoardDomContent",
|
|
885
|
-
value: function _deleteBoardDomContent() {
|
|
886
|
-
if (this._boardDom && this.boardMainWindow) {
|
|
887
|
-
this.logger.info('[Annotation] delete old boardMainWindow');
|
|
888
|
-
this._boardDom.removeChild(this.boardMainWindow.getContentView());
|
|
889
596
|
this._sharedAnnotationDataSource.setBoardMainWindow(null);
|
|
597
|
+
this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
|
|
890
598
|
}
|
|
891
599
|
}
|
|
892
600
|
}, {
|
|
893
601
|
key: "syncScreenShareOwnerOpenDone",
|
|
894
602
|
value: function syncScreenShareOwnerOpenDone() {
|
|
895
|
-
|
|
896
|
-
this.
|
|
897
|
-
|
|
603
|
+
this.logger.info('syncScreenShareOwnerOpenDone');
|
|
604
|
+
this._annotationControl.syncScreenShareOwnerAnnotationOpenDone();
|
|
605
|
+
}
|
|
606
|
+
}, {
|
|
607
|
+
key: "_resetAnnotationToolbarState",
|
|
608
|
+
value: function _resetAnnotationToolbarState() {
|
|
609
|
+
if (this._toolbarStore) {
|
|
610
|
+
this._toolbarStore.resetToolbarVars();
|
|
611
|
+
} else {
|
|
612
|
+
this.logger.error('resetAnnotationToolbarState failed, toolbarStore is undefined');
|
|
613
|
+
}
|
|
898
614
|
}
|
|
899
615
|
}]);
|
|
900
616
|
}();
|
|
901
617
|
_AnnotationStore = AnnotationStore;
|
|
902
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.
|
|
903
|
-
|
|
904
|
-
_initProto = _applyDecs$e[1];
|
|
618
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "annotating"], [_decorator.bound, 2, "isAnnotationSupported"], [_decorator.bound, 2, "getToolbarStore"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_decorator.bound, 2, "screenSharingStarted"], [_decorator.bound, 2, "release"], [_decorator.bound, 2, "_startShareScreen"], [_decorator.bound, 2, "_openAnnotation"], [_closeAnnotationDecs, 18, "_closeAnnotation"], [_mountDecs, 18, "_mount"], [_decorator.bound, 2, "_handleOnLocalVideoStatsUpdated"], [_decorator.bound, 2, "_updateAnnotationBounds"], [_decorator.bound, 2, "_updateBoundsByActiveWindow"], [_decorator.bound, 2, "_addWindowResizeListener"], [_decorator.bound, 2, "_removeWindowResizeListenner"], [_decorator.bound, 2, "_checkIfAnnotationCanStart"], [_decorator.bound, 2, "_handleOnScreenSharingUpdated"], [_decorator.bound, 2, "_handleOnAnnotationConnectionStateUpdated"], [_decorator.bound, 2, "syncScreenShareOwnerOpenDone"]], []).e, 1);
|
|
619
|
+
_initProto = _applyDecs$e[0];
|
|
905
620
|
var AnnotationStoreContext = exports.AnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)({});
|