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
@@ -12,6 +12,8 @@ require("core-js/modules/es.number.constructor.js");
12
12
  require("core-js/modules/es.object.create.js");
13
13
  require("core-js/modules/es.object.define-property.js");
14
14
  require("core-js/modules/es.object.get-own-property-descriptor.js");
15
+ require("core-js/modules/esnext.function.metadata.js");
16
+ require("core-js/modules/esnext.symbol.metadata.js");
15
17
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
16
18
  var _typeof = require("@babel/runtime/helpers/typeof");
17
19
  Object.defineProperty(exports, "__esModule", {
@@ -21,17 +23,71 @@ exports["default"] = void 0;
21
23
  require("core-js/modules/es.array.filter.js");
22
24
  require("core-js/modules/es.array.find.js");
23
25
  require("core-js/modules/es.array.for-each.js");
26
+ require("core-js/modules/es.array.includes.js");
24
27
  require("core-js/modules/es.array.iterator.js");
28
+ require("core-js/modules/es.array.map.js");
25
29
  require("core-js/modules/es.array.push.js");
26
30
  require("core-js/modules/es.array.slice.js");
27
31
  require("core-js/modules/es.array.some.js");
28
32
  require("core-js/modules/es.function.bind.js");
29
33
  require("core-js/modules/es.map.js");
34
+ require("core-js/modules/es.object.entries.js");
30
35
  require("core-js/modules/es.object.to-string.js");
31
36
  require("core-js/modules/es.object.values.js");
32
37
  require("core-js/modules/es.set.js");
38
+ require("core-js/modules/es.string.includes.js");
33
39
  require("core-js/modules/es.string.iterator.js");
34
40
  require("core-js/modules/es.weak-map.js");
41
+ require("core-js/modules/esnext.async-iterator.filter.js");
42
+ require("core-js/modules/esnext.async-iterator.find.js");
43
+ require("core-js/modules/esnext.async-iterator.for-each.js");
44
+ require("core-js/modules/esnext.async-iterator.map.js");
45
+ require("core-js/modules/esnext.async-iterator.some.js");
46
+ require("core-js/modules/esnext.iterator.constructor.js");
47
+ require("core-js/modules/esnext.iterator.filter.js");
48
+ require("core-js/modules/esnext.iterator.find.js");
49
+ require("core-js/modules/esnext.iterator.for-each.js");
50
+ require("core-js/modules/esnext.iterator.map.js");
51
+ require("core-js/modules/esnext.iterator.some.js");
52
+ require("core-js/modules/esnext.map.delete-all.js");
53
+ require("core-js/modules/esnext.map.emplace.js");
54
+ require("core-js/modules/esnext.map.every.js");
55
+ require("core-js/modules/esnext.map.filter.js");
56
+ require("core-js/modules/esnext.map.find.js");
57
+ require("core-js/modules/esnext.map.find-key.js");
58
+ require("core-js/modules/esnext.map.includes.js");
59
+ require("core-js/modules/esnext.map.key-of.js");
60
+ require("core-js/modules/esnext.map.map-keys.js");
61
+ require("core-js/modules/esnext.map.map-values.js");
62
+ require("core-js/modules/esnext.map.merge.js");
63
+ require("core-js/modules/esnext.map.reduce.js");
64
+ require("core-js/modules/esnext.map.some.js");
65
+ require("core-js/modules/esnext.map.update.js");
66
+ require("core-js/modules/esnext.set.add-all.js");
67
+ require("core-js/modules/esnext.set.delete-all.js");
68
+ require("core-js/modules/esnext.set.difference.v2.js");
69
+ require("core-js/modules/esnext.set.difference.js");
70
+ require("core-js/modules/esnext.set.every.js");
71
+ require("core-js/modules/esnext.set.filter.js");
72
+ require("core-js/modules/esnext.set.find.js");
73
+ require("core-js/modules/esnext.set.intersection.v2.js");
74
+ require("core-js/modules/esnext.set.intersection.js");
75
+ require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
76
+ require("core-js/modules/esnext.set.is-disjoint-from.js");
77
+ require("core-js/modules/esnext.set.is-subset-of.v2.js");
78
+ require("core-js/modules/esnext.set.is-subset-of.js");
79
+ require("core-js/modules/esnext.set.is-superset-of.v2.js");
80
+ require("core-js/modules/esnext.set.is-superset-of.js");
81
+ require("core-js/modules/esnext.set.join.js");
82
+ require("core-js/modules/esnext.set.map.js");
83
+ require("core-js/modules/esnext.set.reduce.js");
84
+ require("core-js/modules/esnext.set.some.js");
85
+ require("core-js/modules/esnext.set.symmetric-difference.v2.js");
86
+ require("core-js/modules/esnext.set.symmetric-difference.js");
87
+ require("core-js/modules/esnext.set.union.v2.js");
88
+ require("core-js/modules/esnext.set.union.js");
89
+ require("core-js/modules/esnext.weak-map.delete-all.js");
90
+ require("core-js/modules/esnext.weak-map.emplace.js");
35
91
  require("core-js/modules/web.dom-collections.for-each.js");
36
92
  require("core-js/modules/web.dom-collections.iterator.js");
37
93
  require("core-js/modules/web.timers.js");
@@ -40,22 +96,28 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
40
96
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
41
97
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
42
98
  var _mobx = require("mobx");
99
+ var _agoraEduCore = require("agora-edu-core");
43
100
  var _type = require("agora-edu-core/lib/type");
44
101
  var _decorator = require("agora-foundation/lib/decorator");
45
102
  var _logger = require("agora-foundation/lib/logger");
46
- var _type2 = require("agora-rte-sdk/lib/core/rtc/type");
47
- var _type3 = require("../video-window/type");
103
+ var _type2 = require("../video-window/type");
104
+ var _eventStore = require("../../common/event-store");
48
105
  var _constant = require("../../utilities/constant");
49
- var _type4 = require("./type");
106
+ var _type3 = require("./type");
50
107
  var _Layout = require("./components/Layout");
51
108
  var _videoWindowDatasource = require("./video-window-datasource");
52
109
  var _toast = require("agora-ui-foundation/lib/components/toast");
53
- var _type5 = require("../whiteboard/type");
110
+ var _type4 = require("../whiteboard/type");
54
111
  var _i18n = require("agora-ui-foundation/lib/i18n");
112
+ var _type5 = require("agora-edu-core/lib/room-control/chatroom-control/type");
113
+ var _type6 = require("agora-rte-sdk/lib/core/scene/type");
114
+ var _attendee = require("agora-ui-foundation/lib/components/participants/attendee");
115
+ var _type7 = require("agora-edu-core/lib/room-control/privilege-control/type");
116
+ var _get = _interopRequireDefault(require("lodash/get"));
55
117
  var _LayoutStore;
56
- var _initProto, _participantDecs, _init_participant, _chatDecs, _init_chat, _chatActionDecs, _init_chatAction, _stateBarDecs, _init_stateBar, _actionBarDecs, _init_actionBar, _layersDecs, _init_layers, _whiteboardDecs, _init_whiteboard, _init_collapsed, _init_galleryMaxSize, _init_aside, _init_asideContent, _init_localUserRole, _init_barHovering, _init_barLocked, _init_barHidden, _init_asideWidth, _init_userVolumeMap, _init_chatRoomState, _init_videoWindowPreviewType, _init_whiteboardActive, _init_spotlightStreamId, _init_shouldHideNonVideoParticipants, _init_participantCount, _init_ownerUser, _init_localUser, _init_documentVisible, _init_enableSpotlight, _setWhiteboardActiveDecs, _handleLayoutUpdatedDecs, _init__handleLayoutUpdated, _handleFoldListChangedDecs, _handleMainListChangedDecs, _setAsideWidthDecs, _setDocumentVisibilityDecs, _updateSlotsDecs, _updateAsideContentDecs, _getAllowedOperationsDecs, _toggleLayoutDecs, _toggleCollapsedDecs, _setGalleryMaxSizeDecs, _toggleAsideDecs, _asideWidthChangedDecs, _toggleLayoutBarLockDecs, _toggleLayoutBarHiddenDecs, _setBarHoveringDecs, _resetLockTimerDecs, _setHoveringHandlerDecs, _setHoveringLeaveHandlerDecs, _onAllUserCountUpdatedDecs, _onUserInfoUpdatedDecs, _handleConnectionUpdatedDecs, _onAudioVolumeUpdatedDecs, _ref;
57
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
58
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
118
+ var _initProto, _participantDecs, _init_participant, _chatDecs, _init_chat, _chatActionDecs, _init_chatAction, _stateBarDecs, _init_stateBar, _actionBarDecs, _init_actionBar, _layersDecs, _init_layers, _whiteboardDecs, _init_whiteboard, _init_collapsed, _init_galleryMaxSize, _init_aside, _init_asideContent, _init_localUserRole, _init_barHovering, _init_barLocked, _init_barHidden, _init_asideWidth, _init_userVolumeMap, _init_chatRoomState, _init_videoWindowPreviewType, _init_whiteboardActive, _init_spotlightStreamId, _init_shouldHideNonVideoParticipants, _init_participantCount, _init_ownerUser, _init_localUser, _init_enableSpotlight, _init_isWaitingRoomNotify, _notifyParticipantShowWaitingRoomDecs, _setIsWaitingRoomNotifyDecs, _setWhiteboardActiveDecs, _setAsideWidthDecs, _updateSlotsDecs, _updateAsideContentDecs, _getAllowedOperationsDecs, _toggleLayoutDecs, _toggleCollapsedDecs, _setGalleryMaxSizeDecs, _toggleAsideDecs, _asideWidthChangedDecs, _toggleLayoutBarLockDecs, _toggleLayoutBarHiddenDecs, _resetLockTimerDecs, _setHoveringHandlerDecs, _setHoveringLeaveHandlerDecs, _onUserInfoUpdatedDecs, _handleLayoutUpdatedDecs, _init__handleLayoutUpdated, _handleFoldListChangedDecs, _handleMainListChangedDecs, _setBarHoveringDecs, _onAllUserCountUpdatedDecs, _handleConnectionUpdatedDecs, _onAudioVolumeUpdatedDecs, _ref;
119
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
120
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
59
121
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
60
122
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
61
123
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
@@ -91,13 +153,29 @@ var _X = /*#__PURE__*/new WeakMap();
91
153
  var _Y = /*#__PURE__*/new WeakMap();
92
154
  var _Z = /*#__PURE__*/new WeakMap();
93
155
  var _a = /*#__PURE__*/new WeakMap();
94
- _ref = (_participantDecs = [_mobx.observable, _mobx.observable.ref], _chatDecs = [_mobx.observable, _mobx.observable.ref], _chatActionDecs = [_mobx.observable, _mobx.observable.ref], _stateBarDecs = [_mobx.observable, _mobx.observable.ref], _actionBarDecs = [_mobx.observable, _mobx.observable.ref], _layersDecs = [_mobx.observable, _mobx.observable.ref], _whiteboardDecs = [_mobx.observable, _mobx.observable.ref], _setWhiteboardActiveDecs = [_mobx.action, _mobx.action.bound], _handleLayoutUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleFoldListChangedDecs = [_mobx.action, _mobx.action.bound], _handleMainListChangedDecs = [_mobx.action, _mobx.action.bound], _setAsideWidthDecs = [_mobx.action, _mobx.action.bound], _setDocumentVisibilityDecs = [_mobx.action, _mobx.action.bound], _updateSlotsDecs = [_mobx.action, _mobx.action.bound], _updateAsideContentDecs = [_mobx.action, _mobx.action.bound], _getAllowedOperationsDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutDecs = [_mobx.action, _mobx.action.bound], _toggleCollapsedDecs = [_mobx.action, _mobx.action.bound], _setGalleryMaxSizeDecs = [_mobx.action, _mobx.action.bound], _toggleAsideDecs = [_mobx.action, _mobx.action.bound], _asideWidthChangedDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarLockDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarHiddenDecs = [_mobx.action, _mobx.action.bound], _setBarHoveringDecs = [_mobx.action, _mobx.action.bound], _resetLockTimerDecs = [_mobx.action, _mobx.action.bound], _setHoveringHandlerDecs = [_mobx.action, _mobx.action.bound], _setHoveringLeaveHandlerDecs = [_mobx.action, _mobx.action.bound], _onAllUserCountUpdatedDecs = [_mobx.action, _mobx.action.bound], _onUserInfoUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], _onAudioVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], "_videoWindowDataSource");
156
+ _ref = (_participantDecs = [_mobx.observable, _mobx.observable.ref], _chatDecs = [_mobx.observable, _mobx.observable.ref], _chatActionDecs = [_mobx.observable, _mobx.observable.ref], _stateBarDecs = [_mobx.observable, _mobx.observable.ref], _actionBarDecs = [_mobx.observable, _mobx.observable.ref], _layersDecs = [_mobx.observable, _mobx.observable.ref], _whiteboardDecs = [_mobx.observable, _mobx.observable.ref], _notifyParticipantShowWaitingRoomDecs = [_mobx.action, _mobx.action.bound], _setIsWaitingRoomNotifyDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardActiveDecs = [_mobx.action, _mobx.action.bound], _setAsideWidthDecs = [_mobx.action, _mobx.action.bound], _updateSlotsDecs = [_mobx.action, _mobx.action.bound], _updateAsideContentDecs = [_mobx.action, _mobx.action.bound], _getAllowedOperationsDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutDecs = [_mobx.action, _mobx.action.bound], _toggleCollapsedDecs = [_mobx.action, _mobx.action.bound], _setGalleryMaxSizeDecs = [_mobx.action, _mobx.action.bound], _toggleAsideDecs = [_mobx.action, _mobx.action.bound], _asideWidthChangedDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarLockDecs = [_mobx.action, _mobx.action.bound], _toggleLayoutBarHiddenDecs = [_mobx.action, _mobx.action.bound], _resetLockTimerDecs = [_mobx.action, _mobx.action.bound], _setHoveringHandlerDecs = [_mobx.action, _mobx.action.bound], _setHoveringLeaveHandlerDecs = [_mobx.action, _mobx.action.bound], _onUserInfoUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleLayoutUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleFoldListChangedDecs = [_mobx.action, _mobx.action.bound], _handleMainListChangedDecs = [_mobx.action, _mobx.action.bound], _setBarHoveringDecs = [_mobx.action, _mobx.action.bound], _onAllUserCountUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], _onAudioVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
95
157
  var LayoutStore = exports["default"] = /*#__PURE__*/function () {
96
158
  function LayoutStore(params) {
97
159
  var _this = this;
98
160
  (0, _classCallCheck2["default"])(this, LayoutStore);
99
- (0, _defineProperty2["default"])(this, _ref, (_initProto(this), new _videoWindowDatasource.FcrUIVideoWindowDataSource()));
100
- (0, _defineProperty2["default"])(this, "logger", (0, _logger.getLogger)());
161
+ (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
162
+ (0, _defineProperty2["default"])(this, "_videoWindowDataSource", new _videoWindowDatasource.FcrUIVideoWindowDataSource());
163
+ (0, _defineProperty2["default"])(this, "_localView", null);
164
+ (0, _defineProperty2["default"])(this, "_subscriptions", []);
165
+ (0, _defineProperty2["default"])(this, "_barLockTimer", 0);
166
+ (0, _defineProperty2["default"])(this, "_liveStreamState", _type.FcrLiveStreamingState.STOPPED);
167
+ (0, _defineProperty2["default"])(this, "_chatRoomObserver", {
168
+ onConnectionStateUpdated: this._handleConnectionUpdated.bind(this),
169
+ onErrorOccurred: function onErrorOccurred() {},
170
+ onTextMessageReceived: function onTextMessageReceived() {}
171
+ });
172
+ (0, _defineProperty2["default"])(this, "_waitingRoomUserObserver", {
173
+ onRemoteUsersLeft: this._handleRemoteWaitingUserLeft.bind(this)
174
+ });
175
+ (0, _defineProperty2["default"])(this, "_waitingRoomObserver", {
176
+ onRoomMessageReceived: this._handleMessageReceived.bind(this)
177
+ });
178
+ (0, _defineProperty2["default"])(this, "_managerRoleUpdateForToast", new Set([_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST]));
101
179
  // Slots
102
180
  _classPrivateFieldInitSpec(this, _A, _init_participant(this, null));
103
181
  _classPrivateFieldInitSpec(this, _B, _init_chat(this, null));
@@ -108,7 +186,7 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
108
186
  _classPrivateFieldInitSpec(this, _G, _init_whiteboard(this, null));
109
187
  // State
110
188
  _classPrivateFieldInitSpec(this, _H, _init_collapsed(this, true));
111
- _classPrivateFieldInitSpec(this, _I, _init_galleryMaxSize(this, _type4.GalleryMaxSize.Normal));
189
+ _classPrivateFieldInitSpec(this, _I, _init_galleryMaxSize(this, _type3.GalleryMaxSize.Normal));
112
190
  _classPrivateFieldInitSpec(this, _J, _init_aside(this, false));
113
191
  _classPrivateFieldInitSpec(this, _K, _init_asideContent(this, {
114
192
  participant: false,
@@ -120,27 +198,20 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
120
198
  _classPrivateFieldInitSpec(this, _O, _init_barHidden(this, false));
121
199
  _classPrivateFieldInitSpec(this, _P, _init_asideWidth(this, _Layout.MinAsideWidth));
122
200
  _classPrivateFieldInitSpec(this, _Q, _init_userVolumeMap(this, new Map()));
123
- _classPrivateFieldInitSpec(this, _R, _init_chatRoomState(this, _type.FcrChatRoomConnectionState.Disconnected));
124
- _classPrivateFieldInitSpec(this, _S, _init_videoWindowPreviewType(this, _type3.FcrVideoWindowPreviewType.MIX));
201
+ _classPrivateFieldInitSpec(this, _R, _init_chatRoomState(this, _type5.FcrChatRoomConnectionState.Disconnected));
202
+ _classPrivateFieldInitSpec(this, _S, _init_videoWindowPreviewType(this, _type2.FcrVideoWindowPreviewType.MIX));
125
203
  _classPrivateFieldInitSpec(this, _T, _init_whiteboardActive(this, false));
126
204
  _classPrivateFieldInitSpec(this, _U, _init_spotlightStreamId(this, ''));
127
205
  _classPrivateFieldInitSpec(this, _V, _init_shouldHideNonVideoParticipants(this, false));
128
206
  _classPrivateFieldInitSpec(this, _W, _init_participantCount(this, 0));
129
- _classPrivateFieldInitSpec(this, _X, _init_ownerUser(this, null));
207
+ _classPrivateFieldInitSpec(this, _X, _init_ownerUser(this, undefined));
130
208
  _classPrivateFieldInitSpec(this, _Y, _init_localUser(this));
131
- _classPrivateFieldInitSpec(this, _Z, _init_documentVisible(this, document.visibilityState === 'visible'));
132
- _classPrivateFieldInitSpec(this, _a, _init_enableSpotlight(this, true));
133
- (0, _defineProperty2["default"])(this, "_localView", null);
134
- (0, _defineProperty2["default"])(this, "_subscriptions", []);
135
- (0, _defineProperty2["default"])(this, "_barLockTimer", 0);
136
- (0, _defineProperty2["default"])(this, "_chatRoomObserver", {
137
- onConnectionStateUpdated: this._handleConnectionUpdated.bind(this)
138
- });
139
- (0, _defineProperty2["default"])(this, "_managerRoleUpdateForToast", new Set([_type.FcrUserRole.HOST, _type.FcrUserRole.COHOST]));
209
+ _classPrivateFieldInitSpec(this, _Z, _init_enableSpotlight(this, true));
210
+ _classPrivateFieldInitSpec(this, _a, _init_isWaitingRoomNotify(this, true));
140
211
  (0, _defineProperty2["default"])(this, "_handleLayoutUpdated", _init__handleLayoutUpdated(this, function (layout) {
141
- if (layout === _type4.FcrUIVideoWindowLayoutType.Speaker) {
212
+ if (layout === _type3.FcrUIVideoWindowLayoutType.Speaker) {
142
213
  _this._switchToSpeaker();
143
- } else if (layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
214
+ } else if (layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
144
215
  _this._switchToGallery();
145
216
  }
146
217
  _this._uiEventStore.notifyLayoutChanged({
@@ -154,7 +225,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
154
225
  _this._videoWindowDataSource.setSpeakerSpotlight(streamId);
155
226
  });
156
227
  var userControl = params.userControl,
157
- chatRoomControl = params.chatRoomControl;
228
+ chatRoomControl = params.chatRoomControl,
229
+ roomControl = params.roomControl;
158
230
  this._securityStore = params.securityStore;
159
231
  this._deviceStore = params.deviceStore;
160
232
  this._uiEventStore = params.uiEventStore;
@@ -162,7 +234,13 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
162
234
  this._streamControl = params.streamControl;
163
235
  this._chatRoomControl = chatRoomControl;
164
236
  this._whiteBoardControl = params.whiteBoardControl;
237
+ this._privilegeControl = params.privilegeControl;
165
238
  this.localUser = userControl.getLocalUser();
239
+ roomControl.addObserver({
240
+ onLiveStreamingStateUpdated: function onLiveStreamingStateUpdated(_, state) {
241
+ _this._liveStreamState = state;
242
+ }
243
+ });
166
244
  this._addListeners();
167
245
  //@ts-ignore
168
246
  window.layoutStore = this;
@@ -380,7 +458,7 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
380
458
  _classPrivateFieldSet(_Y, this, v);
381
459
  }
382
460
  }, {
383
- key: "documentVisible",
461
+ key: "enableSpotlight",
384
462
  get: function get() {
385
463
  return _classPrivateFieldGet(_Z, this);
386
464
  },
@@ -388,7 +466,7 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
388
466
  _classPrivateFieldSet(_Z, this, v);
389
467
  }
390
468
  }, {
391
- key: "enableSpotlight",
469
+ key: "isWaitingRoomNotify",
392
470
  get: function get() {
393
471
  return _classPrivateFieldGet(_a, this);
394
472
  },
@@ -405,23 +483,38 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
405
483
  get: function get() {
406
484
  return this._streamControl;
407
485
  }
486
+ }, {
487
+ key: "isWaterMarkEnabled",
488
+ get: function get() {
489
+ return this._securityStore.isWaterMarkEnabled();
490
+ }
491
+ }, {
492
+ key: "isMulti",
493
+ get: function get() {
494
+ return this._securityStore.isMulti();
495
+ }
408
496
  }, {
409
497
  key: "layout",
410
498
  get: function get() {
411
499
  return this._videoWindowDataSource.layoutType;
412
500
  }
501
+ }, {
502
+ key: "manualLayout",
503
+ get: function get() {
504
+ return this._videoWindowDataSource.manualLayout;
505
+ }
413
506
  }, {
414
507
  key: "mainList",
415
508
  get: function get() {
416
509
  var _this2 = this;
417
510
  var sourceList = this._videoWindowDataSource.mainList.filter(function (i) {
418
- return !i.isMySelf || i.videoSourceType !== _type2.AgoraRtcVideoSourceType.SCREEN;
511
+ return !i.isMySelf || i.videoSourceType !== _agoraEduCore.FcrVideoSourceType.SCREEN;
419
512
  });
420
513
  var existHasVideoStreamUser = sourceList.some(function (i) {
421
514
  return i.hasVideoStream;
422
515
  });
423
516
  return this.shouldHideNonVideoParticipants ? sourceList.filter(function (i) {
424
- var visible = i.isMySelf && !existHasVideoStreamUser || i.hasVideoStream || i.videoSourceType === _type2.AgoraRtcVideoSourceType.SCREEN || i.type === _type4.FcrUIWindowType.BOARD;
517
+ var visible = i.isMySelf && !existHasVideoStreamUser || i.hasVideoStream || i.videoSourceType === _agoraEduCore.FcrVideoSourceType.SCREEN || i.type === _type3.FcrUIWindowType.BOARD;
425
518
  if (!visible && i.isPin) {
426
519
  _this2.removePin(i.windowId, (0, _i18n.transI18n)('fmt_internalsetting_other_hide_no_video_pin_cancelled'));
427
520
  }
@@ -450,18 +543,18 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
450
543
  key: "currentShareData",
451
544
  get: function get() {
452
545
  return this.mainList.find(function (item) {
453
- return item.videoSourceType === _type.FcrVideoSourceType.SCREEN || item.type === _type4.FcrUIWindowType.BOARD;
546
+ return item.videoSourceType === _agoraEduCore.FcrVideoSourceType.SCREEN || item.type === _type3.FcrUIWindowType.BOARD;
454
547
  });
455
548
  }
456
549
  }, {
457
550
  key: "galleryList",
458
551
  get: function get() {
459
- return this._videoWindowDataSource.layoutType === _type4.FcrUIVideoWindowLayoutType.Speaker ? this.mainList.slice(0, 1) : this.mainList;
552
+ return this._videoWindowDataSource.layoutType === _type3.FcrUIVideoWindowLayoutType.Speaker ? this.mainList.slice(0, 1) : this.mainList;
460
553
  }
461
554
  }, {
462
555
  key: "carouselList",
463
556
  get: function get() {
464
- return this._videoWindowDataSource.layoutType === _type4.FcrUIVideoWindowLayoutType.Speaker ? this.mainList.slice(1) : this.mainList;
557
+ return this._videoWindowDataSource.layoutType === _type3.FcrUIVideoWindowLayoutType.Speaker ? this.mainList.slice(1) : this.mainList;
465
558
  }
466
559
  }, {
467
560
  key: "hasPinnedStream",
@@ -509,178 +602,58 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
509
602
  return this._securityStore.allowUnmuteSelfVideo();
510
603
  }
511
604
  }, {
512
- key: "_initStream",
513
- value: function _initStream() {
514
- var _this4 = this;
515
- var isSharingScreen = false;
516
- this._streamControl.getStreamList().forEach(function (stream) {
517
- if (stream.videoSourceType === _type2.AgoraRtcVideoSourceType.SCREEN) {
518
- isSharingScreen = true;
519
- }
520
- _this4._handleStreamAdded(stream);
521
- });
522
- if (isSharingScreen && this.layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
523
- this.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
524
- }
605
+ key: "isHostOrCoHost",
606
+ get: function get() {
607
+ return this.localUserRole === _type.FcrUserRole.HOST || this.localUserRole === _type.FcrUserRole.COHOST;
525
608
  }
526
609
  }, {
527
- key: "_isSetSpotlightEnable",
528
- value: function _isSetSpotlightEnable(count, enableSpotlight) {
529
- var setSpotlightEnable = count > LayoutStore.MIN_USERS_TO_ENABLE_SPOTLIGHT;
530
- return setSpotlightEnable && enableSpotlight;
610
+ key: "allowedAllChat",
611
+ get: function get() {
612
+ return this._securityStore.allowedAllChat();
531
613
  }
532
614
  }, {
533
- key: "_addListeners",
534
- value: function _addListeners() {
535
- var _this5 = this;
536
- this._uiEventStore.addObserver({
537
- onEvent: this.onEvent
538
- });
539
- this._streamControl.addObserver({
540
- onStreamsAdded: this._onStreamsAdded,
541
- onStreamsUpdated: this._onStreamsUpdated,
542
- onStreamsRemoved: this._onStreamsRemoved,
543
- onAudioVolumeUpdated: this._onAudioVolumeUpdated
544
- });
545
- this._userControl.addObserver({
546
- onUserInfoUpdated: this.onUserInfoUpdated,
547
- onAllUserCountUpdated: this._onAllUserCountUpdated
548
- });
549
- this._videoWindowDataSource.addObserver({
550
- onLayoutUpdated: this._handleLayoutUpdated,
551
- onFoldListAdded: this._handleFoldListChanged,
552
- onFoldListRemoved: this._handleFoldListChanged,
553
- onFoldListUpdated: this._handleFoldListChanged,
554
- onMainListAdded: this._handleMainListChanged,
555
- onMainListUpdated: this._handleMainListChanged,
556
- onMainListRemoved: this._handleMainListChanged,
557
- onSpotlightAdded: this._handleSpotlightAdded,
558
- onSpotlightRemoved: this._handleSpotlightRemoved
559
- });
560
- this._whiteBoardControl.addObserver({
561
- onBoardActiveInfoUpdated: this.setWhiteboardActive
562
- });
563
- this._chatRoomControl.addobserver(this._chatRoomObserver);
564
- this._subscriptions.push((0, _mobx.reaction)(function () {
565
- return _this5.mainList.length;
566
- }, function (length) {
567
- if (length < 2) {
568
- if (_this5.layout === _type4.FcrUIVideoWindowLayoutType.Speaker) {
569
- _this5.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Gallery);
570
- }
571
- }
572
- _this5._uiEventStore.sendEvent(_constant.UIAction.MAIN_LIST_LENGTH_CHANGED, length);
573
- }), (0, _mobx.reaction)(function () {
574
- return _this5.whiteboardActive;
575
- }, function (opened) {
576
- if (opened) {
577
- var ownerUserId = _this5._whiteBoardControl.getBoardActiveInfo().ownerUserId;
578
- var ownerUser = _this5._userControl.getUser(ownerUserId);
579
- _this5._videoWindowDataSource.addBoard(ownerUser, ownerUserId === _this5.localUserId);
580
- if (_this5.layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
581
- _this5.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
582
- }
583
- } else {
584
- _this5._videoWindowDataSource.removeBoard();
585
- }
586
- }), (0, _mobx.reaction)(function () {
587
- return _this5._securityStore.hasWriteBoardPermission();
588
- }, function (canEdit) {
589
- if (!_this5.mainList.some(function (u) {
590
- return u.type === _type4.FcrUIWindowType.BOARD;
591
- })) return;
592
- _this5._videoWindowDataSource.updateBoard(canEdit);
593
- }), (0, _mobx.reaction)(function () {
594
- return _this5.galleryMaxSize;
595
- }, function (size) {
596
- _this5._uiEventStore.notifyLayoutSizeChanged({
597
- size: size
598
- });
599
- }), (0, _mobx.reaction)(function () {
600
- return _this5.asideContent;
601
- }, function (asideContent) {
602
- if (asideContent.participant || asideContent.chat) {
603
- _this5.toggleAside(true);
604
- }
605
- if (!asideContent.participant && !asideContent.chat) {
606
- _this5.toggleAside(false);
607
- }
608
- }, {
609
- fireImmediately: true
610
- }), (0, _mobx.reaction)(function () {
611
- return {
612
- cameraEnabled: _this5._deviceStore.cameraEnabled,
613
- cameraId: _this5._deviceStore.cameraId
614
- };
615
- }, function (_ref2) {
616
- var cameraEnabled = _ref2.cameraEnabled,
617
- cameraId = _ref2.cameraId;
618
- if (!cameraEnabled && _this5._localView) {
619
- _this5.stopLocalPreview(_this5._localView);
620
- }
621
- if (cameraEnabled && cameraId && _this5._localView) {
622
- _this5.startLocalPreview(_this5._localView);
623
- }
624
- }), (0, _mobx.reaction)(function () {
625
- return _this5.barLocked;
626
- }, function (barLocked) {
627
- if (_this5._barLockTimer && barLocked) {
628
- _this5.resetLockTimer();
629
- } else {
630
- _this5.setHoveringHandler();
631
- }
632
- }), (0, _mobx.reaction)(function () {
633
- return _this5._deviceStore.microphoneVolumeLevel;
634
- }, function (volume) {
635
- (0, _mobx.runInAction)(function () {
636
- _this5.userVolumeMap.set('0', volume);
637
- });
638
- }), (0, _mobx.reaction)(function () {
639
- return {
640
- count: _this5.participantCount,
641
- enableSpotlight: _this5.enableSpotlight
642
- };
643
- }, function (_ref3) {
644
- var count = _ref3.count,
645
- enableSpotlight = _ref3.enableSpotlight;
646
- var enableSetSpotlight = _this5._isSetSpotlightEnable(count, enableSpotlight);
647
- _this5._videoWindowDataSource.setSpotlightEnabled(enableSetSpotlight);
648
- }),
649
- // 录制的特殊逻辑:
650
- // 因为录制机器人不发流,且当前切换布局的逻辑是有多个人的视频窗口才切换到 speaker layout
651
- // 所以当房间只有主持人的时候录制机器人的视角不会切换到 speaker layout,故加上以下逻辑
652
- (0, _mobx.reaction)(function () {
653
- var _this5$currentShareDa;
654
- return (_this5$currentShareDa = _this5.currentShareData) === null || _this5$currentShareDa === void 0 ? void 0 : _this5$currentShareDa.hasScreenSharing;
655
- }, function (hasScreenSharing) {
656
- if (_this5.isRobot) {
657
- if (hasScreenSharing) {
658
- _this5.logger.info('set layout to speaker for robot');
659
- _this5.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
660
- } else {
661
- _this5.logger.info('set layout to gallery for robot');
662
- _this5.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Gallery);
663
- }
664
- }
665
- }, {
666
- fireImmediately: true
667
- }));
615
+ key: "allowedPublicChatAndDisallowedPrivateChat",
616
+ get: function get() {
617
+ return this._securityStore.allowedPublicChatAndDisallowedPrivateChat();
668
618
  }
669
619
  }, {
670
- key: "_handleSpotlightAdded",
671
- value: function _handleSpotlightAdded(streamId) {
672
- this._uiEventStore.notifySpotlightStreamChanged({
673
- type: 'add',
674
- streamId: streamId
675
- });
620
+ key: "disallowedPublicChatAndDisallowedPrivateChatToParticipant",
621
+ get: function get() {
622
+ return this._securityStore.disallowedPublicChatAndDisallowedPrivateChatToParticipant();
676
623
  }
677
624
  }, {
678
- key: "_handleSpotlightRemoved",
679
- value: function _handleSpotlightRemoved(streamId) {
680
- this._uiEventStore.notifySpotlightStreamChanged({
681
- type: 'remove',
682
- streamId: streamId
683
- });
625
+ key: "disallowedAllChat",
626
+ get: function get() {
627
+ return this._securityStore.disallowedAllChat();
628
+ }
629
+ }, {
630
+ key: "privilegeOperator",
631
+ get: function get() {
632
+ return this._securityStore.privilegeOperator;
633
+ }
634
+ }, {
635
+ key: "localUserId",
636
+ get: function get() {
637
+ var _this$_userControl$ge;
638
+ return (_this$_userControl$ge = this._userControl.getLocalUser()) === null || _this$_userControl$ge === void 0 ? void 0 : _this$_userControl$ge.userId;
639
+ }
640
+ }, {
641
+ key: "getWaterMarkContent",
642
+ value: function getWaterMarkContent() {
643
+ return this._securityStore.getWaterMarkContent();
644
+ }
645
+ }, {
646
+ key: "notifyParticipantShowWaitingRoom",
647
+ value: function notifyParticipantShowWaitingRoom() {
648
+ this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_PARTICIPANT_TAB, _constant.RoomType.WAITING_ROOM);
649
+ this._uiEventStore.sendEvent(_constant.UIAction.CHANGE_PARTICIPANT_TAB, _constant.RoomType.WAITING_ROOM);
650
+ this._uiEventStore.sendEvent(_constant.UIAction.COLSE_NOTIFICATION, _eventStore.NotificationContentType.WAITING_ROOM);
651
+ }
652
+ }, {
653
+ key: "setIsWaitingRoomNotify",
654
+ value: function setIsWaitingRoomNotify() {
655
+ this.isWaitingRoomNotify = false;
656
+ this._uiEventStore.sendEvent(_constant.UIAction.COLSE_NOTIFICATION, _eventStore.NotificationContentType.WAITING_ROOM);
684
657
  }
685
658
  }, {
686
659
  key: "hasMutePermission",
@@ -702,8 +675,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
702
675
  value: function toggleMainStream(streamId) {
703
676
  var success = this._videoWindowDataSource.toggleMainStream(streamId);
704
677
  if (success) {
705
- if (this.layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
706
- this.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
678
+ if (this.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
679
+ this.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker, true);
707
680
  }
708
681
  }
709
682
  }
@@ -732,8 +705,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
732
705
  content: (0, _i18n.transI18n)('fmt_settings_tips_screenlocked')
733
706
  }
734
707
  });
735
- if (this.layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
736
- this.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
708
+ if (this.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
709
+ this.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker);
737
710
  }
738
711
  }
739
712
  }
@@ -778,16 +751,11 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
778
751
  key: "setWhiteboardActive",
779
752
  value: function setWhiteboardActive(active) {
780
753
  this.whiteboardActive = active;
781
- }
782
- }, {
783
- key: "_handleFoldListChanged",
784
- value: function _handleFoldListChanged() {
785
- this._uiEventStore.sendEvent(_constant.UIAction.FOLD_LIST_CHANGED, this.foldList);
786
- }
787
- }, {
788
- key: "_handleMainListChanged",
789
- value: function _handleMainListChanged() {
790
- this._uiEventStore.sendEvent(_constant.UIAction.MAIN_LIST_CHANGED, this.mainList);
754
+ if (!active && this.manualLayout) {
755
+ this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_LAYOUT, {
756
+ layout: this.manualLayout
757
+ });
758
+ }
791
759
  }
792
760
  }, {
793
761
  key: "setAsideWidth",
@@ -796,21 +764,6 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
796
764
  !this.aside && this.toggleAside(true);
797
765
  this.asideWidth = val;
798
766
  }
799
- }, {
800
- key: "setDocumentVisibility",
801
- value: function setDocumentVisibility(visible) {
802
- this.documentVisible = visible;
803
- }
804
- }, {
805
- key: "_switchToSpeaker",
806
- value: function _switchToSpeaker() {
807
- this.collapsed = false;
808
- }
809
- }, {
810
- key: "_switchToGallery",
811
- value: function _switchToGallery() {
812
- this.collapsed = true;
813
- }
814
767
  }, {
815
768
  key: "getLocalUserId",
816
769
  value: function getLocalUserId() {
@@ -896,8 +849,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
896
849
  }
897
850
  }, {
898
851
  key: "toggleLayout",
899
- value: function toggleLayout(layout) {
900
- this._videoWindowDataSource.setLayout(layout);
852
+ value: function toggleLayout(layout, manual) {
853
+ this._videoWindowDataSource.setLayout(layout, manual);
901
854
  }
902
855
  }, {
903
856
  key: "toggleCollapsed",
@@ -932,11 +885,6 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
932
885
  value: function toggleLayoutBarHidden() {
933
886
  this.barHidden = !this.barHidden;
934
887
  }
935
- }, {
936
- key: "_setBarHovering",
937
- value: function _setBarHovering(state) {
938
- this.barHovering = state;
939
- }
940
888
  }, {
941
889
  key: "resetLockTimer",
942
890
  value: function resetLockTimer() {
@@ -947,12 +895,12 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
947
895
  }, {
948
896
  key: "setHoveringHandler",
949
897
  value: function setHoveringHandler() {
950
- var _this6 = this;
898
+ var _this4 = this;
951
899
  this._setBarHovering(true);
952
900
  if (!this._barLockTimer && !this.barLocked) {
953
901
  this._barLockTimer = window.setTimeout(function () {
954
- _this6._setBarHovering(false);
955
- _this6.resetLockTimer();
902
+ _this4._setBarHovering(false);
903
+ _this4.resetLockTimer();
956
904
  }, 3000);
957
905
  }
958
906
  }
@@ -969,14 +917,10 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
969
917
  });
970
918
  this._chatRoomControl.removeObserver(this._chatRoomObserver);
971
919
  }
972
- }, {
973
- key: "_onAllUserCountUpdated",
974
- value: function _onAllUserCountUpdated(_roomId, count) {
975
- this.participantCount = count;
976
- }
977
920
  }, {
978
921
  key: "onUserInfoUpdated",
979
922
  value: function onUserInfoUpdated(roomId, event) {
923
+ var _this5 = this;
980
924
  this._videoWindowDataSource.update(event.modifiedUser);
981
925
  this.setLocalUserRole(this._userControl.getLocalUser().userRole);
982
926
  if (this._managerRoleUpdateForToast.has(event.modifiedUser.userRole)) {
@@ -985,11 +929,15 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
985
929
  var toastContent = function toastContent() {
986
930
  var contentText = '';
987
931
  if (event.modifiedUser.userRole === _type.FcrUserRole.HOST) {
988
- contentText = isMe ? (0, _i18n.transI18n)('fmt_attendies_tips_mine_new_host', {
989
- reason1: userName
990
- }) : (0, _i18n.transI18n)('fmt_attendies_tips_new_host', {
991
- reason1: userName
992
- });
932
+ if (_this5._liveStreamState === _type.FcrLiveStreamingState.STARTED) {
933
+ contentText = "\u79FB\u4EA4 \u4E3B\u6301\u4EBA\u5B8C\u6210\uFF0C\u76F4\u64AD\u505C\u6B62\uFF0C\u8BF7\u91CD\u65B0\u5F00\u542F\u76F4\u64AD";
934
+ } else {
935
+ contentText = isMe ? (0, _i18n.transI18n)('fmt_attendies_tips_mine_new_host', {
936
+ reason1: userName
937
+ }) : (0, _i18n.transI18n)('fmt_attendies_tips_new_host', {
938
+ reason1: userName
939
+ });
940
+ }
993
941
  } else if (event.modifiedUser.userRole === _type.FcrUserRole.COHOST) {
994
942
  contentText = isMe ? (0, _i18n.transI18n)('fmt_attendies_tips_mine_new_co_host') : (0, _i18n.transI18n)('fmt_attendies_tips_new_co_host', {
995
943
  reason1: userName
@@ -1008,50 +956,93 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1008
956
  value: function setLocalUserRole(role) {
1009
957
  this.localUserRole = role;
1010
958
  }
959
+ }, {
960
+ key: "stopLocalPreview",
961
+ value: function stopLocalPreview(view) {
962
+ this._deviceStore.stopPlayLocalVideo(view);
963
+ }
964
+ }, {
965
+ key: "startLocalPreview",
966
+ value: function startLocalPreview(div) {
967
+ if (div) {
968
+ this._deviceStore.startPlayLocalVideo(div);
969
+ }
970
+ }
971
+ }, {
972
+ key: "setAllowChatWithPayload",
973
+ value: function setAllowChatWithPayload(type) {
974
+ switch (type) {
975
+ case 'public':
976
+ this._securityStore.setAllowedPublicChatAndDisallowedPrivateChat();
977
+ break;
978
+ case 'private_to_manager':
979
+ this._securityStore.setDisallowedPublicChatAndDisallowedPrivateChatToParticipant();
980
+ break;
981
+ }
982
+ }
983
+ }, {
984
+ key: "muteAudio",
985
+ value: function muteAudio(mute, userId) {
986
+ this._uiEventStore.sendEvent(_constant.UIAction.PARTICIPANT_ACTION, {
987
+ action: mute ? _attendee.ParticipantActionType.MUTE_AUDIO : _attendee.ParticipantActionType.UNMUTE_AUDIO,
988
+ userId: userId
989
+ });
990
+ }
991
+ }, {
992
+ key: "sendParticipantEvent",
993
+ value: function sendParticipantEvent(payload) {
994
+ this._uiEventStore.sendEvent(_constant.UIAction.PARTICIPANT_ACTION, payload);
995
+ }
1011
996
  }, {
1012
997
  key: "onEvent",
1013
- value: function onEvent(action, payload) {
998
+ value:
999
+ // onEvent(
1000
+ // action: UIAction.WHITEBOARD_CHANGED,
1001
+ // payload: { action: WhiteboardControlbarEvents; payload: boolean },
1002
+ // ): void;
1003
+ function onEvent(action, payload) {
1014
1004
  if (action === _constant.UIAction.UPDATE_ASIDE) {
1015
- var _ref4 = payload,
1016
- participant = _ref4.participant,
1017
- chat = _ref4.chat;
1005
+ var _ref2 = payload,
1006
+ participant = _ref2.participant,
1007
+ chat = _ref2.chat;
1018
1008
  // this._uiEventStore.sendEvent(UIAction.ASIDE_WIDTH_CHANGED, this.asideWidth);
1019
1009
  this.updateAsideContent(participant, chat);
1020
1010
  }
1021
1011
  if (action === _constant.UIAction.TOGGLE_LAYOUT) {
1022
- var _ref5 = payload,
1023
- layout = _ref5.layout;
1024
- this.toggleLayout(layout);
1012
+ var _ref3 = payload,
1013
+ layout = _ref3.layout,
1014
+ manual = _ref3.manual;
1015
+ this.toggleLayout(layout, manual);
1025
1016
  }
1026
1017
  if (action === _constant.UIAction.TOGGLE_LAYOUT_SIZE) {
1027
- var _ref6 = payload,
1028
- size = _ref6.size;
1018
+ var _ref4 = payload,
1019
+ size = _ref4.size;
1029
1020
  this.setGalleryMaxSize(size);
1030
1021
  }
1031
1022
  if (action === _constant.UIAction.SET_MAIN_SPEAKER) {
1032
- var _ref7 = payload,
1033
- userId = _ref7.userId;
1023
+ var _ref5 = payload,
1024
+ userId = _ref5.userId;
1034
1025
  }
1035
1026
  if (action === _constant.UIAction.SET_USER_PIN_STATE) {
1036
- var _ref8 = payload,
1037
- _userId = _ref8.userId;
1027
+ var _ref6 = payload,
1028
+ _userId = _ref6.userId;
1038
1029
  this.handleSetPinState(_userId);
1039
1030
  }
1040
1031
  if (action === _constant.UIAction.TOGGLE_LAYOUT_BAR_LOCK) {
1041
1032
  this.toggleLayoutBarLock(payload);
1042
1033
  }
1043
1034
  if (action === _constant.UIAction.VIDEO_WINDOW_BOUNDS) {
1044
- var _ref9 = payload,
1045
- videoWindowPreviewType = _ref9.videoWindowPreviewType;
1035
+ var _ref7 = payload,
1036
+ videoWindowPreviewType = _ref7.videoWindowPreviewType;
1046
1037
  this.videoWindowPreviewType = videoWindowPreviewType;
1047
1038
  }
1048
1039
  if (action === _constant.UIAction.TOGGLE_LAYOUT_ACTIONBAR_HIDDEN) {
1049
1040
  this.toggleLayoutBarHidden();
1050
1041
  }
1051
1042
  if (action === _constant.UIAction.VIDEO_WINDOW_PIN_ACTION) {
1052
- var _ref10 = payload,
1053
- _action = _ref10.action,
1054
- streamId = _ref10.streamId;
1043
+ var _ref8 = payload,
1044
+ _action = _ref8.action,
1045
+ streamId = _ref8.streamId;
1055
1046
  if (_action === _constant.VideoWindowPinType.REMOVE_PIN) {
1056
1047
  this.removePin(streamId);
1057
1048
  } else if (_action === _constant.VideoWindowPinType.ADD_PIN) {
@@ -1059,9 +1050,9 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1059
1050
  }
1060
1051
  }
1061
1052
  if (action === _constant.UIAction.SPOTLIGHT_STREAM_CHANGED) {
1062
- var _ref11 = payload,
1063
- type = _ref11.type,
1064
- _streamId = _ref11.streamId;
1053
+ var _ref9 = payload,
1054
+ type = _ref9.type,
1055
+ _streamId = _ref9.streamId;
1065
1056
  if (type === 'add') {
1066
1057
  this.spotlightStreamId = _streamId;
1067
1058
  } else {
@@ -1069,9 +1060,9 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1069
1060
  }
1070
1061
  }
1071
1062
  if (action === _constant.UIAction.CUSTOM_SETTINGS_CHANGED) {
1072
- var _ref12 = payload,
1073
- spotlightEnabled = _ref12.spotlightEnabled,
1074
- shouldHideNonVideoParticipants = _ref12.shouldHideNonVideoParticipants;
1063
+ var _ref10 = payload,
1064
+ spotlightEnabled = _ref10.spotlightEnabled,
1065
+ shouldHideNonVideoParticipants = _ref10.shouldHideNonVideoParticipants;
1075
1066
  this.shouldHideNonVideoParticipants = shouldHideNonVideoParticipants;
1076
1067
  this.enableSpotlight = spotlightEnabled;
1077
1068
  if (shouldHideNonVideoParticipants) {
@@ -1082,10 +1073,10 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1082
1073
  }
1083
1074
  }
1084
1075
  if (action === _constant.UIAction.WHITEBOARD_CHANGED) {
1085
- var _ref13 = payload,
1086
- changeAction = _ref13.action,
1087
- isLoneyWindow = _ref13.payload;
1088
- if (changeAction === _type5.WhiteboardControlbarEvents.LONEYWINDOW) {
1076
+ var _ref11 = payload,
1077
+ changeAction = _ref11.action,
1078
+ isLoneyWindow = _ref11.payload;
1079
+ if (changeAction === _type4.WhiteboardControlbarEvents.LONEYWINDOW) {
1089
1080
  if (isLoneyWindow) {
1090
1081
  this._videoWindowDataSource.removeBoard();
1091
1082
  } else {
@@ -1094,85 +1085,228 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1094
1085
  this._videoWindowDataSource.addBoard(ownerUser, ownerUserId === this.localUserId, this._securityStore.hasWriteBoardPermission());
1095
1086
  }
1096
1087
  }
1097
- if (changeAction === _type5.WhiteboardBaseEvents.SET_OWNER_USER_ID) {
1098
- var _ref14 = payload,
1099
- _ownerUserId = _ref14.payload;
1100
- this.ownerUser = _ownerUserId ? this._userControl.getUser(_ownerUserId) : null;
1088
+ if (changeAction === _type4.WhiteboardBaseEvents.SET_OWNER_USER_ID) {
1089
+ var _ref12 = payload,
1090
+ _ownerUserId = _ref12.payload;
1091
+ this.ownerUser = _ownerUserId ? this._userControl.getUser(_ownerUserId) : undefined;
1101
1092
  }
1102
1093
  }
1094
+ if (action === _constant.UIAction.WAITING_ROOM_CREATED) {
1095
+ var room = payload.room;
1096
+ this._waitingRoomControl = room;
1097
+ this._waitingRoomControl.addObserver(this._waitingRoomObserver);
1098
+ this._waitingRoomUserControl = room.getUserControl();
1099
+ this._waitingRoomUserControl.addObserver(this._waitingRoomUserObserver);
1100
+ }
1103
1101
  }
1104
1102
  }, {
1105
- key: "stopLocalPreview",
1106
- value: function stopLocalPreview(view) {
1107
- this._deviceStore.stopPlayLocalVideo(view);
1108
- }
1109
- }, {
1110
- key: "startLocalPreview",
1111
- value: function startLocalPreview(div) {
1112
- if (div) {
1113
- this._deviceStore.startPlayLocalVideo(div);
1114
- }
1103
+ key: "_addListeners",
1104
+ value: function _addListeners() {
1105
+ var _this6 = this;
1106
+ this._uiEventStore.addObserver({
1107
+ onEvent: this.onEvent
1108
+ });
1109
+ this._streamControl.addObserver({
1110
+ onStreamsAdded: this._onStreamsAdded,
1111
+ onStreamsUpdated: this._onStreamsUpdated,
1112
+ onStreamsRemoved: this._onStreamsRemoved,
1113
+ onStreamVolumeIndicationUpdated: this._onAudioVolumeUpdated
1114
+ });
1115
+ this._userControl.addObserver({
1116
+ onUserInfoUpdated: this.onUserInfoUpdated,
1117
+ onAllUserCountUpdated: this._onAllUserCountUpdated
1118
+ });
1119
+ this._videoWindowDataSource.addObserver({
1120
+ onLayoutUpdated: this._handleLayoutUpdated,
1121
+ onFoldListAdded: this._handleFoldListChanged,
1122
+ onFoldListRemoved: this._handleFoldListChanged,
1123
+ onFoldListUpdated: this._handleFoldListChanged,
1124
+ onMainListAdded: this._handleMainListChanged,
1125
+ onMainListUpdated: this._handleMainListChanged,
1126
+ onMainListRemoved: this._handleMainListChanged,
1127
+ onSpotlightAdded: this._handleSpotlightAdded,
1128
+ onSpotlightRemoved: this._handleSpotlightRemoved
1129
+ });
1130
+ this._whiteBoardControl.addObserver({
1131
+ onActive: function onActive() {
1132
+ return _this6.setWhiteboardActive(true);
1133
+ },
1134
+ onInactive: function onInactive() {
1135
+ return _this6.setWhiteboardActive(false);
1136
+ }
1137
+ });
1138
+ this._chatRoomControl.addObserver(this._chatRoomObserver);
1139
+ this._subscriptions.push((0, _mobx.reaction)(function () {
1140
+ return _this6.mainList.length;
1141
+ }, function (length) {
1142
+ if (length < 2) {
1143
+ if (_this6.layout === _type3.FcrUIVideoWindowLayoutType.Speaker) {
1144
+ _this6.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Gallery);
1145
+ }
1146
+ }
1147
+ _this6._uiEventStore.sendEvent(_constant.UIAction.MAIN_LIST_LENGTH_CHANGED, length);
1148
+ }), (0, _mobx.reaction)(function () {
1149
+ return _this6.whiteboardActive;
1150
+ }, function (opened) {
1151
+ if (opened) {
1152
+ var ownerUserId = _this6._whiteBoardControl.getBoardActiveInfo().ownerUserId;
1153
+ var ownerUser = _this6._userControl.getUser(ownerUserId);
1154
+ _this6._videoWindowDataSource.addBoard(ownerUser, ownerUserId === _this6.localUserId);
1155
+ if (_this6.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
1156
+ _this6.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker);
1157
+ }
1158
+ } else {
1159
+ _this6._videoWindowDataSource.removeBoard();
1160
+ }
1161
+ }), (0, _mobx.reaction)(function () {
1162
+ return _this6._securityStore.hasWriteBoardPermission();
1163
+ }, function (canEdit) {
1164
+ if (!_this6.mainList.some(function (u) {
1165
+ return u.type === _type3.FcrUIWindowType.BOARD;
1166
+ })) return;
1167
+ _this6._videoWindowDataSource.updateBoard(canEdit);
1168
+ }), (0, _mobx.reaction)(function () {
1169
+ return _this6.galleryMaxSize;
1170
+ }, function (size) {
1171
+ _this6._uiEventStore.notifyLayoutSizeChanged({
1172
+ size: size
1173
+ });
1174
+ }), (0, _mobx.reaction)(function () {
1175
+ return _this6.asideContent;
1176
+ }, function (asideContent) {
1177
+ if (asideContent.participant || asideContent.chat) {
1178
+ _this6.toggleAside(true);
1179
+ }
1180
+ if (!asideContent.participant && !asideContent.chat) {
1181
+ _this6.toggleAside(false);
1182
+ }
1183
+ }, {
1184
+ fireImmediately: true
1185
+ }), (0, _mobx.reaction)(function () {
1186
+ return {
1187
+ cameraEnabled: _this6._deviceStore.cameraEnabled,
1188
+ cameraId: _this6._deviceStore.cameraId
1189
+ };
1190
+ }, function (_ref13) {
1191
+ var cameraEnabled = _ref13.cameraEnabled,
1192
+ cameraId = _ref13.cameraId;
1193
+ if (!cameraEnabled && _this6._localView) {
1194
+ _this6.stopLocalPreview(_this6._localView);
1195
+ }
1196
+ if (cameraEnabled && cameraId && _this6._localView) {
1197
+ _this6.startLocalPreview(_this6._localView);
1198
+ }
1199
+ }), (0, _mobx.reaction)(function () {
1200
+ return _this6.barLocked;
1201
+ }, function (barLocked) {
1202
+ if (_this6._barLockTimer && barLocked) {
1203
+ _this6.resetLockTimer();
1204
+ } else {
1205
+ _this6.setHoveringHandler();
1206
+ }
1207
+ }), (0, _mobx.reaction)(function () {
1208
+ return _this6._deviceStore.microphoneVolumeLevel;
1209
+ }, function (volume) {
1210
+ (0, _mobx.runInAction)(function () {
1211
+ _this6.userVolumeMap.set('0', volume);
1212
+ });
1213
+ }), (0, _mobx.reaction)(function () {
1214
+ return {
1215
+ count: _this6.participantCount,
1216
+ enableSpotlight: _this6.enableSpotlight
1217
+ };
1218
+ }, function (_ref14) {
1219
+ var count = _ref14.count,
1220
+ enableSpotlight = _ref14.enableSpotlight;
1221
+ var enableSetSpotlight = _this6._isSetSpotlightEnable(count, enableSpotlight);
1222
+ _this6._videoWindowDataSource.setSpotlightEnabled(enableSetSpotlight);
1223
+ }),
1224
+ // 录制的特殊逻辑:
1225
+ // 因为录制机器人不发流,且当前切换布局的逻辑是有多个人的视频窗口才切换到 speaker layout
1226
+ // 所以当房间只有主持人的时候录制机器人的视角不会切换到 speaker layout,故加上以下逻辑
1227
+ (0, _mobx.reaction)(function () {
1228
+ var _this6$currentShareDa;
1229
+ return (_this6$currentShareDa = _this6.currentShareData) === null || _this6$currentShareDa === void 0 ? void 0 : _this6$currentShareDa.hasScreenSharing;
1230
+ }, function (hasScreenSharing) {
1231
+ if (_this6.isRobot) {
1232
+ if (hasScreenSharing) {
1233
+ _this6.logger.info('set layout to speaker for robot');
1234
+ _this6.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker);
1235
+ } else {
1236
+ _this6.logger.info('set layout to gallery for robot');
1237
+ _this6.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Gallery);
1238
+ }
1239
+ }
1240
+ }, {
1241
+ fireImmediately: true
1242
+ }));
1115
1243
  }
1116
1244
  }, {
1117
- key: "isHostOrCoHost",
1118
- get: function get() {
1119
- return this.localUserRole === _type.FcrUserRole.HOST || this.localUserRole === _type.FcrUserRole.COHOST;
1245
+ key: "_handleFoldListChanged",
1246
+ value: function _handleFoldListChanged() {
1247
+ this._uiEventStore.sendEvent(_constant.UIAction.FOLD_LIST_CHANGED, this.foldList);
1120
1248
  }
1121
1249
  }, {
1122
- key: "setAllowChatWithPayload",
1123
- value: function setAllowChatWithPayload(type) {
1124
- switch (type) {
1125
- case 'public':
1126
- this._securityStore.setAllowedPublicChatAndDisallowedPrivateChat();
1127
- break;
1128
- case 'private_to_manager':
1129
- this._securityStore.setDisallowedPublicChatAndDisallowedPrivateChatToParticipant();
1130
- break;
1131
- }
1250
+ key: "_handleMainListChanged",
1251
+ value: function _handleMainListChanged() {
1252
+ this._uiEventStore.sendEvent(_constant.UIAction.MAIN_LIST_CHANGED, this.mainList);
1132
1253
  }
1133
1254
  }, {
1134
- key: "allowedAllChat",
1135
- get: function get() {
1136
- return this._securityStore.allowedAllChat();
1255
+ key: "_switchToSpeaker",
1256
+ value: function _switchToSpeaker() {
1257
+ this.collapsed = false;
1137
1258
  }
1138
1259
  }, {
1139
- key: "allowedPublicChatAndDisallowedPrivateChat",
1140
- get: function get() {
1141
- return this._securityStore.allowedPublicChatAndDisallowedPrivateChat();
1260
+ key: "_switchToGallery",
1261
+ value: function _switchToGallery() {
1262
+ this.collapsed = true;
1142
1263
  }
1143
1264
  }, {
1144
- key: "disallowedPublicChatAndDisallowedPrivateChatToParticipant",
1145
- get: function get() {
1146
- return this._securityStore.disallowedPublicChatAndDisallowedPrivateChatToParticipant();
1265
+ key: "_setBarHovering",
1266
+ value: function _setBarHovering(state) {
1267
+ this.barHovering = state;
1147
1268
  }
1148
1269
  }, {
1149
- key: "disallowedAllChat",
1150
- get: function get() {
1151
- return this._securityStore.disallowedAllChat();
1270
+ key: "_onAllUserCountUpdated",
1271
+ value: function _onAllUserCountUpdated(_roomId, count) {
1272
+ this.participantCount = count;
1152
1273
  }
1153
1274
  }, {
1154
- key: "muteAudio",
1155
- value: function muteAudio(mute, userId) {
1156
- this._uiEventStore.sendEvent(_constant.UIAction.PARTICIPANT_ACTION, {
1157
- action: mute ? _constant.ParticipantType.MUTE_AUDIO : _constant.ParticipantType.UNMUTE_AUDIO,
1158
- userId: userId
1275
+ key: "_initStream",
1276
+ value: function _initStream() {
1277
+ var _this7 = this;
1278
+ var isSharingScreen = false;
1279
+ this._streamControl.getStreamList().forEach(function (stream) {
1280
+ if (stream.videoSourceType === _agoraEduCore.FcrVideoSourceType.SCREEN) {
1281
+ isSharingScreen = true;
1282
+ }
1283
+ _this7._handleStreamAdded(stream);
1159
1284
  });
1285
+ if (isSharingScreen && this.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
1286
+ this.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker);
1287
+ }
1160
1288
  }
1161
1289
  }, {
1162
- key: "sendParticipantEvent",
1163
- value: function sendParticipantEvent(payload) {
1164
- this._uiEventStore.sendEvent(_constant.UIAction.PARTICIPANT_ACTION, payload);
1290
+ key: "_isSetSpotlightEnable",
1291
+ value: function _isSetSpotlightEnable(count, enableSpotlight) {
1292
+ var setSpotlightEnable = count > LayoutStore.MIN_USERS_TO_ENABLE_SPOTLIGHT;
1293
+ return setSpotlightEnable && enableSpotlight;
1165
1294
  }
1166
1295
  }, {
1167
- key: "privilegeOperator",
1168
- get: function get() {
1169
- return this._securityStore.privilegeOperator;
1296
+ key: "_handleSpotlightAdded",
1297
+ value: function _handleSpotlightAdded(streamId) {
1298
+ this._uiEventStore.notifySpotlightStreamChanged({
1299
+ type: 'add',
1300
+ streamId: streamId
1301
+ });
1170
1302
  }
1171
1303
  }, {
1172
- key: "localUserId",
1173
- get: function get() {
1174
- var _this$_userControl$ge;
1175
- return (_this$_userControl$ge = this._userControl.getLocalUser()) === null || _this$_userControl$ge === void 0 ? void 0 : _this$_userControl$ge.userId;
1304
+ key: "_handleSpotlightRemoved",
1305
+ value: function _handleSpotlightRemoved(streamId) {
1306
+ this._uiEventStore.notifySpotlightStreamChanged({
1307
+ type: 'remove',
1308
+ streamId: streamId
1309
+ });
1176
1310
  }
1177
1311
  }, {
1178
1312
  key: "_handleConnectionUpdated",
@@ -1182,9 +1316,9 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1182
1316
  }, {
1183
1317
  key: "_handleStreamAdded",
1184
1318
  value: function _handleStreamAdded(modifiedStream) {
1185
- if (modifiedStream.videoSourceType === _type2.AgoraRtcVideoSourceType.SCREEN) {
1186
- if (this.layout === _type4.FcrUIVideoWindowLayoutType.Gallery) {
1187
- this.toggleLayout(_type4.FcrUIVideoWindowLayoutType.Speaker);
1319
+ if (modifiedStream.videoSourceType === _agoraEduCore.FcrVideoSourceType.SCREEN) {
1320
+ if (this.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
1321
+ this.toggleLayout(_type3.FcrUIVideoWindowLayoutType.Speaker);
1188
1322
  }
1189
1323
  }
1190
1324
  this._videoWindowDataSource.add(modifiedStream, modifiedStream.owner.userId === this.getLocalUserId());
@@ -1192,29 +1326,38 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1192
1326
  }, {
1193
1327
  key: "_onStreamsAdded",
1194
1328
  value: function _onStreamsAdded(roomId, events) {
1195
- var _this7 = this;
1329
+ var _this8 = this;
1196
1330
  events.forEach(function (_ref15) {
1197
1331
  var modifiedStream = _ref15.modifiedStream;
1198
- _this7._handleStreamAdded(modifiedStream);
1332
+ _this8._handleStreamAdded(modifiedStream);
1199
1333
  });
1200
1334
  }
1201
1335
  }, {
1202
1336
  key: "_onStreamsUpdated",
1203
1337
  value: function _onStreamsUpdated(roomId, events) {
1204
- var _this8 = this;
1338
+ var _this9 = this;
1205
1339
  events.forEach(function (_ref16) {
1206
1340
  var modifiedStream = _ref16.modifiedStream;
1207
- _this8._videoWindowDataSource.update(modifiedStream);
1341
+ _this9._videoWindowDataSource.update(modifiedStream);
1208
1342
  });
1209
1343
  }
1210
1344
  }, {
1211
1345
  key: "_onStreamsRemoved",
1212
1346
  value: function _onStreamsRemoved(roomId, events) {
1213
- var _this9 = this;
1347
+ var _this10 = this;
1214
1348
  events.forEach(function (_ref17) {
1215
1349
  var modifiedStream = _ref17.modifiedStream;
1216
- _this9._videoWindowDataSource["delete"](modifiedStream);
1350
+ _this10._videoWindowDataSource["delete"](modifiedStream);
1217
1351
  });
1352
+ var hasScreenStream = events === null || events === void 0 ? void 0 : events.find(function (event) {
1353
+ var type = event.modifiedStream.streamType;
1354
+ return type === _type6.AgoraRteMediaStreamType.BOTH || type === _type6.AgoraRteMediaStreamType.VIDEO;
1355
+ });
1356
+ if (hasScreenStream && this.manualLayout) {
1357
+ this._uiEventStore.sendEvent(_constant.UIAction.TOGGLE_LAYOUT, {
1358
+ layout: this.manualLayout
1359
+ });
1360
+ }
1218
1361
  }
1219
1362
  }, {
1220
1363
  key: "_onAudioVolumeUpdated",
@@ -1225,14 +1368,14 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1225
1368
  }, {
1226
1369
  key: "_findSpotlightStream",
1227
1370
  value: function _findSpotlightStream() {
1228
- var _this10 = this;
1371
+ var _this11 = this;
1229
1372
  //find the max volume stream
1230
1373
  var res = {
1231
1374
  streamId: '',
1232
1375
  volume: 0
1233
1376
  };
1234
1377
  this.userVolumeMap.forEach(function (volume, id) {
1235
- var windowData = _this10.mainListMapByAudioStreamId.get(id);
1378
+ var windowData = _this11.mainListMapByAudioStreamId.get(id);
1236
1379
  if (id !== '0' && !res.streamId && volume > 0 && windowData !== null && windowData !== void 0 && windowData.hasMicrophoneAudioStream) {
1237
1380
  res = {
1238
1381
  streamId: windowData.windowId,
@@ -1242,10 +1385,42 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
1242
1385
  });
1243
1386
  return res;
1244
1387
  }
1388
+ }, {
1389
+ key: "_handleRemoteWaitingUserLeft",
1390
+ value: function _handleRemoteWaitingUserLeft(roomId, events) {
1391
+ var _this$_privilegeContr;
1392
+ var targetRoles = (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(_type7.FcrSecurityAction.WaitingRoom).info) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.targetRoles;
1393
+ if (this._waitingRoomUserControl) {
1394
+ var users = this._waitingRoomUserControl.getUsers();
1395
+ var userCount = Object.entries(users).map(function (_ref18) {
1396
+ var _ref19 = (0, _slicedToArray2["default"])(_ref18, 2),
1397
+ userId = _ref19[0],
1398
+ user = _ref19[1];
1399
+ return user;
1400
+ }).filter(function (user) {
1401
+ return targetRoles.includes(user.userRole);
1402
+ }).length;
1403
+ if (userCount === 0) {
1404
+ this._uiEventStore.sendEvent(_constant.UIAction.COLSE_NOTIFICATION, _eventStore.NotificationContentType.WAITING_ROOM);
1405
+ }
1406
+ }
1407
+ }
1408
+ }, {
1409
+ key: "_handleMessageReceived",
1410
+ value: function _handleMessageReceived(roomId, message) {
1411
+ if ((0, _get["default"])(message, 'payload.data.messageKey') === _type.RoomMessageKey.USER_WAITING_ROOM_JOINED && this.isWaitingRoomNotify) {
1412
+ this._uiEventStore.showNotification({
1413
+ type: _eventStore.NotificationContentType.WAITING_ROOM,
1414
+ onOk: this.notifyParticipantShowWaitingRoom,
1415
+ onClose: this.setIsWaitingRoomNotify,
1416
+ placement: 'topLeft'
1417
+ });
1418
+ }
1419
+ }
1245
1420
  }]);
1246
1421
  }();
1247
1422
  _LayoutStore = LayoutStore;
1248
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStore, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "galleryMaxSize"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "asideContent"], [_mobx.observable, 1, "localUserRole"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.observable, 1, "userVolumeMap"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "videoWindowPreviewType"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "spotlightStreamId"], [_mobx.observable, 1, "shouldHideNonVideoParticipants"], [_mobx.observable, 1, "participantCount"], [_mobx.observable, 1, "ownerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "documentVisible"], [_mobx.observable, 1, "enableSpotlight"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "mainListMapByAudioStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isManager"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "microphoneEnabled"], [_decorator.bound, 2, "_initStream"], [_decorator.bound, 2, "_isSetSpotlightEnable"], [_decorator.bound, 2, "_addListeners"], [_decorator.bound, 2, "_handleSpotlightAdded"], [_decorator.bound, 2, "_handleSpotlightRemoved"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_handleFoldListChangedDecs, 18, "_handleFoldListChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_setDocumentVisibilityDecs, 18, "setDocumentVisibility"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_updateSlotsDecs, 18, "updateSlots"], [_updateAsideContentDecs, 18, "updateAsideContent"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_getAllowedOperationsDecs, 18, "getAllowedOperations"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_setGalleryMaxSizeDecs, 18, "setGalleryMaxSize"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_onAllUserCountUpdatedDecs, 18, "_onAllUserCountUpdated"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_mobx.action, 2, "setLocalUserRole"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_mobx.computed, 3, "isHostOrCoHost"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "sendParticipantEvent"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_onAudioVolumeUpdatedDecs, 18, "_onAudioVolumeUpdated"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 29);
1423
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_LayoutStore, [[_participantDecs, 17, "participant"], [_chatDecs, 17, "chat"], [_chatActionDecs, 17, "chatAction"], [_stateBarDecs, 17, "stateBar"], [_actionBarDecs, 17, "actionBar"], [_layersDecs, 17, "layers"], [_whiteboardDecs, 17, "whiteboard"], [_mobx.observable, 1, "collapsed"], [_mobx.observable, 1, "galleryMaxSize"], [_mobx.observable, 1, "aside"], [_mobx.observable, 1, "asideContent"], [_mobx.observable, 1, "localUserRole"], [_mobx.observable, 1, "barHovering"], [_mobx.observable, 1, "barLocked"], [_mobx.observable, 1, "barHidden"], [_mobx.observable, 1, "asideWidth"], [_mobx.observable, 1, "userVolumeMap"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "videoWindowPreviewType"], [_mobx.observable, 1, "whiteboardActive"], [_mobx.observable, 1, "spotlightStreamId"], [_mobx.observable, 1, "shouldHideNonVideoParticipants"], [_mobx.observable, 1, "participantCount"], [_mobx.observable, 1, "ownerUser"], [_mobx.observable, 1, "localUser"], [_mobx.observable, 1, "enableSpotlight"], [_mobx.observable, 1, "isWaitingRoomNotify"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "layout"], [_mobx.computed, 3, "manualLayout"], [_mobx.computed, 3, "mainList"], [_mobx.computed, 3, "mainListMapByAudioStreamId"], [_mobx.computed, 3, "foldList"], [_mobx.computed, 3, "galleryList"], [_mobx.computed, 3, "carouselList"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "isManager"], [_mobx.computed, 3, "isRobot"], [_mobx.computed, 3, "findSpotlightUser"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "isHostOrCoHost"], [_decorator.bound, 2, "getWaterMarkContent"], [_notifyParticipantShowWaitingRoomDecs, 18, "notifyParticipantShowWaitingRoom"], [_setIsWaitingRoomNotifyDecs, 18, "setIsWaitingRoomNotify"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_decorator.bound, 2, "toggleMainStream"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "setVideoOrientation"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "handleSetPinState"], [_setWhiteboardActiveDecs, 18, "setWhiteboardActive"], [_setAsideWidthDecs, 18, "setAsideWidth"], [_updateSlotsDecs, 18, "updateSlots"], [_updateAsideContentDecs, 18, "updateAsideContent"], [_decorator.bound, 2, "closeParticipantFromAside"], [_decorator.bound, 2, "moveParticipantFromAsideToDialog"], [_decorator.bound, 2, "closeChatFromAside"], [_decorator.bound, 2, "closeAsideChat"], [_decorator.bound, 2, "moveChatFromAsideToDialog"], [_decorator.bound, 2, "openPrivateChat"], [_getAllowedOperationsDecs, 18, "getAllowedOperations"], [_toggleLayoutDecs, 18, "toggleLayout"], [_toggleCollapsedDecs, 18, "toggleCollapsed"], [_setGalleryMaxSizeDecs, 18, "setGalleryMaxSize"], [_toggleAsideDecs, 18, "toggleAside"], [_asideWidthChangedDecs, 18, "asideWidthChanged"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_toggleLayoutBarHiddenDecs, 18, "toggleLayoutBarHidden"], [_resetLockTimerDecs, 18, "resetLockTimer"], [_setHoveringHandlerDecs, 18, "setHoveringHandler"], [_setHoveringLeaveHandlerDecs, 18, "setHoveringLeaveHandler"], [_onUserInfoUpdatedDecs, 18, "onUserInfoUpdated"], [_mobx.action, 2, "setLocalUserRole"], [_decorator.bound, 2, "stopLocalPreview"], [_decorator.bound, 2, "startLocalPreview"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_decorator.bound, 2, "muteAudio"], [_decorator.bound, 2, "sendParticipantEvent"], [_decorator.bound, 2, "onEvent"], [_decorator.bound, 2, "_addListeners"], [_handleFoldListChangedDecs, 18, "_handleFoldListChanged"], [_handleMainListChangedDecs, 18, "_handleMainListChanged"], [_mobx.action, 2, "_switchToSpeaker"], [_mobx.action, 2, "_switchToGallery"], [_setBarHoveringDecs, 18, "_setBarHovering"], [_onAllUserCountUpdatedDecs, 18, "_onAllUserCountUpdated"], [_decorator.bound, 2, "_initStream"], [_decorator.bound, 2, "_isSetSpotlightEnable"], [_decorator.bound, 2, "_handleSpotlightAdded"], [_decorator.bound, 2, "_handleSpotlightRemoved"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_decorator.bound, 2, "_handleStreamAdded"], [_decorator.bound, 2, "_onStreamsAdded"], [_decorator.bound, 2, "_onStreamsUpdated"], [_decorator.bound, 2, "_onStreamsRemoved"], [_onAudioVolumeUpdatedDecs, 18, "_onAudioVolumeUpdated"], [_decorator.bound, 2, "_handleRemoteWaitingUserLeft"], [_decorator.bound, 2, "_handleMessageReceived"], [_handleLayoutUpdatedDecs, 16, "_handleLayoutUpdated"]], []).e, 29);
1249
1424
  _init_participant = _applyDecs$e[0];
1250
1425
  _init_chat = _applyDecs$e[1];
1251
1426
  _init_chatAction = _applyDecs$e[2];
@@ -1271,8 +1446,8 @@ _init_shouldHideNonVideoParticipants = _applyDecs$e[21];
1271
1446
  _init_participantCount = _applyDecs$e[22];
1272
1447
  _init_ownerUser = _applyDecs$e[23];
1273
1448
  _init_localUser = _applyDecs$e[24];
1274
- _init_documentVisible = _applyDecs$e[25];
1275
- _init_enableSpotlight = _applyDecs$e[26];
1449
+ _init_enableSpotlight = _applyDecs$e[25];
1450
+ _init_isWaitingRoomNotify = _applyDecs$e[26];
1276
1451
  _init__handleLayoutUpdated = _applyDecs$e[27];
1277
1452
  _initProto = _applyDecs$e[28];
1278
1453
  (0, _defineProperty2["default"])(LayoutStore, "MIN_USERS_TO_ENABLE_SPOTLIGHT", 2);