fcr-ui-scene 3.7.2 → 3.7.4-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/lib/creator.d.ts +2 -0
  2. package/lib/creator.js +37 -44
  3. package/lib/electron/app.js +7 -0
  4. package/lib/electron/injections.d.ts +1 -1
  5. package/lib/electron/injections.js +5 -3
  6. package/lib/electron/main.js +3 -1
  7. package/lib/fragments/annotation/index.d.ts +1 -0
  8. package/lib/fragments/annotation/index.js +13 -7
  9. package/lib/fragments/annotation/libs.d.ts +7 -6
  10. package/lib/fragments/annotation/libs.js +9 -8
  11. package/lib/fragments/annotation/store.d.ts +8 -4
  12. package/lib/fragments/annotation/store.js +351 -267
  13. package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
  14. package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
  15. package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
  16. package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
  17. package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
  18. package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
  19. package/lib/fragments/annotation/utils.d.ts +1 -0
  20. package/lib/fragments/annotation/utils.js +27 -0
  21. package/lib/fragments/annotation/view.js +1 -6
  22. package/lib/fragments/base.js +5 -3
  23. package/lib/fragments/whiteboard/cursor.css +77 -0
  24. package/lib/fragments/whiteboard/index.d.ts +11 -0
  25. package/lib/fragments/whiteboard/index.js +91 -0
  26. package/lib/fragments/whiteboard/store.d.ts +31 -0
  27. package/lib/fragments/whiteboard/store.js +480 -0
  28. package/lib/fragments/whiteboard/style.css +4 -0
  29. package/lib/fragments/whiteboard/view.d.ts +4 -0
  30. package/lib/fragments/whiteboard/view.js +31 -0
  31. package/lib/global.css +6 -0
  32. package/lib/index.d.ts +1 -0
  33. package/lib/index.js +1 -0
  34. package/lib/modules/action-bar/components/apps/index.js +15 -5
  35. package/lib/modules/action-bar/components/leave/index.js +4 -11
  36. package/lib/modules/action-bar/components/screen-share/submenu.js +2 -2
  37. package/lib/modules/action-bar/index.d.ts +2 -0
  38. package/lib/modules/action-bar/index.js +2 -1
  39. package/lib/modules/action-bar/store.d.ts +6 -2
  40. package/lib/modules/action-bar/store.js +56 -93
  41. package/lib/modules/action-bar/view.d.ts +1 -0
  42. package/lib/modules/action-bar/view.js +3 -2
  43. package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
  44. package/lib/modules/annotation/annotation-toolbar-store.js +48 -90
  45. package/lib/modules/annotation/index.d.ts +2 -0
  46. package/lib/modules/annotation/index.js +2 -2
  47. package/lib/modules/annotation/store.d.ts +11 -49
  48. package/lib/modules/annotation/store.js +144 -429
  49. package/lib/modules/annotation/view.js +3 -6
  50. package/lib/modules/audio-stream/index.js +1 -2
  51. package/lib/modules/chat/components/chat-select/index.js +3 -0
  52. package/lib/modules/components/control-bar/components/loading/index.css +76 -0
  53. package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
  54. package/lib/modules/components/control-bar/components/loading/index.js +64 -0
  55. package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
  56. package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
  57. package/lib/modules/components/control-bar/components/progress/index.js +43 -0
  58. package/lib/modules/components/control-bar/components/progress/style.css +51 -0
  59. package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
  60. package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
  61. package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
  62. package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
  63. package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
  64. package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
  65. package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
  66. package/lib/modules/components/control-bar/index.css +87 -0
  67. package/lib/modules/components/control-bar/index.d.ts +20 -0
  68. package/lib/modules/components/control-bar/index.js +276 -0
  69. package/lib/modules/components/device-control/store.js +2 -2
  70. package/lib/modules/components/leave-meeting/components/index.css +0 -9
  71. package/lib/modules/components/leave-meeting/index.d.ts +2 -1
  72. package/lib/modules/components/leave-meeting/index.js +19 -8
  73. package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
  74. package/lib/modules/components/leave-meeting/portal.js +29 -0
  75. package/lib/modules/components/leave-meeting/style.css +9 -0
  76. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
  77. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
  78. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
  79. package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
  80. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
  81. package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
  82. package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
  83. package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
  84. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +6 -4
  85. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +77 -41
  86. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +3 -3
  87. package/lib/modules/components/member-window/components/video-player/index.d.ts +3 -3
  88. package/lib/modules/components/member-window/index.css +4 -0
  89. package/lib/modules/components/member-window/types.d.ts +9 -5
  90. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
  91. package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
  92. package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
  93. package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
  94. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
  95. package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
  96. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
  97. package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
  98. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
  99. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
  100. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
  101. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
  102. package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
  103. package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
  104. package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
  105. package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
  106. package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
  107. package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
  108. package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
  109. package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
  110. package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
  111. package/lib/modules/components/toolbar/components/item/index.js +165 -0
  112. package/lib/modules/components/toolbar/components/item/style.css +94 -0
  113. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
  114. package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
  115. package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
  116. package/lib/modules/components/toolbar/components/panel/index.js +28 -0
  117. package/lib/modules/components/toolbar/components/panel/style.css +86 -0
  118. package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
  119. package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
  120. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
  121. package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
  122. package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
  123. package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
  124. package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
  125. package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
  126. package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
  127. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
  128. package/lib/modules/components/toolbar/index.d.ts +29 -0
  129. package/lib/modules/components/toolbar/index.js +258 -0
  130. package/lib/modules/components/toolbar/style.css +85 -0
  131. package/lib/modules/components/toolbar/types.d.ts +13 -0
  132. package/lib/modules/components/toolbar/types.js +6 -0
  133. package/lib/modules/control-bar/components/more-actions/index.js +0 -6
  134. package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
  135. package/lib/modules/control-bar/index.js +2 -1
  136. package/lib/modules/control-bar/store.d.ts +15 -12
  137. package/lib/modules/control-bar/store.js +68 -29
  138. package/lib/modules/control-bar/view.js +33 -67
  139. package/lib/modules/device-pretest/store.js +4 -2
  140. package/lib/modules/dialog/components/dialog-container/component/body.js +3 -24
  141. package/lib/modules/dialog/components/dialog-container/index.d.ts +4 -0
  142. package/lib/modules/dialog/components/dialog-container/index.js +67 -44
  143. package/lib/modules/dialog/components/normal-window/index.js +4 -0
  144. package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
  145. package/lib/modules/dialog/dialogs/control-bar/index.js +26 -35
  146. package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
  147. package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
  148. package/lib/modules/dialog/dialogs/sub-window/index.js +102 -0
  149. package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
  150. package/lib/modules/dialog/dialogs/video-window/index.js +31 -25
  151. package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
  152. package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
  153. package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
  154. package/lib/modules/dialog/hooks/useElectron.js +66 -13
  155. package/lib/modules/dialog/index.d.ts +6 -3
  156. package/lib/modules/dialog/index.js +5 -3
  157. package/lib/modules/dialog/level-config.js +1 -1
  158. package/lib/modules/dialog/store.d.ts +23 -9
  159. package/lib/modules/dialog/store.js +84 -12
  160. package/lib/modules/dialog/type.d.ts +8 -0
  161. package/lib/modules/event-confirm/components/window/index.d.ts +5 -2
  162. package/lib/modules/event-confirm/components/window/index.js +38 -14
  163. package/lib/modules/event-confirm/index.css +3 -2
  164. package/lib/modules/event-confirm/store.d.ts +10 -5
  165. package/lib/modules/event-confirm/store.js +68 -20
  166. package/lib/modules/event-confirm/view.js +10 -8
  167. package/lib/modules/event-sound/index.d.ts +1 -0
  168. package/lib/modules/event-sound/index.js +11 -24
  169. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +1 -2
  170. package/lib/modules/interpreter/store.js +11 -13
  171. package/lib/modules/invite/components/pstn-invite.js +0 -1
  172. package/lib/modules/layout/components/CommonVideoRenderer.js +26 -26
  173. package/lib/modules/layout/components/who-is-speaking.js +3 -6
  174. package/lib/modules/layout/index.d.ts +3 -1
  175. package/lib/modules/layout/index.js +2 -1
  176. package/lib/modules/layout/store.d.ts +7 -59
  177. package/lib/modules/layout/store.js +133 -45
  178. package/lib/modules/layout/type.d.ts +55 -0
  179. package/lib/modules/participant/components/can-moveable/index.js +0 -1
  180. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
  181. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
  182. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
  183. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
  184. package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
  185. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
  186. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
  187. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
  188. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
  189. package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
  190. package/lib/modules/participant/components/participants/index.js +5 -2
  191. package/lib/modules/participant/components/participants/types.d.ts +3 -0
  192. package/lib/modules/participant/index.d.ts +2 -0
  193. package/lib/modules/participant/index.js +2 -1
  194. package/lib/modules/participant/member-list-data-source.js +3 -5
  195. package/lib/modules/participant/store.d.ts +5 -1
  196. package/lib/modules/participant/store.js +51 -44
  197. package/lib/modules/secondary-window/index.d.ts +50 -0
  198. package/lib/modules/secondary-window/index.js +113 -0
  199. package/lib/modules/secondary-window/store.d.ts +76 -0
  200. package/lib/modules/secondary-window/store.js +407 -0
  201. package/lib/modules/secondary-window/type.d.ts +110 -0
  202. package/lib/modules/secondary-window/type.js +35 -0
  203. package/lib/modules/secondary-window/view.d.ts +6 -0
  204. package/lib/modules/secondary-window/view.js +257 -0
  205. package/lib/modules/setting/audio-settings/audio-settings.js +4 -2
  206. package/lib/modules/setting/config.d.ts +4 -0
  207. package/lib/modules/setting/config.js +6 -3
  208. package/lib/modules/setting/general-settings/general-settings.js +9 -0
  209. package/lib/modules/setting/state/index.js +0 -10
  210. package/lib/modules/setting/store.d.ts +9 -3
  211. package/lib/modules/setting/store.js +110 -77
  212. package/lib/modules/setting/view.js +3 -2
  213. package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
  214. package/lib/modules/share-screen/components/control-bar/index.js +17 -12
  215. package/lib/modules/share-screen/components/selection/index.js +16 -23
  216. package/lib/modules/share-screen/index.d.ts +4 -1
  217. package/lib/modules/share-screen/index.js +6 -3
  218. package/lib/modules/share-screen/store.d.ts +18 -19
  219. package/lib/modules/share-screen/store.js +101 -151
  220. package/lib/modules/share-screen/types.d.ts +7 -8
  221. package/lib/modules/state-bar/index.d.ts +2 -0
  222. package/lib/modules/state-bar/index.js +2 -1
  223. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  224. package/lib/modules/state-bar/store.d.ts +5 -2
  225. package/lib/modules/state-bar/store.js +14 -7
  226. package/lib/modules/state-bar/view.js +3 -3
  227. package/lib/modules/video-window/components/members/index.js +10 -15
  228. package/lib/modules/video-window/store.d.ts +1 -0
  229. package/lib/modules/video-window/store.js +8 -3
  230. package/lib/modules/whiteboard/components/control-bar/store.d.ts +3 -0
  231. package/lib/modules/whiteboard/components/control-bar/store.js +20 -11
  232. package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
  233. package/lib/modules/whiteboard/components/toolbar/store.js +2 -2
  234. package/lib/modules/whiteboard/index.d.ts +20 -17
  235. package/lib/modules/whiteboard/index.js +167 -132
  236. package/lib/plugins/module-dev-plugin.js +4 -0
  237. package/lib/providers/ability-provider.js +2 -0
  238. package/lib/providers/annotation-provider.js +3 -3
  239. package/lib/providers/device-privilege-provider.js +13 -12
  240. package/lib/providers/device-provider.d.ts +40 -31
  241. package/lib/providers/device-provider.js +657 -713
  242. package/lib/providers/device-stream-provider.js +4 -4
  243. package/lib/providers/interpreter-provider.js +7 -9
  244. package/lib/providers/multi-display-provider.d.ts +90 -0
  245. package/lib/providers/multi-display-provider.js +593 -0
  246. package/lib/providers/privilege-provider.d.ts +3 -11
  247. package/lib/providers/privilege-provider.js +3 -12
  248. package/lib/providers/renderer-provider.d.ts +3 -3
  249. package/lib/providers/renderer-provider.js +20 -32
  250. package/lib/providers/room-provider.js +21 -16
  251. package/lib/providers/screen-share-provider.d.ts +15 -11
  252. package/lib/providers/screen-share-provider.js +118 -99
  253. package/lib/providers/sharing-provider.d.ts +7 -1
  254. package/lib/providers/sharing-provider.js +39 -3
  255. package/lib/providers/whiteboard-provider.d.ts +24 -0
  256. package/lib/providers/whiteboard-provider.js +128 -0
  257. package/lib/runtime.d.ts +1 -0
  258. package/lib/scenes/main-scene.d.ts +6 -0
  259. package/lib/scenes/main-scene.js +44 -2
  260. package/lib/scenes/waiting-scene.d.ts +0 -2
  261. package/lib/scenes/waiting-scene.js +0 -6
  262. package/lib/schema.d.ts +3 -3
  263. package/lib/schema.js +1 -1
  264. package/lib/shared-data-source/confirm-data.d.ts +19 -0
  265. package/lib/shared-data-source/confirm-data.js +119 -15
  266. package/lib/shared-data-source/member-data.d.ts +2 -2
  267. package/lib/shared-data-source/screen-share-data.d.ts +35 -28
  268. package/lib/shared-data-source/screen-share-data.js +19 -8
  269. package/lib/shared-data-source/setting.js +4 -3
  270. package/lib/shared-data-source/video-window.js +1 -2
  271. package/lib/shared-data-source/whiteboard-data.d.ts +70 -0
  272. package/lib/shared-data-source/whiteboard-data.js +348 -0
  273. package/lib/translations/enUS.d.ts +1 -0
  274. package/lib/translations/enUS.js +2 -1
  275. package/lib/translations/zhCN.d.ts +1 -0
  276. package/lib/translations/zhCN.js +2 -1
  277. package/lib/ui-scene.d.ts +1 -0
  278. package/lib/ui-scene.js +77 -24
  279. package/lib/utilities/constant.d.ts +9 -2
  280. package/lib/utilities/constant.js +10 -3
  281. package/lib/utilities/debug.d.ts +4 -0
  282. package/lib/utilities/debug.js +40 -0
  283. package/lib/utilities/default-config.d.ts +4 -0
  284. package/lib/utilities/default-config.js +8 -4
  285. package/lib/utilities/dialog-utils.d.ts +3 -2
  286. package/lib/utilities/dialog-utils.js +56 -15
  287. package/lib/utilities/meeting-detail.js +4 -1
  288. package/lib/utilities/package-info.d.ts +3 -0
  289. package/lib/utilities/package-info.js +15 -0
  290. package/lib/utilities/renderer-event.d.ts +4 -6
  291. package/lib/utilities/renderer-event.js +23 -43
  292. package/lib/utilities/renderer.d.ts +1 -1
  293. package/lib/utilities/renderer.js +44 -10
  294. package/lib/utilities/shared-storage.d.ts +18 -0
  295. package/lib/utilities/shared-storage.js +63 -0
  296. package/lib/utilities/tools.js +2 -1
  297. package/lib/waiting-room-control-manager.js +6 -6
  298. package/package.json +6 -7
  299. package/public/index.html +5 -0
  300. package/lib/electron/tools.d.ts +0 -5
  301. package/lib/electron/tools.js +0 -62
@@ -115,9 +115,10 @@ var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
115
115
  var _i18n = require("agora-ui-foundation/lib/i18n");
116
116
  var _type3 = require("agora-ui-foundation/lib/components/icon/type");
117
117
  var _logger = require("../../utilities/logger");
118
+ var _type4 = require("../secondary-window/type");
118
119
  var _jsxRuntime = require("react/jsx-runtime");
119
120
  var _FcrWhiteboardUIModule;
120
- var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _setBackgroundDecs, _boardUIEventsDecs, _repositionToolbarDecs, _setConnectionStateDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
121
+ var _initProto, _init__isMultiDisplay, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _handleActiveDecs, _mountDecs, _unmountDecs, _unloadDecs, _setBackgroundDecs, _boardUIEventsDecs, _repositionToolbarDecs, _setConnectionStateDecs, _setJoinSuccessedDecs, _ref;
121
122
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
122
123
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
123
124
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
@@ -137,7 +138,8 @@ var _B = /*#__PURE__*/new WeakMap();
137
138
  var _C = /*#__PURE__*/new WeakMap();
138
139
  var _D = /*#__PURE__*/new WeakMap();
139
140
  var _E = /*#__PURE__*/new WeakMap();
140
- _ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _setBackgroundDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "_disposers");
141
+ var _F = /*#__PURE__*/new WeakMap();
142
+ _ref = (_handleActiveDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _setBackgroundDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "logger");
141
143
  var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
142
144
  function FcrWhiteboardUIModule() {
143
145
  var _this;
@@ -146,7 +148,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
146
148
  args[_key] = arguments[_key];
147
149
  }
148
150
  _this = _callSuper(this, FcrWhiteboardUIModule, [].concat(args));
149
- (0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), []));
151
+ (0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), (0, _logger.createLogger)({
152
+ prefix: 'FcrWhiteboardUIModule'
153
+ })));
154
+ (0, _defineProperty2["default"])(_this, "_disposers", []);
150
155
  (0, _defineProperty2["default"])(_this, "_connectionState", _fcrCore.FcrConnectionState.DISCONNECTED);
151
156
  (0, _defineProperty2["default"])(_this, "_initWidth", 1920);
152
157
  (0, _defineProperty2["default"])(_this, "_initHeight", 1220);
@@ -156,17 +161,19 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
156
161
  (0, _defineProperty2["default"])(_this, "_isMyBoard", false);
157
162
  (0, _defineProperty2["default"])(_this, "_boardObserver", {
158
163
  onActive: function onActive(_, operatorUser) {
159
- return _this.onPropertiesUpdate({
164
+ return _this._handleActive({
160
165
  operatorUser: operatorUser
161
166
  });
162
167
  },
163
168
  onInactive: function onInactive(reason, operatorUser) {
164
- var _this$_localUser, _this$_ownerUser, _this$_ownerUser2;
169
+ var _this$_localUser, _this$_ownerUser;
170
+ _this._controlbarStore.controlEnabled = false;
165
171
  var currentUserId = (_this$_localUser = _this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId;
166
172
  var isMeOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === currentUserId;
167
173
  var isMeOwner = ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId;
168
- _this.logger.info("Fcr board has inactive effect, the reason is ".concat(reason, ", the operator is ").concat(operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userName, ", the owner is ").concat((_this$_ownerUser2 = _this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userName));
169
- !isMeOperated && isMeOwner && _this._alertWhenBeenStopByOthers(operatorUser);
174
+ if (!isMeOperated && isMeOwner) {
175
+ _this._alertWhenBeenStopByOthers(operatorUser);
176
+ }
170
177
  _this.onDestroy({
171
178
  operatorUser: operatorUser
172
179
  });
@@ -178,7 +185,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
178
185
  return _regenerator["default"].wrap(function (_context) {
179
186
  while (1) switch (_context.prev = _context.next) {
180
187
  case 0:
181
- _this.logger.info('Fcr board connection state changed to', state);
182
188
  _this._setConnectionState(state);
183
189
  if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
184
190
  if (_this._joined) {
@@ -215,23 +221,68 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
215
221
  return onConnectionStateUpdated;
216
222
  }()
217
223
  });
218
- (0, _defineProperty2["default"])(_this, "logger", (0, _logger.createLogger)({
219
- prefix: 'FcrWhiteboardUIModule'
220
- }));
224
+ (0, _defineProperty2["default"])(_this, "_multiDisplayObserver", {
225
+ onContentDistributionUpdated: function onContentDistributionUpdated(distribution) {
226
+ if (distribution.secondaryWindow.type === _type4.FcrUIDisplayDistributionContentType.HIDDEN) {
227
+ _this._isActive && _this._checkBoard();
228
+ } else {
229
+ _this.unmount();
230
+ }
231
+ }
232
+ });
233
+ (0, _defineProperty2["default"])(_this, "_streamObserver", {
234
+ onStreamsRemoved: function onStreamsRemoved(roomId, events) {
235
+ var seizeData = events.find(function (event) {
236
+ var _event$cause;
237
+ return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
238
+ });
239
+ var isMyStream = events.some(function (event) {
240
+ var _this$_localUser2;
241
+ return event.modifiedStream.owner.userId === ((_this$_localUser2 = _this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId);
242
+ });
243
+ if (seizeData) {
244
+ var _seizeData$operatorUs, _this$_localUser3;
245
+ var operatorIsMe = ((_seizeData$operatorUs = seizeData.operatorUser) === null || _seizeData$operatorUs === void 0 ? void 0 : _seizeData$operatorUs.userId) !== ((_this$_localUser3 = _this._localUser) === null || _this$_localUser3 === void 0 ? void 0 : _this$_localUser3.userId);
246
+ if (isMyStream && operatorIsMe) {
247
+ _this._alertWhenBeenStopByOthers(seizeData === null || seizeData === void 0 ? void 0 : seizeData.operatorUser);
248
+ }
249
+ if (!isMyStream) {
250
+ var _this$_uiEventStore, _seizeData$operatorUs2;
251
+ (_this$_uiEventStore = _this._uiEventStore) === null || _this$_uiEventStore === void 0 || _this$_uiEventStore.showToast({
252
+ type: 'info',
253
+ message: "".concat(seizeData === null || seizeData === void 0 || (_seizeData$operatorUs2 = seizeData.operatorUser) === null || _seizeData$operatorUs2 === void 0 ? void 0 : _seizeData$operatorUs2.userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare'))
254
+ });
255
+ }
256
+ }
257
+ }
258
+ });
259
+ (0, _defineProperty2["default"])(_this, "_userObserver", {
260
+ onUserInfoUpdated: function onUserInfoUpdated(_, event) {
261
+ var _this$_localUser4;
262
+ if (event.modifiedUser.userId === ((_this$_localUser4 = _this._localUser) === null || _this$_localUser4 === void 0 ? void 0 : _this$_localUser4.userId)) {
263
+ _this._localUser = event.modifiedUser;
264
+ _this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this._localUser.userRole);
265
+ }
266
+ }
267
+ });
268
+ (0, _defineProperty2["default"])(_this, "_eventObserver", {
269
+ onEvent: _this.onEvent.bind(_this)
270
+ });
221
271
  (0, _defineProperty2["default"])(_this, "_mounted", false);
222
272
  (0, _defineProperty2["default"])(_this, "_initialized", false);
223
273
  (0, _defineProperty2["default"])(_this, "_joined", false);
224
274
  (0, _defineProperty2["default"])(_this, "_grantedUsers", new Set());
225
- _classPrivateFieldInitSpec(_this, _A, _init__lonelyWindowState(_this, _type.LonelyWindowState.DEFAULT));
226
- _classPrivateFieldInitSpec(_this, _B, _init__ownerUser(_this, undefined));
227
- _classPrivateFieldInitSpec(_this, _C, _init__isHost(_this, false));
228
- _classPrivateFieldInitSpec(_this, _D, _init__boardBackground(_this, '#ffffff'));
229
- _classPrivateFieldInitSpec(_this, _E, _init__localUser(_this, undefined));
275
+ _classPrivateFieldInitSpec(_this, _A, _init__isMultiDisplay(_this, false));
276
+ _classPrivateFieldInitSpec(_this, _B, _init__lonelyWindowState(_this, _type.LonelyWindowState.DEFAULT));
277
+ _classPrivateFieldInitSpec(_this, _C, _init__ownerUser(_this, undefined));
278
+ _classPrivateFieldInitSpec(_this, _D, _init__isHost(_this, false));
279
+ _classPrivateFieldInitSpec(_this, _E, _init__boardBackground(_this, '#ffffff'));
280
+ _classPrivateFieldInitSpec(_this, _F, _init__localUser(_this, undefined));
230
281
  return _this;
231
282
  }
232
283
  (0, _inherits2["default"])(FcrWhiteboardUIModule, _UIModule);
233
284
  return (0, _createClass2["default"])(FcrWhiteboardUIModule, [{
234
- key: "_lonelyWindowState",
285
+ key: "_isMultiDisplay",
235
286
  get: function get() {
236
287
  return _classPrivateFieldGet(_A, this);
237
288
  },
@@ -239,7 +290,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
239
290
  _classPrivateFieldSet(_A, this, v);
240
291
  }
241
292
  }, {
242
- key: "_ownerUser",
293
+ key: "_lonelyWindowState",
243
294
  get: function get() {
244
295
  return _classPrivateFieldGet(_B, this);
245
296
  },
@@ -247,7 +298,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
247
298
  _classPrivateFieldSet(_B, this, v);
248
299
  }
249
300
  }, {
250
- key: "_isHost",
301
+ key: "_ownerUser",
251
302
  get: function get() {
252
303
  return _classPrivateFieldGet(_C, this);
253
304
  },
@@ -255,7 +306,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
255
306
  _classPrivateFieldSet(_C, this, v);
256
307
  }
257
308
  }, {
258
- key: "_boardBackground",
309
+ key: "_isHost",
259
310
  get: function get() {
260
311
  return _classPrivateFieldGet(_D, this);
261
312
  },
@@ -263,13 +314,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
263
314
  _classPrivateFieldSet(_D, this, v);
264
315
  }
265
316
  }, {
266
- key: "_localUser",
317
+ key: "_boardBackground",
267
318
  get: function get() {
268
319
  return _classPrivateFieldGet(_E, this);
269
320
  },
270
321
  set: function set(v) {
271
322
  _classPrivateFieldSet(_E, this, v);
272
323
  }
324
+ }, {
325
+ key: "_localUser",
326
+ get: function get() {
327
+ return _classPrivateFieldGet(_F, this);
328
+ },
329
+ set: function set(v) {
330
+ _classPrivateFieldSet(_F, this, v);
331
+ }
273
332
  }, {
274
333
  key: "hasPrivilege",
275
334
  get: function get() {
@@ -302,9 +361,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
302
361
  }, {
303
362
  key: "onNodeWillActive",
304
363
  value: function onNodeWillActive() {
305
- var _this$currentRoomCont,
306
- _this2 = this,
307
- _this$_uiEventStore;
364
+ var _this$currentRoomCont, _this$_uiEventStore2;
308
365
  this._uiEventStore = this.eventProvider;
309
366
  this._roomControl = (_this$currentRoomCont = this.currentRoomControlProvider) === null || _this$currentRoomCont === void 0 ? void 0 : _this$currentRoomCont.currentRoomControl;
310
367
  this._securityStore = this.privilegeProvider;
@@ -313,6 +370,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
313
370
  var streamControl = this._roomControl.getStreamControl();
314
371
  var userControl = this._roomControl.getUserControl();
315
372
  this._userControl = userControl;
373
+ this._streamControl = streamControl;
316
374
  this._controlbarStore = new _store2.WhiteboardControlBarStore({
317
375
  uiEventStore: this.eventProvider,
318
376
  streamControl: streamControl,
@@ -322,44 +380,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
322
380
  sharedAnnotationDataSource: this.sharedAnnotationDataSource
323
381
  });
324
382
  this._whiteboardControl.addObserver(this._boardObserver);
325
- streamControl.addObserver({
326
- onStreamsRemoved: function onStreamsRemoved(roomId, events) {
327
- var seizeData = events.find(function (event) {
328
- var _event$cause;
329
- return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
330
- });
331
- var isMyStream = events.some(function (event) {
332
- var _this2$_localUser;
333
- return event.modifiedStream.owner.userId === ((_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId);
334
- });
335
- if (seizeData) {
336
- var _seizeData$operatorUs, _this2$_localUser2;
337
- var operatorIsMe = ((_seizeData$operatorUs = seizeData.operatorUser) === null || _seizeData$operatorUs === void 0 ? void 0 : _seizeData$operatorUs.userId) !== ((_this2$_localUser2 = _this2._localUser) === null || _this2$_localUser2 === void 0 ? void 0 : _this2$_localUser2.userId);
338
- if (isMyStream && operatorIsMe) {
339
- _this2._alertWhenBeenStopByOthers(seizeData === null || seizeData === void 0 ? void 0 : seizeData.operatorUser);
340
- }
341
- if (!isMyStream) {
342
- var _this2$_uiEventStore, _seizeData$operatorUs2;
343
- (_this2$_uiEventStore = _this2._uiEventStore) === null || _this2$_uiEventStore === void 0 || _this2$_uiEventStore.showToast({
344
- type: 'info',
345
- message: "".concat(seizeData === null || seizeData === void 0 || (_seizeData$operatorUs2 = seizeData.operatorUser) === null || _seizeData$operatorUs2 === void 0 ? void 0 : _seizeData$operatorUs2.userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare'))
346
- });
347
- }
348
- }
349
- }
350
- });
351
- userControl.addObserver({
352
- onUserInfoUpdated: function onUserInfoUpdated(_, event) {
353
- var _this2$_localUser3;
354
- if (event.modifiedUser.userId === ((_this2$_localUser3 = _this2._localUser) === null || _this2$_localUser3 === void 0 ? void 0 : _this2$_localUser3.userId)) {
355
- _this2._localUser = event.modifiedUser;
356
- _this2._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this2._localUser.userRole);
357
- }
358
- }
359
- });
360
- (_this$_uiEventStore = this._uiEventStore) === null || _this$_uiEventStore === void 0 || _this$_uiEventStore.addObserver({
361
- onEvent: this.onEvent.bind(this)
362
- });
383
+ this.multiDisplayProvider.addObserver(this._multiDisplayObserver);
384
+ this._streamControl.addObserver(this._streamObserver);
385
+ this._userControl.addObserver(this._userObserver);
386
+ (_this$_uiEventStore2 = this._uiEventStore) === null || _this$_uiEventStore2 === void 0 || _this$_uiEventStore2.addObserver(this._eventObserver);
387
+ this._isMultiDisplay = this.multiDisplayProvider.isActive;
363
388
  this._boardStore = this._createBoardUIContext();
364
389
  this._localUser = this._userControl.getLocalUser();
365
390
  this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(this._localUser.userRole);
@@ -368,15 +393,19 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
368
393
  var ownerUserId = this._whiteboardControl.getOwnerId();
369
394
  this._isActive = isActive;
370
395
  if (isActive) {
371
- this._checkBoard();
372
- this._ownerUser = this._userControl.getUser(ownerUserId);
373
- this._boardBackground = this._whiteboardControl.getBackgroundColor();
396
+ if (!this._isMultiDisplay) {
397
+ this.logger.info('[whiteboard]: is active');
398
+ this._checkBoard();
399
+ this._ownerUser = this._userControl.getUser(ownerUserId);
400
+ this._boardBackground = this._whiteboardControl.getBackgroundColor();
401
+ }
374
402
  }
375
403
  }
376
404
  }, {
377
405
  key: "onNodeWillInactive",
378
406
  value: function onNodeWillInactive() {
379
407
  this.onDestroy();
408
+ this.release();
380
409
  }
381
410
  }, {
382
411
  key: "getComponent",
@@ -452,20 +481,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
452
481
  }
453
482
  }
454
483
  }, {
455
- key: "onPropertiesUpdate",
456
- value: function onPropertiesUpdate(params) {
484
+ key: "_handleActive",
485
+ value: function _handleActive(params) {
457
486
  // this._checkPrivilege(props);
487
+ this.logger.info('[whiteboard] active');
458
488
  this._checkBoard();
459
489
  }
460
490
  }, {
461
491
  key: "onDestroy",
462
492
  value: function onDestroy(params) {
463
- var _this$_securityStore2, _this$_localUser2;
493
+ var _this$_securityStore2, _this$_localUser5;
464
494
  var _ref2 = params || {},
465
495
  operatorUser = _ref2.operatorUser;
466
- if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser2 = this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId) && this._isActive) {
467
- var _this$_uiEventStore2;
468
- (_this$_uiEventStore2 = this._uiEventStore) === null || _this$_uiEventStore2 === void 0 || _this$_uiEventStore2.showToast({
496
+ if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser5 = this._localUser) === null || _this$_localUser5 === void 0 ? void 0 : _this$_localUser5.userId) && this._isActive) {
497
+ var _this$_uiEventStore3;
498
+ (_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.showToast({
469
499
  message: this._isMyBoard ? (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard') : (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped'),
470
500
  type: 'info'
471
501
  });
@@ -487,6 +517,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
487
517
  var _boardMainWindow = this._boardMainWindow,
488
518
  _boardDom = this._boardDom;
489
519
  if (_boardDom && _boardMainWindow && !this._mounted) {
520
+ this.logger.info('[whiteboard] mount');
490
521
  this._mounted = true;
491
522
  var aspectRatio = this._initHeight / this._initWidth;
492
523
  var view = _boardMainWindow.getContentView();
@@ -504,13 +535,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
504
535
 
505
536
  var isActive = (_this$_whiteboardCont6 = this._whiteboardControl) === null || _this$_whiteboardCont6 === void 0 ? void 0 : _this$_whiteboardCont6.getActivity();
506
537
  if (isActive && this._whiteboardControl) {
507
- var _this$_userControl2, _this$_ownerUser3, _this$_localUser3, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore3, _this$_toolbarStore;
538
+ var _this$_userControl2, _this$_ownerUser2, _this$_localUser6, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore4, _this$_toolbarStore;
508
539
  var ownerUserId = this._whiteboardControl.getOwnerId();
509
540
  this._ownerUser = (_this$_userControl2 = this._userControl) === null || _this$_userControl2 === void 0 ? void 0 : _this$_userControl2.getUser(ownerUserId);
510
- this._isMyBoard = ((_this$_ownerUser3 = this._ownerUser) === null || _this$_ownerUser3 === void 0 ? void 0 : _this$_ownerUser3.userId) === ((_this$_localUser3 = this._localUser) === null || _this$_localUser3 === void 0 ? void 0 : _this$_localUser3.userId);
541
+ this._isMyBoard = ((_this$_ownerUser2 = this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userId) === ((_this$_localUser6 = this._localUser) === null || _this$_localUser6 === void 0 ? void 0 : _this$_localUser6.userId);
511
542
  (_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
512
543
  (_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
513
- (_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
544
+ (_this$_uiEventStore4 = this._uiEventStore) === null || _this$_uiEventStore4 === void 0 || _this$_uiEventStore4.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
514
545
  action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
515
546
  payload: ownerUserId
516
547
  });
@@ -525,16 +556,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
525
556
  key: "unmount",
526
557
  value: function unmount() {
527
558
  if (this._mounted && this._boardMainWindow) {
528
- var _this$_boardDom, _this$_uiEventStore4;
559
+ var _this$_boardDom, _this$_uiEventStore5;
560
+ this.logger.info('[whiteboard] unmount');
529
561
  (_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.removeChild(this._boardMainWindow.getContentView());
530
562
  this._boardMainWindow = undefined;
531
- if (this._lonelyWindowState === _type.LonelyWindowState.OPEN) {
532
- this._openLonelyWindow();
533
- }
534
- if (this._lonelyWindowState === _type.LonelyWindowState.CLOSE) {
535
- this._open();
536
- }
537
- (_this$_uiEventStore4 = this._uiEventStore) === null || _this$_uiEventStore4 === void 0 || _this$_uiEventStore4.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
563
+ (_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
538
564
  action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
539
565
  payload: null
540
566
  });
@@ -553,6 +579,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
553
579
  this._outerDom = undefined;
554
580
  }
555
581
  }
582
+ }, {
583
+ key: "release",
584
+ value: function release() {
585
+ var _this$_toolbarStore2, _this$_controlbarStor, _this$_whiteboardCont7, _this$_uiEventStore6, _this$_userControl3, _this$_streamControl;
586
+ (_this$_toolbarStore2 = this._toolbarStore) === null || _this$_toolbarStore2 === void 0 || _this$_toolbarStore2.release();
587
+ (_this$_controlbarStor = this._controlbarStore) === null || _this$_controlbarStor === void 0 || _this$_controlbarStor.release();
588
+ this._boardStore = undefined;
589
+ this._toolbarStore = undefined;
590
+ this._controlbarStore = undefined;
591
+ (_this$_whiteboardCont7 = this._whiteboardControl) === null || _this$_whiteboardCont7 === void 0 || _this$_whiteboardCont7.removeObserver(this._boardObserver);
592
+ this.multiDisplayProvider.removeObserver(this._multiDisplayObserver);
593
+ (_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.removeObserver(this._eventObserver);
594
+ (_this$_userControl3 = this._userControl) === null || _this$_userControl3 === void 0 || _this$_userControl3.removeObserver(this._userObserver);
595
+ (_this$_streamControl = this._streamControl) === null || _this$_streamControl === void 0 || _this$_streamControl.removeObserver(this._streamObserver);
596
+ }
556
597
  }, {
557
598
  key: "_setBackground",
558
599
  value: function _setBackground() {
@@ -582,18 +623,18 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
582
623
  }, {
583
624
  key: "_boardUIEvents",
584
625
  value: function _boardUIEvents(observables) {
585
- var _this3 = this;
626
+ var _this2 = this;
586
627
  return {
587
628
  handleBoardDomLoad: function handleBoardDomLoad(ref) {
588
- _this3._boardDom = ref;
589
- if (_this3._boardDom) {
590
- _this3.mount();
629
+ _this2._boardDom = ref;
630
+ if (_this2._boardDom) {
631
+ _this2.mount();
591
632
  } else {
592
- _this3._mounted = false;
633
+ _this2._mounted = false;
593
634
  }
594
635
  },
595
636
  handleCollectorDomLoad: function handleCollectorDomLoad(ref) {
596
- _this3._collectorDom = ref;
637
+ _this2._collectorDom = ref;
597
638
  },
598
639
  handleClose: function handleClose() {
599
640
  // this._close();
@@ -611,7 +652,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
611
652
  setWriteEnable: function setWriteEnable(enable) {
612
653
  observables.writeEnabled = enable;
613
654
  observables.canOperate = enable;
614
- _this3._repositionToolbar();
655
+ _this2._repositionToolbar();
615
656
  },
616
657
  setWhiteboardVisible: function setWhiteboardVisible(visible) {
617
658
  observables.whiteboardVisible = visible;
@@ -682,13 +723,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
682
723
  }, {
683
724
  key: "_resetCanvasPosition",
684
725
  value: function _resetCanvasPosition() {
685
- var _this4 = this;
726
+ var _this3 = this;
686
727
  if (this._timer) clearTimeout(this._timer);
687
728
  this._timer = setTimeout(function () {
688
- if (!_this4._boardDom) return;
689
- _this4._repositionToolbar();
690
- var thatStyle = _this4._boardDom.style;
691
- _this4._controlbarStore.scaleValue = 1;
729
+ if (!_this3._boardDom) return;
730
+ _this3._repositionToolbar();
731
+ var thatStyle = _this3._boardDom.style;
732
+ _this3._controlbarStore.scaleValue = 1;
692
733
  thatStyle.transform = "scale(1)";
693
734
  }, 300);
694
735
  }
@@ -733,10 +774,11 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
733
774
  }, {
734
775
  key: "_open",
735
776
  value: function _open() {
736
- var _this$_whiteboardCont7;
777
+ var _this$_whiteboardCont8;
737
778
  this._joined = true;
738
779
  this._initialized = true;
739
- (_this$_whiteboardCont7 = this._whiteboardControl) === null || _this$_whiteboardCont7 === void 0 || _this$_whiteboardCont7.open();
780
+ (_this$_whiteboardCont8 = this._whiteboardControl) === null || _this$_whiteboardCont8 === void 0 || _this$_whiteboardCont8.open();
781
+ this.logger.info('[whiteboard] open');
740
782
  }
741
783
  }, {
742
784
  key: "_close",
@@ -745,17 +787,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
745
787
  this._setJoinSuccessed(false);
746
788
  if (this._whiteboardControl) {
747
789
  this._whiteboardControl.close();
790
+ this.logger.info('[whiteboard] close');
748
791
  }
749
792
  }
750
- }, {
751
- key: "_openLonelyWindow",
752
- value: function _openLonelyWindow() {
753
- var _this$_uiEventStore5, _this$_uiEventStore6;
754
- (_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.openDialog(_constant.FcrUIDialogKey.WHITEBOARD);
755
- (_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.openDialog(_constant.FcrUIDialogKey.TOOLBAR);
756
- // this._toolbarStore!.observables.layoutReady = false;
757
- this._open();
758
- }
759
793
  }, {
760
794
  key: "_setJoinSuccessed",
761
795
  value: function _setJoinSuccessed(joinSuccessed) {
@@ -766,32 +800,32 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
766
800
  }, {
767
801
  key: "_addDisposers",
768
802
  value: function _addDisposers() {
769
- var _this5 = this;
803
+ var _this4 = this;
770
804
  this._disposers.push((0, _mobx.reaction)(function () {
771
- return _this5.hasPrivilege;
805
+ return _this4.hasPrivilege;
772
806
  }, function (privilege) {
773
- var _this5$_boardStore, _this5$_boardStore2;
774
- var p = privilege || _this5._isHost || _this5._isMyBoard;
775
- (_this5$_boardStore = _this5._boardStore) === null || _this5$_boardStore === void 0 || _this5$_boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
776
- (_this5$_boardStore2 = _this5._boardStore) === null || _this5$_boardStore2 === void 0 || _this5$_boardStore2.setPrivilege(p);
807
+ var _this4$_boardStore, _this4$_boardStore2;
808
+ var p = privilege || _this4._isHost || _this4._isMyBoard;
809
+ (_this4$_boardStore = _this4._boardStore) === null || _this4$_boardStore === void 0 || _this4$_boardStore.setWriteEnable(_this4._isHost || _this4._isMyBoard);
810
+ (_this4$_boardStore2 = _this4._boardStore) === null || _this4$_boardStore2 === void 0 || _this4$_boardStore2.setPrivilege(p);
777
811
  }), (0, _mobx.reaction)(function () {
778
- return _this5._boardStore.observables.writeEnabled;
812
+ return _this4._boardStore.observables.writeEnabled;
779
813
  }, function (writeEnabled) {
780
- if (writeEnabled) setTimeout(_this5._repositionToolbar, 0);
814
+ if (writeEnabled) setTimeout(_this4._repositionToolbar, 0);
781
815
  }), (0, _mobx.reaction)(function () {
782
- return _this5._localUser;
816
+ return _this4._localUser;
783
817
  }, function (user) {
784
- var _this5$_boardStore3;
785
- _this5._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
786
- var hasPrivilege = _this5.hasPrivilege || _this5._isHost || _this5._isMyBoard;
787
- (_this5$_boardStore3 = _this5._boardStore) === null || _this5$_boardStore3 === void 0 || _this5$_boardStore3.setPrivilege(hasPrivilege);
788
- _this5._boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
818
+ var _this4$_boardStore3;
819
+ _this4._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
820
+ var hasPrivilege = _this4.hasPrivilege || _this4._isHost || _this4._isMyBoard;
821
+ (_this4$_boardStore3 = _this4._boardStore) === null || _this4$_boardStore3 === void 0 || _this4$_boardStore3.setPrivilege(hasPrivilege);
822
+ _this4._boardStore.setWriteEnable(_this4._isHost || _this4._isMyBoard);
789
823
  }));
790
824
  }
791
825
  }, {
792
826
  key: "_alertWhenBeenStopByOthers",
793
827
  value: function _alertWhenBeenStopByOthers(userInfo) {
794
- var _this6 = this;
828
+ var _this5 = this;
795
829
  var userRole = userInfo.userRole,
796
830
  userName = userInfo.userName;
797
831
  var content = (0, _i18n.transI18n)("fmt_whiteboard_dialog_share_stopped_message_".concat(_type2.FcrUserRole.HOST === userRole ? 'host' : 'cohost'), {
@@ -804,12 +838,12 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
804
838
  showCancel: false,
805
839
  icon: _type3.FcrIconType.FCR_SCREENSHARING,
806
840
  onOk: function onOk() {
807
- var _this6$_uiEventStore;
808
- (_this6$_uiEventStore = _this6._uiEventStore) === null || _this6$_uiEventStore === void 0 || _this6$_uiEventStore.closeConfirm(dialogId);
841
+ var _this5$_uiEventStore;
842
+ (_this5$_uiEventStore = _this5._uiEventStore) === null || _this5$_uiEventStore === void 0 || _this5$_uiEventStore.closeConfirm(dialogId);
809
843
  },
810
844
  onCancel: function onCancel() {
811
- var _this6$_uiEventStore2;
812
- (_this6$_uiEventStore2 = _this6._uiEventStore) === null || _this6$_uiEventStore2 === void 0 || _this6$_uiEventStore2.closeConfirm(dialogId);
845
+ var _this5$_uiEventStore2;
846
+ (_this5$_uiEventStore2 = _this5._uiEventStore) === null || _this5$_uiEventStore2 === void 0 || _this5$_uiEventStore2.closeConfirm(dialogId);
813
847
  },
814
848
  width: 400,
815
849
  height: 160
@@ -818,12 +852,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
818
852
  }]);
819
853
  }(_base.UIModule);
820
854
  _FcrWhiteboardUIModule = FcrWhiteboardUIModule;
821
- var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_setBackgroundDecs, 18, "_setBackground"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
822
- var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
823
- _init__lonelyWindowState = _applyDecs$e2[0];
824
- _init__ownerUser = _applyDecs$e2[1];
825
- _init__isHost = _applyDecs$e2[2];
826
- _init__boardBackground = _applyDecs$e2[3];
827
- _init__localUser = _applyDecs$e2[4];
828
- _initProto = _applyDecs$e2[5];
855
+ var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_isMultiDisplay"], [_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_handleActiveDecs, 18, "_handleActive"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_setBackgroundDecs, 18, "_setBackground"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
856
+ var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 7);
857
+ _init__isMultiDisplay = _applyDecs$e2[0];
858
+ _init__lonelyWindowState = _applyDecs$e2[1];
859
+ _init__ownerUser = _applyDecs$e2[2];
860
+ _init__isHost = _applyDecs$e2[3];
861
+ _init__boardBackground = _applyDecs$e2[4];
862
+ _init__localUser = _applyDecs$e2[5];
863
+ _initProto = _applyDecs$e2[6];
829
864
  _applyDecs$e;
@@ -126,6 +126,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
126
126
  },
127
127
  frameRate: 15,
128
128
  bitrate: 800
129
+ // isMirror: false,
129
130
  },
130
131
  lowVideoEncoderConfig: {
131
132
  dimensions: {
@@ -134,6 +135,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
134
135
  },
135
136
  frameRate: 15,
136
137
  bitrate: 400
138
+ // isMirror: false,
137
139
  },
138
140
  enableDualStreamMode: false
139
141
  },
@@ -145,6 +147,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
145
147
  },
146
148
  frameRate: 15,
147
149
  bitrate: 800
150
+ // isMirror: false,
148
151
  },
149
152
  lowVideoEncoderConfig: {
150
153
  dimensions: {
@@ -153,6 +156,7 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
153
156
  },
154
157
  frameRate: 15,
155
158
  bitrate: 400
159
+ // isMirror: false,
156
160
  },
157
161
  enableDualStreamMode: false
158
162
  },
@@ -55,5 +55,7 @@ var FcrUIAbilityProviderImpl = exports.FcrUIAbilityProviderImpl = /*#__PURE__*/(
55
55
  return result;
56
56
  });
57
57
  this._abilityControl = _abilityControl;
58
+ // @ts-ignore
59
+ window._abilityProvider = this;
58
60
  });
59
61
  (0, _base.registerDependency)('abilityProvider');
@@ -62,8 +62,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
62
62
  var _constant = require("../utilities/constant");
63
63
  var _base = require("../base");
64
64
  var _mobx = require("mobx");
65
- var _type = require("agora-rte-sdk/lib/core/rtc/type");
66
65
  var _imports = require("fcr-core/lib/imports");
66
+ var _type = require("fcr-core/lib/type");
67
67
  var _rendererEvent = require("../utilities/renderer-event");
68
68
  var _type2 = require("../modules/whiteboard/type");
69
69
  var _dialogUtils = require("../utilities/dialog-utils");
@@ -104,7 +104,7 @@ var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PUR
104
104
  _classPrivateFieldInitSpec(this, _C, _init_isShowToolbar(this, false));
105
105
  _classPrivateFieldInitSpec(this, _D, _init_currentShareInfo(this, {
106
106
  id: '',
107
- type: _type.AgoraRtcScreenCaptureType.SCREEN,
107
+ type: _type.FcrScreenCaptureType.SCREEN,
108
108
  bounds: {
109
109
  x: 0,
110
110
  y: 0,
@@ -284,7 +284,7 @@ var FcrUIAnnotationProviderImpl = exports.FcrUIAnnotationProviderImpl = /*#__PUR
284
284
  while (1) switch (_context2.prev = _context2.next) {
285
285
  case 0:
286
286
  targetBounds = null;
287
- if (this.currentShareInfo.type === _type.AgoraRtcScreenCaptureType.SCREEN) {
287
+ if (this.currentShareInfo.type === _type.FcrScreenCaptureType.SCREEN) {
288
288
  _ref2 = info || this.currentShareInfo, bounds = _ref2.bounds;
289
289
  _getCurrentSharingWor = (0, _dialogUtils.getCurrentSharingWorkArea)({
290
290
  currentShareBounds: bounds