fcr-ui-scene 3.7.4 → 3.7.6

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 (870) hide show
  1. package/installer/icons/icon.png +0 -0
  2. package/installer/mac/entitlements.mac.plist +5 -1
  3. package/lib/assets/mic-loading.gif +0 -0
  4. package/lib/base.d.ts +15 -6
  5. package/lib/base.js +139 -107
  6. package/lib/{creator.d.ts → creator/index.d.ts} +16 -12
  7. package/lib/{creator.js → creator/index.js} +281 -210
  8. package/lib/creator/provider-initializer.browser.d.ts +14 -0
  9. package/lib/creator/provider-initializer.browser.js +303 -0
  10. package/lib/creator/provider-initializer.electron.d.ts +14 -0
  11. package/lib/creator/provider-initializer.electron.js +343 -0
  12. package/lib/creator/type.d.ts +15 -0
  13. package/lib/electron/app.js +84 -48
  14. package/lib/electron/bootstrap-sdk.js +138 -15
  15. package/lib/electron/event-manager.d.ts +88 -0
  16. package/lib/electron/event-manager.js +242 -0
  17. package/lib/electron/injections.d.ts +14 -32
  18. package/lib/electron/injections.js +207 -326
  19. package/lib/electron/ipc/type.d.ts +2 -0
  20. package/lib/electron/ipc/type.js +2 -0
  21. package/lib/electron/ipc-protocol.d.ts +91 -0
  22. package/lib/electron/ipc-protocol.js +61 -0
  23. package/lib/electron/main.js +64 -86
  24. package/lib/electron/preload.d.ts +1 -1
  25. package/lib/electron/preload.js +18 -112
  26. package/lib/electron/sdk-helper.d.ts +4 -0
  27. package/lib/electron/sdk-helper.js +272 -0
  28. package/lib/electron/struct.d.ts +12 -0
  29. package/lib/electron/struct.js +21 -0
  30. package/lib/electron/until.d.ts +32 -0
  31. package/lib/electron/until.js +58 -0
  32. package/lib/electron/window-proxy/browser-window-proxy.d.ts +63 -0
  33. package/lib/electron/window-proxy/browser-window-proxy.js +728 -0
  34. package/lib/electron/window-proxy/main-process-handler.d.ts +45 -0
  35. package/lib/electron/window-proxy/main-process-handler.js +446 -0
  36. package/lib/electron/window.d.ts +0 -4
  37. package/lib/electron/window.js +10 -21
  38. package/lib/fragments/annotation/index.d.ts +1 -0
  39. package/lib/fragments/annotation/index.js +3 -1
  40. package/lib/fragments/annotation/store.d.ts +1 -0
  41. package/lib/fragments/annotation/store.js +45 -18
  42. package/lib/fragments/annotation/toolbar/store.d.ts +6 -6
  43. package/lib/fragments/annotation/toolbar/store.js +13 -41
  44. package/lib/fragments/annotation/toolbar/view.js +32 -37
  45. package/lib/fragments/annotation/view.d.ts +0 -1
  46. package/lib/fragments/annotation/view.js +11 -12
  47. package/lib/fragments/base.d.ts +3 -0
  48. package/lib/fragments/base.js +3 -1
  49. package/lib/fragments/whiteboard/index.d.ts +1 -1
  50. package/lib/fragments/whiteboard/index.js +3 -6
  51. package/lib/fragments/whiteboard/store.d.ts +1 -0
  52. package/lib/fragments/whiteboard/store.js +15 -8
  53. package/lib/global.css +22 -10
  54. package/lib/global.d.ts +19 -1
  55. package/lib/modules/action-bar/components/apps/index.js +1 -1
  56. package/lib/modules/action-bar/components/chat/index.js +1 -1
  57. package/lib/modules/action-bar/components/collapse/index.d.ts +1 -1
  58. package/lib/modules/action-bar/components/collapse/index.js +1 -3
  59. package/lib/modules/action-bar/components/confirm-leave-meeting/index.d.ts +3 -0
  60. package/lib/modules/action-bar/components/confirm-leave-meeting/index.js +78 -0
  61. package/lib/modules/action-bar/components/interpreter/index.d.ts +1 -1
  62. package/lib/modules/action-bar/components/interpreter/index.js +1 -1
  63. package/lib/modules/action-bar/components/item/index.d.ts +1 -1
  64. package/lib/modules/action-bar/components/leave/index.js +1 -1
  65. package/lib/modules/action-bar/components/live-streaming/index.js +1 -1
  66. package/lib/modules/action-bar/components/more/index.js +3 -9
  67. package/lib/modules/action-bar/components/more/poppover-content.d.ts +1 -1
  68. package/lib/modules/action-bar/components/more/poppover-content.js +13 -13
  69. package/lib/modules/action-bar/components/notification-bar/index.js +1 -1
  70. package/lib/modules/action-bar/components/participants/index.js +1 -1
  71. package/lib/modules/action-bar/components/placement/index.d.ts +1 -1
  72. package/lib/modules/action-bar/components/record/index.js +1 -1
  73. package/lib/modules/action-bar/components/record/popover.js +1 -1
  74. package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +1 -1
  75. package/lib/modules/action-bar/components/screen-share/index.browser.d.ts +4 -0
  76. package/lib/modules/action-bar/components/screen-share/index.browser.js +62 -0
  77. package/lib/modules/action-bar/components/screen-share/index.electron.d.ts +4 -0
  78. package/lib/modules/action-bar/components/screen-share/index.electron.js +72 -0
  79. package/lib/modules/action-bar/components/screen-share/index.js +3 -85
  80. package/lib/modules/action-bar/components/screen-share/submenu.d.ts +5 -1
  81. package/lib/modules/action-bar/components/screen-share/submenu.js +56 -43
  82. package/lib/modules/action-bar/components/security/index.js +2 -14
  83. package/lib/modules/action-bar/components/settings/index.js +3 -3
  84. package/lib/modules/action-bar/components/smaller/index.js +1 -1
  85. package/lib/modules/action-bar/components/trigger-output-language/index.js +1 -1
  86. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +1 -1
  87. package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +2 -2
  88. package/lib/modules/action-bar/constants.d.ts +1 -0
  89. package/lib/modules/action-bar/constants.js +8 -0
  90. package/lib/modules/action-bar/main-scene/index.d.ts +19 -0
  91. package/lib/modules/action-bar/main-scene/index.js +141 -0
  92. package/lib/modules/action-bar/{store.d.ts → main-scene/store.base.d.ts} +84 -108
  93. package/lib/modules/action-bar/{store.js → main-scene/store.base.js} +285 -288
  94. package/lib/modules/action-bar/main-scene/store.browser.d.ts +4 -0
  95. package/lib/modules/action-bar/main-scene/store.browser.js +111 -0
  96. package/lib/modules/action-bar/main-scene/store.electron.d.ts +10 -0
  97. package/lib/modules/action-bar/main-scene/store.electron.js +100 -0
  98. package/lib/modules/action-bar/main-scene/view.d.ts +4 -0
  99. package/lib/modules/action-bar/{view.js → main-scene/view.js} +16 -17
  100. package/lib/modules/action-bar/{types.d.ts → type.d.ts} +9 -0
  101. package/lib/modules/action-bar/type.js +13 -0
  102. package/lib/modules/action-bar/waiting-scene/index.d.ts +15 -0
  103. package/lib/modules/action-bar/waiting-scene/index.js +102 -0
  104. package/lib/modules/action-bar/waiting-scene/store.base.d.ts +9 -0
  105. package/lib/{shared-data-source/annotation-data.js → modules/action-bar/waiting-scene/store.base.js} +20 -35
  106. package/lib/modules/action-bar/waiting-scene/store.browser.d.ts +3 -0
  107. package/lib/modules/action-bar/waiting-scene/store.browser.js +25 -0
  108. package/lib/modules/action-bar/waiting-scene/store.electron.d.ts +9 -0
  109. package/lib/modules/action-bar/waiting-scene/store.electron.js +45 -0
  110. package/lib/modules/action-bar/waiting-scene/view.d.ts +2 -0
  111. package/lib/modules/action-bar/waiting-scene/view.js +123 -0
  112. package/lib/modules/audio-stream/index.d.ts +3 -14
  113. package/lib/modules/audio-stream/index.js +21 -16
  114. package/lib/modules/chat/chat-room-store.d.ts +7 -20
  115. package/lib/modules/chat/chat-room-store.js +21 -20
  116. package/lib/modules/chat/components/message-list/index.js +1 -1
  117. package/lib/modules/chat/components/message-list/message-item/index.js +2 -2
  118. package/lib/modules/chat/index.css +4 -0
  119. package/lib/modules/chat/index.d.ts +6 -22
  120. package/lib/modules/chat/index.dev.js +9 -9
  121. package/lib/modules/chat/index.js +52 -108
  122. package/lib/modules/chat/store.d.ts +16 -30
  123. package/lib/modules/chat/store.js +138 -53
  124. package/lib/modules/chat/types.d.ts +19 -2
  125. package/lib/modules/chat/view.js +5 -4
  126. package/lib/modules/components/annotation-menu/index.js +1 -6
  127. package/lib/modules/components/control-bar/components/switch-theme/index.js +2 -2
  128. package/lib/modules/components/control-bar/index.css +17 -5
  129. package/lib/modules/components/control-bar/index.d.ts +19 -11
  130. package/lib/modules/components/control-bar/index.js +101 -29
  131. package/lib/modules/components/device-control/components/audio-menu/index.js +4 -4
  132. package/lib/modules/components/device-control/components/carmera/index.js +16 -16
  133. package/lib/modules/components/device-control/components/microphone/index.d.ts +3 -2
  134. package/lib/modules/components/device-control/components/microphone/index.js +44 -28
  135. package/lib/modules/components/device-control/components/none-menu/index.js +4 -4
  136. package/lib/modules/components/device-control/components/phone-menu/index.js +4 -4
  137. package/lib/modules/components/device-control/components/video-menu/index.js +4 -4
  138. package/lib/modules/components/device-control/main-scene/store.d.ts +9 -0
  139. package/lib/modules/components/device-control/main-scene/store.js +94 -0
  140. package/lib/modules/components/device-control/{store.d.ts → store.base.d.ts} +12 -15
  141. package/lib/modules/components/device-control/{store.js → store.base.js} +39 -33
  142. package/lib/modules/components/device-control/type.d.ts +4 -0
  143. package/lib/modules/components/device-control/waiting-scene/store.d.ts +5 -0
  144. package/lib/modules/components/device-control/waiting-scene/store.js +90 -0
  145. package/lib/modules/components/leave-meeting/components/assign-host.d.ts +1 -1
  146. package/lib/modules/components/leave-meeting/index.js +7 -11
  147. package/lib/modules/components/leave-meeting/main-scene/store.d.ts +14 -0
  148. package/lib/modules/components/leave-meeting/main-scene/store.js +113 -0
  149. package/lib/modules/components/leave-meeting/store.base.d.ts +36 -0
  150. package/lib/modules/components/leave-meeting/{store.js → store.base.js} +45 -50
  151. package/lib/modules/components/leave-meeting/type.d.ts +4 -0
  152. package/lib/modules/components/leave-meeting/waiting-scene/store.d.ts +13 -0
  153. package/lib/modules/components/leave-meeting/waiting-scene/store.js +104 -0
  154. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +5 -6
  155. package/lib/modules/components/member-window/components/member-actions/index.js +2 -0
  156. package/lib/modules/components/member-window/components/member-actions/libs/index.js +12 -14
  157. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
  158. package/lib/modules/components/member-window/components/member-actions/provider.js +14 -3
  159. package/lib/modules/components/member-window/components/member-actions/store.d.ts +17 -5
  160. package/lib/modules/components/member-window/components/member-actions/store.js +28 -10
  161. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +4 -4
  162. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +1 -1
  163. package/lib/modules/components/member-window/components/video-player/components/zoomable-container.js +18 -32
  164. package/lib/modules/components/member-window/types.d.ts +1 -0
  165. package/lib/modules/components/security-menu/index.d.ts +1 -9
  166. package/lib/modules/components/security-menu/index.js +42 -39
  167. package/lib/modules/components/security-menu/store.d.ts +47 -0
  168. package/lib/modules/components/security-menu/store.js +332 -0
  169. package/lib/modules/components/security-menu/type.d.ts +4 -0
  170. package/lib/modules/components/security-menu/type.js +6 -0
  171. package/lib/modules/components/tab-frame/index.js +6 -21
  172. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +1 -0
  173. package/lib/modules/components/toolbar/components/capture-tool/index.js +3 -4
  174. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +2 -1
  175. package/lib/modules/components/toolbar/components/graphic-tool/index.js +0 -2
  176. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +2 -1
  177. package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +1 -1
  178. package/lib/modules/components/toolbar/components/vertical-frame/index.js +9 -5
  179. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +16 -4
  180. package/lib/modules/components/toolbar/index.d.ts +3 -1
  181. package/lib/modules/components/toolbar/index.js +5 -3
  182. package/lib/modules/connection-gateway/index.d.ts +3 -18
  183. package/lib/modules/connection-gateway/index.js +25 -28
  184. package/lib/modules/connection-gateway/store.d.ts +4 -20
  185. package/lib/modules/connection-gateway/store.js +19 -21
  186. package/lib/modules/connection-gateway/types.d.ts +4 -0
  187. package/lib/modules/control-bar/components/boundary-detector.d.ts +8 -0
  188. package/lib/modules/control-bar/components/boundary-detector.js +56 -0
  189. package/lib/modules/control-bar/components/carmera/index.d.ts +1 -0
  190. package/lib/modules/control-bar/components/carmera/index.js +147 -0
  191. package/lib/modules/control-bar/components/cloud-recording-buttons.js +3 -0
  192. package/lib/modules/control-bar/components/meeting-details/index.js +7 -17
  193. package/lib/modules/control-bar/components/microphone/index.d.ts +6 -0
  194. package/lib/modules/control-bar/components/microphone/index.js +233 -0
  195. package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -1
  196. package/lib/modules/control-bar/components/more-actions/index.js +22 -59
  197. package/lib/modules/control-bar/components/share-audio/index.d.ts +0 -2
  198. package/lib/modules/control-bar/components/share-audio/index.js +6 -24
  199. package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -1
  200. package/lib/modules/control-bar/components/share-state-nav/index.js +9 -5
  201. package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -1
  202. package/lib/modules/control-bar/context.d.ts +5 -0
  203. package/lib/modules/control-bar/context.js +12 -0
  204. package/lib/modules/control-bar/enums.d.ts +3 -1
  205. package/lib/modules/control-bar/enums.js +2 -0
  206. package/lib/modules/control-bar/hooks.d.ts +3 -0
  207. package/lib/modules/control-bar/hooks.js +36 -0
  208. package/lib/modules/control-bar/index.d.ts +21 -49
  209. package/lib/modules/control-bar/index.dev.js +40 -0
  210. package/lib/modules/control-bar/index.js +99 -45
  211. package/lib/modules/control-bar/reactor.d.ts +2 -0
  212. package/lib/modules/control-bar/reactor.js +8 -0
  213. package/lib/modules/control-bar/store.d.ts +58 -117
  214. package/lib/modules/control-bar/store.js +360 -456
  215. package/lib/modules/control-bar/type.d.ts +43 -0
  216. package/lib/modules/control-bar/type.js +6 -0
  217. package/lib/modules/control-bar/view.d.ts +1 -5
  218. package/lib/modules/control-bar/view.js +622 -459
  219. package/lib/modules/device-pretest/audio-preview/microphone-detection.js +1 -1
  220. package/lib/modules/device-pretest/audio-preview/speaker-control.js +3 -0
  221. package/lib/modules/device-pretest/audio-preview/speaker-detection.js +1 -1
  222. package/lib/modules/device-pretest/index.d.ts +0 -1
  223. package/lib/modules/device-pretest/index.js +3 -4
  224. package/lib/modules/device-pretest/settings/beauty.d.ts +1 -1
  225. package/lib/modules/device-pretest/settings/beauty.js +3 -3
  226. package/lib/modules/device-pretest/settings/video-effect.js +1 -1
  227. package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
  228. package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
  229. package/lib/modules/device-pretest/store.d.ts +3 -2
  230. package/lib/modules/dialog/components/confirm/index.d.ts +5 -0
  231. package/lib/modules/dialog/components/confirm/index.js +162 -0
  232. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +10 -8
  233. package/lib/modules/dialog/components/dialog-container/component/body.js +40 -26
  234. package/lib/modules/dialog/components/dialog-container/index.css +10 -0
  235. package/lib/modules/dialog/components/dialog-container/index.d.ts +5 -7
  236. package/lib/modules/dialog/components/dialog-container/index.js +42 -62
  237. package/lib/modules/dialog/components/host-area-container/index.d.ts +1 -1
  238. package/lib/modules/dialog/components/host-area-container/index.js +142 -200
  239. package/lib/modules/dialog/components/normal-window/index.d.ts +17 -14
  240. package/lib/modules/dialog/components/normal-window/index.js +40 -57
  241. package/lib/modules/dialog/dialogs/annotation-tool/index.d.ts +6 -3
  242. package/lib/modules/dialog/dialogs/annotation-tool/index.js +18 -19
  243. package/lib/modules/dialog/dialogs/chat/components/actions.d.ts +3 -1
  244. package/lib/modules/dialog/dialogs/chat/components/actions.js +17 -7
  245. package/lib/modules/dialog/dialogs/chat/index.d.ts +27 -4
  246. package/lib/modules/dialog/dialogs/chat/index.js +51 -30
  247. package/lib/modules/dialog/dialogs/confirm/index.css +24 -0
  248. package/lib/modules/dialog/dialogs/confirm/index.d.ts +22 -1
  249. package/lib/modules/dialog/dialogs/confirm/index.js +49 -33
  250. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +18 -6
  251. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.js +25 -43
  252. package/lib/modules/dialog/dialogs/connection-gateway/index.d.ts +24 -8
  253. package/lib/modules/dialog/dialogs/connection-gateway/index.js +36 -43
  254. package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +17 -15
  255. package/lib/modules/dialog/dialogs/control-bar/index.d.ts +21 -8
  256. package/lib/modules/dialog/dialogs/control-bar/index.js +19 -114
  257. package/lib/modules/dialog/dialogs/control-bar-leave-meeting/index.d.ts +19 -0
  258. package/lib/modules/dialog/dialogs/control-bar-leave-meeting/index.js +41 -0
  259. package/lib/modules/dialog/dialogs/device-setting/index.d.ts +16 -1
  260. package/lib/modules/dialog/dialogs/device-setting/index.js +29 -27
  261. package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +10 -10
  262. package/lib/modules/dialog/dialogs/end-meeting/index.js +35 -26
  263. package/lib/modules/dialog/dialogs/interpreter/index.d.ts +18 -3
  264. package/lib/modules/dialog/dialogs/interpreter/index.js +33 -31
  265. package/lib/modules/dialog/dialogs/invite/index.d.ts +22 -1
  266. package/lib/modules/dialog/dialogs/invite/index.js +43 -43
  267. package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +12 -1
  268. package/lib/modules/dialog/dialogs/live-streaming/index.js +23 -22
  269. package/lib/modules/dialog/dialogs/mute-all/index.css +20 -0
  270. package/lib/modules/dialog/dialogs/mute-all/index.d.ts +20 -0
  271. package/lib/modules/dialog/dialogs/mute-all/index.js +49 -0
  272. package/lib/modules/dialog/dialogs/participant/components/actions.d.ts +3 -1
  273. package/lib/modules/dialog/dialogs/participant/components/actions.js +6 -8
  274. package/lib/modules/dialog/dialogs/participant/components/title.d.ts +6 -1
  275. package/lib/modules/dialog/dialogs/participant/components/title.js +4 -7
  276. package/lib/modules/dialog/dialogs/participant/index.d.ts +26 -2
  277. package/lib/modules/dialog/dialogs/participant/index.js +46 -40
  278. package/lib/modules/dialog/dialogs/rename/index.d.ts +18 -3
  279. package/lib/modules/dialog/dialogs/rename/index.js +29 -14
  280. package/lib/modules/dialog/dialogs/sample-dialog/index.d.ts +21 -0
  281. package/lib/modules/dialog/dialogs/sample-dialog/index.js +55 -0
  282. package/lib/modules/dialog/dialogs/share-screen-selection/index.d.ts +19 -4
  283. package/lib/modules/dialog/dialogs/share-screen-selection/index.js +40 -33
  284. package/lib/modules/dialog/dialogs/sub-window/index.d.ts +21 -1
  285. package/lib/modules/dialog/dialogs/sub-window/index.js +27 -91
  286. package/lib/modules/dialog/dialogs/system-preference/electron.js +15 -16
  287. package/lib/modules/dialog/dialogs/system-preference/index.css +2 -2
  288. package/lib/modules/dialog/dialogs/system-preference/index.d.ts +32 -5
  289. package/lib/modules/dialog/dialogs/system-preference/index.js +55 -46
  290. package/lib/modules/dialog/dialogs/toast/index.d.ts +21 -3
  291. package/lib/modules/dialog/dialogs/toast/index.js +18 -41
  292. package/lib/modules/dialog/dialogs/video-window/index.d.ts +29 -2
  293. package/lib/modules/dialog/dialogs/video-window/index.js +50 -261
  294. package/lib/modules/dialog/dialogs/whiteboard/index.d.ts +23 -4
  295. package/lib/modules/dialog/dialogs/whiteboard/index.js +58 -64
  296. package/lib/modules/dialog/dialogs/widget/index.d.ts +18 -6
  297. package/lib/modules/dialog/dialogs/widget/index.js +34 -28
  298. package/lib/modules/dialog/index.css +8 -1
  299. package/lib/modules/dialog/index.d.ts +5 -46
  300. package/lib/modules/dialog/index.js +29 -74
  301. package/lib/modules/dialog/level-config.d.ts +11 -11
  302. package/lib/modules/dialog/level-config.js +12 -15
  303. package/lib/modules/dialog/store.base.d.ts +46 -0
  304. package/lib/modules/dialog/store.base.js +279 -0
  305. package/lib/modules/dialog/store.browser.d.ts +18 -0
  306. package/lib/modules/dialog/store.browser.js +141 -0
  307. package/lib/modules/dialog/store.electron.d.ts +36 -0
  308. package/lib/modules/dialog/store.electron.js +299 -0
  309. package/lib/modules/dialog/type.d.ts +16 -11
  310. package/lib/modules/dialog/view.d.ts +1 -1
  311. package/lib/modules/dialog/view.js +10 -12
  312. package/lib/modules/event-sound/index.d.ts +3 -37
  313. package/lib/modules/event-sound/index.js +18 -273
  314. package/lib/modules/event-sound/store.d.ts +36 -0
  315. package/lib/modules/event-sound/store.js +283 -0
  316. package/lib/modules/event-sound/type.d.ts +4 -0
  317. package/lib/modules/event-sound/type.js +6 -0
  318. package/lib/modules/event-toast/index.css +0 -1
  319. package/lib/modules/event-toast/index.d.ts +5 -6
  320. package/lib/modules/event-toast/index.js +41 -24
  321. package/lib/modules/event-toast/store.base.d.ts +20 -0
  322. package/lib/modules/event-toast/{store.js → store.base.js} +80 -86
  323. package/lib/modules/event-toast/store.browser.d.ts +4 -0
  324. package/lib/modules/event-toast/store.browser.js +30 -0
  325. package/lib/modules/event-toast/store.electron.d.ts +17 -0
  326. package/lib/modules/event-toast/store.electron.js +144 -0
  327. package/lib/modules/event-toast/type.d.ts +10 -0
  328. package/lib/modules/event-toast/type.js +6 -0
  329. package/lib/modules/event-toast/view.js +13 -9
  330. package/lib/modules/interpreter/index.css +4 -0
  331. package/lib/modules/interpreter/index.d.ts +3 -15
  332. package/lib/modules/interpreter/index.js +18 -16
  333. package/lib/modules/interpreter/store.d.ts +10 -16
  334. package/lib/modules/interpreter/store.js +20 -49
  335. package/lib/modules/interpreter/type.d.ts +3 -15
  336. package/lib/modules/interpreter/view.d.ts +1 -0
  337. package/lib/modules/interpreter/view.js +4 -19
  338. package/lib/modules/invite/components/pstn-invite.js +2 -2
  339. package/lib/modules/invite/index.d.ts +3 -10
  340. package/lib/modules/invite/index.js +25 -12
  341. package/lib/modules/invite/store.d.ts +17 -30
  342. package/lib/modules/invite/store.js +65 -79
  343. package/lib/modules/invite/types.d.ts +5 -1
  344. package/lib/modules/layout/components/Aside.js +1 -1
  345. package/lib/modules/layout/components/Carousel.js +1 -1
  346. package/lib/modules/layout/components/CommonVideoRenderer.js +41 -5
  347. package/lib/modules/layout/components/Gallery.js +1 -1
  348. package/lib/modules/layout/components/who-is-speaking.js +1 -1
  349. package/lib/modules/layout/index.d.ts +3 -39
  350. package/lib/modules/layout/index.dev.js +8 -8
  351. package/lib/modules/layout/index.js +32 -45
  352. package/lib/modules/layout/{store.d.ts → store.base.d.ts} +31 -24
  353. package/lib/modules/layout/{store.js → store.base.js} +65 -137
  354. package/lib/modules/layout/store.browser.d.ts +11 -0
  355. package/lib/modules/layout/store.browser.js +56 -0
  356. package/lib/modules/layout/store.electron.d.ts +16 -0
  357. package/lib/modules/layout/store.electron.js +177 -0
  358. package/lib/modules/layout/type.d.ts +3 -39
  359. package/lib/modules/layout/view.js +1 -1
  360. package/lib/modules/live-streaming/index.d.ts +2 -15
  361. package/lib/modules/live-streaming/index.dev.js +3 -3
  362. package/lib/modules/live-streaming/index.js +25 -12
  363. package/lib/modules/live-streaming/store.d.ts +6 -18
  364. package/lib/modules/live-streaming/store.js +22 -26
  365. package/lib/modules/live-streaming/type.d.ts +4 -0
  366. package/lib/modules/live-streaming/type.js +6 -0
  367. package/lib/modules/notification/index.d.ts +3 -7
  368. package/lib/modules/notification/index.js +26 -16
  369. package/lib/modules/notification/store.d.ts +11 -6
  370. package/lib/modules/notification/store.js +51 -11
  371. package/lib/modules/notification/type.d.ts +4 -0
  372. package/lib/modules/notification/type.js +6 -0
  373. package/lib/modules/notification/view.d.ts +6 -6
  374. package/lib/modules/notification/view.js +23 -32
  375. package/lib/modules/offscreen-pulling/index.js +1 -1
  376. package/lib/modules/participant/components/confirm-input/index.js +5 -4
  377. package/lib/modules/participant/components/mute-all/index.d.ts +1 -4
  378. package/lib/modules/participant/components/mute-all/index.js +32 -11
  379. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +1 -1
  380. package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +3 -2
  381. package/lib/modules/participant/components/participants/components/footer/index.js +5 -3
  382. package/lib/modules/participant/components/participants/components/merge/index.d.ts +1 -2
  383. package/lib/modules/participant/components/participants/components/merge/index.js +1 -3
  384. package/lib/modules/participant/components/participants/components/render-tab/index.js +1 -1
  385. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +1 -1
  386. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +1 -1
  387. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +1 -1
  388. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +1 -1
  389. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +5 -4
  390. package/lib/modules/participant/components/participants/index.js +17 -37
  391. package/lib/modules/participant/components/participants/types.d.ts +1 -0
  392. package/lib/modules/participant/index.css +4 -0
  393. package/lib/modules/participant/index.d.ts +6 -47
  394. package/lib/modules/participant/index.dev.js +9 -9
  395. package/lib/modules/participant/index.js +60 -56
  396. package/lib/modules/participant/member-list-data-source.d.ts +2 -1
  397. package/lib/modules/participant/member-list-data-source.js +14 -14
  398. package/lib/modules/participant/store.base.d.ts +434 -0
  399. package/lib/modules/participant/store.base.js +2365 -0
  400. package/lib/modules/participant/store.browser.d.ts +9 -0
  401. package/lib/modules/participant/store.browser.js +123 -0
  402. package/lib/modules/participant/store.electron.d.ts +13 -0
  403. package/lib/modules/participant/store.electron.js +130 -0
  404. package/lib/modules/participant/struct.d.ts +49 -0
  405. package/lib/modules/participant/struct.js +60 -0
  406. package/lib/modules/participant/type.d.ts +5 -22
  407. package/lib/modules/participant/type.js +1 -25
  408. package/lib/modules/participant/view.js +1 -1
  409. package/lib/modules/pc-audio-connect/main-scene/index.d.ts +14 -0
  410. package/lib/modules/pc-audio-connect/{index.js → main-scene/index.js} +38 -19
  411. package/lib/modules/pc-audio-connect/main-scene/store.d.ts +33 -0
  412. package/lib/modules/pc-audio-connect/main-scene/store.js +313 -0
  413. package/lib/modules/pc-audio-connect/types.d.ts +4 -0
  414. package/lib/modules/pc-audio-connect/types.js +6 -1
  415. package/lib/modules/pc-audio-connect/view.js +2 -1
  416. package/lib/modules/pc-audio-connect/waiting-scene/index.d.ts +10 -0
  417. package/lib/modules/pc-audio-connect/waiting-scene/index.js +69 -0
  418. package/lib/modules/pc-audio-connect/waiting-scene/store.d.ts +30 -0
  419. package/lib/modules/pc-audio-connect/{store.js → waiting-scene/store.js} +38 -47
  420. package/lib/modules/phone-audio-connect/index.d.ts +2 -10
  421. package/lib/modules/phone-audio-connect/index.js +16 -9
  422. package/lib/modules/phone-audio-connect/store.d.ts +2 -11
  423. package/lib/modules/phone-audio-connect/store.js +12 -13
  424. package/lib/modules/phone-audio-connect/types.d.ts +4 -0
  425. package/lib/modules/secondary-window/index.d.ts +8 -29
  426. package/lib/modules/secondary-window/index.js +51 -9
  427. package/lib/modules/secondary-window/store.d.ts +27 -24
  428. package/lib/modules/secondary-window/store.js +171 -64
  429. package/lib/modules/secondary-window/type.d.ts +4 -0
  430. package/lib/modules/secondary-window/view.js +105 -73
  431. package/lib/modules/setting/audio-settings/audio-settings.js +5 -16
  432. package/lib/modules/setting/general-settings/general-settings.js +16 -11
  433. package/lib/modules/setting/index.css +1 -0
  434. package/lib/modules/setting/index.d.ts +8 -27
  435. package/lib/modules/setting/index.dev.js +10 -10
  436. package/lib/modules/setting/index.js +57 -30
  437. package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
  438. package/lib/modules/setting/state/index.js +3 -3
  439. package/lib/modules/setting/storage-settings/storage-settings.js +3 -14
  440. package/lib/modules/setting/{store.d.ts → store.base.d.ts} +32 -92
  441. package/lib/modules/setting/{store.js → store.base.js} +304 -286
  442. package/lib/modules/setting/store.browser.d.ts +7 -0
  443. package/lib/modules/setting/store.browser.js +55 -0
  444. package/lib/modules/setting/store.electron.d.ts +9 -0
  445. package/lib/modules/setting/store.electron.js +69 -0
  446. package/lib/modules/setting/translate-settings/translate-settings.js +2 -2
  447. package/lib/modules/setting/type.d.ts +69 -0
  448. package/lib/modules/setting/type.js +26 -0
  449. package/lib/modules/setting/video-settings/video-settings-basic.js +2 -2
  450. package/lib/modules/setting/video-settings/video-settings.d.ts +0 -2
  451. package/lib/modules/setting/video-settings/video-settings.js +9 -10
  452. package/lib/modules/setting/view.d.ts +0 -8
  453. package/lib/modules/setting/view.js +15 -27
  454. package/lib/modules/share-screen/components/control-bar/index.js +87 -81
  455. package/lib/modules/share-screen/components/selection/index.css +6 -3
  456. package/lib/modules/share-screen/components/selection/index.js +178 -202
  457. package/lib/modules/share-screen/index.d.ts +16 -30
  458. package/lib/modules/share-screen/index.dev.js +11 -11
  459. package/lib/modules/share-screen/index.js +47 -35
  460. package/lib/modules/share-screen/store.base.d.ts +49 -0
  461. package/lib/modules/share-screen/store.base.js +468 -0
  462. package/lib/modules/share-screen/store.browser.d.ts +9 -0
  463. package/lib/modules/share-screen/store.browser.js +43 -0
  464. package/lib/modules/share-screen/store.electron.d.ts +25 -0
  465. package/lib/modules/share-screen/store.electron.js +268 -0
  466. package/lib/modules/share-screen/type.d.ts +40 -0
  467. package/lib/modules/share-screen/type.js +13 -0
  468. package/lib/modules/share-screen/view.js +5 -6
  469. package/lib/modules/state-bar/index.d.ts +6 -35
  470. package/lib/modules/state-bar/index.dev.js +7 -7
  471. package/lib/modules/state-bar/index.js +18 -48
  472. package/lib/modules/state-bar/layout-config.js +5 -4
  473. package/lib/modules/state-bar/live-streaming-state.js +6 -5
  474. package/lib/modules/state-bar/main-scene/index.d.ts +5 -0
  475. package/lib/modules/state-bar/main-scene/index.js +47 -0
  476. package/lib/modules/state-bar/main-scene/store.base.d.ts +23 -0
  477. package/lib/modules/state-bar/main-scene/store.base.js +132 -0
  478. package/lib/modules/state-bar/main-scene/store.browser.d.ts +4 -0
  479. package/lib/modules/state-bar/main-scene/store.browser.js +86 -0
  480. package/lib/modules/state-bar/main-scene/store.electron.d.ts +13 -0
  481. package/lib/modules/state-bar/main-scene/store.electron.js +113 -0
  482. package/lib/modules/state-bar/meeting-details.js +20 -36
  483. package/lib/modules/state-bar/meeting-network-state.js +3 -3
  484. package/lib/modules/state-bar/meeting-time.js +1 -1
  485. package/lib/modules/state-bar/network-quality.js +1 -1
  486. package/lib/modules/state-bar/recording.js +7 -6
  487. package/lib/modules/state-bar/store.base.d.ts +82 -0
  488. package/lib/modules/state-bar/store.base.electron.d.ts +15 -0
  489. package/lib/{providers/whiteboard-provider.js → modules/state-bar/store.base.electron.js} +42 -60
  490. package/lib/modules/state-bar/{store.js → store.base.js} +140 -208
  491. package/lib/modules/state-bar/type.d.ts +5 -0
  492. package/lib/modules/state-bar/type.js +6 -0
  493. package/lib/modules/state-bar/view.js +36 -38
  494. package/lib/modules/state-bar/waiting-scene/index.d.ts +5 -0
  495. package/lib/modules/state-bar/waiting-scene/index.js +47 -0
  496. package/lib/modules/state-bar/waiting-scene/store.base.d.ts +11 -0
  497. package/lib/modules/state-bar/waiting-scene/store.base.js +50 -0
  498. package/lib/modules/state-bar/waiting-scene/store.browser.d.ts +4 -0
  499. package/lib/modules/state-bar/waiting-scene/store.browser.js +86 -0
  500. package/lib/modules/state-bar/waiting-scene/store.electron.d.ts +12 -0
  501. package/lib/modules/state-bar/waiting-scene/store.electron.js +105 -0
  502. package/lib/modules/video-window/components/members/index.js +3 -5
  503. package/lib/modules/video-window/index.d.ts +6 -38
  504. package/lib/modules/video-window/index.js +46 -56
  505. package/lib/modules/video-window/popover-watcher.d.ts +9 -0
  506. package/lib/modules/video-window/popover-watcher.js +60 -0
  507. package/lib/modules/video-window/store.d.ts +32 -22
  508. package/lib/modules/video-window/store.js +181 -140
  509. package/lib/modules/video-window/type.d.ts +3 -27
  510. package/lib/modules/video-window/view.js +58 -7
  511. package/lib/modules/waiting-room-layout/index.d.ts +3 -9
  512. package/lib/modules/waiting-room-layout/index.js +28 -21
  513. package/lib/modules/waiting-room-layout/store.d.ts +4 -10
  514. package/lib/modules/waiting-room-layout/store.js +10 -7
  515. package/lib/modules/whiteboard/components/control-bar/store.d.ts +6 -14
  516. package/lib/modules/whiteboard/components/control-bar/store.js +29 -31
  517. package/lib/modules/whiteboard/components/loading/index.d.ts +7 -1
  518. package/lib/modules/whiteboard/components/loading/index.js +6 -9
  519. package/lib/modules/whiteboard/components/multi-window/index.js +1 -1
  520. package/lib/modules/whiteboard/components/toolbar/store.d.ts +1 -6
  521. package/lib/modules/whiteboard/components/toolbar/store.js +4 -13
  522. package/lib/modules/whiteboard/index.d.ts +4 -92
  523. package/lib/modules/whiteboard/index.js +24 -813
  524. package/lib/modules/whiteboard/libs/theme.d.ts +4 -0
  525. package/lib/modules/whiteboard/libs/theme.js +31 -0
  526. package/lib/modules/whiteboard/store.browser.d.ts +5 -0
  527. package/lib/modules/whiteboard/store.browser.js +28 -0
  528. package/lib/modules/whiteboard/store.d.ts +67 -0
  529. package/lib/modules/whiteboard/store.electron.d.ts +10 -0
  530. package/lib/modules/whiteboard/store.electron.js +135 -0
  531. package/lib/modules/whiteboard/store.js +433 -0
  532. package/lib/modules/whiteboard/style.css +2 -12
  533. package/lib/modules/whiteboard/type.d.ts +4 -0
  534. package/lib/modules/whiteboard/view.js +95 -41
  535. package/lib/modules/widget/index.css +7 -15
  536. package/lib/modules/widget/index.d.ts +3 -3
  537. package/lib/modules/widget/index.js +22 -14
  538. package/lib/modules/widget/store.base.d.ts +15 -0
  539. package/lib/modules/widget/{store.js → store.base.js} +8 -6
  540. package/lib/modules/widget/store.browser.d.ts +6 -0
  541. package/lib/modules/widget/store.browser.js +81 -0
  542. package/lib/modules/widget/store.electron.d.ts +12 -0
  543. package/lib/modules/widget/store.electron.js +129 -0
  544. package/lib/modules/widget/type.d.ts +8 -7
  545. package/lib/modules/widget/view.d.ts +1 -0
  546. package/lib/modules/widget/view.js +22 -16
  547. package/lib/modules/widget/web-widget.d.ts +5 -4
  548. package/lib/modules/widget/web-widget.js +32 -40
  549. package/lib/object-manager.d.ts +79 -4
  550. package/lib/object-manager.js +135 -10
  551. package/lib/plugins/browser-runtime-plugin.js +1 -110
  552. package/lib/plugins/css-preset-plugin.js +0 -2
  553. package/lib/plugins/module-dev-plugin.js +62 -81
  554. package/lib/providers/ability-provider.d.ts +9 -1
  555. package/lib/providers/ability-provider.js +51 -49
  556. package/lib/providers/annotation/provider.d.ts +15 -0
  557. package/lib/providers/annotation/provider.js +69 -0
  558. package/lib/providers/annotation/type.d.ts +60 -0
  559. package/lib/providers/annotation/type.js +6 -0
  560. package/lib/providers/app-list-provider.d.ts +8 -6
  561. package/lib/providers/app-list-provider.js +17 -15
  562. package/lib/providers/board-share/bar-control/base.d.ts +47 -0
  563. package/lib/providers/board-share/bar-control/base.js +306 -0
  564. package/lib/providers/board-share/bar-control/browser.d.ts +10 -0
  565. package/lib/providers/board-share/bar-control/browser.js +42 -0
  566. package/lib/providers/board-share/bar-control/electron.d.ts +29 -0
  567. package/lib/providers/board-share/bar-control/electron.js +202 -0
  568. package/lib/providers/board-share/bar-control.d.ts +51 -0
  569. package/lib/{shared-data-source/whiteboard-data.js → providers/board-share/bar-control.js} +104 -62
  570. package/lib/providers/board-share/provider.base.d.ts +63 -0
  571. package/lib/providers/board-share/provider.base.js +394 -0
  572. package/lib/providers/board-share/provider.browser.d.ts +15 -0
  573. package/lib/providers/board-share/provider.browser.js +136 -0
  574. package/lib/providers/board-share/provider.electron.d.ts +22 -0
  575. package/lib/providers/board-share/provider.electron.js +163 -0
  576. package/lib/providers/board-share/struct.d.ts +14 -0
  577. package/lib/providers/board-share/struct.js +23 -0
  578. package/lib/providers/board-share/type.d.ts +161 -0
  579. package/lib/providers/board-share/type.js +6 -0
  580. package/lib/providers/chat-provider.d.ts +8 -2
  581. package/lib/providers/chat-provider.js +26 -12
  582. package/lib/providers/device-privilege-provider.d.ts +3 -2
  583. package/lib/providers/device-privilege-provider.js +1 -3
  584. package/lib/providers/device-provider.d.ts +39 -8
  585. package/lib/providers/device-provider.js +237 -142
  586. package/lib/providers/device-stream-provider.d.ts +6 -6
  587. package/lib/providers/device-stream-provider.js +31 -36
  588. package/lib/providers/dialog/provider.base.d.ts +43 -0
  589. package/lib/providers/dialog/provider.base.js +289 -0
  590. package/lib/providers/dialog/provider.browser.d.ts +16 -0
  591. package/lib/{modules/annotation/index.js → providers/dialog/provider.browser.js} +91 -92
  592. package/lib/providers/dialog/provider.electron.d.ts +16 -0
  593. package/lib/providers/dialog/provider.electron.js +263 -0
  594. package/lib/providers/dialog/type.d.ts +168 -0
  595. package/lib/providers/dialog/type.js +15 -0
  596. package/lib/providers/event-provider.d.ts +3 -67
  597. package/lib/providers/event-provider.js +4 -229
  598. package/lib/providers/facility/provider.base.d.ts +31 -0
  599. package/lib/providers/facility/provider.base.js +159 -0
  600. package/lib/providers/facility/provider.browser.d.ts +14 -0
  601. package/lib/providers/facility/provider.browser.js +75 -0
  602. package/lib/providers/facility/provider.electron.d.ts +17 -0
  603. package/lib/providers/facility/provider.electron.js +91 -0
  604. package/lib/providers/facility/struct.d.ts +5 -0
  605. package/lib/providers/facility/struct.js +13 -0
  606. package/lib/providers/facility/type.d.ts +36 -0
  607. package/lib/providers/facility/type.js +6 -0
  608. package/lib/providers/interpreter-provider.d.ts +4 -3
  609. package/lib/providers/interpreter-provider.js +2 -4
  610. package/lib/providers/local-storage-provider.d.ts +8 -1
  611. package/lib/providers/local-storage-provider.js +4 -3
  612. package/lib/providers/message/provider.d.ts +14 -0
  613. package/lib/providers/{message-provider.js → message/provider.js} +16 -52
  614. package/lib/providers/message/struct.d.ts +4 -0
  615. package/lib/providers/message/struct.js +12 -0
  616. package/lib/providers/{message-provider.d.ts → message/type.d.ts} +9 -27
  617. package/lib/providers/message/type.js +6 -0
  618. package/lib/providers/monitor-provider.d.ts +3 -1
  619. package/lib/providers/monitor-provider.js +4 -3
  620. package/lib/providers/mouse-detect/provider.d.ts +24 -0
  621. package/lib/providers/mouse-detect/provider.js +294 -0
  622. package/lib/providers/mouse-detect/struct.d.ts +4 -0
  623. package/lib/providers/mouse-detect/struct.js +12 -0
  624. package/lib/providers/mouse-detect/type.d.ts +14 -0
  625. package/lib/providers/mouse-detect/type.js +6 -0
  626. package/lib/providers/multi-display-provider.d.ts +27 -19
  627. package/lib/providers/multi-display-provider.js +127 -101
  628. package/lib/providers/phone-audio-provider.d.ts +3 -2
  629. package/lib/providers/phone-audio-provider.js +16 -16
  630. package/lib/providers/privilege-provider.d.ts +2 -1
  631. package/lib/providers/privilege-provider.js +9 -9
  632. package/lib/providers/renderer-provider.d.ts +23 -8
  633. package/lib/providers/renderer-provider.js +93 -28
  634. package/lib/providers/{room-provider.d.ts → room-provider/room-provider.d.ts} +19 -47
  635. package/lib/providers/{room-provider.js → room-provider/room-provider.js} +48 -206
  636. package/lib/{waiting-room-control-manager.d.ts → providers/room-provider/waiting-room-control-manager.d.ts} +1 -1
  637. package/lib/{waiting-room-control-manager.js → providers/room-provider/waiting-room-control-manager.js} +1 -1
  638. package/lib/providers/screen-share/provider.base.d.ts +95 -0
  639. package/lib/providers/screen-share/provider.base.js +525 -0
  640. package/lib/providers/screen-share/provider.browser.d.ts +19 -0
  641. package/lib/providers/screen-share/provider.browser.js +301 -0
  642. package/lib/providers/screen-share/provider.electron.d.ts +18 -0
  643. package/lib/providers/screen-share/provider.electron.js +452 -0
  644. package/lib/providers/screen-share/strategy/browser.d.ts +22 -0
  645. package/lib/providers/screen-share/strategy/browser.js +266 -0
  646. package/lib/providers/screen-share/strategy/electron.d.ts +22 -0
  647. package/lib/providers/screen-share/strategy/electron.js +294 -0
  648. package/lib/providers/screen-share/strategy/type.d.ts +39 -0
  649. package/lib/providers/screen-share/strategy/type.js +39 -0
  650. package/lib/providers/screen-share/stream-state-sync.d.ts +18 -0
  651. package/lib/providers/screen-share/stream-state-sync.js +217 -0
  652. package/lib/providers/screen-share/struct.d.ts +46 -0
  653. package/lib/providers/screen-share/struct.js +56 -0
  654. package/lib/providers/screen-share/type.d.ts +170 -0
  655. package/lib/providers/screen-share/type.js +6 -0
  656. package/lib/providers/session-provider.d.ts +3 -1
  657. package/lib/providers/session-provider.js +4 -3
  658. package/lib/providers/setting-storage/provider.base.d.ts +9 -0
  659. package/lib/providers/setting-storage/provider.base.js +14 -0
  660. package/lib/providers/setting-storage/provider.browser.d.ts +7 -0
  661. package/lib/providers/{user-setting-storage-provider.js → setting-storage/provider.browser.js} +23 -24
  662. package/lib/providers/setting-storage/provider.electron.d.ts +10 -0
  663. package/lib/providers/setting-storage/provider.electron.js +62 -0
  664. package/lib/providers/setting-storage/type.d.ts +18 -0
  665. package/lib/providers/setting-storage/type.js +6 -0
  666. package/lib/providers/widget-provider.d.ts +14 -6
  667. package/lib/providers/widget-provider.js +18 -24
  668. package/lib/providers/window/main-window.d.ts +51 -0
  669. package/lib/providers/window/main-window.js +306 -0
  670. package/lib/providers/window/provider.d.ts +27 -0
  671. package/lib/providers/window/provider.js +164 -0
  672. package/lib/providers/window/renderer-window.d.ts +77 -0
  673. package/lib/providers/window/renderer-window.js +512 -0
  674. package/lib/providers/window/type.d.ts +122 -0
  675. package/lib/providers/window/type.js +6 -0
  676. package/lib/runtime.d.ts +85 -82
  677. package/lib/runtime.js +7 -0
  678. package/lib/scenes/main-scene.d.ts +4 -110
  679. package/lib/scenes/main-scene.js +442 -545
  680. package/lib/scenes/type.d.ts +7 -0
  681. package/lib/scenes/type.js +6 -0
  682. package/lib/scenes/waiting-scene.d.ts +2 -76
  683. package/lib/scenes/waiting-scene.js +58 -165
  684. package/lib/schema.d.ts +2 -2
  685. package/lib/{utilities → shared-context}/board-context.d.ts +2 -0
  686. package/lib/{utilities → shared-context}/board-context.js +2 -0
  687. package/lib/shared-context/dialog-context.d.ts +13 -0
  688. package/lib/shared-context/dialog-context.js +10 -0
  689. package/lib/{utilities → shared-context}/video-track-render-context.js +1 -1
  690. package/lib/{shared-data-source → shared-data}/app-list-data.d.ts +6 -4
  691. package/lib/{shared-data-source → shared-data}/app-list-data.js +7 -4
  692. package/lib/{shared-data-source → shared-data}/chat-data.d.ts +4 -2
  693. package/lib/{shared-data-source → shared-data}/chat-data.js +11 -8
  694. package/lib/{shared-data-source → shared-data}/config.d.ts +8 -3
  695. package/lib/{shared-data-source → shared-data}/config.js +9 -3
  696. package/lib/{shared-data-source → shared-data}/confirm-data.d.ts +10 -9
  697. package/lib/{shared-data-source → shared-data}/confirm-data.js +10 -9
  698. package/lib/{shared-data-source → shared-data}/device-privilege-data.d.ts +3 -1
  699. package/lib/{shared-data-source → shared-data}/device-privilege-data.js +4 -3
  700. package/lib/{shared-data-source → shared-data}/interpreter.d.ts +5 -5
  701. package/lib/{shared-data-source → shared-data}/interpreter.js +16 -21
  702. package/lib/{shared-data-source → shared-data}/layout-data.d.ts +3 -1
  703. package/lib/{shared-data-source → shared-data}/layout-data.js +12 -9
  704. package/lib/{shared-data-source → shared-data}/meeting-time.d.ts +2 -6
  705. package/lib/{shared-data-source → shared-data}/meeting-time.js +12 -12
  706. package/lib/{shared-data-source → shared-data}/member-data.d.ts +8 -17
  707. package/lib/{shared-data-source → shared-data}/member-data.js +66 -94
  708. package/lib/{shared-data-source → shared-data}/pin-data.d.ts +6 -4
  709. package/lib/{shared-data-source → shared-data}/pin-data.js +14 -11
  710. package/lib/shared-data/screen-share/index.d.ts +26 -0
  711. package/lib/shared-data/screen-share/index.js +211 -0
  712. package/lib/shared-data/screen-share/type.d.ts +42 -0
  713. package/lib/shared-data/screen-share/type.js +6 -0
  714. package/lib/{shared-data-source → shared-data}/security-data.d.ts +5 -5
  715. package/lib/{shared-data-source → shared-data}/security-data.js +13 -13
  716. package/lib/{shared-data-source → shared-data}/setting.d.ts +5 -3
  717. package/lib/{shared-data-source → shared-data}/setting.js +8 -5
  718. package/lib/shared-data/speaker-spotlight.d.ts +7 -0
  719. package/lib/{shared-data-source → shared-data}/speaker-spotlight.js +10 -6
  720. package/lib/{shared-data-source → shared-data}/video-window.d.ts +3 -2
  721. package/lib/{shared-data-source → shared-data}/video-window.js +4 -3
  722. package/lib/{shared-data-source → shared-data}/waiting-room.d.ts +5 -5
  723. package/lib/{shared-data-source → shared-data}/waiting-room.js +10 -10
  724. package/lib/shared-data/widget-data.d.ts +13 -0
  725. package/lib/shared-data/widget-data.js +50 -0
  726. package/lib/translations/enUS.d.ts +16 -3
  727. package/lib/translations/enUS.js +22 -9
  728. package/lib/translations/zhCN.d.ts +16 -3
  729. package/lib/translations/zhCN.js +22 -9
  730. package/lib/type.d.ts +70 -79
  731. package/lib/type.js +16 -4
  732. package/lib/ui-manager.d.ts +6 -6
  733. package/lib/ui-manager.js +38 -10
  734. package/lib/ui-scene.d.ts +9 -39
  735. package/lib/ui-scene.js +160 -226
  736. package/lib/utilities/{screen.d.ts → browser-api.d.ts} +1 -0
  737. package/lib/utilities/{copyText.js → browser-api.js} +36 -1
  738. package/lib/utilities/constant.d.ts +67 -73
  739. package/lib/utilities/constant.js +70 -73
  740. package/lib/utilities/default-config.d.ts +32 -1
  741. package/lib/utilities/default-config.js +33 -1
  742. package/lib/utilities/dialog-utils.d.ts +8 -12
  743. package/lib/utilities/dialog-utils.js +63 -74
  744. package/lib/utilities/focus-helper.d.ts +2 -0
  745. package/lib/utilities/focus-helper.js +26 -0
  746. package/lib/utilities/logger.js +9 -1
  747. package/lib/utilities/meeting-detail.d.ts +10 -1
  748. package/lib/utilities/meeting-detail.js +25 -3
  749. package/lib/utilities/platform.d.ts +1 -0
  750. package/lib/utilities/platform.js +4 -1
  751. package/lib/utilities/renderer.d.ts +75 -17
  752. package/lib/utilities/renderer.js +418 -78
  753. package/package.json +6 -6
  754. package/public/index.html +50 -21
  755. package/lib/modules/action-bar/index.d.ts +0 -58
  756. package/lib/modules/action-bar/index.dev.d.ts +0 -0
  757. package/lib/modules/action-bar/index.dev.js +0 -94
  758. package/lib/modules/action-bar/index.js +0 -109
  759. package/lib/modules/action-bar/view.d.ts +0 -5
  760. package/lib/modules/annotation/annotation-index.d.ts +0 -2
  761. package/lib/modules/annotation/annotation-index.js +0 -80
  762. package/lib/modules/annotation/annotation-toolbar-store.d.ts +0 -75
  763. package/lib/modules/annotation/annotation-toolbar-store.js +0 -459
  764. package/lib/modules/annotation/board-cursor.css +0 -77
  765. package/lib/modules/annotation/components/color-picker/components/color.d.ts +0 -5
  766. package/lib/modules/annotation/components/color-picker/components/color.js +0 -38
  767. package/lib/modules/annotation/components/color-picker/components/panel.d.ts +0 -1
  768. package/lib/modules/annotation/components/color-picker/components/panel.js +0 -109
  769. package/lib/modules/annotation/components/color-picker/components/picker.d.ts +0 -1
  770. package/lib/modules/annotation/components/color-picker/components/picker.js +0 -75
  771. package/lib/modules/annotation/components/color-picker/index.d.ts +0 -2
  772. package/lib/modules/annotation/components/color-picker/index.js +0 -47
  773. package/lib/modules/annotation/components/eraser-picker.d.ts +0 -4
  774. package/lib/modules/annotation/components/eraser-picker.js +0 -144
  775. package/lib/modules/annotation/components/expansion/index.js +0 -100
  776. package/lib/modules/annotation/components/extra-tool-picker.d.ts +0 -1
  777. package/lib/modules/annotation/components/extra-tool-picker.js +0 -62
  778. package/lib/modules/annotation/components/history.d.ts +0 -2
  779. package/lib/modules/annotation/components/history.js +0 -78
  780. package/lib/modules/annotation/components/icons/fold-icon.d.ts +0 -2
  781. package/lib/modules/annotation/components/icons/fold-icon.js +0 -41
  782. package/lib/modules/annotation/components/icons/move-icon.d.ts +0 -1
  783. package/lib/modules/annotation/components/icons/move-icon.js +0 -66
  784. package/lib/modules/annotation/components/item/index.d.ts +0 -1
  785. package/lib/modules/annotation/components/item/index.js +0 -43
  786. package/lib/modules/annotation/components/move-handle.d.ts +0 -5
  787. package/lib/modules/annotation/components/move-handle.js +0 -134
  788. package/lib/modules/annotation/components/pen-picker.d.ts +0 -4
  789. package/lib/modules/annotation/components/pen-picker.js +0 -155
  790. package/lib/modules/annotation/components/screen-capture-picker.d.ts +0 -4
  791. package/lib/modules/annotation/components/screen-capture-picker.js +0 -85
  792. package/lib/modules/annotation/components/shape-picker.d.ts +0 -4
  793. package/lib/modules/annotation/components/shape-picker.js +0 -210
  794. package/lib/modules/annotation/hooks/index.d.ts +0 -14
  795. package/lib/modules/annotation/hooks/index.js +0 -292
  796. package/lib/modules/annotation/index.d.ts +0 -45
  797. package/lib/modules/annotation/store.d.ts +0 -98
  798. package/lib/modules/annotation/store.js +0 -620
  799. package/lib/modules/annotation/style.css +0 -36
  800. package/lib/modules/annotation/view.d.ts +0 -3
  801. package/lib/modules/annotation/view.js +0 -44
  802. package/lib/modules/components/leave-meeting/store.d.ts +0 -39
  803. package/lib/modules/control-bar/components/annotation-button/index.d.ts +0 -1
  804. package/lib/modules/control-bar/components/annotation-button/index.js +0 -72
  805. package/lib/modules/control-bar/types.d.ts +0 -20
  806. package/lib/modules/dialog/dialogs/pre-setting/index.css +0 -26
  807. package/lib/modules/dialog/dialogs/pre-setting/index.d.ts +0 -6
  808. package/lib/modules/dialog/dialogs/pre-setting/index.js +0 -62
  809. package/lib/modules/dialog/dialogs/widget/electron.d.ts +0 -6
  810. package/lib/modules/dialog/dialogs/widget/electron.js +0 -38
  811. package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +0 -14
  812. package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -110
  813. package/lib/modules/dialog/hooks/useElectron.d.ts +0 -28
  814. package/lib/modules/dialog/hooks/useElectron.js +0 -277
  815. package/lib/modules/dialog/store.d.ts +0 -135
  816. package/lib/modules/dialog/store.js +0 -616
  817. package/lib/modules/event-confirm/components/window/index.d.ts +0 -7
  818. package/lib/modules/event-confirm/components/window/index.js +0 -221
  819. package/lib/modules/event-confirm/index.d.ts +0 -27
  820. package/lib/modules/event-confirm/index.js +0 -76
  821. package/lib/modules/event-confirm/store.d.ts +0 -50
  822. package/lib/modules/event-confirm/store.js +0 -394
  823. package/lib/modules/event-confirm/view.d.ts +0 -2
  824. package/lib/modules/event-confirm/view.js +0 -55
  825. package/lib/modules/event-toast/store.d.ts +0 -27
  826. package/lib/modules/participant/store.d.ts +0 -222
  827. package/lib/modules/participant/store.js +0 -1929
  828. package/lib/modules/pc-audio-connect/index.d.ts +0 -22
  829. package/lib/modules/pc-audio-connect/store.d.ts +0 -46
  830. package/lib/modules/setting/common/advance-link.d.ts +0 -3
  831. package/lib/modules/setting/common/advance-link.js +0 -27
  832. package/lib/modules/setting/common/index.css +0 -26
  833. package/lib/modules/setting/common/useNamespace.d.ts +0 -15
  834. package/lib/modules/setting/common/useNamespace.js +0 -66
  835. package/lib/modules/setting/dialog-wrapper.d.ts +0 -2
  836. package/lib/modules/setting/dialog-wrapper.js +0 -110
  837. package/lib/modules/share-screen/store.d.ts +0 -148
  838. package/lib/modules/share-screen/store.js +0 -950
  839. package/lib/modules/share-screen/types.d.ts +0 -26
  840. package/lib/modules/state-bar/store.d.ts +0 -124
  841. package/lib/modules/whiteboard/components/progress/electron.d.ts +0 -1
  842. package/lib/modules/whiteboard/components/progress/electron.js +0 -33
  843. package/lib/modules/widget/store.d.ts +0 -14
  844. package/lib/providers/annotation-provider.d.ts +0 -124
  845. package/lib/providers/annotation-provider.js +0 -369
  846. package/lib/providers/dialog-provider.d.ts +0 -137
  847. package/lib/providers/dialog-provider.js +0 -194
  848. package/lib/providers/screen-share-provider.d.ts +0 -246
  849. package/lib/providers/screen-share-provider.js +0 -850
  850. package/lib/providers/sharing-provider.d.ts +0 -42
  851. package/lib/providers/sharing-provider.js +0 -228
  852. package/lib/providers/user-setting-storage-provider.d.ts +0 -21
  853. package/lib/providers/whiteboard-provider.d.ts +0 -24
  854. package/lib/shared-data-source/annotation-data.d.ts +0 -17
  855. package/lib/shared-data-source/screen-share-data.d.ts +0 -364
  856. package/lib/shared-data-source/screen-share-data.js +0 -520
  857. package/lib/shared-data-source/speaker-spotlight.d.ts +0 -5
  858. package/lib/shared-data-source/whiteboard-data.d.ts +0 -70
  859. package/lib/utilities/copyText.d.ts +0 -2
  860. package/lib/utilities/renderer-event.d.ts +0 -10
  861. package/lib/utilities/renderer-event.js +0 -95
  862. package/lib/utilities/screen-capture-permission.d.ts +0 -2
  863. package/lib/utilities/screen-capture-permission.js +0 -24
  864. package/lib/utilities/screen.js +0 -53
  865. /package/lib/{modules/action-bar/types.js → creator/type.js} +0 -0
  866. /package/lib/modules/{control-bar/types.js → components/device-control/type.js} +0 -0
  867. /package/lib/modules/{share-screen/types.js → components/leave-meeting/type.js} +0 -0
  868. /package/lib/modules/{annotation/components/expansion/index.d.ts → control-bar/index.dev.d.ts} +0 -0
  869. /package/lib/modules/{event-confirm → dialog/components/confirm}/index.css +0 -0
  870. /package/lib/{utilities → shared-context}/video-track-render-context.d.ts +0 -0
@@ -0,0 +1,2365 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.js");
4
+ require("core-js/modules/es.symbol.description.js");
5
+ require("core-js/modules/es.symbol.to-primitive.js");
6
+ require("core-js/modules/es.error.cause.js");
7
+ require("core-js/modules/es.error.to-string.js");
8
+ require("core-js/modules/es.array.is-array.js");
9
+ require("core-js/modules/es.date.to-primitive.js");
10
+ require("core-js/modules/es.function.name.js");
11
+ require("core-js/modules/es.number.constructor.js");
12
+ require("core-js/modules/es.object.create.js");
13
+ require("core-js/modules/es.object.define-properties.js");
14
+ require("core-js/modules/es.object.define-property.js");
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
17
+ require("core-js/modules/es.object.keys.js");
18
+ require("core-js/modules/esnext.function.metadata.js");
19
+ require("core-js/modules/esnext.symbol.metadata.js");
20
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
21
+ var _typeof = require("@babel/runtime/helpers/typeof");
22
+ Object.defineProperty(exports, "__esModule", {
23
+ value: true
24
+ });
25
+ exports.StoreContext = exports.ParticipantStoreBase = void 0;
26
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
27
+ require("core-js/modules/es.array.concat.js");
28
+ require("core-js/modules/es.array.filter.js");
29
+ require("core-js/modules/es.array.find.js");
30
+ require("core-js/modules/es.array.for-each.js");
31
+ require("core-js/modules/es.array.includes.js");
32
+ require("core-js/modules/es.array.iterator.js");
33
+ require("core-js/modules/es.array.map.js");
34
+ require("core-js/modules/es.array.push.js");
35
+ require("core-js/modules/es.array.some.js");
36
+ require("core-js/modules/es.date.now.js");
37
+ require("core-js/modules/es.date.to-json.js");
38
+ require("core-js/modules/es.function.bind.js");
39
+ require("core-js/modules/es.json.stringify.js");
40
+ require("core-js/modules/es.map.js");
41
+ require("core-js/modules/es.object.to-string.js");
42
+ require("core-js/modules/es.set.js");
43
+ require("core-js/modules/es.string.includes.js");
44
+ require("core-js/modules/es.string.iterator.js");
45
+ require("core-js/modules/es.weak-map.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");
91
+ require("core-js/modules/web.dom-collections.for-each.js");
92
+ require("core-js/modules/web.dom-collections.iterator.js");
93
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
94
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
95
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
96
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
97
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
98
+ var _fcrCore = require("fcr-core");
99
+ var _type = require("fcr-core/lib/type");
100
+ var _error = require("fcr-core/lib/utilities/error");
101
+ var _attendee = require("agora-ui-foundation/lib/components/participants/attendee");
102
+ var _mobx = require("mobx");
103
+ var _constant = require("../../utilities/constant");
104
+ var _decorator = require("agora-foundation/lib/decorator");
105
+ var _mobxUtils = require("mobx-utils");
106
+ var _type2 = require("./type");
107
+ var _i18n = require("agora-ui-foundation/lib/i18n");
108
+ var _type3 = require("fcr-core/lib/room-control/user-control/type");
109
+ var _type4 = require("fcr-core/lib/room-control/privilege-control/type");
110
+ var _type5 = require("../../type");
111
+ var _logger = require("../../utilities/logger");
112
+ var _objectManager = require("../../object-manager");
113
+ var _react = require("react");
114
+ var _operateWaitingroomMember = require("./components/operate-waitingroom-member");
115
+ var _confirmInput = require("./components/confirm-input");
116
+ var _struct = require("./struct");
117
+ var _i18n2 = require("../../hooks/i18n");
118
+ var _jsxRuntime = require("react/jsx-runtime");
119
+ var _ParticipantStoreBase;
120
+ var _initProto, _init__mainList, _init__isChecked, _init__participantsWindowActive, _init_enableParticipantsJoinWithMute, _init_searchText, _init_currentModal, _init_mergeConfirmDialog, _init_mergeUserId, _init_activeTab, _init_interpreterInputLanguageList, _init_newName, _init_allowUnmute, _init_joinWithMuteAudio, _init_showBecomeHostButton, _init__userCount, _setCurrentModalDecs, _setParticipantsWindowActiveDecs, _handlerSearchUserDecs, _openRemoveAdmitWaitingRoomDialogDecs, _setAllowUnmuteDecs, _setAllowJoinWithMuteAudioDecs, _openMuteAllDialogDecs, _handlerRoomControlActionDecs, _moveToMainRoomByUserIdsDecs, _kickOutWaitingRoomAllMemberDecs, _moveToMainRoomAllMemberDecs, _removeWaitingRoomUserDecs, _handleUserCountUpdatedDecs, _handleConfirmChangeNameDecs, _handleCancelChangeNameDecs, _closeChangeNameDialogDecs, _getOutputLanguageDecs, _handlerUserActionDecs, _handleActiveTabDecs, _moveToWaitingRoomByUserIdDecs, _kickOutUserDecs, _onPeerSessionReceivedDecs, _ref;
121
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
122
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
123
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
124
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
125
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
126
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
127
+ 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"); }
128
+ function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
129
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
130
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
131
+ function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
132
+ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
133
+ var _A = /*#__PURE__*/new WeakMap();
134
+ var _B = /*#__PURE__*/new WeakMap();
135
+ var _C = /*#__PURE__*/new WeakMap();
136
+ var _D = /*#__PURE__*/new WeakMap();
137
+ var _E = /*#__PURE__*/new WeakMap();
138
+ var _F = /*#__PURE__*/new WeakMap();
139
+ var _G = /*#__PURE__*/new WeakMap();
140
+ var _H = /*#__PURE__*/new WeakMap();
141
+ var _I = /*#__PURE__*/new WeakMap();
142
+ var _J = /*#__PURE__*/new WeakMap();
143
+ var _K = /*#__PURE__*/new WeakMap();
144
+ var _L = /*#__PURE__*/new WeakMap();
145
+ var _M = /*#__PURE__*/new WeakMap();
146
+ var _N = /*#__PURE__*/new WeakMap();
147
+ var _O = /*#__PURE__*/new WeakMap();
148
+ _ref = (_setCurrentModalDecs = [_mobx.action, _mobx.action.bound], _setParticipantsWindowActiveDecs = [_mobx.action, _mobx.action.bound], _handlerSearchUserDecs = [_mobx.action, _mobx.action.bound], _openRemoveAdmitWaitingRoomDialogDecs = [_mobx.action, _mobx.action.bound], _setAllowUnmuteDecs = [_mobx.action, _mobx.action.bound], _setAllowJoinWithMuteAudioDecs = [_mobx.action, _mobx.action.bound], _openMuteAllDialogDecs = [_mobx.action, _mobx.action.bound], _handlerRoomControlActionDecs = [_mobx.action, _mobx.action.bound], _moveToMainRoomByUserIdsDecs = [_mobx.action, _mobx.action.bound], _kickOutWaitingRoomAllMemberDecs = [_mobx.action, _mobx.action.bound], _moveToMainRoomAllMemberDecs = [_mobx.action, _mobx.action.bound], _removeWaitingRoomUserDecs = [_mobx.action, _mobx.action.bound], _handleUserCountUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleConfirmChangeNameDecs = [_mobx.action, _mobx.action.bound], _handleCancelChangeNameDecs = [_mobx.action, _mobx.action.bound], _closeChangeNameDialogDecs = [_mobx.action, _mobx.action.bound], _getOutputLanguageDecs = [_mobx.action, _mobx.action.bound], _handlerUserActionDecs = [_mobx.action, _mobx.action.bound], _handleActiveTabDecs = [_mobx.action, _mobx.action.bound], _moveToWaitingRoomByUserIdDecs = [_mobx.action, _mobx.action.bound], _kickOutUserDecs = [_mobx.action, _mobx.action.bound], _onPeerSessionReceivedDecs = [_mobx.action, _mobx.action.bound], "logger");
149
+ var ParticipantStoreBase = exports.ParticipantStoreBase = /*#__PURE__*/function () {
150
+ // #endregion
151
+
152
+ function ParticipantStoreBase(_ref2) {
153
+ var _this = this;
154
+ var objectManager = _ref2.objectManager;
155
+ (0, _classCallCheck2["default"])(this, ParticipantStoreBase);
156
+ (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
157
+ prefix: 'ParticipantStore'
158
+ })));
159
+ (0, _defineProperty2["default"])(this, "_disposers", []);
160
+ (0, _defineProperty2["default"])(this, "_unmuteAudioTimestamp", new Map());
161
+ (0, _defineProperty2["default"])(this, "_unmuteVideoTimestamp", new Map());
162
+ (0, _defineProperty2["default"])(this, "_processedUserOpenDeviceRequests", new Set());
163
+ (0, _defineProperty2["default"])(this, "_peerSessionObserver", {
164
+ onPeerSessionReceived: this._onPeerSessionReceived,
165
+ onPeerSessionAccepted: this._onPeerSessionAccepted,
166
+ onPeerSessionRejected: this._onPeerSessionRejected
167
+ });
168
+ (0, _defineProperty2["default"])(this, "_roomStoreObserver", {
169
+ onJoinWaitingRoom: function onJoinWaitingRoom(roomControl) {
170
+ var room = roomControl;
171
+ _this._waitingRoomControl = room;
172
+ var waitingRoomUserControl = room.getUserControl();
173
+ _this._waitingRoomUserControl = waitingRoomUserControl;
174
+ },
175
+ onWaitingRoomManageCanceled: function onWaitingRoomManageCanceled() {
176
+ _this._waitingRoomControl = undefined;
177
+ _this._waitingRoomUserControl = undefined;
178
+ _this.handleActiveTab(_type5.FcrUIRoomType.MAIN_ROOM);
179
+ }
180
+ });
181
+ (0, _defineProperty2["default"])(this, "_privilegeControlObserver", {
182
+ onSecurityInfoUpdated: function onSecurityInfoUpdated(roomId, event) {
183
+ var _event$securityInfo$i;
184
+ if (((_event$securityInfo$i = event.securityInfo.info) === null || _event$securityInfo$i === void 0 ? void 0 : _event$securityInfo$i.action) === _type4.FcrSecurityAction.ChangeName) {
185
+ if (!event.securityInfo.enable) {
186
+ _this._closeChangeNameDialog();
187
+ }
188
+ }
189
+ }
190
+ });
191
+ (0, _defineProperty2["default"])(this, "_userObserver", {
192
+ onRemoteUsersJoined: this._handleRemoteUsersJoined.bind(this),
193
+ onUserPropertiesUpdated: this._handleUserPropertiesUpdated.bind(this),
194
+ onUserInfoUpdated: this._handleUserInfoUpdated.bind(this),
195
+ onAllUserCountUpdated: this._handleUserCountUpdated.bind(this)
196
+ });
197
+ (0, _defineProperty2["default"])(this, "_whitebaordObderver", {
198
+ onActive: function onActive(ownerId, operatorUser) {
199
+ _this._sharedMemberDataSource.updateMemberListWithBoardState();
200
+ },
201
+ onInactive: function onInactive(reason, operatorUser) {
202
+ _this._sharedMemberDataSource.updateMemberListWithBoardState();
203
+ }
204
+ });
205
+ (0, _defineProperty2["default"])(this, "_renamingUserId", '');
206
+ (0, _defineProperty2["default"])(this, "_renamingUserName", '');
207
+ _classPrivateFieldInitSpec(this, _A, _init__mainList(this, []));
208
+ _classPrivateFieldInitSpec(this, _B, _init__isChecked(this, {}));
209
+ _classPrivateFieldInitSpec(this, _C, _init__participantsWindowActive(this, false));
210
+ _classPrivateFieldInitSpec(this, _D, _init_enableParticipantsJoinWithMute(this, false));
211
+ _classPrivateFieldInitSpec(this, _E, _init_searchText(this, ''));
212
+ _classPrivateFieldInitSpec(this, _F, _init_currentModal(this, 'modal'));
213
+ _classPrivateFieldInitSpec(this, _G, _init_mergeConfirmDialog(this, false));
214
+ _classPrivateFieldInitSpec(this, _H, _init_mergeUserId(this, ''));
215
+ _classPrivateFieldInitSpec(this, _I, _init_activeTab(this, _type5.FcrUIRoomType.MAIN_ROOM));
216
+ _classPrivateFieldInitSpec(this, _J, _init_interpreterInputLanguageList(this, []));
217
+ _classPrivateFieldInitSpec(this, _K, _init_newName(this, ''));
218
+ _classPrivateFieldInitSpec(this, _L, _init_allowUnmute(this, false));
219
+ _classPrivateFieldInitSpec(this, _M, _init_joinWithMuteAudio(this, false));
220
+ _classPrivateFieldInitSpec(this, _N, _init_showBecomeHostButton(this, false));
221
+ _classPrivateFieldInitSpec(this, _O, _init__userCount(this, 0));
222
+ (0, _defineProperty2["default"])(this, "allowedOperations", (0, _mobxUtils.computedFn)(function (userId, userRole) {
223
+ return _this.getAllowedOperations(userRole, userId === _this.localUser.userId);
224
+ }));
225
+ (0, _defineProperty2["default"])(this, "checkIsPin", (0, _mobxUtils.computedFn)(function (userId) {
226
+ var _this$userMap$get;
227
+ return !!((_this$userMap$get = _this.userMap.get(userId)) !== null && _this$userMap$get !== void 0 && _this$userMap$get.streams.some(function (stream) {
228
+ return _this.pinedStreamIds.includes(stream.streamId);
229
+ }));
230
+ }));
231
+ (0, _defineProperty2["default"])(this, "getAllowedOperations", (0, _mobxUtils.computedFn)(function (targetRole, isSelf) {
232
+ return _this._privilegeProvider.getAllowedOperations(targetRole, isSelf);
233
+ }));
234
+ /**
235
+ * 格式化用户数据为UI显示格式
236
+ * @param user 原始用户数据
237
+ * @returns 格式化后的用户数据
238
+ */
239
+ (0, _defineProperty2["default"])(this, "_formatUser", function (user) {
240
+ try {
241
+ // 参数验证
242
+ if (!user || !user.userId || !user.userInfo) {
243
+ _this.logger.warn('Invalid user data provided to _formatUser:', user);
244
+ return _this._getDefaultUserData();
245
+ }
246
+ var _user$streams = user.streams,
247
+ userStreams = _user$streams === void 0 ? [] : _user$streams;
248
+ var isSelf = user.userId === _this.localUser.userId;
249
+
250
+ // 获取基础信息
251
+ var baseInfo = _this._getUserBaseInfo(user, isSelf);
252
+
253
+ // 根据连接器类型处理设备信息
254
+ var deviceInfo = _this._getUserDeviceInfo(user, userStreams, isSelf);
255
+
256
+ // 获取流状态信息
257
+ var streamInfo = _this._getUserStreamInfo(user, userStreams);
258
+
259
+ // 组合所有信息
260
+ return _objectSpread(_objectSpread(_objectSpread({}, baseInfo), deviceInfo), streamInfo);
261
+ } catch (error) {
262
+ _this.logger.error('Error formatting user data:', error, 'user:', user);
263
+ return _this._getDefaultUserData();
264
+ }
265
+ });
266
+ // Get all required objects from objectManager
267
+ this._roomStore = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ROOM_PROVIDER);
268
+ this._roomControl = this._roomStore.currentRoomControl;
269
+ this._streamControl = this._roomControl.getStreamControl();
270
+ this._userControl = this._roomControl.getUserControl();
271
+ this._chatProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_CHAT_PROVIDER);
272
+ this._privilegeProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_PRIVILEGE_PROVIDER);
273
+ this._deviceStore = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_DEVICE_PROVIDER);
274
+ this._deviceStreamStore = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_DEVICE_STREAM_PROVIDER);
275
+ this._dialogProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_DIALOG_PROVIDER);
276
+ this._messageProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_MESSAGE_PROVIDER);
277
+ this._abilityProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ABILITY_PROVIDER);
278
+ this._eventProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_EVENT_PROVIDER);
279
+ this._screenShareProvider = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_SCREEN_SHARE_PROVIDER);
280
+ this._userCount = this._userControl.getAllUserCount();
281
+
282
+ // Get shared data sources
283
+ this._sharedPinDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_PIN_DATA_SOURCE);
284
+ this._sharedLayoutDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_LAYOUT_DATA_SOURCE);
285
+ this._sharedVideoWindowDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_VIDEO_WINDOW_DATA_SOURCE);
286
+ this._sharedWaitingRoomDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_WAITING_ROOM_DATA_SOURCE);
287
+ this._sharedInterpreterDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_INTERPRETER_DATA_SOURCE);
288
+ this._sharedMemberDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_MEMBER_DATA_SOURCE);
289
+ this._sharedChatDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_CHAT_DATA_SOURCE);
290
+ this._sharedSettingDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_SETTING_DATA_SOURCE);
291
+ this._sharedSecurityDataSource = objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_SECURITY_DATA_SOURCE);
292
+
293
+ // Try to get session provider if available
294
+ try {
295
+ this._peerSessionControl = objectManager.getObject(_objectManager.FcrUIObjectKeys.P_SESSION_PROVIDER);
296
+ } catch (e) {
297
+ // Session provider may not be available in all contexts
298
+ this._peerSessionControl = undefined;
299
+ }
300
+ this._userControl.addObserver(this._userObserver);
301
+ this._peerSessionControl.addObserver(this._peerSessionObserver);
302
+ this._roomControl.getSharingControl().getBoardControl().addObserver(this._whitebaordObderver);
303
+ this._roomControl.getPrivilegeControl().addObserver(this._privilegeControlObserver);
304
+ this._roomStore.addObserver(this._roomStoreObserver);
305
+ this._eventProvider.addObserver({
306
+ onEvent: this._handleEvent
307
+ });
308
+ this.allowUnmute = this._privilegeProvider.allowUnmuteSelfAudio();
309
+ this.joinWithMuteAudio = this._privilegeProvider.allowJoinWithMuteAudio();
310
+ this._getOutputLanguage();
311
+ this.showBecomeHostButton = !this._sharedMemberDataSource.memberList.some(function (user) {
312
+ return user.userInfo.userRole === _type.FcrUserRole.HOST;
313
+ });
314
+
315
+ // 设置等候室用户数量监听
316
+ this._setupWaitingRoomUserCountListener();
317
+ }
318
+ return (0, _createClass2["default"])(ParticipantStoreBase, [{
319
+ key: "_mainList",
320
+ get: function get() {
321
+ return _classPrivateFieldGet(_A, this);
322
+ },
323
+ set: function set(v) {
324
+ _classPrivateFieldSet(_A, this, v);
325
+ }
326
+ }, {
327
+ key: "_isChecked",
328
+ get: function get() {
329
+ return _classPrivateFieldGet(_B, this);
330
+ },
331
+ set: function set(v) {
332
+ _classPrivateFieldSet(_B, this, v);
333
+ }
334
+ }, {
335
+ key: "_participantsWindowActive",
336
+ get: function get() {
337
+ return _classPrivateFieldGet(_C, this);
338
+ },
339
+ set: function set(v) {
340
+ _classPrivateFieldSet(_C, this, v);
341
+ }
342
+ }, {
343
+ key: "enableParticipantsJoinWithMute",
344
+ get: function get() {
345
+ return _classPrivateFieldGet(_D, this);
346
+ },
347
+ set: function set(v) {
348
+ _classPrivateFieldSet(_D, this, v);
349
+ }
350
+ }, {
351
+ key: "searchText",
352
+ get: function get() {
353
+ return _classPrivateFieldGet(_E, this);
354
+ },
355
+ set: function set(v) {
356
+ _classPrivateFieldSet(_E, this, v);
357
+ }
358
+ }, {
359
+ key: "currentModal",
360
+ get: function get() {
361
+ return _classPrivateFieldGet(_F, this);
362
+ },
363
+ set: function set(v) {
364
+ _classPrivateFieldSet(_F, this, v);
365
+ }
366
+ }, {
367
+ key: "mergeConfirmDialog",
368
+ get: function get() {
369
+ return _classPrivateFieldGet(_G, this);
370
+ },
371
+ set: function set(v) {
372
+ _classPrivateFieldSet(_G, this, v);
373
+ }
374
+ }, {
375
+ key: "mergeUserId",
376
+ get: function get() {
377
+ return _classPrivateFieldGet(_H, this);
378
+ },
379
+ set: function set(v) {
380
+ _classPrivateFieldSet(_H, this, v);
381
+ }
382
+ }, {
383
+ key: "activeTab",
384
+ get: function get() {
385
+ return _classPrivateFieldGet(_I, this);
386
+ },
387
+ set: function set(v) {
388
+ _classPrivateFieldSet(_I, this, v);
389
+ }
390
+ }, {
391
+ key: "interpreterInputLanguageList",
392
+ get: function get() {
393
+ return _classPrivateFieldGet(_J, this);
394
+ },
395
+ set: function set(v) {
396
+ _classPrivateFieldSet(_J, this, v);
397
+ }
398
+ }, {
399
+ key: "newName",
400
+ get: function get() {
401
+ return _classPrivateFieldGet(_K, this);
402
+ },
403
+ set: function set(v) {
404
+ _classPrivateFieldSet(_K, this, v);
405
+ }
406
+ }, {
407
+ key: "allowUnmute",
408
+ get: function get() {
409
+ return _classPrivateFieldGet(_L, this);
410
+ },
411
+ set: function set(v) {
412
+ _classPrivateFieldSet(_L, this, v);
413
+ }
414
+ }, {
415
+ key: "joinWithMuteAudio",
416
+ get: function get() {
417
+ return _classPrivateFieldGet(_M, this);
418
+ },
419
+ set: function set(v) {
420
+ _classPrivateFieldSet(_M, this, v);
421
+ }
422
+ }, {
423
+ key: "showBecomeHostButton",
424
+ get: function get() {
425
+ return _classPrivateFieldGet(_N, this);
426
+ },
427
+ set: function set(v) {
428
+ _classPrivateFieldSet(_N, this, v);
429
+ }
430
+ }, {
431
+ key: "_userCount",
432
+ get: // #region getters
433
+ function get() {
434
+ return _classPrivateFieldGet(_O, this);
435
+ },
436
+ set: function set(v) {
437
+ _classPrivateFieldSet(_O, this, v);
438
+ }
439
+ }, {
440
+ key: "renamingUserName",
441
+ get: function get() {
442
+ return this._renamingUserName;
443
+ }
444
+ }, {
445
+ key: "audioVolumeMap",
446
+ get: function get() {
447
+ return this._sharedMemberDataSource.audioVolumeMap;
448
+ }
449
+ }, {
450
+ key: "localUser",
451
+ get: function get() {
452
+ return this._sharedMemberDataSource.localUser;
453
+ }
454
+ }, {
455
+ key: "localUserRole",
456
+ get: function get() {
457
+ return this._sharedMemberDataSource.localUserRole;
458
+ }
459
+ }, {
460
+ key: "isLocalUserHost",
461
+ get: function get() {
462
+ return this._sharedMemberDataSource.isLocalUserHost;
463
+ }
464
+ }, {
465
+ key: "enableSpotlight",
466
+ get: function get() {
467
+ return this._sharedSettingDataSource.setting.spotlightEnabled;
468
+ }
469
+ }, {
470
+ key: "userListSource",
471
+ get: function get() {
472
+ if (this.activeTab === _type5.FcrUIRoomType.MAIN_ROOM) {
473
+ return this._sharedMemberDataSource.memberList;
474
+ } else {
475
+ return this._sharedWaitingRoomDataSource.waitingRoomDataSource.list;
476
+ }
477
+ }
478
+ }, {
479
+ key: "spotlightStreamId",
480
+ get: function get() {
481
+ return this._sharedVideoWindowDataSource.spotlightStreamId;
482
+ }
483
+ }, {
484
+ key: "mergeUserInfo",
485
+ get: function get() {
486
+ var _this$userListSource$,
487
+ _this2 = this;
488
+ return (_this$userListSource$ = this.userListSource.find(function (user) {
489
+ return user.userId === _this2.mergeUserId;
490
+ })) === null || _this$userListSource$ === void 0 ? void 0 : _this$userListSource$.userInfo;
491
+ }
492
+ }, {
493
+ key: "userMap",
494
+ get: function get() {
495
+ var res = new Map();
496
+ this.userListSource.forEach(function (u) {
497
+ res.set(u.userId, u);
498
+ });
499
+ return res;
500
+ }
501
+ }, {
502
+ key: "userCount",
503
+ get: function get() {
504
+ return this._userCount;
505
+ }
506
+ }, {
507
+ key: "allowUnmuteSelfAudio",
508
+ get: function get() {
509
+ return this.checkedStateMap.unmuteYourself;
510
+ }
511
+ }, {
512
+ key: "allowJoinWithMuteAudio",
513
+ get: function get() {
514
+ return this.checkedStateMap.enableJoinWithAudio;
515
+ }
516
+ }, {
517
+ key: "allowUnmuteSelfVideo",
518
+ get: function get() {
519
+ return this.checkedStateMap.startVideo;
520
+ }
521
+ }, {
522
+ key: "isLockRoomEnabled",
523
+ get: function get() {
524
+ return this.checkedStateMap.lockRoom;
525
+ }
526
+ }, {
527
+ key: "isWaitingRoomEnabled",
528
+ get: function get() {
529
+ return this._privilegeProvider.isWaitingRoomEnabled();
530
+ }
531
+ }, {
532
+ key: "allowChangeSelfName",
533
+ get: function get() {
534
+ return this.checkedStateMap.rename;
535
+ }
536
+ }, {
537
+ key: "pinedStreamIds",
538
+ get: function get() {
539
+ return this._mainList.filter(function (i) {
540
+ return i.isPin;
541
+ }).map(function (i) {
542
+ return i.windowId;
543
+ });
544
+ }
545
+ }, {
546
+ key: "hasPinnedStream",
547
+ get: function get() {
548
+ return this._mainList.some(function (i) {
549
+ return i.isPin;
550
+ });
551
+ }
552
+ }, {
553
+ key: "userList",
554
+ get: function get() {
555
+ var _this3 = this;
556
+ var list = this.userListSource;
557
+ if (this.searchText.length) {
558
+ list = list.filter(function (user) {
559
+ return user.userInfo.userName.toLocaleLowerCase().includes(_this3.searchText.toLocaleLowerCase());
560
+ });
561
+ }
562
+ var uiDataList = list.map(function (user) {
563
+ return _this3._formatUser(user);
564
+ });
565
+ return uiDataList;
566
+ }
567
+ }, {
568
+ key: "isLocalScreenSharing",
569
+ get: function get() {
570
+ return this._screenShareProvider.isLocalUserScreenSharing;
571
+ }
572
+ }, {
573
+ key: "localMicVolume",
574
+ get: function get() {
575
+ return this._deviceStore.microphoneVolumeLevel;
576
+ }
577
+ }, {
578
+ key: "hasRevokeHostPermission",
579
+ get: function get() {
580
+ return this._privilegeProvider.hasRevokeHostPermission() && this.localUserRole !== _type.FcrUserRole.HOST;
581
+ }
582
+ }, {
583
+ key: "interpreterUserList",
584
+ get: function get() {
585
+ return this._sharedInterpreterDataSource.interpreterUserList;
586
+ }
587
+ }, {
588
+ key: "isInterpreterEnabled",
589
+ get: function get() {
590
+ return this._sharedInterpreterDataSource.isInterpreterEnabled;
591
+ }
592
+ }, {
593
+ key: "waitingRoomUserCount",
594
+ get: function get() {
595
+ return this._sharedWaitingRoomDataSource.totalWaitingRoomUser;
596
+ }
597
+ }, {
598
+ key: "isNewWaitingRoomUserEnter",
599
+ get: function get() {
600
+ return this._sharedWaitingRoomDataSource.unReadState;
601
+ }
602
+ }, {
603
+ key: "isHostKeyEnabled",
604
+ get: function get() {
605
+ return this._roomControl.isHostKeyEnabled();
606
+ }
607
+ }, {
608
+ key: "hasInvite",
609
+ get: function get() {
610
+ return this._abilityProvider.isRoomDetailSupported();
611
+ }
612
+ }, {
613
+ key: "checkedStateMap",
614
+ get: function get() {
615
+ return this._sharedSecurityDataSource.checkedStateMap;
616
+ }
617
+ }, {
618
+ key: "release",
619
+ value: function release() {
620
+ this._userControl.removeObserver(this._userObserver);
621
+ this._peerSessionControl.removeObserver(this._peerSessionObserver);
622
+ this._roomControl.getSharingControl().getBoardControl().removeObserver(this._whitebaordObderver);
623
+ this._roomControl.getPrivilegeControl().removeObserver(this._privilegeControlObserver);
624
+ this._roomStore.removeObserver(this._roomStoreObserver);
625
+ this._eventProvider.removeObserver({
626
+ onEvent: this._handleEvent
627
+ });
628
+ this._disposers.forEach(function (disposer) {
629
+ return disposer();
630
+ });
631
+ }
632
+ }, {
633
+ key: "hasMutePermission",
634
+ value: function hasMutePermission(targetRole) {
635
+ return this._privilegeProvider.hasMutePermission(targetRole);
636
+ }
637
+ }, {
638
+ key: "hasWaitingRoomPermission",
639
+ value: function hasWaitingRoomPermission() {
640
+ return this._privilegeProvider.isWaitingRoomEnabled() && this._privilegeProvider.hasWaitingRoomPermission();
641
+ }
642
+ }, {
643
+ key: "hasUnmutePermission",
644
+ value: function hasUnmutePermission(targetRole) {
645
+ return this._privilegeProvider.hasUnmutePermission(targetRole);
646
+ }
647
+ }, {
648
+ key: "hasRequestStartAudioPermission",
649
+ value: function hasRequestStartAudioPermission(targetRole) {
650
+ return this._privilegeProvider.hasRequestStartAudioPermission(targetRole);
651
+ }
652
+ }, {
653
+ key: "setCurrentModal",
654
+ value: function setCurrentModal(modal) {
655
+ this.currentModal = modal;
656
+ }
657
+ }, {
658
+ key: "closeParticipantsAside",
659
+ value: function closeParticipantsAside() {
660
+ this.setLayoutAsideLayout({
661
+ participant: false
662
+ });
663
+ }
664
+ }, {
665
+ key: "setParticipantsRenderAt",
666
+ value: function setParticipantsRenderAt(renderPosition) {
667
+ this._sharedLayoutDataSource.setParticipantsRenderAt(renderPosition);
668
+ }
669
+ }, {
670
+ key: "setLayoutAsideLayout",
671
+ value: function setLayoutAsideLayout(params) {
672
+ this._sharedLayoutDataSource.setAsideLayout(params);
673
+ }
674
+ }, {
675
+ key: "getLayoutChatRenderAt",
676
+ get: function get() {
677
+ return this._sharedLayoutDataSource.chatRenderAt;
678
+ }
679
+
680
+ // TODO: 这里超级奇怪,传入的变量名是activeTab,但是实际上是roomType
681
+ // 看上去像是有个bug
682
+ }, {
683
+ key: "setChatActiveTab",
684
+ value: function setChatActiveTab(activeTab) {
685
+ console.log('cjtest setChatActiveTab', activeTab);
686
+ this._sharedChatDataSource.activeTab = activeTab;
687
+ }
688
+ }, {
689
+ key: "closeParticipantsWindow",
690
+ value: function closeParticipantsWindow() {
691
+ this.closeDialog(_constant.FcrUIDialogKey.PARTICIPANT);
692
+ }
693
+ }, {
694
+ key: "openDialog",
695
+ value: function openDialog(key) {
696
+ this._openDialog(key);
697
+ }
698
+ }, {
699
+ key: "closeDialog",
700
+ value: function closeDialog(key) {
701
+ this._dialogProvider.closeDialog(key);
702
+ }
703
+ }, {
704
+ key: "openConfirmDialog",
705
+ value: function openConfirmDialog(params, key) {
706
+ var _this4 = this;
707
+ var dialogId = this._dialogProvider.openConfirmDialog(_objectSpread(_objectSpread({}, params), {}, {
708
+ key: key,
709
+ onCancel: function onCancel() {
710
+ _this4.closeConfirmDialog(dialogId);
711
+ params.onCancel && params.onCancel();
712
+ },
713
+ onOk: function onOk() {
714
+ _this4.closeConfirmDialog(dialogId);
715
+ params.onOk && params.onOk();
716
+ }
717
+ }));
718
+ this.logger.info("open Confirm Dialog: ".concat(JSON.stringify(params), ",dialogId: ").concat(dialogId));
719
+ return dialogId;
720
+ }
721
+ }, {
722
+ key: "closeConfirmDialog",
723
+ value: function closeConfirmDialog(id) {
724
+ this._dialogProvider.closeConfirmDialog(id);
725
+ }
726
+ }, {
727
+ key: "setParticipantsWindowActive",
728
+ value: function setParticipantsWindowActive(active) {
729
+ var _this5 = this;
730
+ (0, _mobx.runInAction)(function () {
731
+ _this5._participantsWindowActive = active;
732
+ if (!active) {
733
+ _this5.setCurrentModal('modal');
734
+ }
735
+ });
736
+ }
737
+ }, {
738
+ key: "handlerSearchUser",
739
+ value: function handlerSearchUser(searchText) {
740
+ this.searchText = searchText;
741
+ }
742
+ }, {
743
+ key: "onInvite",
744
+ value: function onInvite() {
745
+ this._openDialog(_constant.FcrUIDialogKey.INVITE);
746
+ }
747
+ }, {
748
+ key: "setMergeConfirmDialog",
749
+ value: function setMergeConfirmDialog(visible) {
750
+ this.mergeConfirmDialog = visible;
751
+ }
752
+ }, {
753
+ key: "mergeConfirmDialogOk",
754
+ value: function mergeConfirmDialogOk(userId) {
755
+ var _this$userMap$get2;
756
+ this._streamControl.mergeAudioStream(userId);
757
+ this.setMergeConfirmDialog(false);
758
+ this._showToast((0, _i18n.transI18n)('fmt_PSTN_toast_merged', {
759
+ reason1: (_this$userMap$get2 = this.userMap.get(userId)) === null || _this$userMap$get2 === void 0 ? void 0 : _this$userMap$get2.userInfo.userName
760
+ }));
761
+ }
762
+ }, {
763
+ key: "openRemoveAdmitWaitingRoomDialog",
764
+ value: function openRemoveAdmitWaitingRoomDialog(params) {
765
+ var _this6 = this;
766
+ var buttonTextMap = {
767
+ removeAll: (0, _i18n.transI18n)('fmt_waitingroom_sidebar_button_removeall'),
768
+ admitAll: (0, _i18n.transI18n)('fmt_waitingroom_sidebar_button_admitall'),
769
+ remove: (0, _i18n.transI18n)('fmt_waitingroom_sidebar_popup_button_remove')
770
+ };
771
+ this._isChecked[params.type] = false;
772
+ var dialogId = this.openConfirmDialog({
773
+ title: params.title,
774
+ alignCenter: true,
775
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_operateWaitingroomMember.OperateWaitingRoomMemberDialog, {
776
+ type: params.type,
777
+ userId: params.userId,
778
+ tooltip: params.tooltip,
779
+ title: params.title,
780
+ onChecked: function onChecked(isChecked) {
781
+ _this6._isChecked[params.type] = isChecked;
782
+ }
783
+ }),
784
+ onOk: function onOk() {
785
+ if (params.type === 'remove') {
786
+ _this6.removeWaitingRoomUser(params.userId, _this6._isChecked[params.type] ? _type3.FcrUserKickedOutType.Forever : _type3.FcrUserKickedOutType.Once);
787
+ }
788
+ if (params.type === 'removeAll') {
789
+ _this6.kickOutWaitingRoomAllMember(_this6._isChecked[params.type] ? _type3.FcrUserKickedOutType.Forever : _type3.FcrUserKickedOutType.Once);
790
+ }
791
+ if (params.type === 'admitAll') {
792
+ _this6.moveToMainRoomAllMember();
793
+ }
794
+ _this6.closeConfirmDialog(dialogId);
795
+ },
796
+ okText: buttonTextMap[params.type],
797
+ okButtonProps: {
798
+ styleType: params.type === 'remove' || params.type === 'removeAll' ? 'danger' : undefined
799
+ }
800
+ });
801
+ }
802
+ }, {
803
+ key: "setAllowUnmute",
804
+ value: function setAllowUnmute(checked) {
805
+ this.allowUnmute = checked;
806
+ }
807
+ }, {
808
+ key: "setAllowJoinWithMuteAudio",
809
+ value: function setAllowJoinWithMuteAudio(checked) {
810
+ this.joinWithMuteAudio = checked;
811
+ }
812
+ }, {
813
+ key: "openMuteAllDialog",
814
+ value: function openMuteAllDialog() {
815
+ this.allowUnmute = this.allowUnmuteSelfAudio;
816
+ this.joinWithMuteAudio = this.allowJoinWithMuteAudio;
817
+ this._dialogProvider.openDialog(_constant.FcrUIDialogKey.MUTE_ALL);
818
+ }
819
+ }, {
820
+ key: "handlerRoomControlAction",
821
+ value: function handlerRoomControlAction(action, data) {
822
+ console.log('handlerRoomControlAction', action, data);
823
+ switch (action) {
824
+ case _constant.FcrUIRoomControlType.MUTE_ALL_AUDIO:
825
+ this._muteAllAudio(data.allowUnmute, data.joinWithMuteAudio);
826
+ break;
827
+ case _constant.FcrUIRoomControlType.UNMUTE_ALL_AUDIO:
828
+ this._unmuteAllAudio();
829
+ break;
830
+ case _constant.FcrUIRoomControlType.ALLOW_ATTENDEE_TO_UNMUTE:
831
+ this._enableSelfUnmute(data);
832
+ break;
833
+ case _constant.FcrUIRoomControlType.ALLOW_ATTENDEE_TO_OPEN_CAMERA:
834
+ this._enableOpenVideo(data);
835
+ break;
836
+ case _constant.FcrUIRoomControlType.REVOKE_HOST:
837
+ this._revokeHost();
838
+ break;
839
+ case _constant.FcrUIRoomControlType.LOCK_ROOM:
840
+ this._lockRoom(data);
841
+ break;
842
+ case _constant.FcrUIRoomControlType.RENAME:
843
+ this._enableRename(data);
844
+ break;
845
+ case _constant.FcrUIRoomControlType.JOIN_WITH_MUTE_AUDIO:
846
+ this.enableJoinWithMuteAudio(data);
847
+ break;
848
+ case _constant.FcrUIRoomControlType.ACTION_REVOKE_HOST_BY_TICKET:
849
+ this._revokeHostByTicket();
850
+ break;
851
+ case _constant.FcrUIRoomControlType.ACTION_CHANGE_NAME:
852
+ this._openChangeNameDialog(this.localUser.userId);
853
+ break;
854
+ }
855
+ }
856
+ }, {
857
+ key: "moveParticipantFromDialogToAside",
858
+ value: function moveParticipantFromDialogToAside() {
859
+ this.closeParticipantsWindow();
860
+ this.setParticipantsRenderAt('aside');
861
+ this.setLayoutAsideLayout({
862
+ participant: true
863
+ });
864
+ }
865
+ }, {
866
+ key: "_revokeHostByTicket",
867
+ value: function _revokeHostByTicket() {
868
+ var _this7 = this;
869
+ var hostKey = '';
870
+ var errMessage = {
871
+ '732403104': (0, _i18n.transI18n)('fmt_hostkey_meetingroom_toast_unable_to_claim_host'),
872
+ '732403105': (0, _i18n.transI18n)('fmt_hostkey_input_hostkey_tips_incorrect_key')
873
+ };
874
+ var dialogId = this.openConfirmDialog({
875
+ title: (0, _i18n.transI18n)('fmt_hostkey_input_hostkey_title_enter_key'),
876
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirmInput.FcrConfirmInput, {
877
+ type: "number",
878
+ placeholder: (0, _i18n.transI18n)('fmt_hostkey_input_hostkey_text_hint_enter_key'),
879
+ onChange: function onChange(value) {
880
+ hostKey = String(value);
881
+ }
882
+ }),
883
+ alignCenter: true,
884
+ closable: false,
885
+ onOk: function () {
886
+ var _onOk = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
887
+ return _regenerator["default"].wrap(function (_context) {
888
+ while (1) switch (_context.prev = _context.next) {
889
+ case 0:
890
+ return _context.abrupt("return", _this7._userControl.claimHost(hostKey).then(function (res) {
891
+ _this7._showToast((0, _i18n.transI18n)('fmt_hostkey_meetingroom_toast_now_host'));
892
+ })["catch"](function (err) {
893
+ if (err.code === '732403105') return {
894
+ message: errMessage === null || errMessage === void 0 ? void 0 : errMessage["".concat(err.code)]
895
+ };
896
+ _this7._showToast(err.code === 0 ? (0, _i18n.transI18n)('fmt_hostkey_meetingroom_toast_now_host') : (errMessage === null || errMessage === void 0 ? void 0 : errMessage["".concat(err.code)]) || err.message, err.code === 0 ? 'normal' : 'error');
897
+ }));
898
+ case 1:
899
+ case "end":
900
+ return _context.stop();
901
+ }
902
+ }, _callee);
903
+ }));
904
+ function onOk() {
905
+ return _onOk.apply(this, arguments);
906
+ }
907
+ return onOk;
908
+ }(),
909
+ onCancel: function onCancel() {
910
+ _this7.closeConfirmDialog(dialogId);
911
+ }
912
+ });
913
+ }
914
+
915
+ // room control actions
916
+ }, {
917
+ key: "_muteAllAudio",
918
+ value: function _muteAllAudio(allowUnmute, JoinWithMuteAudio) {
919
+ var _this8 = this;
920
+ // 使用 runInAction 将所有状态更新包装在一个事务中,避免多次渲染
921
+ (0, _mobx.runInAction)(function () {
922
+ _this8._privilegeProvider.setAllowJoinWithMuteAudio(JoinWithMuteAudio);
923
+ _this8._privilegeProvider.setAllowUnmuteSelfAudio(allowUnmute);
924
+ _this8._privilegeProvider.muteAll();
925
+ _this8._sharedSecurityDataSource.setCheckedStateMap(_objectSpread(_objectSpread({}, _this8.checkedStateMap), {
926
+ enableJoinWithAudio: JoinWithMuteAudio,
927
+ unmuteYourself: allowUnmute
928
+ }));
929
+ });
930
+ this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_allmuted'));
931
+ }
932
+ }, {
933
+ key: "_unmuteAllAudio",
934
+ value: function _unmuteAllAudio() {
935
+ var _this9 = this;
936
+ this._setPrivilegeAndUpdateUI(function () {
937
+ return _this9._privilegeProvider.setAllowUnmuteSelfAudio(true);
938
+ }, {
939
+ unmuteYourself: true
940
+ });
941
+ }
942
+
943
+ //允许自我解除静音
944
+ }, {
945
+ key: "_enableSelfUnmute",
946
+ value: function _enableSelfUnmute(enable) {
947
+ var _this0 = this;
948
+ this._setPrivilegeAndUpdateUI(function () {
949
+ return _this0._privilegeProvider.setAllowUnmuteSelfAudio(enable);
950
+ }, {
951
+ unmuteYourself: enable
952
+ });
953
+ }
954
+ }, {
955
+ key: "_enableOpenVideo",
956
+ value: function _enableOpenVideo(enable) {
957
+ var _this1 = this;
958
+ this._setPrivilegeAndUpdateUI(function () {
959
+ return _this1._privilegeProvider.setAllowUnmuteSelfVideo(enable);
960
+ }, {
961
+ startVideo: enable
962
+ });
963
+ }
964
+ }, {
965
+ key: "_revokeHost",
966
+ value: function _revokeHost() {
967
+ if (!this._privilegeProvider.hasRevokeHostPermission() || this.localUser.userRole === _type.FcrUserRole.HOST) {
968
+ return;
969
+ }
970
+ this._userControl.revokeHost();
971
+ }
972
+ }, {
973
+ key: "_lockRoom",
974
+ value: function _lockRoom(enable) {
975
+ var _this10 = this;
976
+ this._showToast(enable ? (0, _i18n.transI18n)('fmt_security_tips_lock_meeting_on') : (0, _i18n.transI18n)('fmt_security_tips_lock_meeting_off'), 'info');
977
+ this._setPrivilegeAndUpdateUI(function () {
978
+ return _this10._privilegeProvider.setLockRoomEnabled(enable);
979
+ }, {
980
+ lockRoom: enable
981
+ });
982
+ }
983
+ }, {
984
+ key: "_enableRename",
985
+ value: function _enableRename(enable) {
986
+ var _this11 = this;
987
+ this._setPrivilegeAndUpdateUI(function () {
988
+ return _this11._privilegeProvider.setAllowChangeSelfName(enable);
989
+ }, {
990
+ rename: enable
991
+ });
992
+ }
993
+
994
+ // 所有人加入会议时静音
995
+ }, {
996
+ key: "enableJoinWithMuteAudio",
997
+ value: function enableJoinWithMuteAudio(enable) {
998
+ var _this12 = this;
999
+ this._setPrivilegeAndUpdateUI(function () {
1000
+ return _this12._privilegeProvider.setAllowJoinWithMuteAudio(enable);
1001
+ }, {
1002
+ enableJoinWithAudio: enable
1003
+ });
1004
+ }
1005
+ }, {
1006
+ key: "moveToMainRoomByUserIds",
1007
+ value: function moveToMainRoomByUserIds(userId) {
1008
+ if (this._waitingRoomControl) {
1009
+ this._waitingRoomControl.moveToMainRoomByUserIds(userId);
1010
+ }
1011
+ }
1012
+ }, {
1013
+ key: "kickOutWaitingRoomAllMember",
1014
+ value: function () {
1015
+ var _kickOutWaitingRoomAllMember = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(type) {
1016
+ var _this$_waitingRoomUse;
1017
+ return _regenerator["default"].wrap(function (_context2) {
1018
+ while (1) switch (_context2.prev = _context2.next) {
1019
+ case 0:
1020
+ _context2.next = 1;
1021
+ return (_this$_waitingRoomUse = this._waitingRoomUserControl) === null || _this$_waitingRoomUse === void 0 ? void 0 : _this$_waitingRoomUse.kickOutByUserRoles([_type.FcrUserRole.PARTICIPANT], type);
1022
+ case 1:
1023
+ this._showToast((0, _i18n.transI18n)('fmt_waitingroom_mobile_memberlist_tips_all_removed'));
1024
+ case 2:
1025
+ case "end":
1026
+ return _context2.stop();
1027
+ }
1028
+ }, _callee2, this);
1029
+ }));
1030
+ function kickOutWaitingRoomAllMember(_x) {
1031
+ return _kickOutWaitingRoomAllMember.apply(this, arguments);
1032
+ }
1033
+ return kickOutWaitingRoomAllMember;
1034
+ }()
1035
+ }, {
1036
+ key: "moveToMainRoomAllMember",
1037
+ value: function () {
1038
+ var _moveToMainRoomAllMember = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
1039
+ var _this$_waitingRoomCon;
1040
+ return _regenerator["default"].wrap(function (_context3) {
1041
+ while (1) switch (_context3.prev = _context3.next) {
1042
+ case 0:
1043
+ _context3.next = 1;
1044
+ return (_this$_waitingRoomCon = this._waitingRoomControl) === null || _this$_waitingRoomCon === void 0 ? void 0 : _this$_waitingRoomCon.moveToMainRoomByUserRoles([_type.FcrUserRole.PARTICIPANT]);
1045
+ case 1:
1046
+ this._showToast((0, _i18n.transI18n)('fmt_waitingroom_mobile_memberlist_tips_all_amitted'));
1047
+ case 2:
1048
+ case "end":
1049
+ return _context3.stop();
1050
+ }
1051
+ }, _callee3, this);
1052
+ }));
1053
+ function moveToMainRoomAllMember() {
1054
+ return _moveToMainRoomAllMember.apply(this, arguments);
1055
+ }
1056
+ return moveToMainRoomAllMember;
1057
+ }()
1058
+ }, {
1059
+ key: "removeWaitingRoomUser",
1060
+ value: function removeWaitingRoomUser(userId, type) {
1061
+ var _this$_waitingRoomUse2;
1062
+ (_this$_waitingRoomUse2 = this._waitingRoomUserControl) === null || _this$_waitingRoomUse2 === void 0 || _this$_waitingRoomUse2.kickOutByUserIds([userId], type);
1063
+ }
1064
+ }, {
1065
+ key: "removePin",
1066
+ value: function removePin(userId) {
1067
+ var streamId = this._getPinStreamIdFromUser(userId);
1068
+ if (streamId) {
1069
+ this._sharedPinDataSource.removePin(streamId);
1070
+ }
1071
+ }
1072
+ }, {
1073
+ key: "isHostSupportedByPlatform",
1074
+ value: function isHostSupportedByPlatform(userId) {
1075
+ var _this$userMap$get3;
1076
+ var user = (_this$userMap$get3 = this.userMap.get(userId)) === null || _this$userMap$get3 === void 0 ? void 0 : _this$userMap$get3.userInfo;
1077
+ if (!user) return false;
1078
+ if (!user.platform) return false;
1079
+ return this._abilityProvider.isHostSupportedByPlatform(user.platform);
1080
+ }
1081
+ }, {
1082
+ key: "addPin",
1083
+ value: function addPin(userId) {
1084
+ var shouldHideMyVideo = this._sharedSettingDataSource.setting.shouldHideMyVideo;
1085
+ if (shouldHideMyVideo && userId === this.localUser.userId) {
1086
+ this._showToast((0, _i18n.transI18n)('fmt_internalsetting_other_hide_my_window_pin_cancelled'), 'error');
1087
+ return;
1088
+ }
1089
+ var streamId = this._getPinStreamIdFromUser(userId);
1090
+ if (streamId) {
1091
+ this._sharedPinDataSource.addPin(streamId);
1092
+ }
1093
+ }
1094
+ }, {
1095
+ key: "_getPinStreamIdFromUser",
1096
+ value: function _getPinStreamIdFromUser(userId) {
1097
+ var _streams$find;
1098
+ var user = this.userMap.get(userId);
1099
+ var isPSTN = (user === null || user === void 0 ? void 0 : user.userInfo.connectorType) === _fcrCore.FcrRoomConnectorType.PSTN;
1100
+ var streams = user === null || user === void 0 ? void 0 : user.streams;
1101
+ var streamId = streams === null || streams === void 0 || (_streams$find = streams.find(function (stream) {
1102
+ return stream.videoSourceType === _fcrCore.FcrVideoSourceType.CAMERA || isPSTN && stream.videoSourceType === _fcrCore.FcrVideoSourceType.NONE;
1103
+ })) === null || _streams$find === void 0 ? void 0 : _streams$find.streamId;
1104
+ return streamId;
1105
+ }
1106
+ }, {
1107
+ key: "_getDefaultUserData",
1108
+ value:
1109
+ /**
1110
+ * 获取默认用户数据(用于错误处理)
1111
+ * @returns 默认用户数据
1112
+ */
1113
+ function _getDefaultUserData() {
1114
+ return {
1115
+ userId: '',
1116
+ userName: '',
1117
+ isHost: false,
1118
+ isMe: false,
1119
+ hasAudio: false,
1120
+ hasVideo: false,
1121
+ isScreenSharing: false,
1122
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.NONE,
1123
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.NONE,
1124
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.NORMAL,
1125
+ userRole: _type.FcrUserRole.PARTICIPANT,
1126
+ isSpotlight: false,
1127
+ isBoardActive: false,
1128
+ allowedOperations: [],
1129
+ isPin: false,
1130
+ hideAudioConnectIcon: false,
1131
+ avatar: ''
1132
+ };
1133
+ }
1134
+
1135
+ /**
1136
+ * 获取用户基础信息
1137
+ * @param user 用户数据
1138
+ * @param isSelf 是否为当前用户
1139
+ * @returns 基础信息对象
1140
+ */
1141
+ }, {
1142
+ key: "_getUserBaseInfo",
1143
+ value: function _getUserBaseInfo(user, isSelf) {
1144
+ return {
1145
+ userId: user.userId,
1146
+ userName: user.userInfo.userName,
1147
+ isHost: user.userInfo.userRole === _type.FcrUserRole.HOST,
1148
+ isMe: isSelf,
1149
+ userRole: user.userInfo.userRole,
1150
+ isBoardActive: user.userInfo.isBoardActive,
1151
+ avatar: user.userInfo.avatar,
1152
+ allowedOperations: this.allowedOperations(user.userId, user.userInfo.userRole),
1153
+ isPin: this.checkIsPin(user.userId),
1154
+ hideAudioConnectIcon: false
1155
+ };
1156
+ }
1157
+
1158
+ /**
1159
+ * 获取用户设备信息
1160
+ * @param user 用户数据
1161
+ * @param userStreams 用户流数据
1162
+ * @param isSelf 是否为当前用户
1163
+ * @returns 设备信息对象
1164
+ */
1165
+ }, {
1166
+ key: "_getUserDeviceInfo",
1167
+ value: function _getUserDeviceInfo(user, userStreams, isSelf) {
1168
+ var connectorType = user.userInfo.connectorType;
1169
+ switch (connectorType) {
1170
+ case _fcrCore.FcrRoomConnectorType.NONE:
1171
+ return this._getNormalUserDeviceInfo(userStreams, isSelf);
1172
+ case _fcrCore.FcrRoomConnectorType.PSTN:
1173
+ return this._getPstnUserDeviceInfo(userStreams);
1174
+ case _fcrCore.FcrRoomConnectorType.SIP:
1175
+ case _fcrCore.FcrRoomConnectorType.H323:
1176
+ return this._getSipOrH323UserDeviceInfo(userStreams);
1177
+ default:
1178
+ return this._getDefaultDeviceInfo();
1179
+ }
1180
+ }
1181
+
1182
+ /**
1183
+ * 获取普通用户(电脑客户端)的设备信息
1184
+ * @param userStreams 用户流数据
1185
+ * @param isSelf 是否为当前用户
1186
+ * @returns 设备信息对象
1187
+ */
1188
+ }, {
1189
+ key: "_getNormalUserDeviceInfo",
1190
+ value: function _getNormalUserDeviceInfo(userStreams, isSelf) {
1191
+ var defaultStream = this._findStreamByVideoSourceType(userStreams, _fcrCore.FcrVideoSourceType.CAMERA);
1192
+ var pstnStream = this._findStreamByConnectorType(userStreams, _fcrCore.FcrRoomConnectorType.PSTN);
1193
+ var hasVideo = isSelf ? this._deviceStore.cameraEnabled : this._hasVideoPublishedAndStarted(defaultStream);
1194
+ if (pstnStream) {
1195
+ // 有PSTN流,使用电话麦克风
1196
+ return {
1197
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.PHONE_MIC,
1198
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.COMPUTER_CAM,
1199
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.NORMAL,
1200
+ hasAudio: pstnStream.audioSourceState === _fcrCore.FcrMediaSourceState.OPEN,
1201
+ hasVideo: hasVideo
1202
+ };
1203
+ } else {
1204
+ // 普通电脑客户端
1205
+ return {
1206
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.COMPUTER_MIC,
1207
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.COMPUTER_CAM,
1208
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.NORMAL,
1209
+ hasAudio: isSelf ? this._deviceStore.microphoneEnabled : this._hasAudioPublishedAndStarted(defaultStream),
1210
+ hasVideo: hasVideo
1211
+ };
1212
+ }
1213
+ }
1214
+
1215
+ /**
1216
+ * 获取PSTN电话用户的设备信息
1217
+ * @param userStreams 用户流数据
1218
+ * @returns 设备信息对象
1219
+ */
1220
+ }, {
1221
+ key: "_getPstnUserDeviceInfo",
1222
+ value: function _getPstnUserDeviceInfo(userStreams) {
1223
+ var pstnStream = this._findStreamByConnectorType(userStreams, _fcrCore.FcrRoomConnectorType.PSTN);
1224
+ return {
1225
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.PHONE_MIC,
1226
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.NONE,
1227
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.PHONE,
1228
+ hasAudio: this._hasAudioPublishedAndStarted(pstnStream),
1229
+ hasVideo: false
1230
+ };
1231
+ }
1232
+
1233
+ /**
1234
+ * 获取SIP/H323会议系统用户的设备信息
1235
+ * @param userStreams 用户流数据
1236
+ * @returns 设备信息对象
1237
+ */
1238
+ }, {
1239
+ key: "_getSipOrH323UserDeviceInfo",
1240
+ value: function _getSipOrH323UserDeviceInfo(userStreams) {
1241
+ var sipOrH323Stream = this._findSipOrH323Stream(userStreams);
1242
+ return {
1243
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.PHONE_MIC,
1244
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.COMPUTER_CAM,
1245
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.MEETING_SYSTEM,
1246
+ hasAudio: this._hasAudioPublishedAndStarted(sipOrH323Stream),
1247
+ hasVideo: this._hasVideoPublishedAndStarted(sipOrH323Stream)
1248
+ };
1249
+ }
1250
+
1251
+ /**
1252
+ * 获取默认设备信息
1253
+ * @returns 默认设备信息对象
1254
+ */
1255
+ }, {
1256
+ key: "_getDefaultDeviceInfo",
1257
+ value: function _getDefaultDeviceInfo() {
1258
+ return {
1259
+ audioDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.AUDIO.NONE,
1260
+ videoDeviceType: _struct.USER_FORMAT_CONFIG.DEVICE_TYPES.VIDEO.NONE,
1261
+ userType: _struct.USER_FORMAT_CONFIG.USER_TYPES.NORMAL,
1262
+ hasAudio: false,
1263
+ hasVideo: false
1264
+ };
1265
+ }
1266
+
1267
+ /**
1268
+ * 获取用户流状态信息
1269
+ * @param user 用户数据
1270
+ * @param userStreams 用户流数据
1271
+ * @returns 流状态信息对象
1272
+ */
1273
+ }, {
1274
+ key: "_getUserStreamInfo",
1275
+ value: function _getUserStreamInfo(user, userStreams) {
1276
+ var _this13 = this;
1277
+ var hasShareScreen = userStreams.some(function (stream) {
1278
+ return stream.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN;
1279
+ });
1280
+ var isSpotlight = userStreams.some(function (stream) {
1281
+ return stream.streamId === _this13.spotlightStreamId;
1282
+ });
1283
+ return {
1284
+ isScreenSharing: !!hasShareScreen,
1285
+ isSpotlight: isSpotlight
1286
+ };
1287
+ }
1288
+
1289
+ /**
1290
+ * 根据视频源类型查找流
1291
+ * @param userStreams 用户流数组
1292
+ * @param videoSourceType 视频源类型
1293
+ * @returns 找到的流或undefined
1294
+ */
1295
+ }, {
1296
+ key: "_findStreamByVideoSourceType",
1297
+ value: function _findStreamByVideoSourceType(userStreams, videoSourceType) {
1298
+ return userStreams.find(function (stream) {
1299
+ return stream.videoSourceType === videoSourceType;
1300
+ });
1301
+ }
1302
+
1303
+ /**
1304
+ * 根据连接器类型查找流
1305
+ * @param userStreams 用户流数组
1306
+ * @param connectorType 连接器类型
1307
+ * @returns 找到的流或undefined
1308
+ */
1309
+ }, {
1310
+ key: "_findStreamByConnectorType",
1311
+ value: function _findStreamByConnectorType(userStreams, connectorType) {
1312
+ return userStreams.find(function (stream) {
1313
+ return stream.connectorType === connectorType;
1314
+ });
1315
+ }
1316
+
1317
+ /**
1318
+ * 查找SIP或H323流
1319
+ * @param userStreams 用户流数组
1320
+ * @returns 找到的流或undefined
1321
+ */
1322
+ }, {
1323
+ key: "_findSipOrH323Stream",
1324
+ value: function _findSipOrH323Stream(userStreams) {
1325
+ return userStreams.find(function (stream) {
1326
+ return [_fcrCore.FcrRoomConnectorType.SIP, _fcrCore.FcrRoomConnectorType.H323].includes(stream.connectorType);
1327
+ });
1328
+ }
1329
+
1330
+ /**
1331
+ * 检查流是否有音频发布并已启动
1332
+ * @param stream 流信息
1333
+ * @returns 是否有音频发布并已启动
1334
+ */
1335
+ }, {
1336
+ key: "_hasAudioPublishedAndStarted",
1337
+ value: function _hasAudioPublishedAndStarted(stream) {
1338
+ return (stream === null || stream === void 0 ? void 0 : stream.audioSourceState) === _fcrCore.FcrMediaSourceState.OPEN;
1339
+ }
1340
+
1341
+ /**
1342
+ * 检查流是否有视频发布并已启动
1343
+ * @param stream 流信息
1344
+ * @returns 是否有视频发布并已启动
1345
+ */
1346
+ }, {
1347
+ key: "_hasVideoPublishedAndStarted",
1348
+ value: function _hasVideoPublishedAndStarted(stream) {
1349
+ return (stream === null || stream === void 0 ? void 0 : stream.videoSourceState) === _fcrCore.FcrMediaSourceState.OPEN;
1350
+ }
1351
+
1352
+ // [其他所有私有方法的实现...]
1353
+ }, {
1354
+ key: "_handleRemoteUsersJoined",
1355
+ value: function _handleRemoteUsersJoined(roomId, events) {
1356
+ if (events.some(function (user) {
1357
+ return user.userInfo.userRole === _type.FcrUserRole.HOST;
1358
+ })) {
1359
+ this.showBecomeHostButton = false;
1360
+ this._showToast('主持人已进入会议', 'info');
1361
+ }
1362
+ }
1363
+ }, {
1364
+ key: "_handleUserInfoUpdated",
1365
+ value: function _handleUserInfoUpdated(roomId, event) {
1366
+ if (event.reason === _type.FcrUserUpdatedReason.ROLE && event.modifiedUser.userRole === _type.FcrUserRole.HOST) {
1367
+ this.showBecomeHostButton = false;
1368
+ }
1369
+ }
1370
+ }, {
1371
+ key: "_handleUserCountUpdated",
1372
+ value: function _handleUserCountUpdated(roomId, count) {
1373
+ this._userCount = count;
1374
+ }
1375
+ }, {
1376
+ key: "_handleUserPropertiesUpdated",
1377
+ value: function _handleUserPropertiesUpdated() {
1378
+ this._getOutputLanguage();
1379
+ }
1380
+ }, {
1381
+ key: "handleConfirmChangeName",
1382
+ value: function () {
1383
+ var _handleConfirmChangeName = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
1384
+ var _this14 = this;
1385
+ return _regenerator["default"].wrap(function (_context4) {
1386
+ while (1) switch (_context4.prev = _context4.next) {
1387
+ case 0:
1388
+ _context4.next = 1;
1389
+ return this._userControl.updateUserName(this._renamingUserId, this.newName);
1390
+ case 1:
1391
+ (0, _mobx.runInAction)(function () {
1392
+ _this14._closeChangeNameDialog();
1393
+ _this14._showToast((0, _i18n.transI18n)('fmt_additional_tips_nickname_change_success'));
1394
+ });
1395
+ case 2:
1396
+ case "end":
1397
+ return _context4.stop();
1398
+ }
1399
+ }, _callee4, this);
1400
+ }));
1401
+ function handleConfirmChangeName() {
1402
+ return _handleConfirmChangeName.apply(this, arguments);
1403
+ }
1404
+ return handleConfirmChangeName;
1405
+ }()
1406
+ }, {
1407
+ key: "handleCancelChangeName",
1408
+ value: function handleCancelChangeName() {
1409
+ this._closeChangeNameDialog();
1410
+ }
1411
+ }, {
1412
+ key: "_closeChangeNameDialog",
1413
+ value: function _closeChangeNameDialog() {
1414
+ this.newName = '';
1415
+ this._renamingUserId = '';
1416
+ this._renamingUserName = '';
1417
+ this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.RENAME);
1418
+ }
1419
+ }, {
1420
+ key: "_getOutputLanguage",
1421
+ value: function () {
1422
+ var _getOutputLanguage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
1423
+ var _this15 = this;
1424
+ var interpreterInputLanguageList, index, user, language;
1425
+ return _regenerator["default"].wrap(function (_context5) {
1426
+ while (1) switch (_context5.prev = _context5.next) {
1427
+ case 0:
1428
+ interpreterInputLanguageList = [];
1429
+ for (index = 0; index < this.userList.length; index++) {
1430
+ user = this.userList[index];
1431
+ language = this._userControl.getUserPropertiesByKeyPath('interpreterLangCode', user.userId);
1432
+ if (language) {
1433
+ interpreterInputLanguageList.push({
1434
+ userId: user.userId,
1435
+ language: language
1436
+ });
1437
+ }
1438
+ }
1439
+ (0, _mobx.runInAction)(function () {
1440
+ _this15.interpreterInputLanguageList = interpreterInputLanguageList;
1441
+ });
1442
+ case 1:
1443
+ case "end":
1444
+ return _context5.stop();
1445
+ }
1446
+ }, _callee5, this);
1447
+ }));
1448
+ function _getOutputLanguage() {
1449
+ return _getOutputLanguage2.apply(this, arguments);
1450
+ }
1451
+ return _getOutputLanguage;
1452
+ }()
1453
+ }, {
1454
+ key: "handlerUserAction",
1455
+ value: function handlerUserAction(action, userId) {
1456
+ this.logger.info("handler User Action: ".concat(action, ", target userId: ").concat(userId));
1457
+ switch (action) {
1458
+ case _attendee.ParticipantActionType.MUTE_AUDIO:
1459
+ this._muteUserAudio(userId);
1460
+ break;
1461
+ case _attendee.ParticipantActionType.UNMUTE_AUDIO:
1462
+ this._unmuteUserAudio(userId);
1463
+ break;
1464
+ case _attendee.ParticipantActionType.MUTE_VIDEO:
1465
+ this._muteUserVideo(userId);
1466
+ break;
1467
+ case _attendee.ParticipantActionType.UNMUTE_VIDEO:
1468
+ this._unmuteUserVideo(userId);
1469
+ break;
1470
+ case _attendee.ParticipantActionType.PRIVATE_CHAT:
1471
+ this._privateChat(userId);
1472
+ break;
1473
+ case _attendee.ParticipantActionType.KICK_OUT:
1474
+ this._kickOutUser(userId);
1475
+ break;
1476
+ case _attendee.ParticipantActionType.ADD_PIN:
1477
+ this.addPin(userId);
1478
+ break;
1479
+ case _attendee.ParticipantActionType.REMOVE_PIN:
1480
+ this.removePin(userId);
1481
+ break;
1482
+ case _attendee.ParticipantActionType.SET_AS_HOST:
1483
+ this._setAsHost(userId);
1484
+ break;
1485
+ case _attendee.ParticipantActionType.SET_AS_CO_HOST:
1486
+ this._setAsCoHost(userId);
1487
+ break;
1488
+ case _attendee.ParticipantActionType.SET_AS_ATTENDEE:
1489
+ this._setAsAttendee(userId);
1490
+ break;
1491
+ case _attendee.ParticipantActionType.RENAME_IN_MEETING:
1492
+ this._openChangeNameDialog(userId);
1493
+ break;
1494
+ case _attendee.ParticipantActionType.PUT_IN_WAITING_ROOM:
1495
+ this._moveToWaitingRoomByUserId(userId);
1496
+ break;
1497
+ }
1498
+ }
1499
+ }, {
1500
+ key: "handleActiveTab",
1501
+ value: function handleActiveTab(tab) {
1502
+ this.activeTab = tab;
1503
+ if (this.activeTab === _type5.FcrUIRoomType.WAITING_ROOM) {
1504
+ this._sharedWaitingRoomDataSource.unReadState = false;
1505
+ }
1506
+ }
1507
+
1508
+ // [所有其他方法的完整实现...]
1509
+
1510
+ /**
1511
+ * 检查是否在会话持续时间内,避免重复发送请求
1512
+ * @param userId 用户ID
1513
+ * @param timestampMap 时间戳映射表
1514
+ * @returns 如果在持续时间内返回true,否则返回false
1515
+ */
1516
+ }, {
1517
+ key: "_isWithinSessionDuration",
1518
+ value: function _isWithinSessionDuration(userId, timestampMap) {
1519
+ var _timestampMap$get;
1520
+ var now = Date.now();
1521
+ return now - ((_timestampMap$get = timestampMap.get(userId)) !== null && _timestampMap$get !== void 0 ? _timestampMap$get : 0) <= _constant.SESSION_DURATION * 1000;
1522
+ }
1523
+
1524
+ /**
1525
+ * 设置权限并更新UI状态
1526
+ * 设置权限后需要同步更新UI状态
1527
+ * @param setPrivilege 设置权限的函数
1528
+ * @param uiState 要更新的UI状态
1529
+ */
1530
+ }, {
1531
+ key: "_setPrivilegeAndUpdateUI",
1532
+ value: function _setPrivilegeAndUpdateUI(setPrivilege, uiState) {
1533
+ setPrivilege();
1534
+ this._sharedSecurityDataSource.setCheckedStateMap(_objectSpread(_objectSpread({}, this.checkedStateMap), uiState));
1535
+ }
1536
+
1537
+ /**
1538
+ * 显示toast消息的辅助方法
1539
+ * @param message 消息内容
1540
+ * @param type 消息类型,默认为'normal'
1541
+ */
1542
+ }, {
1543
+ key: "_showToast",
1544
+ value: function _showToast(message) {
1545
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal';
1546
+ this._messageProvider.showToast({
1547
+ message: message,
1548
+ type: type
1549
+ });
1550
+ }
1551
+
1552
+ /**
1553
+ * 打开对话框的辅助方法
1554
+ * @param dialogKey 对话框键值
1555
+ */
1556
+ }, {
1557
+ key: "_openDialog",
1558
+ value: function _openDialog(dialogKey, params) {
1559
+ this._dialogProvider.openDialog(dialogKey, params);
1560
+ }
1561
+
1562
+ /**
1563
+ * 更新流发布权限的辅助方法
1564
+ * @param streamId 流ID
1565
+ * @param audioPrivilege 音频权限
1566
+ * @param videoPrivilege 视频权限
1567
+ */
1568
+ }, {
1569
+ key: "_updateStreamPrivilege",
1570
+ value: function _updateStreamPrivilege(streamId, audioPrivilege, videoPrivilege) {
1571
+ this._streamControl.updatePublishPrivilegeOfStreams((0, _defineProperty2["default"])({}, streamId, {
1572
+ audioPrivilege: audioPrivilege,
1573
+ videoPrivilege: videoPrivilege
1574
+ }));
1575
+ }
1576
+
1577
+ /**
1578
+ * 获取用户的目标音频流
1579
+ * @param userId 用户ID
1580
+ * @returns 目标流信息,包含硬件设备流和普通客户端流
1581
+ */
1582
+ }, {
1583
+ key: "_getUserTargetAudioStreams",
1584
+ value: function _getUserTargetAudioStreams(userId) {
1585
+ var userStreams = this._streamControl.getStreamsByUserId(userId);
1586
+
1587
+ // 查找硬件设备流(PSTN电话、SIP、H323等外部设备连接)
1588
+ var hardwareDeviceStream = userStreams.find(function (stream) {
1589
+ return stream.connectorType !== _fcrCore.FcrRoomConnectorType.NONE;
1590
+ });
1591
+
1592
+ // 查找普通客户端流(来自电脑摄像头/麦克风的流)
1593
+ var normalClientStream = userStreams.find(function (stream) {
1594
+ return stream.videoSourceType === _fcrCore.FcrVideoSourceType.CAMERA;
1595
+ });
1596
+ return {
1597
+ hardwareDeviceStream: hardwareDeviceStream,
1598
+ normalClientStream: normalClientStream,
1599
+ isLocalUser: userId === this.localUser.userId
1600
+ };
1601
+ }
1602
+
1603
+ /**
1604
+ * 静音指定用户的音频
1605
+ * @param userId 用户ID
1606
+ */
1607
+ }, {
1608
+ key: "_muteUserAudio",
1609
+ value: function _muteUserAudio(userId) {
1610
+ var _this$_getUserTargetA = this._getUserTargetAudioStreams(userId),
1611
+ hardwareDeviceStream = _this$_getUserTargetA.hardwareDeviceStream,
1612
+ normalClientStream = _this$_getUserTargetA.normalClientStream,
1613
+ isLocalUser = _this$_getUserTargetA.isLocalUser;
1614
+
1615
+ // 如果是本地用户,需要先禁用本地麦克风设备
1616
+ if (isLocalUser) {
1617
+ this._deviceStreamStore.enableMicrophoneWithPreCheck(false);
1618
+ }
1619
+
1620
+ // 优先选择硬件设备流,如果没有则选择普通客户端流
1621
+ var targetStream = hardwareDeviceStream !== null && hardwareDeviceStream !== void 0 ? hardwareDeviceStream : normalClientStream;
1622
+
1623
+ // 如果找到目标流,则更新流的发布权限来静音
1624
+ if (targetStream) {
1625
+ this._updateStreamPrivilege(targetStream.streamId, _type.FcrStreamPrivilegeOperation.NOPRIVILEGE,
1626
+ // 移除音频发布权限(静音)
1627
+ _type.FcrStreamPrivilegeOperation.NOOPERATION // 视频权限保持不变
1628
+ );
1629
+ }
1630
+ }
1631
+
1632
+ /**
1633
+ * 取消静音指定用户的音频
1634
+ * @param userId 用户ID
1635
+ */
1636
+ }, {
1637
+ key: "_unmuteUserAudio",
1638
+ value: function _unmuteUserAudio(userId) {
1639
+ var _this$_getUserTargetA2 = this._getUserTargetAudioStreams(userId),
1640
+ hardwareDeviceStream = _this$_getUserTargetA2.hardwareDeviceStream,
1641
+ isLocalUser = _this$_getUserTargetA2.isLocalUser;
1642
+
1643
+ // 如果是硬件设备流,直接更新流的发布权限来取消静音
1644
+ if (hardwareDeviceStream) {
1645
+ this._updateStreamPrivilege(hardwareDeviceStream.streamId, _type.FcrStreamPrivilegeOperation.HAS_PRIVILEGE, _type.FcrStreamPrivilegeOperation.NOOPERATION);
1646
+ return;
1647
+ }
1648
+
1649
+ // 如果是本地用户,直接启用本地麦克风(上面硬件已经处理了,所以从这里往后都不是硬件设备了)
1650
+ if (isLocalUser) {
1651
+ this._deviceStreamStore.enableMicrophoneWithPreCheck(true);
1652
+ return;
1653
+ }
1654
+ // 邀请对端开启麦克风
1655
+ // 检查是否在会话持续时间内,避免重复发送请求
1656
+ if (this._isWithinSessionDuration(userId, this._unmuteAudioTimestamp)) {
1657
+ return;
1658
+ }
1659
+ this._unmuteAudioTimestamp.set(userId, Date.now());
1660
+ this._peerSessionControl.startPeerSession({
1661
+ sessionKey: _type2.FcrUISessionKey.REQUEST_OPEN_MICROPHONE,
1662
+ receiverId: userId,
1663
+ duration: _constant.SESSION_DURATION,
1664
+ payload: {
1665
+ sender: this.localUser
1666
+ }
1667
+ });
1668
+ }
1669
+
1670
+ /**
1671
+ * 静音指定用户的视频
1672
+ * @param userId 用户ID
1673
+ */
1674
+ }, {
1675
+ key: "_muteUserVideo",
1676
+ value: function _muteUserVideo(userId) {
1677
+ var isSelf = userId === this.localUser.userId;
1678
+ if (isSelf) {
1679
+ this._deviceStreamStore.enableCameraWithPreCheck(false);
1680
+ return;
1681
+ }
1682
+ var targetUsers = this._streamControl.getStreamsByUserId(userId);
1683
+ var targetUser = targetUsers.find(function (stream) {
1684
+ return stream.videoSourceType === _fcrCore.FcrVideoSourceType.CAMERA;
1685
+ });
1686
+ if (!targetUser) {
1687
+ return;
1688
+ }
1689
+ this._updateStreamPrivilege(targetUser.streamId, _type.FcrStreamPrivilegeOperation.NOOPERATION, _type.FcrStreamPrivilegeOperation.NOPRIVILEGE);
1690
+ }
1691
+ }, {
1692
+ key: "_unmuteUserVideo",
1693
+ value: function _unmuteUserVideo(userId) {
1694
+ var isSelf = userId === this.localUser.userId;
1695
+ if (isSelf) {
1696
+ this._deviceStreamStore.enableCameraWithPreCheck(true);
1697
+ return;
1698
+ }
1699
+ if (this._isWithinSessionDuration(userId, this._unmuteVideoTimestamp)) {
1700
+ return;
1701
+ }
1702
+ this._unmuteVideoTimestamp.set(userId, Date.now());
1703
+ this._peerSessionControl.startPeerSession({
1704
+ sessionKey: _type2.FcrUISessionKey.REQUEST_OPEN_CAMERA,
1705
+ receiverId: userId,
1706
+ duration: _constant.SESSION_DURATION,
1707
+ payload: {
1708
+ sender: this.localUser
1709
+ }
1710
+ });
1711
+ }
1712
+ }, {
1713
+ key: "_privateChat",
1714
+ value: function _privateChat(userId) {
1715
+ var userData = this.userListSource.find(function (u) {
1716
+ return u.userId === userId;
1717
+ });
1718
+ if (userData) {
1719
+ var hasPermissionToSendPrivateMessage = this._privilegeProvider.hasPermissionToSendPrivateMessage(userData.userInfo.userRole);
1720
+ if (!hasPermissionToSendPrivateMessage) {
1721
+ this._showToast((0, _i18n.transI18n)('fmt_attendies_tips_chat_off'), 'error');
1722
+ return;
1723
+ }
1724
+ if (!this._privilegeProvider.permitPrivateChat(userId)) {
1725
+ return;
1726
+ }
1727
+ this._chatProvider.setPrivateChatTargetUser(userData.userInfo, this.activeTab);
1728
+ // TODO:
1729
+ // if (isElectron() && this.screenSharingOwner?.userId === this.localUser.userId) {
1730
+ // this._sharedLayoutDataSource.setParticipantsRenderAt('dialog');
1731
+ // this._dialogProvider.openDialog(FcrUIDialogKey.CHAT);
1732
+ // return;
1733
+ // }
1734
+ // 打开私聊对话框
1735
+ var res = this.openChatWindow();
1736
+ if (res) {
1737
+ return;
1738
+ }
1739
+ if (this._sharedLayoutDataSource.chatRenderAt !== 'dialog') {
1740
+ this._sharedLayoutDataSource.setAsideLayout({
1741
+ chat: true
1742
+ });
1743
+ this._sharedChatDataSource.activeTab = this.activeTab;
1744
+ } else {
1745
+ this._openDialog(_constant.FcrUIDialogKey.CHAT);
1746
+ }
1747
+ }
1748
+ }
1749
+ }, {
1750
+ key: "_setAsHost",
1751
+ value: function _setAsHost(userId) {
1752
+ var canSetHost = this.isHostSupportedByPlatform(userId);
1753
+ if (!canSetHost) {
1754
+ this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1755
+ return;
1756
+ }
1757
+ this._showSetHostDialog(userId, _type.FcrUserRole.HOST);
1758
+ }
1759
+ }, {
1760
+ key: "_setAsCoHost",
1761
+ value: function _setAsCoHost(userId) {
1762
+ var canSetHost = this.isHostSupportedByPlatform(userId);
1763
+ if (!canSetHost) {
1764
+ this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1765
+ return;
1766
+ }
1767
+ this._showSetHostDialog(userId, _type.FcrUserRole.COHOST);
1768
+ }
1769
+
1770
+ /**
1771
+ * 显示设置主持人/联席主持人对话框
1772
+ * @param userId 用户ID
1773
+ * @param type 角色类型
1774
+ */
1775
+ }, {
1776
+ key: "_showSetHostDialog",
1777
+ value: function _showSetHostDialog(userId, type) {
1778
+ var _this16 = this;
1779
+ var user = this.userMap.get(userId);
1780
+ if (!user) {
1781
+ this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1782
+ return;
1783
+ }
1784
+ var username = user.userInfo.userName;
1785
+ var targetRole = this._getRoleDisplayName(type);
1786
+ this.openConfirmDialog({
1787
+ title: (0, _i18n.transI18n)('fmt_uimanager_labels_Setas', {
1788
+ reason1: targetRole
1789
+ }),
1790
+ content: (0, _i18n.transI18n)('fmt_uimanager_tips_designedas', {
1791
+ reason1: username,
1792
+ reason2: targetRole
1793
+ }),
1794
+ onOk: function onOk() {
1795
+ return _this16._handleSetHostConfirmation(userId, type);
1796
+ },
1797
+ okText: (0, _i18n.transI18n)('fmt_uimanager_labels_Setas', {
1798
+ reason1: targetRole
1799
+ }),
1800
+ cancelText: (0, _i18n.transI18n)('fmt_security_buttons_cancel'),
1801
+ closable: false,
1802
+ alignCenter: true
1803
+ }, 'UPDATE_USER_ROLE');
1804
+ }
1805
+
1806
+ /**
1807
+ * 获取角色显示名称
1808
+ * @param type 角色类型
1809
+ * @returns 角色显示名称
1810
+ */
1811
+ }, {
1812
+ key: "_getRoleDisplayName",
1813
+ value: function _getRoleDisplayName(type) {
1814
+ return type === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_role_host') : (0, _i18n.transI18n)('fmt_role_cohost');
1815
+ }
1816
+
1817
+ /**
1818
+ * 处理设置主持人确认操作
1819
+ * @param userId 用户ID
1820
+ * @param type 角色类型
1821
+ */
1822
+ }, {
1823
+ key: "_handleSetHostConfirmation",
1824
+ value: (function () {
1825
+ var _handleSetHostConfirmation2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(userId, type) {
1826
+ var _t;
1827
+ return _regenerator["default"].wrap(function (_context6) {
1828
+ while (1) switch (_context6.prev = _context6.next) {
1829
+ case 0:
1830
+ if (this.userMap.has(userId)) {
1831
+ _context6.next = 1;
1832
+ break;
1833
+ }
1834
+ this._showToast((0, _i18n.transI18n)('fmt_uimanager_tips_userleaft'), 'error');
1835
+ return _context6.abrupt("return");
1836
+ case 1:
1837
+ _context6.prev = 1;
1838
+ _context6.next = 2;
1839
+ return this._updateRemoteUserRole(userId, type);
1840
+ case 2:
1841
+ _context6.next = 4;
1842
+ break;
1843
+ case 3:
1844
+ _context6.prev = 3;
1845
+ _t = _context6["catch"](1);
1846
+ this._handleSetHostError(_t);
1847
+ case 4:
1848
+ case "end":
1849
+ return _context6.stop();
1850
+ }
1851
+ }, _callee6, this, [[1, 3]]);
1852
+ }));
1853
+ function _handleSetHostConfirmation(_x2, _x3) {
1854
+ return _handleSetHostConfirmation2.apply(this, arguments);
1855
+ }
1856
+ return _handleSetHostConfirmation;
1857
+ }()
1858
+ /**
1859
+ * 处理设置主持人时的错误
1860
+ * @param error 错误对象
1861
+ */
1862
+ )
1863
+ }, {
1864
+ key: "_handleSetHostError",
1865
+ value: function _handleSetHostError(error) {
1866
+ var _this17 = this;
1867
+ if (error instanceof _error.FcrError) {
1868
+ var errorHandlers = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constant.ErrorCode.FAILED_TO_UPDATE_USER_ROLE_DUE_TO_PRIVILEGE, function () {
1869
+ _this17._messageProvider.showToast({
1870
+ type: 'error',
1871
+ message: (0, _i18n.transI18n)('fmt_attendies_button_revokehost_error')
1872
+ });
1873
+ }), _constant.ErrorCode.FAILED_TO_UPDATE_USER_ROLE_DUE_TO_LIMIT_REACHED, function () {
1874
+ _this17._messageProvider.showToast({
1875
+ type: 'error',
1876
+ message: (0, _i18n.transI18n)('fmt_attendies_toast_cohost_upper_limit')
1877
+ });
1878
+ });
1879
+ var handler = errorHandlers[error.code];
1880
+ if (handler) {
1881
+ handler();
1882
+ return;
1883
+ }
1884
+ }
1885
+ this.logger.error('Failed to set up the host:', error);
1886
+ }
1887
+ }, {
1888
+ key: "_updateRemoteUserRole",
1889
+ value: function _updateRemoteUserRole(userId, role) {
1890
+ this._userControl.updateRemoteUserRole(userId, role);
1891
+ }
1892
+ }, {
1893
+ key: "_setAsAttendee",
1894
+ value: function _setAsAttendee(userId) {
1895
+ this._userControl.updateRemoteUserRole(userId, _type.FcrUserRole.PARTICIPANT);
1896
+ }
1897
+
1898
+ /**
1899
+ * 将指定用户移动到等待房间
1900
+ * @param userId 要移动的用户ID
1901
+ */
1902
+ }, {
1903
+ key: "_moveToWaitingRoomByUserId",
1904
+ value: (function () {
1905
+ var _moveToWaitingRoomByUserId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(userId) {
1906
+ var username, _t2;
1907
+ return _regenerator["default"].wrap(function (_context7) {
1908
+ while (1) switch (_context7.prev = _context7.next) {
1909
+ case 0:
1910
+ if (!(!userId || typeof userId !== 'string')) {
1911
+ _context7.next = 1;
1912
+ break;
1913
+ }
1914
+ this.logger.warn('Invalid userId provided to _moveToWaitingRoomByUserId:', userId);
1915
+ return _context7.abrupt("return");
1916
+ case 1:
1917
+ if (this._isUserExists(userId)) {
1918
+ _context7.next = 2;
1919
+ break;
1920
+ }
1921
+ this.logger.warn('User not found for move to waiting room operation:', userId);
1922
+ return _context7.abrupt("return");
1923
+ case 2:
1924
+ username = this._getUserNameById(userId);
1925
+ _context7.prev = 3;
1926
+ this.logger.info('Moving user to waiting room:', {
1927
+ userId: userId,
1928
+ username: username
1929
+ });
1930
+ _context7.next = 4;
1931
+ return this._roomControl.moveToWaitingRoomByUserIds([userId]);
1932
+ case 4:
1933
+ this._showToast((0, _i18n.transI18n)('fmt_waitingroom_put_in_success', {
1934
+ reason1: username
1935
+ }), 'normal');
1936
+ this.logger.info('Successfully moved user to waiting room:', {
1937
+ userId: userId,
1938
+ username: username
1939
+ });
1940
+ _context7.next = 7;
1941
+ break;
1942
+ case 5:
1943
+ _context7.prev = 5;
1944
+ _t2 = _context7["catch"](3);
1945
+ this.logger.error('Failed to move user to waiting room:', {
1946
+ userId: userId,
1947
+ username: username,
1948
+ error: _t2
1949
+ });
1950
+ if (!(_t2 instanceof _error.FcrError && _t2.code === _constant.ErrorCode.FAILED_TO_MOVE_USER_TO_WAITING_ROOM)) {
1951
+ _context7.next = 6;
1952
+ break;
1953
+ }
1954
+ this._showToast((0, _i18n.transI18n)('fmt_waitingroom_setting_popup_toast_unable_move_creator'), 'error');
1955
+ return _context7.abrupt("return");
1956
+ case 6:
1957
+ this._showToast((0, _i18n.transI18n)('fmt_waitingroom_setting_popup_toast_move_in_failed'), 'error');
1958
+ case 7:
1959
+ case "end":
1960
+ return _context7.stop();
1961
+ }
1962
+ }, _callee7, this, [[3, 5]]);
1963
+ }));
1964
+ function _moveToWaitingRoomByUserId(_x4) {
1965
+ return _moveToWaitingRoomByUserId2.apply(this, arguments);
1966
+ }
1967
+ return _moveToWaitingRoomByUserId;
1968
+ }()
1969
+ /**
1970
+ * 踢出用户的主入口方法
1971
+ * 根据当前房间类型选择相应的处理逻辑
1972
+ * @param userId 要踢出的用户ID
1973
+ */
1974
+ )
1975
+ }, {
1976
+ key: "_kickOutUser",
1977
+ value: function _kickOutUser(userId) {
1978
+ // 参数验证
1979
+ if (!userId || typeof userId !== 'string') {
1980
+ this.logger.warn('Invalid userId provided to _kickOutUser:', userId);
1981
+ return;
1982
+ }
1983
+
1984
+ // 检查用户是否存在
1985
+ if (!this._isUserExists(userId)) {
1986
+ this.logger.warn('User not found for kick out operation:', userId);
1987
+ return;
1988
+ }
1989
+ var isMainRoom = this.activeTab === _type5.FcrUIRoomType.MAIN_ROOM;
1990
+ if (isMainRoom) {
1991
+ this._kickOutUserFromMainRoom(userId);
1992
+ } else {
1993
+ this._kickOutUserFromWaitingRoom(userId);
1994
+ }
1995
+ }
1996
+
1997
+ /**
1998
+ * 从主房间踢出用户
1999
+ * @param userId 用户ID
2000
+ */
2001
+ }, {
2002
+ key: "_kickOutUserFromMainRoom",
2003
+ value: function _kickOutUserFromMainRoom(userId) {
2004
+ var userName = this._getUserNameById(userId);
2005
+ var dialogConfig = this._createMainRoomKickOutDialogConfig(userId, userName);
2006
+ this.openConfirmDialog(dialogConfig, _struct.KICK_OUT_DIALOG_CONFIG.MAIN_ROOM.DIALOG_ID);
2007
+ }
2008
+
2009
+ /**
2010
+ * 从等待房间踢出用户
2011
+ * @param userId 用户ID
2012
+ */
2013
+ }, {
2014
+ key: "_kickOutUserFromWaitingRoom",
2015
+ value: function _kickOutUserFromWaitingRoom(userId) {
2016
+ var userName = this._getUserNameById(userId);
2017
+ var dialogConfig = this._createWaitingRoomKickOutDialogConfig(userId, userName);
2018
+ this.openRemoveAdmitWaitingRoomDialog(dialogConfig);
2019
+ }
2020
+
2021
+ /**
2022
+ * 检查用户是否存在
2023
+ * @param userId 用户ID
2024
+ * @returns 用户是否存在
2025
+ */
2026
+ }, {
2027
+ key: "_isUserExists",
2028
+ value: function _isUserExists(userId) {
2029
+ return this.userMap.has(userId);
2030
+ }
2031
+
2032
+ /**
2033
+ * 根据用户ID获取用户名
2034
+ * @param userId 用户ID
2035
+ * @returns 用户名,如果找不到则返回空字符串
2036
+ */
2037
+ }, {
2038
+ key: "_getUserNameById",
2039
+ value: function _getUserNameById(userId) {
2040
+ var _this$userMap$get4;
2041
+ return ((_this$userMap$get4 = this.userMap.get(userId)) === null || _this$userMap$get4 === void 0 ? void 0 : _this$userMap$get4.userInfo.userName) || '';
2042
+ }
2043
+
2044
+ /**
2045
+ * 创建主房间踢出用户的对话框配置
2046
+ * @param userId 用户ID
2047
+ * @param userName 用户名
2048
+ * @returns 对话框配置对象
2049
+ */
2050
+ }, {
2051
+ key: "_createMainRoomKickOutDialogConfig",
2052
+ value: function _createMainRoomKickOutDialogConfig(userId, userName) {
2053
+ var _this18 = this;
2054
+ return {
2055
+ title: '',
2056
+ content: (0, _i18n.transI18n)('fmt_uimanager_tips_Remove', {
2057
+ reason2: userName
2058
+ }),
2059
+ onOk: function onOk() {
2060
+ _this18._executeKickOut(userId, _type3.FcrUserKickedOutType.Once);
2061
+ },
2062
+ alignCenter: true,
2063
+ height: _struct.KICK_OUT_DIALOG_CONFIG.MAIN_ROOM.HEIGHT
2064
+ };
2065
+ }
2066
+
2067
+ /**
2068
+ * 创建等待房间踢出用户的对话框配置
2069
+ * @param userId 用户ID
2070
+ * @param userName 用户名
2071
+ * @returns 对话框配置对象
2072
+ */
2073
+ }, {
2074
+ key: "_createWaitingRoomKickOutDialogConfig",
2075
+ value: function _createWaitingRoomKickOutDialogConfig(userId, userName) {
2076
+ var _this19 = this;
2077
+ return {
2078
+ userId: userId,
2079
+ type: _struct.KICK_OUT_DIALOG_CONFIG.WAITING_ROOM.TYPE,
2080
+ title: (0, _i18n.transI18n)('fmt_waitingroom_sidebar_popup_removeall'),
2081
+ tooltip: (0, _i18n.transI18n)('fmt_waitingroom_sidebar_popup_label_remove', {
2082
+ reason1: userName
2083
+ }),
2084
+ onChecked: function onChecked(isChecked) {
2085
+ _this19._isChecked[_struct.KICK_OUT_DIALOG_CONFIG.WAITING_ROOM.TYPE] = isChecked;
2086
+ }
2087
+ };
2088
+ }
2089
+
2090
+ /**
2091
+ * 执行踢出用户操作
2092
+ * @param userId 用户ID
2093
+ * @param kickOutType 踢出类型
2094
+ */
2095
+ }, {
2096
+ key: "_executeKickOut",
2097
+ value: function _executeKickOut(userId, kickOutType) {
2098
+ try {
2099
+ this._userControl.kickOut(userId, kickOutType);
2100
+ this.logger.info('Successfully initiated kick out for user:', userId, 'type:', kickOutType);
2101
+ } catch (error) {
2102
+ this.logger.error('Failed to kick out user:', userId, 'error:', error);
2103
+ }
2104
+ }
2105
+ }, {
2106
+ key: "_onPeerSessionReceived",
2107
+ value: function _onPeerSessionReceived(session) {
2108
+ this.logger.info('participant store onPeerSessionReceived', {
2109
+ sessionId: session.sessionId
2110
+ });
2111
+
2112
+ // 检查是否已经处理过此会话
2113
+ if (this._isSessionAlreadyProcessed(session.sessionId)) {
2114
+ this.logger.info('Session already processed, skipping', {
2115
+ sessionId: session.sessionId
2116
+ });
2117
+ return;
2118
+ }
2119
+
2120
+ // 验证本地用户信息
2121
+ if (!this._validateLocalUser()) {
2122
+ this.logger.warn('Local user validation failed');
2123
+ return;
2124
+ }
2125
+
2126
+ // 标记会话为已处理
2127
+ this._processedUserOpenDeviceRequests.add(session.sessionId);
2128
+
2129
+ // 根据会话类型处理请求
2130
+ this._handleDeviceRequest(session);
2131
+ }
2132
+ }, {
2133
+ key: "_onPeerSessionAccepted",
2134
+ value: function _onPeerSessionAccepted(session) {
2135
+ this._updateSessionTimestamp(session);
2136
+ }
2137
+ }, {
2138
+ key: "_onPeerSessionRejected",
2139
+ value: function _onPeerSessionRejected(session) {
2140
+ this._updateSessionTimestamp(session);
2141
+ }
2142
+ }, {
2143
+ key: "_updateSessionTimestamp",
2144
+ value: function _updateSessionTimestamp(session) {
2145
+ var responderId = session.responderId,
2146
+ sessionKey = session.sessionKey;
2147
+ switch (sessionKey) {
2148
+ case _type2.FcrUISessionKey.REQUEST_OPEN_CAMERA:
2149
+ this._unmuteVideoTimestamp["delete"](responderId);
2150
+ break;
2151
+ case _type2.FcrUISessionKey.REQUEST_OPEN_MICROPHONE:
2152
+ this._unmuteAudioTimestamp["delete"](responderId);
2153
+ break;
2154
+ }
2155
+ }
2156
+
2157
+ /**
2158
+ * 设置等候室用户数量监听器
2159
+ * 当等候室用户数量为0时 tab自动切换回主房间
2160
+ */
2161
+ }, {
2162
+ key: "_setupWaitingRoomUserCountListener",
2163
+ value: function _setupWaitingRoomUserCountListener() {
2164
+ var _this20 = this;
2165
+ this._disposers.push((0, _mobx.reaction)(function () {
2166
+ return _this20.waitingRoomUserCount;
2167
+ }, function (userCount) {
2168
+ if (userCount === 0 && _this20.activeTab === _type5.FcrUIRoomType.WAITING_ROOM) {
2169
+ _this20.handleActiveTab(_type5.FcrUIRoomType.MAIN_ROOM);
2170
+ }
2171
+ }));
2172
+ }
2173
+
2174
+ /**
2175
+ * 检查会话是否已经被处理过
2176
+ * @param sessionId 会话ID
2177
+ * @returns 是否已处理
2178
+ */
2179
+ }, {
2180
+ key: "_isSessionAlreadyProcessed",
2181
+ value: function _isSessionAlreadyProcessed(sessionId) {
2182
+ return this._processedUserOpenDeviceRequests.has(sessionId);
2183
+ }
2184
+
2185
+ /**
2186
+ * 验证本地用户信息
2187
+ * @returns 验证是否通过
2188
+ */
2189
+ }, {
2190
+ key: "_validateLocalUser",
2191
+ value: function _validateLocalUser() {
2192
+ var localUserUid = this.localUser.userId;
2193
+ if (!localUserUid) {
2194
+ this.logger.warn('Local user ID not found');
2195
+ return false;
2196
+ }
2197
+ var localUserStream = this._streamControl.getStreamsByUserId(localUserUid).find(function (user) {
2198
+ return user.videoSourceType === _fcrCore.FcrVideoSourceType.CAMERA;
2199
+ });
2200
+ if (!localUserStream) {
2201
+ this.logger.warn('Local user stream not found');
2202
+ return false;
2203
+ }
2204
+ return true;
2205
+ }
2206
+
2207
+ /**
2208
+ * 处理设备请求
2209
+ * @param session 对等会话
2210
+ */
2211
+ }, {
2212
+ key: "_handleDeviceRequest",
2213
+ value: function _handleDeviceRequest(session) {
2214
+ var sessionKey = session.sessionKey,
2215
+ payload = session.payload;
2216
+ var sender = payload.sender;
2217
+ switch (sessionKey) {
2218
+ case _type2.FcrUISessionKey.REQUEST_OPEN_CAMERA:
2219
+ this._handleCameraRequest(session, sender);
2220
+ break;
2221
+ case _type2.FcrUISessionKey.REQUEST_OPEN_MICROPHONE:
2222
+ this._handleMicrophoneRequest(session, sender);
2223
+ break;
2224
+ default:
2225
+ this.logger.warn('Unknown session key', {
2226
+ sessionKey: sessionKey
2227
+ });
2228
+ }
2229
+ }
2230
+
2231
+ /**
2232
+ * 处理摄像头开启请求
2233
+ * @param session 对等会话
2234
+ * @param sender 发送者信息
2235
+ */
2236
+ }, {
2237
+ key: "_handleCameraRequest",
2238
+ value: function _handleCameraRequest(session, sender) {
2239
+ var localUserHasVideo = this._deviceStore.cameraEnabled;
2240
+ this.logger.info('Handling camera request', {
2241
+ sessionId: session.sessionId,
2242
+ localUserHasVideo: localUserHasVideo
2243
+ });
2244
+
2245
+ // 如果本地用户已经开启摄像头,直接接受请求
2246
+ if (localUserHasVideo) {
2247
+ this._peerSessionControl.acceptPeerSession(session);
2248
+ return;
2249
+ }
2250
+
2251
+ // 显示确认对话框
2252
+ this._showCameraRequestDialog(session, sender);
2253
+ }
2254
+
2255
+ /**
2256
+ * 处理麦克风开启请求
2257
+ * @param session 对等会话
2258
+ * @param sender 发送者信息
2259
+ */
2260
+ }, {
2261
+ key: "_handleMicrophoneRequest",
2262
+ value: function _handleMicrophoneRequest(session, sender) {
2263
+ var localUserHasAudio = this._deviceStore.microphoneEnabled;
2264
+ this.logger.info('Handling microphone request', {
2265
+ sessionId: session.sessionId,
2266
+ localUserHasAudio: localUserHasAudio
2267
+ });
2268
+
2269
+ // 如果本地用户已经开启麦克风,直接接受请求
2270
+ if (localUserHasAudio) {
2271
+ this._peerSessionControl.acceptPeerSession(session);
2272
+ return;
2273
+ }
2274
+
2275
+ // 显示确认对话框
2276
+ this._showMicrophoneRequestDialog(session, sender);
2277
+ }
2278
+
2279
+ /**
2280
+ * 显示摄像头请求确认对话框
2281
+ * @param session 对等会话
2282
+ * @param sender 发送者信息
2283
+ */
2284
+ }, {
2285
+ key: "_showCameraRequestDialog",
2286
+ value: function _showCameraRequestDialog(session, sender) {
2287
+ var _this21 = this;
2288
+ this.openConfirmDialog({
2289
+ height: 166,
2290
+ title: (0, _i18n.transI18n)('fmt_attendies_tips_apply_video_title', {
2291
+ reason1: (0, _i18n.transI18n)(_i18n2.userRoleI18nKey[sender.userRole])
2292
+ }),
2293
+ content: (0, _i18n.transI18n)('fmt_additional_tips_cameraturnon'),
2294
+ okText: (0, _i18n.transI18n)('fmt_additional_button_accept'),
2295
+ cancelText: (0, _i18n.transI18n)('fmt_additional_button_refuse'),
2296
+ closable: false,
2297
+ onOk: function onOk() {
2298
+ _this21._peerSessionControl.acceptPeerSession(session);
2299
+ _this21._deviceStreamStore.enableCameraWithPreCheck(true);
2300
+ },
2301
+ onCancel: function onCancel() {
2302
+ _this21._peerSessionControl.rejectPeerSession(session);
2303
+ }
2304
+ }, _type2.FcrUISessionKey.REQUEST_OPEN_CAMERA);
2305
+ }
2306
+
2307
+ /**
2308
+ * 显示麦克风请求确认对话框
2309
+ * @param session 对等会话
2310
+ * @param sender 发送者信息
2311
+ */
2312
+ }, {
2313
+ key: "_showMicrophoneRequestDialog",
2314
+ value: function _showMicrophoneRequestDialog(session, sender) {
2315
+ var _this22 = this;
2316
+ this.openConfirmDialog({
2317
+ title: (0, _i18n.transI18n)('fmt_attendies_tips_apply_audio_title', {
2318
+ reason1: (0, _i18n.transI18n)(_i18n2.userRoleI18nKey[sender.userRole])
2319
+ }),
2320
+ content: (0, _i18n.transI18n)('fmt_additional_tips_agreeturnon'),
2321
+ okText: (0, _i18n.transI18n)('fmt_device_label_audio_unmute'),
2322
+ cancelText: (0, _i18n.transI18n)('fmt_additional_options_Keepsilent'),
2323
+ closable: false,
2324
+ onOk: function onOk() {
2325
+ _this22._processedUserOpenDeviceRequests["delete"](session.sessionId);
2326
+ _this22._peerSessionControl.acceptPeerSession(session);
2327
+ _this22._deviceStreamStore.enableMicrophoneWithPreCheck(true);
2328
+ },
2329
+ onCancel: function onCancel() {
2330
+ _this22._processedUserOpenDeviceRequests["delete"](session.sessionId);
2331
+ _this22._peerSessionControl.rejectPeerSession(session);
2332
+ },
2333
+ height: 166
2334
+ }, _type2.FcrUISessionKey.REQUEST_OPEN_MICROPHONE);
2335
+ }
2336
+ }, {
2337
+ key: "_handleEvent",
2338
+ value: function _handleEvent(event, payload) {
2339
+ switch (event) {
2340
+ case _constant.FcrUIAction.PARTICIPANT_ACTION:
2341
+ this.handlerUserAction(payload.action, payload.userId);
2342
+ break;
2343
+ }
2344
+ }
2345
+ }]);
2346
+ }();
2347
+ _ParticipantStoreBase = ParticipantStoreBase;
2348
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ParticipantStoreBase, [[_mobx.observable, 1, "_mainList"], [_mobx.observable, 1, "_isChecked"], [_mobx.observable, 1, "_participantsWindowActive"], [_mobx.observable, 1, "enableParticipantsJoinWithMute"], [_mobx.observable, 1, "searchText"], [_mobx.observable, 1, "currentModal"], [_mobx.observable, 1, "mergeConfirmDialog"], [_mobx.observable, 1, "mergeUserId"], [_mobx.observable, 1, "activeTab"], [_mobx.observable, 1, "interpreterInputLanguageList"], [_mobx.observable, 1, "newName"], [_mobx.observable, 1, "allowUnmute"], [_mobx.observable, 1, "joinWithMuteAudio"], [_mobx.observable, 1, "showBecomeHostButton"], [_mobx.observable, 1, "_userCount"], [_mobx.computed, 3, "audioVolumeMap"], [_mobx.computed, 3, "userListSource"], [_mobx.computed, 3, "spotlightStreamId"], [_mobx.computed, 3, "mergeUserInfo"], [_mobx.computed, 3, "userMap"], [_mobx.computed, 3, "userCount"], [_mobx.computed, 3, "pinedStreamIds"], [_mobx.computed, 3, "hasPinnedStream"], [_mobx.computed, 3, "userList"], [_mobx.computed, 3, "localMicVolume"], [_mobx.computed, 3, "hasRevokeHostPermission"], [_mobx.computed, 3, "waitingRoomUserCount"], [_mobx.computed, 3, "isNewWaitingRoomUserEnter"], [_decorator.bound, 2, "hasMutePermission"], [_decorator.bound, 2, "hasWaitingRoomPermission"], [_decorator.bound, 2, "hasUnmutePermission"], [_decorator.bound, 2, "hasRequestStartAudioPermission"], [_setCurrentModalDecs, 18, "setCurrentModal"], [_decorator.bound, 2, "closeParticipantsAside"], [_decorator.bound, 2, "closeDialog"], [_setParticipantsWindowActiveDecs, 18, "setParticipantsWindowActive"], [_handlerSearchUserDecs, 18, "handlerSearchUser"], [_decorator.bound, 2, "onInvite"], [_decorator.bound, 2, "setMergeConfirmDialog"], [_decorator.bound, 2, "mergeConfirmDialogOk"], [_openRemoveAdmitWaitingRoomDialogDecs, 18, "openRemoveAdmitWaitingRoomDialog"], [_setAllowUnmuteDecs, 18, "setAllowUnmute"], [_setAllowJoinWithMuteAudioDecs, 18, "setAllowJoinWithMuteAudio"], [_openMuteAllDialogDecs, 18, "openMuteAllDialog"], [_handlerRoomControlActionDecs, 18, "handlerRoomControlAction"], [_decorator.bound, 2, "moveParticipantFromDialogToAside"], [_moveToMainRoomByUserIdsDecs, 18, "moveToMainRoomByUserIds"], [_kickOutWaitingRoomAllMemberDecs, 18, "kickOutWaitingRoomAllMember"], [_moveToMainRoomAllMemberDecs, 18, "moveToMainRoomAllMember"], [_removeWaitingRoomUserDecs, 18, "removeWaitingRoomUser"], [_decorator.bound, 2, "removePin"], [_decorator.bound, 2, "addPin"], [_decorator.bound, 2, "_getPinStreamIdFromUser"], [_handleUserCountUpdatedDecs, 18, "_handleUserCountUpdated"], [_handleConfirmChangeNameDecs, 18, "handleConfirmChangeName"], [_handleCancelChangeNameDecs, 18, "handleCancelChangeName"], [_closeChangeNameDialogDecs, 18, "_closeChangeNameDialog"], [_getOutputLanguageDecs, 18, "_getOutputLanguage"], [_handlerUserActionDecs, 18, "handlerUserAction"], [_handleActiveTabDecs, 18, "handleActiveTab"], [_moveToWaitingRoomByUserIdDecs, 18, "_moveToWaitingRoomByUserId"], [_kickOutUserDecs, 18, "_kickOutUser"], [_onPeerSessionReceivedDecs, 18, "_onPeerSessionReceived"], [_decorator.bound, 2, "_onPeerSessionAccepted"], [_decorator.bound, 2, "_onPeerSessionRejected"], [_decorator.bound, 2, "_handleEvent"]], []).e, 16);
2349
+ _init__mainList = _applyDecs$e[0];
2350
+ _init__isChecked = _applyDecs$e[1];
2351
+ _init__participantsWindowActive = _applyDecs$e[2];
2352
+ _init_enableParticipantsJoinWithMute = _applyDecs$e[3];
2353
+ _init_searchText = _applyDecs$e[4];
2354
+ _init_currentModal = _applyDecs$e[5];
2355
+ _init_mergeConfirmDialog = _applyDecs$e[6];
2356
+ _init_mergeUserId = _applyDecs$e[7];
2357
+ _init_activeTab = _applyDecs$e[8];
2358
+ _init_interpreterInputLanguageList = _applyDecs$e[9];
2359
+ _init_newName = _applyDecs$e[10];
2360
+ _init_allowUnmute = _applyDecs$e[11];
2361
+ _init_joinWithMuteAudio = _applyDecs$e[12];
2362
+ _init_showBecomeHostButton = _applyDecs$e[13];
2363
+ _init__userCount = _applyDecs$e[14];
2364
+ _initProto = _applyDecs$e[15];
2365
+ var StoreContext = exports.StoreContext = /*#__PURE__*/(0, _react.createContext)(null);