fcr-ui-scene 3.7.2 → 3.7.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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
|
@@ -115,9 +115,10 @@ var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
|
|
|
115
115
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
116
116
|
var _type3 = require("agora-ui-foundation/lib/components/icon/type");
|
|
117
117
|
var _logger = require("../../utilities/logger");
|
|
118
|
+
var _type4 = require("../secondary-window/type");
|
|
118
119
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
119
120
|
var _FcrWhiteboardUIModule;
|
|
120
|
-
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser,
|
|
121
|
+
var _initProto, _init__isMultiDisplay, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _handleActiveDecs, _mountDecs, _unmountDecs, _unloadDecs, _setBackgroundDecs, _boardUIEventsDecs, _repositionToolbarDecs, _setConnectionStateDecs, _setJoinSuccessedDecs, _ref;
|
|
121
122
|
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; }
|
|
122
123
|
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; }
|
|
123
124
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
@@ -137,7 +138,8 @@ var _B = /*#__PURE__*/new WeakMap();
|
|
|
137
138
|
var _C = /*#__PURE__*/new WeakMap();
|
|
138
139
|
var _D = /*#__PURE__*/new WeakMap();
|
|
139
140
|
var _E = /*#__PURE__*/new WeakMap();
|
|
140
|
-
|
|
141
|
+
var _F = /*#__PURE__*/new WeakMap();
|
|
142
|
+
_ref = (_handleActiveDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _setBackgroundDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
141
143
|
var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
|
|
142
144
|
function FcrWhiteboardUIModule() {
|
|
143
145
|
var _this;
|
|
@@ -146,7 +148,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
146
148
|
args[_key] = arguments[_key];
|
|
147
149
|
}
|
|
148
150
|
_this = _callSuper(this, FcrWhiteboardUIModule, [].concat(args));
|
|
149
|
-
(0, _defineProperty2["default"])(_this, _ref, (_initProto(_this),
|
|
151
|
+
(0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), (0, _logger.createLogger)({
|
|
152
|
+
prefix: 'FcrWhiteboardUIModule'
|
|
153
|
+
})));
|
|
154
|
+
(0, _defineProperty2["default"])(_this, "_disposers", []);
|
|
150
155
|
(0, _defineProperty2["default"])(_this, "_connectionState", _fcrCore.FcrConnectionState.DISCONNECTED);
|
|
151
156
|
(0, _defineProperty2["default"])(_this, "_initWidth", 1920);
|
|
152
157
|
(0, _defineProperty2["default"])(_this, "_initHeight", 1220);
|
|
@@ -156,17 +161,19 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
156
161
|
(0, _defineProperty2["default"])(_this, "_isMyBoard", false);
|
|
157
162
|
(0, _defineProperty2["default"])(_this, "_boardObserver", {
|
|
158
163
|
onActive: function onActive(_, operatorUser) {
|
|
159
|
-
return _this.
|
|
164
|
+
return _this._handleActive({
|
|
160
165
|
operatorUser: operatorUser
|
|
161
166
|
});
|
|
162
167
|
},
|
|
163
168
|
onInactive: function onInactive(reason, operatorUser) {
|
|
164
|
-
var _this$_localUser, _this$_ownerUser
|
|
169
|
+
var _this$_localUser, _this$_ownerUser;
|
|
170
|
+
_this._controlbarStore.controlEnabled = false;
|
|
165
171
|
var currentUserId = (_this$_localUser = _this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId;
|
|
166
172
|
var isMeOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === currentUserId;
|
|
167
173
|
var isMeOwner = ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId;
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
if (!isMeOperated && isMeOwner) {
|
|
175
|
+
_this._alertWhenBeenStopByOthers(operatorUser);
|
|
176
|
+
}
|
|
170
177
|
_this.onDestroy({
|
|
171
178
|
operatorUser: operatorUser
|
|
172
179
|
});
|
|
@@ -178,7 +185,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
178
185
|
return _regenerator["default"].wrap(function (_context) {
|
|
179
186
|
while (1) switch (_context.prev = _context.next) {
|
|
180
187
|
case 0:
|
|
181
|
-
_this.logger.info('Fcr board connection state changed to', state);
|
|
182
188
|
_this._setConnectionState(state);
|
|
183
189
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
184
190
|
if (_this._joined) {
|
|
@@ -215,23 +221,68 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
215
221
|
return onConnectionStateUpdated;
|
|
216
222
|
}()
|
|
217
223
|
});
|
|
218
|
-
(0, _defineProperty2["default"])(_this, "
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
(0, _defineProperty2["default"])(_this, "_multiDisplayObserver", {
|
|
225
|
+
onContentDistributionUpdated: function onContentDistributionUpdated(distribution) {
|
|
226
|
+
if (distribution.secondaryWindow.type === _type4.FcrUIDisplayDistributionContentType.HIDDEN) {
|
|
227
|
+
_this._isActive && _this._checkBoard();
|
|
228
|
+
} else {
|
|
229
|
+
_this.unmount();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
(0, _defineProperty2["default"])(_this, "_streamObserver", {
|
|
234
|
+
onStreamsRemoved: function onStreamsRemoved(roomId, events) {
|
|
235
|
+
var seizeData = events.find(function (event) {
|
|
236
|
+
var _event$cause;
|
|
237
|
+
return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
|
|
238
|
+
});
|
|
239
|
+
var isMyStream = events.some(function (event) {
|
|
240
|
+
var _this$_localUser2;
|
|
241
|
+
return event.modifiedStream.owner.userId === ((_this$_localUser2 = _this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId);
|
|
242
|
+
});
|
|
243
|
+
if (seizeData) {
|
|
244
|
+
var _seizeData$operatorUs, _this$_localUser3;
|
|
245
|
+
var operatorIsMe = ((_seizeData$operatorUs = seizeData.operatorUser) === null || _seizeData$operatorUs === void 0 ? void 0 : _seizeData$operatorUs.userId) !== ((_this$_localUser3 = _this._localUser) === null || _this$_localUser3 === void 0 ? void 0 : _this$_localUser3.userId);
|
|
246
|
+
if (isMyStream && operatorIsMe) {
|
|
247
|
+
_this._alertWhenBeenStopByOthers(seizeData === null || seizeData === void 0 ? void 0 : seizeData.operatorUser);
|
|
248
|
+
}
|
|
249
|
+
if (!isMyStream) {
|
|
250
|
+
var _this$_uiEventStore, _seizeData$operatorUs2;
|
|
251
|
+
(_this$_uiEventStore = _this._uiEventStore) === null || _this$_uiEventStore === void 0 || _this$_uiEventStore.showToast({
|
|
252
|
+
type: 'info',
|
|
253
|
+
message: "".concat(seizeData === null || seizeData === void 0 || (_seizeData$operatorUs2 = seizeData.operatorUser) === null || _seizeData$operatorUs2 === void 0 ? void 0 : _seizeData$operatorUs2.userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare'))
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
(0, _defineProperty2["default"])(_this, "_userObserver", {
|
|
260
|
+
onUserInfoUpdated: function onUserInfoUpdated(_, event) {
|
|
261
|
+
var _this$_localUser4;
|
|
262
|
+
if (event.modifiedUser.userId === ((_this$_localUser4 = _this._localUser) === null || _this$_localUser4 === void 0 ? void 0 : _this$_localUser4.userId)) {
|
|
263
|
+
_this._localUser = event.modifiedUser;
|
|
264
|
+
_this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this._localUser.userRole);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
(0, _defineProperty2["default"])(_this, "_eventObserver", {
|
|
269
|
+
onEvent: _this.onEvent.bind(_this)
|
|
270
|
+
});
|
|
221
271
|
(0, _defineProperty2["default"])(_this, "_mounted", false);
|
|
222
272
|
(0, _defineProperty2["default"])(_this, "_initialized", false);
|
|
223
273
|
(0, _defineProperty2["default"])(_this, "_joined", false);
|
|
224
274
|
(0, _defineProperty2["default"])(_this, "_grantedUsers", new Set());
|
|
225
|
-
_classPrivateFieldInitSpec(_this, _A,
|
|
226
|
-
_classPrivateFieldInitSpec(_this, _B,
|
|
227
|
-
_classPrivateFieldInitSpec(_this, _C,
|
|
228
|
-
_classPrivateFieldInitSpec(_this, _D,
|
|
229
|
-
_classPrivateFieldInitSpec(_this, _E,
|
|
275
|
+
_classPrivateFieldInitSpec(_this, _A, _init__isMultiDisplay(_this, false));
|
|
276
|
+
_classPrivateFieldInitSpec(_this, _B, _init__lonelyWindowState(_this, _type.LonelyWindowState.DEFAULT));
|
|
277
|
+
_classPrivateFieldInitSpec(_this, _C, _init__ownerUser(_this, undefined));
|
|
278
|
+
_classPrivateFieldInitSpec(_this, _D, _init__isHost(_this, false));
|
|
279
|
+
_classPrivateFieldInitSpec(_this, _E, _init__boardBackground(_this, '#ffffff'));
|
|
280
|
+
_classPrivateFieldInitSpec(_this, _F, _init__localUser(_this, undefined));
|
|
230
281
|
return _this;
|
|
231
282
|
}
|
|
232
283
|
(0, _inherits2["default"])(FcrWhiteboardUIModule, _UIModule);
|
|
233
284
|
return (0, _createClass2["default"])(FcrWhiteboardUIModule, [{
|
|
234
|
-
key: "
|
|
285
|
+
key: "_isMultiDisplay",
|
|
235
286
|
get: function get() {
|
|
236
287
|
return _classPrivateFieldGet(_A, this);
|
|
237
288
|
},
|
|
@@ -239,7 +290,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
239
290
|
_classPrivateFieldSet(_A, this, v);
|
|
240
291
|
}
|
|
241
292
|
}, {
|
|
242
|
-
key: "
|
|
293
|
+
key: "_lonelyWindowState",
|
|
243
294
|
get: function get() {
|
|
244
295
|
return _classPrivateFieldGet(_B, this);
|
|
245
296
|
},
|
|
@@ -247,7 +298,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
247
298
|
_classPrivateFieldSet(_B, this, v);
|
|
248
299
|
}
|
|
249
300
|
}, {
|
|
250
|
-
key: "
|
|
301
|
+
key: "_ownerUser",
|
|
251
302
|
get: function get() {
|
|
252
303
|
return _classPrivateFieldGet(_C, this);
|
|
253
304
|
},
|
|
@@ -255,7 +306,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
255
306
|
_classPrivateFieldSet(_C, this, v);
|
|
256
307
|
}
|
|
257
308
|
}, {
|
|
258
|
-
key: "
|
|
309
|
+
key: "_isHost",
|
|
259
310
|
get: function get() {
|
|
260
311
|
return _classPrivateFieldGet(_D, this);
|
|
261
312
|
},
|
|
@@ -263,13 +314,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
263
314
|
_classPrivateFieldSet(_D, this, v);
|
|
264
315
|
}
|
|
265
316
|
}, {
|
|
266
|
-
key: "
|
|
317
|
+
key: "_boardBackground",
|
|
267
318
|
get: function get() {
|
|
268
319
|
return _classPrivateFieldGet(_E, this);
|
|
269
320
|
},
|
|
270
321
|
set: function set(v) {
|
|
271
322
|
_classPrivateFieldSet(_E, this, v);
|
|
272
323
|
}
|
|
324
|
+
}, {
|
|
325
|
+
key: "_localUser",
|
|
326
|
+
get: function get() {
|
|
327
|
+
return _classPrivateFieldGet(_F, this);
|
|
328
|
+
},
|
|
329
|
+
set: function set(v) {
|
|
330
|
+
_classPrivateFieldSet(_F, this, v);
|
|
331
|
+
}
|
|
273
332
|
}, {
|
|
274
333
|
key: "hasPrivilege",
|
|
275
334
|
get: function get() {
|
|
@@ -302,9 +361,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
302
361
|
}, {
|
|
303
362
|
key: "onNodeWillActive",
|
|
304
363
|
value: function onNodeWillActive() {
|
|
305
|
-
var _this$currentRoomCont,
|
|
306
|
-
_this2 = this,
|
|
307
|
-
_this$_uiEventStore;
|
|
364
|
+
var _this$currentRoomCont, _this$_uiEventStore2;
|
|
308
365
|
this._uiEventStore = this.eventProvider;
|
|
309
366
|
this._roomControl = (_this$currentRoomCont = this.currentRoomControlProvider) === null || _this$currentRoomCont === void 0 ? void 0 : _this$currentRoomCont.currentRoomControl;
|
|
310
367
|
this._securityStore = this.privilegeProvider;
|
|
@@ -313,6 +370,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
313
370
|
var streamControl = this._roomControl.getStreamControl();
|
|
314
371
|
var userControl = this._roomControl.getUserControl();
|
|
315
372
|
this._userControl = userControl;
|
|
373
|
+
this._streamControl = streamControl;
|
|
316
374
|
this._controlbarStore = new _store2.WhiteboardControlBarStore({
|
|
317
375
|
uiEventStore: this.eventProvider,
|
|
318
376
|
streamControl: streamControl,
|
|
@@ -322,44 +380,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
322
380
|
sharedAnnotationDataSource: this.sharedAnnotationDataSource
|
|
323
381
|
});
|
|
324
382
|
this._whiteboardControl.addObserver(this._boardObserver);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
});
|
|
331
|
-
var isMyStream = events.some(function (event) {
|
|
332
|
-
var _this2$_localUser;
|
|
333
|
-
return event.modifiedStream.owner.userId === ((_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId);
|
|
334
|
-
});
|
|
335
|
-
if (seizeData) {
|
|
336
|
-
var _seizeData$operatorUs, _this2$_localUser2;
|
|
337
|
-
var operatorIsMe = ((_seizeData$operatorUs = seizeData.operatorUser) === null || _seizeData$operatorUs === void 0 ? void 0 : _seizeData$operatorUs.userId) !== ((_this2$_localUser2 = _this2._localUser) === null || _this2$_localUser2 === void 0 ? void 0 : _this2$_localUser2.userId);
|
|
338
|
-
if (isMyStream && operatorIsMe) {
|
|
339
|
-
_this2._alertWhenBeenStopByOthers(seizeData === null || seizeData === void 0 ? void 0 : seizeData.operatorUser);
|
|
340
|
-
}
|
|
341
|
-
if (!isMyStream) {
|
|
342
|
-
var _this2$_uiEventStore, _seizeData$operatorUs2;
|
|
343
|
-
(_this2$_uiEventStore = _this2._uiEventStore) === null || _this2$_uiEventStore === void 0 || _this2$_uiEventStore.showToast({
|
|
344
|
-
type: 'info',
|
|
345
|
-
message: "".concat(seizeData === null || seizeData === void 0 || (_seizeData$operatorUs2 = seizeData.operatorUser) === null || _seizeData$operatorUs2 === void 0 ? void 0 : _seizeData$operatorUs2.userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare'))
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
userControl.addObserver({
|
|
352
|
-
onUserInfoUpdated: function onUserInfoUpdated(_, event) {
|
|
353
|
-
var _this2$_localUser3;
|
|
354
|
-
if (event.modifiedUser.userId === ((_this2$_localUser3 = _this2._localUser) === null || _this2$_localUser3 === void 0 ? void 0 : _this2$_localUser3.userId)) {
|
|
355
|
-
_this2._localUser = event.modifiedUser;
|
|
356
|
-
_this2._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this2._localUser.userRole);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
(_this$_uiEventStore = this._uiEventStore) === null || _this$_uiEventStore === void 0 || _this$_uiEventStore.addObserver({
|
|
361
|
-
onEvent: this.onEvent.bind(this)
|
|
362
|
-
});
|
|
383
|
+
this.multiDisplayProvider.addObserver(this._multiDisplayObserver);
|
|
384
|
+
this._streamControl.addObserver(this._streamObserver);
|
|
385
|
+
this._userControl.addObserver(this._userObserver);
|
|
386
|
+
(_this$_uiEventStore2 = this._uiEventStore) === null || _this$_uiEventStore2 === void 0 || _this$_uiEventStore2.addObserver(this._eventObserver);
|
|
387
|
+
this._isMultiDisplay = this.multiDisplayProvider.isActive;
|
|
363
388
|
this._boardStore = this._createBoardUIContext();
|
|
364
389
|
this._localUser = this._userControl.getLocalUser();
|
|
365
390
|
this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(this._localUser.userRole);
|
|
@@ -368,15 +393,19 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
368
393
|
var ownerUserId = this._whiteboardControl.getOwnerId();
|
|
369
394
|
this._isActive = isActive;
|
|
370
395
|
if (isActive) {
|
|
371
|
-
this.
|
|
372
|
-
|
|
373
|
-
|
|
396
|
+
if (!this._isMultiDisplay) {
|
|
397
|
+
this.logger.info('[whiteboard]: is active');
|
|
398
|
+
this._checkBoard();
|
|
399
|
+
this._ownerUser = this._userControl.getUser(ownerUserId);
|
|
400
|
+
this._boardBackground = this._whiteboardControl.getBackgroundColor();
|
|
401
|
+
}
|
|
374
402
|
}
|
|
375
403
|
}
|
|
376
404
|
}, {
|
|
377
405
|
key: "onNodeWillInactive",
|
|
378
406
|
value: function onNodeWillInactive() {
|
|
379
407
|
this.onDestroy();
|
|
408
|
+
this.release();
|
|
380
409
|
}
|
|
381
410
|
}, {
|
|
382
411
|
key: "getComponent",
|
|
@@ -452,20 +481,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
452
481
|
}
|
|
453
482
|
}
|
|
454
483
|
}, {
|
|
455
|
-
key: "
|
|
456
|
-
value: function
|
|
484
|
+
key: "_handleActive",
|
|
485
|
+
value: function _handleActive(params) {
|
|
457
486
|
// this._checkPrivilege(props);
|
|
487
|
+
this.logger.info('[whiteboard] active');
|
|
458
488
|
this._checkBoard();
|
|
459
489
|
}
|
|
460
490
|
}, {
|
|
461
491
|
key: "onDestroy",
|
|
462
492
|
value: function onDestroy(params) {
|
|
463
|
-
var _this$_securityStore2, _this$
|
|
493
|
+
var _this$_securityStore2, _this$_localUser5;
|
|
464
494
|
var _ref2 = params || {},
|
|
465
495
|
operatorUser = _ref2.operatorUser;
|
|
466
|
-
if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$
|
|
467
|
-
var _this$
|
|
468
|
-
(_this$
|
|
496
|
+
if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser5 = this._localUser) === null || _this$_localUser5 === void 0 ? void 0 : _this$_localUser5.userId) && this._isActive) {
|
|
497
|
+
var _this$_uiEventStore3;
|
|
498
|
+
(_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.showToast({
|
|
469
499
|
message: this._isMyBoard ? (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard') : (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped'),
|
|
470
500
|
type: 'info'
|
|
471
501
|
});
|
|
@@ -487,6 +517,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
487
517
|
var _boardMainWindow = this._boardMainWindow,
|
|
488
518
|
_boardDom = this._boardDom;
|
|
489
519
|
if (_boardDom && _boardMainWindow && !this._mounted) {
|
|
520
|
+
this.logger.info('[whiteboard] mount');
|
|
490
521
|
this._mounted = true;
|
|
491
522
|
var aspectRatio = this._initHeight / this._initWidth;
|
|
492
523
|
var view = _boardMainWindow.getContentView();
|
|
@@ -504,13 +535,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
504
535
|
|
|
505
536
|
var isActive = (_this$_whiteboardCont6 = this._whiteboardControl) === null || _this$_whiteboardCont6 === void 0 ? void 0 : _this$_whiteboardCont6.getActivity();
|
|
506
537
|
if (isActive && this._whiteboardControl) {
|
|
507
|
-
var _this$_userControl2, _this$
|
|
538
|
+
var _this$_userControl2, _this$_ownerUser2, _this$_localUser6, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore4, _this$_toolbarStore;
|
|
508
539
|
var ownerUserId = this._whiteboardControl.getOwnerId();
|
|
509
540
|
this._ownerUser = (_this$_userControl2 = this._userControl) === null || _this$_userControl2 === void 0 ? void 0 : _this$_userControl2.getUser(ownerUserId);
|
|
510
|
-
this._isMyBoard = ((_this$
|
|
541
|
+
this._isMyBoard = ((_this$_ownerUser2 = this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userId) === ((_this$_localUser6 = this._localUser) === null || _this$_localUser6 === void 0 ? void 0 : _this$_localUser6.userId);
|
|
511
542
|
(_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
|
|
512
543
|
(_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
|
|
513
|
-
(_this$
|
|
544
|
+
(_this$_uiEventStore4 = this._uiEventStore) === null || _this$_uiEventStore4 === void 0 || _this$_uiEventStore4.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
|
|
514
545
|
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
515
546
|
payload: ownerUserId
|
|
516
547
|
});
|
|
@@ -525,16 +556,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
525
556
|
key: "unmount",
|
|
526
557
|
value: function unmount() {
|
|
527
558
|
if (this._mounted && this._boardMainWindow) {
|
|
528
|
-
var _this$_boardDom, _this$
|
|
559
|
+
var _this$_boardDom, _this$_uiEventStore5;
|
|
560
|
+
this.logger.info('[whiteboard] unmount');
|
|
529
561
|
(_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.removeChild(this._boardMainWindow.getContentView());
|
|
530
562
|
this._boardMainWindow = undefined;
|
|
531
|
-
|
|
532
|
-
this._openLonelyWindow();
|
|
533
|
-
}
|
|
534
|
-
if (this._lonelyWindowState === _type.LonelyWindowState.CLOSE) {
|
|
535
|
-
this._open();
|
|
536
|
-
}
|
|
537
|
-
(_this$_uiEventStore4 = this._uiEventStore) === null || _this$_uiEventStore4 === void 0 || _this$_uiEventStore4.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
|
|
563
|
+
(_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
|
|
538
564
|
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
539
565
|
payload: null
|
|
540
566
|
});
|
|
@@ -553,6 +579,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
553
579
|
this._outerDom = undefined;
|
|
554
580
|
}
|
|
555
581
|
}
|
|
582
|
+
}, {
|
|
583
|
+
key: "release",
|
|
584
|
+
value: function release() {
|
|
585
|
+
var _this$_toolbarStore2, _this$_controlbarStor, _this$_whiteboardCont7, _this$_uiEventStore6, _this$_userControl3, _this$_streamControl;
|
|
586
|
+
(_this$_toolbarStore2 = this._toolbarStore) === null || _this$_toolbarStore2 === void 0 || _this$_toolbarStore2.release();
|
|
587
|
+
(_this$_controlbarStor = this._controlbarStore) === null || _this$_controlbarStor === void 0 || _this$_controlbarStor.release();
|
|
588
|
+
this._boardStore = undefined;
|
|
589
|
+
this._toolbarStore = undefined;
|
|
590
|
+
this._controlbarStore = undefined;
|
|
591
|
+
(_this$_whiteboardCont7 = this._whiteboardControl) === null || _this$_whiteboardCont7 === void 0 || _this$_whiteboardCont7.removeObserver(this._boardObserver);
|
|
592
|
+
this.multiDisplayProvider.removeObserver(this._multiDisplayObserver);
|
|
593
|
+
(_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.removeObserver(this._eventObserver);
|
|
594
|
+
(_this$_userControl3 = this._userControl) === null || _this$_userControl3 === void 0 || _this$_userControl3.removeObserver(this._userObserver);
|
|
595
|
+
(_this$_streamControl = this._streamControl) === null || _this$_streamControl === void 0 || _this$_streamControl.removeObserver(this._streamObserver);
|
|
596
|
+
}
|
|
556
597
|
}, {
|
|
557
598
|
key: "_setBackground",
|
|
558
599
|
value: function _setBackground() {
|
|
@@ -582,18 +623,18 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
582
623
|
}, {
|
|
583
624
|
key: "_boardUIEvents",
|
|
584
625
|
value: function _boardUIEvents(observables) {
|
|
585
|
-
var
|
|
626
|
+
var _this2 = this;
|
|
586
627
|
return {
|
|
587
628
|
handleBoardDomLoad: function handleBoardDomLoad(ref) {
|
|
588
|
-
|
|
589
|
-
if (
|
|
590
|
-
|
|
629
|
+
_this2._boardDom = ref;
|
|
630
|
+
if (_this2._boardDom) {
|
|
631
|
+
_this2.mount();
|
|
591
632
|
} else {
|
|
592
|
-
|
|
633
|
+
_this2._mounted = false;
|
|
593
634
|
}
|
|
594
635
|
},
|
|
595
636
|
handleCollectorDomLoad: function handleCollectorDomLoad(ref) {
|
|
596
|
-
|
|
637
|
+
_this2._collectorDom = ref;
|
|
597
638
|
},
|
|
598
639
|
handleClose: function handleClose() {
|
|
599
640
|
// this._close();
|
|
@@ -611,7 +652,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
611
652
|
setWriteEnable: function setWriteEnable(enable) {
|
|
612
653
|
observables.writeEnabled = enable;
|
|
613
654
|
observables.canOperate = enable;
|
|
614
|
-
|
|
655
|
+
_this2._repositionToolbar();
|
|
615
656
|
},
|
|
616
657
|
setWhiteboardVisible: function setWhiteboardVisible(visible) {
|
|
617
658
|
observables.whiteboardVisible = visible;
|
|
@@ -682,13 +723,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
682
723
|
}, {
|
|
683
724
|
key: "_resetCanvasPosition",
|
|
684
725
|
value: function _resetCanvasPosition() {
|
|
685
|
-
var
|
|
726
|
+
var _this3 = this;
|
|
686
727
|
if (this._timer) clearTimeout(this._timer);
|
|
687
728
|
this._timer = setTimeout(function () {
|
|
688
|
-
if (!
|
|
689
|
-
|
|
690
|
-
var thatStyle =
|
|
691
|
-
|
|
729
|
+
if (!_this3._boardDom) return;
|
|
730
|
+
_this3._repositionToolbar();
|
|
731
|
+
var thatStyle = _this3._boardDom.style;
|
|
732
|
+
_this3._controlbarStore.scaleValue = 1;
|
|
692
733
|
thatStyle.transform = "scale(1)";
|
|
693
734
|
}, 300);
|
|
694
735
|
}
|
|
@@ -733,10 +774,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
733
774
|
}, {
|
|
734
775
|
key: "_open",
|
|
735
776
|
value: function _open() {
|
|
736
|
-
var _this$
|
|
777
|
+
var _this$_whiteboardCont8;
|
|
737
778
|
this._joined = true;
|
|
738
779
|
this._initialized = true;
|
|
739
|
-
(_this$
|
|
780
|
+
(_this$_whiteboardCont8 = this._whiteboardControl) === null || _this$_whiteboardCont8 === void 0 || _this$_whiteboardCont8.open();
|
|
781
|
+
this.logger.info('[whiteboard] open');
|
|
740
782
|
}
|
|
741
783
|
}, {
|
|
742
784
|
key: "_close",
|
|
@@ -745,17 +787,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
745
787
|
this._setJoinSuccessed(false);
|
|
746
788
|
if (this._whiteboardControl) {
|
|
747
789
|
this._whiteboardControl.close();
|
|
790
|
+
this.logger.info('[whiteboard] close');
|
|
748
791
|
}
|
|
749
792
|
}
|
|
750
|
-
}, {
|
|
751
|
-
key: "_openLonelyWindow",
|
|
752
|
-
value: function _openLonelyWindow() {
|
|
753
|
-
var _this$_uiEventStore5, _this$_uiEventStore6;
|
|
754
|
-
(_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.openDialog(_constant.FcrUIDialogKey.WHITEBOARD);
|
|
755
|
-
(_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.openDialog(_constant.FcrUIDialogKey.TOOLBAR);
|
|
756
|
-
// this._toolbarStore!.observables.layoutReady = false;
|
|
757
|
-
this._open();
|
|
758
|
-
}
|
|
759
793
|
}, {
|
|
760
794
|
key: "_setJoinSuccessed",
|
|
761
795
|
value: function _setJoinSuccessed(joinSuccessed) {
|
|
@@ -766,32 +800,32 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
766
800
|
}, {
|
|
767
801
|
key: "_addDisposers",
|
|
768
802
|
value: function _addDisposers() {
|
|
769
|
-
var
|
|
803
|
+
var _this4 = this;
|
|
770
804
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
771
|
-
return
|
|
805
|
+
return _this4.hasPrivilege;
|
|
772
806
|
}, function (privilege) {
|
|
773
|
-
var
|
|
774
|
-
var p = privilege ||
|
|
775
|
-
(
|
|
776
|
-
(
|
|
807
|
+
var _this4$_boardStore, _this4$_boardStore2;
|
|
808
|
+
var p = privilege || _this4._isHost || _this4._isMyBoard;
|
|
809
|
+
(_this4$_boardStore = _this4._boardStore) === null || _this4$_boardStore === void 0 || _this4$_boardStore.setWriteEnable(_this4._isHost || _this4._isMyBoard);
|
|
810
|
+
(_this4$_boardStore2 = _this4._boardStore) === null || _this4$_boardStore2 === void 0 || _this4$_boardStore2.setPrivilege(p);
|
|
777
811
|
}), (0, _mobx.reaction)(function () {
|
|
778
|
-
return
|
|
812
|
+
return _this4._boardStore.observables.writeEnabled;
|
|
779
813
|
}, function (writeEnabled) {
|
|
780
|
-
if (writeEnabled) setTimeout(
|
|
814
|
+
if (writeEnabled) setTimeout(_this4._repositionToolbar, 0);
|
|
781
815
|
}), (0, _mobx.reaction)(function () {
|
|
782
|
-
return
|
|
816
|
+
return _this4._localUser;
|
|
783
817
|
}, function (user) {
|
|
784
|
-
var
|
|
785
|
-
|
|
786
|
-
var hasPrivilege =
|
|
787
|
-
(
|
|
788
|
-
|
|
818
|
+
var _this4$_boardStore3;
|
|
819
|
+
_this4._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
|
|
820
|
+
var hasPrivilege = _this4.hasPrivilege || _this4._isHost || _this4._isMyBoard;
|
|
821
|
+
(_this4$_boardStore3 = _this4._boardStore) === null || _this4$_boardStore3 === void 0 || _this4$_boardStore3.setPrivilege(hasPrivilege);
|
|
822
|
+
_this4._boardStore.setWriteEnable(_this4._isHost || _this4._isMyBoard);
|
|
789
823
|
}));
|
|
790
824
|
}
|
|
791
825
|
}, {
|
|
792
826
|
key: "_alertWhenBeenStopByOthers",
|
|
793
827
|
value: function _alertWhenBeenStopByOthers(userInfo) {
|
|
794
|
-
var
|
|
828
|
+
var _this5 = this;
|
|
795
829
|
var userRole = userInfo.userRole,
|
|
796
830
|
userName = userInfo.userName;
|
|
797
831
|
var content = (0, _i18n.transI18n)("fmt_whiteboard_dialog_share_stopped_message_".concat(_type2.FcrUserRole.HOST === userRole ? 'host' : 'cohost'), {
|
|
@@ -804,12 +838,12 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
804
838
|
showCancel: false,
|
|
805
839
|
icon: _type3.FcrIconType.FCR_SCREENSHARING,
|
|
806
840
|
onOk: function onOk() {
|
|
807
|
-
var
|
|
808
|
-
(
|
|
841
|
+
var _this5$_uiEventStore;
|
|
842
|
+
(_this5$_uiEventStore = _this5._uiEventStore) === null || _this5$_uiEventStore === void 0 || _this5$_uiEventStore.closeConfirm(dialogId);
|
|
809
843
|
},
|
|
810
844
|
onCancel: function onCancel() {
|
|
811
|
-
var
|
|
812
|
-
(
|
|
845
|
+
var _this5$_uiEventStore2;
|
|
846
|
+
(_this5$_uiEventStore2 = _this5._uiEventStore) === null || _this5$_uiEventStore2 === void 0 || _this5$_uiEventStore2.closeConfirm(dialogId);
|
|
813
847
|
},
|
|
814
848
|
width: 400,
|
|
815
849
|
height: 160
|
|
@@ -818,12 +852,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
818
852
|
}]);
|
|
819
853
|
}(_base.UIModule);
|
|
820
854
|
_FcrWhiteboardUIModule = FcrWhiteboardUIModule;
|
|
821
|
-
var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [
|
|
822
|
-
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
855
|
+
var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_isMultiDisplay"], [_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_handleActiveDecs, 18, "_handleActive"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_setBackgroundDecs, 18, "_setBackground"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
|
|
856
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 7);
|
|
857
|
+
_init__isMultiDisplay = _applyDecs$e2[0];
|
|
858
|
+
_init__lonelyWindowState = _applyDecs$e2[1];
|
|
859
|
+
_init__ownerUser = _applyDecs$e2[2];
|
|
860
|
+
_init__isHost = _applyDecs$e2[3];
|
|
861
|
+
_init__boardBackground = _applyDecs$e2[4];
|
|
862
|
+
_init__localUser = _applyDecs$e2[5];
|
|
863
|
+
_initProto = _applyDecs$e2[6];
|
|
829
864
|
_applyDecs$e;
|
|
@@ -126,6 +126,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
|
|
|
126
126
|
},
|
|
127
127
|
frameRate: 15,
|
|
128
128
|
bitrate: 800
|
|
129
|
+
// isMirror: false,
|
|
129
130
|
},
|
|
130
131
|
lowVideoEncoderConfig: {
|
|
131
132
|
dimensions: {
|
|
@@ -134,6 +135,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
|
|
|
134
135
|
},
|
|
135
136
|
frameRate: 15,
|
|
136
137
|
bitrate: 400
|
|
138
|
+
// isMirror: false,
|
|
137
139
|
},
|
|
138
140
|
enableDualStreamMode: false
|
|
139
141
|
},
|
|
@@ -145,6 +147,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
|
|
|
145
147
|
},
|
|
146
148
|
frameRate: 15,
|
|
147
149
|
bitrate: 800
|
|
150
|
+
// isMirror: false,
|
|
148
151
|
},
|
|
149
152
|
lowVideoEncoderConfig: {
|
|
150
153
|
dimensions: {
|
|
@@ -153,6 +156,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
|
|
|
153
156
|
},
|
|
154
157
|
frameRate: 15,
|
|
155
158
|
bitrate: 400
|
|
159
|
+
// isMirror: false,
|
|
156
160
|
},
|
|
157
161
|
enableDualStreamMode: false
|
|
158
162
|
},
|
|
@@ -62,8 +62,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
62
62
|
var _constant = require("../utilities/constant");
|
|
63
63
|
var _base = require("../base");
|
|
64
64
|
var _mobx = require("mobx");
|
|
65
|
-
var _type = require("agora-rte-sdk/lib/core/rtc/type");
|
|
66
65
|
var _imports = require("fcr-core/lib/imports");
|
|
66
|
+
var _type = require("fcr-core/lib/type");
|
|
67
67
|
var _rendererEvent = require("../utilities/renderer-event");
|
|
68
68
|
var _type2 = require("../modules/whiteboard/type");
|
|
69
69
|
var _dialogUtils = require("../utilities/dialog-utils");
|
|
@@ -104,7 +104,7 @@ var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PUR
|
|
|
104
104
|
_classPrivateFieldInitSpec(this, _C, _init_isShowToolbar(this, false));
|
|
105
105
|
_classPrivateFieldInitSpec(this, _D, _init_currentShareInfo(this, {
|
|
106
106
|
id: '',
|
|
107
|
-
type: _type.
|
|
107
|
+
type: _type.FcrScreenCaptureType.SCREEN,
|
|
108
108
|
bounds: {
|
|
109
109
|
x: 0,
|
|
110
110
|
y: 0,
|
|
@@ -284,7 +284,7 @@ var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PUR
|
|
|
284
284
|
while (1) switch (_context2.prev = _context2.next) {
|
|
285
285
|
case 0:
|
|
286
286
|
targetBounds = null;
|
|
287
|
-
if (this.currentShareInfo.type === _type.
|
|
287
|
+
if (this.currentShareInfo.type === _type.FcrScreenCaptureType.SCREEN) {
|
|
288
288
|
_ref2 = info || this.currentShareInfo, bounds = _ref2.bounds;
|
|
289
289
|
_getCurrentSharingWor = (0, _dialogUtils.getCurrentSharingWorkArea)({
|
|
290
290
|
currentShareBounds: bounds
|