fcr-ui-scene 3.8.0-alpha → 3.8.1-alpha
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/base.js +2 -2
- package/lib/electron/bootstrap-sdk.js +6 -6
- package/lib/electron/exit-codes.js +11 -11
- package/lib/electron/hang-detection/manager.js +4 -4
- package/lib/electron/ipc-protocol.js +12 -12
- package/lib/electron/process-manager/event-manager.js +30 -30
- package/lib/electron/process-manager/index.js +88 -88
- package/lib/electron/process-manager/state-manager.js +57 -57
- package/lib/electron/process-manager/types.js +16 -16
- package/lib/electron/sdk-helper.js +3 -3
- package/lib/electron/window-proxy/browser-window-proxy.js +13 -13
- package/lib/electron/window-proxy/main-process-handler.js +14 -14
- package/lib/fragments/annotation/style.css +9 -9
- package/lib/fragments/annotation/toolbar/components/item/style.css +45 -45
- package/lib/fragments/annotation/toolbar/components/panel/style.css +24 -24
- package/lib/fragments/annotation/toolbar/components/tips/style.css +19 -19
- package/lib/fragments/annotation/toolbar/style.css +55 -55
- package/lib/fragments/whiteboard/cursor.css +77 -77
- package/lib/fragments/whiteboard/store.js +1 -1
- package/lib/fragments/whiteboard/style.css +4 -4
- package/lib/global.css +62 -62
- package/lib/global.d.ts +27 -27
- package/lib/modules/action-bar/components/chat/index.css +88 -88
- package/lib/modules/action-bar/components/more/index.css +114 -114
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -58
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -56
- package/lib/modules/action-bar/components/notification-bar/index.css +74 -74
- package/lib/modules/action-bar/components/participants/index.css +21 -21
- package/lib/modules/action-bar/components/record/index.css +39 -39
- package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -86
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -22
- package/lib/modules/action-bar/index.css +358 -358
- package/lib/modules/action-bar/main-scene/view.js +3 -3
- package/lib/modules/audio-stream/index.js +3 -3
- package/lib/modules/caption/draggable-container/index.css +10 -10
- package/lib/modules/caption/draggable-container/index.js +34 -12
- package/lib/modules/caption/store.d.ts +1 -4
- package/lib/modules/caption/store.js +10 -18
- package/lib/modules/caption/view.css +158 -158
- package/lib/modules/caption/view.js +16 -27
- package/lib/modules/chat/components/chat-bar/index.css +89 -89
- package/lib/modules/chat/components/chat-select/index.css +185 -185
- package/lib/modules/chat/index.css +124 -124
- package/lib/modules/chat/store.d.ts +1 -0
- package/lib/modules/chat/store.js +2 -2
- package/lib/modules/components/apps/app-item/index.css +49 -49
- package/lib/modules/components/apps/index.css +9 -9
- package/lib/modules/components/caption-menu/index.css +58 -58
- package/lib/modules/components/caption-menu/index.d.ts +2 -0
- package/lib/modules/components/caption-menu/index.js +13 -10
- package/lib/modules/components/caption-menu/participants-privilege-control-options.js +5 -19
- package/lib/modules/components/caption-menu/steps/index.css +73 -73
- package/lib/modules/components/caption-menu/translation-setting-options.js +31 -24
- package/lib/modules/components/control-bar/components/loading/index.css +76 -76
- package/lib/modules/components/control-bar/components/progress/style.css +51 -51
- package/lib/modules/components/control-bar/components/switch-theme/index.css +101 -101
- package/lib/modules/components/control-bar/index.css +99 -99
- package/lib/modules/components/device-control/index.css +177 -177
- package/lib/modules/components/leave-meeting/components/index.css +151 -151
- package/lib/modules/components/leave-meeting/style.css +9 -9
- package/lib/modules/components/member-window/components/member-actions/store.js +22 -22
- package/lib/modules/components/member-window/index.css +502 -502
- package/lib/modules/components/security-menu/index.css +42 -42
- package/lib/modules/components/tab-frame/index.css +40 -40
- package/lib/modules/components/toolbar/components/item/style.css +94 -94
- package/lib/modules/components/toolbar/components/panel/style.css +86 -86
- package/lib/modules/components/toolbar/style.css +85 -85
- package/lib/modules/connection-gateway/components/computer/index.css +12 -12
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +36 -36
- package/lib/modules/connection-gateway/components/phone/components/calling/index.css +72 -72
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +10 -10
- package/lib/modules/connection-gateway/components/phone/components/useing/index.css +46 -46
- package/lib/modules/connection-gateway/components/phone/index.css +49 -49
- package/lib/modules/connection-gateway/index.css +6 -6
- package/lib/modules/control-bar/components/carmera/index.js +7 -39
- package/lib/modules/control-bar/components/cloud-recording-buttons.js +18 -33
- package/lib/modules/control-bar/components/meeting-details/index.css +133 -133
- package/lib/modules/control-bar/components/microphone/index.js +3 -43
- package/lib/modules/control-bar/components/more-actions/index.css +103 -103
- package/lib/modules/control-bar/components/share-audio/index.css +90 -90
- package/lib/modules/control-bar/components/share-audio/index.d.ts +2 -0
- package/lib/modules/control-bar/components/share-audio/index.js +4 -10
- package/lib/modules/control-bar/components/share-state-nav/index.css +79 -79
- package/lib/modules/control-bar/hooks.d.ts +1 -0
- package/lib/modules/control-bar/hooks.js +140 -1
- package/lib/modules/control-bar/index.css +340 -340
- package/lib/modules/control-bar/index.js +4 -4
- package/lib/modules/control-bar/store.d.ts +3 -4
- package/lib/modules/control-bar/store.js +37 -30
- package/lib/modules/control-bar/type.d.ts +3 -0
- package/lib/modules/control-bar/view.js +40 -57
- package/lib/modules/device-pretest/index.css +123 -123
- package/lib/modules/dialog/components/confirm/index.css +24 -24
- package/lib/modules/dialog/components/confirm/index.js +0 -1
- package/lib/modules/dialog/components/dialog-container/index.css +112 -112
- package/lib/modules/dialog/components/dialog-container/index.js +1 -0
- package/lib/modules/dialog/dialogs/confirm/index.css +24 -24
- package/lib/modules/dialog/dialogs/device-setting/index.css +26 -26
- package/lib/modules/dialog/dialogs/interpreter/index.css +30 -30
- package/lib/modules/dialog/dialogs/mute-all/index.css +20 -20
- package/lib/modules/dialog/dialogs/system-preference/index.css +52 -52
- package/lib/modules/dialog/dialogs/widget/index.js +4 -4
- package/lib/modules/dialog/index.css +56 -56
- package/lib/modules/event-toast/index.css +25 -25
- package/lib/modules/event-toast/index.js +7 -1
- package/lib/modules/interpreter/action/add-btn/index.css +4 -4
- package/lib/modules/interpreter/action/delete-btn/index.css +14 -14
- package/lib/modules/interpreter/action/switch-btn/index.css +3 -3
- package/lib/modules/interpreter/dialog-content/index.css +33 -33
- package/lib/modules/interpreter/footer/index.css +11 -11
- package/lib/modules/interpreter/index.css +4 -4
- package/lib/modules/interpreter/interpreter-list/index.css +8 -8
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +46 -46
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +46 -46
- package/lib/modules/interpreter/interpreter-list/interpreter-item/index.css +32 -32
- package/lib/modules/interpreter/loading-wrapper/index.css +53 -53
- package/lib/modules/invite/components/voip-invite.css +26 -26
- package/lib/modules/invite/index.css +331 -331
- package/lib/modules/layout/components/CommonVideoRenderer.js +4 -4
- package/lib/modules/layout/components/index.css +653 -653
- package/lib/modules/layout/index.css +59 -59
- package/lib/modules/layout/store.base.d.ts +1 -1
- package/lib/modules/layout/store.base.js +5 -5
- package/lib/modules/layout/store.electron.d.ts +0 -1
- package/lib/modules/layout/store.electron.js +37 -133
- package/lib/modules/layout/type.js +5 -5
- package/lib/modules/notification/index.css +77 -77
- package/lib/modules/notification/interpreter-status/index.css +76 -76
- package/lib/modules/participant/components/confirm-input/index.css +4 -4
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +83 -83
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +87 -87
- package/lib/modules/participant/index.css +102 -102
- package/lib/modules/participant/store.base.js +183 -185
- package/lib/modules/pc-audio-connect/index.css +12 -12
- package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -36
- package/lib/modules/phone-audio-connect/components/calling/index.css +72 -72
- package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -10
- package/lib/modules/phone-audio-connect/components/useing/index.css +46 -46
- package/lib/modules/phone-audio-connect/index.css +56 -56
- package/lib/modules/secondary-window/store.js +8 -10
- package/lib/modules/setting/audio-settings/index.css +195 -195
- package/lib/modules/setting/audio-whiteList/audio-device-adaptation.d.ts +28 -0
- package/lib/modules/setting/audio-whiteList/audio-device-adaptation.js +43 -7
- package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.d.ts +3 -14
- package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.js +51 -30
- package/lib/modules/setting/caption_and_transcribing/index.css +88 -88
- package/lib/modules/setting/general-settings/index.css +41 -41
- package/lib/modules/setting/index.css +112 -112
- package/lib/modules/setting/index.js +4 -2
- package/lib/modules/setting/minutes-settings/index.css +65 -65
- package/lib/modules/setting/state/index.css +207 -207
- package/lib/modules/setting/storage-settings/index.css +91 -91
- package/lib/modules/setting/store.base.d.ts +5 -3
- package/lib/modules/setting/store.base.js +64 -43
- package/lib/modules/setting/store.electron.d.ts +1 -1
- package/lib/modules/setting/store.electron.js +3 -7
- package/lib/modules/setting/translate-settings/index.css +47 -47
- package/lib/modules/setting/video-settings/index.css +357 -357
- package/lib/modules/setting/view.js +3 -2
- package/lib/modules/share-screen/components/control-bar/index.css +75 -75
- package/lib/modules/share-screen/components/selection/index.css +73 -73
- package/lib/modules/share-screen/components/share-state-bar/index.css +76 -76
- package/lib/modules/share-screen/index.js +10 -10
- package/lib/modules/share-screen/store.base.js +2 -2
- package/lib/modules/share-screen/store.electron.js +51 -23
- package/lib/modules/state-bar/assets/fcr_grid_big.svg +3 -3
- package/lib/modules/state-bar/assets/fcr_listontop_big.svg +3 -3
- package/lib/modules/state-bar/index.css +706 -706
- package/lib/modules/state-bar/main-scene/store.base.js +2 -2
- package/lib/modules/state-bar/meeting-detail.css +137 -137
- package/lib/modules/state-bar/meeting-network-state.css +150 -150
- package/lib/modules/state-bar/waiting-scene/store.base.js +2 -2
- package/lib/modules/subtitles-history/components/list-item.js +4 -7
- package/lib/modules/subtitles-history/components/settings/index.css +5 -5
- package/lib/modules/subtitles-history/index.css +129 -129
- package/lib/modules/subtitles-history/store.base.d.ts +3 -1
- package/lib/modules/subtitles-history/store.base.js +11 -1
- package/lib/modules/video-window/components/members/index.css +51 -51
- package/lib/modules/video-window/components/speaking/index.css +86 -86
- package/lib/modules/video-window/components/topControl/index.css +35 -35
- package/lib/modules/video-window/index.css +21 -21
- package/lib/modules/video-window/popover-watcher.js +3 -3
- package/lib/modules/video-window/store.js +10 -10
- package/lib/modules/waiting-room-layout/index.css +96 -96
- package/lib/modules/whiteboard/components/control-bar/index.css +52 -52
- package/lib/modules/whiteboard/components/loading/index.css +76 -76
- package/lib/modules/whiteboard/components/multi-window/index.css +63 -63
- package/lib/modules/whiteboard/components/pagination/index.css +228 -228
- package/lib/modules/whiteboard/components/progress/style.css +51 -51
- package/lib/modules/whiteboard/components/switch-theme/index.css +99 -99
- package/lib/modules/whiteboard/components/toolbar/style.css +591 -591
- package/lib/modules/whiteboard/style.css +140 -140
- package/lib/modules/widget/index.css +9 -9
- package/lib/object-manager.js +8 -8
- package/lib/plugins/module-dev-plugin.js +11 -11
- package/lib/providers/ability-provider.js +17 -17
- package/lib/providers/board-share/struct.js +6 -6
- package/lib/providers/dialog/provider.base.js +2 -2
- package/lib/providers/dialog/type.js +3 -3
- package/lib/providers/multi-display-provider.js +4 -4
- package/lib/providers/privilege-provider.js +7 -7
- package/lib/providers/screen-share/provider.base.d.ts +2 -13
- package/lib/providers/screen-share/provider.base.js +28 -35
- package/lib/providers/screen-share/provider.electron.d.ts +0 -5
- package/lib/providers/screen-share/provider.electron.js +31 -18
- package/lib/providers/screen-share/stream-state-sync.js +18 -18
- package/lib/providers/screen-share/struct.js +24 -24
- package/lib/providers/screen-share/type.d.ts +0 -16
- package/lib/providers/stt-provider/stt-provider.d.ts +3 -4
- package/lib/providers/stt-provider/stt-provider.js +145 -146
- package/lib/providers/stt-provider/type.d.ts +2 -10
- package/lib/providers/stt-provider/type.js +3 -3
- package/lib/providers/window/main-window.js +2 -2
- package/lib/providers/window/provider.js +5 -5
- package/lib/providers/window/renderer-window.js +2 -2
- package/lib/schema.js +26 -26
- package/lib/shared-data/meeting-time.js +8 -8
- package/lib/shared-data/setting.js +3 -3
- package/lib/translations/enUS.d.ts +12 -1
- package/lib/translations/enUS.js +22 -19
- package/lib/translations/zhCN.d.ts +12 -1
- package/lib/translations/zhCN.js +20 -17
- package/lib/type.js +21 -21
- package/lib/ui-scene-switch.js +2 -2
- package/lib/utilities/constant.js +6 -6
- package/lib/utilities/renderer.js +8 -8
- package/lib/utilities/shared-storage.js +2 -2
- package/lib/utilities/tools.js +14 -14
- package/package.json +78 -79
- package/public/assets/fcr_chat_reddot.svg +5 -5
- package/public/assets/fcr_grid_big.svg +3 -3
- package/public/assets/fcr_leave2.svg +58 -58
- package/public/assets/fcr_listontop_big.svg +3 -3
- package/public/assets/step-gradient.svg +10 -10
- package/public/fragment.html +10 -10
- package/public/index.html +183 -183
- package/public/meeting-manager.js +405 -405
|
@@ -25,9 +25,9 @@ var _deviceControl = _interopRequireDefault(require("../../components/device-con
|
|
|
25
25
|
var _leave = require("../components/leave");
|
|
26
26
|
var _constants = require("../constants");
|
|
27
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
|
-
/**
|
|
29
|
-
* @param toggleFold 用于点击折叠底部操作栏
|
|
30
|
-
* @returns
|
|
28
|
+
/**
|
|
29
|
+
* @param toggleFold 用于点击折叠底部操作栏
|
|
30
|
+
* @returns
|
|
31
31
|
*/var ToggleToolbarBtn = function ToggleToolbarBtn(_ref) {
|
|
32
32
|
var className = _ref.className,
|
|
33
33
|
toggleFold = _ref.toggleFold,
|
|
@@ -265,9 +265,9 @@ var AudioStreamUIModule = exports.AudioStreamUIModule = /*#__PURE__*/function (_
|
|
|
265
265
|
};
|
|
266
266
|
});
|
|
267
267
|
(0, _defineProperty2["default"])(_this, "_setMainRoomStreamVolume", function (volume) {
|
|
268
|
-
/**
|
|
269
|
-
* TODO 待音量增益的逻辑调整后,再使用
|
|
270
|
-
* const speakerVolume = (volume / 100) * this._deviceProvider.speakerVolume;
|
|
268
|
+
/**
|
|
269
|
+
* TODO 待音量增益的逻辑调整后,再使用
|
|
270
|
+
* const speakerVolume = (volume / 100) * this._deviceProvider.speakerVolume;
|
|
271
271
|
*/
|
|
272
272
|
var speakerVolume = volume;
|
|
273
273
|
var mainStreamControl = _this._streamControl;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.fcr-draggable-subtitles-container {
|
|
2
|
-
width: calc(100% - 10px);
|
|
3
|
-
/* height: calc(100% - 34px - 55px); */
|
|
4
|
-
position: absolute;
|
|
5
|
-
/* top: 34px;
|
|
6
|
-
bottom: 55px; */
|
|
7
|
-
left: 5px;
|
|
8
|
-
right: 5px;
|
|
9
|
-
margin: auto 0;
|
|
10
|
-
}
|
|
1
|
+
.fcr-draggable-subtitles-container {
|
|
2
|
+
width: calc(100% - 10px);
|
|
3
|
+
/* height: calc(100% - 34px - 55px); */
|
|
4
|
+
position: absolute;
|
|
5
|
+
/* top: 34px;
|
|
6
|
+
bottom: 55px; */
|
|
7
|
+
left: 5px;
|
|
8
|
+
right: 5px;
|
|
9
|
+
margin: auto 0;
|
|
10
|
+
}
|
|
@@ -37,6 +37,7 @@ var minWidth = 440;
|
|
|
37
37
|
var actionBarHeight = 55;
|
|
38
38
|
var stateBarHeight = 34;
|
|
39
39
|
var bottomOffsetCompensation = 22;
|
|
40
|
+
var offsetHeight = actionBarHeight + stateBarHeight + bottomOffsetCompensation;
|
|
40
41
|
var style = {
|
|
41
42
|
top: stateBarHeight,
|
|
42
43
|
bottom: actionBarHeight,
|
|
@@ -55,6 +56,8 @@ var enableResizing = {
|
|
|
55
56
|
var DraggableContainer = exports.DraggableContainer = (0, _mobxReact.observer)(function (_ref) {
|
|
56
57
|
var children = _ref.children;
|
|
57
58
|
var parentRef = (0, _react.useRef)(null);
|
|
59
|
+
var preParentHeight = (0, _react.useRef)(0);
|
|
60
|
+
var preParentWidth = (0, _react.useRef)(0);
|
|
58
61
|
var _useState = (0, _react.useState)(null),
|
|
59
62
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
60
63
|
position = _useState2[0],
|
|
@@ -84,18 +87,35 @@ var DraggableContainer = exports.DraggableContainer = (0, _mobxReact.observer)(f
|
|
|
84
87
|
try {
|
|
85
88
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
86
89
|
var entry = _step.value;
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
var _entry$contentRect = entry.contentRect,
|
|
91
|
+
resizedParentWidth = _entry$contentRect.width,
|
|
92
|
+
resizedParentHeight = _entry$contentRect.height;
|
|
93
|
+
if (preParentWidth.current !== resizedParentWidth || preParentHeight.current !== resizedParentHeight) {
|
|
94
|
+
var defaultSizeHeight = 94;
|
|
95
|
+
if (position) {
|
|
96
|
+
var scaleX = (position.x + size.width / 2) / preParentWidth.current;
|
|
97
|
+
var scaley = (position.y + defaultSizeHeight / 2) / preParentHeight.current;
|
|
98
|
+
var newY = resizedParentHeight * scaley - defaultSizeHeight / 2;
|
|
99
|
+
setPosition({
|
|
100
|
+
x: resizedParentWidth * scaleX - size.width / 2,
|
|
101
|
+
y: resizedParentHeight - newY < offsetHeight ? resizedParentHeight - offsetHeight : newY
|
|
102
|
+
});
|
|
103
|
+
}
|
|
98
104
|
}
|
|
105
|
+
preParentWidth.current = resizedParentWidth;
|
|
106
|
+
preParentHeight.current = resizedParentHeight;
|
|
107
|
+
|
|
108
|
+
// if (position && resizedParentWidth < size.width + position.x) {
|
|
109
|
+
// const isResize = size.width > resizedParentWidth;
|
|
110
|
+
// setPosition({
|
|
111
|
+
// x: isResize ? 0 : resizedParentWidth - size.width,
|
|
112
|
+
// y: position.y,
|
|
113
|
+
// });
|
|
114
|
+
// setSize({
|
|
115
|
+
// width: isResize ? resizedParentWidth : size.width,
|
|
116
|
+
// height: size.height,
|
|
117
|
+
// });
|
|
118
|
+
// }
|
|
99
119
|
}
|
|
100
120
|
} catch (err) {
|
|
101
121
|
_iterator.e(err);
|
|
@@ -107,9 +127,11 @@ var DraggableContainer = exports.DraggableContainer = (0, _mobxReact.observer)(f
|
|
|
107
127
|
if (parentRef.current) {
|
|
108
128
|
var parentWidth = parentRef.current.offsetWidth;
|
|
109
129
|
var parentHeight = parentRef.current.offsetHeight;
|
|
130
|
+
preParentWidth.current = parentWidth;
|
|
131
|
+
preParentHeight.current = parentHeight;
|
|
110
132
|
setPosition({
|
|
111
133
|
x: parentWidth / 2 - size.width / 2,
|
|
112
|
-
y: parentHeight -
|
|
134
|
+
y: parentHeight - offsetHeight
|
|
113
135
|
});
|
|
114
136
|
}
|
|
115
137
|
}, [parentRef.current]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FcrUIObjectManager } from '../../object-manager';
|
|
2
|
-
import { FcrUISttSentence } from '../../providers/stt-provider/type';
|
|
3
2
|
import { FcrLanguage } from 'fcr-core/lib/type';
|
|
4
3
|
import { FcrUICaptionFontSize } from '../../shared-data/stt-setting.ts/type';
|
|
5
4
|
import { FcrUICaptionMessage } from './type';
|
|
@@ -19,7 +18,6 @@ export default class CaptionStore {
|
|
|
19
18
|
objectManager: FcrUIObjectManager;
|
|
20
19
|
});
|
|
21
20
|
get captionSentence(): FcrUICaptionMessage | null;
|
|
22
|
-
get preCaptionSentence(): FcrUICaptionMessage | null;
|
|
23
21
|
get captionState(): boolean;
|
|
24
22
|
get isCaptionOpening(): boolean;
|
|
25
23
|
get transcribingState(): boolean;
|
|
@@ -35,7 +33,7 @@ export default class CaptionStore {
|
|
|
35
33
|
get captionSettingProps(): import("../components/caption-menu").CaptionMenuProps;
|
|
36
34
|
get isShowNoContentTips(): boolean;
|
|
37
35
|
get isShowListeningTips(): boolean;
|
|
38
|
-
get isCaptionVisible(): boolean
|
|
36
|
+
get isCaptionVisible(): boolean;
|
|
39
37
|
toggleTwoLineCaptionEnabled(): void;
|
|
40
38
|
toggleTwoLineTranscribingEnabled(): void;
|
|
41
39
|
startCaption(): Promise<void>;
|
|
@@ -44,7 +42,6 @@ export default class CaptionStore {
|
|
|
44
42
|
subscribeTranslateLanguage(language: FcrLanguage | null): void;
|
|
45
43
|
setCaptionFontSize(fontSize: FcrUICaptionFontSize): void;
|
|
46
44
|
clearCaptionSentence(): void;
|
|
47
|
-
clearPreCaptionSentence(): void;
|
|
48
45
|
openSubtitlesHistoryDialog(): void;
|
|
49
46
|
release(): void;
|
|
50
47
|
setIsHovered(isHovered: boolean): void;
|
|
@@ -146,11 +146,13 @@ var CaptionStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
146
146
|
this._sharedSttSettingDataSource = sharedSttSettingDataSource;
|
|
147
147
|
this._disposer.push((0, _mobx.reaction)(function () {
|
|
148
148
|
return _this._sttProvider.captionState;
|
|
149
|
-
}, this._handleCaptionStateUpdated)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
}, this._handleCaptionStateUpdated)
|
|
150
|
+
// reaction(() => this.isCaptionVisible, this._handleIsCaptionVisibleUpdated),
|
|
151
|
+
// reaction(
|
|
152
|
+
// () => this._screenShareProvider.isLocalUserScreenSharing,
|
|
153
|
+
// this._handleScreenShareStateUpdated,
|
|
154
|
+
// ),
|
|
155
|
+
);
|
|
154
156
|
}
|
|
155
157
|
return (0, _createClass2["default"])(CaptionStore, [{
|
|
156
158
|
key: "_tooltipDuration",
|
|
@@ -181,11 +183,6 @@ var CaptionStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
181
183
|
get: function get() {
|
|
182
184
|
return this._createCaptionMessage(this._sttProvider.captionSentence);
|
|
183
185
|
}
|
|
184
|
-
}, {
|
|
185
|
-
key: "preCaptionSentence",
|
|
186
|
-
get: function get() {
|
|
187
|
-
return this._createCaptionMessage(this._sttProvider.preCaptionSentence);
|
|
188
|
-
}
|
|
189
186
|
}, {
|
|
190
187
|
key: "captionState",
|
|
191
188
|
get: function get() {
|
|
@@ -264,14 +261,14 @@ var CaptionStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
264
261
|
}, {
|
|
265
262
|
key: "isCaptionVisible",
|
|
266
263
|
get: function get() {
|
|
267
|
-
if (this.isHovered) {
|
|
264
|
+
if (this.isHovered && this.captionState) {
|
|
268
265
|
return true;
|
|
269
266
|
}
|
|
270
267
|
var _this$_sttProvider = this._sttProvider,
|
|
271
268
|
isCaptionOpening = _this$_sttProvider.isCaptionOpening,
|
|
272
269
|
captionSentence = _this$_sttProvider.captionSentence;
|
|
273
270
|
var isShowTooltip = isCaptionOpening || captionSentence || this.isShowNoContentTips || this.isShowListeningTips;
|
|
274
|
-
return isShowTooltip;
|
|
271
|
+
return isShowTooltip && !this._screenShareProvider.isLocalUserScreenSharing;
|
|
275
272
|
}
|
|
276
273
|
}, {
|
|
277
274
|
key: "toggleTwoLineCaptionEnabled",
|
|
@@ -313,11 +310,6 @@ var CaptionStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
313
310
|
value: function clearCaptionSentence() {
|
|
314
311
|
this._sttProvider.clearCaptionSentence();
|
|
315
312
|
}
|
|
316
|
-
}, {
|
|
317
|
-
key: "clearPreCaptionSentence",
|
|
318
|
-
value: function clearPreCaptionSentence() {
|
|
319
|
-
this._sttProvider.clearPreCaptionSentence();
|
|
320
|
-
}
|
|
321
313
|
}, {
|
|
322
314
|
key: "openSubtitlesHistoryDialog",
|
|
323
315
|
value: function openSubtitlesHistoryDialog() {
|
|
@@ -358,7 +350,7 @@ var CaptionStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
358
350
|
}]);
|
|
359
351
|
}(); // #endregion
|
|
360
352
|
_CaptionStore = CaptionStore;
|
|
361
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_CaptionStore, [[_mobx.observable, 1, "_tooltipDuration"], [_mobx.observable, 1, "_tooltipInterval"], [_mobx.observable, 1, "isHovered"], [_mobx.computed, 3, "captionStyle"], [_mobx.computed, 3, "isTwoLineCaptionEnabled"], [_mobx.computed, 3, "isTwoLineTranscribingEnabled"], [_mobx.computed, 3, "sourceLanguage"], [_mobx.computed, 3, "translateLanguage"], [_mobx.computed, 3, "hasSetSourceLanguagePermission"], [_mobx.computed, 3, "isPrivilegeControlOptionsVisible"], [_mobx.computed, 3, "captionSettingProps"], [_imports.bound, 2, "toggleTwoLineCaptionEnabled"], [_imports.bound, 2, "toggleTwoLineTranscribingEnabled"], [_imports.bound, 2, "startCaption"], [_imports.bound, 2, "stopCaption"], [_imports.bound, 2, "updateSourceLanguage"], [_imports.bound, 2, "subscribeTranslateLanguage"], [_imports.bound, 2, "setCaptionFontSize"], [_imports.bound, 2, "clearCaptionSentence"], [_imports.bound, 2, "
|
|
353
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_CaptionStore, [[_mobx.observable, 1, "_tooltipDuration"], [_mobx.observable, 1, "_tooltipInterval"], [_mobx.observable, 1, "isHovered"], [_mobx.computed, 3, "captionStyle"], [_mobx.computed, 3, "isTwoLineCaptionEnabled"], [_mobx.computed, 3, "isTwoLineTranscribingEnabled"], [_mobx.computed, 3, "sourceLanguage"], [_mobx.computed, 3, "translateLanguage"], [_mobx.computed, 3, "hasSetSourceLanguagePermission"], [_mobx.computed, 3, "isPrivilegeControlOptionsVisible"], [_mobx.computed, 3, "captionSettingProps"], [_imports.bound, 2, "toggleTwoLineCaptionEnabled"], [_imports.bound, 2, "toggleTwoLineTranscribingEnabled"], [_imports.bound, 2, "startCaption"], [_imports.bound, 2, "stopCaption"], [_imports.bound, 2, "updateSourceLanguage"], [_imports.bound, 2, "subscribeTranslateLanguage"], [_imports.bound, 2, "setCaptionFontSize"], [_imports.bound, 2, "clearCaptionSentence"], [_imports.bound, 2, "openSubtitlesHistoryDialog"], [_imports.bound, 2, "setIsHovered"]], []).e, 4);
|
|
362
354
|
_init__tooltipDuration = _applyDecs$e[0];
|
|
363
355
|
_init__tooltipInterval = _applyDecs$e[1];
|
|
364
356
|
_init_isHovered = _applyDecs$e[2];
|
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
.fcr-caption-viewport {
|
|
2
|
-
position: relative;
|
|
3
|
-
min-height: 92px;
|
|
4
|
-
max-height: 132px;
|
|
5
|
-
height: 100%;
|
|
6
|
-
width: 100%;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
background: var(--fcr_ui_scene_black6);
|
|
9
|
-
border-radius: var(--fcr_cornerradius_l);
|
|
10
|
-
transition: all 0.3s ease;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.fcr-caption-viewport.fcr-caption-hovered {
|
|
15
|
-
background: var(--fcr_ui_scene_black8);
|
|
16
|
-
outline: 2px solid var(--fcr_ui_scene_ramp_brand6);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.fcr-caption-message-item {
|
|
20
|
-
/* position: absolute; */
|
|
21
|
-
transition: all 0.5s ease;
|
|
22
|
-
/* width: 100%; */
|
|
23
|
-
display: flex;
|
|
24
|
-
/* height: 100%; */
|
|
25
|
-
padding: 15px 20px;
|
|
26
|
-
align-items: start;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.fcr-caption-tips-container {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 50%;
|
|
32
|
-
left: 50%;
|
|
33
|
-
transform: translate(-50%, -50%);
|
|
34
|
-
font-size: 12px;
|
|
35
|
-
font-weight: 400;
|
|
36
|
-
line-height: 16px;
|
|
37
|
-
font-size: 500;
|
|
38
|
-
color: var(--fcr_ui_scene_white8);
|
|
39
|
-
color: var(--fcr_ui_scene_white10);
|
|
40
|
-
display: flex;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: 10px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.fcr-caption-loading-icon {
|
|
47
|
-
animation: spin 1s linear infinite;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.fcr-caption-entering {
|
|
51
|
-
animation: enterAnimation 0.5s forwards;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.fcr-caption-exiting {
|
|
55
|
-
animation: exitAnimation 0.5s forwards;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@keyframes enterAnimation {
|
|
59
|
-
0% {
|
|
60
|
-
transform: translateY(100%);
|
|
61
|
-
opacity: 0;
|
|
62
|
-
}
|
|
63
|
-
100% {
|
|
64
|
-
transform: translateY(0);
|
|
65
|
-
opacity: 1;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@keyframes exitAnimation {
|
|
70
|
-
0% {
|
|
71
|
-
transform: translateY(0);
|
|
72
|
-
opacity: 1;
|
|
73
|
-
}
|
|
74
|
-
100% {
|
|
75
|
-
transform: translateY(-100%);
|
|
76
|
-
opacity: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.fcr-caption-avatar-container {
|
|
81
|
-
margin-right: 11px;
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
}
|
|
85
|
-
.fcr-caption-avatar-container .fcr-avatar {
|
|
86
|
-
border-radius: var(--fcr_cornerradius_xs);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.fcr-caption-avatar {
|
|
90
|
-
width: 30px;
|
|
91
|
-
height: 30px;
|
|
92
|
-
border-radius: 50%;
|
|
93
|
-
object-fit: cover;
|
|
94
|
-
border: 1px solid #eee;
|
|
95
|
-
font-size: 12px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.fcr-caption-content-container {
|
|
99
|
-
flex: 1;
|
|
100
|
-
text-align: left;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.fcr-caption-username {
|
|
104
|
-
font-weight: 400;
|
|
105
|
-
color: #2c3e50;
|
|
106
|
-
margin-bottom: 5px;
|
|
107
|
-
font-size: 12px;
|
|
108
|
-
color: var(--fcr_app_white10, rgba(255, 255, 255, 1));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.fcr-caption-text-content {
|
|
112
|
-
font-size: 14px;
|
|
113
|
-
line-height: 1.3;
|
|
114
|
-
font-size: 500;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.fcr-caption-original-text {
|
|
118
|
-
color: var(--fcr_app_white10, rgba(255, 255, 255, 1));
|
|
119
|
-
margin-bottom: 5px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.fcr-caption-translated-text {
|
|
123
|
-
color: var(--fcr_ui_scene_ramp_2yellow6, rgba(255, 199, 0, 1));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.fcr-caption-action-buttons {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 5px;
|
|
129
|
-
right: 5px;
|
|
130
|
-
display: flex;
|
|
131
|
-
gap: 12px;
|
|
132
|
-
z-index: 1;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.fcr-caption-icon-button {
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
justify-content: center;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
transition: all 0.2s ease;
|
|
141
|
-
font-size: 14px;
|
|
142
|
-
color: #7f8c8d;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.fcr-caption-icon-button:hover {
|
|
146
|
-
background: var(--fcr_ui_scene_white2,);
|
|
147
|
-
border-radius: var(--fcr_cornerradius_s);
|
|
148
|
-
}
|
|
149
|
-
.fcr-caption-icon-button-close:hover {
|
|
150
|
-
border-radius: var(--fcr_cornerradius_s);
|
|
151
|
-
background: var(--fcr_homepage_red_6, rgba(245, 101, 92, 1));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.fcr-caption-button-hovered {
|
|
155
|
-
background-color: #4a90e2;
|
|
156
|
-
color: white;
|
|
157
|
-
border-color: #4a90e2;
|
|
158
|
-
}
|
|
1
|
+
.fcr-caption-viewport {
|
|
2
|
+
position: relative;
|
|
3
|
+
min-height: 92px;
|
|
4
|
+
max-height: 132px;
|
|
5
|
+
height: 100%;
|
|
6
|
+
width: 100%;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
background: var(--fcr_ui_scene_black6);
|
|
9
|
+
border-radius: var(--fcr_cornerradius_l);
|
|
10
|
+
transition: all 0.3s ease;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fcr-caption-viewport.fcr-caption-hovered {
|
|
15
|
+
background: var(--fcr_ui_scene_black8);
|
|
16
|
+
outline: 2px solid var(--fcr_ui_scene_ramp_brand6);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fcr-caption-message-item {
|
|
20
|
+
/* position: absolute; */
|
|
21
|
+
transition: all 0.5s ease;
|
|
22
|
+
/* width: 100%; */
|
|
23
|
+
display: flex;
|
|
24
|
+
/* height: 100%; */
|
|
25
|
+
padding: 15px 20px;
|
|
26
|
+
align-items: start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.fcr-caption-tips-container {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 50%;
|
|
32
|
+
left: 50%;
|
|
33
|
+
transform: translate(-50%, -50%);
|
|
34
|
+
font-size: 12px;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
line-height: 16px;
|
|
37
|
+
font-size: 500;
|
|
38
|
+
color: var(--fcr_ui_scene_white8);
|
|
39
|
+
color: var(--fcr_ui_scene_white10);
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 10px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fcr-caption-loading-icon {
|
|
47
|
+
animation: spin 1s linear infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.fcr-caption-entering {
|
|
51
|
+
animation: enterAnimation 0.5s forwards;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fcr-caption-exiting {
|
|
55
|
+
animation: exitAnimation 0.5s forwards;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes enterAnimation {
|
|
59
|
+
0% {
|
|
60
|
+
transform: translateY(100%);
|
|
61
|
+
opacity: 0;
|
|
62
|
+
}
|
|
63
|
+
100% {
|
|
64
|
+
transform: translateY(0);
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes exitAnimation {
|
|
70
|
+
0% {
|
|
71
|
+
transform: translateY(0);
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
100% {
|
|
75
|
+
transform: translateY(-100%);
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.fcr-caption-avatar-container {
|
|
81
|
+
margin-right: 11px;
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
.fcr-caption-avatar-container .fcr-avatar {
|
|
86
|
+
border-radius: var(--fcr_cornerradius_xs);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.fcr-caption-avatar {
|
|
90
|
+
width: 30px;
|
|
91
|
+
height: 30px;
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
object-fit: cover;
|
|
94
|
+
border: 1px solid #eee;
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.fcr-caption-content-container {
|
|
99
|
+
flex: 1;
|
|
100
|
+
text-align: left;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.fcr-caption-username {
|
|
104
|
+
font-weight: 400;
|
|
105
|
+
color: #2c3e50;
|
|
106
|
+
margin-bottom: 5px;
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
color: var(--fcr_app_white10, rgba(255, 255, 255, 1));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.fcr-caption-text-content {
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
line-height: 1.3;
|
|
114
|
+
font-size: 500;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.fcr-caption-original-text {
|
|
118
|
+
color: var(--fcr_app_white10, rgba(255, 255, 255, 1));
|
|
119
|
+
margin-bottom: 5px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.fcr-caption-translated-text {
|
|
123
|
+
color: var(--fcr_ui_scene_ramp_2yellow6, rgba(255, 199, 0, 1));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.fcr-caption-action-buttons {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 5px;
|
|
129
|
+
right: 5px;
|
|
130
|
+
display: flex;
|
|
131
|
+
gap: 12px;
|
|
132
|
+
z-index: 1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.fcr-caption-icon-button {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: all 0.2s ease;
|
|
141
|
+
font-size: 14px;
|
|
142
|
+
color: #7f8c8d;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.fcr-caption-icon-button:hover {
|
|
146
|
+
background: var(--fcr_ui_scene_white2,);
|
|
147
|
+
border-radius: var(--fcr_cornerradius_s);
|
|
148
|
+
}
|
|
149
|
+
.fcr-caption-icon-button-close:hover {
|
|
150
|
+
border-radius: var(--fcr_cornerradius_s);
|
|
151
|
+
background: var(--fcr_homepage_red_6, rgba(245, 101, 92, 1));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.fcr-caption-button-hovered {
|
|
155
|
+
background-color: #4a90e2;
|
|
156
|
+
color: white;
|
|
157
|
+
border-color: #4a90e2;
|
|
158
|
+
}
|
|
@@ -28,8 +28,8 @@ exports.CaptionView = exports.CaptionDraggableView = void 0;
|
|
|
28
28
|
require("core-js/modules/es.array.map.js");
|
|
29
29
|
require("core-js/modules/es.object.to-string.js");
|
|
30
30
|
require("core-js/modules/web.timers.js");
|
|
31
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
32
31
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
32
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
33
|
var _react = _interopRequireWildcard(require("react"));
|
|
34
34
|
var _mobxReact = require("mobx-react");
|
|
35
35
|
var _icon = require("agora-ui-foundation/lib/components/icon");
|
|
@@ -49,6 +49,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
49
49
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
50
50
|
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; }
|
|
51
51
|
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; }
|
|
52
|
+
var initialCaptionSettingVisible = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _type2.FcrUICaptionButtonHoverType.transcribing, false), _type2.FcrUICaptionButtonHoverType.caption, false), _type2.FcrUICaptionButtonHoverType.permission, false), _type2.FcrUICaptionButtonHoverType.close, false);
|
|
52
53
|
var CaptionMessage = (0, _mobxReact.observer)(function (_ref) {
|
|
53
54
|
var captionMessage = _ref.captionMessage,
|
|
54
55
|
isExiting = _ref.isExiting;
|
|
@@ -175,6 +176,13 @@ var ActionButtons = (0, _mobxReact.observer)(function () {
|
|
|
175
176
|
var preventDragOnTarget = function preventDragOnTarget(e) {
|
|
176
177
|
e.stopPropagation();
|
|
177
178
|
};
|
|
179
|
+
var _useState3 = (0, _react.useState)(initialCaptionSettingVisible),
|
|
180
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
181
|
+
captionSettingVisible = _useState4[0],
|
|
182
|
+
setCaptionSettingVisible = _useState4[1];
|
|
183
|
+
var handleCaptionSettingVisible = function handleCaptionSettingVisible(id, visible) {
|
|
184
|
+
setCaptionSettingVisible(_objectSpread(_objectSpread({}, initialCaptionSettingVisible), {}, (0, _defineProperty2["default"])({}, id, visible)));
|
|
185
|
+
};
|
|
178
186
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
179
187
|
className: "fcr-caption-action-buttons",
|
|
180
188
|
onMouseDown: preventDragOnTarget,
|
|
@@ -190,6 +198,10 @@ var ActionButtons = (0, _mobxReact.observer)(function () {
|
|
|
190
198
|
trigger: "click",
|
|
191
199
|
content: item.popoverContent,
|
|
192
200
|
disable: !item.popoverContent,
|
|
201
|
+
visible: captionSettingVisible[item.id],
|
|
202
|
+
onVisibleChange: function onVisibleChange(visible) {
|
|
203
|
+
return handleCaptionSettingVisible(item.id, visible);
|
|
204
|
+
},
|
|
193
205
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
194
206
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
195
207
|
className: "fcr-caption-icon-button ".concat(buttonHover[item.id] ? 'fcr-caption-button-hovered' : ''),
|
|
@@ -217,33 +229,12 @@ var ActionButtons = (0, _mobxReact.observer)(function () {
|
|
|
217
229
|
var CaptionView = exports.CaptionView = (0, _mobxReact.observer)(function () {
|
|
218
230
|
var _useContext4 = (0, _react.useContext)(_store.StoreContext),
|
|
219
231
|
captionSentence = _useContext4.captionSentence,
|
|
220
|
-
clearPreCaptionSentence = _useContext4.clearPreCaptionSentence,
|
|
221
232
|
clearCaptionSentence = _useContext4.clearCaptionSentence,
|
|
222
|
-
preCaptionSentence = _useContext4.preCaptionSentence,
|
|
223
233
|
isCaptionVisible = _useContext4.isCaptionVisible,
|
|
224
234
|
isHovered = _useContext4.isHovered,
|
|
225
235
|
setIsHovered = _useContext4.setIsHovered;
|
|
226
|
-
var clearPreCaptionTimerRef = (0, _react.useRef)(null);
|
|
227
236
|
var clearCaptionTimerRef = (0, _react.useRef)(null);
|
|
228
237
|
var isShowMessage = captionSentence !== null;
|
|
229
|
-
(0, _react.useEffect)(function () {
|
|
230
|
-
if (preCaptionSentence) {
|
|
231
|
-
if (clearPreCaptionTimerRef.current) {
|
|
232
|
-
clearTimeout(clearPreCaptionTimerRef.current);
|
|
233
|
-
clearPreCaptionTimerRef.current = null;
|
|
234
|
-
}
|
|
235
|
-
clearPreCaptionTimerRef.current = setTimeout(function () {
|
|
236
|
-
clearPreCaptionTimerRef.current = null;
|
|
237
|
-
clearPreCaptionSentence();
|
|
238
|
-
}, 100);
|
|
239
|
-
}
|
|
240
|
-
return function () {
|
|
241
|
-
if (clearPreCaptionTimerRef.current) {
|
|
242
|
-
clearTimeout(clearPreCaptionTimerRef.current);
|
|
243
|
-
clearPreCaptionTimerRef.current = null;
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
}, [preCaptionSentence]);
|
|
247
238
|
(0, _react.useEffect)(function () {
|
|
248
239
|
if (captionSentence) {
|
|
249
240
|
if (clearCaptionTimerRef.current) {
|
|
@@ -277,11 +268,9 @@ var CaptionView = exports.CaptionView = (0, _mobxReact.observer)(function () {
|
|
|
277
268
|
return setIsHovered(true);
|
|
278
269
|
},
|
|
279
270
|
ref: mouseMoveRef,
|
|
280
|
-
children: [isHovered && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionButtons, {}), !isShowMessage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(TooltipTips, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
isExiting: false
|
|
284
|
-
})
|
|
271
|
+
children: [isHovered && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionButtons, {}), !isShowMessage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(TooltipTips, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(CaptionMessage, {
|
|
272
|
+
captionMessage: captionSentence,
|
|
273
|
+
isExiting: false
|
|
285
274
|
})]
|
|
286
275
|
});
|
|
287
276
|
});
|