fcr-ui-scene 3.1.1 → 3.3.0

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 (372) hide show
  1. package/installer/icons/favicon.ico +0 -0
  2. package/installer/icons/favicon.png +0 -0
  3. package/installer/mac/entitlements.mac.plist +16 -0
  4. package/lib/base.d.ts +0 -1
  5. package/lib/base.js +16 -0
  6. package/lib/common/device-store.d.ts +4 -5
  7. package/lib/common/device-store.js +178 -86
  8. package/lib/common/device-stream-store.d.ts +3 -2
  9. package/lib/common/device-stream-store.js +94 -72
  10. package/lib/common/event-store.d.ts +20 -3
  11. package/lib/common/event-store.js +43 -5
  12. package/lib/common/security-store.d.ts +16 -16
  13. package/lib/common/security-store.js +278 -124
  14. package/lib/electron/app.js +13 -5
  15. package/lib/electron/bootstrap-dev.d.ts +1 -0
  16. package/lib/electron/bootstrap-dev.js +51 -0
  17. package/lib/electron/bootstrap-sdk.d.ts +1 -0
  18. package/lib/electron/bootstrap-sdk.js +56 -0
  19. package/lib/electron/bootstrap.d.ts +1 -0
  20. package/lib/electron/bootstrap.js +56 -0
  21. package/lib/electron/default-options.js +1 -1
  22. package/lib/electron/dev.d.ts +1 -0
  23. package/lib/electron/dev.js +51 -0
  24. package/lib/electron/injections.d.ts +3 -4
  25. package/lib/electron/injections.js +46 -33
  26. package/lib/electron/logger.d.ts +6 -0
  27. package/lib/electron/logger.js +66 -0
  28. package/lib/electron/main.js +15 -11
  29. package/lib/electron/plugins/meeting-state.d.ts +2 -0
  30. package/lib/electron/plugins/meeting-state.js +39 -0
  31. package/lib/electron/preload.js +2 -1
  32. package/lib/electron/tools.js +9 -0
  33. package/lib/electron/window.d.ts +1 -1
  34. package/lib/electron/window.js +14 -2
  35. package/lib/fragments/control-bar/context.d.ts +0 -1
  36. package/lib/fragments/control-bar/control-bar-store.d.ts +34 -1
  37. package/lib/fragments/control-bar/control-bar-store.js +394 -81
  38. package/lib/fragments/control-bar/device/index.js +12 -3
  39. package/lib/fragments/control-bar/index.css +15 -10
  40. package/lib/fragments/control-bar/index.js +19 -1
  41. package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
  42. package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
  43. package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
  44. package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
  45. package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
  46. package/lib/fragments/control-bar/more-actions/index.css +53 -0
  47. package/lib/fragments/control-bar/more-actions/index.js +77 -37
  48. package/lib/fragments/control-bar/security-content/index.css +10 -0
  49. package/lib/fragments/control-bar/security-content/index.js +43 -18
  50. package/lib/fragments/control-bar/view.js +8 -2
  51. package/lib/fragments/live-streaming/context.d.ts +0 -1
  52. package/lib/fragments/live-streaming/store.js +27 -17
  53. package/lib/fragments/share-screen-selection/context.d.ts +0 -1
  54. package/lib/fragments/share-screen-selection/selection-store.d.ts +0 -1
  55. package/lib/fragments/share-screen-selection/selection-store.js +34 -33
  56. package/lib/fragments/share-screen-selection/view.js +7 -0
  57. package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
  58. package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
  59. package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
  60. package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
  61. package/lib/fragments/toolbar/components/color-picker.js +3 -1
  62. package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
  63. package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
  64. package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
  65. package/lib/fragments/toolbar/components/pen-picker.js +2 -0
  66. package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
  67. package/lib/fragments/toolbar/components/shape-picker.js +2 -0
  68. package/lib/fragments/toolbar/hooks.d.ts +1 -1
  69. package/lib/fragments/toolbar/hooks.js +13 -8
  70. package/lib/fragments/toolbar/store.d.ts +4 -4
  71. package/lib/fragments/toolbar/store.js +20 -2
  72. package/lib/fragments/toolbar/view.js +2 -0
  73. package/lib/global.d.ts +1 -0
  74. package/lib/hooks/meeting-time.d.ts +2 -2
  75. package/lib/login-confirm-dialog.d.ts +12 -0
  76. package/lib/login-confirm-dialog.js +80 -0
  77. package/lib/modules/action-bar/action-bar-collapes-items.js +14 -5
  78. package/lib/modules/action-bar/chat/index.js +6 -6
  79. package/lib/modules/action-bar/context.d.ts +0 -1
  80. package/lib/modules/action-bar/device/index.css +7 -2
  81. package/lib/modules/action-bar/device/index.d.ts +2 -2
  82. package/lib/modules/action-bar/device/index.js +6 -4
  83. package/lib/modules/action-bar/index.css +63 -12
  84. package/lib/modules/action-bar/index.d.ts +3 -2
  85. package/lib/modules/action-bar/index.dev.js +8 -7
  86. package/lib/modules/action-bar/index.js +21 -0
  87. package/lib/modules/action-bar/item-placement.d.ts +1 -2
  88. package/lib/modules/action-bar/item.js +5 -0
  89. package/lib/modules/action-bar/leave/assign-host.d.ts +3 -1
  90. package/lib/modules/action-bar/leave/assign-host.js +7 -7
  91. package/lib/modules/action-bar/leave/index.js +35 -7
  92. package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -1
  93. package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
  94. package/lib/modules/action-bar/more/poppover-content.d.ts +0 -1
  95. package/lib/modules/action-bar/more/poppover-content.js +14 -4
  96. package/lib/modules/action-bar/participants/index.css +12 -0
  97. package/lib/modules/action-bar/participants/index.js +21 -14
  98. package/lib/modules/action-bar/screen-share/index.js +5 -1
  99. package/lib/modules/action-bar/screen-share/submenu.js +17 -22
  100. package/lib/modules/action-bar/security/drop-menu.js +124 -14
  101. package/lib/modules/action-bar/security/index.js +1 -1
  102. package/lib/modules/action-bar/settings/index.js +1 -1
  103. package/lib/modules/action-bar/store.d.ts +45 -21
  104. package/lib/modules/action-bar/store.js +544 -134
  105. package/lib/modules/action-bar/view.js +65 -42
  106. package/lib/modules/audio-stream/index.js +12 -6
  107. package/lib/modules/chat/chat-bar/index.js +46 -27
  108. package/lib/modules/chat/chat-select/index.css +19 -4
  109. package/lib/modules/chat/chat-select/index.d.ts +0 -1
  110. package/lib/modules/chat/chat-select/index.js +29 -3
  111. package/lib/modules/chat/chat.d.ts +2 -3
  112. package/lib/modules/chat/chat.js +210 -107
  113. package/lib/modules/chat/contex.d.ts +0 -1
  114. package/lib/modules/chat/demo-wrapper.d.ts +0 -1
  115. package/lib/modules/chat/index.css +49 -0
  116. package/lib/modules/chat/index.d.ts +3 -3
  117. package/lib/modules/chat/index.dev.js +4 -4
  118. package/lib/modules/chat/index.js +32 -11
  119. package/lib/modules/chat/message-list.js +81 -49
  120. package/lib/modules/chat/store.d.ts +50 -4
  121. package/lib/modules/chat/store.js +303 -124
  122. package/lib/modules/chat/util.js +1 -1
  123. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
  124. package/lib/modules/connection-gateway/components/phone/index.js +2 -0
  125. package/lib/modules/connection-gateway/index.d.ts +3 -2
  126. package/lib/modules/connection-gateway/index.js +2 -0
  127. package/lib/modules/connection-gateway/store.d.ts +6 -4
  128. package/lib/modules/connection-gateway/store.js +46 -15
  129. package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
  130. package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
  131. package/lib/modules/device-pretest/audio-preview/speaker-control.d.ts +0 -1
  132. package/lib/modules/device-pretest/audio-preview/speaker-control.js +1 -1
  133. package/lib/modules/device-pretest/context.d.ts +0 -1
  134. package/lib/modules/device-pretest/index.css +0 -4
  135. package/lib/modules/device-pretest/index.d.ts +0 -1
  136. package/lib/modules/device-pretest/index.js +2 -1
  137. package/lib/modules/device-pretest/settings/beauty.js +19 -6
  138. package/lib/modules/device-pretest/settings/video-effect.d.ts +0 -1
  139. package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
  140. package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
  141. package/lib/modules/device-pretest/store.js +34 -19
  142. package/lib/modules/dialog/components/chat/electron.js +3 -2
  143. package/lib/modules/dialog/components/chat/index.js +1 -1
  144. package/lib/modules/dialog/components/confirm/electron.js +7 -5
  145. package/lib/modules/dialog/components/confirm/index.js +16 -2
  146. package/lib/modules/dialog/components/connection-gateway/electron.js +4 -2
  147. package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
  148. package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
  149. package/lib/modules/dialog/components/device-setting/electron.js +74 -0
  150. package/lib/modules/dialog/components/device-setting/index.css +26 -0
  151. package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
  152. package/lib/modules/dialog/components/device-setting/index.js +60 -0
  153. package/lib/modules/dialog/components/operation-waiting-room/electron.d.ts +5 -0
  154. package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
  155. package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
  156. package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
  157. package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
  158. package/lib/modules/dialog/components/participant/electron.js +8 -2
  159. package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
  160. package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
  161. package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
  162. package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
  163. package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
  164. package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
  165. package/lib/modules/dialog/components/whiteboard/index.js +2 -1
  166. package/lib/modules/dialog/context.d.ts +0 -1
  167. package/lib/modules/dialog/dialogs.d.ts +0 -2
  168. package/lib/modules/dialog/dialogs.js +62 -103
  169. package/lib/modules/dialog/index.css +7 -6
  170. package/lib/modules/dialog/index.d.ts +1 -1
  171. package/lib/modules/dialog/index.js +17 -0
  172. package/lib/modules/dialog/store.d.ts +6 -2
  173. package/lib/modules/dialog/store.js +52 -9
  174. package/lib/modules/dialog/view.js +2 -0
  175. package/lib/modules/event-notification/context.d.ts +2 -0
  176. package/lib/modules/event-notification/context.js +9 -0
  177. package/lib/modules/event-notification/index.css +58 -0
  178. package/lib/modules/event-notification/index.d.ts +13 -0
  179. package/lib/modules/event-notification/index.js +48 -0
  180. package/lib/modules/event-notification/store.d.ts +17 -0
  181. package/lib/modules/event-notification/store.js +133 -0
  182. package/lib/modules/event-notification/view.d.ts +5 -0
  183. package/lib/modules/event-notification/view.js +114 -0
  184. package/lib/modules/event-toast/context.d.ts +0 -1
  185. package/lib/modules/event-toast/store.js +16 -0
  186. package/lib/modules/invite/context.d.ts +0 -1
  187. package/lib/modules/invite/index.css +4 -4
  188. package/lib/modules/invite/index.d.ts +2 -2
  189. package/lib/modules/invite/pstn-invite.js +4 -1
  190. package/lib/modules/invite/store.d.ts +2 -2
  191. package/lib/modules/invite/store.js +27 -7
  192. package/lib/modules/invite/voip-invite.d.ts +0 -1
  193. package/lib/modules/invite/voip-invite.js +1 -1
  194. package/lib/modules/layout/components/Aside.d.ts +0 -1
  195. package/lib/modules/layout/components/Aside.js +4 -1
  196. package/lib/modules/layout/components/Carousel.js +6 -5
  197. package/lib/modules/layout/components/Gallery.js +16 -9
  198. package/lib/modules/layout/components/Layout.js +82 -57
  199. package/lib/modules/layout/components/index.css +42 -5
  200. package/lib/modules/layout/components/index.js +3 -0
  201. package/lib/modules/layout/context.d.ts +0 -1
  202. package/lib/modules/layout/index.css +30 -0
  203. package/lib/modules/layout/index.dev.js +11 -11
  204. package/lib/modules/layout/index.js +0 -6
  205. package/lib/modules/layout/member-window/index.css +5 -5
  206. package/lib/modules/layout/member-window/index.d.ts +7 -7
  207. package/lib/modules/layout/member-window/index.js +59 -13
  208. package/lib/modules/layout/store.d.ts +61 -50
  209. package/lib/modules/layout/store.js +517 -342
  210. package/lib/modules/layout/type.d.ts +2 -1
  211. package/lib/modules/layout/video-window-datasource.d.ts +14 -8
  212. package/lib/modules/layout/video-window-datasource.js +129 -78
  213. package/lib/modules/live-streaming/context.d.ts +0 -1
  214. package/lib/modules/live-streaming/index.d.ts +2 -2
  215. package/lib/modules/live-streaming/index.dev.js +5 -4
  216. package/lib/modules/live-streaming/store.d.ts +2 -2
  217. package/lib/modules/live-streaming/store.js +32 -11
  218. package/lib/modules/participant/attendee/index.d.ts +12 -3
  219. package/lib/modules/participant/attendee/index.js +142 -30
  220. package/lib/modules/participant/context.d.ts +0 -1
  221. package/lib/modules/participant/index.css +20 -0
  222. package/lib/modules/participant/index.d.ts +5 -2
  223. package/lib/modules/participant/index.dev.js +14 -12
  224. package/lib/modules/participant/index.js +27 -0
  225. package/lib/modules/participant/member-list-data-source.d.ts +3 -3
  226. package/lib/modules/participant/member-list-data-source.js +29 -3
  227. package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
  228. package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
  229. package/lib/modules/participant/store.d.ts +59 -34
  230. package/lib/modules/participant/store.js +541 -222
  231. package/lib/modules/participant/view.d.ts +6 -6
  232. package/lib/modules/participant/view.js +138 -34
  233. package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
  234. package/lib/modules/setting/audio-settings/index.css +2 -2
  235. package/lib/modules/setting/context.d.ts +0 -1
  236. package/lib/modules/setting/general-settings/general-settings.js +2 -1
  237. package/lib/modules/setting/general-settings/index.css +2 -2
  238. package/lib/modules/setting/index.css +1 -5
  239. package/lib/modules/setting/index.d.ts +2 -2
  240. package/lib/modules/setting/index.dev.js +14 -12
  241. package/lib/modules/setting/index.js +16 -0
  242. package/lib/modules/setting/minutes-settings/index.css +65 -0
  243. package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
  244. package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
  245. package/lib/modules/setting/state/index.css +0 -4
  246. package/lib/modules/setting/state/index.js +11 -1
  247. package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
  248. package/lib/modules/setting/store.d.ts +7 -5
  249. package/lib/modules/setting/store.js +69 -46
  250. package/lib/modules/setting/translate-settings/index.css +45 -0
  251. package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
  252. package/lib/modules/setting/translate-settings/language-select.js +50 -0
  253. package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
  254. package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
  255. package/lib/modules/setting/video-settings/index.css +15 -6
  256. package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
  257. package/lib/modules/setting/video-settings/video-settings.js +5 -1
  258. package/lib/modules/setting/view.js +34 -2
  259. package/lib/modules/share-screen/index.d.ts +4 -2
  260. package/lib/modules/share-screen/index.dev.js +17 -14
  261. package/lib/modules/share-screen/index.js +2 -0
  262. package/lib/modules/share-screen/selection/index.css +2 -0
  263. package/lib/modules/share-screen/selection/index.js +44 -6
  264. package/lib/modules/share-screen/share-state-bar/index.css +49 -11
  265. package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
  266. package/lib/modules/share-screen/share-state-bar/index.js +51 -20
  267. package/lib/modules/share-screen/store.d.ts +23 -13
  268. package/lib/modules/share-screen/store.js +733 -606
  269. package/lib/modules/state-bar/context.d.ts +0 -1
  270. package/lib/modules/state-bar/index.css +2 -2
  271. package/lib/modules/state-bar/index.d.ts +2 -2
  272. package/lib/modules/state-bar/index.dev.js +12 -10
  273. package/lib/modules/state-bar/layout-config.js +2 -0
  274. package/lib/modules/state-bar/live-streaming-state.js +3 -0
  275. package/lib/modules/state-bar/meeting-detail.css +6 -4
  276. package/lib/modules/state-bar/meeting-details.js +29 -3
  277. package/lib/modules/state-bar/meeting-network-state.css +14 -3
  278. package/lib/modules/state-bar/meeting-network-state.js +10 -4
  279. package/lib/modules/state-bar/recording.js +9 -11
  280. package/lib/modules/state-bar/store.d.ts +7 -5
  281. package/lib/modules/state-bar/store.js +68 -8
  282. package/lib/modules/state-bar/view.js +4 -8
  283. package/lib/modules/video-window/context.d.ts +0 -1
  284. package/lib/modules/video-window/deviceState/index.d.ts +3 -3
  285. package/lib/modules/video-window/index.css +1 -0
  286. package/lib/modules/video-window/members/index.js +7 -4
  287. package/lib/modules/video-window/store.d.ts +5 -4
  288. package/lib/modules/video-window/store.js +49 -17
  289. package/lib/modules/video-window/topControl/index.js +7 -0
  290. package/lib/modules/video-window/view.js +2 -0
  291. package/lib/modules/waiting-room-layout/context.d.ts +2 -0
  292. package/lib/modules/waiting-room-layout/context.js +9 -0
  293. package/lib/modules/waiting-room-layout/index.css +71 -0
  294. package/lib/modules/waiting-room-layout/index.d.ts +8 -0
  295. package/lib/modules/waiting-room-layout/index.js +47 -0
  296. package/lib/modules/waiting-room-layout/store.d.ts +30 -0
  297. package/lib/modules/waiting-room-layout/store.js +189 -0
  298. package/lib/modules/waiting-room-layout/type.d.ts +0 -0
  299. package/lib/modules/waiting-room-layout/type.js +1 -0
  300. package/lib/modules/waiting-room-layout/view.d.ts +3 -0
  301. package/lib/modules/waiting-room-layout/view.js +67 -0
  302. package/lib/modules/whiteboard/app.js +2 -8
  303. package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
  304. package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
  305. package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
  306. package/lib/modules/whiteboard/components/loading/index.js +2 -2
  307. package/lib/modules/whiteboard/components/multi-window/index.js +8 -3
  308. package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
  309. package/lib/modules/whiteboard/components/progress/electron.js +3 -2
  310. package/lib/modules/whiteboard/components/progress/style.css +4 -3
  311. package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
  312. package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
  313. package/lib/modules/whiteboard/components/switch-theme/index.js +29 -17
  314. package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
  315. package/lib/modules/whiteboard/components/switch-theme/item.js +11 -2
  316. package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
  317. package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
  318. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
  319. package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
  320. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
  321. package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
  322. package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
  323. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
  324. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +18 -12
  325. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
  326. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
  327. package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
  328. package/lib/modules/whiteboard/components/toolbar/store.d.ts +8 -7
  329. package/lib/modules/whiteboard/components/toolbar/store.js +25 -4
  330. package/lib/modules/whiteboard/context.d.ts +7 -3
  331. package/lib/modules/whiteboard/context.js +6 -4
  332. package/lib/modules/whiteboard/index.d.ts +6 -8
  333. package/lib/modules/whiteboard/index.js +310 -255
  334. package/lib/modules/whiteboard/type.d.ts +4 -12
  335. package/lib/modules/whiteboard/type.js +6 -16
  336. package/lib/modules/whiteboard/utils.d.ts +1 -0
  337. package/lib/modules/whiteboard/utils.js +12 -1
  338. package/lib/plugins/browser-runtime-plugin.js +2 -1
  339. package/lib/plugins/module-dev-plugin.js +12 -10
  340. package/lib/plugins/multi-lang-plugin.d.ts +1 -5
  341. package/lib/plugins/multi-lang-plugin.js +2 -0
  342. package/lib/runtime.d.ts +3 -5
  343. package/lib/translations/enUS.d.ts +590 -0
  344. package/lib/translations/enUS.js +608 -6
  345. package/lib/translations/zhCN.d.ts +588 -0
  346. package/lib/translations/zhCN.js +604 -4
  347. package/lib/type.d.ts +6 -2
  348. package/lib/ui-manager.d.ts +7 -3
  349. package/lib/ui-manager.js +597 -143
  350. package/lib/ui-scene.d.ts +1 -0
  351. package/lib/ui-scene.js +32 -22
  352. package/lib/utilities/board-context.d.ts +0 -1
  353. package/lib/utilities/constant.d.ts +47 -5
  354. package/lib/utilities/constant.js +44 -1
  355. package/lib/utilities/copyText.js +1 -1
  356. package/lib/utilities/extract.js +26 -3
  357. package/lib/utilities/hooks.js +2 -0
  358. package/lib/utilities/parameters.js +2 -2
  359. package/lib/utilities/renderer-event.js +28 -0
  360. package/lib/utilities/renderer.d.ts +1 -0
  361. package/lib/utilities/renderer.js +15 -6
  362. package/lib/utilities/tools.js +5 -2
  363. package/lib/utilities/ui-resources.d.ts +2 -2
  364. package/lib/utilities/ui-resources.js +20 -3
  365. package/lib/utilities/video-track-render-context.d.ts +0 -1
  366. package/package.json +17 -16
  367. package/public/assets/fcr_defaultpage.png +0 -0
  368. package/public/assets/login_confirm.png +0 -0
  369. package/public/index.html +29 -11
  370. package/lib/modules/device-pretest/settings/index.css +0 -15
  371. package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
  372. package/lib/modules/participant/attendee/participants-more-action.js +0 -275
package/lib/ui-manager.js CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  require("core-js/modules/es.symbol.js");
4
4
  require("core-js/modules/es.array.filter.js");
5
- require("core-js/modules/es.array.for-each.js");
6
5
  require("core-js/modules/es.array.push.js");
7
6
  require("core-js/modules/es.object.define-properties.js");
8
7
  require("core-js/modules/es.object.define-property.js");
9
8
  require("core-js/modules/es.object.get-own-property-descriptor.js");
10
9
  require("core-js/modules/es.object.get-own-property-descriptors.js");
11
10
  require("core-js/modules/es.object.keys.js");
12
- require("core-js/modules/web.dom-collections.for-each.js");
11
+ require("core-js/modules/esnext.async-iterator.filter.js");
12
+ require("core-js/modules/esnext.iterator.filter.js");
13
13
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
@@ -17,10 +17,15 @@ Object.defineProperty(exports, "__esModule", {
17
17
  exports.DefaultSceneUIManager = void 0;
18
18
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
19
19
  require("core-js/modules/es.array.concat.js");
20
+ require("core-js/modules/es.array.for-each.js");
20
21
  require("core-js/modules/es.array.join.js");
21
22
  require("core-js/modules/es.object.to-string.js");
22
23
  require("core-js/modules/es.promise.js");
23
24
  require("core-js/modules/es.promise.finally.js");
25
+ require("core-js/modules/esnext.async-iterator.for-each.js");
26
+ require("core-js/modules/esnext.iterator.constructor.js");
27
+ require("core-js/modules/esnext.iterator.for-each.js");
28
+ require("core-js/modules/web.dom-collections.for-each.js");
24
29
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
25
30
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
26
31
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -28,8 +33,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
28
33
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
29
34
  var _reactDom = _interopRequireDefault(require("react-dom"));
30
35
  var _logger = require("agora-foundation/lib/logger");
36
+ var _agoraEduCore = require("agora-edu-core");
31
37
  var _deviceStore = require("./common/device-store");
32
38
  var _layout = require("./modules/layout");
39
+ var _waitingRoomLayout = require("./modules/waiting-room-layout");
33
40
  var _chat = require("./modules/chat");
34
41
  var _eventStore = require("./common/event-store");
35
42
  var _securityStore = require("./common/security-store");
@@ -55,7 +62,7 @@ var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
55
62
  var _type4 = require("agora-rte-sdk/lib/core/scene/type");
56
63
  var _type5 = require("agora-rte-sdk/lib/type");
57
64
  var _devicePretest = require("./modules/device-pretest");
58
- var _context2 = require("./modules/device-pretest/context");
65
+ var _context9 = require("./modules/device-pretest/context");
59
66
  var _whiteboard = require("./modules/whiteboard");
60
67
  var _whiteboard2 = require("./modules/dialog/components/whiteboard");
61
68
  var _participant2 = require("./modules/dialog/components/participant");
@@ -69,11 +76,22 @@ var _store = require("./modules/device-pretest/store");
69
76
  var _videoTrackRenderContext = require("./utilities/video-track-render-context");
70
77
  var _shareScreenSelection = require("./modules/dialog/components/share-screen-selection");
71
78
  var _parameters = require("./utilities/parameters");
79
+ var _deviceSetting = _interopRequireDefault(require("./modules/dialog/components/device-setting"));
80
+ var _loginConfirmDialog = require("./login-confirm-dialog");
81
+ var _dialog2 = require("agora-ui-foundation/lib/components/dialog");
82
+ var _type6 = require("agora-edu-core/lib/room-control/type");
83
+ var _type7 = require("agora-edu-core/lib/room-control/privilege-control/type");
84
+ var _operationWaitingRoom = require("./modules/dialog/components/operation-waiting-room");
85
+ var _eventNotification = require("./modules/event-notification");
86
+ var _removeAdmitWaitingRoom = require("./modules/dialog/components/remove-admit-waiting-room");
87
+ var _lodash = require("lodash");
72
88
  var _jsxRuntime = require("react/jsx-runtime");
73
89
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
74
90
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
75
91
  var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/function () {
76
- function DefaultSceneUIManager(_sceneConfig, _coreConfig, _engine, _roomControl, _observable) {
92
+ // @internal
93
+
94
+ function DefaultSceneUIManager(_sceneConfig, _coreConfig, _engine, _observable) {
77
95
  var _this$_sceneConfig$re;
78
96
  (0, _classCallCheck2["default"])(this, DefaultSceneUIManager);
79
97
  // @internal
@@ -85,14 +103,17 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
85
103
  // @internal
86
104
  (0, _defineProperty2["default"])(this, "_userObserver", {});
87
105
  // @internal
106
+ (0, _defineProperty2["default"])(this, "_waitingRoomUserObserver", {});
107
+ // @internal
88
108
  (0, _defineProperty2["default"])(this, "_roomObserver", {});
109
+ // @internal
110
+ (0, _defineProperty2["default"])(this, "_disposers", []);
89
111
  this._sceneConfig = _sceneConfig;
90
112
  this._coreConfig = _coreConfig;
91
113
  this._engine = _engine;
92
- this._roomControl = _roomControl;
93
114
  this._observable = _observable;
94
115
  this._uiEventStore = new _eventStore.FcrUIEventStore();
95
- this._deviceStore = new _deviceStore.FcrDeviceStore(_sceneConfig.userName, this._engine.getMediaControl());
116
+ this._deviceStore = new _deviceStore.FcrDeviceStore(_sceneConfig.userName, this._engine.getDesktopMediaControl());
96
117
  var _ref = (_this$_sceneConfig$re = this._sceneConfig.resource) !== null && _this$_sceneConfig$re !== void 0 ? _this$_sceneConfig$re : {
97
118
  virtualBackgroundImages: [],
98
119
  virtualBackgroundVideos: []
@@ -102,8 +123,8 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
102
123
  _ref$virtualBackgroun2 = _ref.virtualBackgroundVideos,
103
124
  virtualBackgroundVideos = _ref$virtualBackgroun2 === void 0 ? [] : _ref$virtualBackgroun2;
104
125
  var uiResources = {
105
- virtualBackgroundImages: [_uiResources.BUILTIN_VIRTUAL_BACKGROUND_IMAGES_URL].concat((0, _toConsumableArray2["default"])(virtualBackgroundImages)),
106
- virtualBackgroundVideos: [_uiResources.BUILTIN_VIRTUAL_BACKGROUND_VIDEOS_URL].concat((0, _toConsumableArray2["default"])(virtualBackgroundVideos))
126
+ virtualBackgroundImages: [].concat((0, _toConsumableArray2["default"])(_uiResources.BUILTIN_VIRTUAL_BACKGROUND_IMAGE_URL_LIST), (0, _toConsumableArray2["default"])(virtualBackgroundImages)),
127
+ virtualBackgroundVideos: [].concat((0, _toConsumableArray2["default"])(_uiResources.BUILTIN_VIRTUAL_BACKGROUND_VIDEO_URL_LIST), (0, _toConsumableArray2["default"])(virtualBackgroundVideos))
107
128
  };
108
129
  this._deviceStore.downloadUiResources(uiResources);
109
130
  }
@@ -125,6 +146,34 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
125
146
  if (openDefaultMicrophone) {
126
147
  this._deviceStore.openFirstMicrophone();
127
148
  }
149
+ var joinRoom = /*#__PURE__*/function () {
150
+ var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
151
+ return _regenerator["default"].wrap(function _callee$(_context) {
152
+ while (1) switch (_context.prev = _context.next) {
153
+ case 0:
154
+ return _context.abrupt("return", _this._engine.login().then(function () {
155
+ return _this._handleJoinRoom();
156
+ }).then(function (type) {
157
+ if (type === _type6.FcrRoomType.Mainroom) {
158
+ _this._renderRoomUi(dom);
159
+ } else {
160
+ _this._renderWaitingRoomUi(dom);
161
+ }
162
+ }).then(function () {
163
+ _this._observable.notifyObservers('onLaunchSuccess', _this._sceneConfig.roomId);
164
+ })["catch"](function (e) {
165
+ _this._observable.notifyObservers('onLaunchFailure', _this._sceneConfig.roomId, e);
166
+ }));
167
+ case 1:
168
+ case "end":
169
+ return _context.stop();
170
+ }
171
+ }, _callee);
172
+ }));
173
+ return function joinRoom() {
174
+ return _ref2.apply(this, arguments);
175
+ };
176
+ }();
128
177
  if (!skipPretest) {
129
178
  var joining = false;
130
179
  this._renderDevicePretestUi(dom,
@@ -132,9 +181,7 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
132
181
  function () {
133
182
  if (joining) return;
134
183
  joining = true;
135
- _this._handleJoinRoom().then(function () {
136
- _this._renderRoomUi(dom);
137
- })["finally"](function () {
184
+ joinRoom()["finally"](function () {
138
185
  joining = false;
139
186
  });
140
187
  },
@@ -143,9 +190,7 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
143
190
  _this._observable.notifyObservers('onLaunchCancel', _this._sceneConfig.roomId);
144
191
  });
145
192
  } else {
146
- this._handleJoinRoom().then(function () {
147
- _this._renderRoomUi(dom);
148
- });
193
+ joinRoom();
149
194
  }
150
195
  }
151
196
  }, {
@@ -175,59 +220,47 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
175
220
  (_this$_deviceStreamSt = this._deviceStreamStore) === null || _this$_deviceStreamSt === void 0 || _this$_deviceStreamSt.release();
176
221
  this._deviceStore.release();
177
222
  this._uiEventStore.release();
223
+ this._disposers.forEach(function (dispose) {
224
+ return dispose();
225
+ });
178
226
  }
179
227
  }, {
180
228
  key: "_handleJoinRoom",
181
229
  value: function () {
182
- var _handleJoinRoom2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
183
- var engine, config, streams;
184
- return _regenerator["default"].wrap(function _callee$(_context) {
185
- while (1) switch (_context.prev = _context.next) {
230
+ var _handleJoinRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
231
+ var _this2 = this;
232
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
233
+ while (1) switch (_context2.prev = _context2.next) {
186
234
  case 0:
187
- engine = this._engine;
188
- config = this._sceneConfig;
189
- if (engine) {
190
- _context.next = 4;
191
- break;
192
- }
193
- return _context.abrupt("return");
194
- case 4:
195
- streams = [{
196
- videoSourceState: _type3.AgoraRtcMediaSourceState.STOPPED,
197
- audioSourceState: _type3.AgoraRtcMediaSourceState.STOPPED,
198
- videoSourceId: '',
199
- audioSourceId: '',
200
- streamName: 'default',
201
- streamType: _type4.AgoraRteMediaStreamType.BOTH,
202
- videoSourceType: _type5.AgoraRteVideoSourceType.CAMERA,
203
- audioSourceType: _type5.AgoraRteAudioSourceType.MICROPHONE
204
- }];
205
- if (config.userRole === _type2.FcrUserRole.ROBOT) {
206
- streams = [];
207
- }
208
- _context.prev = 6;
209
- _context.next = 9;
210
- return this._roomControl.join({
211
- userName: config.userName,
212
- userRole: config.userRole,
213
- userProperties: config.userProperties,
214
- streamLatency: _type2.FcrStreamLatencyLevel.ULTRA_LOW,
215
- createStreamConfigs: streams
216
- });
217
- case 9:
218
- this._observable.notifyObservers('onLaunchSuccess', this._sceneConfig.roomId);
219
- _context.next = 16;
220
- break;
221
- case 12:
222
- _context.prev = 12;
223
- _context.t0 = _context["catch"](6);
224
- this._observable.notifyObservers('onLaunchFailure', this._sceneConfig.roomId, _context.t0);
225
- throw _context.t0;
226
- case 16:
235
+ return _context2.abrupt("return", this._createRoomControl(this._sceneConfig.roomId).then(function (room) {
236
+ var _room$getRoomInfo;
237
+ if (((_room$getRoomInfo = room.getRoomInfo()) === null || _room$getRoomInfo === void 0 ? void 0 : _room$getRoomInfo.roomType) === _type6.FcrRoomType.Mainroom) {
238
+ _this2._mainRoomControl = room;
239
+ _this2._mainRoomControl.addObserver(_this2._roomObserver);
240
+ // 如果已经有等候室管理员权限 再次创建房间
241
+ _this2._judgeWaitingRoomPremissionAndCreateRoomControl();
242
+ // @ts-ignore
243
+ window.__mainRoom_control = room;
244
+ return _type6.FcrRoomType.Mainroom;
245
+ } else {
246
+ _this2._waitingRoomControl = room;
247
+ _this2._waitingRoomControl.addObserver(_this2._roomObserver);
248
+ // @ts-ignore
249
+ window.__waitingRoom_control = room;
250
+ room.sendRoomMessage({
251
+ messageKey: _type2.RoomMessageKey.USER_WAITING_ROOM_JOINED
252
+ }, false);
253
+ return _type6.FcrRoomType.Waitingroom;
254
+ }
255
+ })["catch"](function (e) {
256
+ _this2._observable.notifyObservers('onLaunchFailure', _this2._sceneConfig.roomId, e);
257
+ throw e;
258
+ }));
259
+ case 1:
227
260
  case "end":
228
- return _context.stop();
261
+ return _context2.stop();
229
262
  }
230
- }, _callee, this, [[6, 12]]);
263
+ }, _callee2, this);
231
264
  }));
232
265
  function _handleJoinRoom() {
233
266
  return _handleJoinRoom2.apply(this, arguments);
@@ -237,12 +270,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
237
270
  }, {
238
271
  key: "_renderDevicePretestUi",
239
272
  value: function _renderDevicePretestUi(dom, onJoin, _onExit) {
240
- var _this2 = this;
273
+ var _this3 = this;
241
274
  var store = this._deviceStore;
242
275
  var pretestStore = new _store.FcrPretestStore({
243
276
  deviceStore: store
244
277
  });
245
- _reactDom["default"].render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_context2.PretestStoreContext.Provider, {
278
+ _reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_context9.PretestStoreContext.Provider, {
246
279
  value: pretestStore,
247
280
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
248
281
  style: {
@@ -258,11 +291,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
258
291
  meetingHostName: ''
259
292
  },
260
293
  onClick: function onClick() {
261
- _this2._deviceStore.actionsBeforeJoin();
294
+ _this3._deviceStore.actionsBeforeJoin();
262
295
  pretestStore.release();
263
296
  onJoin();
264
297
  },
265
298
  onExit: function onExit() {
299
+ pretestStore.release();
266
300
  _onExit();
267
301
  }
268
302
  })
@@ -272,72 +306,66 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
272
306
  }, {
273
307
  key: "_renderRoomUi",
274
308
  value: function _renderRoomUi(dom) {
275
- var _this3 = this;
309
+ var _this4 = this;
276
310
  /**
277
311
  * Common Stores
278
312
  */
279
313
  var deviceStore = this._deviceStore;
280
314
  var uiEventStore = this._uiEventStore;
281
- var securityStore = new _securityStore.FcrSecurityStore(this._roomControl.getPrivilegeControl(), this._roomControl.getUserControl(), this._roomControl.getStreamControl(), this._roomControl.getRoomSessionControl(), uiEventStore);
315
+ if (!this._mainRoomControl) {
316
+ this.logger.error('Cannot render room ui without mainroom control');
317
+ return;
318
+ }
319
+ var securityStore = new _securityStore.FcrSecurityStore(this._mainRoomControl.getPrivilegeControl(), this._mainRoomControl.getUserControl(), this._mainRoomControl.getStreamControl(), this._mainRoomControl.getRoomSessionControl(), uiEventStore);
282
320
  this._securityStore = securityStore;
283
321
  var deviceStreamStore = new _deviceStreamStore.FcrDeviceStreamStore({
284
- mediaControl: this._engine.getMediaControl(),
285
- roomControl: this._roomControl,
322
+ mediaControl: this._engine.getDesktopMediaControl(),
323
+ roomControl: this._mainRoomControl,
286
324
  securityStore: securityStore,
287
325
  deviceStore: deviceStore,
288
326
  uiEventStore: uiEventStore
289
327
  });
290
328
  this._deviceStreamStore = deviceStreamStore;
291
- this._layoutModule = new _layout.LayoutUIModule({
292
- deviceStore: deviceStore,
293
- uiEventStore: uiEventStore,
294
- mediaControl: this._engine.getMediaControl(),
295
- userControl: this._roomControl.getUserControl(),
296
- streamControl: this._roomControl.getStreamControl(),
297
- securityStore: securityStore,
298
- chatRoomControl: this._roomControl.getChatRoomControl(),
299
- whiteBoardControl: this._roomControl.getWhiteboardControl()
300
- });
301
329
  this._chatModule = new _chat.ChatUIModule({
302
- roomControl: this._roomControl,
330
+ roomControl: this._mainRoomControl,
303
331
  uiEventStore: uiEventStore,
304
332
  securityStore: securityStore
305
333
  });
306
334
  this._actionBarUIModule = new _actionBar.FcrActionBarUIModule({
307
- roomControl: this._roomControl,
308
- userControl: this._roomControl.getUserControl(),
335
+ roomControl: this._mainRoomControl,
336
+ userControl: this._mainRoomControl.getUserControl(),
309
337
  uiEventStore: uiEventStore,
310
338
  securityStore: securityStore,
311
- streamControl: this._roomControl.getStreamControl(),
339
+ streamControl: this._mainRoomControl.getStreamControl(),
312
340
  deviceStore: deviceStore,
313
341
  deviceStreamStore: deviceStreamStore,
314
- mediaControl: this._engine.getMediaControl()
342
+ mediaControl: this._engine.getDesktopMediaControl()
315
343
  });
316
344
  this._audioStreamUIModule = new _audioStream.AudioStreamUIModule({
317
- streamControl: this._roomControl.getStreamControl(),
318
- userControl: this._roomControl.getUserControl(),
345
+ streamControl: this._mainRoomControl.getStreamControl(),
346
+ userControl: this._mainRoomControl.getUserControl(),
319
347
  deviceStreamStore: deviceStreamStore
320
348
  });
321
349
  this._dialogModule = new _dialog.DialogUIModule({
322
350
  uiEventStore: uiEventStore,
323
- userInfo: this._roomControl.getUserControl().getLocalUser(),
351
+ userInfo: this._mainRoomControl.getUserControl().getLocalUser(),
324
352
  securityStore: securityStore,
325
- userControl: this._roomControl.getUserControl(),
326
- chatRoomControl: this._roomControl.getChatRoomControl(),
353
+ userControl: this._mainRoomControl.getUserControl(),
354
+ chatRoomControl: this._mainRoomControl.getChatRoomControl(),
327
355
  deviceStore: deviceStore,
328
- streamControl: this._roomControl.getStreamControl()
356
+ streamControl: this._mainRoomControl.getStreamControl()
329
357
  });
330
358
  this._settingUIModule = new _setting.SettingUIModule({
331
- mediaControl: this._engine.getMediaControl(),
359
+ mediaControl: this._engine.getDesktopMediaControl(),
332
360
  config: this._sceneConfig,
333
361
  uiEventStore: uiEventStore,
334
362
  deviceStore: deviceStore,
335
363
  monitorControl: this._engine.getMonitorControl(),
336
- streamControl: this._roomControl.getStreamControl(),
337
- roomControl: this._roomControl
364
+ streamControl: this._mainRoomControl.getStreamControl(),
365
+ roomControl: this._mainRoomControl
338
366
  });
339
367
  this._stateBarUIModule = new _stateBar.StateBarUIModule({
340
- roomControl: this._roomControl,
368
+ roomControl: this._mainRoomControl,
341
369
  uiEventStore: uiEventStore,
342
370
  securityStore: securityStore,
343
371
  config: this._sceneConfig
@@ -345,8 +373,12 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
345
373
  this._eventToastUIModule = new _eventToast.EventToastUIModule({
346
374
  uiEventStore: uiEventStore
347
375
  });
376
+ this._eventNotificationUIModule = new _eventNotification.EventNotificationUIModule({
377
+ uiEventStore: uiEventStore,
378
+ privilegeControl: this._mainRoomControl.getPrivilegeControl()
379
+ });
348
380
  this._participantsModule = new _participant.ParticipantUIModule({
349
- roomControl: this._roomControl,
381
+ roomControl: this._mainRoomControl,
350
382
  engine: this._engine,
351
383
  peerSessionControl: this._engine.getPeerSessionControl(),
352
384
  securityStore: securityStore,
@@ -355,83 +387,85 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
355
387
  deviceStreamStore: deviceStreamStore
356
388
  });
357
389
  this._shareScreenModule = new _shareScreen.ShareScreenUIModule({
358
- roomControl: this._roomControl,
359
- mediaControl: this._engine.getMediaControl(),
390
+ roomControl: this._mainRoomControl,
391
+ mediaControl: this._engine.getDesktopMediaControl(),
360
392
  deviceStore: deviceStore,
361
393
  deviceStreamStore: deviceStreamStore,
362
394
  securityStore: securityStore,
363
- uiEventStore: uiEventStore
395
+ uiEventStore: uiEventStore,
396
+ config: this._sceneConfig
364
397
  });
365
398
  this._liveStreamingUIModule = new _liveStreaming.LiveStreamingUIModule({
366
- roomControl: this._roomControl,
399
+ roomControl: this._mainRoomControl,
367
400
  uiEventStore: uiEventStore
368
401
  });
369
402
  this._videoWindowModule = new _videoWindow.VideoWindowUIModule({
370
403
  uiEventStore: uiEventStore,
371
- mediaControl: this._engine.getMediaControl(),
372
- userControl: this._roomControl.getUserControl(),
373
- streamControl: this._roomControl.getStreamControl(),
404
+ mediaControl: this._engine.getDesktopMediaControl(),
405
+ userControl: this._mainRoomControl.getUserControl(),
406
+ streamControl: this._mainRoomControl.getStreamControl(),
374
407
  securityStore: securityStore,
375
408
  deviceStore: deviceStore,
376
409
  deviceStreamStore: deviceStreamStore
377
410
  });
378
411
  this._connectionGatewayUIModule = new _connectionGateway.ConnectionGatewayUIModule({
379
- roomControl: this._roomControl,
412
+ roomControl: this._mainRoomControl,
380
413
  uiEventStore: uiEventStore,
381
- deviceStore: this._deviceStore
414
+ deviceStore: this._deviceStore,
415
+ mediaControl: this._engine.getDesktopMediaControl()
382
416
  });
383
417
  this._inviteUIModule = new _invite.InviteUIModule({
384
- roomControl: this._roomControl,
418
+ roomControl: this._mainRoomControl,
385
419
  uiEventStore: uiEventStore
386
420
  });
387
421
  this._whiteBoradUIModule = new _whiteboard.FcrWhiteboardUIModule({
388
- roomControl: this._roomControl,
422
+ roomControl: this._mainRoomControl,
389
423
  uiEventStore: uiEventStore,
390
- userControl: this._roomControl.getUserControl(),
391
- whiteboardControl: this._roomControl.getWhiteboardControl(),
392
- streamControl: this._roomControl.getStreamControl(),
424
+ userControl: this._mainRoomControl.getUserControl(),
425
+ whiteboardControl: this._mainRoomControl.getBoardControl(),
426
+ streamControl: this._mainRoomControl.getStreamControl(),
393
427
  securityStore: securityStore
394
428
  });
395
429
  this._dialogModule.addDialogs([{
396
430
  key: _constant.DialogKey.DEVICE_SETTINGS,
397
431
  component: function component() {
398
- var _this3$_settingUIModu;
399
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.DeviceSettingDialog, {
400
- children: (_this3$_settingUIModu = _this3._settingUIModule) === null || _this3$_settingUIModu === void 0 ? void 0 : _this3$_settingUIModu.getComponent()
432
+ var _this4$_settingUIModu;
433
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_deviceSetting["default"], {
434
+ children: (_this4$_settingUIModu = _this4._settingUIModule) === null || _this4$_settingUIModu === void 0 ? void 0 : _this4$_settingUIModu.getComponent()
401
435
  }, "DeviceSettingDialog");
402
436
  }
403
437
  }, {
404
438
  key: _constant.DialogKey.PARTICIPANT,
405
439
  component: function component() {
406
- var _this3$_participantsM;
440
+ var _this4$_participantsM;
407
441
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_participant2.ParticipantDialog, {
408
- children: (_this3$_participantsM = _this3._participantsModule) === null || _this3$_participantsM === void 0 ? void 0 : _this3$_participantsM.getComponent()
442
+ children: (_this4$_participantsM = _this4._participantsModule) === null || _this4$_participantsM === void 0 ? void 0 : _this4$_participantsM.getComponent()
409
443
  }, "ParticipantDialog");
410
444
  }
411
445
  }, {
412
446
  key: _constant.DialogKey.LIVE_STREAMING,
413
447
  component: function component() {
414
- var _this3$_liveStreaming;
448
+ var _this4$_liveStreaming;
415
449
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.LiveStreamingDialog, {
416
450
  title: "Push the meeting to the specified live platform",
417
- children: (_this3$_liveStreaming = _this3._liveStreamingUIModule) === null || _this3$_liveStreaming === void 0 ? void 0 : _this3$_liveStreaming.getComponent()
451
+ children: (_this4$_liveStreaming = _this4._liveStreamingUIModule) === null || _this4$_liveStreaming === void 0 ? void 0 : _this4$_liveStreaming.getComponent()
418
452
  }, "LiveStreamingDialog");
419
453
  }
420
454
  }, {
421
455
  key: _constant.DialogKey.INVITE,
422
456
  component: function component() {
423
- var _this3$_inviteUIModul;
457
+ var _this4$_inviteUIModul;
424
458
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.InviteDialog, {
425
- children: (_this3$_inviteUIModul = _this3._inviteUIModule) === null || _this3$_inviteUIModul === void 0 ? void 0 : _this3$_inviteUIModul.getComponent()
459
+ children: (_this4$_inviteUIModul = _this4._inviteUIModule) === null || _this4$_inviteUIModul === void 0 ? void 0 : _this4$_inviteUIModul.getComponent()
426
460
  }, "InviteDialog");
427
461
  }
428
462
  }, {
429
463
  key: _constant.DialogKey.CHAT,
430
464
  component: function component() {
431
- var _this3$_chatModule, _this3$_chatModule2;
465
+ var _this4$_chatModule, _this4$_chatModule2;
432
466
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chat2.ChatDialog, {
433
- chatAction: (_this3$_chatModule = _this3._chatModule) === null || _this3$_chatModule === void 0 ? void 0 : _this3$_chatModule.getActionsComponent(),
434
- children: (_this3$_chatModule2 = _this3._chatModule) === null || _this3$_chatModule2 === void 0 ? void 0 : _this3$_chatModule2.getComponent({
467
+ chatAction: (_this4$_chatModule = _this4._chatModule) === null || _this4$_chatModule === void 0 ? void 0 : _this4$_chatModule.getActionsComponent(),
468
+ children: (_this4$_chatModule2 = _this4._chatModule) === null || _this4$_chatModule2 === void 0 ? void 0 : _this4$_chatModule2.getComponent({
435
469
  singling: true
436
470
  })
437
471
  }, "ChatDialog");
@@ -455,45 +489,87 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
455
489
  }, {
456
490
  key: _constant.DialogKey.VIDEO_WINDOW,
457
491
  component: function component() {
458
- var _this3$_videoWindowMo;
492
+ var _this4$_videoWindowMo;
459
493
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialogs.VideoWindowDialog, {
460
- children: (_this3$_videoWindowMo = _this3._videoWindowModule) === null || _this3$_videoWindowMo === void 0 ? void 0 : _this3$_videoWindowMo.getComponent()
494
+ children: (_this4$_videoWindowMo = _this4._videoWindowModule) === null || _this4$_videoWindowMo === void 0 ? void 0 : _this4$_videoWindowMo.getComponent()
461
495
  }, "VideoWindowDialog");
462
496
  }
463
497
  }, {
464
498
  key: _constant.DialogKey.CONNECTION_GATEWAY,
465
499
  component: function component() {
466
- var _this3$_connectionGat;
500
+ var _this4$_connectionGat;
467
501
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_connectionGateway2.ConnectionGatewayDialog, {
468
- children: (_this3$_connectionGat = _this3._connectionGatewayUIModule) === null || _this3$_connectionGat === void 0 ? void 0 : _this3$_connectionGat.getComponent()
502
+ children: (_this4$_connectionGat = _this4._connectionGatewayUIModule) === null || _this4$_connectionGat === void 0 ? void 0 : _this4$_connectionGat.getComponent()
469
503
  }, "ConnectionGatewayDialog");
470
504
  }
471
505
  }, {
472
506
  key: _constant.DialogKey.WHITEBOARD,
473
507
  component: function component() {
474
- return _this3._whiteBoradUIModule ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_whiteboard2.WhiteboardElectronDialog, {
475
- module: _this3._whiteBoradUIModule
508
+ return _this4._whiteBoradUIModule ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_whiteboard2.WhiteboardElectronDialog, {
509
+ module: _this4._whiteBoradUIModule
476
510
  }, "WhiteboardDialog") : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
477
511
  }
478
512
  }, {
479
513
  key: _constant.DialogKey.SHARE_SCREEN,
480
514
  component: function component(params) {
481
- var _this3$_shareScreenMo;
515
+ var _this4$_shareScreenMo;
482
516
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_shareScreenSelection.ShareScreenSelectronDialog, {
483
517
  params: params,
484
- children: (_this3$_shareScreenMo = _this3._shareScreenModule) === null || _this3$_shareScreenMo === void 0 ? void 0 : _this3$_shareScreenMo.getSelectionComponent()
518
+ children: (_this4$_shareScreenMo = _this4._shareScreenModule) === null || _this4$_shareScreenMo === void 0 ? void 0 : _this4$_shareScreenMo.getSelectionComponent()
485
519
  }, "ShareScreenSelection");
486
520
  }
521
+ }, {
522
+ key: _constant.DialogKey.CONTROL_BAR,
523
+ component: function component() {
524
+ var _this4$_shareScreenMo2;
525
+ return (_this4$_shareScreenMo2 = _this4._shareScreenModule) === null || _this4$_shareScreenMo2 === void 0 ? void 0 : _this4$_shareScreenMo2.getComponent();
526
+ }
527
+ }, {
528
+ key: _constant.DialogKey.WAITING_ROOM,
529
+ component: function component(params) {
530
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_operationWaitingRoom.OperationWaitingRoomDialog, {
531
+ params: params
532
+ }, 'WaitingRoom');
533
+ }
534
+ }, {
535
+ key: _constant.DialogKey.WAITING_ROOM_SINGLE_REMOVE,
536
+ component: function component(params) {
537
+ var _this4$_participantsM2;
538
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
539
+ params: params,
540
+ children: (_this4$_participantsM2 = _this4._participantsModule) === null || _this4$_participantsM2 === void 0 ? void 0 : _this4$_participantsM2.getWaitingRoomDialog(params)
541
+ }, 'WaitingRoomSingleRemove');
542
+ }
543
+ }, {
544
+ key: _constant.DialogKey.WAITING_ROOM_ALL_REMOVE,
545
+ component: function component(params) {
546
+ var _this4$_participantsM3;
547
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
548
+ params: params,
549
+ children: (_this4$_participantsM3 = _this4._participantsModule) === null || _this4$_participantsM3 === void 0 ? void 0 : _this4$_participantsM3.getWaitingRoomDialog(params)
550
+ }, 'WaitingRoomAllRemove');
551
+ }
552
+ }, {
553
+ key: _constant.DialogKey.WAITING_ROOM_ALL_ADMIT,
554
+ component: function component(params) {
555
+ var _this4$_participantsM4;
556
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_removeAdmitWaitingRoom.RemoveAdmitWaitingRoomDialog, {
557
+ params: params,
558
+ children: (_this4$_participantsM4 = _this4._participantsModule) === null || _this4$_participantsM4 === void 0 ? void 0 : _this4$_participantsM4.getWaitingRoomDialog(params)
559
+ }, 'WaitingRoomAllAdmit');
560
+ }
487
561
  }]);
488
562
  this._layoutModule = new _layout.LayoutUIModule({
489
563
  deviceStore: this._deviceStore,
490
564
  uiEventStore: uiEventStore,
491
- mediaControl: this._engine.getMediaControl(),
492
- userControl: this._roomControl.getUserControl(),
493
- streamControl: this._roomControl.getStreamControl(),
565
+ mediaControl: this._engine.getDesktopMediaControl(),
566
+ userControl: this._mainRoomControl.getUserControl(),
567
+ streamControl: this._mainRoomControl.getStreamControl(),
494
568
  securityStore: securityStore,
495
- chatRoomControl: this._roomControl.getChatRoomControl(),
496
- whiteBoardControl: this._roomControl.getWhiteboardControl()
569
+ chatRoomControl: this._mainRoomControl.getChatRoomControl(),
570
+ whiteBoardControl: this._mainRoomControl.getBoardControl(),
571
+ privilegeControl: this._mainRoomControl.getPrivilegeControl(),
572
+ roomControl: this._mainRoomControl
497
573
  });
498
574
  var layoutComponent = this._layoutModule.getComponent({
499
575
  chat: this._chatModule.getComponent(),
@@ -501,46 +577,112 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
501
577
  participant: this._participantsModule.getComponent(),
502
578
  actionBar: this._actionBarUIModule.getComponent(),
503
579
  stateBar: this._stateBarUIModule.getComponent(),
504
- layers: [this._dialogModule.getComponent(), this._eventToastUIModule.getComponent()],
580
+ layers: [this._dialogModule.getComponent(), this._eventToastUIModule.getComponent(), this._eventNotificationUIModule.getComponent()],
505
581
  whiteboard: this._whiteBoradUIModule.getComponent()
506
582
  });
507
583
  this._eventObserver = {
508
584
  onEvent: function onEvent(action, payload) {
509
585
  if (action === _constant.UIAction.EXIT_ROOM) {
510
- _this3._observable.notifyObservers('onExited', _this3._sceneConfig.roomId, payload.reason);
586
+ _this4._observable.notifyObservers('onExited', _this4._sceneConfig.roomId, payload.reason, _this4._mainRoomControl);
511
587
  }
512
588
  }
513
589
  };
514
590
  this._engineObserver = {
515
591
  onConnectionStateUpdated: function onConnectionStateUpdated(state) {
516
- if (state === _type2.FcrConnectionState.ABORTED) {
517
- _this3._observable.notifyObservers('onExited', _this3._sceneConfig.roomId, _type.FcrUIExitReason.ABORTED);
592
+ if (state === _agoraEduCore.FcrConnectionState.ABORTED) {
593
+ _this4._observable.notifyObservers('onExited', _this4._sceneConfig.roomId, _type.FcrUIExitReason.ABORTED);
518
594
  }
519
- if (state === _type2.FcrConnectionState.CONNECTED) {
595
+ if (state === _agoraEduCore.FcrConnectionState.CONNECTED) {
520
596
  uiEventStore.sendEvent(_constant.UIAction.ENGINE_RECONNECTED);
521
597
  }
522
598
  }
523
599
  };
524
600
  this._userObserver = {
525
601
  onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
526
- _this3._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.KICKED_OUT);
602
+ _dialog2.FcrDialogApi.open({
603
+ id: 'login-confirm-dialog-kick-out',
604
+ dialogProps: {
605
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
606
+ title: (0, _i18n.transI18n)('fmt_popup_button_leavemeeting'),
607
+ desc: (0, _i18n.transI18n)('fmt_leave_tips_removetip'),
608
+ btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit'),
609
+ id: "login-confirm-dialog-kick-out",
610
+ onConfirm: function onConfirm() {
611
+ _this4._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.KICKED_OUT);
612
+ }
613
+ }),
614
+ width: 360,
615
+ closable: false,
616
+ rootClassName: 'login-confirm-dialog'
617
+ }
618
+ });
619
+ },
620
+ onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
621
+ // 权限变更的时候
622
+ if (_this4._mainRoomControl && event.modifiedUser.userId === _this4._mainRoomControl.getUserControl().getLocalUser().userId) {
623
+ _this4._sceneConfig.userRole = event.modifiedUser.userRole;
624
+ _this4._judgeWaitingRoomPremissionAndCreateRoomControl();
625
+ }
527
626
  }
528
627
  };
529
628
  this._roomObserver = {
629
+ onLocalUserMovedToWaitingRoom: function () {
630
+ var _onLocalUserMovedToWaitingRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(roomId, event) {
631
+ var _this4$_mainRoomContr, info, enable, room;
632
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
633
+ while (1) switch (_context3.prev = _context3.next) {
634
+ case 0:
635
+ if (!_this4._mainRoomControl) {
636
+ _context3.next = 14;
637
+ break;
638
+ }
639
+ _this4$_mainRoomContr = _this4._mainRoomControl.getPrivilegeControl().getSecurityInfo(_type7.FcrSecurityAction.WaitingRoom), info = _this4$_mainRoomContr.info, enable = _this4$_mainRoomContr.enable;
640
+ _context3.next = 4;
641
+ return _this4._mainRoomControl.leave();
642
+ case 4:
643
+ _this4._mainRoomControl.removeObserver(_this4._roomObserver);
644
+ if (!info) {
645
+ _context3.next = 14;
646
+ break;
647
+ }
648
+ _context3.next = 8;
649
+ return _this4._createRoomControl(info.payload.roomUuid);
650
+ case 8:
651
+ room = _context3.sent;
652
+ _this4._waitingRoomControl = room;
653
+ // @ts-ignore
654
+ window.__waitingRoom_control = room;
655
+ _reactDom["default"].unmountComponentAtNode(dom);
656
+ _this4._uiEventStore.showToast({
657
+ type: 'error',
658
+ message: (0, _i18n.transI18n)('fmt_waitingroom_attendie_overview_label__toast_move_to_waitingroom')
659
+ });
660
+ _this4._renderWaitingRoomUi(dom);
661
+ case 14:
662
+ case "end":
663
+ return _context3.stop();
664
+ }
665
+ }, _callee3);
666
+ }));
667
+ function onLocalUserMovedToWaitingRoom(_x, _x2) {
668
+ return _onLocalUserMovedToWaitingRoom.apply(this, arguments);
669
+ }
670
+ return onLocalUserMovedToWaitingRoom;
671
+ }(),
530
672
  onRoomStateUpdated: function onRoomStateUpdated(roomId, state) {
531
673
  if (state === _type2.FcrRoomState.Closed) {
532
- _this3._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.CLOSE_ROOM);
674
+ _this4._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.CLOSE_ROOM);
533
675
  }
534
676
  }
535
677
  };
536
678
  uiEventStore.addObserver(this._eventObserver);
537
679
  this._engine.addObserver(this._engineObserver);
538
- this._roomControl.addObserver(this._roomObserver);
539
- this._roomControl.getUserControl().addObserver(this._userObserver);
540
- _reactDom["default"].render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_videoTrackRenderContext.FcrVideoTrackRenderContext.Provider, {
680
+ this._mainRoomControl.addObserver(this._roomObserver);
681
+ this._mainRoomControl.getUserControl().addObserver(this._userObserver);
682
+ _reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_videoTrackRenderContext.FcrVideoTrackRenderContext.Provider, {
541
683
  value: {
542
684
  deviceStore: this._deviceStore,
543
- streamControl: this._roomControl.getStreamControl()
685
+ streamControl: this._mainRoomControl.getStreamControl()
544
686
  },
545
687
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
546
688
  style: {
@@ -551,5 +693,317 @@ var DefaultSceneUIManager = exports.DefaultSceneUIManager = /*#__PURE__*/functio
551
693
  })
552
694
  }), dom);
553
695
  }
696
+ }, {
697
+ key: "_renderWaitingRoomUi",
698
+ value: function _renderWaitingRoomUi(dom) {
699
+ var _this5 = this;
700
+ var deviceStore = this._deviceStore;
701
+ if (this._waitingRoomControl) {
702
+ this._waitingRoomLayoutModule = new _waitingRoomLayout.WaitingRoomLayout({
703
+ deviceStore: deviceStore,
704
+ userControl: this._waitingRoomControl.getUserControl()
705
+ });
706
+ var uiEventStore = this._uiEventStore;
707
+ this._eventObserver = {
708
+ onEvent: function onEvent(action, payload) {
709
+ if (action === _constant.UIAction.EXIT_ROOM) {
710
+ _this5._observable.notifyObservers('onExited', _this5._sceneConfig.roomId, payload.reason, _this5._waitingRoomControl);
711
+ }
712
+ }
713
+ };
714
+ uiEventStore.addObserver(this._eventObserver);
715
+ var securityStore = new _securityStore.FcrSecurityStore(this._waitingRoomControl.getPrivilegeControl(), this._waitingRoomControl.getUserControl(), this._waitingRoomControl.getStreamControl(), this._waitingRoomControl.getRoomSessionControl(), uiEventStore);
716
+ var deviceStreamStore = new _deviceStreamStore.FcrDeviceStreamStore({
717
+ mediaControl: this._engine.getDesktopMediaControl(),
718
+ roomControl: this._waitingRoomControl,
719
+ securityStore: securityStore,
720
+ deviceStore: deviceStore,
721
+ uiEventStore: uiEventStore
722
+ });
723
+ this._stateBarUIModule = new _stateBar.StateBarUIModule({
724
+ roomControl: this._waitingRoomControl,
725
+ uiEventStore: uiEventStore,
726
+ securityStore: securityStore,
727
+ config: this._sceneConfig
728
+ });
729
+ this._actionBarUIModule = new _actionBar.FcrActionBarUIModule({
730
+ roomControl: this._waitingRoomControl,
731
+ userControl: this._waitingRoomControl.getUserControl(),
732
+ uiEventStore: uiEventStore,
733
+ securityStore: securityStore,
734
+ streamControl: this._waitingRoomControl.getStreamControl(),
735
+ deviceStore: deviceStore,
736
+ deviceStreamStore: deviceStreamStore,
737
+ mediaControl: this._engine.getDesktopMediaControl()
738
+ });
739
+ this._chatModule = new _chat.ChatUIModule({
740
+ roomControl: this._waitingRoomControl,
741
+ uiEventStore: uiEventStore,
742
+ securityStore: securityStore
743
+ });
744
+ var layoutComponent = this._waitingRoomLayoutModule.getComponent({
745
+ chat: this._chatModule.getComponent(),
746
+ stateBar: this._stateBarUIModule.getComponent(),
747
+ actionBar: this._actionBarUIModule.getComponent()
748
+ });
749
+ this._roomObserver = {
750
+ onLocalUserMovedToMainRoom: function () {
751
+ var _onLocalUserMovedToMainRoom = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(roomId, event) {
752
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
753
+ while (1) switch (_context5.prev = _context5.next) {
754
+ case 0:
755
+ _dialog2.FcrDialogApi.open({
756
+ id: 'login-confirm-dialog-move-mainroom',
757
+ dialogProps: {
758
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
759
+ title: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_label_about_join'),
760
+ desc: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_label_quick_join'),
761
+ id: "login-confirm-dialog-move-mainroom",
762
+ btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_mobile_notice_popup_button_join_now_no_count'),
763
+ isShowCoutDown: true,
764
+ showImg: false,
765
+ onConfirm: /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
766
+ var room;
767
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
768
+ while (1) switch (_context4.prev = _context4.next) {
769
+ case 0:
770
+ if (!_this5._waitingRoomControl) {
771
+ _context4.next = 10;
772
+ break;
773
+ }
774
+ _context4.next = 3;
775
+ return _this5._waitingRoomControl.leave();
776
+ case 3:
777
+ room = _this5._engine.createMainRoomControl(roomId.split('-')[0]);
778
+ _context4.next = 6;
779
+ return room.joinWithTicket(_objectSpread(_objectSpread({}, _this5._getJoinRoomOption()), {}, {
780
+ ticket: (0, _lodash.get)(event.changedProperties, 'security.ticket')
781
+ }));
782
+ case 6:
783
+ _this5._mainRoomControl = room;
784
+ // @ts-ignore
785
+ window.__mainRoom_control = room;
786
+ _reactDom["default"].unmountComponentAtNode(dom);
787
+ _this5._renderRoomUi(dom);
788
+ case 10:
789
+ case "end":
790
+ return _context4.stop();
791
+ }
792
+ }, _callee4);
793
+ }))
794
+ }),
795
+ width: 360,
796
+ closable: false,
797
+ rootClassName: 'login-confirm-dialog'
798
+ }
799
+ });
800
+ case 1:
801
+ case "end":
802
+ return _context5.stop();
803
+ }
804
+ }, _callee5);
805
+ }));
806
+ function onLocalUserMovedToMainRoom(_x3, _x4) {
807
+ return _onLocalUserMovedToMainRoom.apply(this, arguments);
808
+ }
809
+ return onLocalUserMovedToMainRoom;
810
+ }(),
811
+ onRoomStateUpdated: function onRoomStateUpdated(roomId, state) {
812
+ if (state === _type2.FcrRoomState.Closed) {
813
+ _this5._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.CLOSE_ROOM);
814
+ }
815
+ }
816
+ };
817
+ this._waitingRoomUserObserver = {
818
+ onLocalUserKickedOut: function onLocalUserKickedOut(roomId) {
819
+ _dialog2.FcrDialogApi.open({
820
+ id: 'login-confirm-dialog-kick-out',
821
+ dialogProps: {
822
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
823
+ title: (0, _i18n.transI18n)('fmt_popup_button_leavemeeting'),
824
+ desc: (0, _i18n.transI18n)('fmt_leave_tips_removetip'),
825
+ id: "login-confirm-dialog-kick-out",
826
+ btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit'),
827
+ onConfirm: function onConfirm() {
828
+ _this5._observable.notifyObservers('onExited', roomId, _type.FcrUIExitReason.KICKED_OUT);
829
+ }
830
+ }),
831
+ width: 360,
832
+ closable: false,
833
+ rootClassName: 'login-confirm-dialog'
834
+ }
835
+ });
836
+ }
837
+ };
838
+ this._waitingRoomControl.addObserver(this._roomObserver);
839
+ this._waitingRoomControl.getUserControl().addObserver(this._waitingRoomUserObserver);
840
+ _reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
841
+ style: {
842
+ width: '100vw',
843
+ height: '100vh'
844
+ },
845
+ children: layoutComponent
846
+ }), dom);
847
+ }
848
+ }
849
+ }, {
850
+ key: "_getJoinRoomOption",
851
+ value: function _getJoinRoomOption() {
852
+ var config = this._sceneConfig;
853
+ var streams = [{
854
+ videoSourceState: this._deviceStore.cameraEnabled ? _type3.AgoraRtcMediaSourceState.STARTED : _type3.AgoraRtcMediaSourceState.STOPPED,
855
+ audioSourceState: this._deviceStore.microphoneEnabled ? _type3.AgoraRtcMediaSourceState.STARTED : _type3.AgoraRtcMediaSourceState.STOPPED,
856
+ videoSourceId: this._deviceStore.currentDeviceId.cameraDeviceId,
857
+ audioSourceId: this._deviceStore.currentDeviceId.microphoneDeviceId,
858
+ streamName: 'default',
859
+ streamType: _type4.AgoraRteMediaStreamType.BOTH,
860
+ videoSourceType: _type5.AgoraRteVideoSourceType.CAMERA,
861
+ audioSourceType: _type5.AgoraRteAudioSourceType.MICROPHONE
862
+ }];
863
+ if (config.userRole === _type2.FcrUserRole.ROBOT) {
864
+ streams = [];
865
+ }
866
+ return {
867
+ userName: config.userName,
868
+ userRole: config.userRole,
869
+ userProperties: config.userProperties,
870
+ streamLatency: _agoraEduCore.FcrStreamLatencyLevel.ULTRA_LOW,
871
+ createStreamConfigs: streams,
872
+ roomToken: config.roomToken,
873
+ password: config.password
874
+ };
875
+ }
876
+ }, {
877
+ key: "_createRoomControl",
878
+ value: function () {
879
+ var _createRoomControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(roomId) {
880
+ var _this6 = this;
881
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
882
+ while (1) switch (_context7.prev = _context7.next) {
883
+ case 0:
884
+ return _context7.abrupt("return", new Promise(/*#__PURE__*/function () {
885
+ var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve, reject) {
886
+ var engine, room;
887
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
888
+ while (1) switch (_context6.prev = _context6.next) {
889
+ case 0:
890
+ engine = _this6._engine;
891
+ if (engine) {
892
+ _context6.next = 3;
893
+ break;
894
+ }
895
+ return _context6.abrupt("return");
896
+ case 3:
897
+ _context6.prev = 3;
898
+ _context6.next = 6;
899
+ return engine.createRoomControlAndJoin(roomId, _this6._getJoinRoomOption());
900
+ case 6:
901
+ room = _context6.sent;
902
+ resolve(room);
903
+ _context6.next = 14;
904
+ break;
905
+ case 10:
906
+ _context6.prev = 10;
907
+ _context6.t0 = _context6["catch"](3);
908
+ if (_context6.t0.code === '730403100') {
909
+ _dialog2.FcrDialogApi.open({
910
+ id: 'login-confirm-dialog-error',
911
+ dialogProps: {
912
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_loginConfirmDialog.LoginConfirmDialog, {
913
+ desc: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_label_removed'),
914
+ id: "login-confirm-dialog-error",
915
+ btnTxt: (0, _i18n.transI18n)('fmt_waitingroom_attendie_popup_button_gotit')
916
+ }),
917
+ width: 360,
918
+ closable: false,
919
+ rootClassName: 'login-confirm-dialog'
920
+ }
921
+ });
922
+ }
923
+ reject(_context6.t0);
924
+ case 14:
925
+ case "end":
926
+ return _context6.stop();
927
+ }
928
+ }, _callee6, null, [[3, 10]]);
929
+ }));
930
+ return function (_x6, _x7) {
931
+ return _ref4.apply(this, arguments);
932
+ };
933
+ }()));
934
+ case 1:
935
+ case "end":
936
+ return _context7.stop();
937
+ }
938
+ }, _callee7);
939
+ }));
940
+ function _createRoomControl(_x5) {
941
+ return _createRoomControl2.apply(this, arguments);
942
+ }
943
+ return _createRoomControl;
944
+ }()
945
+ }, {
946
+ key: "_judgeWaitingRoomPremissionAndCreateRoomControl",
947
+ value: function () {
948
+ var _judgeWaitingRoomPremissionAndCreateRoomControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
949
+ var _this$_mainRoomContro, info, isWaitingRoomManager, waitingRoomId, room, securityStore;
950
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
951
+ while (1) switch (_context8.prev = _context8.next) {
952
+ case 0:
953
+ if (this._mainRoomControl) {
954
+ _context8.next = 2;
955
+ break;
956
+ }
957
+ return _context8.abrupt("return");
958
+ case 2:
959
+ _this$_mainRoomContro = this._mainRoomControl.getPrivilegeControl().getSecurityInfo(_type7.FcrSecurityAction.WaitingRoom), info = _this$_mainRoomContro.info;
960
+ isWaitingRoomManager = this._mainRoomControl.getPrivilegeControl().getLocalUserPermissionInfo(_type7.FcrPermissionAction.WaitingRoomOpen).enable;
961
+ if (!isWaitingRoomManager) {
962
+ _context8.next = 16;
963
+ break;
964
+ }
965
+ if (!info) {
966
+ _context8.next = 14;
967
+ break;
968
+ }
969
+ waitingRoomId = info.payload.roomUuid;
970
+ room = this._engine.createWaitingRoomControl(waitingRoomId);
971
+ _context8.next = 10;
972
+ return room.join(this._getJoinRoomOption());
973
+ case 10:
974
+ this._waitingRoomControl = room;
975
+ // @ts-ignore
976
+ window.__waitingRoom_control = room;
977
+ securityStore = new _securityStore.FcrSecurityStore(this._waitingRoomControl.getPrivilegeControl(), this._waitingRoomControl.getUserControl(), this._waitingRoomControl.getStreamControl(), this._waitingRoomControl.getRoomSessionControl(), this._uiEventStore);
978
+ this._uiEventStore.sendEvent(_constant.UIAction.WAITING_ROOM_CREATED, {
979
+ room: room,
980
+ securityStore: securityStore
981
+ });
982
+ case 14:
983
+ _context8.next = 17;
984
+ break;
985
+ case 16:
986
+ this._destroyWaitingRoom();
987
+ case 17:
988
+ case "end":
989
+ return _context8.stop();
990
+ }
991
+ }, _callee8, this);
992
+ }));
993
+ function _judgeWaitingRoomPremissionAndCreateRoomControl() {
994
+ return _judgeWaitingRoomPremissionAndCreateRoomControl2.apply(this, arguments);
995
+ }
996
+ return _judgeWaitingRoomPremissionAndCreateRoomControl;
997
+ }()
998
+ }, {
999
+ key: "_destroyWaitingRoom",
1000
+ value: function _destroyWaitingRoom() {
1001
+ var _this$_waitingRoomCon;
1002
+ (_this$_waitingRoomCon = this._waitingRoomControl) === null || _this$_waitingRoomCon === void 0 || _this$_waitingRoomCon.leave();
1003
+ this._waitingRoomControl = undefined;
1004
+ this._uiEventStore.sendEvent(_constant.UIAction.WAITING_ROOM_DESTROYED);
1005
+ // @ts-ignore
1006
+ window.__waitingRoom_control = undefined;
1007
+ }
554
1008
  }]);
555
1009
  }();