fcr-ui-scene 3.6.1 → 3.6.3
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 +6 -0
- package/lib/creator.js +125 -24
- package/lib/electron/app.js +5 -4
- package/lib/electron/bootstrap-dev.js +3 -0
- package/lib/electron/bootstrap-sdk.js +4 -0
- package/lib/electron/injections.d.ts +5 -0
- package/lib/electron/injections.js +36 -8
- package/lib/electron/ipc/ipc.d.ts +1 -0
- package/lib/electron/ipc/ipc.js +4 -0
- package/lib/electron/main.js +16 -8
- package/lib/electron/plugins/screenshot.js +4 -2
- package/lib/electron/preload.js +7 -2
- package/lib/electron/window.js +4 -6
- package/lib/fragments/annotation/index.d.ts +11 -0
- package/lib/fragments/annotation/index.js +121 -0
- package/lib/fragments/annotation/libs.d.ts +55 -0
- package/lib/fragments/annotation/libs.js +93 -0
- package/lib/fragments/annotation/store.d.ts +30 -0
- package/lib/fragments/annotation/store.js +565 -0
- package/lib/fragments/annotation/view.d.ts +3 -0
- package/lib/fragments/annotation/view.js +31 -0
- package/lib/fragments/base.d.ts +10 -0
- package/lib/fragments/base.js +44 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +7 -6
- package/lib/modules/action-bar/index.css +11 -0
- package/lib/modules/action-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/index.js +1 -0
- package/lib/modules/action-bar/store.d.ts +7 -9
- package/lib/modules/action-bar/store.js +49 -90
- package/lib/modules/annotation/board-cursor.css +76 -0
- package/lib/modules/annotation/components/control-bar/index.css +48 -0
- package/lib/modules/annotation/components/control-bar/index.d.ts +3 -0
- package/lib/modules/annotation/components/control-bar/index.js +141 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +46 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/color-tool/index.js +52 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +61 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +68 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +18 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.js +116 -0
- package/lib/modules/annotation/components/toolbar/components/item/style.css +43 -0
- package/lib/modules/annotation/components/toolbar/components/panel/index.d.ts +5 -0
- package/lib/modules/annotation/components/toolbar/components/panel/index.js +22 -0
- package/lib/modules/annotation/components/toolbar/components/panel/style.css +24 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/index.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/index.js +58 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.d.ts +3 -0
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +34 -0
- package/lib/modules/annotation/components/toolbar/components/tips/index.d.ts +2 -0
- package/lib/modules/annotation/components/toolbar/components/tips/index.js +25 -0
- package/lib/modules/annotation/components/toolbar/components/tips/style.css +19 -0
- package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
- package/lib/modules/annotation/components/toolbar/index.js +1 -0
- package/lib/modules/annotation/components/toolbar/store.d.ts +40 -0
- package/lib/modules/annotation/components/toolbar/store.js +279 -0
- package/lib/modules/annotation/components/toolbar/style.css +55 -0
- package/lib/modules/annotation/components/toolbar/view.d.ts +2 -0
- package/lib/modules/annotation/components/toolbar/view.js +120 -0
- package/lib/modules/annotation/index.d.ts +38 -0
- package/lib/modules/annotation/index.js +169 -0
- package/lib/modules/annotation/store.d.ts +93 -0
- package/lib/modules/annotation/store.js +673 -0
- package/lib/modules/annotation/style.css +26 -0
- package/lib/modules/annotation/view.d.ts +3 -0
- package/lib/modules/annotation/view.js +49 -0
- package/lib/modules/chat/view.js +112 -100
- package/lib/modules/components/annotation-menu/index.d.ts +7 -0
- package/lib/modules/components/annotation-menu/index.js +119 -0
- package/lib/modules/components/leave-meeting/components/assign-host.js +26 -23
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +10 -4
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +4 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +10 -6
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +3 -4
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +0 -3
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +6 -32
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +11 -3
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +7 -10
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +0 -2
- package/lib/modules/components/member-window/components/member-actions/index.js +1 -32
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +38 -1
- package/lib/modules/components/member-window/components/member-actions/store.js +130 -23
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +2 -1
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +6 -1
- package/lib/modules/components/member-window/components/video-player/index.d.ts +1 -0
- package/lib/modules/components/member-window/index.css +37 -0
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +8 -5
- package/lib/modules/components/member-window/types.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +7 -6
- package/lib/modules/control-bar/components/annotation-button/index.d.ts +1 -0
- package/lib/modules/control-bar/components/annotation-button/index.js +59 -0
- package/lib/modules/control-bar/index.d.ts +6 -6
- package/lib/modules/control-bar/index.js +5 -34
- package/lib/modules/control-bar/store.d.ts +27 -13
- package/lib/modules/control-bar/store.js +121 -126
- package/lib/modules/control-bar/view.js +50 -4
- package/lib/modules/dialog/components/annotation-tool/index.d.ts +4 -0
- package/lib/modules/dialog/components/annotation-tool/index.js +53 -0
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/control-bar/index.d.ts +0 -2
- package/lib/modules/dialog/components/control-bar/index.js +1 -3
- package/lib/modules/dialog/components/host-area-container/index.d.ts +12 -0
- package/lib/modules/dialog/components/host-area-container/index.js +214 -0
- package/lib/modules/dialog/components/participant/index.js +1 -1
- package/lib/modules/dialog/components/system-preference/index.js +1 -1
- package/lib/modules/dialog/components/video-window/index.js +1 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +14 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.js +112 -0
- package/lib/modules/dialog/hooks/useElectron.d.ts +1 -0
- package/lib/modules/dialog/hooks/useElectron.js +13 -3
- package/lib/modules/dialog/index.d.ts +2 -3
- package/lib/modules/dialog/index.js +3 -26
- package/lib/modules/dialog/store.d.ts +14 -9
- package/lib/modules/dialog/store.js +56 -50
- package/lib/modules/event-confirm/components/window/index.d.ts +7 -0
- package/lib/modules/event-confirm/components/window/index.js +188 -0
- package/lib/modules/event-confirm/index.d.ts +4 -4
- package/lib/modules/event-confirm/index.js +6 -4
- package/lib/modules/event-confirm/store.d.ts +4 -5
- package/lib/modules/event-confirm/store.js +35 -26
- package/lib/modules/event-confirm/view.js +23 -171
- package/lib/modules/event-sound/index.js +1 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +33 -16
- package/lib/modules/layout/index.d.ts +4 -0
- package/lib/modules/layout/index.js +2 -0
- package/lib/modules/layout/store.d.ts +14 -2
- package/lib/modules/layout/store.js +77 -45
- package/lib/modules/layout/type.d.ts +7 -0
- package/lib/modules/participant/index.d.ts +2 -0
- package/lib/modules/participant/index.js +2 -1
- package/lib/modules/participant/store.d.ts +5 -2
- package/lib/modules/participant/store.js +73 -25
- package/lib/modules/setting/audio-settings/audio-settings.js +3 -14
- package/lib/modules/setting/index.d.ts +2 -0
- package/lib/modules/setting/index.js +3 -3
- package/lib/modules/setting/store.d.ts +8 -10
- package/lib/modules/setting/store.js +22 -20
- package/lib/modules/share-screen/components/selection/index.js +18 -42
- package/lib/modules/share-screen/index.d.ts +6 -2
- package/lib/modules/share-screen/index.js +4 -2
- package/lib/modules/share-screen/store.d.ts +41 -46
- package/lib/modules/share-screen/store.js +297 -718
- package/lib/modules/share-screen/view.js +2 -2
- package/lib/modules/state-bar/assets/fcr_grid_big.svg +1 -1
- package/lib/modules/state-bar/assets/fcr_listontop_big.svg +1 -1
- package/lib/modules/state-bar/index.css +8 -6
- package/lib/modules/state-bar/index.d.ts +4 -0
- package/lib/modules/state-bar/index.js +3 -1
- package/lib/modules/state-bar/layout-config.d.ts +1 -0
- package/lib/modules/state-bar/layout-config.js +15 -5
- package/lib/modules/state-bar/store.d.ts +9 -1
- package/lib/modules/state-bar/store.js +17 -2
- package/lib/modules/state-bar/view.js +9 -4
- package/lib/modules/video-window/components/members/index.js +2 -1
- package/lib/modules/waiting-room-layout/store.js +1 -1
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +5 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +10 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +16 -5
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +67 -12
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +22 -2
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -14
- package/lib/modules/whiteboard/components/toolbar/components/item/index.js +3 -2
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +58 -16
- package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +15 -4
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +45 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +235 -7
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +1 -1
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +13 -2
- package/lib/modules/whiteboard/components/toolbar/store.js +74 -24
- package/lib/modules/whiteboard/components/toolbar/{ style.css → style.css} +1 -0
- package/lib/modules/whiteboard/index.d.ts +2 -0
- package/lib/modules/whiteboard/index.js +22 -21
- package/lib/modules/whiteboard/style.css +0 -4
- package/lib/modules/whiteboard/view.js +8 -2
- package/lib/plugins/browser-runtime-plugin.js +10 -1
- package/lib/providers/annotation-provider.d.ts +128 -0
- package/lib/providers/annotation-provider.js +421 -0
- package/lib/providers/device-provider.d.ts +3 -3
- package/lib/providers/device-provider.js +8 -6
- package/lib/providers/event-provider.d.ts +3 -3
- package/lib/providers/interpreter-provider.d.ts +1 -0
- package/lib/providers/interpreter-provider.js +182 -154
- package/lib/providers/privilege-provider.d.ts +35 -6
- package/lib/providers/privilege-provider.js +105 -49
- package/lib/providers/renderer-provider.js +3 -7
- package/lib/providers/room-provider.d.ts +13 -1
- package/lib/providers/room-provider.js +21 -7
- package/lib/providers/screen-share-provider.d.ts +131 -34
- package/lib/providers/screen-share-provider.js +554 -173
- package/lib/providers/sharing-provider.d.ts +37 -0
- package/lib/{shared-data-source/screen-share-data-source.js → providers/sharing-provider.js} +102 -39
- package/lib/providers/user-setting-storage-provider.d.ts +20 -0
- package/lib/providers/user-setting-storage-provider.js +74 -0
- package/lib/runtime.d.ts +6 -1
- package/lib/scenes/main-scene.d.ts +7 -2
- package/lib/scenes/main-scene.js +55 -27
- package/lib/scenes/waiting-scene.d.ts +6 -0
- package/lib/scenes/waiting-scene.js +15 -5
- package/lib/shared-data-source/config.d.ts +1 -5
- package/lib/shared-data-source/config.js +11 -81
- package/lib/shared-data-source/member-data.d.ts +21 -5
- package/lib/shared-data-source/member-data.js +69 -17
- package/lib/shared-data-source/screen-share-data.d.ts +274 -0
- package/lib/shared-data-source/screen-share-data.js +390 -0
- package/lib/shared-data-source/security-data.d.ts +4 -1
- package/lib/shared-data-source/security-data.js +5 -2
- package/lib/shared-data-source/setting.d.ts +13 -13
- package/lib/shared-data-source/setting.js +16 -10
- package/lib/shared-data-source/video-window.d.ts +2 -1
- package/lib/shared-data-source/video-window.js +56 -36
- package/lib/translations/enUS.d.ts +8 -0
- package/lib/translations/enUS.js +9 -1
- package/lib/translations/zhCN.d.ts +8 -0
- package/lib/translations/zhCN.js +11 -3
- package/lib/type.d.ts +55 -1
- package/lib/ui-manager.d.ts +3 -2
- package/lib/ui-manager.js +6 -4
- package/lib/ui-scene.js +70 -50
- package/lib/utilities/constant.d.ts +10 -2
- package/lib/utilities/constant.js +8 -0
- package/lib/utilities/logger.d.ts +4 -0
- package/lib/utilities/logger.js +8 -1
- package/lib/utilities/renderer-event.d.ts +3 -0
- package/lib/utilities/renderer-event.js +14 -1
- package/lib/utilities/screen.js +2 -1
- package/lib/utilities/setting-config-storage.d.ts +5 -6
- package/lib/utilities/setting-config-storage.js +33 -39
- package/lib/utilities/tools.d.ts +19 -1
- package/lib/utilities/tools.js +51 -4
- package/package.json +9 -7
- package/public/assets/cursors/fcr_whiteboard_input.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_pen.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
- package/public/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
- package/public/assets/fcr_chat_reddot.svg +3 -3
- package/public/assets/fcr_grid_big.svg +1 -1
- package/public/assets/fcr_leave2.svg +14 -14
- package/public/assets/fcr_listontop_big.svg +1 -1
- package/public/assets/step-gradient.svg +1 -1
- package/public/fragment.html +10 -0
- package/public/index.html +3 -1
- package/lib/shared-data-source/screen-share-data-source.d.ts +0 -37
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.is-array.js");
|
|
9
|
+
require("core-js/modules/es.array.push.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.bind.js");
|
|
12
|
+
require("core-js/modules/es.function.name.js");
|
|
13
|
+
require("core-js/modules/es.map.js");
|
|
14
|
+
require("core-js/modules/es.number.constructor.js");
|
|
15
|
+
require("core-js/modules/es.object.create.js");
|
|
16
|
+
require("core-js/modules/es.object.define-property.js");
|
|
17
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
19
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
20
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
21
|
+
require("core-js/modules/esnext.map.every.js");
|
|
22
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
23
|
+
require("core-js/modules/esnext.map.find.js");
|
|
24
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
25
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
26
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
27
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
28
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
29
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
30
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
31
|
+
require("core-js/modules/esnext.map.some.js");
|
|
32
|
+
require("core-js/modules/esnext.map.update.js");
|
|
33
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
34
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
35
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
36
|
+
Object.defineProperty(exports, "__esModule", {
|
|
37
|
+
value: true
|
|
38
|
+
});
|
|
39
|
+
exports.FcrUIAnnotationProviderImpl = exports.FcrAnnotationState = void 0;
|
|
40
|
+
require("core-js/modules/es.array.find.js");
|
|
41
|
+
require("core-js/modules/es.array.for-each.js");
|
|
42
|
+
require("core-js/modules/es.array.iterator.js");
|
|
43
|
+
require("core-js/modules/es.date.to-json.js");
|
|
44
|
+
require("core-js/modules/es.json.stringify.js");
|
|
45
|
+
require("core-js/modules/es.object.to-string.js");
|
|
46
|
+
require("core-js/modules/es.string.iterator.js");
|
|
47
|
+
require("core-js/modules/es.weak-map.js");
|
|
48
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
49
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
50
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
51
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
52
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
53
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
54
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
55
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
56
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
57
|
+
require("core-js/modules/web.timers.js");
|
|
58
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
59
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
60
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
61
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
62
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
63
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
64
|
+
var _constant = require("../utilities/constant");
|
|
65
|
+
var _base = require("../base");
|
|
66
|
+
var _mobx = require("mobx");
|
|
67
|
+
var _type = require("agora-rte-sdk/lib/core/rtc/type");
|
|
68
|
+
var _type2 = require("fcr-core/lib/room-control/sharing-control/type");
|
|
69
|
+
var _imports = require("fcr-core/lib/imports");
|
|
70
|
+
var _rendererEvent = require("../utilities/renderer-event");
|
|
71
|
+
var _fcrCore = require("fcr-core");
|
|
72
|
+
var _type3 = require("../modules/whiteboard/type");
|
|
73
|
+
var _tools = require("../utilities/tools");
|
|
74
|
+
var _type4 = require("fcr-core/lib/type");
|
|
75
|
+
var _logger = require("../utilities/logger");
|
|
76
|
+
var _FcrUIAnnotationProviderImpl;
|
|
77
|
+
var _initProto, _init_scalcValue, _init_annotationState, _init_annotating, _init_currentShareInfo, _zoomInDecs, _zoomOutDecs, _fullContainerDecs, _setOriginScalcDecs, _toggleAnnotationDecs, _openAnnotationWindowDecs, _hideAnnotationWindowDecs, _setCurrentShareInfoDecs, _openToolbarDecs, _closeToolbarDecs, _ref;
|
|
78
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
79
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
80
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
81
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
82
|
+
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"); }
|
|
83
|
+
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)]; } }; }
|
|
84
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
85
|
+
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); }
|
|
86
|
+
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; }
|
|
87
|
+
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; }
|
|
88
|
+
var FcrAnnotationState = exports.FcrAnnotationState = /*#__PURE__*/function (FcrAnnotationState) {
|
|
89
|
+
FcrAnnotationState["START"] = "start";
|
|
90
|
+
FcrAnnotationState["END"] = "end";
|
|
91
|
+
return FcrAnnotationState;
|
|
92
|
+
}({});
|
|
93
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
94
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
95
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
96
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
97
|
+
_ref = (_zoomInDecs = [_mobx.action, _mobx.action.bound], _zoomOutDecs = [_mobx.action, _mobx.action.bound], _fullContainerDecs = [_mobx.action, _mobx.action.bound], _setOriginScalcDecs = [_mobx.action, _mobx.action.bound], _toggleAnnotationDecs = [_mobx.action, _mobx.action.bound], _openAnnotationWindowDecs = [_mobx.action, _mobx.action.bound], _hideAnnotationWindowDecs = [_mobx.action, _mobx.action.bound], _setCurrentShareInfoDecs = [_mobx.action, _mobx.action.bound], _openToolbarDecs = [_mobx.action, _mobx.action.bound], _closeToolbarDecs = [_mobx.action, _mobx.action.bound], "_annotationDialogId");
|
|
98
|
+
var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PURE__*/function () {
|
|
99
|
+
function FcrUIAnnotationProviderImpl(_dialogProvider, _sharingProvider, _memberDataSource, _videoWindowDataSource, _screenShareProvider, _deviceProvider) {
|
|
100
|
+
var _this = this;
|
|
101
|
+
(0, _classCallCheck2["default"])(this, FcrUIAnnotationProviderImpl);
|
|
102
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), ''));
|
|
103
|
+
(0, _defineProperty2["default"])(this, "_annotationToolDialogId", '');
|
|
104
|
+
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
105
|
+
(0, _defineProperty2["default"])(this, "logger", (0, _logger.createLogger)({
|
|
106
|
+
prefix: 'FcrUIAnnotationProviderImpl'
|
|
107
|
+
}));
|
|
108
|
+
(0, _defineProperty2["default"])(this, "_shareScreenOwnerId", '');
|
|
109
|
+
(0, _defineProperty2["default"])(this, "_maxScalcValue", 4);
|
|
110
|
+
(0, _defineProperty2["default"])(this, "_minScalcValue", 1);
|
|
111
|
+
(0, _defineProperty2["default"])(this, "_annotationObserver", {
|
|
112
|
+
onConnectionStateUpdated: function () {
|
|
113
|
+
var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
114
|
+
var _this$_annotationCont, mainWindow;
|
|
115
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
116
|
+
while (1) switch (_context.prev = _context.next) {
|
|
117
|
+
case 0:
|
|
118
|
+
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
119
|
+
mainWindow = (_this$_annotationCont = _this._annotationControl) === null || _this$_annotationCont === void 0 ? void 0 : _this$_annotationCont.getMainWindow();
|
|
120
|
+
_this._boardMainWindow = mainWindow;
|
|
121
|
+
_this.annotationState = FcrAnnotationState.START;
|
|
122
|
+
}
|
|
123
|
+
case 1:
|
|
124
|
+
case "end":
|
|
125
|
+
return _context.stop();
|
|
126
|
+
}
|
|
127
|
+
}, _callee);
|
|
128
|
+
}));
|
|
129
|
+
function onConnectionStateUpdated(_x) {
|
|
130
|
+
return _onConnectionStateUpdated.apply(this, arguments);
|
|
131
|
+
}
|
|
132
|
+
return onConnectionStateUpdated;
|
|
133
|
+
}()
|
|
134
|
+
});
|
|
135
|
+
(0, _defineProperty2["default"])(this, "_observer", {
|
|
136
|
+
onScreenSharingUpdated: function onScreenSharingUpdated(ownerId, state) {
|
|
137
|
+
if (state === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION || state === _type2.FcrScreenSharingState.START_ONLY_SCREEN) {
|
|
138
|
+
_this._shareScreenOwnerId = ownerId;
|
|
139
|
+
if (_this._currentScreenShareOwnerCanStartAnnotation()) {
|
|
140
|
+
_this._initAnnotationTransaction(_this._shareScreenOwnerId);
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
_this.annotationState = FcrAnnotationState.END;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
_classPrivateFieldInitSpec(this, _A, _init_scalcValue(this, 1));
|
|
148
|
+
_classPrivateFieldInitSpec(this, _B, _init_annotationState(this, FcrAnnotationState.END));
|
|
149
|
+
_classPrivateFieldInitSpec(this, _C, _init_annotating(this, false));
|
|
150
|
+
_classPrivateFieldInitSpec(this, _D, _init_currentShareInfo(this, {
|
|
151
|
+
id: '',
|
|
152
|
+
type: _type.AgoraRtcScreenCaptureType.SCREEN,
|
|
153
|
+
bounds: {
|
|
154
|
+
x: 0,
|
|
155
|
+
y: 0,
|
|
156
|
+
width: 0,
|
|
157
|
+
height: 0
|
|
158
|
+
}
|
|
159
|
+
}));
|
|
160
|
+
this._dialogProvider = _dialogProvider;
|
|
161
|
+
this._sharingProvider = _sharingProvider;
|
|
162
|
+
this._memberDataSource = _memberDataSource;
|
|
163
|
+
this._videoWindowDataSource = _videoWindowDataSource;
|
|
164
|
+
this._screenShareProvider = _screenShareProvider;
|
|
165
|
+
this._deviceProvider = _deviceProvider;
|
|
166
|
+
//@ts-ignore
|
|
167
|
+
window._annotationProvider = this;
|
|
168
|
+
this._sharingProvider.getSharingControl().addObserver(this._observer);
|
|
169
|
+
setTimeout(function () {
|
|
170
|
+
return _this.openAnnotationWindow();
|
|
171
|
+
});
|
|
172
|
+
var exitScreenShareOwner = this._screenShareProvider.getCurrentScreenSharingOwner();
|
|
173
|
+
if (this._currentScreenShareOwnerCanStartAnnotation() && exitScreenShareOwner) {
|
|
174
|
+
this._initAnnotationTransaction(exitScreenShareOwner.userId);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return (0, _createClass2["default"])(FcrUIAnnotationProviderImpl, [{
|
|
178
|
+
key: "_currentScreenShareOwnerCanStartAnnotation",
|
|
179
|
+
value: function _currentScreenShareOwnerCanStartAnnotation() {
|
|
180
|
+
var owner = this._screenShareProvider.getCurrentScreenSharingOwner();
|
|
181
|
+
return owner && owner.platform !== _type4.FcrPlatform.IOS;
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
key: "_localUser",
|
|
185
|
+
get: function get() {
|
|
186
|
+
return this._memberDataSource.localUser;
|
|
187
|
+
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "scalcValue",
|
|
190
|
+
get: function get() {
|
|
191
|
+
return _classPrivateFieldGet(_A, this);
|
|
192
|
+
},
|
|
193
|
+
set: function set(v) {
|
|
194
|
+
_classPrivateFieldSet(_A, this, v);
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
key: "annotationState",
|
|
198
|
+
get: function get() {
|
|
199
|
+
return _classPrivateFieldGet(_B, this);
|
|
200
|
+
},
|
|
201
|
+
set: function set(v) {
|
|
202
|
+
_classPrivateFieldSet(_B, this, v);
|
|
203
|
+
}
|
|
204
|
+
}, {
|
|
205
|
+
key: "annotating",
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _classPrivateFieldGet(_C, this);
|
|
208
|
+
},
|
|
209
|
+
set: function set(v) {
|
|
210
|
+
_classPrivateFieldSet(_C, this, v);
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "currentShareInfo",
|
|
214
|
+
get: function get() {
|
|
215
|
+
return _classPrivateFieldGet(_D, this);
|
|
216
|
+
},
|
|
217
|
+
set: function set(v) {
|
|
218
|
+
_classPrivateFieldSet(_D, this, v);
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "screenShareWindowData",
|
|
222
|
+
get: function get() {
|
|
223
|
+
return this._videoWindowDataSource.mainList.find(function (item) {
|
|
224
|
+
return item.hasScreenSharing;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "boardMainWindow",
|
|
229
|
+
get: function get() {
|
|
230
|
+
return this._boardMainWindow;
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "annotationControl",
|
|
234
|
+
get: function get() {
|
|
235
|
+
return this._annotationControl;
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "annotationHasStart",
|
|
239
|
+
get: function get() {
|
|
240
|
+
return this.annotationState === FcrAnnotationState.START;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "zoomIn",
|
|
244
|
+
value: function zoomIn() {
|
|
245
|
+
if (this.scalcValue < this._maxScalcValue) {
|
|
246
|
+
this.scalcValue = this.scalcValue + 0.5;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}, {
|
|
250
|
+
key: "zoomOut",
|
|
251
|
+
value: function zoomOut() {
|
|
252
|
+
if (this.scalcValue > this._minScalcValue) {
|
|
253
|
+
this.scalcValue = this.scalcValue - 0.5;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}, {
|
|
257
|
+
key: "fullContainer",
|
|
258
|
+
value: function fullContainer(scalc) {
|
|
259
|
+
this.scalcValue = scalc;
|
|
260
|
+
}
|
|
261
|
+
}, {
|
|
262
|
+
key: "setOriginScalc",
|
|
263
|
+
value: function setOriginScalc() {
|
|
264
|
+
this.scalcValue = this._minScalcValue;
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
key: "toggleAnnotation",
|
|
268
|
+
value: function () {
|
|
269
|
+
var _toggleAnnotation = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
270
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
271
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
272
|
+
case 0:
|
|
273
|
+
if (this.annotating) {
|
|
274
|
+
this.annotating = false;
|
|
275
|
+
(0, _rendererEvent.sendEvent)({
|
|
276
|
+
action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_IGNORE,
|
|
277
|
+
payload: true
|
|
278
|
+
});
|
|
279
|
+
this._closeToolbar();
|
|
280
|
+
this.logger.info('[Annotation] toggleAnnotation close toolbar, ignore mouse event true');
|
|
281
|
+
} else {
|
|
282
|
+
this.annotating = true;
|
|
283
|
+
(0, _rendererEvent.sendEvent)({
|
|
284
|
+
action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_IGNORE,
|
|
285
|
+
payload: false
|
|
286
|
+
});
|
|
287
|
+
this._openToolbar();
|
|
288
|
+
this.logger.info('[Annotation] toggleAnnotation open toolbar, ignore mouse event false');
|
|
289
|
+
}
|
|
290
|
+
case 1:
|
|
291
|
+
case "end":
|
|
292
|
+
return _context2.stop();
|
|
293
|
+
}
|
|
294
|
+
}, _callee2, this);
|
|
295
|
+
}));
|
|
296
|
+
function toggleAnnotation() {
|
|
297
|
+
return _toggleAnnotation.apply(this, arguments);
|
|
298
|
+
}
|
|
299
|
+
return toggleAnnotation;
|
|
300
|
+
}()
|
|
301
|
+
}, {
|
|
302
|
+
key: "getAnnotationControl",
|
|
303
|
+
value: function getAnnotationControl() {
|
|
304
|
+
return this._sharingProvider.getSharingControl().getAnnotationControl();
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "openAnnotationWindow",
|
|
308
|
+
value: function openAnnotationWindow() {
|
|
309
|
+
this._annotationDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.ANNOTATION);
|
|
310
|
+
this.logger.info('[Annotation] openedAnnotationWindow');
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
313
|
+
key: "hideAnnotationWindow",
|
|
314
|
+
value: function hideAnnotationWindow() {
|
|
315
|
+
this.logger.info('[Annotation] hideAnnotationWindow');
|
|
316
|
+
this.annotating = false;
|
|
317
|
+
(0, _rendererEvent.sendEvent)({
|
|
318
|
+
action: _type3.ToolbarEvents.CLEAN,
|
|
319
|
+
payload: true
|
|
320
|
+
});
|
|
321
|
+
(0, _rendererEvent.sendEvent)({
|
|
322
|
+
action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_TO_SHOW,
|
|
323
|
+
payload: false
|
|
324
|
+
});
|
|
325
|
+
this._closeToolbar();
|
|
326
|
+
}
|
|
327
|
+
}, {
|
|
328
|
+
key: "setCurrentShareInfo",
|
|
329
|
+
value: function setCurrentShareInfo(info) {
|
|
330
|
+
this.currentShareInfo = info;
|
|
331
|
+
}
|
|
332
|
+
}, {
|
|
333
|
+
key: "setBoundsToAnnotationWindow",
|
|
334
|
+
value: function () {
|
|
335
|
+
var _setBoundsToAnnotationWindow = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(info) {
|
|
336
|
+
var _this2 = this;
|
|
337
|
+
var targetBounds, _ref2, bounds, _getCurrentSharingWor, width, height, x, y, windows, win;
|
|
338
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
339
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
340
|
+
case 0:
|
|
341
|
+
targetBounds = null;
|
|
342
|
+
if (this.currentShareInfo.type === _type.AgoraRtcScreenCaptureType.SCREEN) {
|
|
343
|
+
_ref2 = info || this.currentShareInfo, bounds = _ref2.bounds;
|
|
344
|
+
_getCurrentSharingWor = (0, _tools.getCurrentSharingWorkArea)({
|
|
345
|
+
currentShareBounds: bounds
|
|
346
|
+
}), width = _getCurrentSharingWor.width, height = _getCurrentSharingWor.height, x = _getCurrentSharingWor.x, y = _getCurrentSharingWor.y;
|
|
347
|
+
targetBounds = {
|
|
348
|
+
width: width,
|
|
349
|
+
height: height,
|
|
350
|
+
x: x,
|
|
351
|
+
y: y
|
|
352
|
+
};
|
|
353
|
+
} else {
|
|
354
|
+
windows = window.runtime.getWindows();
|
|
355
|
+
win = windows.find(function (win) {
|
|
356
|
+
return win.id === +_this2.currentShareInfo.id;
|
|
357
|
+
});
|
|
358
|
+
if (win) {
|
|
359
|
+
targetBounds = win.getBounds();
|
|
360
|
+
}
|
|
361
|
+
// 当 mac 是分享的全屏应用的时候,通过 id 无法获取到正确的 bounds,因为本身全屏幕应用的尺寸就是屏幕的尺寸,所以可以直接取 info 的 bounds
|
|
362
|
+
if (!targetBounds) {
|
|
363
|
+
targetBounds = (info === null || info === void 0 ? void 0 : info.bounds) || this.currentShareInfo.bounds || null;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
this.logger.info("[Annotation][setBoundsToAnnotationWindow]: targetBounds: ".concat(JSON.stringify(targetBounds)));
|
|
367
|
+
(0, _rendererEvent.sendEvent)({
|
|
368
|
+
action: _constant.FcrUIRendererEventAction.SET_CURRENT_SHARE_SCREEN_BOUNDS,
|
|
369
|
+
payload: targetBounds
|
|
370
|
+
});
|
|
371
|
+
case 4:
|
|
372
|
+
case "end":
|
|
373
|
+
return _context3.stop();
|
|
374
|
+
}
|
|
375
|
+
}, _callee3, this);
|
|
376
|
+
}));
|
|
377
|
+
function setBoundsToAnnotationWindow(_x2) {
|
|
378
|
+
return _setBoundsToAnnotationWindow.apply(this, arguments);
|
|
379
|
+
}
|
|
380
|
+
return setBoundsToAnnotationWindow;
|
|
381
|
+
}()
|
|
382
|
+
}, {
|
|
383
|
+
key: "release",
|
|
384
|
+
value: function release() {
|
|
385
|
+
this._disposers.forEach(function (disposer) {
|
|
386
|
+
return disposer();
|
|
387
|
+
});
|
|
388
|
+
this._dialogProvider.closeDialog(this._annotationDialogId);
|
|
389
|
+
}
|
|
390
|
+
}, {
|
|
391
|
+
key: "_openToolbar",
|
|
392
|
+
value: function _openToolbar() {
|
|
393
|
+
this._annotationToolDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.ANNOTATION_TOOL);
|
|
394
|
+
}
|
|
395
|
+
}, {
|
|
396
|
+
key: "_closeToolbar",
|
|
397
|
+
value: function _closeToolbar() {
|
|
398
|
+
this._dialogProvider.closeDialog(this._annotationToolDialogId);
|
|
399
|
+
this._annotationToolDialogId = '';
|
|
400
|
+
}
|
|
401
|
+
}, {
|
|
402
|
+
key: "_initAnnotationTransaction",
|
|
403
|
+
value: function _initAnnotationTransaction(screenShareOwnerId) {
|
|
404
|
+
this._annotationControl = this.getAnnotationControl();
|
|
405
|
+
if (this._localUser.userId !== screenShareOwnerId) {
|
|
406
|
+
if (this._annotationControl) {
|
|
407
|
+
this._annotationControl.addObserver(this._annotationObserver);
|
|
408
|
+
this._annotationControl.open();
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}]);
|
|
413
|
+
}();
|
|
414
|
+
_FcrUIAnnotationProviderImpl = FcrUIAnnotationProviderImpl;
|
|
415
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIAnnotationProviderImpl, [[_mobx.observable, 1, "scalcValue"], [_mobx.observable, 1, "annotationState"], [_mobx.observable, 1, "annotating"], [_mobx.observable, 1, "currentShareInfo"], [_mobx.computed, 3, "screenShareWindowData"], [_zoomInDecs, 18, "zoomIn"], [_zoomOutDecs, 18, "zoomOut"], [_fullContainerDecs, 18, "fullContainer"], [_setOriginScalcDecs, 18, "setOriginScalc"], [_toggleAnnotationDecs, 18, "toggleAnnotation"], [_imports.bound, 2, "getAnnotationControl"], [_openAnnotationWindowDecs, 18, "openAnnotationWindow"], [_hideAnnotationWindowDecs, 18, "hideAnnotationWindow"], [_setCurrentShareInfoDecs, 18, "setCurrentShareInfo"], [_imports.bound, 2, "setBoundsToAnnotationWindow"], [_imports.bound, 2, "release"], [_openToolbarDecs, 18, "_openToolbar"], [_closeToolbarDecs, 18, "_closeToolbar"], [_imports.bound, 2, "_initAnnotationTransaction"]], []).e, 5);
|
|
416
|
+
_init_scalcValue = _applyDecs$e[0];
|
|
417
|
+
_init_annotationState = _applyDecs$e[1];
|
|
418
|
+
_init_annotating = _applyDecs$e[2];
|
|
419
|
+
_init_currentShareInfo = _applyDecs$e[3];
|
|
420
|
+
_initProto = _applyDecs$e[4];
|
|
421
|
+
(0, _base.registerDependency)('annotationProvider');
|
|
@@ -6,7 +6,7 @@ import { VirtualBackground } from '../modules/device-pretest/assets/virtual-back
|
|
|
6
6
|
import { FcrUIVideoEffectType, FcrUIBeautyKey, FcrUIConnectType, FcrUIResource, FcrUIDeviceObserver, FcrUIMediaConfig, FcrUIAiDenoiseLevel, FcrUiResourceType } from '../type';
|
|
7
7
|
import { FcrUIEventProvider } from './event-provider';
|
|
8
8
|
import { BeautyKey } from '../modules/setting/store';
|
|
9
|
-
import {
|
|
9
|
+
import { FcrUIUserSettingStorageProviderImpl } from './user-setting-storage-provider';
|
|
10
10
|
export declare const DEFAULT_DEVICE_ID = "default";
|
|
11
11
|
export interface FcrUIDeviceProvider {
|
|
12
12
|
/**
|
|
@@ -273,7 +273,7 @@ export declare class FcrUIDeviceProviderImpl implements FcrUIDeviceProvider {
|
|
|
273
273
|
private _eventProvider;
|
|
274
274
|
private _mediaControl;
|
|
275
275
|
private _mediaConfig;
|
|
276
|
-
private
|
|
276
|
+
private _userSettingStorageProvider;
|
|
277
277
|
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
278
278
|
private _observable;
|
|
279
279
|
private _listeners;
|
|
@@ -339,7 +339,7 @@ export declare class FcrUIDeviceProviderImpl implements FcrUIDeviceProvider {
|
|
|
339
339
|
};
|
|
340
340
|
get isAudioConnected(): boolean;
|
|
341
341
|
get shouldEnableMicBeforeSession(): boolean;
|
|
342
|
-
constructor(_eventProvider: FcrUIEventProvider, _mediaControl: FcrDesktopMediaControl, _mediaConfig: FcrUIMediaConfig,
|
|
342
|
+
constructor(_eventProvider: FcrUIEventProvider, _mediaControl: FcrDesktopMediaControl, _mediaConfig: FcrUIMediaConfig, _userSettingStorageProvider: FcrUIUserSettingStorageProviderImpl);
|
|
343
343
|
getScreenTrack(id: string): FcrScreenTrack;
|
|
344
344
|
getLoopbackTrack(id: string): FcrLoopbackTrack;
|
|
345
345
|
checkLoopbackDevice(): Promise<number>;
|
|
@@ -117,7 +117,6 @@ var _mobx = require("mobx");
|
|
|
117
117
|
var _virtualBackdoundResources = require("../modules/device-pretest/assets/virtual-backdound-resources");
|
|
118
118
|
var _type2 = require("../type");
|
|
119
119
|
var _tools = require("../utilities/tools");
|
|
120
|
-
var _store = require("../modules/setting/store");
|
|
121
120
|
var _logger = require("../utilities/logger");
|
|
122
121
|
var _FcrUIDeviceProviderImpl;
|
|
123
122
|
var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _loadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
|
|
@@ -164,7 +163,7 @@ var _b = /*#__PURE__*/new WeakMap();
|
|
|
164
163
|
var _c = /*#__PURE__*/new WeakMap();
|
|
165
164
|
_ref = (_startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _startSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _stopSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _setCurrentIsMirrorDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorPreviewDecs = [_mobx.action, _mobx.action.bound], _setBeautyOptionsDecs = [_mobx.action, _mobx.action.bound], _handleCancelForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _handleForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraEnabledDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _startMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _stopMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _enableVirtualBackgroundDecs = [_mobx.action, _mobx.action.bound], _setEditBeautyKeyDecs = [_mobx.action, _mobx.action.bound], _enableBeautyEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerIdDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerVolumeDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneVolumeDecs = [_mobx.action, _mobx.action.bound], _loadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerAddedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerRemovedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
166
165
|
var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
|
|
167
|
-
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig,
|
|
166
|
+
function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig, _userSettingStorageProvider) {
|
|
168
167
|
var _this = this;
|
|
169
168
|
(0, _classCallCheck2["default"])(this, FcrUIDeviceProviderImpl);
|
|
170
169
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
|
|
@@ -234,7 +233,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
234
233
|
this._eventProvider = _eventProvider;
|
|
235
234
|
this._mediaControl = _mediaControl;
|
|
236
235
|
this._mediaConfig = _mediaConfig;
|
|
237
|
-
this.
|
|
236
|
+
this._userSettingStorageProvider = _userSettingStorageProvider;
|
|
238
237
|
this._listeners.push((0, _mobx.reaction)(function () {
|
|
239
238
|
return _this.cameraId;
|
|
240
239
|
}, this._handleCameraChanged));
|
|
@@ -681,7 +680,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
681
680
|
}, {
|
|
682
681
|
key: "_initLocalSetting",
|
|
683
682
|
value: function _initLocalSetting() {
|
|
684
|
-
var
|
|
683
|
+
var _this$_userSettingSto;
|
|
684
|
+
var value = (_this$_userSettingSto = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto === void 0 ? void 0 : _this$_userSettingSto.setting;
|
|
685
685
|
if (value) {
|
|
686
686
|
var _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
|
|
687
687
|
var _microphoneVolume = (_value$microphoneVolu = value.microphoneVolume) !== null && _value$microphoneVolu !== void 0 ? _value$microphoneVolu : this.microphoneVolume;
|
|
@@ -707,6 +707,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
707
707
|
_this2.logger.info('[FcrDeviceStore] init camera list:', list);
|
|
708
708
|
_this2.cameraList = list;
|
|
709
709
|
if (_this2.cameraList.length > 0) {
|
|
710
|
+
var _this2$_userSettingSt;
|
|
710
711
|
var _cameraId = _this2.cameraList[0].deviceId;
|
|
711
712
|
var defaultCameraDeviceId = _this2._getDefaultDeviceId({
|
|
712
713
|
initValue: _cameraId,
|
|
@@ -715,7 +716,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
715
716
|
});
|
|
716
717
|
_this2.logger.info('[FcrDeviceStore] select default camera id:', defaultCameraDeviceId);
|
|
717
718
|
_this2.setCameraId(defaultCameraDeviceId);
|
|
718
|
-
var localSetting = _this2.
|
|
719
|
+
var localSetting = (_this2$_userSettingSt = _this2._userSettingStorageProvider.read()) === null || _this2$_userSettingSt === void 0 ? void 0 : _this2$_userSettingSt.setting;
|
|
719
720
|
if (localSetting) {
|
|
720
721
|
var _localSetting$enableB, _localSetting$beautyO;
|
|
721
722
|
if (localSetting.enable) {
|
|
@@ -1892,10 +1893,11 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
|
|
|
1892
1893
|
}, {
|
|
1893
1894
|
key: "_getDefaultDeviceId",
|
|
1894
1895
|
value: function _getDefaultDeviceId(_ref6) {
|
|
1896
|
+
var _this$_userSettingSto2;
|
|
1895
1897
|
var initValue = _ref6.initValue,
|
|
1896
1898
|
localKey = _ref6.localKey,
|
|
1897
1899
|
list = _ref6.list;
|
|
1898
|
-
var localSetting = this.
|
|
1900
|
+
var localSetting = (_this$_userSettingSto2 = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto2 === void 0 ? void 0 : _this$_userSettingSto2.setting;
|
|
1899
1901
|
var defaultValue = initValue;
|
|
1900
1902
|
if (localSetting && localSetting[localKey]) {
|
|
1901
1903
|
var _list$find$deviceId, _list$find;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FcrUIDialogKey, FcrUIAction } from '../utilities/constant';
|
|
2
2
|
import { FcrUserInfo } from 'fcr-core/lib/type';
|
|
3
|
-
import { DeviceSettingDialogConfig,
|
|
3
|
+
import { DeviceSettingDialogConfig, FcrUICustomSetting } from '../modules/setting/store';
|
|
4
4
|
import { FcrUINewChatMessagesParams, FcrUINotificationContentType, FcrUINotificationParams, FcrUISetMainSpeakerParams, FcrUIToastParams } from '../type';
|
|
5
5
|
import { ConfirmContentProps } from 'agora-ui-foundation/lib/components/confirm-content';
|
|
6
6
|
import { FcrRoomType } from 'fcr-core/lib/room-control/type';
|
|
@@ -39,7 +39,7 @@ export interface FcrUIEventProvider {
|
|
|
39
39
|
closeInviteDialog(): void;
|
|
40
40
|
closeWaitingRoomDialog(): void;
|
|
41
41
|
closeRemoveAdmitWaitingRoomDialog(dialogKey: FcrUIDialogKey): void;
|
|
42
|
-
notifyCustomSettingsChanged(settings:
|
|
42
|
+
notifyCustomSettingsChanged(settings: FcrUICustomSetting): void;
|
|
43
43
|
notifyChatUpdateTarget(user: FcrUserInfo, roomType: FcrRoomType): void;
|
|
44
44
|
notifyChatResetTarget(): void;
|
|
45
45
|
addObserver(observer: FcrUIEventObserver): void;
|
|
@@ -79,7 +79,7 @@ export declare class FcrUIEventProviderImpl implements FcrUIEventProvider {
|
|
|
79
79
|
closeInviteDialog(): void;
|
|
80
80
|
closeWaitingRoomDialog(): void;
|
|
81
81
|
closeRemoveAdmitWaitingRoomDialog(dialogKey: FcrUIDialogKey): void;
|
|
82
|
-
notifyCustomSettingsChanged(settings:
|
|
82
|
+
notifyCustomSettingsChanged(settings: FcrUICustomSetting): void;
|
|
83
83
|
addObserver(observer: FcrUIEventObserver): void;
|
|
84
84
|
removeObserver(observer: FcrUIEventObserver): void;
|
|
85
85
|
notifyChatUpdateTarget(user: FcrUserInfo, roomType: FcrRoomType): void;
|
|
@@ -193,6 +193,7 @@ export declare class FcrUIInterpreterProviderImpl implements FcrUIInterpreterPro
|
|
|
193
193
|
private _publishEvent;
|
|
194
194
|
private _observerInterpreter;
|
|
195
195
|
private _retryTask;
|
|
196
|
+
private _closeOutputLanguageRoom;
|
|
196
197
|
private _roomProviderObserver;
|
|
197
198
|
constructor(params: FcrUIInterpreterProviderImplParams);
|
|
198
199
|
private _clearRetryTaskTimer;
|