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
@@ -6,13 +6,16 @@ require("core-js/modules/es.symbol.to-primitive.js");
6
6
  require("core-js/modules/es.error.cause.js");
7
7
  require("core-js/modules/es.error.to-string.js");
8
8
  require("core-js/modules/es.array.is-array.js");
9
+ require("core-js/modules/es.array.iterator.js");
9
10
  require("core-js/modules/es.date.to-primitive.js");
11
+ require("core-js/modules/es.function.bind.js");
10
12
  require("core-js/modules/es.function.name.js");
11
13
  require("core-js/modules/es.map.js");
12
14
  require("core-js/modules/es.number.constructor.js");
13
15
  require("core-js/modules/es.object.create.js");
14
16
  require("core-js/modules/es.object.define-property.js");
15
17
  require("core-js/modules/es.object.get-own-property-descriptor.js");
18
+ require("core-js/modules/es.string.iterator.js");
16
19
  require("core-js/modules/esnext.function.metadata.js");
17
20
  require("core-js/modules/esnext.map.delete-all.js");
18
21
  require("core-js/modules/esnext.map.emplace.js");
@@ -29,6 +32,7 @@ require("core-js/modules/esnext.map.reduce.js");
29
32
  require("core-js/modules/esnext.map.some.js");
30
33
  require("core-js/modules/esnext.map.update.js");
31
34
  require("core-js/modules/esnext.symbol.metadata.js");
35
+ require("core-js/modules/web.dom-collections.iterator.js");
32
36
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
33
37
  var _typeof = require("@babel/runtime/helpers/typeof");
34
38
  Object.defineProperty(exports, "__esModule", {
@@ -41,32 +45,24 @@ require("core-js/modules/es.array.filter.js");
41
45
  require("core-js/modules/es.array.find.js");
42
46
  require("core-js/modules/es.array.for-each.js");
43
47
  require("core-js/modules/es.array.includes.js");
44
- require("core-js/modules/es.array.iterator.js");
45
48
  require("core-js/modules/es.array.map.js");
46
49
  require("core-js/modules/es.array.push.js");
47
50
  require("core-js/modules/es.date.to-json.js");
48
- require("core-js/modules/es.function.bind.js");
49
51
  require("core-js/modules/es.json.stringify.js");
50
52
  require("core-js/modules/es.object.keys.js");
51
53
  require("core-js/modules/es.object.to-string.js");
52
- require("core-js/modules/es.promise.js");
53
54
  require("core-js/modules/es.regexp.constructor.js");
54
55
  require("core-js/modules/es.regexp.dot-all.js");
55
56
  require("core-js/modules/es.regexp.exec.js");
56
57
  require("core-js/modules/es.regexp.sticky.js");
57
58
  require("core-js/modules/es.regexp.test.js");
58
59
  require("core-js/modules/es.regexp.to-string.js");
59
- require("core-js/modules/es.string.iterator.js");
60
- require("core-js/modules/es.weak-map.js");
61
60
  require("core-js/modules/esnext.iterator.constructor.js");
62
61
  require("core-js/modules/esnext.iterator.filter.js");
63
62
  require("core-js/modules/esnext.iterator.find.js");
64
63
  require("core-js/modules/esnext.iterator.for-each.js");
65
64
  require("core-js/modules/esnext.iterator.map.js");
66
- require("core-js/modules/esnext.weak-map.delete-all.js");
67
- require("core-js/modules/esnext.weak-map.emplace.js");
68
65
  require("core-js/modules/web.dom-collections.for-each.js");
69
- require("core-js/modules/web.dom-collections.iterator.js");
70
66
  require("core-js/modules/web.timers.js");
71
67
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
72
68
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
@@ -77,32 +73,25 @@ var _react = require("react");
77
73
  var _constant = require("../../utilities/constant");
78
74
  var _decorator = require("agora-foundation/lib/decorator");
79
75
  var _rendererEvent = require("../../utilities/renderer-event");
80
- var _type = require("agora-rte-sdk/lib/core/rtc/type");
76
+ var _type = require("fcr-core/lib/type");
81
77
  var _annotationProvider = require("../../providers/annotation-provider");
82
78
  var _mobx = require("mobx");
83
79
  var _fcrCore = require("fcr-core");
84
80
  var _type2 = require("fcr-core/lib/room-control/sharing-control/type");
85
81
  var _i18n = require("agora-ui-foundation/lib/i18n");
86
82
  var _logger = require("../../utilities/logger");
87
- var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
88
83
  var _env = require("agora-foundation/lib/utilities/env");
89
84
  var _type3 = require("../whiteboard/type");
90
- var _type4 = require("fcr-core/lib/type");
91
85
  var _annotationToolbarStore = require("./annotation-toolbar-store");
86
+ var _sharedStorage = require("../../utilities/shared-storage");
92
87
  var _AnnotationStore;
93
- var _initProto, _init_receiverAllOpenStateReady, _handleReceiverBoardDecs, _handleBoardDomLoadDecs, _handleBoardContainerDomLoadDecs, _annotationaEndEffectThenCloseBoardDecs, _mountDecs, _unmountDecs, _annotationStartTriggerEffectDecs, _ref;
94
- function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
95
- function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
96
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
97
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
98
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
88
+ var _initProto, _handleBoardDomLoadDecs, _closeAnnotationDecs, _mountDecs, _ref;
99
89
  function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
100
90
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
101
91
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
102
92
  function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
103
93
  function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
104
- var _A = /*#__PURE__*/new WeakMap();
105
- _ref = (_handleReceiverBoardDecs = [_mobx.action, _mobx.action.bound], _handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _handleBoardContainerDomLoadDecs = [_mobx.action, _mobx.action.bound], _annotationaEndEffectThenCloseBoardDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _annotationStartTriggerEffectDecs = [_mobx.action, _mobx.action.bound], "logger");
94
+ _ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeAnnotationDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], "logger");
106
95
  var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
107
96
  function AnnotationStore(_ref2) {
108
97
  var _this = this;
@@ -115,21 +104,20 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
115
104
  sharedScreenSharedDataSource = _ref2.sharedScreenSharedDataSource,
116
105
  privilegeProvider = _ref2.privilegeProvider,
117
106
  messageProvider = _ref2.messageProvider,
118
- localStorageProvider = _ref2.localStorageProvider,
119
107
  eventProvider = _ref2.eventProvider,
120
108
  abilityProvider = _ref2.abilityProvider,
121
- sharedAnnotationDataSource = _ref2.sharedAnnotationDataSource;
109
+ sharedAnnotationDataSource = _ref2.sharedAnnotationDataSource,
110
+ sharedConfigDataSource = _ref2.sharedConfigDataSource;
122
111
  (0, _classCallCheck2["default"])(this, AnnotationStore);
123
112
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
124
113
  prefix: 'AnnotationStore'
125
114
  })));
126
115
  (0, _defineProperty2["default"])(this, "_disposers", []);
127
- (0, _defineProperty2["default"])(this, "_annotationControl", undefined);
128
116
  (0, _defineProperty2["default"])(this, "_resizeWatcherTimer", null);
129
117
  (0, _defineProperty2["default"])(this, "_shareScreenOwnerId", '');
130
118
  (0, _defineProperty2["default"])(this, "_currentShareInfo", {
131
119
  id: '',
132
- type: _type.AgoraRtcScreenCaptureType.SCREEN,
120
+ type: _type.FcrScreenCaptureType.SCREEN,
133
121
  bounds: {
134
122
  x: 0,
135
123
  y: 0,
@@ -153,82 +141,52 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
153
141
  (0, _defineProperty2["default"])(this, "_annotationObserver", {
154
142
  onConnectionStateUpdated: this._handleOnAnnotationConnectionStateUpdated
155
143
  });
156
- // 接收端是否全部的前提工作都做完了,做完了,放出承载节点
157
- // 在承载节点的handleDomLoaded后,挂载白板
158
- _classPrivateFieldInitSpec(this, _A, _init_receiverAllOpenStateReady(this, false));
159
- (0, _defineProperty2["default"])(this, "_toolbarStore", undefined);
160
- (0, _defineProperty2["default"])(this, "_boardOriginWidth", 0);
161
144
  (0, _defineProperty2["default"])(this, "_prevSetLocalVideoSize", {
162
145
  width: 0,
163
146
  height: 0
164
147
  });
165
- (0, _defineProperty2["default"])(this, "_mounted", false);
166
148
  (0, _defineProperty2["default"])(this, "_streamObserver", {
167
- onLocalVideoStatsUpdated: this._handleOnLocalVideoStatsUpdated.bind(this)
149
+ onLocalVideoStatsUpdated: this._handleOnLocalVideoStatsUpdated
168
150
  });
169
- (0, _defineProperty2["default"])(this, "_annotationEndLock", null);
170
- localStorageProvider.write('annotation_nickname', memberDataSource.localUser.userName);
171
151
  this._dialogProvider = dialogProvider;
172
152
  this._annotationProvider = annotationProvider;
173
153
  this._sharingProvider = sharingProvider;
174
154
  this._memberDataSource = memberDataSource;
175
155
  this._roomControl = roomControl;
176
- this._streamControl = this._roomControl.getStreamControl();
177
- this._streamControl.addObserver(this._streamObserver);
178
156
  this._sharedSecuritySharedDataSource = sharedSecuritySharedDataSource;
179
157
  this._sharedScreenSharedDataSource = sharedScreenSharedDataSource;
180
- this._dialogProvider.addObserver(this._dialogObserver);
181
158
  this._privilegeProvider = privilegeProvider;
182
159
  this._messageProvider = messageProvider;
183
160
  this._eventProvider = eventProvider;
184
161
  this._abilityProvider = abilityProvider;
185
162
  this._sharedAnnotationDataSource = sharedAnnotationDataSource;
163
+ this._streamControl = this._roomControl.getStreamControl();
186
164
  this._sharingControl = this._sharingProvider.getSharingControl();
165
+ this._annotationControl = this._sharingProvider.getSharingControl().getAnnotationControl();
166
+ this._dialogProvider.addObserver(this._dialogObserver);
167
+ this._streamControl.addObserver(this._streamObserver);
187
168
  this._sharingControl.addObserver(this._sharingObserver);
188
- this._getCurrentAnnotationControl();
189
- var exitScreenShareOwner = this._sharedScreenSharedDataSource.screenSharingOwner;
190
- if (exitScreenShareOwner) {
191
- this._shareScreenOwnerId = exitScreenShareOwner.userId;
192
- if (this._sharingControl.getScreenSharingState() === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION) {
193
- this._annotationReceiverMainStart();
169
+ this._annotationControl.addObserver(this._annotationObserver);
170
+ this._toolbarStore = new _annotationToolbarStore.AnnotationReceiverToolbarStore(this._annotationControl, this._roomControl, this._eventProvider, this._sharedAnnotationDataSource);
171
+ var screenSharingOwner = this._sharedScreenSharedDataSource.screenSharingOwner;
172
+ var screenShareOwnerExists = !!screenSharingOwner;
173
+ var isAnnotationActive = this._sharingControl.getScreenSharingState() === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION;
174
+ if (screenShareOwnerExists) {
175
+ this._shareScreenOwnerId = screenSharingOwner.userId;
176
+ if (isAnnotationActive) {
177
+ this._openAnnotation();
194
178
  }
195
179
  }
196
- this._disposers.push(
197
- // reaction(
198
- // () => this.annotating,
199
- // (annotating) => {
200
- // if (this._isLocalUserSharingOwner) {
201
- // if (annotating) {
202
- // this._removeWindowResizeListenner();
203
- // } else {
204
- // this._addWindowResizeListenner();
205
- // }
206
- // }
207
- // },
208
- // ),
209
- // reaction(
210
- // () => this._sharedScreenSharedDataSource.screenShareVideoRatio,
211
- // (ratio) => {
212
- // if (ratio > 0) {
213
- // this.handleReceiverBoard(ratio);
214
- // }
215
- // },
216
- // ),
217
- (0, _mobx.reaction)(function () {
180
+ this._disposers.push((0, _mobx.reaction)(function () {
218
181
  return _this.sharingInReplace;
219
182
  }, function (sharingInReplace) {
220
183
  // web 被替换时不需要走这个逻辑
221
184
  if (sharingInReplace && (0, _env.isElectron)() && _this._isLocalUserSharingOwner) {
222
- // await new Promise((resolve) => {
223
- // // 延迟两秒,等待标注内容清理,清理方法在 sdk 中虽然看起来是同步的,但是实际上会有无法清理的情况出现
224
- // sendEvent({ action: ToolbarEvents.CLEAN, payload: null });
225
- // setTimeout(() => resolve(true), 1000);
226
- // });
227
185
  (0, _rendererEvent.sendEvent)({
228
186
  action: _type3.ToolbarEvents.CLEAN,
229
187
  payload: null
230
188
  });
231
- _this.logger.info("[Annotation]: sharingInReplace changed to ".concat(sharingInReplace, ", currentShareInfo is ").concat(JSON.stringify(_this._currentShareInfo)));
189
+ _this.logger.info("sharingInReplace changed to ".concat(sharingInReplace, ", currentShareInfo is ").concat(JSON.stringify(_this._currentShareInfo)));
232
190
  _this._removeWindowResizeListenner();
233
191
  _this._annotationProvider.hideAnnotationWindow();
234
192
  _this._annotationProvider.setBoundsToAnnotationWindow();
@@ -236,19 +194,11 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
236
194
  return _this.screenSharingStarted(true);
237
195
  }, 200);
238
196
  }
239
- }), (0, _mobx.reaction)(function () {
240
- return _this.annotationHasStart;
241
- }, function (hasStart) {
242
- if (hasStart && !_this._isLocalUserSharingOwner) {
243
- /** 不是发起端并且annotation白板变为了连接状态 */
244
- _this.logger.info('[Annotation] start step2 ===> annotation board has connected, then we trigger effect');
245
- _this._annotationStartTriggerEffect();
246
- }
247
197
  }), (0, _mobx.reaction)(function () {
248
198
  return _this._sharedScreenSharedDataSource.localUserScreenSharingState;
249
199
  }, function (state) {
250
200
  if (state === _fcrCore.FcrMediaSourceState.CLOSE && _this._isLocalUserSharingOwner) {
251
- _this.logger.info('[Annotation]: localUserScreenSharingState is close, isReplaceScreen is ', _this.sharingInReplace);
201
+ _this.logger.info('localUserScreenSharingState is close, isReplaceScreen is ', _this.sharingInReplace);
252
202
  if (!_this.sharingInReplace && (0, _env.isElectron)()) {
253
203
  _this._annotationProvider.closeAnnotationWindow();
254
204
  _this._removeWindowResizeListenner();
@@ -265,24 +215,16 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
265
215
  });
266
216
  }
267
217
  if (!canWrite) {
268
- _this._setIsShowToolbar(false);
218
+ _this._annotationProvider.setIsShowToolbar(false);
269
219
  }
270
- }), (0, _mobx.reaction)(function () {
271
- return _this.isShowToolbar;
272
- }, function (isShow) {
273
- var _this$_toolbarStore;
274
- (_this$_toolbarStore = _this._toolbarStore) === null || _this$_toolbarStore === void 0 || _this$_toolbarStore.resetToolbarVars();
275
220
  }));
221
+ (0, _sharedStorage.setAnnotationRtmAppId)(sharedConfigDataSource.creatorConfig.appId);
222
+ (0, _sharedStorage.setAnnotationNickName)(memberDataSource.localUser.userName);
223
+
224
+ // @ts-ignore
225
+ window._annotationStore = this;
276
226
  }
277
227
  return (0, _createClass2["default"])(AnnotationStore, [{
278
- key: "receiverAllOpenStateReady",
279
- get: function get() {
280
- return _classPrivateFieldGet(_A, this);
281
- },
282
- set: function set(v) {
283
- _classPrivateFieldSet(_A, this, v);
284
- }
285
- }, {
286
228
  key: "screenShareVideoRatio",
287
229
  get: function get() {
288
230
  return this._sharedScreenSharedDataSource.screenShareVideoRatio;
@@ -386,239 +328,127 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
386
328
  }, {
387
329
  key: "currentTool",
388
330
  get: function get() {
389
- var _this$_toolbarStore2;
390
- return (_this$_toolbarStore2 = this._toolbarStore) === null || _this$_toolbarStore2 === void 0 ? void 0 : _this$_toolbarStore2.observables.currentTool;
331
+ var _this$_toolbarStore;
332
+ return (_this$_toolbarStore = this._toolbarStore) === null || _this$_toolbarStore === void 0 ? void 0 : _this$_toolbarStore.observables.currentTool;
391
333
  }
392
334
  }, {
393
335
  key: "boardMainWindow",
394
336
  get: function get() {
395
337
  return this._sharedAnnotationDataSource.boardMainWindow;
396
338
  }
397
- }, {
398
- key: "handleReceiverBoard",
399
- value: function handleReceiverBoard(paramRatio) {
400
- if (this._boardContainerDom && this._boardDom) {
401
- var _this$boardMainWindow;
402
- var _this$_boardContainer = this._boardContainerDom.getBoundingClientRect(),
403
- height = _this$_boardContainer.height;
404
- var ratio = (0, _isNumber["default"])(paramRatio) ? paramRatio : this._sharedScreenSharedDataSource.screenShareVideoRatio;
405
- var newWidth = height * ratio;
406
- this._boardOriginWidth = newWidth;
407
- this._boardDom.style.width = "".concat(newWidth, "px");
408
- this._boardDom.style.height = "".concat(height, "px");
409
- (_this$boardMainWindow = this.boardMainWindow) === null || _this$boardMainWindow === void 0 || _this$boardMainWindow.updateWindowSize({
410
- width: newWidth,
411
- height: height
412
- });
413
- this.logger.info("[Annotation] [drawReceiverBoard] ratio: ".concat(ratio, ", width: ").concat(newWidth, " , height: ").concat(height));
414
- }
415
- }
416
339
  }, {
417
340
  key: "handleBoardDomLoad",
418
341
  value: function handleBoardDomLoad(ref) {
342
+ var isDomChanged = this._boardDom !== ref;
419
343
  this._boardDom = ref;
420
- if (this._boardDom) {
421
- // const { height } = this._boardDom.getBoundingClientRect();
422
- // const haveCanUseBackup = this._checkSharingwindowBackupSize();
423
- // if (this._boardOriginWidth === 0 && haveCanUseBackup) {
424
- // this._setBoardDomWithBackupWindowSize(height);
425
- // } else {
426
- // this._boardOriginWidth = height * this._sharedScreenSharedDataSource.screenShareVideoRatio;
427
- // }
428
- this._mount();
429
- } else {
430
- this._mounted = false;
431
- this._boardOriginWidth = 0;
432
- }
433
- }
434
- }, {
435
- key: "handleBoardContainerDomLoad",
436
- value: function handleBoardContainerDomLoad(ref) {
437
- if (ref) {
438
- this._boardContainerDom = ref;
344
+ if (isDomChanged) {
345
+ if (ref) {
346
+ this._mount();
347
+ } else {
348
+ this.logger.info("board dom unmount");
349
+ }
439
350
  }
440
351
  }
441
352
  }, {
442
353
  key: "screenSharingStarted",
443
354
  value: function screenSharingStarted(isReplaceScreen) {
444
355
  this._currentShareInfo = this._annotationProvider.currentShareInfo;
445
- this.logger.info("[Annotation]: screenSharingStarting with currentShareInfo: ".concat(JSON.stringify(this._currentShareInfo)));
356
+ this.logger.info("screenSharingStarting with currentShareInfo: ".concat(JSON.stringify(this._currentShareInfo)));
446
357
  this._annotationProvider.setBoundsToAnnotationWindow();
447
358
  this._removeWindowResizeListenner();
448
359
  if (isReplaceScreen) {
449
360
  this._annotationProvider.showAnnotationWindow();
450
361
  } else {
451
362
  this._annotationProvider.openAnnotationWindow();
452
- this.logger.info('[Annotation]: screenSharingStarted will add window resize listenner');
363
+ this.logger.info('screenSharingStarted will add window resize listenner');
453
364
  }
454
- this._addWindowResizeListenner();
365
+ this._addWindowResizeListener();
455
366
  }
456
367
  }, {
457
368
  key: "release",
458
369
  value: function release() {
459
- this._annotationaEndEffectThenCloseBoard();
370
+ this._closeAnnotation();
371
+ this._removeWindowResizeListenner();
460
372
  this._disposers.forEach(function (disposer) {
461
373
  return disposer();
462
374
  });
463
375
  this._dialogProvider.removeObserver(this._dialogObserver);
464
376
  this._streamControl.removeObserver(this._streamObserver);
465
377
  this._sharingControl.removeObserver(this._sharingObserver);
466
- this._clearCurrentAnnotationControl();
467
- this._removeWindowResizeListenner();
468
- }
469
- }, {
470
- key: "_clearCurrentAnnotationControl",
471
- value: function _clearCurrentAnnotationControl() {
472
- if (this._annotationControl) {
473
- this._annotationControl.removeObserver(this._annotationObserver);
474
- this._annotationControl = undefined;
475
- }
378
+ this._annotationControl.removeObserver(this._annotationObserver);
379
+ this._toolbarStore.release();
476
380
  }
477
381
  }, {
478
- key: "_getCurrentAnnotationControl",
479
- value: function _getCurrentAnnotationControl() {
480
- this._clearCurrentAnnotationControl();
481
- var newAnnotationControl = this._sharingProvider.getSharingControl().getAnnotationControl();
482
- this._annotationControl = newAnnotationControl;
483
- newAnnotationControl === null || newAnnotationControl === void 0 || newAnnotationControl.addObserver(this._annotationObserver);
484
- return this._annotationControl;
485
- }
486
-
487
- /**
488
- * 根据 发起屏幕共享状态,是startOnlyScreen,且自己本人是发起端
489
- * 则发起端: 同步bounds与updateViewPort并进行打开fragment
490
- */
491
- }, {
492
- key: "_annotationSenderMainStart",
493
- value: (function () {
494
- var _annotationSenderMainStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
382
+ key: "_startShareScreen",
383
+ value: function () {
384
+ var _startShareScreen2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
495
385
  return _regenerator["default"].wrap(function (_context) {
496
386
  while (1) switch (_context.prev = _context.next) {
497
387
  case 0:
498
388
  this.logger.info('annotation sender main start');
499
- if (!this._isLocalUserSharingOwner) {
500
- _context.next = 2;
501
- break;
502
- }
503
- if (!this._annotationEndLock) {
504
- _context.next = 1;
505
- break;
389
+ if (this._isLocalUserSharingOwner) {
390
+ this.logger.info('annotation sender main start in sender branch');
391
+ this.screenSharingStarted(false);
506
392
  }
507
- this.logger.info('annotation sender main start in await lock');
508
- _context.next = 1;
509
- return this._annotationEndLock;
510
393
  case 1:
511
- this.logger.info('annotation sender main start in sender branch');
512
- this.screenSharingStarted(false);
513
- case 2:
514
394
  case "end":
515
395
  return _context.stop();
516
396
  }
517
397
  }, _callee, this);
518
398
  }));
519
- function _annotationSenderMainStart() {
520
- return _annotationSenderMainStart2.apply(this, arguments);
399
+ function _startShareScreen() {
400
+ return _startShareScreen2.apply(this, arguments);
521
401
  }
522
- return _annotationSenderMainStart;
402
+ return _startShareScreen;
523
403
  }()
524
- /**
525
- * 根据 发起屏幕共享状态中包含startWithAnnotation,
526
- * 则接收端:1.去进行 step1 连接白板 2.在连接完成的状态后并拿到boardMainWindow后,进行 step2 后置的 工具栏初始化 + 白板尺寸修正(过期)
527
- */
528
- )
529
- }, {
530
- key: "_annotationReceiverMainStart",
531
- value: (function () {
532
- var _annotationReceiverMainStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
404
+ }, {
405
+ key: "_openAnnotation",
406
+ value: function () {
407
+ var _openAnnotation2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
408
+ var screenShareOwnerId, localUserId, canStartAnnotation;
533
409
  return _regenerator["default"].wrap(function (_context2) {
534
410
  while (1) switch (_context2.prev = _context2.next) {
535
411
  case 0:
536
- this.logger.info('[Annotation] receiver main start');
537
- if (this._isLocalUserSharingOwner) {
538
- _context2.next = 2;
539
- break;
540
- }
541
- if (!this._annotationEndLock) {
542
- _context2.next = 1;
543
- break;
412
+ if (!this._isLocalUserSharingOwner) {
413
+ screenShareOwnerId = this._shareScreenOwnerId;
414
+ localUserId = this._memberDataSource.localUser.userId;
415
+ canStartAnnotation = this._checkIfAnnotationCanStart();
416
+ this.logger.info("can start annotation: ".concat(canStartAnnotation));
417
+ if (canStartAnnotation && screenShareOwnerId !== localUserId) {
418
+ this._annotationControl.open();
419
+ }
544
420
  }
545
- this.logger.info('[Annotation] receiver main start in await lock');
546
- _context2.next = 1;
547
- return this._annotationEndLock;
548
421
  case 1:
549
- this.logger.info('[Annotation] receiver main start in receiver branch');
550
- this._connectAnnotaionBoard(this._shareScreenOwnerId);
551
- case 2:
552
422
  case "end":
553
423
  return _context2.stop();
554
424
  }
555
425
  }, _callee2, this);
556
426
  }));
557
- function _annotationReceiverMainStart() {
558
- return _annotationReceiverMainStart2.apply(this, arguments);
427
+ function _openAnnotation() {
428
+ return _openAnnotation2.apply(this, arguments);
559
429
  }
560
- return _annotationReceiverMainStart;
430
+ return _openAnnotation;
561
431
  }()
562
- /**
563
- * 根据 1.白板的连接状态变为未连接状态 2.屏幕共享结束后
564
- * 进行后置的 工具栏,画布清理和toast提示 + 关闭白板卸载节点的操作
565
- */
566
- )
567
- }, {
568
- key: "_annotationaEndEffectThenCloseBoard",
569
- value: function _annotationaEndEffectThenCloseBoard() {
570
- var _this2 = this;
571
- this._annotationEndLock = new Promise(function (resolve) {
572
- try {
573
- var _this2$_toolbarStore;
574
- (_this2$_toolbarStore = _this2._toolbarStore) === null || _this2$_toolbarStore === void 0 || _this2$_toolbarStore.resetToolbarVars();
575
- _this2._messageProvider.showToast({
576
- message: (0, _i18n.transI18n)('fmt_screenshare_toast_annotation_controls_screen_sharing_disabled'),
577
- type: 'info'
578
- });
579
- _this2._setIsShowToolbar(false);
580
- _this2._clearAnnotationWhiteboardToolbar();
581
- _this2._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
582
- _this2._unmount();
583
- } catch (e) {} finally {
584
- console.log('[Annotation]: annotation receiver end resolve');
585
- resolve();
586
- }
587
- });
588
- }
589
432
  }, {
590
- key: "_setIsShowToolbar",
591
- value: function _setIsShowToolbar(isShow) {
592
- this._annotationProvider.setIsShowToolbar(isShow);
433
+ key: "_closeAnnotation",
434
+ value: function _closeAnnotation() {
435
+ this._toolbarStore.resetToolbarVars();
436
+ this._annotationProvider.setIsShowToolbar(false);
437
+ this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
438
+ this._annotationControl.close();
593
439
  }
594
440
  }, {
595
441
  key: "_mount",
596
442
  value: function _mount() {
597
- if (this.boardMainWindow && this._boardDom && !this._mounted) {
598
- var _this$_toolbarStore3;
599
- this._mounted = true;
443
+ this.logger.info("start mount, board main window exists: ".concat(!!this.boardMainWindow, ", dom exists: ").concat(!!this._boardDom));
444
+ if (this.boardMainWindow && this._boardDom) {
445
+ if (this._boardDom.hasChildNodes()) {
446
+ this.logger.warn('mount board main window while board dom is not empty, clear it');
447
+ this._boardDom.innerHTML = '';
448
+ }
600
449
  var view = this.boardMainWindow.getContentView();
601
450
  this._boardDom.appendChild(view);
602
- (_this$_toolbarStore3 = this._toolbarStore) === null || _this$_toolbarStore3 === void 0 || _this$_toolbarStore3.resetToolbarVars();
603
- }
604
- }
605
- }, {
606
- key: "_unmount",
607
- value: function _unmount() {
608
- this.logger.info('[Annotation] unmount ');
609
- if (this._mounted && this.boardMainWindow) {
610
- this._deleteBoardDomContent();
611
- this.logger.info('[Annotation] unmount remove mainWindow contentView');
612
- this._close();
613
- }
614
- this._mounted = false;
615
- }
616
- }, {
617
- key: "_close",
618
- value: function _close() {
619
- if (this._annotationControl) {
620
- this.logger.info('[Annotation] core close');
621
- this._annotationControl.close();
451
+ this.logger.info('finished mount mainWindow contentView');
622
452
  }
623
453
  }
624
454
  }, {
@@ -644,7 +474,7 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
644
474
  key: "_updateAnnotationBounds",
645
475
  value: function _updateAnnotationBounds(bounds) {
646
476
  if (bounds) this._currentShareInfo.bounds = bounds;
647
- this.logger.info("[Annotation][updateAnnotationBounds]: bounds: ".concat(JSON.stringify(bounds), ", currentShareInfo: ").concat(JSON.stringify(this._currentShareInfo)));
477
+ this.logger.info("update annotation bounds: ".concat(JSON.stringify(bounds), ", currentShareInfo: ").concat(JSON.stringify(this._currentShareInfo)));
648
478
  (0, _rendererEvent.sendEvent)({
649
479
  action: _constant.FcrUIRendererEventAction.SET_CURRENT_SHARE_SCREEN_BOUNDS,
650
480
  payload: bounds || this._annotationProvider.currentShareInfo.bounds
@@ -655,10 +485,10 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
655
485
  }, {
656
486
  key: "_updateBoundsByActiveWindow",
657
487
  value: function _updateBoundsByActiveWindow() {
658
- var _this3 = this;
488
+ var _this2 = this;
659
489
  var windows = window.runtime.getWindows();
660
490
  var activeWindow = windows.find(function (win) {
661
- return win.id === +_this3._currentShareInfo.id;
491
+ return win.id === +_this2._currentShareInfo.id;
662
492
  });
663
493
  var _this$_currentShareIn = this._currentShareInfo,
664
494
  id = _this$_currentShareIn.id,
@@ -675,86 +505,32 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
675
505
  ax = _ref3.x,
676
506
  ay = _ref3.y;
677
507
  var isNewBounds = aw !== width || ah !== height || ax !== x || ay !== y;
678
- // this.logger.info(
679
- // `updateBoundsByActiveWindow ${JSON.stringify({
680
- // activeBounds,
681
- // width,
682
- // height,
683
- // isSharingWindow,
684
- // isNewBounds,
685
- // activeWindow,
686
- // id,
687
- // })}`,
688
- // );
689
508
  if (isSharingWindow && isNewBounds) {
690
509
  this._updateAnnotationBounds(activeBounds);
691
- // this.logger.info('The window bounds is the different as the current share bounds');
692
510
  }
693
511
  }
694
512
  }, {
695
- key: "_addWindowResizeListenner",
696
- value: function _addWindowResizeListenner() {
697
- var _this4 = this;
698
- if (!this._resizeWatcherTimer && (0, _env.isElectron)()) {
699
- this._resizeWatcherTimer = setInterval(function () {
700
- // this.logger.info(`addWindowResizeListenner interval ${this._currentShareInfo}`);
701
- _this4._updateBoundsByActiveWindow();
702
- }, 2000);
703
- }
513
+ key: "_addWindowResizeListener",
514
+ value: function _addWindowResizeListener() {
515
+ // if (!this._resizeWatcherTimer && isElectron()) {
516
+ // this._resizeWatcherTimer = setInterval(() => {
517
+ // this._updateBoundsByActiveWindow();
518
+ // }, 2000);
519
+ // }
704
520
  }
705
521
  }, {
706
522
  key: "_removeWindowResizeListenner",
707
523
  value: function _removeWindowResizeListenner() {
708
- if (this._resizeWatcherTimer && (0, _env.isElectron)()) {
709
- clearInterval(this._resizeWatcherTimer);
710
- this._resizeWatcherTimer = null;
711
- }
712
- }
713
- }, {
714
- key: "_checkSharingwindowBackupSize",
715
- value: function _checkSharingwindowBackupSize() {
716
- var size = this._sharingProvider.getSharingControl().getSharingWindowSize();
717
- this.logger.info('[Annotation][checkSharingwindowBackupSize] default size: ', size);
718
- return !!(size && size.width > 0 && size.height > 0);
719
- }
720
- }, {
721
- key: "_setBoardDomWithBackupWindowSize",
722
- value: function _setBoardDomWithBackupWindowSize(containerHeight) {
723
- var size = this._sharingProvider.getSharingControl().getSharingWindowSize();
724
- var getWidth = size.width;
725
- var getHeight = size.height;
726
- var ratio = getWidth / getHeight;
727
- var newWidth = containerHeight * ratio;
728
- this._boardOriginWidth = newWidth;
729
- if (this._boardDom) {
730
- var _this$boardMainWindow2;
731
- this._boardDom.style.width = "".concat(newWidth, "px");
732
- this._boardDom.style.height = "".concat(containerHeight, "px");
733
- (_this$boardMainWindow2 = this.boardMainWindow) === null || _this$boardMainWindow2 === void 0 || _this$boardMainWindow2.updateWindowSize({
734
- width: newWidth,
735
- height: containerHeight
736
- });
737
- }
738
- }
739
- }, {
740
- key: "_renewAnnotationWhiteboardToolbar",
741
- value: function _renewAnnotationWhiteboardToolbar() {
742
- this._toolbarStore = new _annotationToolbarStore.AnnotationReceiverToolbarStore(this._annotationControl, this._roomControl, this._annotationProvider, this._eventProvider, this._sharedAnnotationDataSource);
743
- this.logger.info('[Annotation][renewAnnotationWhiteboardToolbar] is done');
744
- this.receiverAllOpenStateReady = true;
745
- }
746
- }, {
747
- key: "_clearAnnotationWhiteboardToolbar",
748
- value: function _clearAnnotationWhiteboardToolbar() {
749
- this._toolbarStore = undefined;
750
- this.logger.info('[Annotation][clearAnnotationWhiteboardToolbar] is done');
751
- this.receiverAllOpenStateReady = false;
524
+ // if (this._resizeWatcherTimer && isElectron()) {
525
+ // clearInterval(this._resizeWatcherTimer);
526
+ // this._resizeWatcherTimer = null;
527
+ // }
752
528
  }
753
529
  }, {
754
- key: "_participantShareCanWeAnnotation",
755
- value: function _participantShareCanWeAnnotation() {
530
+ key: "_checkIfAnnotationCanStart",
531
+ value: function _checkIfAnnotationCanStart() {
756
532
  var streams = this._streamControl.getStreams();
757
- var _notSupportPlatform = [_type4.FcrPlatform.WEB_DESKTOP, _type4.FcrPlatform.WEB_MOBILE, _type4.FcrPlatform.IOS];
533
+ var notSupportPlatform = [_type.FcrPlatform.WEB_DESKTOP, _type.FcrPlatform.WEB_MOBILE, _type.FcrPlatform.IOS];
758
534
  var streamLists = Object.keys(streams).map(function (key) {
759
535
  return streams[key];
760
536
  });
@@ -765,9 +541,10 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
765
541
  }).filter(Boolean);
766
542
  if (screenShareStreams.length > 0) {
767
543
  var screenShareOwnerInfo = screenShareStreams[0];
768
- var _participantPlatform = screenShareOwnerInfo === null || screenShareOwnerInfo === void 0 ? void 0 : screenShareOwnerInfo.owner.platform;
769
- this.logger.info("[Annotation] current share participant platform: ".concat(_participantPlatform));
770
- if (typeof _participantPlatform !== 'undefined' && !_notSupportPlatform.includes(_participantPlatform)) {
544
+ var participantPlatform = screenShareOwnerInfo.owner.platform;
545
+ this.logger.info("current share participant platform: ".concat(participantPlatform));
546
+ notSupportPlatform.includes(participantPlatform);
547
+ if (!notSupportPlatform.includes(participantPlatform)) {
771
548
  return true;
772
549
  } else {
773
550
  return false;
@@ -775,90 +552,30 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
775
552
  }
776
553
  return false;
777
554
  }
778
-
779
- /**
780
- * 接收端step1
781
- * 判断状态,打开批注(core: 进入房间,初始化白板APP)
782
- */
783
- }, {
784
- key: "_connectAnnotaionBoard",
785
- value: function _connectAnnotaionBoard(screenShareOwnerId) {
786
- if (this._participantShareCanWeAnnotation()) {
787
- this.logger.info('[Annotation] we can receive annotation from share platform');
788
- this._getCurrentAnnotationControl();
789
- if (this._annotationControl) {
790
- if (screenShareOwnerId !== this._memberDataSource.localUser.userId) {
791
- this._deleteBoardDomContent();
792
- this.logger.info('[Annotation] start step1 == > receiver enter core open');
793
- this._annotationControl.open();
794
- }
795
- }
796
- }
797
- }
798
-
799
- /**
800
- * 接收端step2
801
- * 白板连接成功,进行后置副作用操作
802
- */
803
- }, {
804
- key: "_annotationStartTriggerEffect",
805
- value: (function () {
806
- var _annotationStartTriggerEffect2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
807
- return _regenerator["default"].wrap(function (_context3) {
808
- while (1) switch (_context3.prev = _context3.next) {
809
- case 0:
810
- if (!this._annotationEndLock) {
811
- _context3.next = 1;
812
- break;
813
- }
814
- this.logger.info('annotation start in await lock');
815
- _context3.next = 1;
816
- return this._annotationEndLock;
817
- case 1:
818
- this.logger.info('annotation start after await lock');
819
- this._renewAnnotationWhiteboardToolbar();
820
- case 2:
821
- case "end":
822
- return _context3.stop();
823
- }
824
- }, _callee3, this);
825
- }));
826
- function _annotationStartTriggerEffect() {
827
- return _annotationStartTriggerEffect2.apply(this, arguments);
828
- }
829
- return _annotationStartTriggerEffect;
830
- }())
831
555
  }, {
832
556
  key: "_handleOnScreenSharingUpdated",
833
557
  value: function _handleOnScreenSharingUpdated(ownerStream, state) {
834
558
  this._shareScreenOwnerId = (ownerStream === null || ownerStream === void 0 ? void 0 : ownerStream.owner.userId) || '';
835
- // if (state === FcrScreenSharingState.START_WHIT_ANNOTATION) {
836
- // this.logger.info('[Annotation] transaction main start');
837
- // this._annotationMainStart();
838
- // } else {
839
- // this.logger.info('[Annotation] main end , because current sharing not with annotation');
840
- // if (this._isLocalUserSharingOwner) {
841
- // /** 屏幕共享的状态没有包含批注,当前是发起者,则关闭fragment */
842
- // this._annotationProvider.closeAnnotationWindow();
843
- // } else {
844
- // /** 屏幕共享的状态没有包含批注,接收端进行总体的关闭 */
845
- // this._annotationaEndEffectThenCloseBoard();
846
- // }
847
- // }
848
559
  if (state === _type2.FcrScreenSharingState.START_ONLY_SCREEN) {
849
- this.logger.info('[Annotation] sender transaction main start');
850
- this._annotationSenderMainStart();
851
- } else if (state === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION) {
852
- this.logger.info('[Annotation] receiver transaction main start');
853
- this._annotationReceiverMainStart();
854
- } else if (state === _type2.FcrScreenSharingState.END) {
855
- this.logger.info('[Annotation] main end , because current sharing not with annotation');
560
+ this._startShareScreen();
561
+ }
562
+ if (state === _type2.FcrScreenSharingState.START_WHIT_ANNOTATION) {
563
+ this._openAnnotation();
564
+ }
565
+ if (state === _type2.FcrScreenSharingState.END) {
566
+ this.logger.info("annotation state chagned to ends, is local user sharing owner: ".concat(this._isLocalUserSharingOwner));
856
567
  if (this._isLocalUserSharingOwner) {
857
568
  /** 屏幕共享的状态没有包含批注,当前是发起者,则关闭fragment */
858
569
  this._annotationProvider.closeAnnotationWindow();
859
570
  } else {
860
571
  /** 屏幕共享的状态没有包含批注,接收端进行总体的关闭 */
861
- this._annotationaEndEffectThenCloseBoard();
572
+ this._closeAnnotation();
573
+ if (state === _type2.FcrScreenSharingState.END) {
574
+ this._messageProvider.showToast({
575
+ message: (0, _i18n.transI18n)('fmt_screenshare_toast_annotation_controls_screen_sharing_disabled'),
576
+ type: 'info'
577
+ });
578
+ }
862
579
  }
863
580
  }
864
581
  }
@@ -866,40 +583,38 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
866
583
  key: "_handleOnAnnotationConnectionStateUpdated",
867
584
  value: function _handleOnAnnotationConnectionStateUpdated(state) {
868
585
  if (state === _fcrCore.FcrConnectionState.CONNECTED) {
869
- var _this$_annotationCont;
870
- var mainWindow = (_this$_annotationCont = this._annotationControl) === null || _this$_annotationCont === void 0 ? void 0 : _this$_annotationCont.getMainWindow();
871
- this.logger.info("[Annotation] annotation board connected, we get boardMainWindow in callback!");
586
+ var mainWindow = this._annotationControl.getMainWindow();
587
+ if (!mainWindow) {
588
+ this.logger.error('main window is not available');
589
+ return;
590
+ }
872
591
  this._sharedAnnotationDataSource.setBoardMainWindow(mainWindow);
873
592
  this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.START);
593
+ this._mount();
594
+ this._resetAnnotationToolbarState();
874
595
  } else {
875
- if (state === _fcrCore.FcrConnectionState.DISCONNECTED || state === _fcrCore.FcrConnectionState.ABORTED) {
876
- this.logger.info('[Annotation] main end because annotation board not connected');
877
- /** 批注白板的连接状态没有连接成功,进行总体的关闭 */
878
- this._annotationaEndEffectThenCloseBoard();
879
- }
880
- this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
881
- }
882
- }
883
- }, {
884
- key: "_deleteBoardDomContent",
885
- value: function _deleteBoardDomContent() {
886
- if (this._boardDom && this.boardMainWindow) {
887
- this.logger.info('[Annotation] delete old boardMainWindow');
888
- this._boardDom.removeChild(this.boardMainWindow.getContentView());
889
596
  this._sharedAnnotationDataSource.setBoardMainWindow(null);
597
+ this._sharedAnnotationDataSource.setAnnotationState(_annotationProvider.FcrAnnotationState.END);
890
598
  }
891
599
  }
892
600
  }, {
893
601
  key: "syncScreenShareOwnerOpenDone",
894
602
  value: function syncScreenShareOwnerOpenDone() {
895
- var _this$_annotationCont2;
896
- this.logger.info('[Annotation] syncScreenShareOwnerOpenDone');
897
- (_this$_annotationCont2 = this._annotationControl) === null || _this$_annotationCont2 === void 0 || _this$_annotationCont2.syncScreenShareOwnerAnnotationOpenDone();
603
+ this.logger.info('syncScreenShareOwnerOpenDone');
604
+ this._annotationControl.syncScreenShareOwnerAnnotationOpenDone();
605
+ }
606
+ }, {
607
+ key: "_resetAnnotationToolbarState",
608
+ value: function _resetAnnotationToolbarState() {
609
+ if (this._toolbarStore) {
610
+ this._toolbarStore.resetToolbarVars();
611
+ } else {
612
+ this.logger.error('resetAnnotationToolbarState failed, toolbarStore is undefined');
613
+ }
898
614
  }
899
615
  }]);
900
616
  }();
901
617
  _AnnotationStore = AnnotationStore;
902
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.observable, 1, "receiverAllOpenStateReady"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "annotating"], [_decorator.bound, 2, "isAnnotationSupported"], [_decorator.bound, 2, "getToolbarStore"], [_handleReceiverBoardDecs, 18, "handleReceiverBoard"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_handleBoardContainerDomLoadDecs, 18, "handleBoardContainerDomLoad"], [_decorator.bound, 2, "screenSharingStarted"], [_decorator.bound, 2, "release"], [_decorator.bound, 2, "_clearCurrentAnnotationControl"], [_decorator.bound, 2, "_getCurrentAnnotationControl"], [_decorator.bound, 2, "_annotationSenderMainStart"], [_decorator.bound, 2, "_annotationReceiverMainStart"], [_annotationaEndEffectThenCloseBoardDecs, 18, "_annotationaEndEffectThenCloseBoard"], [_mountDecs, 18, "_mount"], [_unmountDecs, 18, "_unmount"], [_decorator.bound, 2, "_close"], [_decorator.bound, 2, "_handleOnLocalVideoStatsUpdated"], [_decorator.bound, 2, "_updateAnnotationBounds"], [_decorator.bound, 2, "_updateBoundsByActiveWindow"], [_decorator.bound, 2, "_addWindowResizeListenner"], [_decorator.bound, 2, "_removeWindowResizeListenner"], [_decorator.bound, 2, "_checkSharingwindowBackupSize"], [_decorator.bound, 2, "_setBoardDomWithBackupWindowSize"], [_decorator.bound, 2, "_renewAnnotationWhiteboardToolbar"], [_decorator.bound, 2, "_clearAnnotationWhiteboardToolbar"], [_decorator.bound, 2, "_participantShareCanWeAnnotation"], [_decorator.bound, 2, "_connectAnnotaionBoard"], [_annotationStartTriggerEffectDecs, 18, "_annotationStartTriggerEffect"], [_decorator.bound, 2, "_handleOnScreenSharingUpdated"], [_decorator.bound, 2, "_handleOnAnnotationConnectionStateUpdated"], [_decorator.bound, 2, "_deleteBoardDomContent"], [_decorator.bound, 2, "syncScreenShareOwnerOpenDone"]], []).e, 2);
903
- _init_receiverAllOpenStateReady = _applyDecs$e[0];
904
- _initProto = _applyDecs$e[1];
618
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "annotating"], [_decorator.bound, 2, "isAnnotationSupported"], [_decorator.bound, 2, "getToolbarStore"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_decorator.bound, 2, "screenSharingStarted"], [_decorator.bound, 2, "release"], [_decorator.bound, 2, "_startShareScreen"], [_decorator.bound, 2, "_openAnnotation"], [_closeAnnotationDecs, 18, "_closeAnnotation"], [_mountDecs, 18, "_mount"], [_decorator.bound, 2, "_handleOnLocalVideoStatsUpdated"], [_decorator.bound, 2, "_updateAnnotationBounds"], [_decorator.bound, 2, "_updateBoundsByActiveWindow"], [_decorator.bound, 2, "_addWindowResizeListener"], [_decorator.bound, 2, "_removeWindowResizeListenner"], [_decorator.bound, 2, "_checkIfAnnotationCanStart"], [_decorator.bound, 2, "_handleOnScreenSharingUpdated"], [_decorator.bound, 2, "_handleOnAnnotationConnectionStateUpdated"], [_decorator.bound, 2, "syncScreenShareOwnerOpenDone"]], []).e, 1);
619
+ _initProto = _applyDecs$e[0];
905
620
  var AnnotationStoreContext = exports.AnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)({});