fcr-ui-scene 3.4.1 → 3.4.2

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 (567) hide show
  1. package/lib/base.d.ts +40 -5
  2. package/lib/base.js +237 -22
  3. package/lib/common/device-store.d.ts +14 -23
  4. package/lib/common/device-store.js +252 -361
  5. package/lib/common/device-stream-store.d.ts +14 -8
  6. package/lib/common/device-stream-store.js +116 -254
  7. package/lib/common/event-store.d.ts +10 -35
  8. package/lib/common/event-store.js +13 -64
  9. package/lib/common/security-store.d.ts +39 -47
  10. package/lib/common/security-store.js +379 -335
  11. package/lib/creator.d.ts +1 -1
  12. package/lib/creator.js +4 -9
  13. package/lib/electron/app.js +4 -2
  14. package/lib/electron/bootstrap-dev.js +0 -7
  15. package/lib/electron/bootstrap-sdk.js +10 -0
  16. package/lib/electron/injections.d.ts +2 -0
  17. package/lib/electron/injections.js +17 -2
  18. package/lib/electron/logger.d.ts +0 -4
  19. package/lib/electron/logger.js +2 -5
  20. package/lib/electron/main.js +1 -1
  21. package/lib/electron/plugins/devtool-shortcut.js +10 -1
  22. package/lib/electron/plugins/meeting-state.js +1 -1
  23. package/lib/electron/preload.js +3 -1
  24. package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
  25. package/lib/fragments/control-bar/control-bar-store.d.ts +1 -44
  26. package/lib/fragments/control-bar/control-bar-store.js +80 -457
  27. package/lib/fragments/control-bar/device/index.js +3 -5
  28. package/lib/fragments/control-bar/index.css +10 -15
  29. package/lib/fragments/control-bar/index.js +0 -24
  30. package/lib/fragments/control-bar/more-actions/index.css +0 -53
  31. package/lib/fragments/control-bar/more-actions/index.js +38 -73
  32. package/lib/fragments/control-bar/security-content/index.css +0 -75
  33. package/lib/fragments/control-bar/security-content/index.js +19 -105
  34. package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
  35. package/lib/fragments/control-bar/view.js +8 -23
  36. package/lib/fragments/live-streaming/store.d.ts +1 -1
  37. package/lib/fragments/live-streaming/store.js +1 -1
  38. package/lib/fragments/live-streaming/view.js +2 -4
  39. package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
  40. package/lib/fragments/share-screen-selection/selection-store.js +1 -1
  41. package/lib/fragments/share-screen-selection/view.js +20 -20
  42. package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
  43. package/lib/fragments/toolbar/components/pen-picker.js +1 -1
  44. package/lib/fragments/toolbar/components/shape-picker.js +1 -1
  45. package/lib/fragments/toolbar/components/wrapper.js +1 -1
  46. package/lib/fragments/toolbar/hooks.js +1 -1
  47. package/lib/fragments/toolbar/store.d.ts +1 -1
  48. package/lib/global.css +5 -0
  49. package/lib/index.d.ts +1 -0
  50. package/lib/index.js +7 -4
  51. package/lib/login-confirm-dialog.d.ts +1 -0
  52. package/lib/login-confirm-dialog.js +7 -2
  53. package/lib/modules/Interpreter/action/delete-btn/index.d.ts +2 -2
  54. package/lib/modules/Interpreter/action/edit-btn/index.js +2 -2
  55. package/lib/modules/Interpreter/action/switch-btn/index.js +5 -5
  56. package/lib/modules/Interpreter/dialog-content/index.d.ts +2 -2
  57. package/lib/modules/Interpreter/dialog-content/index.js +4 -4
  58. package/lib/modules/Interpreter/index.d.ts +11 -4
  59. package/lib/modules/Interpreter/index.js +23 -8
  60. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
  61. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -3
  62. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -2
  63. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +14 -14
  64. package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +2 -2
  65. package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +2 -2
  66. package/lib/modules/Interpreter/store.d.ts +23 -84
  67. package/lib/modules/Interpreter/store.js +204 -1216
  68. package/lib/modules/Interpreter/type.d.ts +12 -29
  69. package/lib/modules/Interpreter/type.js +2 -10
  70. package/lib/modules/Interpreter/utils.d.ts +1 -5
  71. package/lib/modules/Interpreter/utils.js +28 -86
  72. package/lib/modules/Interpreter/view.js +19 -3
  73. package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -4
  74. package/lib/modules/action-bar/action-bar-collapes-items.js +21 -38
  75. package/lib/modules/action-bar/chat/index.js +8 -8
  76. package/lib/modules/action-bar/components/apps/app-item/index.css +1 -2
  77. package/lib/modules/action-bar/components/apps/app-item/index.d.ts +1 -10
  78. package/lib/modules/action-bar/components/apps/appitems.d.ts +1 -3
  79. package/lib/modules/action-bar/components/apps/index.css +2 -2
  80. package/lib/modules/action-bar/components/apps/index.js +2 -3
  81. package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
  82. package/lib/modules/action-bar/components/collapse/index.js +222 -0
  83. package/lib/modules/action-bar/components/interpreter/index.d.ts +1 -5
  84. package/lib/modules/action-bar/components/item/index.d.ts +9 -0
  85. package/lib/modules/action-bar/components/item/index.js +164 -0
  86. package/lib/modules/action-bar/components/leave/assign-host.d.ts +1 -8
  87. package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
  88. package/lib/modules/action-bar/components/leave/index.js +9 -24
  89. package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +1 -16
  90. package/lib/modules/action-bar/components/more/index.js +13 -9
  91. package/lib/modules/action-bar/components/more/poppover-content.d.ts +1 -4
  92. package/lib/modules/action-bar/components/more/poppover-content.js +28 -5
  93. package/lib/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
  94. package/lib/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
  95. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
  96. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +8 -0
  97. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +100 -0
  98. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
  99. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +5 -0
  100. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +33 -0
  101. package/lib/modules/action-bar/components/notification-bar/index.css +74 -0
  102. package/lib/modules/action-bar/components/notification-bar/index.d.ts +2 -0
  103. package/lib/modules/action-bar/components/notification-bar/index.js +99 -0
  104. package/lib/modules/action-bar/components/participants/index.js +2 -2
  105. package/lib/modules/action-bar/components/placement/index.d.ts +4 -0
  106. package/lib/modules/action-bar/components/placement/index.js +18 -0
  107. package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +1 -3
  108. package/lib/modules/action-bar/components/screen-share/submenu.js +25 -2
  109. package/lib/modules/action-bar/components/security/index.js +3 -1
  110. package/lib/modules/action-bar/components/smaller/index.d.ts +1 -0
  111. package/lib/modules/action-bar/components/smaller/index.js +52 -0
  112. package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
  113. package/lib/modules/action-bar/components/trigger-input-language-room/index.css +86 -0
  114. package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +3 -0
  115. package/lib/modules/action-bar/components/trigger-input-language-room/index.js +215 -0
  116. package/lib/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
  117. package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -0
  118. package/lib/modules/action-bar/components/trigger-output-language/index.d.ts +2 -0
  119. package/lib/modules/action-bar/components/trigger-output-language/index.js +230 -0
  120. package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +10 -0
  121. package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +8 -0
  122. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +22 -0
  123. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +3 -0
  124. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +75 -0
  125. package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +8 -0
  126. package/lib/modules/action-bar/components/trigger-output-language-room/index.js +98 -0
  127. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +5 -0
  128. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +66 -0
  129. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +5 -0
  130. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +37 -0
  131. package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
  132. package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
  133. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
  134. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
  135. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +70 -0
  136. package/lib/modules/action-bar/components/trigger-subscribe-language/index.d.ts +5 -0
  137. package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +209 -0
  138. package/lib/modules/action-bar/device/index.css +2 -7
  139. package/lib/modules/action-bar/device/index.js +24 -22
  140. package/lib/modules/action-bar/enums.d.ts +23 -0
  141. package/lib/modules/action-bar/enums.js +35 -0
  142. package/lib/modules/action-bar/index.d.ts +36 -6
  143. package/lib/modules/action-bar/index.dev.d.ts +0 -1
  144. package/lib/modules/action-bar/index.dev.js +94 -121
  145. package/lib/modules/action-bar/index.js +46 -18
  146. package/lib/modules/action-bar/leave/assign-host.d.ts +0 -3
  147. package/lib/modules/action-bar/leave/assign-host.js +4 -2
  148. package/lib/modules/action-bar/leave/index.css +0 -10
  149. package/lib/modules/action-bar/leave/index.js +34 -84
  150. package/lib/modules/action-bar/leave/leave-meeting.d.ts +1 -13
  151. package/lib/modules/action-bar/leave/leave-meeting.js +19 -37
  152. package/lib/modules/action-bar/live-streaming/index.js +3 -3
  153. package/lib/modules/action-bar/more/index.js +6 -9
  154. package/lib/modules/action-bar/more/poppover-content.js +16 -37
  155. package/lib/modules/action-bar/participants/index.css +0 -12
  156. package/lib/modules/action-bar/participants/index.js +16 -23
  157. package/lib/modules/action-bar/record/index.js +4 -4
  158. package/lib/modules/action-bar/screen-share/index.js +5 -14
  159. package/lib/modules/action-bar/screen-share/submenu.js +26 -20
  160. package/lib/modules/action-bar/security/drop-menu.js +22 -137
  161. package/lib/modules/action-bar/security/index.js +6 -12
  162. package/lib/modules/action-bar/settings/index.js +4 -4
  163. package/lib/modules/action-bar/smaller.js +5 -5
  164. package/lib/modules/action-bar/store.d.ts +84 -98
  165. package/lib/modules/action-bar/store.js +567 -707
  166. package/lib/modules/action-bar/types.d.ts +94 -0
  167. package/lib/modules/action-bar/types.js +6 -0
  168. package/lib/modules/action-bar/view.d.ts +1 -2
  169. package/lib/modules/action-bar/view.js +11 -11
  170. package/lib/modules/audio-stream/index.d.ts +22 -10
  171. package/lib/modules/audio-stream/index.js +78 -82
  172. package/lib/modules/chat/chat-bar/index.css +0 -6
  173. package/lib/modules/chat/chat-bar/index.d.ts +3 -3
  174. package/lib/modules/chat/chat-bar/index.js +39 -51
  175. package/lib/modules/chat/chat-room-store.d.ts +135 -0
  176. package/lib/modules/chat/chat-room-store.js +954 -0
  177. package/lib/modules/chat/chat-select/index.css +7 -27
  178. package/lib/modules/chat/chat-select/index.d.ts +1 -1
  179. package/lib/modules/chat/chat-select/index.js +4 -18
  180. package/lib/modules/chat/chat.d.ts +2 -1
  181. package/lib/modules/chat/chat.js +128 -196
  182. package/lib/modules/chat/components/chat-action/index.d.ts +1 -0
  183. package/lib/modules/chat/components/chat-action/index.js +28 -0
  184. package/lib/modules/chat/components/chat-bar/index.css +85 -0
  185. package/lib/modules/chat/components/chat-bar/index.d.ts +3 -0
  186. package/lib/modules/chat/components/chat-bar/index.js +145 -0
  187. package/lib/modules/chat/components/chat-select/index.css +185 -0
  188. package/lib/modules/chat/components/chat-select/index.d.ts +3 -0
  189. package/lib/modules/chat/components/chat-select/index.js +237 -0
  190. package/lib/modules/chat/components/message-list/index.d.ts +4 -0
  191. package/lib/modules/chat/components/message-list/index.js +650 -0
  192. package/lib/modules/chat/index.d.ts +13 -5
  193. package/lib/modules/chat/index.dev.d.ts +0 -1
  194. package/lib/modules/chat/index.dev.js +71 -72
  195. package/lib/modules/chat/index.js +45 -22
  196. package/lib/modules/chat/message-list.js +51 -68
  197. package/lib/modules/chat/mock.d.ts +1 -1
  198. package/lib/modules/chat/store.d.ts +17 -162
  199. package/lib/modules/chat/store.js +95 -963
  200. package/lib/modules/chat/types.d.ts +70 -0
  201. package/lib/modules/chat/types.js +17 -0
  202. package/lib/modules/chat/view.d.ts +10 -0
  203. package/lib/modules/chat/view.js +372 -0
  204. package/lib/modules/components/device-control/components/audio-menu/index.js +2 -2
  205. package/lib/modules/components/device-control/components/microphone/index.js +7 -7
  206. package/lib/modules/components/device-control/store.d.ts +11 -12
  207. package/lib/modules/components/device-control/store.js +46 -49
  208. package/lib/modules/components/dialog-container/component/body.js +2 -1
  209. package/lib/modules/components/dialog-container/index.d.ts +2 -2
  210. package/lib/modules/components/leave-meeting/components/assign-host.d.ts +3 -0
  211. package/lib/modules/components/leave-meeting/components/assign-host.js +70 -0
  212. package/lib/modules/components/leave-meeting/components/index.css +125 -0
  213. package/lib/modules/components/leave-meeting/index.d.ts +4 -0
  214. package/lib/modules/components/leave-meeting/index.js +147 -0
  215. package/lib/modules/components/leave-meeting/store.d.ts +31 -0
  216. package/lib/modules/components/leave-meeting/store.js +292 -0
  217. package/lib/modules/components/member-window/index.d.ts +1 -1
  218. package/lib/modules/components/member-window/index.js +12 -6
  219. package/lib/modules/components/security-menu/index.d.ts +2 -0
  220. package/lib/modules/components/security-menu/index.js +34 -35
  221. package/lib/modules/components/tab-frame/index.d.ts +2 -2
  222. package/lib/modules/components/tab-frame/index.js +26 -5
  223. package/lib/modules/connection-gateway/components/computer/index.js +4 -4
  224. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +1 -1
  225. package/lib/modules/connection-gateway/components/phone/index.js +2 -2
  226. package/lib/modules/connection-gateway/components/tabs/index.js +1 -2
  227. package/lib/modules/connection-gateway/enums.d.ts +4 -0
  228. package/lib/modules/connection-gateway/enums.js +12 -0
  229. package/lib/modules/connection-gateway/index.d.ts +13 -4
  230. package/lib/modules/connection-gateway/index.js +25 -15
  231. package/lib/modules/connection-gateway/store.d.ts +22 -18
  232. package/lib/modules/connection-gateway/store.js +60 -36
  233. package/lib/modules/connection-gateway/types.d.ts +4 -0
  234. package/lib/modules/connection-gateway/types.js +6 -0
  235. package/lib/modules/connection-gateway/view.js +2 -2
  236. package/lib/modules/control-bar/components/meeting-details/index.js +30 -25
  237. package/lib/modules/control-bar/components/more-actions/index.css +18 -0
  238. package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -5
  239. package/lib/modules/control-bar/components/more-actions/index.js +58 -9
  240. package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -7
  241. package/lib/modules/control-bar/components/share-state-nav/index.js +2 -1
  242. package/lib/modules/control-bar/components/stop-live-streaming/stop-button.d.ts +1 -1
  243. package/lib/modules/control-bar/components/stop-live-streaming/stop-button.js +2 -2
  244. package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -10
  245. package/lib/modules/control-bar/components/transfer-position-icon/index.js +7 -12
  246. package/lib/modules/control-bar/enums.d.ts +21 -0
  247. package/lib/modules/control-bar/enums.js +31 -0
  248. package/lib/modules/control-bar/index.d.ts +30 -7
  249. package/lib/modules/control-bar/index.js +46 -27
  250. package/lib/modules/control-bar/store.d.ts +38 -26
  251. package/lib/modules/control-bar/store.js +172 -282
  252. package/lib/modules/control-bar/types.d.ts +20 -0
  253. package/lib/modules/control-bar/types.js +6 -0
  254. package/lib/modules/control-bar/view.js +68 -34
  255. package/lib/modules/device-pretest/index.js +4 -4
  256. package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
  257. package/lib/modules/device-pretest/store.d.ts +8 -9
  258. package/lib/modules/device-pretest/store.js +52 -36
  259. package/lib/modules/dialog/components/Interpreter/electron.js +21 -15
  260. package/lib/modules/dialog/components/Interpreter/index.js +2 -2
  261. package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
  262. package/lib/modules/dialog/components/chat/electron.js +19 -10
  263. package/lib/modules/dialog/components/chat/index.js +2 -2
  264. package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
  265. package/lib/modules/dialog/components/confirm/electron.js +68 -38
  266. package/lib/modules/dialog/components/confirm/index.js +1 -1
  267. package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
  268. package/lib/modules/dialog/components/connection-gateway/electron.js +8 -10
  269. package/lib/modules/dialog/components/connection-gateway/index.css +2 -0
  270. package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -1
  271. package/lib/modules/dialog/components/connection-gateway/index.js +20 -7
  272. package/lib/modules/dialog/components/connection-gateway/tabs.d.ts +6 -0
  273. package/lib/modules/dialog/components/connection-gateway/tabs.js +44 -0
  274. package/lib/modules/dialog/components/control-bar/index.d.ts +5 -1
  275. package/lib/modules/dialog/components/control-bar/index.js +122 -9
  276. package/lib/modules/dialog/components/device-setting/electron.js +6 -2
  277. package/lib/modules/dialog/components/device-setting/index.js +2 -2
  278. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +7 -0
  279. package/lib/modules/dialog/components/dialog-container/component/body.js +77 -0
  280. package/lib/modules/dialog/components/dialog-container/index.css +81 -0
  281. package/lib/modules/dialog/components/dialog-container/index.d.ts +16 -0
  282. package/lib/modules/dialog/components/dialog-container/index.js +112 -0
  283. package/lib/modules/dialog/components/invite/index.js +32 -7
  284. package/lib/modules/dialog/components/live-streaming/index.js +9 -5
  285. package/lib/modules/dialog/components/participant/electron.js +11 -5
  286. package/lib/modules/dialog/components/participant/index.js +4 -3
  287. package/lib/modules/dialog/components/share-screen-selection/index.js +9 -5
  288. package/lib/modules/dialog/components/system-preference/electron.js +1 -1
  289. package/lib/modules/dialog/components/toast/index.js +1 -1
  290. package/lib/modules/dialog/components/video-window/index.d.ts +2 -0
  291. package/lib/modules/dialog/components/video-window/index.js +148 -0
  292. package/lib/modules/dialog/components/whiteboard/index.js +2 -2
  293. package/lib/modules/dialog/dialogs.d.ts +2 -5
  294. package/lib/modules/dialog/dialogs.js +2 -157
  295. package/lib/modules/dialog/hooks/useElectron.d.ts +3 -25
  296. package/lib/modules/dialog/hooks/useElectron.js +91 -35
  297. package/lib/modules/dialog/index.d.ts +30 -4
  298. package/lib/modules/dialog/index.js +62 -6
  299. package/lib/modules/dialog/store.d.ts +46 -12
  300. package/lib/modules/dialog/store.js +121 -65
  301. package/lib/modules/dialog/types/index.d.ts +14 -3
  302. package/lib/modules/event-confirm/index.css +1 -1
  303. package/lib/modules/event-confirm/index.d.ts +13 -6
  304. package/lib/modules/event-confirm/index.js +28 -11
  305. package/lib/modules/event-confirm/store.d.ts +9 -3
  306. package/lib/modules/event-confirm/store.js +16 -7
  307. package/lib/modules/event-confirm/view.js +5 -1
  308. package/lib/modules/event-toast/index.d.ts +7 -6
  309. package/lib/modules/event-toast/index.js +19 -8
  310. package/lib/modules/event-toast/store.d.ts +8 -3
  311. package/lib/modules/event-toast/store.js +15 -6
  312. package/lib/modules/invite/components/error-tips.d.ts +4 -0
  313. package/lib/modules/invite/components/error-tips.js +18 -0
  314. package/lib/modules/invite/components/pstn-invite.d.ts +2 -0
  315. package/lib/modules/invite/components/pstn-invite.js +297 -0
  316. package/lib/modules/invite/components/voip-invite.d.ts +1 -0
  317. package/lib/modules/invite/components/voip-invite.js +276 -0
  318. package/lib/modules/invite/enums.d.ts +22 -0
  319. package/lib/modules/invite/enums.js +33 -0
  320. package/lib/modules/invite/index.d.ts +7 -8
  321. package/lib/modules/invite/index.js +17 -15
  322. package/lib/modules/invite/pstn-invite.js +9 -7
  323. package/lib/modules/invite/store.d.ts +11 -26
  324. package/lib/modules/invite/store.js +55 -25
  325. package/lib/modules/invite/types.d.ts +14 -0
  326. package/lib/modules/invite/types.js +6 -0
  327. package/lib/modules/invite/view.d.ts +0 -4
  328. package/lib/modules/invite/view.js +7 -11
  329. package/lib/modules/invite/voip-invite.js +6 -5
  330. package/lib/modules/layout/components/Aside.js +34 -17
  331. package/lib/modules/layout/components/Carousel.js +1 -1
  332. package/lib/modules/layout/components/Gallery.js +1 -1
  333. package/lib/modules/layout/components/index.d.ts +1 -1
  334. package/lib/modules/layout/components/index.js +4 -4
  335. package/lib/modules/layout/components/who-is-speaking.d.ts +2 -0
  336. package/lib/modules/layout/components/who-is-speaking.js +60 -0
  337. package/lib/modules/layout/index.d.ts +26 -4
  338. package/lib/modules/layout/index.dev.d.ts +0 -1
  339. package/lib/modules/layout/index.dev.js +312 -386
  340. package/lib/modules/layout/index.js +25 -10
  341. package/lib/modules/layout/member-window/index.css +18 -116
  342. package/lib/modules/layout/member-window/index.d.ts +3 -10
  343. package/lib/modules/layout/member-window/index.js +115 -227
  344. package/lib/modules/layout/store.d.ts +61 -71
  345. package/lib/modules/layout/store.js +311 -573
  346. package/lib/modules/layout/view.d.ts +2 -0
  347. package/lib/modules/layout/view.js +127 -2
  348. package/lib/modules/live-streaming/index.d.ts +15 -7
  349. package/lib/modules/live-streaming/index.dev.js +13 -13
  350. package/lib/modules/live-streaming/index.js +20 -15
  351. package/lib/modules/live-streaming/store.d.ts +21 -14
  352. package/lib/modules/live-streaming/store.js +84 -144
  353. package/lib/modules/live-streaming/view.js +2 -2
  354. package/lib/modules/notification/index.d.ts +9 -11
  355. package/lib/modules/notification/index.js +21 -14
  356. package/lib/modules/notification/interpreter-status/index.js +1 -2
  357. package/lib/modules/notification/store.d.ts +5 -11
  358. package/lib/modules/notification/store.js +12 -62
  359. package/lib/modules/notification/view.d.ts +5 -3
  360. package/lib/modules/notification/view.js +8 -5
  361. package/lib/modules/offscreen-pulling/index.js +1 -1
  362. package/lib/modules/participant/attendee/index.css +51 -0
  363. package/lib/modules/participant/attendee/index.d.ts +5 -8
  364. package/lib/modules/participant/attendee/index.js +15 -61
  365. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +6 -0
  366. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +28 -0
  367. package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +7 -0
  368. package/lib/modules/participant/components/attendee/components/user-avatar/index.js +39 -0
  369. package/lib/modules/participant/components/attendee/index.css +69 -0
  370. package/lib/modules/participant/components/attendee/index.d.ts +4 -0
  371. package/lib/modules/participant/components/attendee/index.js +337 -0
  372. package/lib/modules/participant/components/can-moveable/index.d.ts +1 -0
  373. package/lib/modules/participant/components/can-moveable/index.js +68 -0
  374. package/lib/modules/participant/components/drop-menu/index.js +8 -8
  375. package/lib/modules/participant/components/footer/buttons.d.ts +2 -3
  376. package/lib/modules/participant/components/footer/buttons.js +2 -3
  377. package/lib/modules/participant/components/footer/index.js +2 -2
  378. package/lib/modules/participant/components/mute-all/index.d.ts +3 -4
  379. package/lib/modules/participant/components/mute-all/index.js +31 -44
  380. package/lib/modules/participant/components/operate-waitingroom-member/index.d.ts +2 -0
  381. package/lib/modules/participant/components/operate-waitingroom-member/index.js +48 -0
  382. package/lib/modules/participant/components/participants/index.js +27 -50
  383. package/lib/modules/participant/components/user-action/index.d.ts +17 -0
  384. package/lib/modules/participant/components/user-action/index.js +169 -0
  385. package/lib/modules/participant/index.d.ts +34 -7
  386. package/lib/modules/participant/index.dev.d.ts +0 -1
  387. package/lib/modules/participant/index.dev.js +87 -116
  388. package/lib/modules/participant/index.js +39 -13
  389. package/lib/modules/participant/member-list-data-source.d.ts +4 -1
  390. package/lib/modules/participant/member-list-data-source.js +58 -31
  391. package/lib/modules/participant/room-control-drop-menu/index.css +0 -37
  392. package/lib/modules/participant/store.d.ts +58 -25
  393. package/lib/modules/participant/store.js +321 -298
  394. package/lib/modules/participant/type.d.ts +45 -1
  395. package/lib/modules/participant/type.js +15 -1
  396. package/lib/modules/pc-audio-connect/index.css +12 -0
  397. package/lib/modules/pc-audio-connect/index.d.ts +22 -0
  398. package/lib/modules/pc-audio-connect/index.js +68 -0
  399. package/lib/modules/pc-audio-connect/store.d.ts +46 -0
  400. package/lib/modules/pc-audio-connect/store.js +301 -0
  401. package/lib/modules/pc-audio-connect/types.d.ts +0 -0
  402. package/lib/modules/pc-audio-connect/types.js +1 -0
  403. package/lib/modules/pc-audio-connect/view.d.ts +3 -0
  404. package/lib/modules/pc-audio-connect/view.js +66 -0
  405. package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -0
  406. package/lib/modules/phone-audio-connect/components/callinfo/index.d.ts +10 -0
  407. package/lib/modules/phone-audio-connect/components/callinfo/index.js +77 -0
  408. package/lib/modules/phone-audio-connect/components/calling/index.css +72 -0
  409. package/lib/modules/phone-audio-connect/components/calling/index.d.ts +7 -0
  410. package/lib/modules/phone-audio-connect/components/calling/index.js +58 -0
  411. package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -0
  412. package/lib/modules/phone-audio-connect/components/remeber/index.d.ts +5 -0
  413. package/lib/modules/phone-audio-connect/components/remeber/index.js +24 -0
  414. package/lib/modules/phone-audio-connect/components/useing/index.css +46 -0
  415. package/lib/modules/phone-audio-connect/components/useing/index.d.ts +3 -0
  416. package/lib/modules/phone-audio-connect/components/useing/index.js +36 -0
  417. package/lib/modules/phone-audio-connect/enums.d.ts +4 -0
  418. package/lib/modules/phone-audio-connect/enums.js +12 -0
  419. package/lib/modules/phone-audio-connect/index.css +56 -0
  420. package/lib/modules/phone-audio-connect/index.d.ts +16 -0
  421. package/lib/modules/phone-audio-connect/index.js +63 -0
  422. package/lib/modules/phone-audio-connect/store.d.ts +46 -0
  423. package/lib/modules/phone-audio-connect/store.js +320 -0
  424. package/lib/modules/phone-audio-connect/types.d.ts +4 -0
  425. package/lib/modules/phone-audio-connect/types.js +6 -0
  426. package/lib/modules/phone-audio-connect/view.d.ts +3 -0
  427. package/lib/modules/phone-audio-connect/view.js +184 -0
  428. package/lib/modules/setting/audio-settings/audio-settings.js +5 -5
  429. package/lib/modules/setting/index.d.ts +25 -5
  430. package/lib/modules/setting/index.dev.d.ts +0 -1
  431. package/lib/modules/setting/index.dev.js +120 -81
  432. package/lib/modules/setting/index.js +35 -9
  433. package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
  434. package/lib/modules/setting/state/index.js +3 -3
  435. package/lib/modules/setting/store.d.ts +48 -14
  436. package/lib/modules/setting/store.js +105 -114
  437. package/lib/modules/setting/translate-settings/translate-settings.js +3 -3
  438. package/lib/modules/setting/video-settings/video-settings-basic.js +19 -22
  439. package/lib/modules/setting/view.js +6 -35
  440. package/lib/modules/share-screen/components/selection/index.css +70 -0
  441. package/lib/modules/share-screen/components/selection/index.d.ts +2 -0
  442. package/lib/modules/share-screen/components/selection/index.js +267 -0
  443. package/lib/modules/share-screen/components/share-state-bar/index.css +76 -0
  444. package/lib/modules/share-screen/components/share-state-bar/index.d.ts +4 -0
  445. package/lib/modules/share-screen/components/share-state-bar/index.js +98 -0
  446. package/lib/modules/share-screen/index.d.ts +15 -18
  447. package/lib/modules/share-screen/index.dev.d.ts +0 -1
  448. package/lib/modules/share-screen/index.dev.js +90 -91
  449. package/lib/modules/share-screen/index.js +22 -22
  450. package/lib/modules/share-screen/selection/index.css +0 -4
  451. package/lib/modules/share-screen/selection/index.js +129 -126
  452. package/lib/modules/share-screen/share-state-bar/index.js +1 -1
  453. package/lib/modules/share-screen/store.d.ts +36 -32
  454. package/lib/modules/share-screen/store.js +250 -219
  455. package/lib/modules/share-screen/types.d.ts +27 -0
  456. package/lib/modules/share-screen/types.js +6 -0
  457. package/lib/modules/share-screen/view.js +1 -1
  458. package/lib/modules/sound-effect/index.d.ts +9 -4
  459. package/lib/modules/sound-effect/index.js +72 -40
  460. package/lib/modules/sound-effect/sound-effect-player.js +1 -1
  461. package/lib/modules/state-bar/index.d.ts +16 -13
  462. package/lib/modules/state-bar/index.dev.d.ts +0 -1
  463. package/lib/modules/state-bar/index.dev.js +78 -83
  464. package/lib/modules/state-bar/index.js +23 -7
  465. package/lib/modules/state-bar/meeting-details.js +24 -12
  466. package/lib/modules/state-bar/meeting-network-state.js +1 -1
  467. package/lib/modules/state-bar/store.d.ts +20 -10
  468. package/lib/modules/state-bar/store.js +84 -87
  469. package/lib/modules/state-bar/view.js +2 -2
  470. package/lib/modules/video-window/deviceState/index.d.ts +2 -2
  471. package/lib/modules/video-window/deviceState/index.js +4 -6
  472. package/lib/modules/video-window/index.css +1 -4
  473. package/lib/modules/video-window/index.d.ts +33 -6
  474. package/lib/modules/video-window/index.js +63 -15
  475. package/lib/modules/video-window/members/index.css +1 -0
  476. package/lib/modules/video-window/members/index.js +25 -11
  477. package/lib/modules/video-window/store.d.ts +58 -27
  478. package/lib/modules/video-window/store.js +166 -161
  479. package/lib/modules/waiting-room-layout/index.d.ts +11 -4
  480. package/lib/modules/waiting-room-layout/index.js +26 -13
  481. package/lib/modules/waiting-room-layout/store.d.ts +6 -3
  482. package/lib/modules/waiting-room-layout/store.js +17 -15
  483. package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -4
  484. package/lib/modules/whiteboard/components/control-bar/store.js +8 -8
  485. package/lib/modules/whiteboard/index.d.ts +20 -14
  486. package/lib/modules/whiteboard/index.js +250 -223
  487. package/lib/modules/whiteboard/view.d.ts +2 -0
  488. package/lib/modules/whiteboard/view.js +49 -0
  489. package/lib/plugins/browser-runtime-plugin.js +5 -1
  490. package/lib/providers/chat-provider.d.ts +71 -0
  491. package/lib/providers/chat-provider.js +91 -0
  492. package/lib/providers/device-privilege-provider.d.ts +52 -6
  493. package/lib/providers/device-privilege-provider.js +212 -183
  494. package/lib/providers/device-provider.d.ts +203 -45
  495. package/lib/providers/device-provider.js +486 -398
  496. package/lib/providers/device-stream-provider.d.ts +12 -13
  497. package/lib/providers/device-stream-provider.js +86 -193
  498. package/lib/providers/dialog-provider.d.ts +135 -0
  499. package/lib/providers/dialog-provider.js +204 -0
  500. package/lib/providers/event-provider.d.ts +1 -21
  501. package/lib/providers/event-provider.js +19 -57
  502. package/lib/providers/interpreter-provider.d.ts +218 -7
  503. package/lib/providers/interpreter-provider.js +1072 -80
  504. package/lib/providers/local-storage-provider.d.ts +9 -0
  505. package/lib/providers/message-provider.d.ts +69 -0
  506. package/lib/providers/message-provider.js +98 -0
  507. package/lib/providers/monitor-provider.d.ts +5 -0
  508. package/lib/providers/phone-audio-provider.d.ts +131 -0
  509. package/lib/providers/phone-audio-provider.js +515 -0
  510. package/lib/providers/privilege-provider.d.ts +325 -12
  511. package/lib/providers/privilege-provider.js +111 -295
  512. package/lib/providers/renderer-provider.d.ts +46 -4
  513. package/lib/providers/renderer-provider.js +57 -60
  514. package/lib/providers/room-provider.d.ts +113 -6
  515. package/lib/providers/room-provider.js +667 -87
  516. package/lib/providers/screen-share-provider.d.ts +65 -0
  517. package/lib/providers/screen-share-provider.js +238 -0
  518. package/lib/providers/session-provider.d.ts +30 -0
  519. package/lib/runtime.d.ts +2 -0
  520. package/lib/scenes/main-scene.d.ts +41 -3
  521. package/lib/scenes/main-scene.js +407 -246
  522. package/lib/scenes/waiting-scene.d.ts +34 -4
  523. package/lib/scenes/waiting-scene.js +163 -56
  524. package/lib/shared-data-source/chat-data.d.ts +14 -0
  525. package/lib/shared-data-source/chat-data.js +130 -0
  526. package/lib/shared-data-source/device-privilege-data.d.ts +8 -0
  527. package/lib/shared-data-source/device-privilege-data.js +25 -0
  528. package/lib/shared-data-source/interpreter.d.ts +63 -0
  529. package/lib/shared-data-source/interpreter.js +248 -0
  530. package/lib/shared-data-source/layout-data.d.ts +29 -0
  531. package/lib/shared-data-source/layout-data.js +181 -0
  532. package/lib/shared-data-source/pin-data.d.ts +9 -0
  533. package/lib/shared-data-source/pin-data.js +24 -0
  534. package/lib/shared-data-source/setting.d.ts +32 -0
  535. package/lib/shared-data-source/setting.js +153 -0
  536. package/lib/shared-data-source/speaker-spotlight.d.ts +5 -0
  537. package/lib/shared-data-source/speaker-spotlight.js +15 -0
  538. package/lib/shared-data-source/video-window.d.ts +161 -0
  539. package/lib/shared-data-source/video-window.js +1202 -0
  540. package/lib/shared-data-source/waiting-room.d.ts +19 -0
  541. package/lib/shared-data-source/waiting-room.js +158 -0
  542. package/lib/translations/enUS.d.ts +43 -17
  543. package/lib/translations/enUS.js +59 -33
  544. package/lib/translations/zhCN.d.ts +43 -17
  545. package/lib/translations/zhCN.js +57 -31
  546. package/lib/type.d.ts +270 -25
  547. package/lib/type.js +67 -2
  548. package/lib/ui-manager.d.ts +20 -16
  549. package/lib/ui-manager.js +59 -795
  550. package/lib/ui-scene.d.ts +6 -1
  551. package/lib/ui-scene.js +372 -42
  552. package/lib/utilities/constant.d.ts +63 -86
  553. package/lib/utilities/constant.js +151 -175
  554. package/lib/utilities/copyText.js +8 -7
  555. package/lib/utilities/extract.d.ts +1 -1
  556. package/lib/utilities/privilege.d.ts +4 -0
  557. package/lib/utilities/privilege.js +31 -0
  558. package/lib/utilities/setting-config-storage.d.ts +12 -0
  559. package/lib/utilities/setting-config-storage.js +102 -0
  560. package/lib/utilities/tools.d.ts +35 -3
  561. package/lib/utilities/tools.js +104 -2
  562. package/lib/utilities/video-track-render-context.d.ts +3 -4
  563. package/lib/utilities/video-track-render-context.js +1 -1
  564. package/package.json +5 -5
  565. package/public/assets/full-screen-error-boundary-img.png +0 -0
  566. package/public/assets/leave-meeting.png +0 -0
  567. package/public/index.html +24 -14
@@ -41,9 +41,9 @@ require("core-js/modules/es.array.filter.js");
41
41
  require("core-js/modules/es.array.find.js");
42
42
  require("core-js/modules/es.array.for-each.js");
43
43
  require("core-js/modules/es.array.includes.js");
44
- require("core-js/modules/es.array.index-of.js");
45
44
  require("core-js/modules/es.array.iterator.js");
46
45
  require("core-js/modules/es.array.push.js");
46
+ require("core-js/modules/es.array.some.js");
47
47
  require("core-js/modules/es.date.to-json.js");
48
48
  require("core-js/modules/es.function.bind.js");
49
49
  require("core-js/modules/es.json.stringify.js");
@@ -56,10 +56,12 @@ require("core-js/modules/es.weak-map.js");
56
56
  require("core-js/modules/esnext.async-iterator.filter.js");
57
57
  require("core-js/modules/esnext.async-iterator.find.js");
58
58
  require("core-js/modules/esnext.async-iterator.for-each.js");
59
+ require("core-js/modules/esnext.async-iterator.some.js");
59
60
  require("core-js/modules/esnext.iterator.constructor.js");
60
61
  require("core-js/modules/esnext.iterator.filter.js");
61
62
  require("core-js/modules/esnext.iterator.find.js");
62
63
  require("core-js/modules/esnext.iterator.for-each.js");
64
+ require("core-js/modules/esnext.iterator.some.js");
63
65
  require("core-js/modules/esnext.weak-map.delete-all.js");
64
66
  require("core-js/modules/esnext.weak-map.emplace.js");
65
67
  require("core-js/modules/web.dom-collections.for-each.js");
@@ -79,7 +81,6 @@ var _type3 = require("agora-rte-sdk/lib/core/scene/type");
79
81
  var _type4 = require("agora-rte-sdk/lib/type");
80
82
  var _shareAudio = require("agora-ui-foundation/lib/components/room-screen-share-state-bar/share-audio");
81
83
  var _mobx = require("mobx");
82
- var _constant = require("../../utilities/constant");
83
84
  var _rendererEvent = require("../../utilities/renderer-event");
84
85
  var _i18n = require("agora-ui-foundation/lib/i18n");
85
86
  var _decorator = require("agora-foundation/lib/decorator");
@@ -89,8 +90,9 @@ var _type5 = require("agora-ui-foundation/lib/components/icon/type");
89
90
  var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
90
91
  var _renderer = require("../../utilities/renderer");
91
92
  var _screenCapturePermission = require("../../utilities/screen-capture-permission");
93
+ var _constant = require("../../utilities/constant");
92
94
  var _ShareScreenStore;
93
- var _initProto, _init__shareSelectionDialogId, _init__controlBarDialogId, _init__videoWindowDialogId, _init__isHost, _init__shareLocked, _init__screenTrack, _init__shareAudioTrack, _init_screenSharingState, _init_applicationCaptureSources, _init_screenCaptureSources, _init_hasScreenCapturePermission, _init_withAudio, _init_currentShareAudioProcessingChannel, _init_currentShareId, _init_sharerId, _init_currentShareType, _init_currentSelection, _init_currentSelectionType, _init_shareWithAudio, _init_boardOwnerUser, _init_localUser, _init_localUserRole, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _hasLoopbackDeviceDecs, _setShareAudioProcessingChannelDecs, _handleShareStartWithAudioDecs, _handleShareStopWithAudioDecs, _startPreviewDecs, _openDialogDecs, _openShareScreenSelectionDecs, _closeShareScreenSelectionDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _openRelaunchTipsDialogDecs, _setShareWithAudioDecs, _setWithAudioStateDecs, _handleStartShareDecs, _handleReplaceScreenDecs, _handleStopShareDecs, _handleScreenCaptureStateUpdatedDecs, _setShareLockDecs, _handleStreamUpdateDecs, _initControlbarDecs, _ref;
95
+ var _initProto, _init__shareSelectionDialogId, _init__controlBarDialogId, _init__videoWindowDialogId, _init__isHost, _init__shareLocked, _init__screenTrack, _init__shareAudioTrack, _init_screenSharingState, _init_applicationCaptureSources, _init_screenCaptureSources, _init_hasScreenCapturePermission, _init_currentShareAudioProcessingChannel, _init_currentShareId, _init_sharerId, _init_currentShareType, _init_currentSelection, _init_currentSelectionType, _init_currentSelectionBounds, _init_shareWithAudio, _init_boardOwnerUser, _init_localUser, _init_localUserRole, _handleChooseScreenDecs, _init_handleChooseScreen, _setShareWithAudioStateDecs, _hasLoopbackDeviceDecs, _setShareAudioProcessingChannelDecs, _handleShareStartWithAudioDecs, _handleShareStopWithAudioDecs, _startPreviewDecs, _openDialogDecs, _openShareScreenSelectionDecs, _closeShareScreenSelectionDecs, _setControlBarWindowIdDecs, _openVideoWindowDialogDecs, _closeControlBarDecs, _closeVideoWindowDialogDecs, _openRelaunchTipsDialogDecs, _startLoopbackDecs, _setWithAudioStateDecs, _handleStartShareDecs, _handleReplaceScreenDecs, _handleStopShareDecs, _handleScreenCaptureStateUpdatedDecs, _setShareLockDecs, _handleStreamUpdateDecs, _initControlbarDecs, _ref;
94
96
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
95
97
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
96
98
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -123,15 +125,16 @@ var _S = /*#__PURE__*/new WeakMap();
123
125
  var _T = /*#__PURE__*/new WeakMap();
124
126
  var _U = /*#__PURE__*/new WeakMap();
125
127
  var _V = /*#__PURE__*/new WeakMap();
126
- _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], _handleShareStartWithAudioDecs = [_mobx.action, _mobx.action.bound], _handleShareStopWithAudioDecs = [_mobx.action, _mobx.action.bound], _startPreviewDecs = [_mobx.action, _mobx.action.bound], _openDialogDecs = [_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], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _setShareWithAudioDecs = [_mobx.action, _mobx.action.bound], _setWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_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");
128
+ _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], _handleShareStartWithAudioDecs = [_mobx.action, _mobx.action.bound], _handleShareStopWithAudioDecs = [_mobx.action, _mobx.action.bound], _startPreviewDecs = [_mobx.action, _mobx.action.bound], _openDialogDecs = [_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], _openRelaunchTipsDialogDecs = [_mobx.action, _mobx.action.bound], _startLoopbackDecs = [_mobx.action, _mobx.action.bound], _setWithAudioStateDecs = [_mobx.action, _mobx.action.bound], _handleStartShareDecs = [_mobx.action, _mobx.action.bound], _handleReplaceScreenDecs = [_mobx.action, _mobx.action.bound], _handleStopShareDecs = [_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");
127
129
  var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
128
130
  function ShareScreenStore(_ref2) {
129
- var _this = this,
130
- _this$localUser;
131
+ var _this = this;
131
132
  var roomControl = _ref2.roomControl,
132
- mediaControl = _ref2.mediaControl,
133
- securityStore = _ref2.securityStore,
134
- uiEventStore = _ref2.uiEventStore;
133
+ deviceProvider = _ref2.deviceProvider,
134
+ privilegeProvider = _ref2.privilegeProvider,
135
+ messageProvider = _ref2.messageProvider,
136
+ dialogProvider = _ref2.dialogProvider,
137
+ eventProvider = _ref2.eventProvider;
135
138
  (0, _classCallCheck2["default"])(this, ShareScreenStore);
136
139
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
137
140
  (0, _defineProperty2["default"])(this, "_disposers", []);
@@ -147,9 +150,26 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
147
150
  onEvent: this._onUiEvent.bind(this)
148
151
  });
149
152
  (0, _defineProperty2["default"])(this, "_streamObserver", {
150
- onStreamsAdded: this._handleStreamUpdate.bind(this),
151
- onStreamsRemoved: this._handleStreamUpdate.bind(this),
152
- onStreamsUpdated: this._handleStreamUpdate.bind(this)
153
+ onStreamsAdded: function onStreamsAdded(_, events) {
154
+ return _this._handleStreamUpdate('add', events);
155
+ },
156
+ onStreamsRemoved: function onStreamsRemoved(_, events) {
157
+ return _this._handleStreamUpdate('remove', events);
158
+ },
159
+ onStreamsUpdated: function onStreamsUpdated(_, events) {
160
+ return _this._handleStreamUpdate('update', events);
161
+ }
162
+ });
163
+ (0, _defineProperty2["default"])(this, "_boardObserver", {
164
+ onActive: function onActive(ownerId) {
165
+ _this.handleStopShare();
166
+ (0, _env.isElectron)() && _this._closeCapture();
167
+ _this.closeShareScreenSelection();
168
+ _this.boardOwnerUser = _this._userControl.getUser(ownerId);
169
+ },
170
+ onInactive: function onInactive(reason) {
171
+ _this.boardOwnerUser = undefined;
172
+ }
153
173
  });
154
174
  _classPrivateFieldInitSpec(this, _A, _init__shareSelectionDialogId(this, ''));
155
175
  _classPrivateFieldInitSpec(this, _B, _init__controlBarDialogId(this, ''));
@@ -162,43 +182,45 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
162
182
  _classPrivateFieldInitSpec(this, _I, _init_applicationCaptureSources(this, []));
163
183
  _classPrivateFieldInitSpec(this, _J, _init_screenCaptureSources(this, []));
164
184
  _classPrivateFieldInitSpec(this, _K, _init_hasScreenCapturePermission(this, true));
165
- _classPrivateFieldInitSpec(this, _L, _init_withAudio(this, false));
166
- _classPrivateFieldInitSpec(this, _M, _init_currentShareAudioProcessingChannel(this, _shareAudio.AudioProcessingChannel.MONO));
167
- _classPrivateFieldInitSpec(this, _N, _init_currentShareId(this, ''));
168
- _classPrivateFieldInitSpec(this, _O, _init_sharerId(this, ''));
169
- _classPrivateFieldInitSpec(this, _P, _init_currentShareType(this, _type2.AgoraRtcScreenCaptureType.SCREEN));
170
- _classPrivateFieldInitSpec(this, _Q, _init_currentSelection(this, ''));
171
- _classPrivateFieldInitSpec(this, _R, _init_currentSelectionType(this, _type2.AgoraRtcScreenCaptureType.WINDOW));
172
- _classPrivateFieldInitSpec(this, _S, _init_shareWithAudio(this, false));
185
+ _classPrivateFieldInitSpec(this, _L, _init_currentShareAudioProcessingChannel(this, _shareAudio.AudioProcessingChannel.MONO));
186
+ _classPrivateFieldInitSpec(this, _M, _init_currentShareId(this, ''));
187
+ _classPrivateFieldInitSpec(this, _N, _init_sharerId(this, ''));
188
+ _classPrivateFieldInitSpec(this, _O, _init_currentShareType(this, _type2.AgoraRtcScreenCaptureType.SCREEN));
189
+ _classPrivateFieldInitSpec(this, _P, _init_currentSelection(this));
190
+ _classPrivateFieldInitSpec(this, _Q, _init_currentSelectionType(this, _type2.AgoraRtcScreenCaptureType.WINDOW));
191
+ _classPrivateFieldInitSpec(this, _R, _init_currentSelectionBounds(this, {
192
+ x: 0,
193
+ y: 0,
194
+ width: 0,
195
+ height: 0
196
+ }));
197
+ _classPrivateFieldInitSpec(this, _S, _init_shareWithAudio(this));
173
198
  _classPrivateFieldInitSpec(this, _T, _init_boardOwnerUser(this, undefined));
174
- _classPrivateFieldInitSpec(this, _U, _init_localUser(this, null));
199
+ _classPrivateFieldInitSpec(this, _U, _init_localUser(this));
175
200
  _classPrivateFieldInitSpec(this, _V, _init_localUserRole(this, _type.FcrUserRole.PARTICIPANT));
176
201
  (0, _defineProperty2["default"])(this, "handleChooseScreen", _init_handleChooseScreen(this, function (id) {
177
202
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type2.AgoraRtcScreenCaptureType.WINDOW;
203
+ var bounds = arguments.length > 2 ? arguments[2] : undefined;
178
204
  _this.currentSelection = id;
179
205
  _this.currentSelectionType = type;
206
+ _this.currentSelectionBounds = bounds;
180
207
  }));
181
208
  this._roomControl = roomControl;
182
- this._mediaControl = mediaControl;
209
+ this._deviceProvider = deviceProvider;
210
+ this._messageProvider = messageProvider;
211
+ this._dialogProvider = dialogProvider;
212
+ this._eventProvider = eventProvider;
183
213
  this._streamControl = roomControl.getStreamControl();
184
214
  this._userControl = roomControl.getUserControl();
185
- this._securityStore = securityStore;
186
- this._uiEventStore = uiEventStore;
215
+ this._securityStore = privilegeProvider;
187
216
  this.localUser = this._userControl.getLocalUser();
188
- this.localUserRole = (_this$localUser = this.localUser) === null || _this$localUser === void 0 ? void 0 : _this$localUser.userRole;
189
- this._uiEventStore.addObserver(this._uiEventObserver);
217
+ this.localUserRole = this.localUser.userRole;
218
+ this.shareWithAudio = (0, _env.isElectron)() ? false : true; // electron 默认 false,web 默认 true
219
+ this._loopbackAudioSourceId = (0, _env.getPlatform)() === _env.FcrApplicationPlatform.MACOS && (0, _env.isElectron)() ? 'AgoraALD' : (0, _env.isElectron)() ? '' : 'default';
220
+ this.currentSelection = (0, _env.isElectron)() ? '' : 'default';
221
+ this._eventProvider.addObserver(this._uiEventObserver);
190
222
  this._streamControl.addObserver(this._streamObserver);
191
- this._roomControl.getBoardControl().addObserver({
192
- onActive: function onActive(ownerId) {
193
- _this.handleStopShare();
194
- (0, _env.isElectron)() && _this._closeCapture();
195
- _this.closeShareScreenSelection();
196
- _this.boardOwnerUser = _this._userControl.getUser(ownerId);
197
- },
198
- onInactive: function onInactive(reason) {
199
- _this.boardOwnerUser = undefined;
200
- }
201
- });
223
+ this._roomControl.getBoardControl().addObserver(this._boardObserver);
202
224
  this._isHost = [_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST].includes(this.localUserRole);
203
225
  this._addEventListeners();
204
226
  this._syncShareStreamState();
@@ -207,20 +229,13 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
207
229
  }, function (screenSharePremission) {
208
230
  if (!screenSharePremission) {
209
231
  if (_this._isHost) return;
210
- _this._uiEventStore.showToast({
232
+ _this._messageProvider.showToast({
211
233
  type: 'error',
212
234
  message: (0, _i18n.transI18n)('fmt_screenshare_tips_hostprohibitssharing'),
213
235
  duration: 3000
214
236
  });
215
237
  }
216
238
  }));
217
- this._disposers.push((0, _mobx.reaction)(function () {
218
- return _this.screenSharingState;
219
- }, function (state) {
220
- _this._uiEventStore.sendEvent(_constant.UIAction.UPDATE_SHARE_STATE, {
221
- isOpen: state === _fcrCore.FcrMediaSourceState.OPEN
222
- });
223
- }));
224
239
  }
225
240
  return (0, _createClass2["default"])(ShareScreenStore, [{
226
241
  key: "_shareSelectionDialogId",
@@ -311,7 +326,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
311
326
  _classPrivateFieldSet(_K, this, v);
312
327
  }
313
328
  }, {
314
- key: "withAudio",
329
+ key: "currentShareAudioProcessingChannel",
315
330
  get: function get() {
316
331
  return _classPrivateFieldGet(_L, this);
317
332
  },
@@ -319,7 +334,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
319
334
  _classPrivateFieldSet(_L, this, v);
320
335
  }
321
336
  }, {
322
- key: "currentShareAudioProcessingChannel",
337
+ key: "currentShareId",
323
338
  get: function get() {
324
339
  return _classPrivateFieldGet(_M, this);
325
340
  },
@@ -327,7 +342,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
327
342
  _classPrivateFieldSet(_M, this, v);
328
343
  }
329
344
  }, {
330
- key: "currentShareId",
345
+ key: "sharerId",
331
346
  get: function get() {
332
347
  return _classPrivateFieldGet(_N, this);
333
348
  },
@@ -335,7 +350,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
335
350
  _classPrivateFieldSet(_N, this, v);
336
351
  }
337
352
  }, {
338
- key: "sharerId",
353
+ key: "currentShareType",
339
354
  get: function get() {
340
355
  return _classPrivateFieldGet(_O, this);
341
356
  },
@@ -343,7 +358,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
343
358
  _classPrivateFieldSet(_O, this, v);
344
359
  }
345
360
  }, {
346
- key: "currentShareType",
361
+ key: "currentSelection",
347
362
  get: function get() {
348
363
  return _classPrivateFieldGet(_P, this);
349
364
  },
@@ -351,7 +366,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
351
366
  _classPrivateFieldSet(_P, this, v);
352
367
  }
353
368
  }, {
354
- key: "currentSelection",
369
+ key: "currentSelectionType",
355
370
  get: function get() {
356
371
  return _classPrivateFieldGet(_Q, this);
357
372
  },
@@ -359,7 +374,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
359
374
  _classPrivateFieldSet(_Q, this, v);
360
375
  }
361
376
  }, {
362
- key: "currentSelectionType",
377
+ key: "currentSelectionBounds",
363
378
  get: function get() {
364
379
  return _classPrivateFieldGet(_R, this);
365
380
  },
@@ -398,6 +413,21 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
398
413
  set: function set(v) {
399
414
  _classPrivateFieldSet(_V, this, v);
400
415
  }
416
+ }, {
417
+ key: "supportEnumScreen",
418
+ get: function get() {
419
+ return this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE);
420
+ }
421
+ }, {
422
+ key: "appWindowList",
423
+ get: function get() {
424
+ return this._deviceProvider.getWindowList();
425
+ }
426
+ }, {
427
+ key: "displayList",
428
+ get: function get() {
429
+ return this._deviceProvider.getDisplayList();
430
+ }
401
431
  }, {
402
432
  key: "setShareWithAudioState",
403
433
  value: function setShareWithAudioState(withAudio) {
@@ -412,7 +442,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
412
442
  while (1) switch (_context.prev = _context.next) {
413
443
  case 0:
414
444
  _context.next = 2;
415
- return this._mediaControl.checkLoopbackDevice();
445
+ return this._deviceProvider.checkLoopbackDevice();
416
446
  case 2:
417
447
  res = _context.sent;
418
448
  return _context.abrupt("return", res === 0);
@@ -435,25 +465,28 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
435
465
  }, {
436
466
  key: "handlerBoardShareStop",
437
467
  value: function handlerBoardShareStop() {
438
- this._uiEventStore.sendEvent(_constant.UIAction.CLOSE_WHITEBOARD);
468
+ this._eventProvider.sendEvent(_constant.FcrUIAction.CLOSE_WHITEBOARD);
439
469
  }
440
470
  }, {
441
471
  key: "release",
442
472
  value: function release() {
473
+ var _this$_screenTrack;
443
474
  this._disposers.forEach(function (disposer) {
444
475
  return disposer();
445
476
  });
446
477
  this._disposers = [];
447
478
  this._closeCapture();
448
479
  this._removeEventListeners();
449
- this._uiEventStore.removeObserver(this._uiEventObserver);
480
+ this._eventProvider.removeObserver(this._uiEventObserver);
481
+ this._streamControl.removeObserver(this._streamObserver);
482
+ (_this$_screenTrack = this._screenTrack) === null || _this$_screenTrack === void 0 || _this$_screenTrack.removeObserver(this._observer);
483
+ this._roomControl.getBoardControl().removeObserver(this._boardObserver);
450
484
  }
451
485
  }, {
452
486
  key: "handleShareStartWithAudio",
453
487
  value: function handleShareStartWithAudio() {
454
- var isMac = navigator.userAgent.indexOf('Mac') > -1;
455
- this._shareAudioTrack = this._mediaControl.getLoopbackTrack(isMac && (0, _env.isElectron)() ? 'AgoraALD' : (0, _env.isElectron)() ? '' : 'default');
456
- if (this._mediaControl.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
488
+ this._shareAudioTrack = this._deviceProvider.getLoopbackTrack(this._loopbackAudioSourceId);
489
+ if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
457
490
  this._shareAudioTrack.start();
458
491
  }
459
492
  }
@@ -463,7 +496,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
463
496
  if (!this._shareAudioTrack) {
464
497
  return;
465
498
  }
466
- if (this._mediaControl.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
499
+ if (this._deviceProvider.isCapabilitySupported(_fcrCore.FcrCapability.LOOPBACK_CAPTURE)) {
467
500
  this._shareAudioTrack.stop();
468
501
  }
469
502
  }
@@ -472,28 +505,28 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
472
505
  value: function startPreview(dom) {
473
506
  this._previewDom = dom;
474
507
  if (dom) {
475
- var _this$_screenTrack;
476
- (_this$_screenTrack = this._screenTrack) === null || _this$_screenTrack === void 0 || _this$_screenTrack.startPreview({
508
+ var _this$_screenTrack2;
509
+ (_this$_screenTrack2 = this._screenTrack) === null || _this$_screenTrack2 === void 0 || _this$_screenTrack2.startPreview({
477
510
  renderMode: 1,
478
511
  isMirror: false
479
512
  }, dom);
480
513
  } else {
481
- var _this$_screenTrack2;
482
- (_this$_screenTrack2 = this._screenTrack) === null || _this$_screenTrack2 === void 0 || _this$_screenTrack2.stopPreview(dom);
514
+ var _this$_screenTrack3;
515
+ (_this$_screenTrack3 = this._screenTrack) === null || _this$_screenTrack3 === void 0 || _this$_screenTrack3.stopPreview(dom);
483
516
  this._previewDom = null;
484
517
  }
485
518
  }
486
519
  }, {
487
520
  key: "openDialog",
488
521
  value: function openDialog(item) {
489
- this._uiEventStore.openDialog(item, '', {
522
+ this._dialogProvider.openDialog(item, '', {
490
523
  controlBarWindowId: this._controlBarWindowId
491
524
  });
492
525
  }
493
526
  }, {
494
527
  key: "closeDialog",
495
528
  value: function closeDialog(item) {
496
- this._uiEventStore.closeDialog("".concat(item, "_").concat(item));
529
+ this._dialogProvider.closeDialog("".concat(item, "_").concat(item));
497
530
  }
498
531
  }, {
499
532
  key: "openShareScreenSelection",
@@ -504,15 +537,15 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
504
537
  return _regenerator["default"].wrap(function _callee2$(_context2) {
505
538
  while (1) switch (_context2.prev = _context2.next) {
506
539
  case 0:
507
- this._shareSelectionDialogId = this._uiEventStore.openDialog(_constant.DialogKey.SHARE_SCREEN, 'screen-selection');
540
+ this._shareSelectionDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.SHARE_SCREEN, 'screen-selection');
508
541
  _context2.next = 3;
509
- return this._mediaControl.getWindowList();
542
+ return this.appWindowList;
510
543
  case 3:
511
544
  windowList = _context2.sent.filter(function (item) {
512
545
  return !['AgoraHighLighter', 'Toast', 'Confirm'].includes(item.title) || item.isCurrent;
513
546
  });
514
547
  _context2.next = 6;
515
- return this._mediaControl.getDisplayList();
548
+ return this.displayList;
516
549
  case 6:
517
550
  displayList = _context2.sent;
518
551
  (0, _mobx.runInAction)(function () {
@@ -539,7 +572,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
539
572
  }, {
540
573
  key: "closeShareScreenSelection",
541
574
  value: function closeShareScreenSelection() {
542
- this._uiEventStore.closeDialog(this._shareSelectionDialogId);
575
+ this._dialogProvider.closeDialog(this._shareSelectionDialogId);
543
576
  this._shareSelectionDialogId = '';
544
577
  }
545
578
  }, {
@@ -550,35 +583,35 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
550
583
  }, {
551
584
  key: "openVideoWindowDialog",
552
585
  value: function openVideoWindowDialog() {
553
- this._videoWindowDialogId = this._uiEventStore.openDialog(_constant.DialogKey.VIDEO_WINDOW);
586
+ this._videoWindowDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
554
587
  }
555
588
  }, {
556
589
  key: "closeControlBar",
557
590
  value: function closeControlBar() {
558
591
  if (!this._controlBarDialogId) return;
559
592
  this.setControlBarWindowId(-1);
560
- this._uiEventStore.closeDialog(this._controlBarDialogId);
593
+ this._dialogProvider.closeDialog(this._controlBarDialogId);
561
594
  this._controlBarDialogId = '';
562
595
  }
563
596
  }, {
564
597
  key: "closeVideoWindowDialog",
565
598
  value: function closeVideoWindowDialog() {
566
- this._uiEventStore.closeDialog(this._videoWindowDialogId);
599
+ this._dialogProvider.closeDialog(this._videoWindowDialogId);
567
600
  this._videoWindowDialogId = '';
568
- this._uiEventStore.sendEvent(_constant.UIAction.CLOSE_VIDEO_WINDOW);
601
+ this._eventProvider.sendEvent(_constant.FcrUIAction.CLOSE_VIDEO_WINDOW);
569
602
  }
570
603
  }, {
571
604
  key: "openRelaunchTipsDialog",
572
605
  value: function openRelaunchTipsDialog() {
573
606
  var _this3 = this;
574
- var dialogId = this._uiEventStore.openConfirmDialog({
607
+ var dialogId = this._dialogProvider.openConfirmDialog({
575
608
  content: (0, _i18n.transI18n)('fmt_driver_installation_v_sound_card'),
576
609
  onOk: function onOk() {
577
- dialogId && _this3._uiEventStore.closeConfirm(dialogId);
610
+ dialogId && _this3._dialogProvider.closeConfirm(dialogId);
578
611
  (0, _renderer.restartApp)();
579
612
  },
580
613
  onCancel: function onCancel() {
581
- dialogId && _this3._uiEventStore.closeConfirm(dialogId);
614
+ dialogId && _this3._dialogProvider.closeConfirm(dialogId);
582
615
  },
583
616
  okText: (0, _i18n.transI18n)('fmt_premeeting_setting_mobile_popup_button_restart'),
584
617
  cancelText: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit'),
@@ -586,51 +619,39 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
586
619
  });
587
620
  }
588
621
  }, {
589
- key: "setShareWithAudio",
622
+ key: "startLoopback",
590
623
  value: function () {
591
- var _setShareWithAudio = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(withAudio) {
592
- var isMac, hideTip;
624
+ var _startLoopback = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(withAudio) {
593
625
  return _regenerator["default"].wrap(function _callee3$(_context3) {
594
626
  while (1) switch (_context3.prev = _context3.next) {
595
627
  case 0:
596
- isMac = (0, _env.getPlatform)() === _env.FcrApplicationPlatform.MACOS;
597
- if (!(withAudio && isMac)) {
598
- _context3.next = 6;
599
- break;
600
- }
601
- _context3.next = 4;
602
- return this.hasLoopbackDevice();
603
- case 4:
604
- hideTip = _context3.sent;
605
- if (!hideTip) {
606
- this.openRelaunchTipsDialog();
607
- }
608
- case 6:
609
628
  this._setWithAudioState(withAudio);
610
629
  if (withAudio) {
611
630
  this.handleShareStartWithAudio();
612
631
  } else {
613
632
  this.handleShareStopWithAudio();
614
633
  }
615
- case 8:
634
+ case 2:
616
635
  case "end":
617
636
  return _context3.stop();
618
637
  }
619
638
  }, _callee3, this);
620
639
  }));
621
- function setShareWithAudio(_x) {
622
- return _setShareWithAudio.apply(this, arguments);
640
+ function startLoopback(_x) {
641
+ return _startLoopback.apply(this, arguments);
623
642
  }
624
- return setShareWithAudio;
643
+ return startLoopback;
625
644
  }()
626
645
  }, {
627
646
  key: "_setWithAudioState",
628
647
  value: function _setWithAudioState(withAudio) {
629
- this.withAudio = withAudio;
630
- this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
631
- audioPrivilege: withAudio ? _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
632
- videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
633
- }));
648
+ this.setShareWithAudioState(withAudio);
649
+ if (this._currentShareStreamId) {
650
+ this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, this._currentShareStreamId, {
651
+ audioPrivilege: withAudio ? _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE : _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
652
+ videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
653
+ }));
654
+ }
634
655
  }
635
656
  }, {
636
657
  key: "prepareShareScreen",
@@ -646,28 +667,25 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
646
667
  _context4.next = 4;
647
668
  break;
648
669
  }
649
- dialogId = this._uiEventStore.openConfirmDialog({
670
+ dialogId = this._dialogProvider.openConfirmDialog({
650
671
  title: (0, _i18n.transI18n)('fmt_screenshare_options_allowshare'),
651
672
  content: (0, _i18n.transI18n)('fmt_screenshare_tips_notavailable'),
652
673
  okText: (0, _i18n.transI18n)('fmt_group_popup_creat_next_sidpop_label_setting'),
653
674
  cancelText: (0, _i18n.transI18n)('fmt_group_popup_creat_next_sidpop_button_help_ignore'),
654
675
  onCancel: function onCancel() {
655
- _this4._uiEventStore.closeConfirm(dialogId);
676
+ _this4._dialogProvider.closeConfirm(dialogId);
656
677
  },
657
678
  onOk: function onOk() {
658
679
  window.runtime.checkMediaPermission('sharing');
659
- _this4._uiEventStore.closeConfirm(dialogId);
680
+ _this4._dialogProvider.closeConfirm(dialogId);
660
681
  },
661
682
  closable: false
662
683
  });
663
684
  return _context4.abrupt("return");
664
685
  case 4:
665
- if (this._mediaControl.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE)) {
666
- this.openShareScreenSelection();
667
- } else {
668
- this.handleStartShare();
669
- }
670
- case 5:
686
+ this.supportEnumScreen && this.openShareScreenSelection();
687
+ !(0, _env.isElectron)() && this.handleStartShare(this.currentSelection, _type2.AgoraRtcScreenCaptureType.SCREEN, true, _shareAudio.AudioProcessingChannel.MONO, this.currentSelectionBounds); // web 直接开始分享
688
+ case 6:
671
689
  case "end":
672
690
  return _context4.stop();
673
691
  }
@@ -681,101 +699,95 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
681
699
  }, {
682
700
  key: "handleStartShare",
683
701
  value: function () {
684
- var _handleStartShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
685
- var id,
686
- type,
687
- withAudio,
688
- audioProcessingChannel,
702
+ var _handleStartShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(id, type, withAudio) {
703
+ var audioProcessingChannel,
704
+ bounds,
689
705
  excludeWindows,
690
- _this$localUser2,
691
- _this$localUser3,
692
706
  screenTrack,
693
707
  _args5 = arguments;
694
708
  return _regenerator["default"].wrap(function _callee5$(_context5) {
695
709
  while (1) switch (_context5.prev = _context5.next) {
696
710
  case 0:
697
- id = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : 'default';
698
- type = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : _type2.AgoraRtcScreenCaptureType.SCREEN;
699
- withAudio = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : false;
700
711
  audioProcessingChannel = _args5.length > 3 && _args5[3] !== undefined ? _args5[3] : _shareAudio.AudioProcessingChannel.MONO;
701
- console.log('window id:', id, type);
712
+ bounds = _args5.length > 4 ? _args5[4] : undefined;
702
713
  excludeWindows = [];
703
- withAudio = (0, _env.isElectron)() ? withAudio : true; // electron 取 withAudio,web 默认为 true
704
714
  if ((0, _env.isElectron)()) this.closeShareScreenSelection();
705
715
  if (!(id.split('-')[0] === 'whiteboard')) {
706
- _context5.next = 13;
716
+ _context5.next = 9;
707
717
  break;
708
718
  }
709
- if (!(!this._securityStore.hasStartBoardPermission() && !(((_this$localUser2 = this.localUser) === null || _this$localUser2 === void 0 ? void 0 : _this$localUser2.userRole) === _type.FcrUserRole.HOST) && !(((_this$localUser3 = this.localUser) === null || _this$localUser3 === void 0 ? void 0 : _this$localUser3.userRole) === _type.FcrUserRole.COHOST))) {
710
- _context5.next = 11;
719
+ if (!(!this._securityStore.hasStartBoardPermission() && !(this.localUser.userRole === _type.FcrUserRole.HOST) && !(this.localUser.userRole === _type.FcrUserRole.COHOST))) {
720
+ _context5.next = 7;
711
721
  break;
712
722
  }
713
723
  return _context5.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_hostprohibits'), 'error'));
714
- case 11:
715
- this._uiEventStore.sendEvent(_constant.UIAction.OPEN_WHITEBOARD);
724
+ case 7:
725
+ this._eventProvider.sendEvent(_constant.FcrUIAction.OPEN_WHITEBOARD);
716
726
  return _context5.abrupt("return");
717
- case 13:
727
+ case 9:
718
728
  if (!(this.screenSharingState === _fcrCore.FcrMediaSourceState.OPEN)) {
719
- _context5.next = 17;
729
+ _context5.next = 13;
720
730
  break;
721
731
  }
722
- this.handleReplaceScreen(id, type, withAudio, audioProcessingChannel);
732
+ this.handleReplaceScreen(id, type, withAudio, audioProcessingChannel, bounds);
723
733
  this._setShareLock(false);
724
734
  return _context5.abrupt("return");
725
- case 17:
726
- this._uiEventStore.sendEvent(_constant.UIAction.SET_CURRENT_SHARE_SCREEN, {
735
+ case 13:
736
+ this._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
727
737
  id: id,
728
- type: type
738
+ type: type,
739
+ bounds: bounds
729
740
  });
730
- _context5.t0 = this._mediaControl.isCapabilitySupported(_fcrCore.FcrCapability.SCREEN_ENUMERATE);
741
+ _context5.t0 = this.supportEnumScreen;
731
742
  if (!_context5.t0) {
732
- _context5.next = 23;
743
+ _context5.next = 19;
733
744
  break;
734
745
  }
735
- _context5.next = 22;
746
+ _context5.next = 18;
736
747
  return this._validateShareStart(id, type);
737
- case 22:
748
+ case 18:
738
749
  _context5.t0 = !_context5.sent;
739
- case 23:
750
+ case 19:
740
751
  if (!_context5.t0) {
741
- _context5.next = 25;
752
+ _context5.next = 21;
742
753
  break;
743
754
  }
744
755
  return _context5.abrupt("return");
745
- case 25:
756
+ case 21:
746
757
  if (!this._shareLocked) {
747
- _context5.next = 27;
758
+ _context5.next = 23;
748
759
  break;
749
760
  }
750
761
  return _context5.abrupt("return", this._showToast((0, _i18n.transI18n)('fmt_screenshare_tips_enablecollection'), 'error'));
751
- case 27:
762
+ case 23:
752
763
  this._setShareLock(true);
764
+ this.setShareWithAudioState(withAudio);
753
765
  this.currentShareId = id;
754
766
  this.currentShareType = type;
755
- this.withAudio = withAudio;
767
+ this.currentSelectionBounds = bounds;
756
768
  if (withAudio) this.handleShareStartWithAudio();
757
769
  if (this._hasScreenSharePermission()) {
758
- _context5.next = 35;
770
+ _context5.next = 32;
759
771
  break;
760
772
  }
761
773
  this._setShareLock(false);
762
774
  return _context5.abrupt("return");
763
- case 35:
775
+ case 32:
776
+ this._initControlbar(); // 初始化控制栏,web 和 electron 都需要执行
764
777
  if (!(0, _env.isElectron)()) {
765
- _context5.next = 43;
778
+ _context5.next = 40;
766
779
  break;
767
780
  }
768
- _context5.next = 38;
781
+ _context5.next = 36;
769
782
  return this._createScreenStream(id);
770
- case 38:
771
- this._initControlbar();
783
+ case 36:
772
784
  this.openVideoWindowDialog();
773
- _context5.next = 42;
785
+ _context5.next = 39;
774
786
  return this._getExcludeWindows();
775
- case 42:
787
+ case 39:
776
788
  excludeWindows = _context5.sent;
777
- case 43:
778
- screenTrack = this._mediaControl.getScreenTrack(id);
789
+ case 40:
790
+ screenTrack = this._deviceProvider.getScreenTrack(id);
779
791
  this._screenTrack = screenTrack;
780
792
  screenTrack.addObserver(this._observer);
781
793
  screenTrack.start(type, {
@@ -783,30 +795,28 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
783
795
  withAudio: withAudio,
784
796
  excludeWindows: excludeWindows
785
797
  });
786
- case 47:
798
+ case 44:
787
799
  case "end":
788
800
  return _context5.stop();
789
801
  }
790
802
  }, _callee5, this);
791
803
  }));
792
- function handleStartShare() {
804
+ function handleStartShare(_x2, _x3, _x4) {
793
805
  return _handleStartShare.apply(this, arguments);
794
806
  }
795
807
  return handleStartShare;
796
808
  }()
797
809
  }, {
798
810
  key: "handleReplaceScreen",
799
- value: function handleReplaceScreen() {
811
+ value: function handleReplaceScreen(id, type, withAudio) {
800
812
  var _this5 = this;
801
- var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
802
- var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _type2.AgoraRtcScreenCaptureType.WINDOW;
803
- var withAudio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
804
813
  var audioProcessingChannel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _shareAudio.AudioProcessingChannel.MONO;
814
+ var bounds = arguments.length > 4 ? arguments[4] : undefined;
805
815
  withAudio = (0, _env.isElectron)() ? withAudio : true; // electron 取 withAudio,web 默认为 true
806
- if (this.withAudio && !withAudio) {
816
+ if (this.shareWithAudio && !withAudio) {
807
817
  this.handleShareStopWithAudio();
808
818
  }
809
- this.withAudio = withAudio;
819
+ this.setShareWithAudioState(withAudio);
810
820
  var screenTrack = this._screenTrack;
811
821
  this._isReplaceScreen = true;
812
822
  if (screenTrack) {
@@ -818,19 +828,20 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
818
828
  while (1) switch (_context6.prev = _context6.next) {
819
829
  case 0:
820
830
  if (!(state === _fcrCore.FcrMediaSourceState.CLOSE)) {
821
- _context6.next = 18;
831
+ _context6.next = 19;
822
832
  break;
823
833
  }
824
834
  if ((0, _env.isElectron)()) {
825
835
  _this5._initControlbar();
826
836
  }
827
- _this5._uiEventStore.sendEvent(_constant.UIAction.SET_CURRENT_SHARE_SCREEN, {
837
+ _this5._eventProvider.sendEvent(_constant.FcrUIAction.SET_CURRENT_SHARE_SCREEN, {
828
838
  id: id,
829
- type: type
839
+ type: type,
840
+ bounds: bounds
830
841
  });
831
842
  screenTrack.removeObserver(_this5._observer);
832
843
  screenTrack.removeObserver(observer);
833
- newScreenTrack = _this5._mediaControl.getScreenTrack(id);
844
+ newScreenTrack = _this5._deviceProvider.getScreenTrack(id);
834
845
  if (withAudio) {
835
846
  _this5.handleShareStartWithAudio();
836
847
  }
@@ -854,19 +865,20 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
854
865
  if (_this5._currentShareStreamId) {
855
866
  _this5._streamControl.bindLocalStreams([{
856
867
  streamId: _this5._currentShareStreamId,
857
- audioSourceId: 'default',
868
+ audioSourceId: _this5._loopbackAudioSourceId,
858
869
  videoSourceId: id
859
870
  }]);
860
871
  }
861
872
  _this5.currentShareId = id;
862
873
  _this5.currentShareType = type;
863
- case 18:
874
+ _this5.currentSelectionBounds = bounds;
875
+ case 19:
864
876
  case "end":
865
877
  return _context6.stop();
866
878
  }
867
879
  }, _callee6);
868
880
  }));
869
- function onScreenCaptureStateUpdated(_x2, _x3) {
881
+ function onScreenCaptureStateUpdated(_x5, _x6) {
870
882
  return _onScreenCaptureStateUpdated.apply(this, arguments);
871
883
  }
872
884
  return onScreenCaptureStateUpdated;
@@ -880,11 +892,11 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
880
892
  }, {
881
893
  key: "handleStopShare",
882
894
  value: function handleStopShare() {
883
- var _this$_screenTrack3, _this$_screenTrack4;
895
+ var _this$_screenTrack4, _this$_screenTrack5;
884
896
  this._closeCapture();
885
897
  this._removeScreenStream();
886
- this._previewDom && ((_this$_screenTrack3 = this._screenTrack) === null || _this$_screenTrack3 === void 0 ? void 0 : _this$_screenTrack3.stopPreview(this._previewDom));
887
- (_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 || _this$_screenTrack4.stop();
898
+ this._previewDom && ((_this$_screenTrack4 = this._screenTrack) === null || _this$_screenTrack4 === void 0 ? void 0 : _this$_screenTrack4.stopPreview(this._previewDom));
899
+ (_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0 || _this$_screenTrack5.stop();
888
900
  this.currentShareId = '';
889
901
  }
890
902
  }, {
@@ -892,14 +904,14 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
892
904
  value: function () {
893
905
  var _createScreenStream2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(videoSourceId) {
894
906
  var _this6 = this;
895
- var streamType, streamId;
907
+ var audioSourceId, streamId;
896
908
  return _regenerator["default"].wrap(function _callee7$(_context7) {
897
909
  while (1) switch (_context7.prev = _context7.next) {
898
910
  case 0:
899
- streamType = this.withAudio ? _type3.AgoraRteMediaStreamType.BOTH : _type3.AgoraRteMediaStreamType.VIDEO;
911
+ audioSourceId = this._loopbackAudioSourceId;
900
912
  _context7.next = 3;
901
913
  return this._streamControl.addLocalScreenStream({
902
- streamType: streamType
914
+ streamType: _type3.AgoraRteMediaStreamType.BOTH
903
915
  })["finally"](function () {
904
916
  _this6._setShareLock(false);
905
917
  });
@@ -907,7 +919,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
907
919
  streamId = _context7.sent;
908
920
  this._streamControl.bindLocalStreams([{
909
921
  streamId: streamId,
910
- audioSourceId: 'default',
922
+ audioSourceId: audioSourceId,
911
923
  videoSourceId: videoSourceId
912
924
  }]);
913
925
  this._currentShareStreamId = streamId;
@@ -917,7 +929,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
917
929
  }
918
930
  }, _callee7, this);
919
931
  }));
920
- function _createScreenStream(_x4) {
932
+ function _createScreenStream(_x7) {
921
933
  return _createScreenStream2.apply(this, arguments);
922
934
  }
923
935
  return _createScreenStream;
@@ -926,6 +938,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
926
938
  key: "_handleWebScreenCaptureStateUpdated",
927
939
  value: function () {
928
940
  var _handleWebScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(sourceId, state) {
941
+ var _this$_screenTrack6;
929
942
  return _regenerator["default"].wrap(function _callee8$(_context8) {
930
943
  while (1) switch (_context8.prev = _context8.next) {
931
944
  case 0:
@@ -933,12 +946,10 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
933
946
  if (state === _fcrCore.FcrMediaSourceState.OPEN) {
934
947
  this._setShareLock(true);
935
948
  this._createScreenStream(this.currentShareId);
936
- this._isReplaceScreen = false;
937
949
  }
938
950
  if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
939
951
  this._setShareLock(false);
940
- !this._isReplaceScreen && this.handleStopShare();
941
- this._isReplaceScreen = false;
952
+ this._isReplaceScreen ? (_this$_screenTrack6 = this._screenTrack) === null || _this$_screenTrack6 === void 0 ? void 0 : _this$_screenTrack6.stop() : this.handleStopShare();
942
953
  }
943
954
  if (state === _fcrCore.FcrMediaSourceState.ERROR) {
944
955
  this._setShareLock(false);
@@ -950,7 +961,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
950
961
  }
951
962
  }, _callee8, this);
952
963
  }));
953
- function _handleWebScreenCaptureStateUpdated(_x5, _x6) {
964
+ function _handleWebScreenCaptureStateUpdated(_x8, _x9) {
954
965
  return _handleWebScreenCaptureStateUpdated2.apply(this, arguments);
955
966
  }
956
967
  return _handleWebScreenCaptureStateUpdated;
@@ -959,31 +970,33 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
959
970
  key: "_handleScreenCaptureStateUpdated",
960
971
  value: function () {
961
972
  var _handleScreenCaptureStateUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(sourceId, state) {
962
- var _this$_screenTrack5, _this$_screenTrack6, _this$_screenTrack7;
973
+ var _this$_screenTrack7, _this$_screenTrack8, _this$_screenTrack9;
963
974
  return _regenerator["default"].wrap(function _callee9$(_context9) {
964
975
  while (1) switch (_context9.prev = _context9.next) {
965
976
  case 0:
966
977
  if (state === _fcrCore.FcrMediaSourceState.CLOSE) {
967
- this._previewDom && ((_this$_screenTrack5 = this._screenTrack) === null || _this$_screenTrack5 === void 0 ? void 0 : _this$_screenTrack5.stopPreview(this._previewDom));
968
- (_this$_screenTrack6 = this._screenTrack) === null || _this$_screenTrack6 === void 0 || _this$_screenTrack6.removeObserver(this._observer);
969
- (_this$_screenTrack7 = this._screenTrack) === null || _this$_screenTrack7 === void 0 || _this$_screenTrack7.stop();
978
+ this._previewDom && ((_this$_screenTrack7 = this._screenTrack) === null || _this$_screenTrack7 === void 0 ? void 0 : _this$_screenTrack7.stopPreview(this._previewDom));
979
+ (_this$_screenTrack8 = this._screenTrack) === null || _this$_screenTrack8 === void 0 || _this$_screenTrack8.removeObserver(this._observer);
980
+ this._isReplaceScreen ? (_this$_screenTrack9 = this._screenTrack) === null || _this$_screenTrack9 === void 0 ? void 0 : _this$_screenTrack9.stop() : this.handleStopShare();
981
+ this._isReplaceScreen = false;
970
982
  }
971
983
  if (!(state === _fcrCore.FcrMediaSourceState.ERROR)) {
972
- _context9.next = 5;
984
+ _context9.next = 6;
973
985
  break;
974
986
  }
975
987
  this.handleStopShare();
976
988
  this.screenSharingState = _fcrCore.FcrMediaSourceState.CLOSE;
989
+ this._isReplaceScreen = false;
977
990
  return _context9.abrupt("return");
978
- case 5:
979
- this.screenSharingState = state;
980
991
  case 6:
992
+ this.screenSharingState = state;
993
+ case 7:
981
994
  case "end":
982
995
  return _context9.stop();
983
996
  }
984
997
  }, _callee9, this);
985
998
  }));
986
- function _handleScreenCaptureStateUpdated(_x7, _x8) {
999
+ function _handleScreenCaptureStateUpdated(_x10, _x11) {
987
1000
  return _handleScreenCaptureStateUpdated2.apply(this, arguments);
988
1001
  }
989
1002
  return _handleScreenCaptureStateUpdated;
@@ -1046,8 +1059,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1046
1059
  var _this$_streamControl$2,
1047
1060
  _this7 = this;
1048
1061
  var currentShareStreamId = this._currentShareStreamId || ((_this$_streamControl$2 = this._streamControl.getStreamList().find(function (stream) {
1049
- var _this7$localUser;
1050
- return stream.videoSourceType === _type4.AgoraRteVideoSourceType.SCREEN && stream.owner.userId === ((_this7$localUser = _this7.localUser) === null || _this7$localUser === void 0 ? void 0 : _this7$localUser.userId);
1062
+ return stream.videoSourceType === _type4.AgoraRteVideoSourceType.SCREEN && stream.owner.userId === _this7.localUser.userId;
1051
1063
  })) === null || _this$_streamControl$2 === void 0 ? void 0 : _this$_streamControl$2.streamId);
1052
1064
  if (this.screenSharingState !== _fcrCore.FcrMediaSourceState.OPEN && currentShareStreamId) {
1053
1065
  this.handleStopShare();
@@ -1056,26 +1068,42 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1056
1068
  }, {
1057
1069
  key: "_isStoppedFor",
1058
1070
  value: function _isStoppedFor(events, reason) {
1071
+ var _this8 = this;
1059
1072
  return events && events.find(function (event) {
1060
1073
  var _event$cause;
1061
- 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;
1074
+ 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 && event.modifiedStream.owner.userId === _this8.localUser.userId;
1062
1075
  });
1063
1076
  }
1064
1077
  }, {
1065
1078
  key: "_handleStreamUpdate",
1066
- value: function _handleStreamUpdate(_, events) {
1067
- var _this$localUser4, _this$localUser5;
1079
+ value: function _handleStreamUpdate(process, events) {
1080
+ var _this$_screenTrack10,
1081
+ _this9 = this;
1068
1082
  var isClosedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.CLOSE);
1069
1083
  var isSeizedByOther = this._isStoppedFor(events, _types.FcrBoardInactiveReason.SEIZE);
1070
1084
  var operatorUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.operatorUser) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.operatorUser);
1071
1085
  var ownerUser = (isSeizedByOther === null || isSeizedByOther === void 0 ? void 0 : isSeizedByOther.modifiedStream.owner) || (isClosedByOther === null || isClosedByOther === void 0 ? void 0 : isClosedByOther.modifiedStream.owner);
1072
- var selfOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === ((_this$localUser4 = this.localUser) === null || _this$localUser4 === void 0 ? void 0 : _this$localUser4.userId);
1073
- var isMyOwnShare = ((_this$localUser5 = this.localUser) === null || _this$localUser5 === void 0 ? void 0 : _this$localUser5.userId) === (ownerUser === null || ownerUser === void 0 ? void 0 : ownerUser.userId);
1074
- (isSeizedByOther || isClosedByOther) && !selfOperated && this.handleStopShare();
1075
- isClosedByOther && !selfOperated && isMyOwnShare && this._uiEventStore.sendEvent(_constant.UIAction.SHOW_TOAST, {
1086
+ var selfOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === this.localUser.userId;
1087
+ var isMyOwnShare = this.localUser.userId === (ownerUser === null || ownerUser === void 0 ? void 0 : ownerUser.userId);
1088
+ (isSeizedByOther || isClosedByOther) && !selfOperated && ((_this$_screenTrack10 = this._screenTrack) === null || _this$_screenTrack10 === void 0 ? void 0 : _this$_screenTrack10.stop());
1089
+ isClosedByOther && !selfOperated && isMyOwnShare && this._eventProvider.sendEvent(_constant.FcrUIAction.SHOW_TOAST, {
1076
1090
  type: 'info',
1077
1091
  message: (0, _i18n.transI18n)('fmt_share_tips_sharingdisabled')
1078
1092
  });
1093
+ switch (process) {
1094
+ case 'remove':
1095
+ if (events.some(function (event) {
1096
+ return event.modifiedStream.videoSourceType === _type4.AgoraRteVideoSourceType.SCREEN && event.modifiedStream.owner.userId === _this9.localUser.userId;
1097
+ })) {
1098
+ var _this$_screenTrack11;
1099
+ if (!(0, _env.isElectron)() && this._isReplaceScreen) {
1100
+ this._isReplaceScreen = false;
1101
+ return;
1102
+ } // web 下如果是替换的逻辑,不需要关闭分享
1103
+ (_this$_screenTrack11 = this._screenTrack) === null || _this$_screenTrack11 === void 0 || _this$_screenTrack11.stop();
1104
+ }
1105
+ break;
1106
+ }
1079
1107
  }
1080
1108
  }, {
1081
1109
  key: "_addEventListeners",
@@ -1095,7 +1123,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1095
1123
  while (1) switch (_context11.prev = _context11.next) {
1096
1124
  case 0:
1097
1125
  _context11.t0 = event;
1098
- _context11.next = _context11.t0 === _constant.UIAction.START_SHARE_SCREEN ? 3 : _context11.t0 === _constant.UIAction.STOP_SCREEN_CAPTURE ? 5 : _context11.t0 === _constant.UIAction.ENGINE_RECONNECTED ? 7 : _context11.t0 === _constant.UIAction.STOP_SHARE_SCREEN ? 9 : _context11.t0 === _constant.UIAction.SET_SHARE_WITH_AUDIO ? 11 : 13;
1126
+ _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 : 13;
1099
1127
  break;
1100
1128
  case 3:
1101
1129
  this.prepareShareScreen();
@@ -1114,7 +1142,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1114
1142
  this.handleStopShare();
1115
1143
  return _context11.abrupt("break", 13);
1116
1144
  case 11:
1117
- this.setShareWithAudio(params.withAudio);
1145
+ this.startLoopback(params.withAudio);
1118
1146
  return _context11.abrupt("break", 13);
1119
1147
  case 13:
1120
1148
  case "end":
@@ -1122,7 +1150,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1122
1150
  }
1123
1151
  }, _callee11, this);
1124
1152
  }));
1125
- function _onUiEvent(_x9, _x10) {
1153
+ function _onUiEvent(_x12, _x13) {
1126
1154
  return _onUiEvent2.apply(this, arguments);
1127
1155
  }
1128
1156
  return _onUiEvent;
@@ -1131,7 +1159,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1131
1159
  key: "_showToast",
1132
1160
  value: function _showToast(message, type) {
1133
1161
  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3000;
1134
- this._uiEventStore.showToast({
1162
+ this._messageProvider.showToast({
1135
1163
  type: type,
1136
1164
  message: message,
1137
1165
  duration: duration
@@ -1146,7 +1174,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1146
1174
  while (1) switch (_context12.prev = _context12.next) {
1147
1175
  case 0:
1148
1176
  _context12.next = 2;
1149
- return this._mediaControl.getWindowList();
1177
+ return this.appWindowList;
1150
1178
  case 2:
1151
1179
  windows = _context12.sent;
1152
1180
  window = windows.filter(function (item) {
@@ -1168,7 +1196,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1168
1196
  }
1169
1197
  }, _callee12, this);
1170
1198
  }));
1171
- function _validateWindow(_x11) {
1199
+ function _validateWindow(_x14) {
1172
1200
  return _validateWindow2.apply(this, arguments);
1173
1201
  }
1174
1202
  return _validateWindow;
@@ -1182,7 +1210,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1182
1210
  while (1) switch (_context13.prev = _context13.next) {
1183
1211
  case 0:
1184
1212
  _context13.next = 2;
1185
- return this._mediaControl.getDisplayList();
1213
+ return this.displayList;
1186
1214
  case 2:
1187
1215
  displayList = _context13.sent.find(function (item) {
1188
1216
  return item.id === id;
@@ -1201,7 +1229,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1201
1229
  }
1202
1230
  }, _callee13, this);
1203
1231
  }));
1204
- function _validateDisplay(_x12) {
1232
+ function _validateDisplay(_x15) {
1205
1233
  return _validateDisplay2.apply(this, arguments);
1206
1234
  }
1207
1235
  return _validateDisplay;
@@ -1252,7 +1280,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1252
1280
  }
1253
1281
  }, _callee14, this);
1254
1282
  }));
1255
- function _validateShareStart(_x13, _x14) {
1283
+ function _validateShareStart(_x16, _x17) {
1256
1284
  return _validateShareStart2.apply(this, arguments);
1257
1285
  }
1258
1286
  return _validateShareStart;
@@ -1320,12 +1348,15 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1320
1348
  currentShareAudioProcessingChannel: _shareAudio.AudioProcessingChannel.MONO,
1321
1349
  currentShareId: this.currentShareId,
1322
1350
  currentShareType: this.currentShareType,
1323
- shareWithAudio: this.withAudio
1351
+ shareWithAudio: this.shareWithAudio,
1352
+ currentShareBounds: this.currentSelectionBounds
1324
1353
  };
1325
- this._controlBarDialogId = this._uiEventStore.openDialog(_constant.DialogKey.CONTROL_BAR, _constant.DialogKey.CONTROL_BAR, params);
1326
- window.runtime.browserWindow.setFullScreen(false);
1327
- window.runtime.browserWindow.hide();
1328
- case 4:
1354
+ this._controlBarDialogId = this._dialogProvider.openDialog(_constant.FcrUIDialogKey.CONTROL_BAR, _constant.FcrUIDialogKey.CONTROL_BAR, params);
1355
+ if ((0, _env.isElectron)()) {
1356
+ window.runtime.browserWindow.setFullScreen(false);
1357
+ window.runtime.browserWindow.hide();
1358
+ }
1359
+ case 3:
1329
1360
  case "end":
1330
1361
  return _context16.stop();
1331
1362
  }
@@ -1339,7 +1370,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
1339
1370
  }]);
1340
1371
  }();
1341
1372
  _ShareScreenStore = ShareScreenStore;
1342
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "_shareSelectionDialogId"], [_mobx.observable, 1, "_controlBarDialogId"], [_mobx.observable, 1, "_videoWindowDialogId"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_shareLocked"], [_mobx.observable, 1, "_screenTrack"], [_mobx.observable, 1, "_shareAudioTrack"], [_mobx.observable, 1, "screenSharingState"], [_mobx.observable, 1, "applicationCaptureSources"], [_mobx.observable, 1, "screenCaptureSources"], [_mobx.observable, 1, "hasScreenCapturePermission"], [_mobx.observable, 1, "withAudio"], [_mobx.observable, 1, "currentShareAudioProcessingChannel"], [_mobx.observable, 1, "currentShareId"], [_mobx.observable, 1, "sharerId"], [_mobx.observable, 1, "currentShareType"], [_mobx.observable, 1, "currentSelection"], [_mobx.observable, 1, "currentSelectionType"], [_mobx.observable, 1, "shareWithAudio"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "localUserRole"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_hasLoopbackDeviceDecs, 18, "hasLoopbackDevice"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_decorator.bound, 2, "release"], [_handleShareStartWithAudioDecs, 18, "handleShareStartWithAudio"], [_handleShareStopWithAudioDecs, 18, "handleShareStopWithAudio"], [_startPreviewDecs, 18, "startPreview"], [_openDialogDecs, 18, "openDialog"], [_decorator.bound, 2, "closeDialog"], [_openShareScreenSelectionDecs, 18, "openShareScreenSelection"], [_closeShareScreenSelectionDecs, 18, "closeShareScreenSelection"], [_setControlBarWindowIdDecs, 18, "setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "openVideoWindowDialog"], [_closeControlBarDecs, 18, "closeControlBar"], [_closeVideoWindowDialogDecs, 18, "closeVideoWindowDialog"], [_openRelaunchTipsDialogDecs, 18, "openRelaunchTipsDialog"], [_setShareWithAudioDecs, 18, "setShareWithAudio"], [_setWithAudioStateDecs, 18, "_setWithAudioState"], [_handleStartShareDecs, 18, "handleStartShare"], [_handleReplaceScreenDecs, 18, "handleReplaceScreen"], [_handleStopShareDecs, 18, "handleStopShare"], [_decorator.bound, 2, "_handleWebScreenCaptureStateUpdated"], [_handleScreenCaptureStateUpdatedDecs, 18, "_handleScreenCaptureStateUpdated"], [_setShareLockDecs, 18, "_setShareLock"], [_decorator.bound, 2, "_syncShareStreamState"], [_handleStreamUpdateDecs, 18, "_handleStreamUpdate"], [_initControlbarDecs, 18, "_initControlbar"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 24);
1373
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ShareScreenStore, [[_mobx.observable, 1, "_shareSelectionDialogId"], [_mobx.observable, 1, "_controlBarDialogId"], [_mobx.observable, 1, "_videoWindowDialogId"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_shareLocked"], [_mobx.observable, 1, "_screenTrack"], [_mobx.observable, 1, "_shareAudioTrack"], [_mobx.observable, 1, "screenSharingState"], [_mobx.observable, 1, "applicationCaptureSources"], [_mobx.observable, 1, "screenCaptureSources"], [_mobx.observable, 1, "hasScreenCapturePermission"], [_mobx.observable, 1, "currentShareAudioProcessingChannel"], [_mobx.observable, 1, "currentShareId"], [_mobx.observable, 1, "sharerId"], [_mobx.observable, 1, "currentShareType"], [_mobx.observable, 1, "currentSelection"], [_mobx.observable, 1, "currentSelectionType"], [_mobx.observable, 1, "currentSelectionBounds"], [_mobx.observable, 1, "shareWithAudio"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "localUserRole"], [_setShareWithAudioStateDecs, 18, "setShareWithAudioState"], [_hasLoopbackDeviceDecs, 18, "hasLoopbackDevice"], [_setShareAudioProcessingChannelDecs, 18, "setShareAudioProcessingChannel"], [_decorator.bound, 2, "handlerBoardShareStop"], [_decorator.bound, 2, "release"], [_handleShareStartWithAudioDecs, 18, "handleShareStartWithAudio"], [_handleShareStopWithAudioDecs, 18, "handleShareStopWithAudio"], [_startPreviewDecs, 18, "startPreview"], [_openDialogDecs, 18, "openDialog"], [_decorator.bound, 2, "closeDialog"], [_openShareScreenSelectionDecs, 18, "openShareScreenSelection"], [_closeShareScreenSelectionDecs, 18, "closeShareScreenSelection"], [_setControlBarWindowIdDecs, 18, "setControlBarWindowId"], [_openVideoWindowDialogDecs, 18, "openVideoWindowDialog"], [_closeControlBarDecs, 18, "closeControlBar"], [_closeVideoWindowDialogDecs, 18, "closeVideoWindowDialog"], [_openRelaunchTipsDialogDecs, 18, "openRelaunchTipsDialog"], [_startLoopbackDecs, 18, "startLoopback"], [_setWithAudioStateDecs, 18, "_setWithAudioState"], [_handleStartShareDecs, 18, "handleStartShare"], [_handleReplaceScreenDecs, 18, "handleReplaceScreen"], [_handleStopShareDecs, 18, "handleStopShare"], [_decorator.bound, 2, "_handleWebScreenCaptureStateUpdated"], [_handleScreenCaptureStateUpdatedDecs, 18, "_handleScreenCaptureStateUpdated"], [_setShareLockDecs, 18, "_setShareLock"], [_decorator.bound, 2, "_syncShareStreamState"], [_handleStreamUpdateDecs, 18, "_handleStreamUpdate"], [_initControlbarDecs, 18, "_initControlbar"], [_handleChooseScreenDecs, 16, "handleChooseScreen"]], []).e, 24);
1343
1374
  _init__shareSelectionDialogId = _applyDecs$e[0];
1344
1375
  _init__controlBarDialogId = _applyDecs$e[1];
1345
1376
  _init__videoWindowDialogId = _applyDecs$e[2];
@@ -1351,13 +1382,13 @@ _init_screenSharingState = _applyDecs$e[7];
1351
1382
  _init_applicationCaptureSources = _applyDecs$e[8];
1352
1383
  _init_screenCaptureSources = _applyDecs$e[9];
1353
1384
  _init_hasScreenCapturePermission = _applyDecs$e[10];
1354
- _init_withAudio = _applyDecs$e[11];
1355
- _init_currentShareAudioProcessingChannel = _applyDecs$e[12];
1356
- _init_currentShareId = _applyDecs$e[13];
1357
- _init_sharerId = _applyDecs$e[14];
1358
- _init_currentShareType = _applyDecs$e[15];
1359
- _init_currentSelection = _applyDecs$e[16];
1360
- _init_currentSelectionType = _applyDecs$e[17];
1385
+ _init_currentShareAudioProcessingChannel = _applyDecs$e[11];
1386
+ _init_currentShareId = _applyDecs$e[12];
1387
+ _init_sharerId = _applyDecs$e[13];
1388
+ _init_currentShareType = _applyDecs$e[14];
1389
+ _init_currentSelection = _applyDecs$e[15];
1390
+ _init_currentSelectionType = _applyDecs$e[16];
1391
+ _init_currentSelectionBounds = _applyDecs$e[17];
1361
1392
  _init_shareWithAudio = _applyDecs$e[18];
1362
1393
  _init_boardOwnerUser = _applyDecs$e[19];
1363
1394
  _init_localUser = _applyDecs$e[20];