fcr-ui-scene 3.6.1 → 3.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/lib/creator.d.ts +6 -0
  2. package/lib/creator.js +125 -24
  3. package/lib/electron/app.js +5 -4
  4. package/lib/electron/bootstrap-dev.js +3 -0
  5. package/lib/electron/bootstrap-sdk.js +4 -0
  6. package/lib/electron/injections.d.ts +5 -0
  7. package/lib/electron/injections.js +36 -8
  8. package/lib/electron/ipc/ipc.d.ts +1 -0
  9. package/lib/electron/ipc/ipc.js +4 -0
  10. package/lib/electron/main.js +16 -8
  11. package/lib/electron/plugins/screenshot.js +4 -2
  12. package/lib/electron/preload.js +7 -2
  13. package/lib/electron/window.js +4 -6
  14. package/lib/fragments/annotation/index.d.ts +11 -0
  15. package/lib/fragments/annotation/index.js +121 -0
  16. package/lib/fragments/annotation/libs.d.ts +55 -0
  17. package/lib/fragments/annotation/libs.js +93 -0
  18. package/lib/fragments/annotation/store.d.ts +30 -0
  19. package/lib/fragments/annotation/store.js +565 -0
  20. package/lib/fragments/annotation/view.d.ts +3 -0
  21. package/lib/fragments/annotation/view.js +31 -0
  22. package/lib/fragments/base.d.ts +10 -0
  23. package/lib/fragments/base.js +44 -0
  24. package/lib/modules/action-bar/components/screen-share/submenu.js +7 -6
  25. package/lib/modules/action-bar/index.css +11 -0
  26. package/lib/modules/action-bar/index.d.ts +2 -0
  27. package/lib/modules/action-bar/index.js +1 -0
  28. package/lib/modules/action-bar/store.d.ts +7 -9
  29. package/lib/modules/action-bar/store.js +49 -90
  30. package/lib/modules/annotation/board-cursor.css +76 -0
  31. package/lib/modules/annotation/components/control-bar/index.css +48 -0
  32. package/lib/modules/annotation/components/control-bar/index.d.ts +3 -0
  33. package/lib/modules/annotation/components/control-bar/index.js +141 -0
  34. package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.d.ts +3 -0
  35. package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +46 -0
  36. package/lib/modules/annotation/components/toolbar/components/color-tool/index.d.ts +1 -0
  37. package/lib/modules/annotation/components/toolbar/components/color-tool/index.js +52 -0
  38. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +3 -0
  39. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +61 -0
  40. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
  41. package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
  42. package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.d.ts +1 -0
  43. package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +68 -0
  44. package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +18 -0
  45. package/lib/modules/annotation/components/toolbar/components/item/item.js +116 -0
  46. package/lib/modules/annotation/components/toolbar/components/item/style.css +43 -0
  47. package/lib/modules/annotation/components/toolbar/components/panel/index.d.ts +5 -0
  48. package/lib/modules/annotation/components/toolbar/components/panel/index.js +22 -0
  49. package/lib/modules/annotation/components/toolbar/components/panel/style.css +24 -0
  50. package/lib/modules/annotation/components/toolbar/components/pen-tool/index.d.ts +1 -0
  51. package/lib/modules/annotation/components/toolbar/components/pen-tool/index.js +58 -0
  52. package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.d.ts +3 -0
  53. package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +34 -0
  54. package/lib/modules/annotation/components/toolbar/components/tips/index.d.ts +2 -0
  55. package/lib/modules/annotation/components/toolbar/components/tips/index.js +25 -0
  56. package/lib/modules/annotation/components/toolbar/components/tips/style.css +19 -0
  57. package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
  58. package/lib/modules/annotation/components/toolbar/index.js +1 -0
  59. package/lib/modules/annotation/components/toolbar/store.d.ts +40 -0
  60. package/lib/modules/annotation/components/toolbar/store.js +279 -0
  61. package/lib/modules/annotation/components/toolbar/style.css +55 -0
  62. package/lib/modules/annotation/components/toolbar/view.d.ts +2 -0
  63. package/lib/modules/annotation/components/toolbar/view.js +120 -0
  64. package/lib/modules/annotation/index.d.ts +38 -0
  65. package/lib/modules/annotation/index.js +169 -0
  66. package/lib/modules/annotation/store.d.ts +93 -0
  67. package/lib/modules/annotation/store.js +673 -0
  68. package/lib/modules/annotation/style.css +26 -0
  69. package/lib/modules/annotation/view.d.ts +3 -0
  70. package/lib/modules/annotation/view.js +49 -0
  71. package/lib/modules/chat/view.js +112 -100
  72. package/lib/modules/components/annotation-menu/index.d.ts +7 -0
  73. package/lib/modules/components/annotation-menu/index.js +119 -0
  74. package/lib/modules/components/leave-meeting/components/assign-host.js +26 -23
  75. package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +0 -1
  76. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +10 -4
  77. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +4 -2
  78. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +10 -6
  79. package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -2
  80. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +3 -4
  81. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +0 -3
  82. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +6 -32
  83. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +11 -3
  84. package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +0 -1
  85. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +7 -10
  86. package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +0 -1
  87. package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +0 -2
  88. package/lib/modules/components/member-window/components/member-actions/index.js +1 -32
  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 +130 -23
  91. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +2 -1
  92. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +6 -1
  93. package/lib/modules/components/member-window/components/video-player/index.d.ts +1 -0
  94. package/lib/modules/components/member-window/index.css +37 -0
  95. package/lib/modules/components/member-window/index.d.ts +1 -1
  96. package/lib/modules/components/member-window/index.js +8 -5
  97. package/lib/modules/components/member-window/types.d.ts +2 -0
  98. package/lib/modules/components/security-menu/index.js +7 -6
  99. package/lib/modules/control-bar/components/annotation-button/index.d.ts +1 -0
  100. package/lib/modules/control-bar/components/annotation-button/index.js +59 -0
  101. package/lib/modules/control-bar/index.d.ts +6 -6
  102. package/lib/modules/control-bar/index.js +5 -34
  103. package/lib/modules/control-bar/store.d.ts +27 -13
  104. package/lib/modules/control-bar/store.js +121 -126
  105. package/lib/modules/control-bar/view.js +50 -4
  106. package/lib/modules/dialog/components/annotation-tool/index.d.ts +4 -0
  107. package/lib/modules/dialog/components/annotation-tool/index.js +53 -0
  108. package/lib/modules/dialog/components/chat/index.js +1 -1
  109. package/lib/modules/dialog/components/control-bar/index.d.ts +0 -2
  110. package/lib/modules/dialog/components/control-bar/index.js +1 -3
  111. package/lib/modules/dialog/components/host-area-container/index.d.ts +12 -0
  112. package/lib/modules/dialog/components/host-area-container/index.js +214 -0
  113. package/lib/modules/dialog/components/participant/index.js +1 -1
  114. package/lib/modules/dialog/components/system-preference/index.js +1 -1
  115. package/lib/modules/dialog/components/video-window/index.js +1 -0
  116. package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +14 -0
  117. package/lib/modules/dialog/hooks/use-popover-watcher.js +112 -0
  118. package/lib/modules/dialog/hooks/useElectron.d.ts +1 -0
  119. package/lib/modules/dialog/hooks/useElectron.js +13 -3
  120. package/lib/modules/dialog/index.d.ts +2 -3
  121. package/lib/modules/dialog/index.js +3 -26
  122. package/lib/modules/dialog/store.d.ts +14 -9
  123. package/lib/modules/dialog/store.js +56 -50
  124. package/lib/modules/event-confirm/components/window/index.d.ts +7 -0
  125. package/lib/modules/event-confirm/components/window/index.js +188 -0
  126. package/lib/modules/event-confirm/index.d.ts +4 -4
  127. package/lib/modules/event-confirm/index.js +6 -4
  128. package/lib/modules/event-confirm/store.d.ts +4 -5
  129. package/lib/modules/event-confirm/store.js +35 -26
  130. package/lib/modules/event-confirm/view.js +23 -171
  131. package/lib/modules/event-sound/index.js +1 -1
  132. package/lib/modules/layout/components/CommonVideoRenderer.js +33 -16
  133. package/lib/modules/layout/index.d.ts +4 -0
  134. package/lib/modules/layout/index.js +2 -0
  135. package/lib/modules/layout/store.d.ts +14 -2
  136. package/lib/modules/layout/store.js +77 -45
  137. package/lib/modules/layout/type.d.ts +7 -0
  138. package/lib/modules/participant/index.d.ts +2 -0
  139. package/lib/modules/participant/index.js +2 -1
  140. package/lib/modules/participant/store.d.ts +5 -2
  141. package/lib/modules/participant/store.js +73 -25
  142. package/lib/modules/setting/audio-settings/audio-settings.js +3 -14
  143. package/lib/modules/setting/index.d.ts +2 -0
  144. package/lib/modules/setting/index.js +3 -3
  145. package/lib/modules/setting/store.d.ts +8 -10
  146. package/lib/modules/setting/store.js +22 -20
  147. package/lib/modules/share-screen/components/selection/index.js +18 -42
  148. package/lib/modules/share-screen/index.d.ts +6 -2
  149. package/lib/modules/share-screen/index.js +4 -2
  150. package/lib/modules/share-screen/store.d.ts +41 -46
  151. package/lib/modules/share-screen/store.js +297 -718
  152. package/lib/modules/share-screen/view.js +2 -2
  153. package/lib/modules/state-bar/assets/fcr_grid_big.svg +1 -1
  154. package/lib/modules/state-bar/assets/fcr_listontop_big.svg +1 -1
  155. package/lib/modules/state-bar/index.css +8 -6
  156. package/lib/modules/state-bar/index.d.ts +4 -0
  157. package/lib/modules/state-bar/index.js +3 -1
  158. package/lib/modules/state-bar/layout-config.d.ts +1 -0
  159. package/lib/modules/state-bar/layout-config.js +15 -5
  160. package/lib/modules/state-bar/store.d.ts +9 -1
  161. package/lib/modules/state-bar/store.js +17 -2
  162. package/lib/modules/state-bar/view.js +9 -4
  163. package/lib/modules/video-window/components/members/index.js +2 -1
  164. package/lib/modules/waiting-room-layout/store.js +1 -1
  165. package/lib/modules/whiteboard/components/control-bar/store.d.ts +5 -1
  166. package/lib/modules/whiteboard/components/control-bar/store.js +10 -1
  167. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +16 -5
  168. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +67 -12
  169. package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +22 -2
  170. package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -14
  171. package/lib/modules/whiteboard/components/toolbar/components/item/index.js +3 -2
  172. package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +1 -1
  173. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +58 -16
  174. package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +15 -4
  175. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +45 -2
  176. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
  177. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +235 -7
  178. package/lib/modules/whiteboard/components/toolbar/index.d.ts +1 -1
  179. package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
  180. package/lib/modules/whiteboard/components/toolbar/store.d.ts +13 -2
  181. package/lib/modules/whiteboard/components/toolbar/store.js +74 -24
  182. package/lib/modules/whiteboard/components/toolbar/{ style.css → style.css} +1 -0
  183. package/lib/modules/whiteboard/index.d.ts +2 -0
  184. package/lib/modules/whiteboard/index.js +22 -21
  185. package/lib/modules/whiteboard/style.css +0 -4
  186. package/lib/modules/whiteboard/view.js +8 -2
  187. package/lib/plugins/browser-runtime-plugin.js +10 -1
  188. package/lib/providers/annotation-provider.d.ts +128 -0
  189. package/lib/providers/annotation-provider.js +421 -0
  190. package/lib/providers/device-provider.d.ts +3 -3
  191. package/lib/providers/device-provider.js +8 -6
  192. package/lib/providers/event-provider.d.ts +3 -3
  193. package/lib/providers/interpreter-provider.d.ts +1 -0
  194. package/lib/providers/interpreter-provider.js +182 -154
  195. package/lib/providers/privilege-provider.d.ts +35 -6
  196. package/lib/providers/privilege-provider.js +105 -49
  197. package/lib/providers/renderer-provider.js +3 -7
  198. package/lib/providers/room-provider.d.ts +13 -1
  199. package/lib/providers/room-provider.js +21 -7
  200. package/lib/providers/screen-share-provider.d.ts +131 -34
  201. package/lib/providers/screen-share-provider.js +554 -173
  202. package/lib/providers/sharing-provider.d.ts +37 -0
  203. package/lib/{shared-data-source/screen-share-data-source.js → providers/sharing-provider.js} +102 -39
  204. package/lib/providers/user-setting-storage-provider.d.ts +20 -0
  205. package/lib/providers/user-setting-storage-provider.js +74 -0
  206. package/lib/runtime.d.ts +6 -1
  207. package/lib/scenes/main-scene.d.ts +7 -2
  208. package/lib/scenes/main-scene.js +55 -27
  209. package/lib/scenes/waiting-scene.d.ts +6 -0
  210. package/lib/scenes/waiting-scene.js +15 -5
  211. package/lib/shared-data-source/config.d.ts +1 -5
  212. package/lib/shared-data-source/config.js +11 -81
  213. package/lib/shared-data-source/member-data.d.ts +21 -5
  214. package/lib/shared-data-source/member-data.js +69 -17
  215. package/lib/shared-data-source/screen-share-data.d.ts +274 -0
  216. package/lib/shared-data-source/screen-share-data.js +390 -0
  217. package/lib/shared-data-source/security-data.d.ts +4 -1
  218. package/lib/shared-data-source/security-data.js +5 -2
  219. package/lib/shared-data-source/setting.d.ts +13 -13
  220. package/lib/shared-data-source/setting.js +16 -10
  221. package/lib/shared-data-source/video-window.d.ts +2 -1
  222. package/lib/shared-data-source/video-window.js +56 -36
  223. package/lib/translations/enUS.d.ts +8 -0
  224. package/lib/translations/enUS.js +9 -1
  225. package/lib/translations/zhCN.d.ts +8 -0
  226. package/lib/translations/zhCN.js +11 -3
  227. package/lib/type.d.ts +55 -1
  228. package/lib/ui-manager.d.ts +3 -2
  229. package/lib/ui-manager.js +6 -4
  230. package/lib/ui-scene.js +70 -50
  231. package/lib/utilities/constant.d.ts +10 -2
  232. package/lib/utilities/constant.js +8 -0
  233. package/lib/utilities/logger.d.ts +4 -0
  234. package/lib/utilities/logger.js +8 -1
  235. package/lib/utilities/renderer-event.d.ts +3 -0
  236. package/lib/utilities/renderer-event.js +14 -1
  237. package/lib/utilities/screen.js +2 -1
  238. package/lib/utilities/setting-config-storage.d.ts +5 -6
  239. package/lib/utilities/setting-config-storage.js +33 -39
  240. package/lib/utilities/tools.d.ts +19 -1
  241. package/lib/utilities/tools.js +51 -4
  242. package/package.json +9 -7
  243. package/public/assets/cursors/fcr_whiteboard_input.ico +0 -0
  244. package/public/assets/cursors/fcr_whiteboard_pen.ico +0 -0
  245. package/public/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
  246. package/public/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
  247. package/public/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
  248. package/public/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
  249. package/public/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
  250. package/public/assets/fcr_chat_reddot.svg +3 -3
  251. package/public/assets/fcr_grid_big.svg +1 -1
  252. package/public/assets/fcr_leave2.svg +14 -14
  253. package/public/assets/fcr_listontop_big.svg +1 -1
  254. package/public/assets/step-gradient.svg +1 -1
  255. package/public/fragment.html +10 -0
  256. package/public/index.html +3 -1
  257. package/lib/shared-data-source/screen-share-data-source.d.ts +0 -37
@@ -43,25 +43,21 @@ require("core-js/modules/es.array.for-each.js");
43
43
  require("core-js/modules/es.array.includes.js");
44
44
  require("core-js/modules/es.array.iterator.js");
45
45
  require("core-js/modules/es.array.push.js");
46
- require("core-js/modules/es.array.some.js");
47
46
  require("core-js/modules/es.date.to-json.js");
48
47
  require("core-js/modules/es.function.bind.js");
49
48
  require("core-js/modules/es.json.stringify.js");
50
49
  require("core-js/modules/es.object.to-string.js");
51
50
  require("core-js/modules/es.promise.js");
52
- require("core-js/modules/es.promise.finally.js");
53
- require("core-js/modules/es.string.includes.js");
54
51
  require("core-js/modules/es.string.iterator.js");
52
+ require("core-js/modules/es.string.starts-with.js");
55
53
  require("core-js/modules/es.weak-map.js");
56
54
  require("core-js/modules/esnext.async-iterator.filter.js");
57
55
  require("core-js/modules/esnext.async-iterator.find.js");
58
56
  require("core-js/modules/esnext.async-iterator.for-each.js");
59
- require("core-js/modules/esnext.async-iterator.some.js");
60
57
  require("core-js/modules/esnext.iterator.constructor.js");
61
58
  require("core-js/modules/esnext.iterator.filter.js");
62
59
  require("core-js/modules/esnext.iterator.find.js");
63
60
  require("core-js/modules/esnext.iterator.for-each.js");
64
- require("core-js/modules/esnext.iterator.some.js");
65
61
  require("core-js/modules/esnext.weak-map.delete-all.js");
66
62
  require("core-js/modules/esnext.weak-map.emplace.js");
67
63
  require("core-js/modules/web.dom-collections.for-each.js");
@@ -73,26 +69,21 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
73
69
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
74
70
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
75
71
  var _fcrCore = require("fcr-core");
76
- var _rendererEvent = require("../../utilities/renderer-event");
77
- var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
78
72
  var _env = require("agora-foundation/lib/utilities/env");
79
73
  var _type = require("agora-rte-sdk/lib/core/rtc/type");
80
- var _type2 = require("agora-rte-sdk/lib/core/scene/type");
81
- var _type3 = require("agora-rte-sdk/lib/type");
82
74
  var _shareAudio = require("agora-ui-foundation/lib/components/room-screen-share-state-bar/share-audio");
83
75
  var _mobx = require("mobx");
84
76
  var _i18n = require("agora-ui-foundation/lib/i18n");
85
77
  var _decorator = require("agora-foundation/lib/decorator");
86
- var _tools = require("../../utilities/tools");
87
78
  var _react = require("react");
88
- var _type4 = require("agora-ui-foundation/lib/components/icon/type");
79
+ var _type2 = require("agora-ui-foundation/lib/components/icon/type");
89
80
  var _renderer = require("../../utilities/renderer");
90
81
  var _screenCapturePermission = require("../../utilities/screen-capture-permission");
91
82
  var _constant = require("../../utilities/constant");
92
83
  var _logger = require("../../utilities/logger");
93
84
  var _parameters = require("../../utilities/parameters");
94
85
  var _ShareScreenStore;
95
- var _initProto, _init_screenSharingState, _init_applicationCaptureSources, _init_screenCaptureSources, _init_currentSelection, _init_currentSelectionType, _init_shareWithAudio, _init_boardOwnerUser, _init_currentSelectionBounds, _init_connectionState, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _hasLoopbackDeviceDecs, _setShareAudioProcessingChannelDecs, _openRelaunchTipsDialogDecs, _startPreviewDecs, _handleStopShareDecs, _handleStartShareDecs, _startLoopbackDecs, _handleShareStartWithAudioDecs, _handleShareStopWithAudioDecs, _openShareScreenSelectionDecs, _closeShareScreenSelectionDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _setWithAudioStateDecs, _handleReplaceScreenDecs, _handleScreenCaptureStateUpdatedDecs, _setShareLockDecs, _handleStreamUpdateDecs, _initControlbarDecs, _ref;
86
+ var _initProto, _init_boardOwnerUser, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _hasLoopbackDeviceDecs, _setShareAudioProcessingChannelDecs, _openRelaunchTipsDialogDecs, _startRenderSharePreviewDecs, _stopRenderSharePreviewDecs, _handleStopShareDecs, _handleStartShareDecs, _openShareScreenSelectionDecs, _closeShareScreenSelectionDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _handleReplaceScreenDecs, _initControlbarDecs, _ref;
96
87
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
97
88
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
98
89
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -104,15 +95,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
104
95
  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; }
105
96
  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; }
106
97
  var _A = /*#__PURE__*/new WeakMap();
107
- var _B = /*#__PURE__*/new WeakMap();
108
- var _C = /*#__PURE__*/new WeakMap();
109
- var _D = /*#__PURE__*/new WeakMap();
110
- var _E = /*#__PURE__*/new WeakMap();
111
- var _F = /*#__PURE__*/new WeakMap();
112
- var _G = /*#__PURE__*/new WeakMap();
113
- var _H = /*#__PURE__*/new WeakMap();
114
- var _I = /*#__PURE__*/new WeakMap();
115
- _ref = (_handleChooseScreenDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _hasLoopbackDeviceDecs = [_mobx.action, _mobx.action.bound], _setShareAudioProcessingChannelDecs = [_mobx.action, _mobx.action.bound], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _startPreviewDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _startLoopbackDecs = [_mobx.action, _mobx.action.bound], _handleShareStartWithAudioDecs = [_mobx.action, _mobx.action.bound], _handleShareStopWithAudioDecs = [_mobx.action, _mobx.action.bound], _openShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _closeShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _setControlBarWindowIdDecs = [_mobx.action, _mobx.action.bound], _openVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _closeControlBarDecs = [_mobx.action, _mobx.action.bound], _closeVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _setWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _handleScreenCaptureStateUpdatedDecs = [_mobx.action, _mobx.action.bound], _setShareLockDecs = [_mobx.action, _mobx.action.bound], _handleStreamUpdateDecs = [_mobx.action, _mobx.action.bound], _initControlbarDecs = [_mobx.action, _mobx.action.bound], "logger");
98
+ _ref = (_handleChooseScreenDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _hasLoopbackDeviceDecs = [_mobx.action, _mobx.action.bound], _setShareAudioProcessingChannelDecs = [_mobx.action, _mobx.action.bound], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _startRenderSharePreviewDecs = [_mobx.action, _mobx.action.bound], _stopRenderSharePreviewDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _openShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _closeShareScreenSelectionDecs = [_mobx.action, _mobx.action.bound], _setControlBarWindowIdDecs = [_mobx.action, _mobx.action.bound], _openVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _closeControlBarDecs = [_mobx.action, _mobx.action.bound], _closeVideoWindowDialogDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _initControlbarDecs = [_mobx.action, _mobx.action.bound], "logger");
116
99
  var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
117
100
  function ShareScreenStore(_ref2) {
118
101
  var _this = this;
@@ -125,48 +108,34 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
125
108
  sharedMemberDataSource = _ref2.sharedMemberDataSource,
126
109
  roomProvider = _ref2.roomProvider,
127
110
  sharedConfigDataSource = _ref2.sharedConfigDataSource,
128
- connectionProvider = _ref2.connectionProvider,
129
- screenShareDataSource = _ref2.screenShareDataSource;
111
+ screenShareProvider = _ref2.screenShareProvider,
112
+ annotationProvider = _ref2.annotationProvider,
113
+ sharedScreenShareSharedDataSource = _ref2.sharedScreenShareSharedDataSource,
114
+ connectionProvider = _ref2.connectionProvider;
130
115
  (0, _classCallCheck2["default"])(this, ShareScreenStore);
131
116
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
132
117
  prefix: 'ShareScreenStore'
133
118
  })));
134
119
  (0, _defineProperty2["default"])(this, "_disposers", []);
135
120
  (0, _defineProperty2["default"])(this, "_controlBarWindowId", -1);
136
- (0, _defineProperty2["default"])(this, "_currentShareStreamId", '');
137
121
  (0, _defineProperty2["default"])(this, "_removeScreenStreamFailed", false);
138
- (0, _defineProperty2["default"])(this, "_isReplaceScreen", false);
139
- (0, _defineProperty2["default"])(this, "_previewDom", null);
140
- (0, _defineProperty2["default"])(this, "_connectionObserver", {
141
- onConnectionStateUpdated: function onConnectionStateUpdated(state) {
142
- _this.connectionState = state;
143
- }
144
- });
122
+ (0, _defineProperty2["default"])(this, "_isOnline", true);
145
123
  (0, _defineProperty2["default"])(this, "_roomObserver", {
146
124
  onRoomClosed: this.handleStopShare,
147
125
  onLeaveMainRoom: this.handleStopShare
148
126
  });
149
- (0, _defineProperty2["default"])(this, "_observer", {
150
- onScreenCaptureStateUpdated: (0, _env.isElectron)() ? this._handleScreenCaptureStateUpdated : this._handleWebScreenCaptureStateUpdated
151
- });
152
127
  (0, _defineProperty2["default"])(this, "_uiEventObserver", {
153
128
  onEvent: this._onUiEvent.bind(this)
154
129
  });
155
- (0, _defineProperty2["default"])(this, "_streamObserver", {
156
- onStreamsAdded: function onStreamsAdded(_, events) {
157
- return _this._handleStreamUpdate('add', events);
158
- },
159
- onStreamsRemoved: function onStreamsRemoved(_, events) {
160
- return _this._handleStreamUpdate('remove', events);
161
- },
162
- onStreamsUpdated: function onStreamsUpdated(_, events) {
163
- return _this._handleStreamUpdate('update', events);
164
- }
130
+ (0, _defineProperty2["default"])(this, "_screenCaptureStateObserver", {
131
+ onScreenCaptureStopped: this._handleOnScreenCaptureStopped.bind(this),
132
+ onScreenShareReplaceBegin: this._handleOnScreenShareReplaceBegin.bind(this),
133
+ onScreenCaptureStarted: this._handleOnScreenCaptureStarted.bind(this)
165
134
  });
166
135
  (0, _defineProperty2["default"])(this, "_boardObserver", {
167
136
  onActive: function onActive(ownerId) {
168
137
  _this.handleStopShare();
169
- (0, _env.isElectron)() && _this._closeCapture();
138
+ _this._closeShareScreenComps();
170
139
  _this._closeShareScreenSelection();
171
140
  _this.boardOwnerUser = _this._userControl.getUser(ownerId);
172
141
  },
@@ -174,37 +143,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
174
143
  _this.boardOwnerUser = undefined;
175
144
  }
176
145
  });
177
- (0, _defineProperty2["default"])(this, "_loopbackAudioSourceId", (0, _env.getPlatform)() === _env.FcrApplicationPlatform.MACOS && (0, _env.isElectron)() ? 'AgoraALD' : (0, _env.isElectron)() ? '' : 'default');
178
146
  (0, _defineProperty2["default"])(this, "_shareSelectionDialogId", '');
179
147
  (0, _defineProperty2["default"])(this, "_controlBarDialogId", '');
180
148
  (0, _defineProperty2["default"])(this, "_videoWindowDialogId", '');
181
- (0, _defineProperty2["default"])(this, "_shareLocked", false);
182
- (0, _defineProperty2["default"])(this, "_screenTrack", null);
183
- (0, _defineProperty2["default"])(this, "_shareAudioTrack", null);
184
- (0, _defineProperty2["default"])(this, "_currentShareId", '');
185
- (0, _defineProperty2["default"])(this, "_currentShareType", _type.AgoraRtcScreenCaptureType.SCREEN);
186
- (0, _defineProperty2["default"])(this, "_isOnline", true);
187
- _classPrivateFieldInitSpec(this, _A, _init_screenSharingState(this, _fcrCore.FcrMediaSourceState.CLOSE));
188
- _classPrivateFieldInitSpec(this, _B, _init_applicationCaptureSources(this, []));
189
- _classPrivateFieldInitSpec(this, _C, _init_screenCaptureSources(this, []));
190
- _classPrivateFieldInitSpec(this, _D, _init_currentSelection(this, (0, _env.isElectron)() ? '' : 'default'));
191
- _classPrivateFieldInitSpec(this, _E, _init_currentSelectionType(this, _type.AgoraRtcScreenCaptureType.WINDOW));
192
- _classPrivateFieldInitSpec(this, _F, _init_shareWithAudio(this, !(0, _env.isElectron)()));
193
- // electron 默认 false,web 默认 true
194
- _classPrivateFieldInitSpec(this, _G, _init_boardOwnerUser(this, undefined));
195
- _classPrivateFieldInitSpec(this, _H, _init_currentSelectionBounds(this, {
196
- x: 0,
197
- y: 0,
198
- width: 0,
199
- height: 0
200
- }));
201
- _classPrivateFieldInitSpec(this, _I, _init_connectionState(this, _fcrCore.FcrConnectionState.CONNECTED));
149
+ _classPrivateFieldInitSpec(this, _A, _init_boardOwnerUser(this, undefined));
202
150
  (0, _defineProperty2["default"])(this, "handleChooseScreen", _init_handleChooseScreen(this, function (id) {
203
151
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type.AgoraRtcScreenCaptureType.WINDOW;
204
152
  var bounds = arguments.length > 2 ? arguments[2] : undefined;
205
- _this.currentSelection = id;
206
- _this.currentSelectionType = type;
207
- _this.currentSelectionBounds = bounds;
153
+ _this._sharedScreenShareSharedDataSource.setCurrentSelection(id, type, bounds);
208
154
  }));
209
155
  this._deviceProvider = deviceProvider;
210
156
  this._messageProvider = messageProvider;
@@ -213,18 +159,17 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
213
159
  this._securityStore = privilegeProvider;
214
160
  this._roomProvider = roomProvider;
215
161
  this._sharedMemberDataSource = sharedMemberDataSource;
162
+ this._screenShareProvider = screenShareProvider;
163
+ this._annotationProvider = annotationProvider;
164
+ this._sharedScreenShareSharedDataSource = sharedScreenShareSharedDataSource;
216
165
  this._connectionProvider = connectionProvider;
217
- this._screenShareDataSource = screenShareDataSource;
218
- this._streamControl = roomControl.getStreamControl();
219
166
  this._userControl = roomControl.getUserControl();
220
- this._boardControl = roomControl.getBoardControl();
167
+ this._boardControl = roomControl.getSharingControl().getBoardControl();
221
168
  this._roomProvider.addObserver(this._roomObserver);
222
169
  this._eventProvider.addObserver(this._uiEventObserver);
223
- this._streamControl.addObserver(this._streamObserver);
224
170
  this._boardControl.addObserver(this._boardObserver);
225
- this._connectionProvider.addObserver(this._connectionObserver);
171
+ this._screenShareProvider.addObserver(this._screenCaptureStateObserver);
226
172
  this._addEventListeners();
227
- this._syncShareStreamState();
228
173
  if ((0, _parameters.getStartScreenSharing)(sharedConfigDataSource.creatorConfig.parameters)) {
229
174
  var display = window.runtime.screen.getAllDisplays()[0];
230
175
  this.handleStartShare(String(display.id), _type.AgoraRtcScreenCaptureType.SCREEN, false, _shareAudio.AudioProcessingChannel.MONO, display.bounds);
@@ -240,10 +185,22 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
240
185
  duration: 3000
241
186
  });
242
187
  }
188
+ }), (0, _mobx.reaction)(function () {
189
+ return _this.connectionState;
190
+ }, function (val) {
191
+ var needCloseState = val === _fcrCore.FcrConnectionState.ABORTED || val === _fcrCore.FcrConnectionState.DISCONNECTED;
192
+ _this.logger.info("[screen-share]: connection state changed to ".concat(val, ", need close state: ").concat(needCloseState));
193
+ if (needCloseState) {
194
+ _this.handleStopShare();
195
+ }
243
196
  }));
197
+ if ((0, _env.isElectron)()) {
198
+ window.runtime.browserWindow.addListener('show', this._handleBrowserShow);
199
+ window.runtime.browserWindow.addListener('hide', this._hendleBrowserHide);
200
+ }
244
201
  }
245
202
  return (0, _createClass2["default"])(ShareScreenStore, [{
246
- key: "screenSharingState",
203
+ key: "boardOwnerUser",
247
204
  get: function get() {
248
205
  return _classPrivateFieldGet(_A, this);
249
206
  },
@@ -251,108 +208,138 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
251
208
  _classPrivateFieldSet(_A, this, v);
252
209
  }
253
210
  }, {
254
- key: "applicationCaptureSources",
211
+ key: "currentShareStreamId",
255
212
  get: function get() {
256
- return _classPrivateFieldGet(_B, this);
257
- },
258
- set: function set(v) {
259
- _classPrivateFieldSet(_B, this, v);
213
+ return this._sharedScreenShareSharedDataSource.currentShareStreamId;
260
214
  }
261
215
  }, {
262
- key: "screenCaptureSources",
216
+ key: "screenTrack",
263
217
  get: function get() {
264
- return _classPrivateFieldGet(_C, this);
265
- },
266
- set: function set(v) {
267
- _classPrivateFieldSet(_C, this, v);
218
+ return this._sharedScreenShareSharedDataSource.screenTrack;
268
219
  }
269
220
  }, {
270
- key: "currentSelection",
221
+ key: "currentShareType",
271
222
  get: function get() {
272
- return _classPrivateFieldGet(_D, this);
273
- },
274
- set: function set(v) {
275
- _classPrivateFieldSet(_D, this, v);
223
+ return this._sharedScreenShareSharedDataSource.currentShareType;
276
224
  }
277
225
  }, {
278
- key: "currentSelectionType",
226
+ key: "localUser",
279
227
  get: function get() {
280
- return _classPrivateFieldGet(_E, this);
281
- },
282
- set: function set(v) {
283
- _classPrivateFieldSet(_E, this, v);
228
+ return this._sharedMemberDataSource.localUser;
284
229
  }
285
230
  }, {
286
- key: "shareWithAudio",
231
+ key: "localUserRole",
287
232
  get: function get() {
288
- return _classPrivateFieldGet(_F, this);
289
- },
290
- set: function set(v) {
291
- _classPrivateFieldSet(_F, this, v);
233
+ return this._sharedMemberDataSource.localUserRole;
292
234
  }
293
235
  }, {
294
- key: "boardOwnerUser",
236
+ key: "isHost",
295
237
  get: function get() {
296
- return _classPrivateFieldGet(_G, this);
297
- },
298
- set: function set(v) {
299
- _classPrivateFieldSet(_G, this, v);
238
+ return this._sharedMemberDataSource.isLocalUserHost;
300
239
  }
301
240
  }, {
302
- key: "currentSelectionBounds",
241
+ key: "supportEnumScreen",
303
242
  get: function get() {
304
- return _classPrivateFieldGet(_H, this);
305
- },
306
- set: function set(v) {
307
- _classPrivateFieldSet(_H, this, v);
243
+ return this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE);
244
+ }
245
+ }, {
246
+ key: "appWindowList",
247
+ get: function get() {
248
+ return this._sharedScreenShareSharedDataSource.appWindowList;
249
+ }
250
+ }, {
251
+ key: "displayList",
252
+ get: function get() {
253
+ return this._sharedScreenShareSharedDataSource.displayList;
308
254
  }
309
255
  }, {
310
256
  key: "connectionState",
311
257
  get: function get() {
312
- return _classPrivateFieldGet(_I, this);
313
- },
314
- set: function set(v) {
315
- _classPrivateFieldSet(_I, this, v);
258
+ return this._sharedScreenShareSharedDataSource.connectionState;
316
259
  }
317
260
  }, {
318
- key: "localUser",
261
+ key: "screenSharingState",
319
262
  get: function get() {
320
- return this._sharedMemberDataSource.localUser;
263
+ return this._sharedScreenShareSharedDataSource.screenSharingState;
321
264
  }
322
265
  }, {
323
- key: "localUserRole",
266
+ key: "applicationCaptureSources",
324
267
  get: function get() {
325
- return this._sharedMemberDataSource.localUserRole;
268
+ return this._sharedScreenShareSharedDataSource.applicationCaptureSources;
326
269
  }
327
270
  }, {
328
- key: "isHost",
271
+ key: "screenCaptureSources",
329
272
  get: function get() {
330
- return this._sharedMemberDataSource.isLocalUserHost;
273
+ return this._sharedScreenShareSharedDataSource.screenCaptureSources;
331
274
  }
332
275
  }, {
333
- key: "supportEnumScreen",
276
+ key: "currentShareAudioProcessingChannel",
334
277
  get: function get() {
335
- return this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE);
278
+ return this._sharedScreenShareSharedDataSource.currentShareAudioProcessingChannel;
336
279
  }
337
280
  }, {
338
- key: "appWindowList",
281
+ key: "currentSelectionId",
339
282
  get: function get() {
340
- return this._deviceProvider.getWindowList();
283
+ return this._sharedScreenShareSharedDataSource.currentSelectionId;
341
284
  }
342
285
  }, {
343
- key: "displayList",
286
+ key: "currentSelectionType",
344
287
  get: function get() {
345
- return this._deviceProvider.getDisplayList();
288
+ return this._sharedScreenShareSharedDataSource.currentSelectionType;
346
289
  }
347
290
  }, {
348
- key: "currentShareAudioProcessingChannel",
291
+ key: "shareWithAudio",
349
292
  get: function get() {
350
- return this._screenShareDataSource.currentShareAudioProcessingChannel;
293
+ return this._sharedScreenShareSharedDataSource.shareWithAudio;
294
+ }
295
+ }, {
296
+ key: "currentSelectionBounds",
297
+ get: function get() {
298
+ return this._sharedScreenShareSharedDataSource.currentSelectionBounds;
299
+ }
300
+ }, {
301
+ key: "shareLock",
302
+ get: function get() {
303
+ return this._screenShareProvider.shareLock;
304
+ }
305
+ }, {
306
+ key: "currentShareId",
307
+ get: function get() {
308
+ return this._sharedScreenShareSharedDataSource.currentShareId;
309
+ }
310
+ }, {
311
+ key: "_screenShareInfoForLog",
312
+ get: function get() {
313
+ return "Screen Share Info : ".concat(JSON.stringify({
314
+ isSharingScreen: this.screenSharingState,
315
+ currentShareId: this.currentShareId,
316
+ currentShareType: this.currentShareType,
317
+ currentShareBounds: this.currentSelectionBounds
318
+ }));
319
+ }
320
+ }, {
321
+ key: "_handleOnScreenCaptureStopped",
322
+ value: function _handleOnScreenCaptureStopped() {
323
+ this.handleStopShare();
324
+ }
325
+ }, {
326
+ key: "_handleOnScreenCaptureStarted",
327
+ value: function _handleOnScreenCaptureStarted() {
328
+ this.prepareShareScreen();
329
+ }
330
+ }, {
331
+ key: "_hasScreenSharePermission",
332
+ value: function _hasScreenSharePermission() {
333
+ if (!this._securityStore.hasStartScreenSharePermission()) {
334
+ this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
335
+ return false;
336
+ }
337
+ return true;
351
338
  }
352
339
  }, {
353
340
  key: "setShareWithAudioState",
354
341
  value: function setShareWithAudioState(withAudio) {
355
- this.shareWithAudio = withAudio;
342
+ this._sharedScreenShareSharedDataSource.setShareWithAudio(withAudio);
356
343
  }
357
344
  }, {
358
345
  key: "hasLoopbackDevice",
@@ -380,8 +367,8 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
380
367
  }()
381
368
  }, {
382
369
  key: "setShareAudioProcessingChannel",
383
- value: function setShareAudioProcessingChannel(channel) {
384
- this._screenShareDataSource.setCurrentShareAudioProcessingChannel(channel);
370
+ value: function setShareAudioProcessingChannel(currentShareAudioProcessingChannel) {
371
+ this._sharedScreenShareSharedDataSource.setCurrentShareAudioProcessingChannel(currentShareAudioProcessingChannel);
385
372
  }
386
373
  }, {
387
374
  key: "handlerBoardShareStop",
@@ -391,19 +378,22 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
391
378
  }, {
392
379
  key: "release",
393
380
  value: function release() {
394
- var _this$_screenTrack;
395
381
  this._disposers.forEach(function (disposer) {
396
382
  return disposer();
397
383
  });
398
384
  this._disposers = [];
399
- this._closeCapture();
400
- this._removeEventListeners();
385
+ this._closeShareScreenComps();
401
386
  this._eventProvider.removeObserver(this._uiEventObserver);
402
- this._streamControl.removeObserver(this._streamObserver);
403
- (_this$_screenTrack = this._screenTrack) === null || _this$_screenTrack === void 0 || _this$_screenTrack.removeObserver(this._observer);
387
+ // this.screenTrack?.removeObserver(this._observer);
388
+ this._screenShareProvider.removeObserver(this._screenCaptureStateObserver);
389
+ this._screenShareProvider.release();
404
390
  this._boardControl.removeObserver(this._boardObserver);
405
391
  this._roomProvider.removeObserver(this._roomObserver);
406
- this._connectionProvider.removeObserver(this._connectionObserver);
392
+ this._removeEventListeners();
393
+ if ((0, _env.isElectron)()) {
394
+ window.runtime.browserWindow.removeListener('show', this._handleBrowserShow);
395
+ window.runtime.browserWindow.removeListener('hide', this._hendleBrowserHide);
396
+ }
407
397
  }
408
398
  }, {
409
399
  key: "openRelaunchTipsDialog",
@@ -424,30 +414,20 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
424
414
  });
425
415
  }
426
416
  }, {
427
- key: "startPreview",
428
- value: function startPreview(dom) {
429
- this._previewDom = dom;
430
- if (dom) {
431
- var _this$_screenTrack2;
432
- (_this$_screenTrack2 = this._screenTrack) === null || _this$_screenTrack2 === void 0 || _this$_screenTrack2.startPreview({
433
- renderMode: 1,
434
- isMirror: false
435
- }, dom);
436
- } else {
437
- var _this$_screenTrack3;
438
- (_this$_screenTrack3 = this._screenTrack) === null || _this$_screenTrack3 === void 0 || _this$_screenTrack3.stopPreview(dom);
439
- this._previewDom = null;
440
- }
417
+ key: "startRenderSharePreview",
418
+ value: function startRenderSharePreview(dom) {
419
+ this._screenShareProvider.startRenderSharePreview(dom);
420
+ }
421
+ }, {
422
+ key: "stopRenderSharePreview",
423
+ value: function stopRenderSharePreview(screenTrack) {
424
+ this._screenShareProvider.stopRenderSharePreview(screenTrack);
441
425
  }
442
426
  }, {
443
427
  key: "handleStopShare",
444
428
  value: function handleStopShare() {
445
- var _this$_screenTrack4, _this$_screenTrack5;
446
- this._closeCapture();
447
- this._removeScreenStream();
448
- this._previewDom && ((_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 ? void 0 : _this$_screenTrack4.stopPreview(this._previewDom));
449
- (_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0 || _this$_screenTrack5.stop();
450
- this._currentShareId = '';
429
+ this._closeShareScreenComps();
430
+ this._screenShareProvider.stopShareScreen();
451
431
  }
452
432
  }, {
453
433
  key: "prepareShareScreen",
@@ -479,7 +459,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
479
459
  return _context2.abrupt("return");
480
460
  case 3:
481
461
  this.supportEnumScreen && this._openShareScreenSelection();
482
- !(0, _env.isElectron)() && this.handleStartShare(this.currentSelection, _type.AgoraRtcScreenCaptureType.SCREEN, true, _shareAudio.AudioProcessingChannel.MONO, this.currentSelectionBounds); // web 直接开始分享
462
+ !(0, _env.isElectron)() && this.handleStartShare(this.currentSelectionId, _type.AgoraRtcScreenCaptureType.SCREEN, true, _shareAudio.AudioProcessingChannel.MONO, this.currentSelectionBounds);
483
463
  case 5:
484
464
  case "end":
485
465
  return _context2.stop();
@@ -497,9 +477,8 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
497
477
  var _handleStartShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(id, type, withAudio) {
498
478
  var audioProcessingChannel,
499
479
  bounds,
500
- excludeWindows,
501
480
  electronBounds,
502
- screenTrack,
481
+ hasValidShare,
503
482
  _args3 = arguments;
504
483
  return _regenerator["default"].wrap(function _callee3$(_context3) {
505
484
  while (1) switch (_context3.prev = _context3.next) {
@@ -513,93 +492,64 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
513
492
  this._showToast((0, _i18n.transI18n)('fmt_screenshare_toast_network_error_unable_start_screen_share'), 'error');
514
493
  return _context3.abrupt("return", Promise.reject(false));
515
494
  case 5:
516
- excludeWindows = [];
517
495
  if ((0, _env.isElectron)()) this._closeShareScreenSelection();
518
- if (!(id.split('-')[0] === 'whiteboard')) {
519
- _context3.next = 12;
496
+ if (!id.startsWith('whiteboard-')) {
497
+ _context3.next = 11;
520
498
  break;
521
499
  }
522
500
  if (!(!this._securityStore.hasStartBoardPermission() && !this.isHost)) {
523
- _context3.next = 10;
501
+ _context3.next = 9;
524
502
  break;
525
503
  }
526
504
  return _context3.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_hostprohibits'), 'error'));
527
- case 10:
505
+ case 9:
528
506
  this._eventProvider.sendEvent(_constant.FcrUIAction.OPEN_WHITEBOARD);
529
507
  return _context3.abrupt("return");
530
- case 12:
508
+ case 11:
531
509
  electronBounds = (0, _env.isElectron)() ? window.runtime.screen.getDisplayNearestPoint(bounds) : null;
532
- this._screenShareDataSource.setCurrentShareBounds((electronBounds === null || electronBounds === void 0 ? void 0 : electronBounds.bounds) || bounds);
533
- if (!(this.screenSharingState === _fcrCore.FcrMediaSourceState.OPEN)) {
534
- _context3.next = 18;
535
- break;
536
- }
537
- this._handleReplaceScreen(id, type, withAudio, audioProcessingChannel, bounds);
538
- this._setShareLock(false);
539
- return _context3.abrupt("return");
540
- case 18:
541
- this._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
510
+ this._sharedScreenShareSharedDataSource.setCurrentSelectionBounds((electronBounds === null || electronBounds === void 0 ? void 0 : electronBounds.bounds) || bounds);
511
+ this.logger.info("[screen-share][handleStartShare]: currentShareInfo: ".concat(JSON.stringify({
512
+ id: id,
513
+ type: type,
514
+ bounds: bounds
515
+ })));
516
+ this._annotationProvider.setCurrentShareInfo({
542
517
  id: id,
543
518
  type: type,
544
519
  bounds: bounds
545
520
  });
546
- _context3.t0 = this.supportEnumScreen;
547
- if (!_context3.t0) {
548
- _context3.next = 24;
521
+ this._annotationProvider.setBoundsToAnnotationWindow({
522
+ id: id,
523
+ type: type,
524
+ bounds: bounds
525
+ });
526
+ if (!(this.screenSharingState === _fcrCore.FcrMediaSourceState.OPEN)) {
527
+ _context3.next = 19;
549
528
  break;
550
529
  }
551
- _context3.next = 23;
530
+ this._handleReplaceScreen(id, type, withAudio, audioProcessingChannel, bounds);
531
+ return _context3.abrupt("return");
532
+ case 19:
533
+ _context3.next = 21;
552
534
  return this._validateShareStart(id, type);
553
- case 23:
554
- _context3.t0 = !_context3.sent;
555
- case 24:
556
- if (!_context3.t0) {
557
- _context3.next = 26;
535
+ case 21:
536
+ hasValidShare = _context3.sent;
537
+ if (!(!this._hasScreenSharePermission() || this.supportEnumScreen && !hasValidShare)) {
538
+ _context3.next = 24;
558
539
  break;
559
540
  }
560
541
  return _context3.abrupt("return");
561
- case 26:
562
- if (!this._shareLocked) {
563
- _context3.next = 28;
542
+ case 24:
543
+ if (!this.shareLock) {
544
+ _context3.next = 26;
564
545
  break;
565
546
  }
566
547
  return _context3.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_enablecollection'), 'error'));
567
- case 28:
568
- this._setShareLock(true);
569
- this.setShareWithAudioState(withAudio);
570
- this._currentShareId = id;
571
- this._currentShareType = type;
572
- this.currentSelectionBounds = bounds;
573
- if (withAudio) this._handleShareStartWithAudio();
574
- if (this._hasScreenSharePermission()) {
575
- _context3.next = 37;
576
- break;
577
- }
578
- this._setShareLock(false);
579
- return _context3.abrupt("return");
580
- case 37:
581
- this._initControlbar(); // 初始化控制栏,web 和 electron 都需要执行
582
- if (!(0, _env.isElectron)()) {
583
- _context3.next = 44;
584
- break;
585
- }
586
- _context3.next = 41;
587
- return this._createScreenStream(id);
588
- case 41:
589
- _context3.next = 43;
590
- return this._getExcludeWindows();
591
- case 43:
592
- excludeWindows = _context3.sent;
593
- case 44:
594
- screenTrack = this._deviceProvider.getScreenTrack(id);
595
- this._screenTrack = screenTrack;
596
- screenTrack.addObserver(this._observer);
597
- screenTrack.start(type, {
598
- // preview: true,
599
- withAudio: withAudio,
600
- excludeWindows: excludeWindows
601
- });
602
- case 48:
548
+ case 26:
549
+ this._sharedScreenShareSharedDataSource.setCurrentShareIdInfos(id, type, bounds);
550
+ this._screenShareProvider.startShareScreen(id, type, withAudio, false);
551
+ this._initControlbar();
552
+ case 29:
603
553
  case "end":
604
554
  return _context3.stop();
605
555
  }
@@ -610,83 +560,41 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
610
560
  }
611
561
  return handleStartShare;
612
562
  }()
613
- }, {
614
- key: "_startLoopback",
615
- value: function () {
616
- var _startLoopback2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(withAudio) {
617
- return _regenerator["default"].wrap(function _callee4$(_context4) {
618
- while (1) switch (_context4.prev = _context4.next) {
619
- case 0:
620
- this._setWithAudioState(withAudio);
621
- if (withAudio) {
622
- this._handleShareStartWithAudio();
623
- } else {
624
- this._handleShareStopWithAudio();
625
- }
626
- case 2:
627
- case "end":
628
- return _context4.stop();
629
- }
630
- }, _callee4, this);
631
- }));
632
- function _startLoopback(_x4) {
633
- return _startLoopback2.apply(this, arguments);
634
- }
635
- return _startLoopback;
636
- }()
637
- }, {
638
- key: "_handleShareStartWithAudio",
639
- value: function _handleShareStartWithAudio() {
640
- this._shareAudioTrack = this._deviceProvider.getLoopbackTrack(this._loopbackAudioSourceId);
641
- if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
642
- this._shareAudioTrack.start();
643
- }
644
- }
645
- }, {
646
- key: "_handleShareStopWithAudio",
647
- value: function _handleShareStopWithAudio() {
648
- if (!this._shareAudioTrack) {
649
- return;
650
- }
651
- if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
652
- this._shareAudioTrack.stop();
653
- }
654
- }
655
563
  }, {
656
564
  key: "_openShareScreenSelection",
657
565
  value: function () {
658
- var _openShareScreenSelection2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
566
+ var _openShareScreenSelection2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
659
567
  var _this4 = this;
660
568
  var windowList, displayList;
661
- return _regenerator["default"].wrap(function _callee5$(_context5) {
662
- while (1) switch (_context5.prev = _context5.next) {
569
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
570
+ while (1) switch (_context4.prev = _context4.next) {
663
571
  case 0:
664
572
  this._shareSelectionDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.SHARE_SCREEN, 'screen-selection');
665
- _context5.next = 3;
573
+ _context4.next = 3;
666
574
  return this.appWindowList;
667
575
  case 3:
668
- windowList = _context5.sent.filter(function (item) {
669
- return !['AgoraHighLighter', 'Toast', 'Confirm'].includes(item.title) || item.isCurrent;
576
+ windowList = _context4.sent.filter(function (item) {
577
+ return !['AgoraHighLighter', 'Toast', 'Confirm', 'Annotation tool bar', 'Annotation', 'Video Window', 'Control Bar'].includes(item.title) || item.isCurrent;
670
578
  });
671
- _context5.next = 6;
579
+ _context4.next = 6;
672
580
  return this.displayList;
673
581
  case 6:
674
- displayList = _context5.sent;
582
+ displayList = _context4.sent;
675
583
  (0, _mobx.runInAction)(function () {
676
- _this4.applicationCaptureSources = windowList.filter(function (item) {
584
+ _this4._sharedScreenShareSharedDataSource.setApplicationCaptureSources(windowList.filter(function (item) {
677
585
  return !item.isCurrent;
678
- });
679
- _this4.screenCaptureSources = [{
586
+ }));
587
+ _this4._sharedScreenShareSharedDataSource.setScreenCaptureSources([{
680
588
  title: (0, _i18n.transI18n)('fmt_share_options_whiteboard'),
681
589
  id: "whiteboard-".concat(displayList[0].id),
682
- image: _type4.FcrIconType.FCR_WHITEBOARD2
683
- }].concat((0, _toConsumableArray2["default"])(displayList));
590
+ image: _type2.FcrIconType.FCR_WHITEBOARD2
591
+ }].concat((0, _toConsumableArray2["default"])(displayList)));
684
592
  });
685
593
  case 8:
686
594
  case "end":
687
- return _context5.stop();
595
+ return _context4.stop();
688
596
  }
689
- }, _callee5, this);
597
+ }, _callee4, this);
690
598
  }));
691
599
  function _openShareScreenSelection() {
692
600
  return _openShareScreenSelection2.apply(this, arguments);
@@ -725,315 +633,40 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
725
633
  this._eventProvider.sendEvent(_constant.FcrUIAction.CLOSE_VIDEO_WINDOW);
726
634
  }
727
635
  }, {
728
- key: "_setWithAudioState",
729
- value: function _setWithAudioState(withAudio) {
730
- this.setShareWithAudioState(withAudio);
731
- if (this._currentShareStreamId) {
732
- this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
733
- audioPrivilege: withAudio ? _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
734
- videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
735
- }));
736
- }
636
+ key: "_handleOnScreenShareReplaceBegin",
637
+ value: function _handleOnScreenShareReplaceBegin(id, type, bounds) {
638
+ this._annotationProvider.setCurrentShareInfo({
639
+ id: id,
640
+ type: type,
641
+ bounds: bounds
642
+ });
643
+ this._annotationProvider.setBoundsToAnnotationWindow({
644
+ id: id,
645
+ type: type,
646
+ bounds: bounds
647
+ });
737
648
  }
738
649
  }, {
739
650
  key: "_handleReplaceScreen",
740
651
  value: function _handleReplaceScreen(id, type, withAudio) {
741
- var _this5 = this;
742
652
  var audioProcessingChannel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _shareAudio.AudioProcessingChannel.MONO;
743
653
  var bounds = arguments.length > 4 ? arguments[4] : undefined;
744
- withAudio = (0, _env.isElectron)() ? withAudio : true; // electron 取 withAudio,web 默认为 true
745
- if (this.shareWithAudio && !withAudio) {
746
- this._handleShareStopWithAudio();
747
- }
748
- this.setShareWithAudioState(withAudio);
749
- var screenTrack = this._screenTrack;
750
- this._isReplaceScreen = true;
751
- if (screenTrack) {
752
- var observer = {
753
- onScreenCaptureStateUpdated: function () {
754
- var _onScreenCaptureStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(sourceId, state) {
755
- var newScreenTrack, excludeWindows;
756
- return _regenerator["default"].wrap(function _callee6$(_context6) {
757
- while (1) switch (_context6.prev = _context6.next) {
758
- case 0:
759
- if (!(state === _fcrCore.FcrMediaSourceState.CLOSE)) {
760
- _context6.next = 19;
761
- break;
762
- }
763
- if ((0, _env.isElectron)()) {
764
- _this5._initControlbar();
765
- }
766
- _this5._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
767
- id: id,
768
- type: type,
769
- bounds: bounds
770
- });
771
- screenTrack.removeObserver(_this5._observer);
772
- screenTrack.removeObserver(observer);
773
- newScreenTrack = _this5._deviceProvider.getScreenTrack(id);
774
- if (withAudio) {
775
- _this5._handleShareStartWithAudio();
776
- }
777
- _this5._screenTrack = newScreenTrack;
778
- excludeWindows = [];
779
- if (!(0, _env.isElectron)()) {
780
- _context6.next = 13;
781
- break;
782
- }
783
- _context6.next = 12;
784
- return _this5._getExcludeWindows();
785
- case 12:
786
- excludeWindows = _context6.sent;
787
- case 13:
788
- newScreenTrack.addObserver(_this5._observer);
789
- newScreenTrack.start(type, {
790
- // preview: true,
791
- withAudio: withAudio,
792
- excludeWindows: excludeWindows
793
- });
794
- if (_this5._currentShareStreamId) {
795
- _this5._streamControl.bindLocalStreams([{
796
- streamId: _this5._currentShareStreamId,
797
- audioSourceId: _this5._loopbackAudioSourceId,
798
- videoSourceId: id
799
- }]);
800
- }
801
- _this5._currentShareId = id;
802
- _this5._currentShareType = type;
803
- _this5.currentSelectionBounds = bounds;
804
- case 19:
805
- case "end":
806
- return _context6.stop();
807
- }
808
- }, _callee6);
809
- }));
810
- function onScreenCaptureStateUpdated(_x5, _x6) {
811
- return _onScreenCaptureStateUpdated.apply(this, arguments);
812
- }
813
- return onScreenCaptureStateUpdated;
814
- }()
815
- };
816
- screenTrack.addObserver(observer);
817
- screenTrack.stop();
818
- this._previewDom && screenTrack.stopPreview(this._previewDom);
819
- }
654
+ this._screenShareProvider.replaceScreenShare(id, type, withAudio, bounds);
820
655
  }
821
- }, {
822
- key: "_createScreenStream",
823
- value: function () {
824
- var _createScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(videoSourceId) {
825
- var _this6 = this;
826
- var audioSourceId, streamId;
827
- return _regenerator["default"].wrap(function _callee7$(_context7) {
828
- while (1) switch (_context7.prev = _context7.next) {
829
- case 0:
830
- if (this._securityStore.hasStartScreenSharePermission()) {
831
- _context7.next = 3;
832
- break;
833
- }
834
- this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
835
- return _context7.abrupt("return", this.handleStopShare());
836
- case 3:
837
- audioSourceId = this._loopbackAudioSourceId;
838
- _context7.next = 6;
839
- return this._streamControl.addLocalScreenStream({
840
- streamType: _type2.AgoraRteMediaStreamType.BOTH,
841
- videoSourceId: videoSourceId,
842
- audioSourceId: audioSourceId
843
- })["finally"](function () {
844
- _this6._setShareLock(false);
845
- });
846
- case 6:
847
- streamId = _context7.sent;
848
- this._currentShareStreamId = streamId;
849
- case 8:
850
- case "end":
851
- return _context7.stop();
852
- }
853
- }, _callee7, this);
854
- }));
855
- function _createScreenStream(_x7) {
856
- return _createScreenStream2.apply(this, arguments);
857
- }
858
- return _createScreenStream;
859
- }()
860
- }, {
861
- key: "_handleWebScreenCaptureStateUpdated",
862
- value: function () {
863
- var _handleWebScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(sourceId, state) {
864
- var _this$_screenTrack6;
865
- return _regenerator["default"].wrap(function _callee8$(_context8) {
866
- while (1) switch (_context8.prev = _context8.next) {
867
- case 0:
868
- this.screenSharingState = state;
869
- if (state === _fcrCore.FcrMediaSourceState.OPEN) {
870
- this._setShareLock(true);
871
- this._createScreenStream(this._currentShareId);
872
- }
873
- if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
874
- this._setShareLock(false);
875
- this._isReplaceScreen ? (_this$_screenTrack6 = this._screenTrack) === null || _this$_screenTrack6 === void 0 ? void 0 : _this$_screenTrack6.stop() : this.handleStopShare();
876
- }
877
- if (state === _fcrCore.FcrMediaSourceState.ERROR) {
878
- this._setShareLock(false);
879
- this._isReplaceScreen = false;
880
- }
881
- case 4:
882
- case "end":
883
- return _context8.stop();
884
- }
885
- }, _callee8, this);
886
- }));
887
- function _handleWebScreenCaptureStateUpdated(_x8, _x9) {
888
- return _handleWebScreenCaptureStateUpdated2.apply(this, arguments);
889
- }
890
- return _handleWebScreenCaptureStateUpdated;
891
- }()
892
- }, {
893
- key: "_handleScreenCaptureStateUpdated",
894
- value: function () {
895
- var _handleScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(sourceId, state) {
896
- var _this$_screenTrack7, _this$_screenTrack8, _this$_screenTrack9;
897
- return _regenerator["default"].wrap(function _callee9$(_context9) {
898
- while (1) switch (_context9.prev = _context9.next) {
899
- case 0:
900
- if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
901
- this._previewDom && ((_this$_screenTrack7 = this._screenTrack) === null || _this$_screenTrack7 === void 0 ? void 0 : _this$_screenTrack7.stopPreview(this._previewDom));
902
- (_this$_screenTrack8 = this._screenTrack) === null || _this$_screenTrack8 === void 0 || _this$_screenTrack8.removeObserver(this._observer);
903
- this._isReplaceScreen ? (_this$_screenTrack9 = this._screenTrack) === null || _this$_screenTrack9 === void 0 ? void 0 : _this$_screenTrack9.stop() : this.handleStopShare();
904
- this._isReplaceScreen = false;
905
- }
906
- if (!(state === _fcrCore.FcrMediaSourceState.ERROR)) {
907
- _context9.next = 6;
908
- break;
909
- }
910
- this.handleStopShare();
911
- this.screenSharingState = _fcrCore.FcrMediaSourceState.CLOSE;
912
- this._isReplaceScreen = false;
913
- return _context9.abrupt("return");
914
- case 6:
915
- this.screenSharingState = state;
916
- case 7:
917
- case "end":
918
- return _context9.stop();
919
- }
920
- }, _callee9, this);
921
- }));
922
- function _handleScreenCaptureStateUpdated(_x10, _x11) {
923
- return _handleScreenCaptureStateUpdated2.apply(this, arguments);
924
- }
925
- return _handleScreenCaptureStateUpdated;
926
- }()
927
656
  }, {
928
657
  key: "_setShareLock",
929
658
  value: function _setShareLock(lock) {
930
- this._shareLocked = lock;
659
+ this._screenShareProvider.setShareLock(lock);
931
660
  }
932
661
  }, {
933
- key: "_closeCapture",
934
- value: function _closeCapture() {
662
+ key: "_closeShareScreenComps",
663
+ value: function _closeShareScreenComps() {
935
664
  if ((0, _env.isElectron)()) {
936
665
  this._closeControlBar();
937
666
  this._closeVideoWindowDialog();
938
667
  window.runtime.browserWindow.show();
939
668
  }
940
669
  }
941
- }, {
942
- key: "_removeScreenStream",
943
- value: function () {
944
- var _removeScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
945
- var streamId, _this$_streamControl;
946
- return _regenerator["default"].wrap(function _callee10$(_context10) {
947
- while (1) switch (_context10.prev = _context10.next) {
948
- case 0:
949
- streamId = this._currentShareStreamId;
950
- if (streamId) {
951
- _context10.next = 3;
952
- break;
953
- }
954
- return _context10.abrupt("return");
955
- case 3:
956
- _context10.prev = 3;
957
- _context10.next = 6;
958
- return (_this$_streamControl = this._streamControl) === null || _this$_streamControl === void 0 ? void 0 : _this$_streamControl.removeScreenStream();
959
- case 6:
960
- this._currentShareStreamId = '';
961
- _context10.next = 13;
962
- break;
963
- case 9:
964
- _context10.prev = 9;
965
- _context10.t0 = _context10["catch"](3);
966
- this._removeScreenStreamFailed = true;
967
- this.logger.error('removeScreenStream error', _context10.t0);
968
- case 13:
969
- case "end":
970
- return _context10.stop();
971
- }
972
- }, _callee10, this, [[3, 9]]);
973
- }));
974
- function _removeScreenStream() {
975
- return _removeScreenStream2.apply(this, arguments);
976
- }
977
- return _removeScreenStream;
978
- }()
979
- }, {
980
- key: "_syncShareStreamState",
981
- value: function _syncShareStreamState() {
982
- var _this$_streamControl$2,
983
- _this7 = this;
984
- var currentShareStreamId = this._currentShareStreamId || ((_this$_streamControl$2 = this._streamControl.getStreamList().find(function (stream) {
985
- return stream.videoSourceType === _type3.AgoraRteVideoSourceType.SCREEN && stream.owner.userId === _this7.localUser.userId;
986
- })) === null || _this$_streamControl$2 === void 0 ? void 0 : _this$_streamControl$2.streamId);
987
- if (this.screenSharingState !== _fcrCore.FcrMediaSourceState.OPEN && currentShareStreamId) {
988
- this.handleStopShare();
989
- }
990
- }
991
- }, {
992
- key: "_isStoppedFor",
993
- value: function _isStoppedFor(events, reason, ownerIsMe) {
994
- var _this8 = this;
995
- return events && events.find(function (event) {
996
- var _event$cause;
997
- var condition = ownerIsMe ? event.modifiedStream.owner.userId === _this8.localUser.userId : event.modifiedStream.owner.userId !== _this8.localUser.userId;
998
- return ((_event$cause = event.cause) === null || _event$cause === void 0 || (_event$cause = _event$cause.data) === null || _event$cause === void 0 ? void 0 : _event$cause.reason) === reason && condition;
999
- });
1000
- }
1001
- }, {
1002
- key: "_handleStreamUpdate",
1003
- value: function _handleStreamUpdate(process, events) {
1004
- var _this$_screenTrack10,
1005
- _this9 = this;
1006
- var isClosedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.CLOSE);
1007
- var isClosed = this._isStoppedFor(events, _types.FcrBoardInactiveReason.CLOSE, false);
1008
- var isSeizedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.SEIZE);
1009
- var operatorUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.operatorUser) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.operatorUser);
1010
- var ownerUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.modifiedStream.owner) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.modifiedStream.owner);
1011
- var selfOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === this.localUser.userId;
1012
- var isMyOwnShare = this.localUser.userId === (ownerUser === null || ownerUser === void 0 ? void 0 : ownerUser.userId);
1013
- (isSeizedByOther || isClosedByOther) && !selfOperated && ((_this$_screenTrack10 = this._screenTrack) === null || _this$_screenTrack10 === void 0 ? void 0 : _this$_screenTrack10.stop());
1014
- isClosedByOther && !selfOperated && isMyOwnShare && this._eventProvider.sendEvent(_constant.FcrUIAction.SHOW_TOAST, {
1015
- message: (0, _i18n.transI18n)('fmt_share_tips_sharingdisabled')
1016
- });
1017
- switch (process) {
1018
- case 'remove':
1019
- if (events.some(function (event) {
1020
- return event.modifiedStream.videoSourceType === _type3.AgoraRteVideoSourceType.SCREEN && event.modifiedStream.owner.userId === _this9.localUser.userId;
1021
- })) {
1022
- var _this$_screenTrack11;
1023
- if (!(0, _env.isElectron)() && this._isReplaceScreen) {
1024
- this._isReplaceScreen = false;
1025
- return;
1026
- } // web 下如果是替换的逻辑,不需要关闭分享
1027
- (_this$_screenTrack11 = this._screenTrack) === null || _this$_screenTrack11 === void 0 || _this$_screenTrack11.stop();
1028
- }
1029
- if (isClosed) {
1030
- this._eventProvider.sendEvent(_constant.FcrUIAction.SHOW_TOAST, {
1031
- message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped')
1032
- });
1033
- }
1034
- break;
1035
- }
1036
- }
1037
670
  }, {
1038
671
  key: "_addEventListeners",
1039
672
  value: function _addEventListeners() {
@@ -1051,7 +684,6 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1051
684
  value: function _handleOnline() {
1052
685
  this._isOnline = true;
1053
686
  this.logger.info('ononline');
1054
- this._syncShareStreamState();
1055
687
  }
1056
688
  }, {
1057
689
  key: "_handleOffline",
@@ -1062,42 +694,40 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1062
694
  }, {
1063
695
  key: "_onUiEvent",
1064
696
  value: function () {
1065
- var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11(event, params) {
1066
- return _regenerator["default"].wrap(function _callee11$(_context11) {
1067
- while (1) switch (_context11.prev = _context11.next) {
697
+ var _onUiEvent2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(event, params) {
698
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
699
+ while (1) switch (_context5.prev = _context5.next) {
1068
700
  case 0:
1069
- _context11.t0 = event;
1070
- _context11.next = _context11.t0 === _constant.FcrUIAction.START_SHARE_SCREEN ? 3 : _context11.t0 === _constant.FcrUIAction.STOP_SCREEN_CAPTURE ? 5 : _context11.t0 === _constant.FcrUIAction.ENGINE_RECONNECTED ? 7 : _context11.t0 === _constant.FcrUIAction.STOP_SHARE_SCREEN ? 9 : _context11.t0 === _constant.FcrUIAction.SET_SHARE_WITH_AUDIO ? 11 : _context11.t0 === _constant.FcrUIAction.OPEN_TOP_VIDEO_WINDOW ? 13 : 15;
701
+ _context5.t0 = event;
702
+ _context5.next = _context5.t0 === _constant.FcrUIAction.START_SHARE_SCREEN ? 3 : _context5.t0 === _constant.FcrUIAction.STOP_SCREEN_CAPTURE ? 5 : _context5.t0 === _constant.FcrUIAction.ENGINE_RECONNECTED ? 7 : _context5.t0 === _constant.FcrUIAction.STOP_SHARE_SCREEN ? 9 : _context5.t0 === _constant.FcrUIAction.SET_SHARE_WITH_AUDIO ? 11 : _context5.t0 === _constant.FcrUIAction.OPEN_TOP_VIDEO_WINDOW ? 13 : 15;
1071
703
  break;
1072
704
  case 3:
1073
705
  this.prepareShareScreen();
1074
- return _context11.abrupt("break", 15);
706
+ return _context5.abrupt("break", 15);
1075
707
  case 5:
1076
- this._closeCapture();
1077
- // this.handleStopShare();
1078
- return _context11.abrupt("break", 15);
708
+ this.handleStopShare();
709
+ return _context5.abrupt("break", 15);
1079
710
  case 7:
1080
711
  if (this._removeScreenStreamFailed) {
1081
- this._removeScreenStream();
1082
- this._removeScreenStreamFailed = false;
712
+ this._removeScreenStreamFailed = !this._screenShareProvider.removeScreenStream();
1083
713
  }
1084
- return _context11.abrupt("break", 15);
714
+ return _context5.abrupt("break", 15);
1085
715
  case 9:
1086
716
  this.handleStopShare();
1087
- return _context11.abrupt("break", 15);
717
+ return _context5.abrupt("break", 15);
1088
718
  case 11:
1089
- this._startLoopback(params.withAudio);
1090
- return _context11.abrupt("break", 15);
719
+ this._screenShareProvider.toggleScreenshareWithAudio(params.withAudio);
720
+ return _context5.abrupt("break", 15);
1091
721
  case 13:
1092
722
  this._openVideoWindowDialog();
1093
- return _context11.abrupt("break", 15);
723
+ return _context5.abrupt("break", 15);
1094
724
  case 15:
1095
725
  case "end":
1096
- return _context11.stop();
726
+ return _context5.stop();
1097
727
  }
1098
- }, _callee11, this);
728
+ }, _callee5, this);
1099
729
  }));
1100
- function _onUiEvent(_x12, _x13) {
730
+ function _onUiEvent(_x4, _x5) {
1101
731
  return _onUiEvent2.apply(this, arguments);
1102
732
  }
1103
733
  return _onUiEvent;
@@ -1115,35 +745,35 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1115
745
  }, {
1116
746
  key: "_validateWindow",
1117
747
  value: function () {
1118
- var _validateWindow2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12(id) {
748
+ var _validateWindow2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(id) {
1119
749
  var windows, window;
1120
- return _regenerator["default"].wrap(function _callee12$(_context12) {
1121
- while (1) switch (_context12.prev = _context12.next) {
750
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
751
+ while (1) switch (_context6.prev = _context6.next) {
1122
752
  case 0:
1123
- _context12.next = 2;
753
+ _context6.next = 2;
1124
754
  return this.appWindowList;
1125
755
  case 2:
1126
- windows = _context12.sent;
756
+ windows = _context6.sent;
1127
757
  window = windows.filter(function (item) {
1128
758
  return item.title !== 'AgoraHighLighter' && item.title !== 'Development HTML';
1129
759
  }).find(function (item) {
1130
760
  return item.id === id;
1131
761
  });
1132
762
  if (window) {
1133
- _context12.next = 7;
763
+ _context6.next = 7;
1134
764
  break;
1135
765
  }
1136
766
  this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_reselect'), 'error');
1137
- return _context12.abrupt("return", false);
767
+ return _context6.abrupt("return", false);
1138
768
  case 7:
1139
- return _context12.abrupt("return", true);
769
+ return _context6.abrupt("return", true);
1140
770
  case 8:
1141
771
  case "end":
1142
- return _context12.stop();
772
+ return _context6.stop();
1143
773
  }
1144
- }, _callee12, this);
774
+ }, _callee6, this);
1145
775
  }));
1146
- function _validateWindow(_x14) {
776
+ function _validateWindow(_x6) {
1147
777
  return _validateWindow2.apply(this, arguments);
1148
778
  }
1149
779
  return _validateWindow;
@@ -1151,32 +781,32 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1151
781
  }, {
1152
782
  key: "_validateDisplay",
1153
783
  value: function () {
1154
- var _validateDisplay2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13(id) {
784
+ var _validateDisplay2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(id) {
1155
785
  var displayList;
1156
- return _regenerator["default"].wrap(function _callee13$(_context13) {
1157
- while (1) switch (_context13.prev = _context13.next) {
786
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
787
+ while (1) switch (_context7.prev = _context7.next) {
1158
788
  case 0:
1159
- _context13.next = 2;
789
+ _context7.next = 2;
1160
790
  return this.displayList;
1161
791
  case 2:
1162
- displayList = _context13.sent.find(function (item) {
792
+ displayList = _context7.sent.find(function (item) {
1163
793
  return item.id === id;
1164
794
  });
1165
795
  if (displayList) {
1166
- _context13.next = 6;
796
+ _context7.next = 6;
1167
797
  break;
1168
798
  }
1169
799
  this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_faild_screenselect'), 'error');
1170
- return _context13.abrupt("return", false);
800
+ return _context7.abrupt("return", false);
1171
801
  case 6:
1172
- return _context13.abrupt("return", true);
802
+ return _context7.abrupt("return", true);
1173
803
  case 7:
1174
804
  case "end":
1175
- return _context13.stop();
805
+ return _context7.stop();
1176
806
  }
1177
- }, _callee13, this);
807
+ }, _callee7, this);
1178
808
  }));
1179
- function _validateDisplay(_x15) {
809
+ function _validateDisplay(_x7) {
1180
810
  return _validateDisplay2.apply(this, arguments);
1181
811
  }
1182
812
  return _validateDisplay;
@@ -1184,153 +814,102 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1184
814
  }, {
1185
815
  key: "_validateShareStart",
1186
816
  value: function () {
1187
- var _validateShareStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14(id, type) {
1188
- return _regenerator["default"].wrap(function _callee14$(_context14) {
1189
- while (1) switch (_context14.prev = _context14.next) {
817
+ var _validateShareStart2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(id, type) {
818
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
819
+ while (1) switch (_context8.prev = _context8.next) {
1190
820
  case 0:
1191
- _context14.t0 = type === _type.AgoraRtcScreenCaptureType.WINDOW;
1192
- if (!_context14.t0) {
1193
- _context14.next = 5;
821
+ _context8.t0 = type === _type.AgoraRtcScreenCaptureType.WINDOW;
822
+ if (!_context8.t0) {
823
+ _context8.next = 5;
1194
824
  break;
1195
825
  }
1196
- _context14.next = 4;
826
+ _context8.next = 4;
1197
827
  return this._validateWindow(id);
1198
828
  case 4:
1199
- _context14.t0 = !_context14.sent;
829
+ _context8.t0 = !_context8.sent;
1200
830
  case 5:
1201
- if (!_context14.t0) {
1202
- _context14.next = 7;
831
+ if (!_context8.t0) {
832
+ _context8.next = 7;
1203
833
  break;
1204
834
  }
1205
- return _context14.abrupt("return", false);
835
+ return _context8.abrupt("return", false);
1206
836
  case 7:
1207
- _context14.t1 = type === _type.AgoraRtcScreenCaptureType.SCREEN;
1208
- if (!_context14.t1) {
1209
- _context14.next = 12;
837
+ _context8.t1 = type === _type.AgoraRtcScreenCaptureType.SCREEN;
838
+ if (!_context8.t1) {
839
+ _context8.next = 12;
1210
840
  break;
1211
841
  }
1212
- _context14.next = 11;
842
+ _context8.next = 11;
1213
843
  return this._validateDisplay(id);
1214
844
  case 11:
1215
- _context14.t1 = !_context14.sent;
845
+ _context8.t1 = !_context8.sent;
1216
846
  case 12:
1217
- if (!_context14.t1) {
1218
- _context14.next = 14;
847
+ if (!_context8.t1) {
848
+ _context8.next = 14;
1219
849
  break;
1220
850
  }
1221
- return _context14.abrupt("return", false);
851
+ return _context8.abrupt("return", false);
1222
852
  case 14:
1223
- return _context14.abrupt("return", true);
853
+ return _context8.abrupt("return", true);
1224
854
  case 15:
1225
855
  case "end":
1226
- return _context14.stop();
856
+ return _context8.stop();
1227
857
  }
1228
- }, _callee14, this);
858
+ }, _callee8, this);
1229
859
  }));
1230
- function _validateShareStart(_x16, _x17) {
860
+ function _validateShareStart(_x8, _x9) {
1231
861
  return _validateShareStart2.apply(this, arguments);
1232
862
  }
1233
863
  return _validateShareStart;
1234
864
  }()
1235
- }, {
1236
- key: "_hasScreenSharePermission",
1237
- value: function _hasScreenSharePermission() {
1238
- if (!this._securityStore.hasStartScreenSharePermission()) {
1239
- this._showToast((0, _i18n.transI18n)('fmt_screenshare_cohost_can_not_share_remind'), 'error');
1240
- return false;
1241
- }
1242
- return true;
1243
- }
1244
- }, {
1245
- key: "_getExcludeWindows",
1246
- value: function () {
1247
- var _getExcludeWindows2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
1248
- var excludeWindows;
1249
- return _regenerator["default"].wrap(function _callee15$(_context15) {
1250
- while (1) switch (_context15.prev = _context15.next) {
1251
- case 0:
1252
- excludeWindows = [];
1253
- _context15.next = 3;
1254
- return (0, _tools.waitUntil)(function () {
1255
- var _getControlBarMediaSo, _getVideoWindowMediaS;
1256
- var windowId = (_getControlBarMediaSo = (0, _rendererEvent.getControlBarMediaSourceId)()) !== null && _getControlBarMediaSo !== void 0 ? _getControlBarMediaSo : '';
1257
- var _windowId$split = windowId.split(':'),
1258
- _windowId$split2 = (0, _slicedToArray2["default"])(_windowId$split, 2),
1259
- videoWindowId = _windowId$split2[1];
1260
- if (videoWindowId && !excludeWindows.includes(videoWindowId)) {
1261
- excludeWindows.push(videoWindowId);
1262
- }
1263
- windowId = (_getVideoWindowMediaS = (0, _rendererEvent.getVideoWindowMediaSourceId)()) !== null && _getVideoWindowMediaS !== void 0 ? _getVideoWindowMediaS : '';
1264
- var _windowId$split3 = windowId.split(':'),
1265
- _windowId$split4 = (0, _slicedToArray2["default"])(_windowId$split3, 2),
1266
- controlBarWindowId = _windowId$split4[1];
1267
- if (controlBarWindowId && !excludeWindows.includes(controlBarWindowId)) {
1268
- excludeWindows.push(controlBarWindowId);
1269
- }
1270
- return !!videoWindowId && !!controlBarWindowId;
1271
- }, 'control bar is open');
1272
- case 3:
1273
- this.logger.info('exclude win:', JSON.stringify(excludeWindows));
1274
- return _context15.abrupt("return", excludeWindows);
1275
- case 5:
1276
- case "end":
1277
- return _context15.stop();
1278
- }
1279
- }, _callee15, this);
1280
- }));
1281
- function _getExcludeWindows() {
1282
- return _getExcludeWindows2.apply(this, arguments);
1283
- }
1284
- return _getExcludeWindows;
1285
- }()
1286
865
  }, {
1287
866
  key: "_initControlbar",
1288
867
  value: function () {
1289
- var _initControlbar2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
1290
- var params, mainWindow;
1291
- return _regenerator["default"].wrap(function _callee16$(_context16) {
1292
- while (1) switch (_context16.prev = _context16.next) {
868
+ var _initControlbar2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
869
+ var mainWindow;
870
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
871
+ while (1) switch (_context9.prev = _context9.next) {
1293
872
  case 0:
1294
- params = {
1295
- currentShareAudioProcessingChannel: _shareAudio.AudioProcessingChannel.MONO,
1296
- currentShareId: this._currentShareId,
1297
- currentShareType: this._currentShareType,
1298
- shareWithAudio: this.shareWithAudio,
1299
- currentShareBounds: this.currentSelectionBounds
1300
- };
1301
873
  if ((0, _env.isElectron)()) {
1302
- this._controlBarDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.CONTROL_BAR, _constant.FcrUIDialogKey.CONTROL_BAR, params);
874
+ this._controlBarDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.CONTROL_BAR, _constant.FcrUIDialogKey.CONTROL_BAR);
1303
875
  mainWindow = window.runtime.browserWindow;
1304
876
  if (mainWindow) {
1305
877
  mainWindow.hide();
1306
878
  }
1307
879
  } else {
1308
- this._controlBarDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.CONTROL_BAR, _constant.FcrUIDialogKey.CONTROL_BAR, params);
880
+ this._controlBarDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.CONTROL_BAR, _constant.FcrUIDialogKey.CONTROL_BAR);
1309
881
  }
1310
- case 2:
882
+ case 1:
1311
883
  case "end":
1312
- return _context16.stop();
884
+ return _context9.stop();
1313
885
  }
1314
- }, _callee16, this);
886
+ }, _callee9, this);
1315
887
  }));
1316
888
  function _initControlbar() {
1317
889
  return _initControlbar2.apply(this, arguments);
1318
890
  }
1319
891
  return _initControlbar;
1320
892
  }()
893
+ }, {
894
+ key: "_handleBrowserShow",
895
+ value: function _handleBrowserShow() {
896
+ this.logger.info("[screen-share]: browser window show, current sharing info: ".concat(this._screenShareInfoForLog));
897
+ }
898
+ }, {
899
+ key: "_hendleBrowserHide",
900
+ value: function _hendleBrowserHide() {
901
+ this.logger.info("[screen-share]: browser window hide, current sharing info: ".concat(this._screenShareInfoForLog));
902
+ }
903
+ }, {
904
+ key: "handleToggleScreenShareWithAudio",
905
+ value: function handleToggleScreenShareWithAudio(withAudio) {
906
+ this._screenShareProvider.toggleScreenshareWithAudio(withAudio);
907
+ }
1321
908
  }]);
1322
909
  }();
1323
910
  _ShareScreenStore = ShareScreenStore;
1324
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "screenSharingState"], [_mobx.observable, 1, "applicationCaptureSources"], [_mobx.observable, 1, "screenCaptureSources"], [_mobx.observable, 1, "currentSelection"], [_mobx.observable, 1, "currentSelectionType"], [_mobx.observable, 1, "shareWithAudio"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "currentSelectionBounds"], [_mobx.observable, 1, "connectionState"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_hasLoopbackDeviceDecs, 18, "hasLoopbackDevice"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_decorator.bound, 2, "release"], [_openRelaunchTipsDialogDecs, 18, "openRelaunchTipsDialog"], [_startPreviewDecs, 18, "startPreview"], [_handleStopShareDecs, 18, "handleStopShare"], [_handleStartShareDecs, 18, "handleStartShare"], [_startLoopbackDecs, 18, "_startLoopback"], [_handleShareStartWithAudioDecs, 18, "_handleShareStartWithAudio"], [_handleShareStopWithAudioDecs, 18, "_handleShareStopWithAudio"], [_openShareScreenSelectionDecs, 18, "_openShareScreenSelection"], [_closeShareScreenSelectionDecs, 18, "_closeShareScreenSelection"], [_setControlBarWindowIdDecs, 18, "_setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "_openVideoWindowDialog"], [_closeControlBarDecs, 18, "_closeControlBar"], [_closeVideoWindowDialogDecs, 18, "_closeVideoWindowDialog"], [_setWithAudioStateDecs, 18, "_setWithAudioState"], [_handleReplaceScreenDecs, 18, "_handleReplaceScreen"], [_decorator.bound, 2, "_handleWebScreenCaptureStateUpdated"], [_handleScreenCaptureStateUpdatedDecs, 18, "_handleScreenCaptureStateUpdated"], [_setShareLockDecs, 18, "_setShareLock"], [_decorator.bound, 2, "_syncShareStreamState"], [_handleStreamUpdateDecs, 18, "_handleStreamUpdate"], [_decorator.bound, 2, "_handleOnline"], [_decorator.bound, 2, "_handleOffline"], [_initControlbarDecs, 18, "_initControlbar"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 11);
1325
- _init_screenSharingState = _applyDecs$e[0];
1326
- _init_applicationCaptureSources = _applyDecs$e[1];
1327
- _init_screenCaptureSources = _applyDecs$e[2];
1328
- _init_currentSelection = _applyDecs$e[3];
1329
- _init_currentSelectionType = _applyDecs$e[4];
1330
- _init_shareWithAudio = _applyDecs$e[5];
1331
- _init_boardOwnerUser = _applyDecs$e[6];
1332
- _init_currentSelectionBounds = _applyDecs$e[7];
1333
- _init_connectionState = _applyDecs$e[8];
1334
- _init_handleChooseScreen = _applyDecs$e[9];
1335
- _initProto = _applyDecs$e[10];
911
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "boardOwnerUser"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_hasLoopbackDeviceDecs, 18, "hasLoopbackDevice"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_decorator.bound, 2, "release"], [_openRelaunchTipsDialogDecs, 18, "openRelaunchTipsDialog"], [_startRenderSharePreviewDecs, 18, "startRenderSharePreview"], [_stopRenderSharePreviewDecs, 18, "stopRenderSharePreview"], [_handleStopShareDecs, 18, "handleStopShare"], [_handleStartShareDecs, 18, "handleStartShare"], [_openShareScreenSelectionDecs, 18, "_openShareScreenSelection"], [_closeShareScreenSelectionDecs, 18, "_closeShareScreenSelection"], [_setControlBarWindowIdDecs, 18, "_setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "_openVideoWindowDialog"], [_closeControlBarDecs, 18, "_closeControlBar"], [_closeVideoWindowDialogDecs, 18, "_closeVideoWindowDialog"], [_handleReplaceScreenDecs, 18, "_handleReplaceScreen"], [_decorator.bound, 2, "_handleOnline"], [_decorator.bound, 2, "_handleOffline"], [_initControlbarDecs, 18, "_initControlbar"], [_decorator.bound, 2, "_handleBrowserShow"], [_decorator.bound, 2, "_hendleBrowserHide"], [_decorator.bound, 2, "handleToggleScreenShareWithAudio"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 3);
912
+ _init_boardOwnerUser = _applyDecs$e[0];
913
+ _init_handleChooseScreen = _applyDecs$e[1];
914
+ _initProto = _applyDecs$e[2];
1336
915
  var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);