fcr-ui-scene 3.7.2 → 3.7.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.
Files changed (246) hide show
  1. package/lib/creator.js +23 -44
  2. package/lib/electron/app.js +7 -0
  3. package/lib/electron/injections.d.ts +1 -1
  4. package/lib/electron/injections.js +5 -3
  5. package/lib/electron/main.js +3 -1
  6. package/lib/fragments/annotation/index.d.ts +1 -0
  7. package/lib/fragments/annotation/index.js +13 -7
  8. package/lib/fragments/annotation/store.d.ts +8 -4
  9. package/lib/fragments/annotation/store.js +351 -267
  10. package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
  11. package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
  12. package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
  13. package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
  14. package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
  15. package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
  16. package/lib/fragments/annotation/utils.d.ts +1 -0
  17. package/lib/fragments/annotation/utils.js +27 -0
  18. package/lib/fragments/annotation/view.js +1 -6
  19. package/lib/fragments/base.js +5 -3
  20. package/lib/fragments/whiteboard/cursor.css +77 -0
  21. package/lib/fragments/whiteboard/index.d.ts +11 -0
  22. package/lib/fragments/whiteboard/index.js +91 -0
  23. package/lib/fragments/whiteboard/store.d.ts +31 -0
  24. package/lib/fragments/whiteboard/store.js +475 -0
  25. package/lib/fragments/whiteboard/style.css +4 -0
  26. package/lib/fragments/whiteboard/view.d.ts +4 -0
  27. package/lib/fragments/whiteboard/view.js +31 -0
  28. package/lib/index.d.ts +1 -0
  29. package/lib/index.js +1 -0
  30. package/lib/modules/action-bar/components/apps/index.js +15 -5
  31. package/lib/modules/action-bar/components/leave/index.js +4 -11
  32. package/lib/modules/action-bar/view.d.ts +1 -0
  33. package/lib/modules/action-bar/view.js +3 -2
  34. package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
  35. package/lib/modules/annotation/annotation-toolbar-store.js +46 -88
  36. package/lib/modules/annotation/index.d.ts +2 -0
  37. package/lib/modules/annotation/index.js +2 -2
  38. package/lib/modules/annotation/store.d.ts +11 -49
  39. package/lib/modules/annotation/store.js +135 -418
  40. package/lib/modules/annotation/view.js +3 -6
  41. package/lib/modules/components/control-bar/components/loading/index.css +76 -0
  42. package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
  43. package/lib/modules/components/control-bar/components/loading/index.js +64 -0
  44. package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
  45. package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
  46. package/lib/modules/components/control-bar/components/progress/index.js +43 -0
  47. package/lib/modules/components/control-bar/components/progress/style.css +51 -0
  48. package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
  49. package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
  50. package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
  51. package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
  52. package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
  53. package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
  54. package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
  55. package/lib/modules/components/control-bar/index.css +87 -0
  56. package/lib/modules/components/control-bar/index.d.ts +20 -0
  57. package/lib/modules/components/control-bar/index.js +276 -0
  58. package/lib/modules/components/leave-meeting/components/index.css +0 -9
  59. package/lib/modules/components/leave-meeting/index.d.ts +2 -1
  60. package/lib/modules/components/leave-meeting/index.js +15 -7
  61. package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
  62. package/lib/modules/components/leave-meeting/portal.js +29 -0
  63. package/lib/modules/components/leave-meeting/style.css +9 -0
  64. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
  65. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
  66. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
  67. package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
  68. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
  69. package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
  70. package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
  71. package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
  72. package/lib/modules/components/member-window/index.css +4 -0
  73. package/lib/modules/components/member-window/types.d.ts +6 -2
  74. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
  75. package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
  76. package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
  77. package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
  78. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
  79. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
  80. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
  81. package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
  82. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
  83. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
  84. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
  85. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
  86. package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
  87. package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
  88. package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
  89. package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
  90. package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
  91. package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
  92. package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
  93. package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
  94. package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
  95. package/lib/modules/components/toolbar/components/item/index.js +165 -0
  96. package/lib/modules/components/toolbar/components/item/style.css +94 -0
  97. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
  98. package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
  99. package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
  100. package/lib/modules/components/toolbar/components/panel/index.js +28 -0
  101. package/lib/modules/components/toolbar/components/panel/style.css +86 -0
  102. package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
  103. package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
  104. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
  105. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
  106. package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
  107. package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
  108. package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
  109. package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
  110. package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
  111. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
  112. package/lib/modules/components/toolbar/index.d.ts +29 -0
  113. package/lib/modules/components/toolbar/index.js +258 -0
  114. package/lib/modules/components/toolbar/style.css +85 -0
  115. package/lib/modules/components/toolbar/types.d.ts +13 -0
  116. package/lib/modules/components/toolbar/types.js +6 -0
  117. package/lib/modules/control-bar/components/more-actions/index.js +0 -6
  118. package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
  119. package/lib/modules/control-bar/index.js +2 -1
  120. package/lib/modules/control-bar/store.d.ts +7 -6
  121. package/lib/modules/control-bar/store.js +28 -21
  122. package/lib/modules/control-bar/view.js +7 -55
  123. package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
  124. package/lib/modules/dialog/dialogs/control-bar/index.js +17 -3
  125. package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
  126. package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
  127. package/lib/modules/dialog/dialogs/sub-window/index.js +98 -0
  128. package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
  129. package/lib/modules/dialog/dialogs/video-window/index.js +3 -2
  130. package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
  131. package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
  132. package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
  133. package/lib/modules/dialog/hooks/useElectron.js +62 -12
  134. package/lib/modules/dialog/index.d.ts +6 -3
  135. package/lib/modules/dialog/index.js +5 -3
  136. package/lib/modules/dialog/store.d.ts +21 -8
  137. package/lib/modules/dialog/store.js +79 -11
  138. package/lib/modules/dialog/type.d.ts +8 -0
  139. package/lib/modules/event-confirm/index.css +5 -2
  140. package/lib/modules/event-confirm/store.js +6 -7
  141. package/lib/modules/event-confirm/view.js +1 -1
  142. package/lib/modules/event-sound/index.d.ts +1 -0
  143. package/lib/modules/event-sound/index.js +11 -24
  144. package/lib/modules/invite/components/pstn-invite.js +0 -1
  145. package/lib/modules/layout/components/CommonVideoRenderer.js +21 -21
  146. package/lib/modules/layout/components/who-is-speaking.js +3 -6
  147. package/lib/modules/layout/index.d.ts +3 -1
  148. package/lib/modules/layout/index.js +2 -1
  149. package/lib/modules/layout/store.d.ts +7 -59
  150. package/lib/modules/layout/store.js +126 -24
  151. package/lib/modules/layout/type.d.ts +55 -0
  152. package/lib/modules/participant/components/can-moveable/index.js +0 -1
  153. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
  154. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
  155. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
  156. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
  157. package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
  158. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
  159. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
  160. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
  161. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
  162. package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
  163. package/lib/modules/participant/components/participants/index.js +5 -2
  164. package/lib/modules/participant/components/participants/types.d.ts +3 -0
  165. package/lib/modules/participant/index.d.ts +2 -0
  166. package/lib/modules/participant/index.js +2 -1
  167. package/lib/modules/participant/store.d.ts +5 -1
  168. package/lib/modules/participant/store.js +8 -1
  169. package/lib/modules/secondary-window/index.d.ts +49 -0
  170. package/lib/modules/secondary-window/index.js +108 -0
  171. package/lib/modules/secondary-window/store.d.ts +76 -0
  172. package/lib/modules/secondary-window/store.js +407 -0
  173. package/lib/modules/secondary-window/type.d.ts +106 -0
  174. package/lib/modules/secondary-window/type.js +35 -0
  175. package/lib/modules/secondary-window/view.d.ts +6 -0
  176. package/lib/modules/secondary-window/view.js +257 -0
  177. package/lib/modules/setting/general-settings/general-settings.js +9 -0
  178. package/lib/modules/setting/state/index.js +0 -10
  179. package/lib/modules/setting/store.d.ts +1 -0
  180. package/lib/modules/setting/store.js +6 -3
  181. package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
  182. package/lib/modules/share-screen/components/control-bar/index.js +17 -12
  183. package/lib/modules/share-screen/components/selection/index.js +10 -15
  184. package/lib/modules/share-screen/index.d.ts +4 -1
  185. package/lib/modules/share-screen/index.js +6 -3
  186. package/lib/modules/share-screen/store.d.ts +9 -9
  187. package/lib/modules/share-screen/store.js +39 -64
  188. package/lib/modules/state-bar/index.d.ts +2 -0
  189. package/lib/modules/state-bar/index.js +2 -1
  190. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  191. package/lib/modules/state-bar/store.d.ts +5 -2
  192. package/lib/modules/state-bar/store.js +14 -7
  193. package/lib/modules/state-bar/view.js +3 -3
  194. package/lib/modules/video-window/components/members/index.js +7 -12
  195. package/lib/modules/video-window/store.d.ts +1 -0
  196. package/lib/modules/video-window/store.js +5 -0
  197. package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
  198. package/lib/modules/whiteboard/index.d.ts +10 -13
  199. package/lib/modules/whiteboard/index.js +12 -11
  200. package/lib/providers/ability-provider.js +2 -0
  201. package/lib/providers/device-provider.d.ts +6 -3
  202. package/lib/providers/device-provider.js +331 -333
  203. package/lib/providers/multi-display-provider.d.ts +85 -0
  204. package/lib/providers/multi-display-provider.js +581 -0
  205. package/lib/providers/privilege-provider.js +1 -7
  206. package/lib/providers/room-provider.js +7 -1
  207. package/lib/providers/screen-share-provider.d.ts +3 -1
  208. package/lib/providers/screen-share-provider.js +39 -40
  209. package/lib/providers/sharing-provider.d.ts +7 -1
  210. package/lib/providers/sharing-provider.js +32 -3
  211. package/lib/providers/whiteboard-provider.d.ts +24 -0
  212. package/lib/providers/whiteboard-provider.js +127 -0
  213. package/lib/runtime.d.ts +1 -0
  214. package/lib/scenes/main-scene.d.ts +6 -0
  215. package/lib/scenes/main-scene.js +38 -2
  216. package/lib/scenes/waiting-scene.d.ts +0 -2
  217. package/lib/scenes/waiting-scene.js +0 -6
  218. package/lib/shared-data-source/member-data.d.ts +2 -2
  219. package/lib/shared-data-source/screen-share-data.d.ts +6 -0
  220. package/lib/shared-data-source/screen-share-data.js +5 -0
  221. package/lib/shared-data-source/setting.js +2 -1
  222. package/lib/shared-data-source/video-window.js +1 -2
  223. package/lib/shared-data-source/whiteboard-data.d.ts +68 -0
  224. package/lib/shared-data-source/whiteboard-data.js +347 -0
  225. package/lib/translations/enUS.d.ts +1 -0
  226. package/lib/translations/enUS.js +2 -1
  227. package/lib/translations/zhCN.d.ts +1 -0
  228. package/lib/translations/zhCN.js +2 -1
  229. package/lib/ui-scene.d.ts +0 -1
  230. package/lib/ui-scene.js +0 -3
  231. package/lib/utilities/constant.d.ts +4 -2
  232. package/lib/utilities/constant.js +3 -1
  233. package/lib/utilities/debug.d.ts +4 -0
  234. package/lib/utilities/debug.js +40 -0
  235. package/lib/utilities/dialog-utils.js +26 -4
  236. package/lib/utilities/meeting-detail.js +4 -1
  237. package/lib/utilities/renderer-event.d.ts +4 -6
  238. package/lib/utilities/renderer-event.js +23 -43
  239. package/lib/utilities/renderer.d.ts +1 -1
  240. package/lib/utilities/renderer.js +44 -10
  241. package/lib/utilities/shared-storage.d.ts +18 -0
  242. package/lib/utilities/shared-storage.js +63 -0
  243. package/lib/utilities/tools.js +2 -1
  244. package/package.json +5 -6
  245. package/lib/electron/tools.d.ts +0 -5
  246. package/lib/electron/tools.js +0 -62
@@ -21,37 +21,23 @@ var _memberWindow = require("../../components/member-window");
21
21
  var _screen = require("../../../utilities/screen");
22
22
  var _react = require("react");
23
23
  var _fcrCore = require("fcr-core");
24
- var _muteAction = require("../../../utilities/mute-action");
25
24
  var _classnames = _interopRequireDefault(require("classnames"));
26
25
  var _mobxReact = require("mobx-react");
27
26
  var _Gallery = require("./Gallery");
28
27
  var _jsxRuntime = require("react/jsx-runtime");
29
28
  var useFormatWindowData = function useFormatWindowData() {
30
29
  var _useContext = (0, _react.useContext)(_store.StoreContext),
31
- hasMutePermission = _useContext.hasMutePermission,
32
- hasUnmutePermission = _useContext.hasUnmutePermission,
33
- hasRequestStartAudioPermission = _useContext.hasRequestStartAudioPermission,
34
30
  userVolumeMap = _useContext.userVolumeMap,
35
31
  getAllowedOperations = _useContext.getAllowedOperations;
36
32
  return function (windowData) {
37
33
  var isMySelf = windowData.isMySelf,
38
- hasMicrophoneAudioStream = windowData.hasMicrophoneAudioStream,
39
34
  ownerRoleType = windowData.ownerRoleType,
40
35
  videoStreamId = windowData.videoStreamId,
41
36
  audioStreamId = windowData.audioStreamId;
42
- var targetRole = isMySelf ? _fcrCore.FcrPrivilegeUserRole.SELF : ownerRoleType;
43
- var muteAudioPermission = hasMutePermission(targetRole);
44
- var startAudioPermission = hasUnmutePermission(targetRole);
45
- var requestStartAudioPermission = hasRequestStartAudioPermission(ownerRoleType);
46
- var _actionMute = (0, _muteAction.actionMute)(isMySelf, hasMicrophoneAudioStream, muteAudioPermission, startAudioPermission, requestStartAudioPermission),
47
- isShowActionAudio = _actionMute.isShowActionAudio,
48
- actionAudioTag = _actionMute.actionAudioTag;
49
37
  var id = isMySelf ? '0' : videoStreamId || audioStreamId;
50
38
  var volume = userVolumeMap.get(id || '') || 0;
51
39
  var allowedOperations = getAllowedOperations(ownerRoleType, isMySelf);
52
40
  return {
53
- isShowActionAudio: isShowActionAudio,
54
- actionAudioTag: actionAudioTag,
55
41
  volume: volume,
56
42
  id: id,
57
43
  allowedOperations: allowedOperations
@@ -72,7 +58,7 @@ var useCommonProps = function useCommonProps(layoutType) {
72
58
  }) : 'fcr-layout-content-carousel-item';
73
59
  var showToolbar = isGridLayout && isMainWindow;
74
60
  var list = isGridLayout ? galleryList : carouselList;
75
- var canShowSpeakerSpotlight = isGridLayout ? galleryList.length > 1 : true;
61
+ var canShowSpeakerSpotlight = isGridLayout ? galleryList.length > 2 : true;
76
62
  var isMask = isGridLayout ? !isMainWindow : true;
77
63
  var isToggleMainStream = isGridLayout && layout === _type.FcrUIVideoWindowLayoutType.Speaker && isMainWindow;
78
64
  var memberWindowPreviewType = isGridLayout ? _type.FcrUILayoutType.GALLERY : _type.FcrUILayoutType.CAROUSEL;
@@ -118,7 +104,12 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
118
104
  scalcValue = _useContext3.scalcValue,
119
105
  setScaleValue = _useContext3.setScaleValue,
120
106
  screenShareControl = _useContext3.screenShareControl,
121
- annotation = _useContext3.annotation;
107
+ annotation = _useContext3.annotation,
108
+ isLocalCameraInSecondaryWindow = _useContext3.isLocalCameraInSecondaryWindow,
109
+ microphoneEnabled = _useContext3.microphoneEnabled,
110
+ hasMutePermission = _useContext3.hasMutePermission,
111
+ hasUnmutePermission = _useContext3.hasUnmutePermission,
112
+ hasRequestStartAudioPermission = _useContext3.hasRequestStartAudioPermission;
122
113
  var getFormatWindowData = useFormatWindowData();
123
114
  var commonProps = useCommonProps(layoutType);
124
115
  var toggleFullScreen = function toggleFullScreen() {
@@ -144,8 +135,6 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
144
135
  };
145
136
  var renderMemberWindowActions = function renderMemberWindowActions(windowData, isBoard) {
146
137
  var _getFormatWindowData = getFormatWindowData(windowData),
147
- isShowActionAudio = _getFormatWindowData.isShowActionAudio,
148
- actionAudioTag = _getFormatWindowData.actionAudioTag,
149
138
  id = _getFormatWindowData.id,
150
139
  volume = _getFormatWindowData.volume,
151
140
  allowedOperations = _getFormatWindowData.allowedOperations;
@@ -153,8 +142,6 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
153
142
  var iconSize = isBoard ? 24 : commonProps.iconSize;
154
143
  var windowSize = isBoard ? 'large' : commonProps.windowSize;
155
144
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_memberActions.MemberWindowActions, {
156
- isShowActionAudio: isShowActionAudio,
157
- actionAudioTag: actionAudioTag,
158
145
  showActionBottomLabel: showActionBottomLabel,
159
146
  allowedOperations: allowedOperations,
160
147
  setVideoOrientation: setVideoOrientation,
@@ -171,7 +158,12 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
171
158
  id: id,
172
159
  volume: volume,
173
160
  iconSize: iconSize,
174
- windowSize: windowSize
161
+ windowSize: windowSize,
162
+ isLocalCameraInSecondaryWindow: isLocalCameraInSecondaryWindow,
163
+ deviceMicrophoneEnabled: microphoneEnabled,
164
+ hasMutePermission: hasMutePermission,
165
+ hasUnmutePermission: hasUnmutePermission,
166
+ hasRequestStartAudioPermission: hasRequestStartAudioPermission
175
167
  });
176
168
  };
177
169
  var handleDoubleClick = function handleDoubleClick(windowId, isScreenSharing, isPin) {
@@ -193,6 +185,13 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
193
185
  videoSourceType = windowData.videoSourceType;
194
186
  var isBoard = type === _type.FcrUIWindowType.BOARD;
195
187
  var isScreenSharing = videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN;
188
+
189
+ /**
190
+ * 在共享时,主窗口会有一个额外的控制条,需要将视频内容减去这个高度(28px),所以增加一个class用来覆盖高度样式
191
+ */
192
+ var clsWithShareControlBar = (0, _classnames["default"])({
193
+ 'fcr-member-window-with-share-controlbar': isMainWindowInScreenSharing
194
+ });
196
195
  /**
197
196
  * 在只有一个用户时,无法开启网格布局,所以可以通过 data.length 和 layoutType 判断是否是主窗口。
198
197
  */
@@ -207,6 +206,7 @@ var CommonVideoRenderer = exports.CommonVideoRenderer = (0, _mobxReact.observer)
207
206
  width: dimensions.width,
208
207
  height: dimensions.height
209
208
  },
209
+ className: clsWithShareControlBar,
210
210
  children: [isMainWindowInScreenSharing && screenShareControl, /*#__PURE__*/(0, _jsxRuntime.jsx)(_memberWindow.MemberWindow, {
211
211
  memberWindowPreviewType: commonProps.memberWindowPreviewType,
212
212
  canShowSpeakerSpotlight: commonProps.canShowSpeakerSpotlight,
@@ -13,7 +13,6 @@ var _icon = require("agora-ui-foundation/lib/components/icon");
13
13
  var _type = require("agora-ui-foundation/lib/components/icon/type");
14
14
  var _i18n = require("agora-ui-foundation/lib/i18n");
15
15
  var _store = require("../store");
16
- var _type2 = require("../type");
17
16
  var _jsxRuntime = require("react/jsx-runtime");
18
17
  var CarouselExpandButton = exports.CarouselExpandButton = (0, _mobxReact.observer)(function () {
19
18
  var _useContext = (0, _react.useContext)(_store.StoreContext),
@@ -41,14 +40,12 @@ var CarouselExpandButton = exports.CarouselExpandButton = (0, _mobxReact.observe
41
40
  var WhoIsSpeaking = exports.WhoIsSpeaking = (0, _mobxReact.observer)(function () {
42
41
  var t = (0, _i18n.useI18n)();
43
42
  var _useContext2 = (0, _react.useContext)(_store.StoreContext),
44
- layout = _useContext2.layout,
45
- collapsed = _useContext2.collapsed,
46
- findSpotlightUser = _useContext2.findSpotlightUser;
43
+ findSpotlightUser = _useContext2.findSpotlightUser,
44
+ isWhoISpeakingActive = _useContext2.isWhoISpeakingActive;
47
45
  var userName = findSpotlightUser === null || findSpotlightUser === void 0 ? void 0 : findSpotlightUser.userName;
48
- var active = userName && layout === _type2.FcrUIVideoWindowLayoutType.Speaker && collapsed;
49
46
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
50
47
  className: (0, _classnames["default"])('fcr-layout-speaking', {
51
- 'fcr-layout-speaking-active': active
48
+ 'fcr-layout-speaking-active': isWhoISpeakingActive
52
49
  }),
53
50
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
54
51
  className: "fcr-layout-speaking-content",
@@ -2,7 +2,6 @@ import { UIModule } from '../../base';
2
2
  import { FcrUIDeviceProvider } from '../../providers/device-provider';
3
3
  import { FcrUIEventProvider } from '../../providers/event-provider';
4
4
  import { FcrUIPrivilegeProvider } from '../../providers/privilege-provider';
5
- import { FcrLayoutSlots } from './store';
6
5
  import { FcrUISharedConfigDataSource } from '../../shared-data-source/config';
7
6
  import { FcrUIMainRoomControlProvider } from '../../providers/room-provider';
8
7
  import { FcrUISharedSpeakerSpotlightDataSource } from '../../shared-data-source/speaker-spotlight';
@@ -18,6 +17,8 @@ import { FcrUIAnnotationProvider } from '../../providers/annotation-provider';
18
17
  import { FcrUIScreenShareSharedDataSource } from '../../shared-data-source/screen-share-data';
19
18
  import { FcrUIInterpreterProvider } from '../../providers/interpreter-provider';
20
19
  import { FcrUISharedAnnotationSource } from '../../shared-data-source/annotation-data';
20
+ import { FcrLayoutSlots } from './type';
21
+ import { FcrUIMultiDisplayProvider } from '../../providers/multi-display-provider';
21
22
  export declare class LayoutUIModule extends UIModule {
22
23
  private _store?;
23
24
  eventProvider?: FcrUIEventProvider;
@@ -37,6 +38,7 @@ export declare class LayoutUIModule extends UIModule {
37
38
  annotationProvider?: FcrUIAnnotationProvider;
38
39
  sharedScreenShareSharedDataSource?: FcrUIScreenShareSharedDataSource;
39
40
  sharedAnnotationDataSource?: FcrUISharedAnnotationSource;
41
+ multiDisplayProvider?: FcrUIMultiDisplayProvider;
40
42
  interpreterProvider?: FcrUIInterpreterProvider;
41
43
  onNodeWillActive(): void;
42
44
  onNodeWillInactive(): void;
@@ -59,7 +59,8 @@ var LayoutUIModule = exports.LayoutUIModule = /*#__PURE__*/function (_UIModule)
59
59
  annotationProvider: this.annotationProvider,
60
60
  sharedScreenShareDataSource: this.sharedScreenShareSharedDataSource,
61
61
  interpreterProvider: this.interpreterProvider,
62
- sharedAnnotationDataSource: this.sharedAnnotationDataSource
62
+ sharedAnnotationDataSource: this.sharedAnnotationDataSource,
63
+ multiDisplayProvider: this.multiDisplayProvider
63
64
  });
64
65
  }
65
66
  }, {
@@ -1,66 +1,13 @@
1
1
  import { FcrPrivilegeUserRole, FcrStreamControl } from 'fcr-core';
2
2
  import { FcrUserInfo, FcrUserRole } from 'fcr-core/lib/type';
3
- import { FcrUIVideoWindowData, FcrUIVideoWindowLayoutType } from './type';
3
+ import { FcrLayoutSlots, FcrUIVideoWindowData, FcrUIVideoWindowLayoutType, LayoutStoreParams } from './type';
4
4
  import { FcrChatRoomConnectionState } from 'fcr-core/lib/room-control/chatroom-control/type';
5
5
  import { FcrUserUpdatedEvent } from 'fcr-core/lib/room-control/user-control/type';
6
- import { FcrMainRoomControl } from 'fcr-core/lib/room-control/type';
7
- import { FcrUIEventObserver, FcrUIEventProvider } from '../../providers/event-provider';
8
- import { FcrUIPrivilegeProvider } from '../../providers/privilege-provider';
9
- import { FcrUIDeviceProvider } from '../../providers/device-provider';
6
+ import { FcrUIEventObserver } from '../../providers/event-provider';
10
7
  import { FcrUIAction } from '../../utilities/constant';
11
8
  import { FcrUISetMainSpeakerParams } from '../../type';
12
- import { FcrUISharedConfigDataSource } from '../../shared-data-source/config';
13
- import { FcrUISharedSpeakerSpotlightDataSource } from '../../shared-data-source/speaker-spotlight';
14
- import { FcrUISharedLayoutDataSource } from '../../shared-data-source/layout-data';
15
- import { FcrUISharedInterpreterDataSource } from '../../shared-data-source/interpreter';
16
- import { FcrUISharedSettingDataSource } from '../../shared-data-source/setting';
17
- import { FcrUIChatProvider } from '../../providers/chat-provider';
18
- import { FcrUIVideoWindowDataSource } from '../../shared-data-source/video-window';
19
- import { FcrUIMemberSharedDataSource } from '../../shared-data-source/member-data';
20
- import { FcrUIScreenShareProvider } from '../../providers/screen-share-provider';
21
- import { FcrUISharedPinDataSource } from '../../shared-data-source/pin-data';
22
- import { FcrUIAnnotationProvider } from '../../providers/annotation-provider';
23
- import { FcrUIScreenShareSharedDataSource } from '../../shared-data-source/screen-share-data';
24
- import { FcrUIInterpreterProvider } from '../../providers/interpreter-provider';
25
- import { FcrUISharedAnnotationSource } from '../../shared-data-source/annotation-data';
26
- export interface FcrLayoutSlots {
27
- participant: React.ReactNode;
28
- chat: React.ReactNode;
29
- chatAction: React.ReactNode;
30
- stateBar: React.ReactNode;
31
- actionBar: React.ReactNode;
32
- layers: React.ReactNode;
33
- whiteboard: React.ReactNode;
34
- annotation: React.ReactNode;
35
- screenShareControl: React.ReactNode;
36
- }
37
- export interface FcrUILayoutAsideContent {
38
- participant: boolean;
39
- chat: boolean;
40
- }
41
- export interface LayoutStoreParams {
42
- eventProvider: FcrUIEventProvider;
43
- deviceProvider: FcrUIDeviceProvider;
44
- privilegeProvider: FcrUIPrivilegeProvider;
45
- roomControl: FcrMainRoomControl;
46
- sharedConfigDataSource: FcrUISharedConfigDataSource;
47
- sharedSpeakerSpotlightDataSource: FcrUISharedSpeakerSpotlightDataSource;
48
- sharedLayoutDataSource: FcrUISharedLayoutDataSource;
49
- sharedInterpreterDataSource: FcrUISharedInterpreterDataSource;
50
- sharedSettingDataSource: FcrUISharedSettingDataSource;
51
- chatProvider: FcrUIChatProvider;
52
- sharedVideoWindowDataSource: FcrUIVideoWindowDataSource;
53
- sharedMemberDataSource: FcrUIMemberSharedDataSource;
54
- screenShareProvider: FcrUIScreenShareProvider;
55
- sharedPinDataSource: FcrUISharedPinDataSource;
56
- annotationProvider: FcrUIAnnotationProvider;
57
- sharedScreenShareDataSource: FcrUIScreenShareSharedDataSource;
58
- interpreterProvider: FcrUIInterpreterProvider;
59
- sharedAnnotationDataSource: FcrUISharedAnnotationSource;
60
- }
61
9
  export default class LayoutStore implements FcrLayoutSlots, FcrUIEventObserver {
62
10
  private readonly logger;
63
- private static MIN_USERS_TO_ENABLE_SPOTLIGHT;
64
11
  private _videoWindowDataSource;
65
12
  private _eventProvider;
66
13
  private _deviceProvider;
@@ -79,12 +26,10 @@ export default class LayoutStore implements FcrLayoutSlots, FcrUIEventObserver {
79
26
  private _sharedSettingDataSource;
80
27
  private _sharedMemberDataSource;
81
28
  private _chatProvider;
82
- private _screenShareProvider;
83
29
  private _pinDataSource;
84
- private _annotationProvider;
85
30
  private _sharedScreenShareDataSource;
86
- private _interpreterProvider;
87
31
  private _sharedAnnotationDataSource;
32
+ private _multiDisplayProvider;
88
33
  accessor participant: React.ReactNode;
89
34
  accessor chat: React.ReactNode;
90
35
  accessor chatAction: React.ReactNode;
@@ -132,6 +77,7 @@ export default class LayoutStore implements FcrLayoutSlots, FcrUIEventObserver {
132
77
  get hasPinnedStream(): boolean;
133
78
  get isRobot(): boolean;
134
79
  get findSpotlightUser(): import("../../shared-data-source/video-window").FcrUIVideoWindowDataImpl | null | undefined;
80
+ get isWhoISpeakingActive(): boolean | "" | undefined;
135
81
  get microphoneEnabled(): boolean;
136
82
  get allowChat(): boolean;
137
83
  get allowUnmuteSelfAudio(): boolean;
@@ -146,6 +92,9 @@ export default class LayoutStore implements FcrLayoutSlots, FcrUIEventObserver {
146
92
  get localUserId(): string;
147
93
  get interpreterUserList(): import("fcr-core/lib/room-control/interpreter-control/types").FcrInterpreterUserInfo[] | null;
148
94
  get isInterpreterEnabled(): boolean;
95
+ get secondaryWindowContentType(): "hidden" | "speaker" | "gallery" | "local-camera" | "remote-camera" | "sharing-screen" | "sharing-screen-with-annotation" | "sharing-whiteboard";
96
+ get isMultiDisplayActive(): boolean;
97
+ get isLocalCameraInSecondaryWindow(): boolean;
149
98
  constructor(params: LayoutStoreParams);
150
99
  get participantCount(): number;
151
100
  get isVideoSuspended(): boolean;
@@ -212,7 +161,6 @@ export default class LayoutStore implements FcrLayoutSlots, FcrUIEventObserver {
212
161
  private _switchToGallery;
213
162
  private _setBarHovering;
214
163
  private _initStream;
215
- private _isSetSpotlightEnable;
216
164
  private _handleConnectionUpdated;
217
165
  private _findVideoWindowByUserId;
218
166
  private _onRemoteUsersLeft;
@@ -80,6 +80,7 @@ var _type6 = require("../../type");
80
80
  var _view = require("./view");
81
81
  var _logger = require("../../utilities/logger");
82
82
  var _env = require("agora-foundation/lib/utilities/env");
83
+ var _type7 = require("../secondary-window/type");
83
84
  var _LayoutStore;
84
85
  var _initProto, _participantDecs, _init_participant, _chatDecs, _init_chat, _chatActionDecs, _init_chatAction, _stateBarDecs, _init_stateBar, _actionBarDecs, _init_actionBar, _layersDecs, _init_layers, _whiteboardDecs, _init_whiteboard, _annotationDecs, _init_annotation, _screenShareControlDecs, _init_screenShareControl, _init_collapsed, _init_aside, _init_barHovering, _init_barLocked, _init_barHidden, _init_asideWidth, _init_userVolumeMap, _init_chatRoomState, _init_whiteboardActive, _init_ownerUser, _addPinMessageDecs, _cancelPinMessageDecs, _setWhiteboardActiveDecs, _setAsideWidthDecs, _updateSlotsDecs, _toggleLayoutDecs, _toggleCollapsedDecs, _toggleAsideDecs, _asideWidthChangedDecs, _toggleLayoutBarLockDecs, _toggleLayoutBarHiddenDecs, _resetLockTimerDecs, _setHoveringHandlerDecs, _setHoveringLeaveHandlerDecs, _setScreenShareSpeakerViewSizeDecs, _handleLiveLayoutChangeDecs, _onUserInfoUpdatedDecs, _handleLayoutUpdatedDecs, _init__handleLayoutUpdated, _handleFoldListChangedDecs, _handleMainListLengthChangedDecs, _handleMainListChangedDecs, _setBarHoveringDecs, _handleConnectionUpdatedDecs, _findVideoWindowByUserIdDecs, _onRemoteUsersLeftDecs, _onAudioVolumeUpdatedDecs, _ref;
85
86
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -177,22 +178,26 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
177
178
  this._chatProvider = chatProvider;
178
179
  this._videoWindowDataSource = params.sharedVideoWindowDataSource;
179
180
  this._sharedMemberDataSource = params.sharedMemberDataSource;
180
- this._screenShareProvider = params.screenShareProvider;
181
181
  this._pinDataSource = params.sharedPinDataSource;
182
182
  this.chatRoomState = this._chatRoomControl.getConnectionState();
183
- this._annotationProvider = params.annotationProvider;
184
183
  this._sharedScreenShareDataSource = params.sharedScreenShareDataSource;
185
- this._interpreterProvider = params.interpreterProvider;
186
184
  this._sharedAnnotationDataSource = params.sharedAnnotationDataSource;
185
+ this._multiDisplayProvider = params.multiDisplayProvider;
187
186
  this._addListeners();
188
- //@ts-ignore
189
- window.layoutStore = this;
190
187
  this._initStream();
191
188
  this._handleFoldListChanged();
192
189
  this._handleMainListChanged();
193
190
  this._handleMainListLengthChanged();
194
191
  this._handleLayoutUpdated(this._videoWindowDataSource.layoutType);
195
192
  this.setWhiteboardActive(this._whiteBoardControl.getActivity());
193
+
194
+ // 进入房间后,如果双屏模式处于激活状态,则需要设置主窗口为窗口最大化
195
+ if (this._multiDisplayProvider.isActive) {
196
+ this._multiDisplayProvider.setMainWindowMaximize();
197
+ }
198
+
199
+ // @ts-ignore
200
+ window._layoutStore = this;
196
201
  }
197
202
  return (0, _createClass2["default"])(LayoutStore, [{
198
203
  key: "participant",
@@ -409,6 +414,37 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
409
414
  }, {
410
415
  key: "sourceList",
411
416
  get: function get() {
417
+ var mainList = this._videoWindowDataSource.mainList;
418
+ if (this.isMultiDisplayActive) {
419
+ switch (this.secondaryWindowContentType) {
420
+ case _type7.FcrUIDisplayDistributionContentType.LOCAL_CAMERA:
421
+ if (mainList.length === 1) {
422
+ return mainList;
423
+ } else {
424
+ return mainList.filter(function (item) {
425
+ return !item.isMySelf;
426
+ });
427
+ }
428
+ case _type7.FcrUIDisplayDistributionContentType.SHARING_SCREEN:
429
+ case _type7.FcrUIDisplayDistributionContentType.SHARING_SCREEN_WITH_ANNOTATION:
430
+ return mainList.filter(function (item) {
431
+ return item.videoSourceType !== _fcrCore.FcrVideoSourceType.SCREEN;
432
+ });
433
+ case _type7.FcrUIDisplayDistributionContentType.SHARING_WHITEBOARD:
434
+ return mainList.filter(function (item) {
435
+ return item.type !== _type2.FcrUIWindowType.BOARD;
436
+ });
437
+ case _type7.FcrUIDisplayDistributionContentType.HIDDEN:
438
+ var sharingType = this._multiDisplayProvider.displayState.sharingType;
439
+
440
+ // 当自己进行屏幕共享时,会隐藏副窗口,主窗口中不需要显示屏幕共享流
441
+ if (sharingType === _type7.FcrUIDisplayDistributionContentType.SHARING_SCREEN || sharingType === _type7.FcrUIDisplayDistributionContentType.SHARING_SCREEN_WITH_ANNOTATION) {
442
+ return mainList.filter(function (item) {
443
+ return item.videoSourceType !== _fcrCore.FcrVideoSourceType.SCREEN;
444
+ });
445
+ }
446
+ }
447
+ }
412
448
  var isMyselfCurrentScreenSharing = this._videoWindowDataSource.mainList.some(function (i) {
413
449
  return i.hasScreenSharing && i.isMySelf;
414
450
  });
@@ -531,6 +567,17 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
531
567
  return item.videoStreamId === _this3.spotlightStreamId || item.audioStreamId === _this3.spotlightStreamId;
532
568
  }) : null;
533
569
  }
570
+ }, {
571
+ key: "isWhoISpeakingActive",
572
+ get: function get() {
573
+ var _this$findSpotlightUs;
574
+ var spotlightUserName = (_this$findSpotlightUs = this.findSpotlightUser) === null || _this$findSpotlightUs === void 0 ? void 0 : _this$findSpotlightUs.userName;
575
+ var isSpeakerLayout = this.layout === _type2.FcrUIVideoWindowLayoutType.Speaker;
576
+ var speakerWindowData = this.galleryList[0];
577
+ var isSpeakerIsSharing = (speakerWindowData === null || speakerWindowData === void 0 ? void 0 : speakerWindowData.videoSourceType) === _fcrCore.FcrVideoSourceType.SCREEN || (speakerWindowData === null || speakerWindowData === void 0 ? void 0 : speakerWindowData.type) === _type2.FcrUIWindowType.BOARD;
578
+ var active = spotlightUserName && isSpeakerLayout && this.collapsed && !isSpeakerIsSharing;
579
+ return active;
580
+ }
534
581
  }, {
535
582
  key: "microphoneEnabled",
536
583
  get: function get() {
@@ -602,6 +649,21 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
602
649
  get: function get() {
603
650
  return this._sharedInterpreterDataSource.isInterpreterEnabled;
604
651
  }
652
+ }, {
653
+ key: "secondaryWindowContentType",
654
+ get: function get() {
655
+ return this._multiDisplayProvider.secondaryWindowContentType;
656
+ }
657
+ }, {
658
+ key: "isMultiDisplayActive",
659
+ get: function get() {
660
+ return this._multiDisplayProvider.isActive;
661
+ }
662
+ }, {
663
+ key: "isLocalCameraInSecondaryWindow",
664
+ get: function get() {
665
+ return this._multiDisplayProvider.isLocalCameraInSecondaryWindow;
666
+ }
605
667
  }, {
606
668
  key: "participantCount",
607
669
  get: function get() {
@@ -613,6 +675,11 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
613
675
  var isSharingScreen = !!this._sharedScreenShareDataSource.isSharingScreen;
614
676
  var shareScreenOwner = this._sharedScreenShareDataSource.screenSharingOwner;
615
677
  var isSharingScreenBySelf = this.localUserId === (shareScreenOwner === null || shareScreenOwner === void 0 ? void 0 : shareScreenOwner.userId);
678
+
679
+ // 多屏模式开启时, 不需要显示悬浮窗
680
+ if (this.isMultiDisplayActive) {
681
+ return false;
682
+ }
616
683
  if ((0, _env.isElectron)() && isSharingScreen && isSharingScreenBySelf) {
617
684
  return true;
618
685
  }
@@ -1040,21 +1107,58 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1040
1107
  }
1041
1108
  }
1042
1109
  _this5._handleMainListLengthChanged();
1110
+ }), (0, _mobx.reaction)(function () {
1111
+ return _this5._multiDisplayProvider.isActive;
1112
+ }, function (isActive) {
1113
+ var _this5$_multiDisplayP = _this5._multiDisplayProvider.displayState,
1114
+ sharingBySelf = _this5$_multiDisplayP.sharingBySelf,
1115
+ isSharingScreen = _this5$_multiDisplayP.isSharingScreen;
1116
+ if (isActive) {
1117
+ // 多屏模式激活时,需要设置主窗口为窗口最大化
1118
+ // 如果自己正在共享屏幕,则关闭 vidoe window 悬浮窗、显示主窗口
1119
+ if (sharingBySelf && isSharingScreen) {
1120
+ var _this5$_eventProvider;
1121
+ (_this5$_eventProvider = _this5._eventProvider) === null || _this5$_eventProvider === void 0 || _this5$_eventProvider.sendEvent(_constant.FcrUIAction.CLOSE_TOP_VIDEO_WINDOW);
1122
+ _this5._multiDisplayProvider.showMainWindowInIndexLeastDisplay({
1123
+ maximize: true
1124
+ });
1125
+ } else {
1126
+ _this5._multiDisplayProvider.setMainWindowMaximize();
1127
+ }
1128
+ return;
1129
+ }
1130
+
1131
+ // 多屏模式从激活状态转变为非激活状态时,
1132
+ // 如果当前是自己在共享屏幕,则隐藏主窗口,打开 vidoe window 悬浮窗
1133
+ // 如果不是自己在共享,则切换布局到演讲者模式
1134
+ // 没屏幕共享时,不做操作
1135
+ if (sharingBySelf && isSharingScreen) {
1136
+ var _this5$_eventProvider2;
1137
+ window.runtime.browserWindow.hide();
1138
+ (_this5$_eventProvider2 = _this5._eventProvider) === null || _this5$_eventProvider2 === void 0 || _this5$_eventProvider2.sendEvent(_constant.FcrUIAction.OPEN_TOP_VIDEO_WINDOW);
1139
+ } else if (isSharingScreen) {
1140
+ _this5.toggleLayout(_type2.FcrUIVideoWindowLayoutType.Speaker);
1141
+ }
1043
1142
  }), (0, _mobx.reaction)(function () {
1044
1143
  return _this5.whiteboardActive;
1045
- }, function (opened) {
1046
- if (opened) {
1047
- var isActive = _this5._whiteBoardControl.getActivity();
1144
+ }, function (isBoardActive) {
1145
+ if (isBoardActive) {
1048
1146
  var ownerUserId = _this5._whiteBoardControl.getOwnerId();
1049
- if (isActive) {
1050
- var ownerUser = _this5._userControl.getUser(ownerUserId);
1051
- _this5._videoWindowDataSource.addBoard(ownerUser, ownerUserId === _this5.localUserId);
1147
+ var ownerUser = _this5._userControl.getUser(ownerUserId);
1148
+ _this5._videoWindowDataSource.addBoard(ownerUser, ownerUserId === _this5.localUserId);
1149
+ if (_this5.secondaryWindowContentType === _type7.FcrUIDisplayDistributionContentType.SHARING_WHITEBOARD) {
1150
+ // 在副屏窗口模式显示白板时,不切换布局
1151
+ return;
1052
1152
  }
1053
1153
  if (_this5.layout === _type2.FcrUIVideoWindowLayoutType.Gallery) {
1054
1154
  _this5.toggleLayout(_type2.FcrUIVideoWindowLayoutType.Speaker);
1055
1155
  }
1056
1156
  } else {
1057
1157
  _this5._videoWindowDataSource.removeBoard();
1158
+ if (_this5.secondaryWindowContentType === _type7.FcrUIDisplayDistributionContentType.SHARING_WHITEBOARD) {
1159
+ // 在副屏窗口模式显示白板时,不切换布局
1160
+ return;
1161
+ }
1058
1162
  if (_this5.manualLayout) {
1059
1163
  _this5.toggleLayout(_this5.manualLayout);
1060
1164
  } else {
@@ -1109,14 +1213,11 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1109
1213
  });
1110
1214
  }), (0, _mobx.reaction)(function () {
1111
1215
  return {
1112
- count: _this5.participantCount,
1113
1216
  enableSpotlight: _this5.enableSpotlight
1114
1217
  };
1115
1218
  }, function (_ref7) {
1116
- var count = _ref7.count,
1117
- enableSpotlight = _ref7.enableSpotlight;
1118
- var enableSetSpotlight = _this5._isSetSpotlightEnable(count, enableSpotlight);
1119
- _this5._videoWindowDataSource.setSpotlightEnabled(enableSetSpotlight);
1219
+ var enableSpotlight = _ref7.enableSpotlight;
1220
+ _this5._videoWindowDataSource.setSpotlightEnabled(enableSpotlight);
1120
1221
  }),
1121
1222
  // 录制的特殊逻辑:
1122
1223
  // 因为录制机器人不发流,且当前切换布局的逻辑是有多个人的视频窗口才切换到 speaker layout
@@ -1208,12 +1309,6 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1208
1309
  this.toggleLayout(_type2.FcrUIVideoWindowLayoutType.Speaker);
1209
1310
  }
1210
1311
  }
1211
- }, {
1212
- key: "_isSetSpotlightEnable",
1213
- value: function _isSetSpotlightEnable(count, enableSpotlight) {
1214
- var setSpotlightEnable = count > LayoutStore.MIN_USERS_TO_ENABLE_SPOTLIGHT;
1215
- return setSpotlightEnable && enableSpotlight;
1216
- }
1217
1312
  }, {
1218
1313
  key: "_handleConnectionUpdated",
1219
1314
  value: function _handleConnectionUpdated(_, state) {
@@ -1257,6 +1352,10 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1257
1352
  key: "_handleStreamAdded",
1258
1353
  value: function _handleStreamAdded(modifiedStream) {
1259
1354
  this._videoWindowDataSource.add(modifiedStream, modifiedStream.owner.userId === this.localUserId);
1355
+ if (this.isMultiDisplayActive) {
1356
+ // 在开启多屏模式下,屏幕共享流添加时,保持布局不变
1357
+ return;
1358
+ }
1260
1359
  if (modifiedStream.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN) {
1261
1360
  var isSharingScreenOwner = modifiedStream.owner.userId === this.localUserId;
1262
1361
  if (this.layout === _type2.FcrUIVideoWindowLayoutType.Gallery) {
@@ -1298,6 +1397,10 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1298
1397
  var videoType = event.modifiedStream.videoSourceType;
1299
1398
  return videoType === _fcrCore.FcrVideoSourceType.SCREEN;
1300
1399
  });
1400
+ if (this.isMultiDisplayActive) {
1401
+ // 在开启多屏模式下,屏幕共享流被移除时,保持布局不变
1402
+ return;
1403
+ }
1301
1404
  if (hasScreenStream) {
1302
1405
  if (this.manualLayout) {
1303
1406
  this._videoWindowDataSource.setLayout(this.manualLayout);
@@ -1338,7 +1441,7 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1338
1441
  }]);
1339
1442
  }();
1340
1443
  _LayoutStore = LayoutStore;
1341
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStore, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_annotationDecs, 17, "annotation"], [_screenShareControlDecs, 17, "screenShareControl"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.observable, 1, "userVolumeMap"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "ownerUser"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "manualLayout"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "sourceList"], [_mobx.computed, 3, "layoutMainList"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "mainListMapByAudioStreamId"], [_mobx.computed, 3, "spotlightStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "isMainWindowInScreenSharing"], [_mobx.computed, 3, "isCurrentUserInBoardSharing"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "galleryMaxSize"], [_mobx.computed, 3, "isVideoSuspended"], [_mobx.computed, 3, "asideContent"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "chatRenderAt"], [_decorator.bound, 2, "getWaterMarkContent"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_addPinMessageDecs, 18, "addPinMessage"], [_cancelPinMessageDecs, 18, "cancelPinMessage"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_updateSlotsDecs, 18, "updateSlots"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_decorator.bound, 2, "openRenameDialog"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_setScreenShareSpeakerViewSizeDecs, 2, "setScreenShareSpeakerViewSize"], [_handleLiveLayoutChangeDecs, 18, "handleLiveLayoutChange"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "sendParticipantEvent"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "_addListeners"], [_mobx.computed, 3, "_hasVideoStreamUser"], [_handleFoldListChangedDecs, 18, "_handleFoldListChanged"], [_handleMainListLengthChangedDecs, 18, "_handleMainListLengthChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_decorator.bound, 2, "_initStream"], [_decorator.bound, 2, "_isSetSpotlightEnable"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_findVideoWindowByUserIdDecs, 18, "_findVideoWindowByUserId"], [_onRemoteUsersLeftDecs, 18, "_onRemoteUsersLeft"], [_decorator.bound, 2, "_handleLiveStreamingStateUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_onAudioVolumeUpdatedDecs, 18, "_onAudioVolumeUpdated"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 21);
1444
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStore, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_annotationDecs, 17, "annotation"], [_screenShareControlDecs, 17, "screenShareControl"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.observable, 1, "userVolumeMap"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "ownerUser"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "manualLayout"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "sourceList"], [_mobx.computed, 3, "layoutMainList"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "mainListMapByAudioStreamId"], [_mobx.computed, 3, "spotlightStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "isMainWindowInScreenSharing"], [_mobx.computed, 3, "isCurrentUserInBoardSharing"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "isWhoISpeakingActive"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "galleryMaxSize"], [_mobx.computed, 3, "isVideoSuspended"], [_mobx.computed, 3, "asideContent"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "chatRenderAt"], [_decorator.bound, 2, "getWaterMarkContent"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_addPinMessageDecs, 18, "addPinMessage"], [_cancelPinMessageDecs, 18, "cancelPinMessage"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_updateSlotsDecs, 18, "updateSlots"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_decorator.bound, 2, "openRenameDialog"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_setScreenShareSpeakerViewSizeDecs, 2, "setScreenShareSpeakerViewSize"], [_handleLiveLayoutChangeDecs, 18, "handleLiveLayoutChange"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "sendParticipantEvent"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "_addListeners"], [_mobx.computed, 3, "_hasVideoStreamUser"], [_handleFoldListChangedDecs, 18, "_handleFoldListChanged"], [_handleMainListLengthChangedDecs, 18, "_handleMainListLengthChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_decorator.bound, 2, "_initStream"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_findVideoWindowByUserIdDecs, 18, "_findVideoWindowByUserId"], [_onRemoteUsersLeftDecs, 18, "_onRemoteUsersLeft"], [_decorator.bound, 2, "_handleLiveStreamingStateUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_onAudioVolumeUpdatedDecs, 18, "_onAudioVolumeUpdated"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 21);
1342
1445
  _init_participant = _applyDecs$e[0];
1343
1446
  _init_chat = _applyDecs$e[1];
1344
1447
  _init_chatAction = _applyDecs$e[2];
@@ -1360,5 +1463,4 @@ _init_whiteboardActive = _applyDecs$e[17];
1360
1463
  _init_ownerUser = _applyDecs$e[18];
1361
1464
  _init__handleLayoutUpdated = _applyDecs$e[19];
1362
1465
  _initProto = _applyDecs$e[20];
1363
- (0, _defineProperty2["default"])(LayoutStore, "MIN_USERS_TO_ENABLE_SPOTLIGHT", 2);
1364
1466
  var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -1,5 +1,24 @@
1
1
  import { FcrRoomConnectorType, FcrVideoSourceType } from 'fcr-core';
2
+ import { FcrMainRoomControl } from 'fcr-core/lib/room-control/type';
2
3
  import { FcrUserRole } from 'fcr-core/lib/type';
4
+ import { FcrUIAnnotationProvider } from '../../providers/annotation-provider';
5
+ import { FcrUIChatProvider } from '../../providers/chat-provider';
6
+ import { FcrUIDeviceProvider } from '../../providers/device-provider';
7
+ import { FcrUIEventProvider } from '../../providers/event-provider';
8
+ import { FcrUIInterpreterProvider } from '../../providers/interpreter-provider';
9
+ import { FcrUIPrivilegeProvider } from '../../providers/privilege-provider';
10
+ import { FcrUIScreenShareProvider } from '../../providers/screen-share-provider';
11
+ import { FcrUISharedAnnotationSource } from '../../shared-data-source/annotation-data';
12
+ import { FcrUISharedConfigDataSource } from '../../shared-data-source/config';
13
+ import { FcrUISharedInterpreterDataSource } from '../../shared-data-source/interpreter';
14
+ import { FcrUISharedLayoutDataSource } from '../../shared-data-source/layout-data';
15
+ import { FcrUIMemberSharedDataSource } from '../../shared-data-source/member-data';
16
+ import { FcrUISharedPinDataSource } from '../../shared-data-source/pin-data';
17
+ import { FcrUIScreenShareSharedDataSource } from '../../shared-data-source/screen-share-data';
18
+ import { FcrUISharedSettingDataSource } from '../../shared-data-source/setting';
19
+ import { FcrUISharedSpeakerSpotlightDataSource } from '../../shared-data-source/speaker-spotlight';
20
+ import { FcrUIVideoWindowDataSource } from '../../shared-data-source/video-window';
21
+ import { FcrUIMultiDisplayProvider } from '../../providers/multi-display-provider';
3
22
  export declare enum FcrUIVideoWindowLayoutType {
4
23
  /** Show a carousel on top and a big video on the rest of the screen. */
5
24
  Speaker = "speaker",
@@ -76,3 +95,39 @@ export declare enum FcrUILayoutType {
76
95
  */
77
96
  GALLERY = "gallery"
78
97
  }
98
+ export interface FcrLayoutSlots {
99
+ participant: React.ReactNode;
100
+ chat: React.ReactNode;
101
+ chatAction: React.ReactNode;
102
+ stateBar: React.ReactNode;
103
+ actionBar: React.ReactNode;
104
+ layers: React.ReactNode;
105
+ whiteboard: React.ReactNode;
106
+ annotation: React.ReactNode;
107
+ screenShareControl: React.ReactNode;
108
+ }
109
+ export interface FcrUILayoutAsideContent {
110
+ participant: boolean;
111
+ chat: boolean;
112
+ }
113
+ export interface LayoutStoreParams {
114
+ eventProvider: FcrUIEventProvider;
115
+ deviceProvider: FcrUIDeviceProvider;
116
+ privilegeProvider: FcrUIPrivilegeProvider;
117
+ roomControl: FcrMainRoomControl;
118
+ sharedConfigDataSource: FcrUISharedConfigDataSource;
119
+ sharedSpeakerSpotlightDataSource: FcrUISharedSpeakerSpotlightDataSource;
120
+ sharedLayoutDataSource: FcrUISharedLayoutDataSource;
121
+ sharedInterpreterDataSource: FcrUISharedInterpreterDataSource;
122
+ sharedSettingDataSource: FcrUISharedSettingDataSource;
123
+ chatProvider: FcrUIChatProvider;
124
+ sharedVideoWindowDataSource: FcrUIVideoWindowDataSource;
125
+ sharedMemberDataSource: FcrUIMemberSharedDataSource;
126
+ screenShareProvider: FcrUIScreenShareProvider;
127
+ sharedPinDataSource: FcrUISharedPinDataSource;
128
+ annotationProvider: FcrUIAnnotationProvider;
129
+ sharedScreenShareDataSource: FcrUIScreenShareSharedDataSource;
130
+ interpreterProvider: FcrUIInterpreterProvider;
131
+ sharedAnnotationDataSource: FcrUISharedAnnotationSource;
132
+ multiDisplayProvider: FcrUIMultiDisplayProvider;
133
+ }
@@ -35,7 +35,6 @@ var Moveable = exports.Moveable = function Moveable(_ref) {
35
35
  setCurrentCoordinateY(y);
36
36
  };
37
37
  var handleResize = (0, _react.useCallback)(function () {
38
- console.log('window.innerWidth < currentCoordinateX', window.innerWidth < currentCoordinateX, window.innerWidth, currentCoordinateX);
39
38
  if (window.innerWidth < currentCoordinateX - rndRef.current) {
40
39
  setCurrentCoordinateX(0);
41
40
  }