fcr-ui-scene 3.6.2 → 3.6.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 (374) hide show
  1. package/lib/base.js +0 -3
  2. package/lib/creator.d.ts +1 -0
  3. package/lib/creator.js +63 -52
  4. package/lib/electron/app.js +33 -14
  5. package/lib/electron/bootstrap-dev.js +5 -3
  6. package/lib/electron/bootstrap-sdk.js +4 -10
  7. package/lib/electron/exit-codes.d.ts +14 -0
  8. package/lib/electron/exit-codes.js +22 -0
  9. package/lib/electron/injections.d.ts +3 -2
  10. package/lib/electron/injections.js +122 -124
  11. package/lib/electron/ipc/ipc.js +0 -1
  12. package/lib/electron/main.js +57 -12
  13. package/lib/electron/tools.js +0 -4
  14. package/lib/electron/window.js +1 -7
  15. package/lib/fragments/annotation/index.d.ts +1 -0
  16. package/lib/fragments/annotation/index.js +54 -40
  17. package/lib/fragments/annotation/store.d.ts +7 -2
  18. package/lib/fragments/annotation/store.js +181 -102
  19. package/lib/fragments/annotation/view.d.ts +1 -0
  20. package/lib/fragments/annotation/view.js +10 -2
  21. package/lib/modules/action-bar/components/apps/app-item/index.js +0 -2
  22. package/lib/modules/action-bar/components/apps/app-list.js +2 -5
  23. package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -3
  24. package/lib/modules/action-bar/components/apps/useWidgetList.js +2 -1
  25. package/lib/modules/action-bar/components/collapse/index.js +0 -4
  26. package/lib/modules/action-bar/components/item/index.js +0 -2
  27. package/lib/modules/action-bar/components/leave/index.js +0 -2
  28. package/lib/modules/action-bar/components/more/poppover-content.js +0 -4
  29. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +2 -1
  30. package/lib/modules/action-bar/components/notification-bar/index.js +0 -2
  31. package/lib/modules/action-bar/components/screen-share/index.js +0 -1
  32. package/lib/modules/action-bar/components/screen-share/submenu.js +0 -3
  33. package/lib/modules/action-bar/components/trigger-output-language/index.js +11 -14
  34. package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +8 -11
  35. package/lib/modules/action-bar/index.css +4 -0
  36. package/lib/modules/action-bar/index.js +1 -2
  37. package/lib/modules/action-bar/store.d.ts +1 -7
  38. package/lib/modules/action-bar/store.js +67 -118
  39. package/lib/modules/annotation/board-cursor.css +76 -0
  40. package/lib/modules/annotation/components/control-bar/index.js +43 -2
  41. package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +2 -1
  42. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +5 -2
  43. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -0
  44. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +11 -5
  45. package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +0 -2
  46. package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +1 -0
  47. package/lib/modules/annotation/components/toolbar/components/item/item.js +3 -2
  48. package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +1 -0
  49. package/lib/modules/annotation/components/toolbar/store.js +0 -1
  50. package/lib/modules/annotation/index.d.ts +4 -0
  51. package/lib/modules/annotation/index.js +3 -1
  52. package/lib/modules/annotation/store.d.ts +15 -5
  53. package/lib/modules/annotation/store.js +222 -205
  54. package/lib/modules/annotation/style.css +3 -3
  55. package/lib/modules/annotation/view.d.ts +1 -0
  56. package/lib/modules/annotation/view.js +26 -9
  57. package/lib/modules/audio-stream/index.js +0 -4
  58. package/lib/modules/chat/chat-room-store.js +6 -10
  59. package/lib/modules/chat/components/chat-bar/index.js +0 -2
  60. package/lib/modules/chat/components/chat-select/index.js +0 -1
  61. package/lib/modules/chat/components/chat-select/select-item/index.js +2 -5
  62. package/lib/modules/chat/components/message-list/index.js +1 -3
  63. package/lib/modules/chat/components/message-list/message-item/index.js +11 -13
  64. package/lib/modules/chat/index.js +13 -14
  65. package/lib/modules/chat/store.js +0 -1
  66. package/lib/modules/chat/view.js +11 -15
  67. package/lib/modules/components/annotation-menu/index.js +0 -3
  68. package/lib/modules/components/device-control/components/audio-menu/index.js +2 -1
  69. package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
  70. package/lib/modules/components/device-control/store.js +0 -1
  71. package/lib/modules/components/leave-meeting/components/assign-host.js +4 -5
  72. package/lib/modules/components/leave-meeting/store.js +11 -12
  73. package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +0 -1
  74. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +10 -4
  75. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +2 -2
  76. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -4
  77. package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -2
  78. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +3 -4
  79. package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +1 -2
  80. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +0 -3
  81. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +7 -34
  82. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +11 -3
  83. package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +0 -1
  84. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +8 -13
  85. package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +0 -1
  86. package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +0 -2
  87. package/lib/modules/components/member-window/components/member-actions/index.js +1 -33
  88. package/lib/modules/components/member-window/components/member-actions/provider.js +1 -2
  89. package/lib/modules/components/member-window/components/member-actions/store.d.ts +38 -1
  90. package/lib/modules/components/member-window/components/member-actions/store.js +120 -13
  91. package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +3 -0
  92. package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +16 -3
  93. package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
  94. package/lib/modules/components/member-window/components/video-player/index.js +3 -3
  95. package/lib/modules/components/member-window/index.css +37 -0
  96. package/lib/modules/components/member-window/index.js +1 -0
  97. package/lib/modules/components/security-menu/index.js +1 -4
  98. package/lib/modules/components/tab-frame/index.js +0 -4
  99. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -1
  100. package/lib/modules/connection-gateway/components/phone/index.js +5 -4
  101. package/lib/modules/connection-gateway/index.js +1 -2
  102. package/lib/modules/connection-gateway/store.js +23 -26
  103. package/lib/modules/control-bar/components/more-actions/index.js +0 -3
  104. package/lib/modules/control-bar/index.d.ts +0 -4
  105. package/lib/modules/control-bar/index.js +1 -34
  106. package/lib/modules/control-bar/store.d.ts +5 -6
  107. package/lib/modules/control-bar/store.js +70 -104
  108. package/lib/modules/control-bar/view.js +53 -13
  109. package/lib/modules/device-pretest/settings/beauty.js +1 -2
  110. package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
  111. package/lib/modules/device-pretest/store.js +2 -4
  112. package/lib/modules/dialog/components/control-bar/index.d.ts +0 -2
  113. package/lib/modules/dialog/components/control-bar/index.js +4 -6
  114. package/lib/modules/dialog/components/dialog-container/component/body.js +0 -2
  115. package/lib/modules/dialog/components/dialog-container/index.js +1 -2
  116. package/lib/modules/dialog/components/host-area-container/index.js +0 -3
  117. package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -2
  118. package/lib/modules/dialog/components/pre-setting-container/index.js +1 -2
  119. package/lib/modules/dialog/components/system-preference/index.js +2 -5
  120. package/lib/modules/dialog/components/video-window/index.js +0 -2
  121. package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -1
  122. package/lib/modules/dialog/hooks/useElectron.js +3 -4
  123. package/lib/modules/dialog/index.d.ts +0 -3
  124. package/lib/modules/dialog/index.js +2 -28
  125. package/lib/modules/dialog/store.d.ts +6 -8
  126. package/lib/modules/dialog/store.js +22 -60
  127. package/lib/modules/dialog/view.js +2 -1
  128. package/lib/modules/event-confirm/components/window/index.js +0 -2
  129. package/lib/modules/event-confirm/index.js +1 -2
  130. package/lib/modules/event-confirm/store.js +4 -7
  131. package/lib/modules/event-confirm/view.js +2 -1
  132. package/lib/modules/event-sound/index.js +1 -2
  133. package/lib/modules/event-sound/sound-effect-player.js +2 -2
  134. package/lib/modules/event-toast/index.js +1 -2
  135. package/lib/modules/event-toast/store.js +0 -2
  136. package/lib/modules/event-toast/view.js +2 -1
  137. package/lib/modules/interpreter/index.js +1 -2
  138. package/lib/modules/interpreter/interpreter-list/index.js +3 -4
  139. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +2 -5
  140. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
  141. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +0 -4
  142. package/lib/modules/interpreter/store.js +5 -10
  143. package/lib/modules/interpreter/utils.js +15 -14
  144. package/lib/modules/invite/components/pstn-invite.js +22 -23
  145. package/lib/modules/invite/components/voip-invite.js +7 -7
  146. package/lib/modules/invite/enums.js +1 -0
  147. package/lib/modules/invite/index.js +1 -2
  148. package/lib/modules/invite/store.js +46 -45
  149. package/lib/modules/layout/components/CommonVideoRenderer.js +7 -3
  150. package/lib/modules/layout/components/Gallery.js +5 -3
  151. package/lib/modules/layout/components/index.js +0 -1
  152. package/lib/modules/layout/index.js +1 -2
  153. package/lib/modules/layout/store.d.ts +3 -0
  154. package/lib/modules/layout/store.js +38 -14
  155. package/lib/modules/layout/type.d.ts +7 -0
  156. package/lib/modules/layout/type.js +9 -0
  157. package/lib/modules/live-streaming/index.dev.js +6 -6
  158. package/lib/modules/live-streaming/index.js +1 -2
  159. package/lib/modules/live-streaming/store.js +19 -19
  160. package/lib/modules/notification/index.js +1 -2
  161. package/lib/modules/notification/interpreter-status/index.js +2 -1
  162. package/lib/modules/notification/view.js +1 -2
  163. package/lib/modules/offscreen-pulling/index.js +0 -1
  164. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +1 -4
  165. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -2
  166. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -2
  167. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +1 -4
  168. package/lib/modules/participant/components/participants/components/participants/index.js +0 -2
  169. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +0 -1
  170. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +0 -2
  171. package/lib/modules/participant/index.js +1 -4
  172. package/lib/modules/participant/member-list-data-source.js +0 -3
  173. package/lib/modules/participant/store.js +140 -114
  174. package/lib/modules/pc-audio-connect/index.js +1 -2
  175. package/lib/modules/pc-audio-connect/store.js +9 -10
  176. package/lib/modules/phone-audio-connect/components/callinfo/index.js +2 -1
  177. package/lib/modules/phone-audio-connect/index.js +1 -2
  178. package/lib/modules/phone-audio-connect/store.js +0 -3
  179. package/lib/modules/phone-audio-connect/view.js +5 -4
  180. package/lib/modules/setting/audio-settings/audio-settings.js +1 -4
  181. package/lib/modules/setting/general-settings/general-settings.js +1 -2
  182. package/lib/modules/setting/index.d.ts +2 -0
  183. package/lib/modules/setting/index.js +4 -5
  184. package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -2
  185. package/lib/modules/setting/state/index.js +0 -4
  186. package/lib/modules/setting/storage-settings/storage-settings.js +4 -4
  187. package/lib/modules/setting/store.d.ts +8 -10
  188. package/lib/modules/setting/store.js +33 -35
  189. package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
  190. package/lib/modules/setting/video-settings/video-settings.js +1 -2
  191. package/lib/modules/setting/view.js +1 -2
  192. package/lib/modules/share-screen/components/selection/index.js +16 -9
  193. package/lib/modules/share-screen/index.d.ts +2 -0
  194. package/lib/modules/share-screen/index.js +3 -3
  195. package/lib/modules/share-screen/store.d.ts +12 -2
  196. package/lib/modules/share-screen/store.js +149 -136
  197. package/lib/modules/state-bar/index.css +8 -6
  198. package/lib/modules/state-bar/index.d.ts +2 -0
  199. package/lib/modules/state-bar/index.js +3 -3
  200. package/lib/modules/state-bar/layout-config.d.ts +1 -0
  201. package/lib/modules/state-bar/layout-config.js +17 -6
  202. package/lib/modules/state-bar/live-streaming-state.js +0 -3
  203. package/lib/modules/state-bar/store.d.ts +5 -1
  204. package/lib/modules/state-bar/store.js +8 -2
  205. package/lib/modules/state-bar/view.js +9 -5
  206. package/lib/modules/video-window/components/members/index.js +2 -1
  207. package/lib/modules/video-window/components/topControl/index.js +0 -3
  208. package/lib/modules/video-window/index.js +1 -2
  209. package/lib/modules/video-window/store.js +0 -4
  210. package/lib/modules/waiting-room-layout/index.js +1 -2
  211. package/lib/modules/whiteboard/components/control-bar/store.js +2 -1
  212. package/lib/modules/whiteboard/components/switch-theme/index.js +0 -2
  213. package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
  214. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
  215. package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
  216. package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +1 -4
  217. package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -3
  218. package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
  219. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +1 -2
  220. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +1 -3
  221. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +2 -4
  222. package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
  223. package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -3
  224. package/lib/modules/whiteboard/components/toolbar/store.js +64 -37
  225. package/lib/modules/whiteboard/index.js +5 -8
  226. package/lib/modules/whiteboard/style.css +12 -4
  227. package/lib/modules/whiteboard/view.js +10 -2
  228. package/lib/modules/widget/index.js +1 -2
  229. package/lib/modules/widget/web-widget.js +1 -1
  230. package/lib/plugins/browser-runtime-plugin.js +1 -1
  231. package/lib/plugins/module-dev-plugin.js +13 -13
  232. package/lib/providers/ability-provider.d.ts +12 -1
  233. package/lib/providers/ability-provider.js +8 -1
  234. package/lib/providers/annotation-provider.d.ts +63 -12
  235. package/lib/providers/annotation-provider.js +52 -46
  236. package/lib/providers/device-privilege-provider.js +81 -83
  237. package/lib/providers/device-provider.d.ts +3 -3
  238. package/lib/providers/device-provider.js +201 -204
  239. package/lib/providers/device-stream-provider.js +24 -27
  240. package/lib/providers/event-provider.d.ts +3 -3
  241. package/lib/providers/event-provider.js +0 -2
  242. package/lib/providers/interpreter-provider.js +195 -197
  243. package/lib/providers/message-provider.js +0 -2
  244. package/lib/providers/phone-audio-provider.js +17 -19
  245. package/lib/providers/privilege-provider.js +53 -58
  246. package/lib/providers/renderer-provider.d.ts +3 -1
  247. package/lib/providers/renderer-provider.js +18 -4
  248. package/lib/providers/room-provider.js +31 -33
  249. package/lib/providers/screen-share-provider.d.ts +1 -0
  250. package/lib/providers/screen-share-provider.js +97 -103
  251. package/lib/providers/sharing-provider.d.ts +5 -1
  252. package/lib/providers/sharing-provider.js +17 -1
  253. package/lib/providers/user-setting-storage-provider.d.ts +20 -0
  254. package/lib/providers/user-setting-storage-provider.js +72 -0
  255. package/lib/providers/widget-provider.js +0 -1
  256. package/lib/scenes/main-scene.js +13 -16
  257. package/lib/scenes/waiting-scene.js +4 -4
  258. package/lib/shared-data-source/chat-data.js +0 -2
  259. package/lib/shared-data-source/config.d.ts +1 -5
  260. package/lib/shared-data-source/config.js +11 -81
  261. package/lib/shared-data-source/interpreter.js +0 -2
  262. package/lib/shared-data-source/layout-data.js +1 -4
  263. package/lib/shared-data-source/member-data.js +0 -4
  264. package/lib/shared-data-source/pin-data.js +0 -1
  265. package/lib/shared-data-source/screen-share-data.d.ts +6 -2
  266. package/lib/shared-data-source/screen-share-data.js +2 -2
  267. package/lib/shared-data-source/security-data.js +0 -1
  268. package/lib/shared-data-source/setting.d.ts +13 -13
  269. package/lib/shared-data-source/setting.js +10 -8
  270. package/lib/shared-data-source/video-window.d.ts +2 -1
  271. package/lib/shared-data-source/video-window.js +82 -66
  272. package/lib/shared-data-source/waiting-room.js +0 -2
  273. package/lib/translations/enUS.d.ts +8 -0
  274. package/lib/translations/enUS.js +9 -1
  275. package/lib/translations/zhCN.d.ts +8 -0
  276. package/lib/translations/zhCN.js +11 -3
  277. package/lib/type.d.ts +2 -1
  278. package/lib/type.js +14 -0
  279. package/lib/ui-scene.js +18 -14
  280. package/lib/utilities/constant.d.ts +2 -1
  281. package/lib/utilities/constant.js +8 -0
  282. package/lib/utilities/copyText.js +12 -12
  283. package/lib/utilities/hooks.js +1 -2
  284. package/lib/utilities/logger.js +0 -1
  285. package/lib/utilities/parameters.js +2 -2
  286. package/lib/utilities/privilege.js +0 -3
  287. package/lib/utilities/renderer-event.js +0 -2
  288. package/lib/utilities/setting-config-storage.d.ts +7 -6
  289. package/lib/utilities/setting-config-storage.js +55 -41
  290. package/lib/utilities/tools.d.ts +1 -0
  291. package/lib/utilities/tools.js +9 -12
  292. package/lib/waiting-room-control-manager.js +26 -28
  293. package/package.json +8 -6
  294. package/dist/132.js +0 -2
  295. package/dist/132.js.LICENSE.txt +0 -311
  296. package/dist/317.js +0 -2
  297. package/dist/317.js.LICENSE.txt +0 -20
  298. package/dist/651.js +0 -2
  299. package/dist/651.js.LICENSE.txt +0 -1
  300. package/dist/689343b64b60bfb7ffff.png +0 -0
  301. package/dist/73.js +0 -1
  302. package/dist/885f9369ea05a8ac0e56.png +0 -0
  303. package/dist/90f383876a6e93e7c7ca.png +0 -0
  304. package/dist/9b37584780995fc5df8c.gif +0 -0
  305. package/dist/annotation.e5cbd3a70b6d42361872.css +0 -1274
  306. package/dist/annotation.html +0 -1
  307. package/dist/annotation.js +0 -2
  308. package/dist/annotation.js.LICENSE.txt +0 -252
  309. package/dist/assets/browser/images/default1.jpg +0 -0
  310. package/dist/assets/browser/images/default2.jpg +0 -0
  311. package/dist/assets/browser/images/default3.jpg +0 -0
  312. package/dist/assets/browser/images/default4.jpg +0 -0
  313. package/dist/assets/browser/images/default5.jpg +0 -0
  314. package/dist/assets/browser/images/default6.jpg +0 -0
  315. package/dist/assets/browser/images/default7.jpg +0 -0
  316. package/dist/assets/browser/sound_effects/pretest.mp3 +0 -0
  317. package/dist/assets/browser/sound_effects/recording_started.mp3 +0 -0
  318. package/dist/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
  319. package/dist/assets/browser/sound_effects/speaker_test.mp3 +0 -0
  320. package/dist/assets/browser/videos/default8.mp4 +0 -0
  321. package/dist/assets/browser/videos/default9.mp4 +0 -0
  322. package/dist/assets/cursors/fcr_whiteboard_input.ico +0 -0
  323. package/dist/assets/cursors/fcr_whiteboard_pen.ico +0 -0
  324. package/dist/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
  325. package/dist/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
  326. package/dist/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
  327. package/dist/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
  328. package/dist/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
  329. package/dist/assets/electron/images/default1.jpg +0 -0
  330. package/dist/assets/electron/images/default2.jpg +0 -0
  331. package/dist/assets/electron/sound_effects/pretest.mp3 +0 -0
  332. package/dist/assets/electron/videos/default8.mp4 +0 -0
  333. package/dist/assets/fcr_chat_reddot.svg +0 -5
  334. package/dist/assets/fcr_defaultpage.png +0 -0
  335. package/dist/assets/fcr_grid_big.svg +0 -3
  336. package/dist/assets/fcr_leave2.svg +0 -58
  337. package/dist/assets/fcr_listontop_big.svg +0 -3
  338. package/dist/assets/full-screen-error-boundary-img.png +0 -0
  339. package/dist/assets/leave-meeting.png +0 -0
  340. package/dist/assets/loading.gif +0 -0
  341. package/dist/assets/login_confirm.png +0 -0
  342. package/dist/assets/pretest.mp3 +0 -0
  343. package/dist/assets/state-bar-logo.png +0 -0
  344. package/dist/assets/step-gradient.svg +0 -10
  345. package/dist/b74b002687a3a3346bec.png +0 -0
  346. package/dist/b94869094481702f949b.png +0 -0
  347. package/dist/ebeace75fd46b90d890e.png +0 -0
  348. package/dist/electron/app.js +0 -194
  349. package/dist/electron/bootstrap-dev.js +0 -46
  350. package/dist/electron/bootstrap-sdk.js +0 -211
  351. package/dist/electron/default-options.js +0 -25
  352. package/dist/electron/env.js +0 -13
  353. package/dist/electron/index.js +0 -20
  354. package/dist/electron/injections.js +0 -903
  355. package/dist/electron/ipc/ipc.js +0 -141
  356. package/dist/electron/ipc/type.js +0 -19
  357. package/dist/electron/logger.js +0 -65
  358. package/dist/electron/main.js +0 -94
  359. package/dist/electron/plugins/devtool-shortcut.js +0 -33
  360. package/dist/electron/plugins/meeting-state.js +0 -39
  361. package/dist/electron/plugins/screenshot.js +0 -54
  362. package/dist/electron/preload.js +0 -108
  363. package/dist/electron/tools.js +0 -66
  364. package/dist/electron/window.js +0 -123
  365. package/dist/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
  366. package/dist/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
  367. package/dist/extensions/ai-denoiser/denoiser-wasm.js +0 -1
  368. package/dist/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
  369. package/dist/fad688b9135b15d6c405.png +0 -0
  370. package/dist/index.html +0 -224
  371. package/dist/main.393a2a91ab7fc05ffce6.css +0 -15403
  372. package/dist/main.js +0 -2
  373. package/dist/main.js.LICENSE.txt +0 -272
  374. package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
@@ -8,7 +8,6 @@ require("core-js/modules/es.error.cause.js");
8
8
  require("core-js/modules/es.error.to-string.js");
9
9
  require("core-js/modules/es.array.from.js");
10
10
  require("core-js/modules/es.array.is-array.js");
11
- require("core-js/modules/es.array.push.js");
12
11
  require("core-js/modules/es.array.slice.js");
13
12
  require("core-js/modules/es.date.to-primitive.js");
14
13
  require("core-js/modules/es.date.to-string.js");
@@ -47,20 +46,19 @@ require("core-js/modules/es.array.find.js");
47
46
  require("core-js/modules/es.array.for-each.js");
48
47
  require("core-js/modules/es.array.includes.js");
49
48
  require("core-js/modules/es.array.iterator.js");
49
+ require("core-js/modules/es.array.push.js");
50
50
  require("core-js/modules/es.date.to-json.js");
51
51
  require("core-js/modules/es.json.stringify.js");
52
52
  require("core-js/modules/es.object.to-string.js");
53
+ 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.includes.js");
60
60
  require("core-js/modules/es.string.iterator.js");
61
61
  require("core-js/modules/es.weak-map.js");
62
- require("core-js/modules/esnext.async-iterator.find.js");
63
- require("core-js/modules/esnext.async-iterator.for-each.js");
64
62
  require("core-js/modules/esnext.iterator.constructor.js");
65
63
  require("core-js/modules/esnext.iterator.find.js");
66
64
  require("core-js/modules/esnext.iterator.for-each.js");
@@ -79,11 +77,18 @@ var _constant = require("../../utilities/constant");
79
77
  var _decorator = require("agora-foundation/lib/decorator");
80
78
  var _rendererEvent = require("../../utilities/renderer-event");
81
79
  var _type = require("agora-rte-sdk/lib/core/rtc/type");
80
+ var _annotationProvider = require("../../providers/annotation-provider");
82
81
  var _mobx = require("mobx");
82
+ var _fcrCore = require("fcr-core");
83
83
  var _type2 = require("fcr-core/lib/room-control/sharing-control/type");
84
+ var _store = require("../whiteboard/components/toolbar/store");
85
+ var _i18n = require("agora-ui-foundation/lib/i18n");
84
86
  var _logger = require("../../utilities/logger");
87
+ var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
88
+ var _env = require("agora-foundation/lib/utilities/env");
89
+ var _type3 = require("../whiteboard/type");
85
90
  var _AnnotationStore;
86
- var _initProto, _init_annotationMainWindow, _init_resetToolbarStore, _init_isShowToolbar, _setToolsShowDecs, _zoomInDecs, _zoomOutDecs, _fullContainerDecs, _setOriginScalcDecs, _calcBoardPositionDecs, _handleBoardDomLoadDecs, _handleBoardContainerDomLoadDecs, _mountDecs, _unmountDecs, _ref;
91
+ var _initProto, _init_resetToolbarStore, _init_isShowToolbar, _setToolsShowDecs, _zoomInDecs, _zoomOutDecs, _fullContainerDecs, _setOriginScalcDecs, _drawReceiverBoardDecs, _handleBoardDomLoadDecs, _handleBoardContainerDomLoadDecs, _annotationEndedDecs, _mountDecs, _unmountDecs, _ref;
87
92
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
88
93
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
89
94
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -99,8 +104,7 @@ function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.descr
99
104
  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; }
100
105
  var _A = /*#__PURE__*/new WeakMap();
101
106
  var _B = /*#__PURE__*/new WeakMap();
102
- var _C = /*#__PURE__*/new WeakMap();
103
- _ref = (_setToolsShowDecs = [_mobx.action, _mobx.action.bound], _zoomInDecs = [_mobx.action, _mobx.action.bound], _zoomOutDecs = [_mobx.action, _mobx.action.bound], _fullContainerDecs = [_mobx.action, _mobx.action.bound], _setOriginScalcDecs = [_mobx.action, _mobx.action.bound], _calcBoardPositionDecs = [_mobx.action, _mobx.action.bound], _handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _handleBoardContainerDomLoadDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], "logger");
107
+ _ref = (_setToolsShowDecs = [_mobx.action, _mobx.action.bound], _zoomInDecs = [_mobx.action, _mobx.action.bound], _zoomOutDecs = [_mobx.action, _mobx.action.bound], _fullContainerDecs = [_mobx.action, _mobx.action.bound], _setOriginScalcDecs = [_mobx.action, _mobx.action.bound], _drawReceiverBoardDecs = [_mobx.action, _mobx.action.bound], _handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _handleBoardContainerDomLoadDecs = [_mobx.action, _mobx.action.bound], _annotationEndedDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], "logger");
104
108
  var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
105
109
  function AnnotationStore(_ref2) {
106
110
  var _this = this;
@@ -114,7 +118,9 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
114
118
  sharedScreenSharedDataSource = _ref2.sharedScreenSharedDataSource,
115
119
  privilegeProvider = _ref2.privilegeProvider,
116
120
  messageProvider = _ref2.messageProvider,
117
- localStorageProvider = _ref2.localStorageProvider;
121
+ localStorageProvider = _ref2.localStorageProvider,
122
+ eventProvider = _ref2.eventProvider,
123
+ abilityProvider = _ref2.abilityProvider;
118
124
  (0, _classCallCheck2["default"])(this, AnnotationStore);
119
125
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
120
126
  prefix: 'AnnotationStore'
@@ -142,9 +148,8 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
142
148
  }
143
149
  }
144
150
  });
145
- _classPrivateFieldInitSpec(this, _A, _init_annotationMainWindow(this, undefined));
146
- _classPrivateFieldInitSpec(this, _B, _init_resetToolbarStore(this, false));
147
- _classPrivateFieldInitSpec(this, _C, _init_isShowToolbar(this, false));
151
+ _classPrivateFieldInitSpec(this, _A, _init_resetToolbarStore(this, false));
152
+ _classPrivateFieldInitSpec(this, _B, _init_isShowToolbar(this, false));
148
153
  (0, _defineProperty2["default"])(this, "_toolbarStore", undefined);
149
154
  (0, _defineProperty2["default"])(this, "_boardOriginWidth", 0);
150
155
  (0, _defineProperty2["default"])(this, "_mounted", false);
@@ -178,126 +183,145 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
178
183
  this._roomControl = roomControl;
179
184
  this._sharedSecuritySharedDataSource = sharedSecuritySharedDataSource;
180
185
  this._sharedScreenSharedDataSource = sharedScreenSharedDataSource;
181
- // this._dialogProvider.addObserver(this._dialogObserver);
186
+ this._dialogProvider.addObserver(this._dialogObserver);
182
187
  this._privilegeProvider = privilegeProvider;
183
188
  this._messageProvider = messageProvider;
184
- // this._disposers.push(
185
- // reaction(
186
- // () => this.annotating,
187
- // (annotating) => {
188
- // if (this._isLocalUserSharingOwner) {
189
- // if (annotating) {
190
- // this._removeWindowResizeListenner();
191
- // } else {
192
- // this._addWindowResizeListenner();
193
- // }
194
- // }
195
- // },
196
- // ),
197
- // reaction(
198
- // () => this._memberDataSource.shareScreenVideoRatio,
199
- // (ratio) => {
200
- // if (ratio > 0 && this._boardDom) {
201
- // const { height } = this._boardDom.getBoundingClientRect();
202
- // console.log('annotation current boardDom height:', height);
203
- // const width = height * ratio;
204
- // this._boardOriginWidth = width;
205
- // this._boardDom.style.width = `${width}px`;
206
- // this._boardDom.style.height = `${height}px`;
207
- // }
208
- // },
209
- // ),
210
- // // reaction(
211
- // // () => this._memberDataSource.shareScreenVideoSize,
212
- // // (size) => {
213
- // // if (size && this._boardDom) {
214
- // // this.logger.info('annotation shareScreenVideoSize: ', size);
215
- // // calcAnnotationAreaSize(this._boardDom, size.width, size.height);
216
- // // }
217
- // // },
218
- // // ),
219
- // reaction(
220
- // () => this.isScreenSharing,
221
- // (sharing) => {
222
- // if (this._isLocalUserSharingOwner) {
223
- // if (sharing) {
224
- // this.screenSharingStarted();
225
- // } else {
226
- // this._removeWindowResizeListenner();
227
- // }
228
- // }
229
- // },
230
- // ),
231
- // reaction(
232
- // () => this._annotationProvider.annotationState,
233
- // (state) => {
234
- // this.logger.info('annotation transaction state: ', state);
235
- // if (!this._isLocalUserSharingOwner) {
236
- // if (state === FcrAnnotationState.START) {
237
- // this.logger.info('annotation transaction start');
238
- // this._annotationControl = this._annotationProvider.annotationControl;
239
- // this._toolbarStore = new ToolbarStore(
240
- // this._annotationControl! as FcrWhiteboardControl,
241
- // this._roomControl!,
242
- // this._annotationProvider,
243
- // );
244
- // this.resetToolbarStore = true;
245
- // } else {
246
- // this.logger.info('annotation transaction end');
247
- // this.resetToolbarStore = false;
248
- // this._boardContainerObserver.disconnect();
249
- // this._messageProvider.showToast({
250
- // message: transI18n(
251
- // 'fmt_screenshare_toast_annotation_controls_screen_sharing_disabled',
252
- // ),
253
- // type: 'info',
254
- // });
255
- // this._toolbarStore = undefined;
256
- // this._unmount();
257
- // this.isShowToolbar = false;
258
- // }
259
- // }
260
- // },
261
- // ),
262
- // reaction(
263
- // () => this._sharedScreenSharedDataSource.screenSharingState,
264
- // (state) => {
265
- // if (state === FcrMediaSourceState.CLOSE && this._isLocalUserSharingOwner) {
266
- // console.log('screen sharing state is close');
267
- // this._annotationProvider.hideAnnotationWindow();
268
- // this._removeWindowResizeListenner();
269
- // }
270
- // },
271
- // ),
272
- // reaction(
273
- // () => this.allowAnnotationWriteState,
274
- // (canWrite) => {
275
- // if (!this._isLocalUserSharingOwner) {
276
- // // const toastText = canWrite
277
- // // ? transI18n('fmt_screenshare_toast_host_enabled_annotations')
278
- // // : transI18n('fmt_screenshare_toast_host_disabled_annotations');
279
- // // this._messageProvider.showToast({
280
- // // type: 'info',
281
- // // message: toastText,
282
- // // });
283
- // }
284
- // if (!canWrite) {
285
- // this.isShowToolbar = false;
286
- // }
287
- // },
288
- // ),
289
- // reaction(
290
- // () => this.annotationHasStart,
291
- // (hasStart) => {
292
- // if (!hasStart) {
293
- // this.isShowToolbar = false;
294
- // }
295
- // },
296
- // ),
297
- // );
189
+ this._eventProvider = eventProvider;
190
+ this._abilityProvider = abilityProvider;
191
+ this._disposers.push((0, _mobx.reaction)(function () {
192
+ return _this.annotating;
193
+ }, function (annotating) {
194
+ if (_this._isLocalUserSharingOwner) {
195
+ if (annotating) {
196
+ _this._removeWindowResizeListenner();
197
+ } else {
198
+ _this._addWindowResizeListenner();
199
+ }
200
+ }
201
+ }), (0, _mobx.reaction)(function () {
202
+ return _this.isSeizeStream;
203
+ }, function (state) {
204
+ _this.logger.info('[Annotation]: isSeizeStream changed to ', state);
205
+ if (state) {
206
+ _this._sharedScreenSharedDataSource.setIsSeizeStream(false);
207
+ if (_this._isLocalUserSharingOwner) {
208
+ _this._annotationProvider.hideAnnotationWindow();
209
+ _this._removeWindowResizeListenner();
210
+ } else {
211
+ _this._annotationEnded();
212
+ }
213
+ }
214
+ }), (0, _mobx.reaction)(function () {
215
+ return _this._memberDataSource.shareScreenVideoRatio;
216
+ }, function (ratio) {
217
+ if (ratio > 0) {
218
+ _this.drawReceiverBoard(ratio);
219
+ }
220
+ }),
221
+ // reaction(
222
+ // () => this._memberDataSource.shareScreenVideoSize,
223
+ // (size) => {
224
+ // if (size && this._boardDom) {
225
+ // this.logger.info('annotation shareScreenVideoSize: ', size);
226
+ // calcAnnotationAreaSize(this._boardDom, size.width, size.height);
227
+ // }
228
+ // },
229
+ // ),
230
+ (0, _mobx.reaction)(function () {
231
+ return _this.isScreenSharing;
232
+ }, function (sharing) {
233
+ _this.logger.info("[Annotation]: screen sharing reaction sharing changed to ".concat(sharing, ", isReplaceScreen is ").concat(_this.isReplaceScreen, ", isSeizeStream is ").concat(_this.isSeizeStream));
234
+ // web 开启屏幕共享时不需要走这个逻辑
235
+ if (_this.isReplaceScreen || _this.isSeizeStream || !(0, _env.isElectron)()) return;
236
+ if (_this._isLocalUserSharingOwner) {
237
+ if (sharing) {
238
+ _this.screenSharingStarted();
239
+ } else {
240
+ _this._removeWindowResizeListenner();
241
+ }
242
+ }
243
+ }), (0, _mobx.reaction)(function () {
244
+ return _this.isReplaceScreen;
245
+ }, /*#__PURE__*/function () {
246
+ var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(isReplaceScreen) {
247
+ return _regenerator["default"].wrap(function (_context) {
248
+ while (1) switch (_context.prev = _context.next) {
249
+ case 0:
250
+ if (!(isReplaceScreen && (0, _env.isElectron)())) {
251
+ _context.next = 2;
252
+ break;
253
+ }
254
+ _context.next = 1;
255
+ return new Promise(function (resolve) {
256
+ // 延迟两秒,等待标注内容清理,清理方法在 sdk 中虽然看起来是同步的,但是实际上会有无法清理的情况出现
257
+ (0, _rendererEvent.sendEvent)({
258
+ action: _type3.ToolbarEvents.CLEAN,
259
+ payload: null
260
+ });
261
+ setTimeout(function () {
262
+ return resolve(true);
263
+ }, 2000);
264
+ });
265
+ case 1:
266
+ _this.logger.info("[Annotation]: isReplaceScreen changed to ".concat(isReplaceScreen, ", currentShareInfo is ").concat(JSON.stringify(_this._currentShareInfo)));
267
+ _this._removeWindowResizeListenner();
268
+ _this._annotationProvider.hideAnnotationWindow();
269
+ _this._annotationProvider.setBoundsToAnnotationWindow();
270
+ setTimeout(_this.screenSharingStarted);
271
+ _this._sharedScreenSharedDataSource.setIsReplaceScreen(false);
272
+ case 2:
273
+ case "end":
274
+ return _context.stop();
275
+ }
276
+ }, _callee);
277
+ }));
278
+ return function (_x) {
279
+ return _ref3.apply(this, arguments);
280
+ };
281
+ }()), (0, _mobx.reaction)(function () {
282
+ return _this._annotationProvider.annotationState;
283
+ }, function (state) {
284
+ _this.logger.info('annotation transaction state: ', state);
285
+ if (state === _annotationProvider.FcrAnnotationState.START) {
286
+ _this.logger.info('annotation transaction start');
287
+ _this._annotationControl = _this._annotationProvider.annotationControl;
288
+ _this._toolbarStore = new _store.ToolbarStore(_this._annotationControl, _this._roomControl, _this._annotationProvider, eventProvider);
289
+ _this.resetToolbarStore = true;
290
+ } else {
291
+ _this._annotationEnded();
292
+ }
293
+ }), (0, _mobx.reaction)(function () {
294
+ return _this._sharedScreenSharedDataSource.screenSharingState;
295
+ }, function (state) {
296
+ if (state === _fcrCore.FcrMediaSourceState.CLOSE && _this._isLocalUserSharingOwner) {
297
+ _this.logger.info('[Annotation]: screenSharingState is close, isReplaceScreen is ', _this.isReplaceScreen);
298
+ if (!_this.isReplaceScreen && (0, _env.isElectron)()) {
299
+ _this._annotationProvider.hideAnnotationWindow();
300
+ _this._removeWindowResizeListenner();
301
+ }
302
+ }
303
+ }), (0, _mobx.reaction)(function () {
304
+ return _this.allowAnnotationWriteState;
305
+ }, function (canWrite) {
306
+ if (!_this._isLocalUserSharingOwner) {
307
+ var toastText = canWrite ? (0, _i18n.transI18n)('fmt_screenshare_toast_host_enabled_annotations') : (0, _i18n.transI18n)('fmt_screenshare_toast_host_disabled_annotations');
308
+ _this._messageProvider.showToast({
309
+ type: 'info',
310
+ message: toastText
311
+ });
312
+ }
313
+ if (!canWrite) {
314
+ _this.isShowToolbar = false;
315
+ }
316
+ }), (0, _mobx.reaction)(function () {
317
+ return _this.isShowToolbar;
318
+ }, function (isShow) {
319
+ var _this$_toolbarStore;
320
+ (_this$_toolbarStore = _this._toolbarStore) === null || _this$_toolbarStore === void 0 || _this$_toolbarStore.resetToolbarVars();
321
+ }));
298
322
  }
299
323
  return (0, _createClass2["default"])(AnnotationStore, [{
300
- key: "annotationMainWindow",
324
+ key: "resetToolbarStore",
301
325
  get: function get() {
302
326
  return _classPrivateFieldGet(_A, this);
303
327
  },
@@ -305,7 +329,7 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
305
329
  _classPrivateFieldSet(_A, this, v);
306
330
  }
307
331
  }, {
308
- key: "resetToolbarStore",
332
+ key: "isShowToolbar",
309
333
  get: function get() {
310
334
  return _classPrivateFieldGet(_B, this);
311
335
  },
@@ -313,17 +337,19 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
313
337
  _classPrivateFieldSet(_B, this, v);
314
338
  }
315
339
  }, {
316
- key: "isShowToolbar",
340
+ key: "hasAnnotationWritePermission",
317
341
  get: function get() {
318
- return _classPrivateFieldGet(_C, this);
319
- },
320
- set: function set(v) {
321
- _classPrivateFieldSet(_C, this, v);
342
+ return this._sharedSecuritySharedDataSource.checkedStateMap.hasAnnotationWritePermission;
322
343
  }
323
344
  }, {
324
- key: "hasAnnotationWritePermission",
345
+ key: "isLocalUserHost",
325
346
  get: function get() {
326
- return this._sharedSecuritySharedDataSource.checkedStateMap.hasAnnotationWritePermission;
347
+ return this._memberDataSource.isLocalUserHost;
348
+ }
349
+ }, {
350
+ key: "screenSharingOwner",
351
+ get: function get() {
352
+ return this._sharedScreenSharedDataSource.screenSharingOwner;
327
353
  }
328
354
  }, {
329
355
  key: "screenShareWindowData",
@@ -378,13 +404,35 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
378
404
  }, {
379
405
  key: "allowAnnotationWriteState",
380
406
  get: function get() {
381
- return this._privilegeProvider.allowAnnotationWriteState();
407
+ var _this$screenSharingOw;
408
+ return this._privilegeProvider.allowAnnotationWriteState() || this.isLocalUserHost || ((_this$screenSharingOw = this.screenSharingOwner) === null || _this$screenSharingOw === void 0 ? void 0 : _this$screenSharingOw.userId) === this.localUser.userId;
409
+ }
410
+ }, {
411
+ key: "isReplaceScreen",
412
+ get: function get() {
413
+ return this._sharedScreenSharedDataSource.isReplaceScreen;
414
+ }
415
+ }, {
416
+ key: "isSeizeStream",
417
+ get: function get() {
418
+ return this._sharedScreenSharedDataSource.isSeizeStream;
419
+ }
420
+ }, {
421
+ key: "isAnnotationSupported",
422
+ value: function isAnnotationSupported() {
423
+ return this._abilityProvider.isAnnotationSupported();
382
424
  }
383
425
  }, {
384
426
  key: "getToolbarStore",
385
427
  value: function getToolbarStore() {
386
428
  return this._toolbarStore;
387
429
  }
430
+ }, {
431
+ key: "currentTool",
432
+ get: function get() {
433
+ var _this$_toolbarStore2;
434
+ return (_this$_toolbarStore2 = this._toolbarStore) === null || _this$_toolbarStore2 === void 0 ? void 0 : _this$_toolbarStore2.observables.currentTool;
435
+ }
388
436
  }, {
389
437
  key: "setToolsShow",
390
438
  value: function setToolsShow() {
@@ -392,26 +440,17 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
392
440
  if (this.allowAnnotationWriteState) {
393
441
  var currentFlag = this.isShowToolbar;
394
442
  this.isShowToolbar = !currentFlag;
395
- if (this._toolbarStore) {
396
- if (currentFlag) {
397
- this._toolbarStore.disableToolbar();
398
- } else {
399
- this._toolbarStore.resumeToolbar();
400
- }
401
- }
402
443
  }
403
444
  }
404
445
  }, {
405
446
  key: "zoomIn",
406
447
  value: function zoomIn() {
407
448
  this._annotationProvider.zoomIn();
408
- this.calcBoardPosition();
409
449
  }
410
450
  }, {
411
451
  key: "zoomOut",
412
452
  value: function zoomOut() {
413
453
  this._annotationProvider.zoomOut();
414
- this.calcBoardPosition();
415
454
  }
416
455
  }, {
417
456
  key: "fullContainer",
@@ -426,37 +465,31 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
426
465
  boardHeight = _getBoundingClientRec.height;
427
466
  var scalc = width / boardWidth;
428
467
  this._annotationProvider.fullContainer(scalc);
429
- this.calcBoardPosition();
430
468
  }
431
469
  }
432
470
  }, {
433
471
  key: "setOriginScalc",
434
472
  value: function setOriginScalc() {
435
473
  this._annotationProvider.setOriginScalc();
436
- this.calcBoardPosition();
437
474
  }
438
475
  }, {
439
- key: "calcBoardPosition",
440
- value: function calcBoardPosition() {
476
+ key: "drawReceiverBoard",
477
+ value: function drawReceiverBoard(paramRatio) {
441
478
  if (this._boardContainerDom && this._boardDom) {
442
- var _this$_boardOriginWid;
443
479
  var _this$_boardContainer2 = this._boardContainerDom.getBoundingClientRect(),
444
- width = _this$_boardContainer2.width,
445
480
  height = _this$_boardContainer2.height;
446
- var computWidth = (_this$_boardOriginWid = this._boardOriginWidth) !== null && _this$_boardOriginWid !== void 0 ? _this$_boardOriginWid : width;
447
- var newWidth = computWidth * 1;
448
- var newHeight = height * 1;
481
+ var ratio = (0, _isNumber["default"])(paramRatio) ? paramRatio : this._memberDataSource.shareScreenVideoRatio;
482
+ var newWidth = height * ratio;
483
+ this._boardOriginWidth = newWidth;
449
484
  this._boardDom.style.width = "".concat(newWidth, "px");
450
- this._boardDom.style.height = "".concat(newHeight, "px");
451
- this._boardDom.style.marginLeft = "".concat((this._boardOriginWidth - newWidth) / 2, "px");
452
- this._boardDom.style.marginTop = "".concat((height - newHeight) / 2, "px");
485
+ this._boardDom.style.height = "".concat(height, "px");
486
+ this.logger.info("[Annotation] [drawReceiverBoard] ratio: ".concat(ratio, ", width: ").concat(newWidth, " , height: ").concat(height));
453
487
  }
454
488
  }
455
489
  }, {
456
490
  key: "handleBoardDomLoad",
457
491
  value: function handleBoardDomLoad(ref) {
458
492
  this._boardDom = ref;
459
- this.logger.info('handleBoardDomLoad: ', this._boardDom);
460
493
  if (this._boardDom) {
461
494
  var _this$_boardDom$getBo = this._boardDom.getBoundingClientRect(),
462
495
  height = _this$_boardDom$getBo.height;
@@ -478,13 +511,13 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
478
511
  key: "screenSharingStarted",
479
512
  value: function screenSharingStarted() {
480
513
  this._currentShareInfo = this._annotationProvider.currentShareInfo;
481
- this.logger.info("screenSharingStarting with currentShareInfo: ".concat(JSON.stringify(this._currentShareInfo)));
514
+ this.logger.info("[Annotation]: screenSharingStarting with currentShareInfo: ".concat(JSON.stringify(this._currentShareInfo)));
482
515
  this._annotationProvider.setBoundsToAnnotationWindow();
483
516
  (0, _rendererEvent.sendEvent)({
484
517
  action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_TO_SHOW,
485
518
  payload: true
486
519
  });
487
- this.logger.info('screenSharingStarted will add window resize listenner');
520
+ this.logger.info('[Annotation]: screenSharingStarted will add window resize listenner');
488
521
  this._addWindowResizeListenner();
489
522
  }
490
523
  }, {
@@ -498,19 +531,37 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
498
531
  this._unmount();
499
532
  this._boardContainerObserver.disconnect();
500
533
  }
534
+ }, {
535
+ key: "_annotationEnded",
536
+ value: function _annotationEnded() {
537
+ var _this$_annotationProv, _this$_toolbarStore3;
538
+ this.logger.info('[Annotation]: annotation transaction end');
539
+ this._messageProvider.showToast({
540
+ message: (0, _i18n.transI18n)('fmt_screenshare_toast_annotation_controls_screen_sharing_disabled'),
541
+ type: 'info'
542
+ });
543
+ (_this$_annotationProv = this._annotationProvider.boardMainWindow) === null || _this$_annotationProv === void 0 || _this$_annotationProv.clean();
544
+ (_this$_toolbarStore3 = this._toolbarStore) === null || _this$_toolbarStore3 === void 0 || _this$_toolbarStore3.resetToolbarVars();
545
+ this.resetToolbarStore = false;
546
+ this._boardContainerObserver.disconnect();
547
+ this.isShowToolbar = false;
548
+ this._toolbarStore = undefined;
549
+ this._unmount();
550
+ }
501
551
  }, {
502
552
  key: "_mount",
503
553
  value: function _mount() {
504
554
  this.logger.info('annotation mount boardMainWindow: ', this._annotationProvider.boardMainWindow);
505
555
  this.logger.info('annotation mount boardDom: ', this._boardDom);
506
556
  if (this._annotationProvider.boardMainWindow && this._boardDom && !this._mounted) {
557
+ var _this$_toolbarStore4;
507
558
  this.logger.info('annotation mount start: ', this._boardDom);
508
559
  this._mounted = true;
509
560
  var view = this._annotationProvider.boardMainWindow.getContentView();
510
561
  this._boardDom.appendChild(view);
511
562
  this.logger.info('annotation mount boardMainWindow contentView append: ', view);
512
563
  this.logger.info('annotation mount success');
513
- this.calcBoardPosition();
564
+ (_this$_toolbarStore4 = this._toolbarStore) === null || _this$_toolbarStore4 === void 0 || _this$_toolbarStore4.resetToolbarVars();
514
565
  }
515
566
  }
516
567
  }, {
@@ -537,53 +588,21 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
537
588
  key: "_updateAnnotationBounds",
538
589
  value: function _updateAnnotationBounds(bounds) {
539
590
  if (bounds) this._currentShareInfo.bounds = bounds;
540
- this.logger.info("updateAnnotationBounds ".concat(this._currentShareInfo));
591
+ this.logger.info("[Annotation][updateAnnotationBounds]: bounds: ".concat(JSON.stringify(bounds), ", currentShareInfo: ").concat(JSON.stringify(this._currentShareInfo)));
541
592
  (0, _rendererEvent.sendEvent)({
542
593
  action: _constant.FcrUIRendererEventAction.SET_CURRENT_SHARE_SCREEN_BOUNDS,
543
594
  payload: bounds || this._annotationProvider.currentShareInfo.bounds
544
595
  });
545
596
  }
546
597
 
547
- // 使用 sdk 提供的获取窗口列表功能,但是此 api 性能很差,因为它会生成窗口的缩略图,延迟很高
548
- }, {
549
- key: "_pollActiveWindow",
550
- value: function _pollActiveWindow() {
551
- var _this2 = this;
552
- requestIdleCallback(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
553
- var currentWindows, currentWindow;
554
- return _regenerator["default"].wrap(function _callee$(_context) {
555
- while (1) switch (_context.prev = _context.next) {
556
- case 0:
557
- _context.next = 2;
558
- return _this2._deviceProvider.getWindowList();
559
- case 2:
560
- currentWindows = _context.sent;
561
- currentWindow = currentWindows.find(function (window) {
562
- return window.id === _this2._currentShareInfo.id;
563
- });
564
- if (currentWindow && (currentWindow.bounds.width !== _this2._currentShareInfo.bounds.width || currentWindow.bounds.height !== _this2._currentShareInfo.bounds.height)) {
565
- _this2._updateAnnotationBounds(currentWindow.bounds);
566
- // this.logger.info('The window bounds is the different as the current share bounds');
567
- } else {
568
- // this.logger.info('The window bounds is the same as the current share bounds');
569
- }
570
- _this2._resizeWatcherTimer = setTimeout(_this2._pollActiveWindow, 200);
571
- case 6:
572
- case "end":
573
- return _context.stop();
574
- }
575
- }, _callee);
576
- })));
577
- }
578
-
579
598
  // 使用第三方 node-window-manager 提供的获取窗口列表功能
580
599
  }, {
581
600
  key: "_updateBoundsByActiveWindow",
582
601
  value: function _updateBoundsByActiveWindow() {
583
- var _this3 = this;
602
+ var _this2 = this;
584
603
  var windows = window.runtime.getWindows();
585
604
  var activeWindow = windows.find(function (win) {
586
- return win.id === +_this3._currentShareInfo.id;
605
+ return win.id === +_this2._currentShareInfo.id;
587
606
  });
588
607
  var _this$_currentShareIn = this._currentShareInfo,
589
608
  id = _this$_currentShareIn.id,
@@ -617,15 +636,14 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
617
636
  }, {
618
637
  key: "_addWindowResizeListenner",
619
638
  value: function _addWindowResizeListenner() {
620
- var _this4 = this;
639
+ var _this3 = this;
621
640
  var isDisplay = this._currentShareInfo.type === _type.AgoraRtcScreenCaptureType.SCREEN;
622
641
  this.logger.info("current sharing type is screen: ".concat(isDisplay, ", has watch resize timer: ").concat(!!this._resizeWatcherTimer));
623
642
  if (isDisplay) return;
624
643
  if (!this._resizeWatcherTimer) {
625
- // this._pollSdkWindow();
626
644
  this._resizeWatcherTimer = setInterval(function () {
627
- _this4.logger.info("addWindowResizeListenner interval ".concat(_this4._currentShareInfo));
628
- _this4._updateBoundsByActiveWindow();
645
+ _this3.logger.info("addWindowResizeListenner interval ".concat(_this3._currentShareInfo));
646
+ _this3._updateBoundsByActiveWindow();
629
647
  }, 3000);
630
648
  }
631
649
  }
@@ -640,9 +658,8 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
640
658
  }]);
641
659
  }();
642
660
  _AnnotationStore = AnnotationStore;
643
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.observable, 1, "annotationMainWindow"], [_mobx.observable, 1, "resetToolbarStore"], [_mobx.observable, 1, "isShowToolbar"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "annotating"], [_decorator.bound, 2, "getToolbarStore"], [_setToolsShowDecs, 18, "setToolsShow"], [_zoomInDecs, 18, "zoomIn"], [_zoomOutDecs, 18, "zoomOut"], [_fullContainerDecs, 18, "fullContainer"], [_setOriginScalcDecs, 18, "setOriginScalc"], [_calcBoardPositionDecs, 18, "calcBoardPosition"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_handleBoardContainerDomLoadDecs, 18, "handleBoardContainerDomLoad"], [_decorator.bound, 2, "screenSharingStarted"], [_decorator.bound, 2, "release"], [_mountDecs, 18, "_mount"], [_unmountDecs, 18, "_unmount"], [_decorator.bound, 2, "_close"], [_decorator.bound, 2, "_updateAnnotationBounds"], [_decorator.bound, 2, "_pollActiveWindow"], [_decorator.bound, 2, "_updateBoundsByActiveWindow"], [_decorator.bound, 2, "_addWindowResizeListenner"], [_decorator.bound, 2, "_removeWindowResizeListenner"]], []).e, 4);
644
- _init_annotationMainWindow = _applyDecs$e[0];
645
- _init_resetToolbarStore = _applyDecs$e[1];
646
- _init_isShowToolbar = _applyDecs$e[2];
647
- _initProto = _applyDecs$e[3];
661
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.observable, 1, "resetToolbarStore"], [_mobx.observable, 1, "isShowToolbar"], [_mobx.computed, 3, "scalcValue"], [_mobx.computed, 3, "annotating"], [_decorator.bound, 2, "isAnnotationSupported"], [_decorator.bound, 2, "getToolbarStore"], [_setToolsShowDecs, 18, "setToolsShow"], [_zoomInDecs, 18, "zoomIn"], [_zoomOutDecs, 18, "zoomOut"], [_fullContainerDecs, 18, "fullContainer"], [_setOriginScalcDecs, 18, "setOriginScalc"], [_drawReceiverBoardDecs, 18, "drawReceiverBoard"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_handleBoardContainerDomLoadDecs, 18, "handleBoardContainerDomLoad"], [_decorator.bound, 2, "screenSharingStarted"], [_decorator.bound, 2, "release"], [_annotationEndedDecs, 18, "_annotationEnded"], [_mountDecs, 18, "_mount"], [_unmountDecs, 18, "_unmount"], [_decorator.bound, 2, "_close"], [_decorator.bound, 2, "_updateAnnotationBounds"], [_decorator.bound, 2, "_updateBoundsByActiveWindow"], [_decorator.bound, 2, "_addWindowResizeListenner"], [_decorator.bound, 2, "_removeWindowResizeListenner"]], []).e, 3);
662
+ _init_resetToolbarStore = _applyDecs$e[0];
663
+ _init_isShowToolbar = _applyDecs$e[1];
664
+ _initProto = _applyDecs$e[2];
648
665
  var AnnotationStoreContext = exports.AnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)({});