fcr-ui-scene 3.7.8 → 3.8.0-alpha

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 (569) hide show
  1. package/lib/creator/index.d.ts +6 -3
  2. package/lib/creator/index.js +45 -33
  3. package/lib/creator/provider-initializer.browser.js +34 -5
  4. package/lib/creator/provider-initializer.electron.js +34 -6
  5. package/lib/electron/bootstrap-sdk.d.ts +3 -1
  6. package/lib/electron/bootstrap-sdk.js +93 -358
  7. package/lib/electron/exit-codes.d.ts +6 -1
  8. package/lib/electron/exit-codes.js +5 -0
  9. package/lib/electron/injections.d.ts +10 -4
  10. package/lib/electron/injections.js +116 -74
  11. package/lib/electron/ipc/ipc.js +13 -11
  12. package/lib/electron/ipc/type.d.ts +3 -1
  13. package/lib/electron/ipc/type.js +2 -0
  14. package/lib/electron/main.js +3 -1
  15. package/lib/electron/preload.js +2 -1
  16. package/lib/electron/process-manager/constants.d.ts +1 -0
  17. package/lib/{modules/control-bar/types.js → electron/process-manager/constants.js} +3 -1
  18. package/lib/electron/{event-manager.d.ts → process-manager/event-manager.d.ts} +3 -4
  19. package/lib/electron/{event-manager.js → process-manager/event-manager.js} +38 -30
  20. package/lib/electron/process-manager/index.d.ts +179 -0
  21. package/lib/electron/process-manager/index.js +848 -0
  22. package/lib/electron/process-manager/state-manager.d.ts +135 -0
  23. package/lib/electron/process-manager/state-manager.js +358 -0
  24. package/lib/electron/process-manager/types.d.ts +80 -0
  25. package/lib/electron/process-manager/types.js +79 -0
  26. package/lib/electron/sdk-helper.d.ts +4 -0
  27. package/lib/electron/sdk-helper.js +45 -4
  28. package/lib/electron/until.js +3 -0
  29. package/lib/fragments/annotation/libs.d.ts +1 -1
  30. package/lib/fragments/annotation/libs.js +12 -12
  31. package/lib/fragments/annotation/store.d.ts +1 -1
  32. package/lib/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -1
  33. package/lib/fragments/annotation/toolbar/components/graphic-tool/graphic-panel/libs.js +21 -21
  34. package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +3 -3
  35. package/lib/fragments/annotation/toolbar/store.d.ts +1 -1
  36. package/lib/fragments/annotation/toolbar/store.js +10 -10
  37. package/lib/fragments/annotation/toolbar/view.js +7 -7
  38. package/lib/fragments/whiteboard/store.d.ts +2 -2
  39. package/lib/fragments/whiteboard/store.js +27 -21
  40. package/lib/fragments/whiteboard/view.js +2 -2
  41. package/lib/index.d.ts +1 -1
  42. package/lib/index.js +10 -3
  43. package/lib/modules/action-bar/components/apps/index.js +1 -37
  44. package/lib/modules/action-bar/components/collapse/index.d.ts +2 -1
  45. package/lib/modules/action-bar/components/collapse/index.js +11 -2
  46. package/lib/modules/action-bar/components/item/index.js +2 -2
  47. package/lib/modules/action-bar/components/screen-share/index.browser.js +21 -14
  48. package/lib/modules/action-bar/components/screen-share/index.electron.js +38 -24
  49. package/lib/modules/action-bar/components/screen-share/submenu.js +6 -5
  50. package/lib/modules/action-bar/components/security/index.js +2 -2
  51. package/lib/modules/action-bar/index.css +26 -0
  52. package/lib/modules/action-bar/main-scene/store.base.d.ts +6 -4
  53. package/lib/modules/action-bar/main-scene/store.base.js +41 -46
  54. package/lib/modules/action-bar/type.d.ts +0 -10
  55. package/lib/modules/audio-stream/index.d.ts +1 -1
  56. package/lib/modules/audio-stream/index.js +22 -8
  57. package/lib/modules/caption/draggable-container/index.css +10 -0
  58. package/lib/modules/caption/draggable-container/index.d.ts +4 -0
  59. package/lib/modules/caption/draggable-container/index.js +145 -0
  60. package/lib/modules/caption/index.d.ts +10 -0
  61. package/lib/modules/{annotation → caption}/index.js +43 -84
  62. package/lib/modules/caption/store.d.ts +56 -0
  63. package/lib/modules/caption/store.js +366 -0
  64. package/lib/modules/caption/type.d.ts +13 -0
  65. package/lib/modules/caption/type.js +14 -0
  66. package/lib/modules/caption/view.css +158 -0
  67. package/lib/modules/caption/view.d.ts +4 -0
  68. package/lib/modules/caption/view.js +292 -0
  69. package/lib/modules/chat/chat-room-store.d.ts +1 -1
  70. package/lib/modules/chat/chat-room-store.js +6 -6
  71. package/lib/modules/chat/components/message-list/message-item/index.js +60 -18
  72. package/lib/modules/chat/index.css +7 -0
  73. package/lib/modules/chat/store.js +1 -1
  74. package/lib/modules/components/apps/app-item/index.css +16 -1
  75. package/lib/modules/components/apps/app-item/index.js +102 -35
  76. package/lib/modules/components/apps/app-list.js +17 -1
  77. package/lib/modules/components/apps/types.d.ts +11 -1
  78. package/lib/modules/components/caption-menu/index.css +58 -0
  79. package/lib/modules/components/caption-menu/index.d.ts +41 -0
  80. package/lib/modules/components/caption-menu/index.js +112 -0
  81. package/lib/modules/components/caption-menu/participants-privilege-control-options.d.ts +2 -0
  82. package/lib/modules/components/caption-menu/participants-privilege-control-options.js +87 -0
  83. package/lib/modules/components/caption-menu/steps/index.css +73 -0
  84. package/lib/modules/components/caption-menu/steps/index.d.ts +11 -0
  85. package/lib/modules/components/caption-menu/steps/index.js +56 -0
  86. package/lib/modules/components/caption-menu/translation-setting-options.d.ts +17 -0
  87. package/lib/modules/components/caption-menu/translation-setting-options.js +181 -0
  88. package/lib/modules/components/control-bar/index.d.ts +3 -3
  89. package/lib/modules/components/control-bar/index.js +10 -10
  90. package/lib/modules/components/device-control/components/audio-menu/index.js +17 -0
  91. package/lib/modules/components/device-control/components/carmera/index.js +3 -0
  92. package/lib/modules/components/device-control/components/microphone/index.js +4 -1
  93. package/lib/modules/components/device-control/index.css +12 -4
  94. package/lib/modules/components/device-control/store.base.d.ts +1 -0
  95. package/lib/modules/components/device-control/store.base.js +2 -0
  96. package/lib/modules/components/leave-meeting/store.base.d.ts +1 -0
  97. package/lib/modules/components/leave-meeting/store.base.js +46 -5
  98. package/lib/modules/components/security-menu/index.js +147 -65
  99. package/lib/modules/components/security-menu/store.d.ts +15 -0
  100. package/lib/modules/components/security-menu/store.js +78 -16
  101. package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +1 -1
  102. package/lib/modules/components/toolbar/components/clean-tool/index.js +4 -4
  103. package/lib/modules/components/toolbar/components/color-tool/index.d.ts +1 -1
  104. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +1 -1
  105. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -1
  106. package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +21 -21
  107. package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +1 -1
  108. package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +1 -1
  109. package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +1 -1
  110. package/lib/modules/components/toolbar/components/pen-tool/index.js +3 -3
  111. package/lib/modules/components/toolbar/index.d.ts +2 -2
  112. package/lib/modules/components/toolbar/index.js +35 -34
  113. package/lib/modules/components/toolbar/style.css +1 -1
  114. package/lib/modules/components/toolbar/types.d.ts +1 -1
  115. package/lib/modules/connection-gateway/store.d.ts +1 -0
  116. package/lib/modules/connection-gateway/store.js +5 -0
  117. package/lib/modules/control-bar/components/apps-popover/index.d.ts +3 -0
  118. package/lib/modules/control-bar/components/apps-popover/index.js +41 -0
  119. package/lib/modules/control-bar/components/more-actions/index.js +9 -1
  120. package/lib/modules/control-bar/enums.d.ts +2 -1
  121. package/lib/modules/control-bar/enums.js +1 -0
  122. package/lib/modules/control-bar/store.d.ts +6 -1
  123. package/lib/modules/control-bar/store.js +56 -12
  124. package/lib/modules/control-bar/view.js +16 -11
  125. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +8 -0
  126. package/lib/modules/dialog/components/dialog-container/component/body.js +44 -5
  127. package/lib/modules/dialog/components/dialog-container/index.css +4 -1
  128. package/lib/modules/dialog/components/dialog-container/index.d.ts +1 -0
  129. package/lib/modules/dialog/components/dialog-container/index.js +7 -1
  130. package/lib/modules/dialog/components/normal-window/index.d.ts +1 -0
  131. package/lib/modules/dialog/components/normal-window/index.js +3 -1
  132. package/lib/modules/dialog/dialogs/caption/index.d.ts +21 -0
  133. package/lib/modules/dialog/dialogs/caption/index.js +42 -0
  134. package/lib/modules/dialog/dialogs/chat/components/actions.js +2 -2
  135. package/lib/modules/dialog/dialogs/confirm/index.js +1 -1
  136. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +1 -0
  137. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.js +2 -1
  138. package/lib/modules/dialog/dialogs/participant/components/actions.js +2 -2
  139. package/lib/modules/dialog/dialogs/share-screen-selection/index.js +0 -12
  140. package/lib/modules/dialog/dialogs/subtitles-history/index.d.ts +27 -0
  141. package/lib/modules/dialog/dialogs/subtitles-history/index.js +51 -0
  142. package/lib/modules/dialog/store.base.d.ts +1 -1
  143. package/lib/modules/dialog/store.browser.d.ts +1 -1
  144. package/lib/modules/dialog/store.electron.d.ts +1 -3
  145. package/lib/modules/dialog/store.electron.js +0 -9
  146. package/lib/modules/event-sound/enum.d.ts +5 -0
  147. package/lib/modules/event-sound/enum.js +20 -0
  148. package/lib/modules/event-sound/index.d.ts +0 -10
  149. package/lib/modules/event-sound/index.js +1 -12
  150. package/lib/modules/event-sound/store.d.ts +2 -2
  151. package/lib/modules/event-sound/store.js +21 -22
  152. package/lib/modules/interpreter/store.js +4 -2
  153. package/lib/modules/layout/components/Aside.d.ts +2 -1
  154. package/lib/modules/layout/components/Aside.js +97 -58
  155. package/lib/modules/layout/components/CommonVideoRenderer.js +1 -2
  156. package/lib/modules/layout/components/index.css +15 -2
  157. package/lib/modules/layout/store.base.d.ts +13 -2
  158. package/lib/modules/layout/store.base.js +149 -54
  159. package/lib/modules/layout/store.electron.d.ts +1 -0
  160. package/lib/modules/layout/store.electron.js +132 -32
  161. package/lib/modules/layout/type.d.ts +4 -0
  162. package/lib/modules/layout/view.js +27 -5
  163. package/lib/modules/notification/index.css +4 -4
  164. package/lib/modules/notification/store.d.ts +5 -3
  165. package/lib/modules/notification/store.js +9 -2
  166. package/lib/modules/notification/view.d.ts +1 -0
  167. package/lib/modules/notification/view.js +33 -2
  168. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +0 -1
  169. package/lib/modules/participant/components/participants/components/footer/index.js +1 -1
  170. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +2 -2
  171. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +6 -1
  172. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +1 -1
  173. package/lib/modules/participant/components/participants/index.js +13 -1
  174. package/lib/modules/participant/store.base.d.ts +1 -2
  175. package/lib/modules/participant/store.base.js +70 -71
  176. package/lib/modules/participant/type.d.ts +3 -1
  177. package/lib/modules/participant/type.js +2 -0
  178. package/lib/modules/pc-audio-connect/main-scene/store.d.ts +1 -0
  179. package/lib/modules/pc-audio-connect/main-scene/store.js +5 -0
  180. package/lib/modules/pc-audio-connect/waiting-scene/store.d.ts +2 -0
  181. package/lib/modules/pc-audio-connect/waiting-scene/store.js +10 -6
  182. package/lib/modules/phone-audio-connect/store.d.ts +1 -0
  183. package/lib/modules/phone-audio-connect/store.js +5 -0
  184. package/lib/modules/secondary-window/store.d.ts +1 -2
  185. package/lib/modules/secondary-window/store.js +22 -12
  186. package/lib/modules/secondary-window/type.d.ts +1 -1
  187. package/lib/modules/secondary-window/view.js +7 -8
  188. package/lib/modules/setting/audio-whiteList/audio-device-adaptation.d.ts +18 -0
  189. package/lib/modules/setting/audio-whiteList/audio-device-adaptation.js +34 -0
  190. package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.d.ts +63 -0
  191. package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.js +353 -0
  192. package/lib/modules/setting/caption_and_transcribing/index.css +88 -0
  193. package/lib/modules/setting/caption_and_transcribing/index.d.ts +3 -0
  194. package/lib/modules/setting/caption_and_transcribing/index.js +96 -0
  195. package/lib/modules/setting/general-settings/general-settings.d.ts +4 -0
  196. package/lib/modules/setting/general-settings/general-settings.js +3 -3
  197. package/lib/modules/setting/index.d.ts +1 -0
  198. package/lib/modules/setting/index.js +10 -7
  199. package/lib/modules/setting/state/index.js +5 -3
  200. package/lib/modules/setting/store.base.d.ts +29 -4
  201. package/lib/modules/setting/store.base.js +143 -62
  202. package/lib/modules/setting/store.browser.js +4 -9
  203. package/lib/modules/setting/store.electron.d.ts +11 -0
  204. package/lib/modules/setting/store.electron.js +110 -1
  205. package/lib/modules/setting/type.d.ts +2 -1
  206. package/lib/modules/setting/type.js +1 -0
  207. package/lib/modules/setting/video-settings/video-settings-basic.js +1 -7
  208. package/lib/modules/setting/view.js +11 -4
  209. package/lib/modules/share-screen/store.base.d.ts +1 -1
  210. package/lib/modules/share-screen/store.base.js +3 -2
  211. package/lib/modules/share-screen/store.electron.d.ts +3 -1
  212. package/lib/modules/share-screen/store.electron.js +168 -38
  213. package/lib/modules/state-bar/index.css +73 -2
  214. package/lib/modules/state-bar/main-scene/store.base.d.ts +2 -0
  215. package/lib/modules/state-bar/main-scene/store.base.js +7 -1
  216. package/lib/modules/state-bar/main-scene/store.browser.js +1 -1
  217. package/lib/modules/state-bar/main-scene/store.electron.js +1 -1
  218. package/lib/modules/state-bar/store.base.d.ts +5 -0
  219. package/lib/modules/state-bar/store.base.js +29 -2
  220. package/lib/modules/state-bar/subtitles-history-state.d.ts +7 -0
  221. package/lib/modules/state-bar/subtitles-history-state.js +108 -0
  222. package/lib/modules/state-bar/view.js +16 -1
  223. package/lib/modules/state-bar/waiting-scene/store.base.d.ts +1 -0
  224. package/lib/modules/state-bar/waiting-scene/store.base.js +5 -0
  225. package/lib/modules/subtitles-history/components/actions.d.ts +5 -0
  226. package/lib/modules/subtitles-history/components/actions.js +36 -0
  227. package/lib/modules/subtitles-history/components/list-item.d.ts +12 -0
  228. package/lib/modules/subtitles-history/components/list-item.js +105 -0
  229. package/lib/modules/subtitles-history/components/list.d.ts +10 -0
  230. package/lib/modules/subtitles-history/components/list.js +182 -0
  231. package/lib/modules/subtitles-history/components/respond-dialog-content.d.ts +5 -0
  232. package/lib/modules/subtitles-history/components/respond-dialog-content.js +44 -0
  233. package/lib/modules/subtitles-history/components/settings/index.css +5 -0
  234. package/lib/modules/subtitles-history/components/settings/index.d.ts +2 -0
  235. package/lib/modules/subtitles-history/components/settings/index.js +53 -0
  236. package/lib/modules/subtitles-history/components/timer.d.ts +3 -0
  237. package/lib/modules/subtitles-history/components/timer.js +44 -0
  238. package/lib/modules/subtitles-history/components/title.d.ts +1 -0
  239. package/lib/modules/subtitles-history/components/title.js +15 -0
  240. package/lib/modules/subtitles-history/empty.d.ts +2 -0
  241. package/lib/modules/subtitles-history/empty.js +22 -0
  242. package/lib/modules/subtitles-history/index.css +129 -0
  243. package/lib/modules/subtitles-history/index.d.ts +13 -0
  244. package/lib/modules/{event-confirm → subtitles-history}/index.js +62 -31
  245. package/lib/modules/subtitles-history/store.base.d.ts +74 -0
  246. package/lib/modules/subtitles-history/store.base.js +786 -0
  247. package/lib/modules/subtitles-history/store.electron.d.ts +15 -0
  248. package/lib/{shared-data-source/security-data.js → modules/subtitles-history/store.electron.js} +75 -77
  249. package/lib/modules/subtitles-history/type.d.ts +4 -0
  250. package/lib/modules/subtitles-history/view.d.ts +1 -0
  251. package/lib/modules/subtitles-history/view.js +104 -0
  252. package/lib/modules/video-window/popover-watcher.js +4 -1
  253. package/lib/modules/video-window/store.js +7 -1
  254. package/lib/modules/video-window/view.js +14 -4
  255. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +2 -2
  256. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +5 -5
  257. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +15 -15
  258. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +21 -21
  259. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +23 -21
  260. package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -6
  261. package/lib/modules/whiteboard/components/toolbar/store.js +14 -15
  262. package/lib/modules/whiteboard/store.d.ts +2 -3
  263. package/lib/modules/whiteboard/store.electron.d.ts +2 -0
  264. package/lib/modules/whiteboard/store.electron.js +35 -0
  265. package/lib/modules/whiteboard/store.js +14 -2
  266. package/lib/modules/whiteboard/type.d.ts +0 -35
  267. package/lib/modules/whiteboard/type.js +1 -26
  268. package/lib/modules/widget/type.d.ts +3 -66
  269. package/lib/object-manager.d.ts +3 -1
  270. package/lib/object-manager.js +2 -0
  271. package/lib/providers/ability-provider.d.ts +24 -0
  272. package/lib/providers/ability-provider.js +21 -0
  273. package/lib/providers/app-list-provider.d.ts +90 -4
  274. package/lib/providers/app-list-provider.js +157 -13
  275. package/lib/providers/board-share/bar-control/base.d.ts +4 -5
  276. package/lib/providers/board-share/bar-control/base.js +4 -4
  277. package/lib/providers/board-share/bar-control/browser.d.ts +2 -2
  278. package/lib/providers/board-share/bar-control/electron.d.ts +4 -5
  279. package/lib/providers/board-share/bar-control/electron.js +2 -0
  280. package/lib/providers/board-share/provider.base.d.ts +6 -6
  281. package/lib/providers/board-share/provider.base.js +20 -3
  282. package/lib/providers/board-share/provider.browser.js +2 -2
  283. package/lib/providers/board-share/provider.electron.js +1 -2
  284. package/lib/providers/board-share/type.d.ts +1 -2
  285. package/lib/providers/device-provider.d.ts +15 -5
  286. package/lib/providers/device-provider.js +198 -144
  287. package/lib/providers/dialog/provider.base.js +1 -1
  288. package/lib/providers/dialog/provider.electron.js +3 -0
  289. package/lib/providers/interpreter-provider.js +4 -9
  290. package/lib/providers/multi-display-provider.d.ts +1 -1
  291. package/lib/providers/privilege-provider.d.ts +241 -139
  292. package/lib/providers/privilege-provider.js +577 -318
  293. package/lib/providers/room-provider/waiting-room-control-manager.d.ts +1 -1
  294. package/lib/providers/screen-share/constant.d.ts +1 -0
  295. package/lib/{modules/share-screen/types.js → providers/screen-share/constant.js} +3 -1
  296. package/lib/providers/screen-share/provider.base.d.ts +20 -7
  297. package/lib/providers/screen-share/provider.base.js +27 -27
  298. package/lib/providers/screen-share/provider.browser.js +14 -18
  299. package/lib/providers/screen-share/provider.electron.d.ts +8 -0
  300. package/lib/providers/screen-share/provider.electron.js +41 -13
  301. package/lib/providers/screen-share/strategy/browser.js +1 -1
  302. package/lib/providers/screen-share/strategy/electron.d.ts +2 -1
  303. package/lib/providers/screen-share/strategy/electron.js +64 -56
  304. package/lib/providers/screen-share/strategy/type.d.ts +2 -2
  305. package/lib/providers/screen-share/stream-state-sync.js +5 -3
  306. package/lib/providers/screen-share/struct.d.ts +14 -4
  307. package/lib/providers/screen-share/struct.js +16 -5
  308. package/lib/providers/screen-share/type.d.ts +32 -2
  309. package/lib/providers/stt-provider/stt-provider.d.ts +89 -0
  310. package/lib/providers/stt-provider/stt-provider.js +1008 -0
  311. package/lib/providers/stt-provider/type.d.ts +168 -0
  312. package/lib/providers/stt-provider/type.js +19 -0
  313. package/lib/providers/window/main-window.d.ts +1 -0
  314. package/lib/providers/window/main-window.js +6 -4
  315. package/lib/providers/window/renderer-window.d.ts +7 -0
  316. package/lib/providers/window/renderer-window.js +65 -4
  317. package/lib/providers/window/type.d.ts +5 -0
  318. package/lib/runtime.d.ts +8 -7
  319. package/lib/runtime.js +1 -2
  320. package/lib/scenes/main-scene.d.ts +1 -0
  321. package/lib/scenes/main-scene.js +144 -67
  322. package/lib/schema.d.ts +70 -8
  323. package/lib/schema.js +7 -2
  324. package/lib/shared-data/app-list-data.d.ts +4 -0
  325. package/lib/shared-data/app-list-data.js +21 -1
  326. package/lib/shared-data/config.d.ts +5 -1
  327. package/lib/shared-data/layout-data.d.ts +5 -0
  328. package/lib/shared-data/layout-data.js +35 -9
  329. package/lib/shared-data/member-data.d.ts +2 -3
  330. package/lib/shared-data/screen-share/index.d.ts +0 -2
  331. package/lib/shared-data/screen-share/index.js +20 -36
  332. package/lib/shared-data/screen-share/type.d.ts +0 -8
  333. package/lib/shared-data/security-data.d.ts +4 -0
  334. package/lib/shared-data/security-data.js +14 -10
  335. package/lib/shared-data/setting.d.ts +16 -1
  336. package/lib/shared-data/setting.js +32 -5
  337. package/lib/shared-data/stt-setting.ts/constant.d.ts +29 -0
  338. package/lib/shared-data/stt-setting.ts/constant.js +35 -0
  339. package/lib/shared-data/stt-setting.ts/index.d.ts +67 -0
  340. package/lib/{shared-data-source/layout-data.js → shared-data/stt-setting.ts/index.js} +96 -83
  341. package/lib/shared-data/stt-setting.ts/type.d.ts +10 -0
  342. package/lib/shared-data/stt-setting.ts/type.js +14 -0
  343. package/lib/shared-data/video-window.d.ts +1 -2
  344. package/lib/shared-data/video-window.js +20 -32
  345. package/lib/translations/enUS.d.ts +9 -0
  346. package/lib/translations/enUS.js +21 -4
  347. package/lib/translations/zhCN.d.ts +9 -0
  348. package/lib/translations/zhCN.js +21 -4
  349. package/lib/type.d.ts +20 -15
  350. package/lib/type.js +1 -0
  351. package/lib/{ui-scene.d.ts → ui-scene-switch.d.ts} +1 -1
  352. package/lib/{ui-scene.js → ui-scene-switch.js} +29 -9
  353. package/lib/utilities/constant.d.ts +6 -2
  354. package/lib/utilities/constant.js +5 -1
  355. package/lib/utilities/default-config.d.ts +3 -3
  356. package/lib/utilities/default-config.js +8 -18
  357. package/lib/utilities/focus-helper.js +18 -11
  358. package/lib/utilities/logger.js +1 -1
  359. package/lib/utilities/renderer.d.ts +4 -6
  360. package/lib/utilities/renderer.js +10 -4
  361. package/lib/utilities/tools.d.ts +1 -0
  362. package/lib/utilities/tools.js +6 -1
  363. package/lib/utilities/ui-resources.d.ts +9 -2
  364. package/lib/utilities/ui-resources.js +36 -12
  365. package/package.json +11 -6
  366. package/public/index.html +3 -149
  367. package/public/meeting-manager.js +405 -0
  368. package/installer/icons/favicon.ico +0 -0
  369. package/installer/icons/favicon.png +0 -0
  370. package/installer/icons/icon.png +0 -0
  371. package/installer/mac/entitlements.mac.plist +0 -20
  372. package/lib/creator.d.ts +0 -36
  373. package/lib/creator.js +0 -465
  374. package/lib/modules/action-bar/index.d.ts +0 -56
  375. package/lib/modules/action-bar/index.dev.d.ts +0 -0
  376. package/lib/modules/action-bar/index.dev.js +0 -94
  377. package/lib/modules/action-bar/index.js +0 -108
  378. package/lib/modules/action-bar/store.d.ts +0 -256
  379. package/lib/modules/action-bar/store.js +0 -1572
  380. package/lib/modules/action-bar/types.d.ts +0 -90
  381. package/lib/modules/action-bar/view.d.ts +0 -5
  382. package/lib/modules/action-bar/view.js +0 -112
  383. package/lib/modules/annotation/annotation-index.d.ts +0 -2
  384. package/lib/modules/annotation/annotation-index.js +0 -80
  385. package/lib/modules/annotation/annotation-toolbar-store.d.ts +0 -75
  386. package/lib/modules/annotation/annotation-toolbar-store.js +0 -459
  387. package/lib/modules/annotation/board-cursor.css +0 -77
  388. package/lib/modules/annotation/components/color-picker/components/color.d.ts +0 -5
  389. package/lib/modules/annotation/components/color-picker/components/color.js +0 -38
  390. package/lib/modules/annotation/components/color-picker/components/panel.d.ts +0 -1
  391. package/lib/modules/annotation/components/color-picker/components/panel.js +0 -109
  392. package/lib/modules/annotation/components/color-picker/components/picker.d.ts +0 -1
  393. package/lib/modules/annotation/components/color-picker/components/picker.js +0 -75
  394. package/lib/modules/annotation/components/color-picker/index.d.ts +0 -2
  395. package/lib/modules/annotation/components/color-picker/index.js +0 -47
  396. package/lib/modules/annotation/components/eraser-picker.d.ts +0 -4
  397. package/lib/modules/annotation/components/eraser-picker.js +0 -144
  398. package/lib/modules/annotation/components/expansion/index.d.ts +0 -1
  399. package/lib/modules/annotation/components/expansion/index.js +0 -100
  400. package/lib/modules/annotation/components/extra-tool-picker.d.ts +0 -1
  401. package/lib/modules/annotation/components/extra-tool-picker.js +0 -62
  402. package/lib/modules/annotation/components/history.d.ts +0 -2
  403. package/lib/modules/annotation/components/history.js +0 -78
  404. package/lib/modules/annotation/components/icons/fold-icon.d.ts +0 -2
  405. package/lib/modules/annotation/components/icons/fold-icon.js +0 -41
  406. package/lib/modules/annotation/components/icons/move-icon.d.ts +0 -1
  407. package/lib/modules/annotation/components/icons/move-icon.js +0 -66
  408. package/lib/modules/annotation/components/item/index.d.ts +0 -1
  409. package/lib/modules/annotation/components/item/index.js +0 -43
  410. package/lib/modules/annotation/components/move-handle.d.ts +0 -5
  411. package/lib/modules/annotation/components/move-handle.js +0 -134
  412. package/lib/modules/annotation/components/pen-picker.d.ts +0 -4
  413. package/lib/modules/annotation/components/pen-picker.js +0 -155
  414. package/lib/modules/annotation/components/screen-capture-picker.d.ts +0 -4
  415. package/lib/modules/annotation/components/screen-capture-picker.js +0 -85
  416. package/lib/modules/annotation/components/shape-picker.d.ts +0 -4
  417. package/lib/modules/annotation/components/shape-picker.js +0 -210
  418. package/lib/modules/annotation/hooks/index.d.ts +0 -14
  419. package/lib/modules/annotation/hooks/index.js +0 -292
  420. package/lib/modules/annotation/index.d.ts +0 -45
  421. package/lib/modules/annotation/store.d.ts +0 -98
  422. package/lib/modules/annotation/store.js +0 -621
  423. package/lib/modules/annotation/style.css +0 -36
  424. package/lib/modules/annotation/view.d.ts +0 -3
  425. package/lib/modules/annotation/view.js +0 -44
  426. package/lib/modules/components/device-control/store.d.ts +0 -42
  427. package/lib/modules/components/device-control/store.js +0 -241
  428. package/lib/modules/components/leave-meeting/store.d.ts +0 -39
  429. package/lib/modules/components/leave-meeting/store.js +0 -270
  430. package/lib/modules/control-bar/components/annotation-button/index.d.ts +0 -1
  431. package/lib/modules/control-bar/components/annotation-button/index.js +0 -72
  432. package/lib/modules/control-bar/reactor.d.ts +0 -2
  433. package/lib/modules/control-bar/reactor.js +0 -8
  434. package/lib/modules/control-bar/types.d.ts +0 -20
  435. package/lib/modules/dialog/dialogs/pre-setting/index.css +0 -26
  436. package/lib/modules/dialog/dialogs/pre-setting/index.d.ts +0 -6
  437. package/lib/modules/dialog/dialogs/pre-setting/index.js +0 -62
  438. package/lib/modules/dialog/dialogs/widget/electron.d.ts +0 -6
  439. package/lib/modules/dialog/dialogs/widget/electron.js +0 -38
  440. package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +0 -14
  441. package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -110
  442. package/lib/modules/dialog/hooks/useElectron.d.ts +0 -28
  443. package/lib/modules/dialog/hooks/useElectron.js +0 -277
  444. package/lib/modules/dialog/store.d.ts +0 -135
  445. package/lib/modules/dialog/store.js +0 -616
  446. package/lib/modules/event-confirm/components/window/index.d.ts +0 -4
  447. package/lib/modules/event-confirm/components/window/index.js +0 -197
  448. package/lib/modules/event-confirm/index.css +0 -24
  449. package/lib/modules/event-confirm/index.d.ts +0 -27
  450. package/lib/modules/event-confirm/store.d.ts +0 -45
  451. package/lib/modules/event-confirm/store.js +0 -345
  452. package/lib/modules/event-confirm/view.d.ts +0 -2
  453. package/lib/modules/event-confirm/view.js +0 -53
  454. package/lib/modules/event-toast/store.d.ts +0 -27
  455. package/lib/modules/event-toast/store.js +0 -205
  456. package/lib/modules/layout/store.d.ts +0 -176
  457. package/lib/modules/layout/store.js +0 -1466
  458. package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +0 -17
  459. package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +0 -5
  460. package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +0 -242
  461. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +0 -192
  462. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +0 -4
  463. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -206
  464. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +0 -57
  465. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +0 -5
  466. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -229
  467. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +0 -5
  468. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +0 -68
  469. package/lib/modules/participant/components/participants/components/participants/index.css +0 -105
  470. package/lib/modules/participant/components/participants/components/participants/index.d.ts +0 -3
  471. package/lib/modules/participant/components/participants/components/participants/index.js +0 -117
  472. package/lib/modules/participant/components/participants/types.d.ts +0 -101
  473. package/lib/modules/participant/components/participants/types.js +0 -37
  474. package/lib/modules/participant/store.d.ts +0 -222
  475. package/lib/modules/participant/store.js +0 -1927
  476. package/lib/modules/pc-audio-connect/index.d.ts +0 -22
  477. package/lib/modules/pc-audio-connect/index.js +0 -67
  478. package/lib/modules/pc-audio-connect/store.d.ts +0 -46
  479. package/lib/modules/pc-audio-connect/store.js +0 -304
  480. package/lib/modules/setting/common/advance-link.d.ts +0 -3
  481. package/lib/modules/setting/common/advance-link.js +0 -27
  482. package/lib/modules/setting/common/index.css +0 -26
  483. package/lib/modules/setting/common/useNamespace.d.ts +0 -15
  484. package/lib/modules/setting/common/useNamespace.js +0 -66
  485. package/lib/modules/setting/config.d.ts +0 -36
  486. package/lib/modules/setting/config.js +0 -36
  487. package/lib/modules/setting/dialog-wrapper.d.ts +0 -2
  488. package/lib/modules/setting/dialog-wrapper.js +0 -110
  489. package/lib/modules/setting/store.d.ts +0 -261
  490. package/lib/modules/setting/store.js +0 -1321
  491. package/lib/modules/share-screen/store.d.ts +0 -148
  492. package/lib/modules/share-screen/store.js +0 -950
  493. package/lib/modules/share-screen/types.d.ts +0 -26
  494. package/lib/modules/state-bar/store.d.ts +0 -124
  495. package/lib/modules/state-bar/store.js +0 -664
  496. package/lib/modules/whiteboard/components/progress/electron.d.ts +0 -1
  497. package/lib/modules/whiteboard/components/progress/electron.js +0 -33
  498. package/lib/modules/widget/sdk.d.ts +0 -30
  499. package/lib/modules/widget/sdk.js +0 -224
  500. package/lib/modules/widget/store.d.ts +0 -14
  501. package/lib/modules/widget/store.js +0 -28
  502. package/lib/providers/annotation-provider.d.ts +0 -124
  503. package/lib/providers/annotation-provider.js +0 -369
  504. package/lib/providers/dialog-provider.d.ts +0 -137
  505. package/lib/providers/dialog-provider.js +0 -194
  506. package/lib/providers/message-provider.d.ts +0 -69
  507. package/lib/providers/message-provider.js +0 -140
  508. package/lib/providers/room-provider.d.ts +0 -194
  509. package/lib/providers/room-provider.js +0 -916
  510. package/lib/providers/screen-share-provider.d.ts +0 -244
  511. package/lib/providers/screen-share-provider.js +0 -835
  512. package/lib/providers/sharing-provider.d.ts +0 -42
  513. package/lib/providers/sharing-provider.js +0 -221
  514. package/lib/providers/user-setting-storage-provider.d.ts +0 -21
  515. package/lib/providers/user-setting-storage-provider.js +0 -65
  516. package/lib/providers/whiteboard-provider.d.ts +0 -24
  517. package/lib/providers/whiteboard-provider.js +0 -127
  518. package/lib/shared-data-source/annotation-data.d.ts +0 -17
  519. package/lib/shared-data-source/annotation-data.js +0 -110
  520. package/lib/shared-data-source/app-list-data.d.ts +0 -34
  521. package/lib/shared-data-source/app-list-data.js +0 -133
  522. package/lib/shared-data-source/chat-data.d.ts +0 -25
  523. package/lib/shared-data-source/chat-data.js +0 -139
  524. package/lib/shared-data-source/config.d.ts +0 -35
  525. package/lib/shared-data-source/config.js +0 -40
  526. package/lib/shared-data-source/confirm-data.d.ts +0 -25
  527. package/lib/shared-data-source/confirm-data.js +0 -97
  528. package/lib/shared-data-source/device-privilege-data.d.ts +0 -8
  529. package/lib/shared-data-source/device-privilege-data.js +0 -25
  530. package/lib/shared-data-source/interpreter.d.ts +0 -77
  531. package/lib/shared-data-source/interpreter.js +0 -247
  532. package/lib/shared-data-source/layout-data.d.ts +0 -31
  533. package/lib/shared-data-source/meeting-time.d.ts +0 -90
  534. package/lib/shared-data-source/meeting-time.js +0 -416
  535. package/lib/shared-data-source/member-data.d.ts +0 -139
  536. package/lib/shared-data-source/member-data.js +0 -517
  537. package/lib/shared-data-source/pin-data.d.ts +0 -13
  538. package/lib/shared-data-source/pin-data.js +0 -111
  539. package/lib/shared-data-source/screen-share-data.d.ts +0 -364
  540. package/lib/shared-data-source/screen-share-data.js +0 -520
  541. package/lib/shared-data-source/security-data.d.ts +0 -39
  542. package/lib/shared-data-source/setting.d.ts +0 -67
  543. package/lib/shared-data-source/setting.js +0 -220
  544. package/lib/shared-data-source/speaker-spotlight.d.ts +0 -5
  545. package/lib/shared-data-source/speaker-spotlight.js +0 -15
  546. package/lib/shared-data-source/video-window.d.ts +0 -165
  547. package/lib/shared-data-source/video-window.js +0 -1266
  548. package/lib/shared-data-source/waiting-room.d.ts +0 -46
  549. package/lib/shared-data-source/waiting-room.js +0 -222
  550. package/lib/shared-data-source/whiteboard-data.d.ts +0 -68
  551. package/lib/shared-data-source/whiteboard-data.js +0 -347
  552. package/lib/utilities/board-context.d.ts +0 -4
  553. package/lib/utilities/board-context.js +0 -12
  554. package/lib/utilities/copyText.d.ts +0 -2
  555. package/lib/utilities/copyText.js +0 -48
  556. package/lib/utilities/renderer-event.d.ts +0 -10
  557. package/lib/utilities/renderer-event.js +0 -95
  558. package/lib/utilities/screen-capture-permission.d.ts +0 -2
  559. package/lib/utilities/screen-capture-permission.js +0 -24
  560. package/lib/utilities/screen.d.ts +0 -3
  561. package/lib/utilities/screen.js +0 -53
  562. package/lib/utilities/video-track-render-context.d.ts +0 -6
  563. package/lib/utilities/video-track-render-context.js +0 -9
  564. package/lib/waiting-room-control-manager.d.ts +0 -28
  565. package/lib/waiting-room-control-manager.js +0 -230
  566. package/lib/widget-sdk.d.ts +0 -2
  567. package/lib/widget-sdk.js +0 -13
  568. /package/lib/modules/{action-bar/types.js → subtitles-history/type.js} +0 -0
  569. /package/public/assets/electron/sound_effects/{pretest.mp3 → speakerTest.mp3} +0 -0
@@ -1,1266 +0,0 @@
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.iterator.js");
6
- require("core-js/modules/es.symbol.to-primitive.js");
7
- require("core-js/modules/es.error.cause.js");
8
- require("core-js/modules/es.error.to-string.js");
9
- require("core-js/modules/es.array.from.js");
10
- require("core-js/modules/es.array.is-array.js");
11
- require("core-js/modules/es.array.slice.js");
12
- require("core-js/modules/es.date.to-primitive.js");
13
- require("core-js/modules/es.date.to-string.js");
14
- require("core-js/modules/es.function.name.js");
15
- require("core-js/modules/es.number.constructor.js");
16
- require("core-js/modules/es.object.create.js");
17
- require("core-js/modules/es.object.define-property.js");
18
- require("core-js/modules/es.object.get-own-property-descriptor.js");
19
- require("core-js/modules/es.regexp.exec.js");
20
- require("core-js/modules/es.regexp.test.js");
21
- require("core-js/modules/es.regexp.to-string.js");
22
- require("core-js/modules/esnext.function.metadata.js");
23
- require("core-js/modules/esnext.symbol.metadata.js");
24
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
25
- var _typeof = require("@babel/runtime/helpers/typeof");
26
- Object.defineProperty(exports, "__esModule", {
27
- value: true
28
- });
29
- exports.FcrUIVideoWindowDataSourceImpl = exports.FcrUIVideoWindowDataImpl = exports.FcrUISpeakerSpotlightPool = void 0;
30
- require("core-js/modules/es.array.filter.js");
31
- require("core-js/modules/es.array.find.js");
32
- require("core-js/modules/es.array.find-index.js");
33
- require("core-js/modules/es.array.find-last-index.js");
34
- require("core-js/modules/es.array.for-each.js");
35
- require("core-js/modules/es.array.iterator.js");
36
- require("core-js/modules/es.array.push.js");
37
- require("core-js/modules/es.array.some.js");
38
- require("core-js/modules/es.array.sort.js");
39
- require("core-js/modules/es.array.splice.js");
40
- require("core-js/modules/es.array.unshift.js");
41
- require("core-js/modules/es.date.now.js");
42
- require("core-js/modules/es.function.bind.js");
43
- require("core-js/modules/es.map.js");
44
- require("core-js/modules/es.object.assign.js");
45
- require("core-js/modules/es.object.to-string.js");
46
- require("core-js/modules/es.string.iterator.js");
47
- require("core-js/modules/es.weak-map.js");
48
- require("core-js/modules/esnext.iterator.constructor.js");
49
- require("core-js/modules/esnext.iterator.filter.js");
50
- require("core-js/modules/esnext.iterator.find.js");
51
- require("core-js/modules/esnext.iterator.for-each.js");
52
- require("core-js/modules/esnext.iterator.some.js");
53
- require("core-js/modules/esnext.map.delete-all.js");
54
- require("core-js/modules/esnext.map.emplace.js");
55
- require("core-js/modules/esnext.map.every.js");
56
- require("core-js/modules/esnext.map.filter.js");
57
- require("core-js/modules/esnext.map.find.js");
58
- require("core-js/modules/esnext.map.find-key.js");
59
- require("core-js/modules/esnext.map.includes.js");
60
- require("core-js/modules/esnext.map.key-of.js");
61
- require("core-js/modules/esnext.map.map-keys.js");
62
- require("core-js/modules/esnext.map.map-values.js");
63
- require("core-js/modules/esnext.map.merge.js");
64
- require("core-js/modules/esnext.map.reduce.js");
65
- require("core-js/modules/esnext.map.some.js");
66
- require("core-js/modules/esnext.map.update.js");
67
- require("core-js/modules/esnext.weak-map.delete-all.js");
68
- require("core-js/modules/esnext.weak-map.emplace.js");
69
- require("core-js/modules/web.dom-collections.for-each.js");
70
- require("core-js/modules/web.dom-collections.iterator.js");
71
- require("core-js/modules/web.timers.js");
72
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
73
- var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
74
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
75
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
76
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
77
- var _observable = require("agora-foundation/lib/utilities/observable");
78
- var _type = require("./../type");
79
- var _mobx = require("mobx");
80
- var _type2 = require("fcr-core/lib/type");
81
- var _fcrCore = require("fcr-core");
82
- var _base = require("../base");
83
- var _FcrUIVideoWindowDataImpl, _FcrUIVideoWindowDataSourceImpl;
84
- var _initProto, _init__boardUserInfo, _init__videoStream, _init__audioStream, _init__spotlightEnabled, _init__isSpeakerSpotlight, _init__boardCanEdit, _init__isFirstCameraOpen, _init_isPin, _init_hasScreenSharing, _init_hasBoardSharing, _init_hasLoopbackSharing, _setVideoStreamDecs, _setVideoStreamOwnerInfoDecs, _setAudioStreamDecs, _setAudioStreamOwnerInfoDecs, _setPinDecs, _setSpotlightEnabledDecs, _setHasBoardSharingDecs, _setBoardUserInfoDecs, _setSpeakerSpotlightDecs, _setHasScreenSharingDecs, _setHasLoopbackSharingDecs, _setBoardCanEditDecs, _getVideoStreamDecs, _ref, _initProto2, _init_spotlightEnabled, _init_layoutType, _init_manualLayout, _init_pinLimitedCount, _init_mainListLimitedCount, _init_foldListLimitedCount, _init_mainList, _init_foldList, _init_spotlightStreamId, _setSpotlightEnabledDecs2, _setLayoutDecs, _onSpotlightRemovedDecs, _resetListDecs, _addBoardDecs, _updateBoardDecs, _removeBoardDecs, _mergePstnStreamOrInsertNewDataDecs, _addDecs, _updateDecs, _deleteDecs, _addPinDecs, _updateSpeakerSpotlightPositionDecs, _removePinDecs, _setSpeakerSpotlightDecs2, _toggleMainStreamDecs, _insertBeginningByPriorityDecs, _insertEndByPriorityDecs, _findInsertBeginningIndexDecs, _findInsertEndIndexDecs, _insertBoardDecs, _insertNewDataDecs, _ref5;
85
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
86
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
87
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
88
- function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
89
- function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
90
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
91
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
92
- 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"); }
93
- 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)]; } }; }
94
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
95
- 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); }
96
- 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; }
97
- 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; }
98
- var _A = /*#__PURE__*/new WeakMap();
99
- var _B = /*#__PURE__*/new WeakMap();
100
- var _C = /*#__PURE__*/new WeakMap();
101
- var _D = /*#__PURE__*/new WeakMap();
102
- var _E = /*#__PURE__*/new WeakMap();
103
- var _F = /*#__PURE__*/new WeakMap();
104
- var _G = /*#__PURE__*/new WeakMap();
105
- var _H = /*#__PURE__*/new WeakMap();
106
- var _I = /*#__PURE__*/new WeakMap();
107
- var _J = /*#__PURE__*/new WeakMap();
108
- var _K = /*#__PURE__*/new WeakMap();
109
- _ref = (_setVideoStreamDecs = [_mobx.action, _mobx.action.bound], _setVideoStreamOwnerInfoDecs = [_mobx.action, _mobx.action.bound], _setAudioStreamDecs = [_mobx.action, _mobx.action.bound], _setAudioStreamOwnerInfoDecs = [_mobx.action, _mobx.action.bound], _setPinDecs = [_mobx.action, _mobx.action.bound], _setSpotlightEnabledDecs = [_mobx.action, _mobx.action.bound], _setHasBoardSharingDecs = [_mobx.action, _mobx.action.bound], _setBoardUserInfoDecs = [_mobx.action, _mobx.action.bound], _setSpeakerSpotlightDecs = [_mobx.action, _mobx.action.bound], _setHasScreenSharingDecs = [_mobx.action, _mobx.action.bound], _setHasLoopbackSharingDecs = [_mobx.action, _mobx.action.bound], _setBoardCanEditDecs = [_mobx.action, _mobx.action.bound], _getVideoStreamDecs = [_mobx.action, _mobx.action.bound], "_boardUserInfo");
110
- var FcrUIVideoWindowDataImpl = exports.FcrUIVideoWindowDataImpl = /*#__PURE__*/function () {
111
- function FcrUIVideoWindowDataImpl(type, _ref2, _placement, _isMySelf) {
112
- var videoStream = _ref2.videoStream,
113
- audioStream = _ref2.audioStream,
114
- boardUserInfo = _ref2.boardUserInfo;
115
- var layoutType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _type.FcrUIVideoWindowLayoutType.Gallery;
116
- var spotlightEnabled = arguments.length > 5 ? arguments[5] : undefined;
117
- var canEdit = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
118
- (0, _classCallCheck2["default"])(this, FcrUIVideoWindowDataImpl);
119
- _classPrivateFieldInitSpec(this, _A, (_initProto(this), _init__boardUserInfo(this)));
120
- (0, _defineProperty2["default"])(this, "_layoutType", _type.FcrUIVideoWindowLayoutType.Gallery);
121
- _classPrivateFieldInitSpec(this, _B, _init__videoStream(this));
122
- _classPrivateFieldInitSpec(this, _C, _init__audioStream(this));
123
- _classPrivateFieldInitSpec(this, _D, _init__spotlightEnabled(this, true));
124
- _classPrivateFieldInitSpec(this, _E, _init__isSpeakerSpotlight(this, false));
125
- _classPrivateFieldInitSpec(this, _F, _init__boardCanEdit(this, false));
126
- _classPrivateFieldInitSpec(this, _G, _init__isFirstCameraOpen(this, false));
127
- (0, _defineProperty2["default"])(this, "needToSort", false);
128
- _classPrivateFieldInitSpec(this, _H, _init_isPin(this, false));
129
- _classPrivateFieldInitSpec(this, _I, _init_hasScreenSharing(this, false));
130
- _classPrivateFieldInitSpec(this, _J, _init_hasBoardSharing(this, false));
131
- _classPrivateFieldInitSpec(this, _K, _init_hasLoopbackSharing(this, false));
132
- this._placement = _placement;
133
- this._isMySelf = _isMySelf;
134
- this.type = type;
135
- this.setVideoStream(videoStream);
136
- this.setAudioStream(audioStream);
137
- this.setLayoutType(layoutType);
138
- this.setSpotlightEnabled(spotlightEnabled);
139
- this._boardUserInfo = boardUserInfo;
140
- this._boardCanEdit = canEdit;
141
- }
142
- return (0, _createClass2["default"])(FcrUIVideoWindowDataImpl, [{
143
- key: _ref,
144
- get: function get() {
145
- return _classPrivateFieldGet(_A, this);
146
- }
147
- }, {
148
- key: "_boardUserInfo",
149
- set: function set(v) {
150
- _classPrivateFieldSet(_A, this, v);
151
- }
152
- }, {
153
- key: "_videoStream",
154
- get: function get() {
155
- return _classPrivateFieldGet(_B, this);
156
- },
157
- set: function set(v) {
158
- _classPrivateFieldSet(_B, this, v);
159
- }
160
- }, {
161
- key: "_audioStream",
162
- get: function get() {
163
- return _classPrivateFieldGet(_C, this);
164
- },
165
- set: function set(v) {
166
- _classPrivateFieldSet(_C, this, v);
167
- }
168
- }, {
169
- key: "_spotlightEnabled",
170
- get: function get() {
171
- return _classPrivateFieldGet(_D, this);
172
- },
173
- set: function set(v) {
174
- _classPrivateFieldSet(_D, this, v);
175
- }
176
- }, {
177
- key: "_isSpeakerSpotlight",
178
- get: function get() {
179
- return _classPrivateFieldGet(_E, this);
180
- },
181
- set: function set(v) {
182
- _classPrivateFieldSet(_E, this, v);
183
- }
184
- }, {
185
- key: "_boardCanEdit",
186
- get: function get() {
187
- return _classPrivateFieldGet(_F, this);
188
- },
189
- set: function set(v) {
190
- _classPrivateFieldSet(_F, this, v);
191
- }
192
- }, {
193
- key: "_isFirstCameraOpen",
194
- get: function get() {
195
- return _classPrivateFieldGet(_G, this);
196
- },
197
- set: function set(v) {
198
- _classPrivateFieldSet(_G, this, v);
199
- }
200
- }, {
201
- key: "isPin",
202
- get: function get() {
203
- return _classPrivateFieldGet(_H, this);
204
- },
205
- set: function set(v) {
206
- _classPrivateFieldSet(_H, this, v);
207
- }
208
- }, {
209
- key: "hasScreenSharing",
210
- get: function get() {
211
- return _classPrivateFieldGet(_I, this);
212
- },
213
- set: function set(v) {
214
- _classPrivateFieldSet(_I, this, v);
215
- }
216
- }, {
217
- key: "hasBoardSharing",
218
- get: function get() {
219
- return _classPrivateFieldGet(_J, this);
220
- },
221
- set: function set(v) {
222
- _classPrivateFieldSet(_J, this, v);
223
- }
224
- }, {
225
- key: "hasLoopbackSharing",
226
- get: function get() {
227
- return _classPrivateFieldGet(_K, this);
228
- },
229
- set: function set(v) {
230
- _classPrivateFieldSet(_K, this, v);
231
- }
232
- }, {
233
- key: "isSpeakerSpotlight",
234
- get: function get() {
235
- return this._isSpeakerSpotlight && this._spotlightEnabled;
236
- }
237
- }, {
238
- key: "windowId",
239
- get: function get() {
240
- return this.type === _type.FcrUIWindowType.BOARD ? 'boardId' : this.videoStreamId || this.audioStreamId || '';
241
- }
242
- }, {
243
- key: "videoStreamId",
244
- get: function get() {
245
- var _this$_videoStream;
246
- return (_this$_videoStream = this._videoStream) === null || _this$_videoStream === void 0 ? void 0 : _this$_videoStream.streamId;
247
- }
248
- }, {
249
- key: "audioStreamId",
250
- get: function get() {
251
- var _this$_audioStream;
252
- return (_this$_audioStream = this._audioStream) === null || _this$_audioStream === void 0 ? void 0 : _this$_audioStream.streamId;
253
- }
254
- }, {
255
- key: "audioStreamConnectorType",
256
- get: function get() {
257
- var _this$_audioStream2;
258
- return ((_this$_audioStream2 = this._audioStream) === null || _this$_audioStream2 === void 0 ? void 0 : _this$_audioStream2.connectorType) || _fcrCore.FcrRoomConnectorType.NONE;
259
- }
260
- }, {
261
- key: "videoStreamConnectorType",
262
- get: function get() {
263
- var _this$_videoStream2;
264
- return ((_this$_videoStream2 = this._videoStream) === null || _this$_videoStream2 === void 0 ? void 0 : _this$_videoStream2.connectorType) || _fcrCore.FcrRoomConnectorType.NONE;
265
- }
266
-
267
- // @computed
268
- // get hasMicrophoneAudioStream() {
269
- // if (this.audioStreamConnectorType === FcrRoomConnectorType.NONE) {
270
- // return (
271
- // this._videoStream?.audioSourceState === FcrMediaSourceState.OPEN &&
272
- // (this._videoStream.streamType === FcrStreamType.BOTH ||
273
- // this._videoStream.streamType === FcrStreamType.AUDIO)
274
- // );
275
- // } else {
276
- // return true;
277
- // }
278
- // }
279
- }, {
280
- key: "hasMicrophoneAudioStream",
281
- get: function get() {
282
- if (this.audioStreamConnectorType === _fcrCore.FcrRoomConnectorType.NONE) {
283
- var _ref3 = this._videoStream || {},
284
- audioSourceState = _ref3.audioSourceState;
285
- return audioSourceState === _fcrCore.FcrMediaSourceState.OPEN;
286
- } else {
287
- return true;
288
- }
289
- }
290
- }, {
291
- key: "hasLoopbackAudioStream",
292
- get: function get() {
293
- var _this$_videoStream3;
294
- if (((_this$_videoStream3 = this._videoStream) === null || _this$_videoStream3 === void 0 ? void 0 : _this$_videoStream3.audioSourceType) === _fcrCore.FcrAudioSourceType.LOOPBACK
295
- // &&
296
- // this._videoStream?.audioSourceState === FcrMediaSourceState.OPEN
297
- ) {
298
- return true;
299
- }
300
- return false;
301
- }
302
- }, {
303
- key: "phoneMicEnabled",
304
- get: function get() {
305
- if (this.audioStreamConnectorType === _fcrCore.FcrRoomConnectorType.PSTN) {
306
- var _ref4 = this._audioStream || {},
307
- audioSourceState = _ref4.audioSourceState,
308
- streamType = _ref4.streamType;
309
- var isAudioStream = streamType === _fcrCore.FcrStreamType.AUDIO || streamType === _fcrCore.FcrStreamType.BOTH;
310
- return audioSourceState === _fcrCore.FcrMediaSourceState.OPEN && isAudioStream;
311
- } else {
312
- return false;
313
- }
314
- }
315
- }, {
316
- key: "hasVideoStream",
317
- get: function get() {
318
- var _this$_videoStream4, _this$_videoStream5, _this$_videoStream6;
319
- return ((_this$_videoStream4 = this._videoStream) === null || _this$_videoStream4 === void 0 ? void 0 : _this$_videoStream4.videoSourceState) === _fcrCore.FcrMediaSourceState.OPEN && (((_this$_videoStream5 = this._videoStream) === null || _this$_videoStream5 === void 0 ? void 0 : _this$_videoStream5.streamType) === _fcrCore.FcrStreamType.BOTH || ((_this$_videoStream6 = this._videoStream) === null || _this$_videoStream6 === void 0 ? void 0 : _this$_videoStream6.streamType) === _fcrCore.FcrStreamType.VIDEO);
320
- }
321
- }, {
322
- key: "hasBoard",
323
- get: function get() {
324
- return this.type === _type.FcrUIWindowType.BOARD;
325
- }
326
- }, {
327
- key: "userId",
328
- get: function get() {
329
- var _this$_videoStream7, _this$_audioStream3, _this$_boardUserInfo;
330
- return ((_this$_videoStream7 = this._videoStream) === null || _this$_videoStream7 === void 0 ? void 0 : _this$_videoStream7.owner.userId) || ((_this$_audioStream3 = this._audioStream) === null || _this$_audioStream3 === void 0 ? void 0 : _this$_audioStream3.owner.userId) || ((_this$_boardUserInfo = this._boardUserInfo) === null || _this$_boardUserInfo === void 0 ? void 0 : _this$_boardUserInfo.userId) || '';
331
- }
332
- }, {
333
- key: "userName",
334
- get: function get() {
335
- var _this$_videoStream8, _this$_audioStream4, _this$_boardUserInfo2;
336
- return ((_this$_videoStream8 = this._videoStream) === null || _this$_videoStream8 === void 0 ? void 0 : _this$_videoStream8.owner.userName) || ((_this$_audioStream4 = this._audioStream) === null || _this$_audioStream4 === void 0 ? void 0 : _this$_audioStream4.owner.userName) || ((_this$_boardUserInfo2 = this._boardUserInfo) === null || _this$_boardUserInfo2 === void 0 ? void 0 : _this$_boardUserInfo2.userName) || '';
337
- }
338
- }, {
339
- key: "ownerRoleType",
340
- get: function get() {
341
- var _this$_videoStream9, _this$_audioStream5, _this$_boardUserInfo3;
342
- return ((_this$_videoStream9 = this._videoStream) === null || _this$_videoStream9 === void 0 ? void 0 : _this$_videoStream9.owner.userRole) || ((_this$_audioStream5 = this._audioStream) === null || _this$_audioStream5 === void 0 ? void 0 : _this$_audioStream5.owner.userRole) || ((_this$_boardUserInfo3 = this._boardUserInfo) === null || _this$_boardUserInfo3 === void 0 ? void 0 : _this$_boardUserInfo3.userRole) || _type2.FcrUserRole.AUDIENCE;
343
- }
344
- }, {
345
- key: "videoSourceType",
346
- get: function get() {
347
- var _this$_videoStream0;
348
- return ((_this$_videoStream0 = this._videoStream) === null || _this$_videoStream0 === void 0 ? void 0 : _this$_videoStream0.videoSourceType) || _fcrCore.FcrVideoSourceType.CAMERA;
349
- }
350
- }, {
351
- key: "audioSourceType",
352
- get: function get() {
353
- var _this$_audioStream6;
354
- return ((_this$_audioStream6 = this._audioStream) === null || _this$_audioStream6 === void 0 ? void 0 : _this$_audioStream6.audioSourceType) || _fcrCore.FcrAudioSourceType.MICROPHONE;
355
- }
356
- }, {
357
- key: "isMySelf",
358
- get: function get() {
359
- return this._isMySelf;
360
- }
361
- }, {
362
- key: "avatar",
363
- get: function get() {
364
- var _this$_videoStream1;
365
- // 如果是pstn没有头像
366
- // 其他用户取videoStream的owner的avatar
367
- if (this.audioStreamConnectorType === _fcrCore.FcrRoomConnectorType.PSTN) {
368
- return '';
369
- }
370
- return ((_this$_videoStream1 = this._videoStream) === null || _this$_videoStream1 === void 0 ? void 0 : _this$_videoStream1.owner.avatar) || '';
371
- }
372
- }, {
373
- key: "sortingPriority",
374
- get: function get() {
375
- if (this._placement === 'main-list') {
376
- var _this$_videoStream10;
377
- if (this.type === _type.FcrUIWindowType.BOARD && this._boardCanEdit) {
378
- return _type.FcrUIVideoWindowMainSortingPriority.HIGHEST;
379
- }
380
- if (this.isPin || ((_this$_videoStream10 = this._videoStream) === null || _this$_videoStream10 === void 0 ? void 0 : _this$_videoStream10.videoSourceType) === _fcrCore.FcrVideoSourceType.SCREEN || this.type === _type.FcrUIWindowType.BOARD) {
381
- return _type.FcrUIVideoWindowMainSortingPriority.FOCUS;
382
- }
383
- if (this.isSpeakerSpotlight) {
384
- return _type.FcrUIVideoWindowMainSortingPriority.SPEAKER_SPOTLIGHT;
385
- }
386
- if (this.hasScreenSharing) {
387
- return _type.FcrUIVideoWindowMainSortingPriority.SCREEN_SHARING_OWNER;
388
- }
389
- if (this.ownerRoleType === _type2.FcrUserRole.HOST) {
390
- return _type.FcrUIVideoWindowMainSortingPriority.HOST;
391
- }
392
- if (this.isMySelf) {
393
- return _type.FcrUIVideoWindowMainSortingPriority.MYSELF;
394
- }
395
- if (this.ownerRoleType === _type2.FcrUserRole.COHOST) {
396
- return _type.FcrUIVideoWindowMainSortingPriority.CO_HOST;
397
- }
398
- // if (this.hasMicrophoneAudioStream && this.hasVideoStream) {
399
- // return FcrUIVideoWindowMainSortingPriority.BOTH_OPEN;
400
- // }
401
- var isFirstCameraOpen = this.hasVideoStream && !this._isFirstCameraOpen;
402
- if (isFirstCameraOpen) {
403
- return _type.FcrUIVideoWindowMainSortingPriority.CAMERA_OPEN;
404
- }
405
- // if (this.hasMicrophoneAudioStream) {
406
- // return FcrUIVideoWindowMainSortingPriority.MICROPHONE_OPEN;
407
- // }
408
- } else {
409
- var _this$_videoStream11;
410
- if (this.isSpeakerSpotlight) {
411
- return _type.FcrUIVideoWindowFoldSortingPriority.FOCUS;
412
- }
413
- if (this.isPin) {
414
- return _type.FcrUIVideoWindowFoldSortingPriority.PIN;
415
- }
416
- if (((_this$_videoStream11 = this._videoStream) === null || _this$_videoStream11 === void 0 ? void 0 : _this$_videoStream11.videoSourceType) === _fcrCore.FcrVideoSourceType.SCREEN) {
417
- return _type.FcrUIVideoWindowFoldSortingPriority.SCREEN_SHARING_STREAM;
418
- }
419
- if (this.hasScreenSharing) {
420
- return _type.FcrUIVideoWindowFoldSortingPriority.SCREEN_SHARING_OWNER;
421
- }
422
- if (this.ownerRoleType === _type2.FcrUserRole.HOST) {
423
- return _type.FcrUIVideoWindowFoldSortingPriority.HOST;
424
- }
425
- if (this.isMySelf) {
426
- return _type.FcrUIVideoWindowFoldSortingPriority.MYSELF;
427
- }
428
- if (this.ownerRoleType === _type2.FcrUserRole.COHOST) {
429
- return _type.FcrUIVideoWindowFoldSortingPriority.CO_HOST;
430
- }
431
- // if (this.hasMicrophoneAudioStream && this.hasVideoStream) {
432
- // return FcrUIVideoWindowFoldSortingPriority.BOTH_OPEN;
433
- // }
434
- if (this.hasVideoStream) {
435
- return _type.FcrUIVideoWindowFoldSortingPriority.CAMERA_OPEN;
436
- }
437
- // if (this.hasMicrophoneAudioStream) {
438
- // return FcrUIVideoWindowFoldSortingPriority.MICROPHONE_OPEN;
439
- // }
440
- }
441
- return _type.FcrUIVideoWindowMainSortingPriority.NONE;
442
- }
443
- }, {
444
- key: "setLayoutType",
445
- value: function setLayoutType(layoutType) {
446
- this._layoutType = layoutType;
447
- }
448
- }, {
449
- key: "setIsFirstCameraOpen",
450
- value: function setIsFirstCameraOpen(isFirstCameraOpen) {
451
- this._isFirstCameraOpen = isFirstCameraOpen;
452
- }
453
- }, {
454
- key: "setVideoStream",
455
- value: function setVideoStream(videoStream) {
456
- this._videoStream = videoStream;
457
- }
458
- }, {
459
- key: "setVideoStreamOwnerInfo",
460
- value: function setVideoStreamOwnerInfo(userInfo) {
461
- if (this._videoStream) {
462
- this._videoStream.owner = userInfo;
463
- }
464
- }
465
- }, {
466
- key: "setAudioStream",
467
- value: function setAudioStream(audioStream) {
468
- this._audioStream = audioStream;
469
- }
470
- }, {
471
- key: "setAudioStreamOwnerInfo",
472
- value: function setAudioStreamOwnerInfo(userInfo) {
473
- if (this._audioStream) {
474
- this._audioStream.owner = userInfo;
475
- }
476
- }
477
- }, {
478
- key: "setPin",
479
- value: function setPin(pin) {
480
- this.isPin = pin;
481
- }
482
- }, {
483
- key: "setSpotlightEnabled",
484
- value: function setSpotlightEnabled(enabled) {
485
- this._spotlightEnabled = enabled;
486
- }
487
- }, {
488
- key: "setHasBoardSharing",
489
- value: function setHasBoardSharing(isSharing) {
490
- this.hasBoardSharing = isSharing;
491
- }
492
- }, {
493
- key: "setBoardUserInfo",
494
- value: function setBoardUserInfo(userInfo) {
495
- if (this.type === _type.FcrUIWindowType.BOARD) {
496
- this._boardUserInfo = userInfo;
497
- }
498
- }
499
- }, {
500
- key: "setSpeakerSpotlight",
501
- value: function setSpeakerSpotlight(speakerSpotlight) {
502
- this._isSpeakerSpotlight = speakerSpotlight;
503
- }
504
- }, {
505
- key: "setHasScreenSharing",
506
- value: function setHasScreenSharing(screenSharing) {
507
- this.hasScreenSharing = screenSharing;
508
- }
509
- }, {
510
- key: "setHasLoopbackSharing",
511
- value: function setHasLoopbackSharing(hasLoopbackSharing) {
512
- this.hasLoopbackSharing = hasLoopbackSharing;
513
- }
514
- }, {
515
- key: "setBoardCanEdit",
516
- value: function setBoardCanEdit(canEdit) {
517
- this._boardCanEdit = canEdit;
518
- }
519
- }, {
520
- key: "getVideoStream",
521
- value: function getVideoStream() {
522
- return this._videoStream;
523
- }
524
- }]);
525
- }();
526
- _FcrUIVideoWindowDataImpl = FcrUIVideoWindowDataImpl;
527
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIVideoWindowDataImpl, [[_mobx.observable, 1, "_boardUserInfo"], [_mobx.observable, 1, "_videoStream"], [_mobx.observable, 1, "_audioStream"], [_mobx.observable, 1, "_spotlightEnabled"], [_mobx.observable, 1, "_isSpeakerSpotlight"], [_mobx.observable, 1, "_boardCanEdit"], [_mobx.observable, 1, "_isFirstCameraOpen"], [_mobx.observable, 1, "isPin"], [_mobx.observable, 1, "hasScreenSharing"], [_mobx.observable, 1, "hasBoardSharing"], [_mobx.observable, 1, "hasLoopbackSharing"], [_mobx.computed, 3, "isSpeakerSpotlight"], [_mobx.computed, 3, "windowId"], [_mobx.computed, 3, "videoStreamId"], [_mobx.computed, 3, "audioStreamId"], [_mobx.computed, 3, "audioStreamConnectorType"], [_mobx.computed, 3, "videoStreamConnectorType"], [_mobx.computed, 3, "hasMicrophoneAudioStream"], [_mobx.computed, 3, "hasLoopbackAudioStream"], [_mobx.computed, 3, "phoneMicEnabled"], [_mobx.computed, 3, "hasVideoStream"], [_mobx.computed, 3, "hasBoard"], [_mobx.computed, 3, "userId"], [_mobx.computed, 3, "ownerRoleType"], [_mobx.computed, 3, "videoSourceType"], [_mobx.computed, 3, "audioSourceType"], [_mobx.computed, 3, "avatar"], [_mobx.computed, 3, "sortingPriority"], [_setVideoStreamDecs, 18, "setVideoStream"], [_setVideoStreamOwnerInfoDecs, 18, "setVideoStreamOwnerInfo"], [_setAudioStreamDecs, 18, "setAudioStream"], [_setAudioStreamOwnerInfoDecs, 18, "setAudioStreamOwnerInfo"], [_setPinDecs, 18, "setPin"], [_setSpotlightEnabledDecs, 18, "setSpotlightEnabled"], [_setHasBoardSharingDecs, 18, "setHasBoardSharing"], [_setBoardUserInfoDecs, 18, "setBoardUserInfo"], [_setSpeakerSpotlightDecs, 18, "setSpeakerSpotlight"], [_setHasScreenSharingDecs, 18, "setHasScreenSharing"], [_setHasLoopbackSharingDecs, 18, "setHasLoopbackSharing"], [_setBoardCanEditDecs, 18, "setBoardCanEdit"], [_getVideoStreamDecs, 18, "getVideoStream"]], []).e, 12);
528
- _init__boardUserInfo = _applyDecs$e[0];
529
- _init__videoStream = _applyDecs$e[1];
530
- _init__audioStream = _applyDecs$e[2];
531
- _init__spotlightEnabled = _applyDecs$e[3];
532
- _init__isSpeakerSpotlight = _applyDecs$e[4];
533
- _init__boardCanEdit = _applyDecs$e[5];
534
- _init__isFirstCameraOpen = _applyDecs$e[6];
535
- _init_isPin = _applyDecs$e[7];
536
- _init_hasScreenSharing = _applyDecs$e[8];
537
- _init_hasBoardSharing = _applyDecs$e[9];
538
- _init_hasLoopbackSharing = _applyDecs$e[10];
539
- _initProto = _applyDecs$e[11];
540
- var _A2 = /*#__PURE__*/new WeakMap();
541
- var _B2 = /*#__PURE__*/new WeakMap();
542
- var _C2 = /*#__PURE__*/new WeakMap();
543
- var _D2 = /*#__PURE__*/new WeakMap();
544
- var _E2 = /*#__PURE__*/new WeakMap();
545
- var _F2 = /*#__PURE__*/new WeakMap();
546
- var _G2 = /*#__PURE__*/new WeakMap();
547
- var _H2 = /*#__PURE__*/new WeakMap();
548
- var _I2 = /*#__PURE__*/new WeakMap();
549
- _ref5 = (_setSpotlightEnabledDecs2 = [_mobx.action, _mobx.action.bound], _setLayoutDecs = [_mobx.action, _mobx.action.bound], _onSpotlightRemovedDecs = [_mobx.action, _mobx.action.bound], _resetListDecs = [_mobx.action, _mobx.action.bound], _addBoardDecs = [_mobx.action, _mobx.action.bound], _updateBoardDecs = [_mobx.action, _mobx.action.bound], _removeBoardDecs = [_mobx.action, _mobx.action.bound], _mergePstnStreamOrInsertNewDataDecs = [_mobx.action, _mobx.action.bound], _addDecs = [_mobx.action, _mobx.action.bound], _updateDecs = [_mobx.action, _mobx.action.bound], _deleteDecs = [_mobx.action, _mobx.action.bound], _addPinDecs = [_mobx.action, _mobx.action.bound], _updateSpeakerSpotlightPositionDecs = [_mobx.action, _mobx.action.bound], _removePinDecs = [_mobx.action, _mobx.action.bound], _setSpeakerSpotlightDecs2 = [_mobx.action, _mobx.action.bound], _toggleMainStreamDecs = [_mobx.action, _mobx.action.bound], _insertBeginningByPriorityDecs = [_mobx.action, _mobx.action.bound], _insertEndByPriorityDecs = [_mobx.action, _mobx.action.bound], _findInsertBeginningIndexDecs = [_mobx.action, _mobx.action.bound], _findInsertEndIndexDecs = [_mobx.action, _mobx.action.bound], _insertBoardDecs = [_mobx.action, _mobx.action.bound], _insertNewDataDecs = [_mobx.action, _mobx.action.bound], "_observer");
550
- var FcrUIVideoWindowDataSourceImpl = exports.FcrUIVideoWindowDataSourceImpl = /*#__PURE__*/function () {
551
- function FcrUIVideoWindowDataSourceImpl(_sharedSettingDataSource) {
552
- (0, _classCallCheck2["default"])(this, FcrUIVideoWindowDataSourceImpl);
553
- (0, _defineProperty2["default"])(this, _ref5, (_initProto2(this), new _observable.AgoraObservable()));
554
- (0, _defineProperty2["default"])(this, "_spotlightPool", new FcrUISpeakerSpotlightPool());
555
- _classPrivateFieldInitSpec(this, _A2, _init_spotlightEnabled(this, true));
556
- _classPrivateFieldInitSpec(this, _B2, _init_layoutType(this, _type.FcrUIVideoWindowLayoutType.Gallery));
557
- _classPrivateFieldInitSpec(this, _C2, _init_manualLayout(this, undefined));
558
- _classPrivateFieldInitSpec(this, _D2, _init_pinLimitedCount(this, 1));
559
- _classPrivateFieldInitSpec(this, _E2, _init_mainListLimitedCount(this, 255));
560
- _classPrivateFieldInitSpec(this, _F2, _init_foldListLimitedCount(this, 255));
561
- _classPrivateFieldInitSpec(this, _G2, _init_mainList(this, []));
562
- _classPrivateFieldInitSpec(this, _H2, _init_foldList(this, []));
563
- _classPrivateFieldInitSpec(this, _I2, _init_spotlightStreamId(this, ''));
564
- this._sharedSettingDataSource = _sharedSettingDataSource;
565
- this.spotlightEnabled = _sharedSettingDataSource.setting.spotlightEnabled;
566
- this._spotlightPool.addObserver({
567
- onRemoved: this.onSpotlightRemoved
568
- });
569
- }
570
- return (0, _createClass2["default"])(FcrUIVideoWindowDataSourceImpl, [{
571
- key: "spotlightEnabled",
572
- get: function get() {
573
- return _classPrivateFieldGet(_A2, this);
574
- },
575
- set: function set(v) {
576
- _classPrivateFieldSet(_A2, this, v);
577
- }
578
- }, {
579
- key: "layoutType",
580
- get: function get() {
581
- return _classPrivateFieldGet(_B2, this);
582
- },
583
- set: function set(v) {
584
- _classPrivateFieldSet(_B2, this, v);
585
- }
586
- }, {
587
- key: "manualLayout",
588
- get: function get() {
589
- return _classPrivateFieldGet(_C2, this);
590
- },
591
- set: function set(v) {
592
- _classPrivateFieldSet(_C2, this, v);
593
- }
594
- }, {
595
- key: "pinLimitedCount",
596
- get: function get() {
597
- return _classPrivateFieldGet(_D2, this);
598
- },
599
- set: function set(v) {
600
- _classPrivateFieldSet(_D2, this, v);
601
- }
602
- }, {
603
- key: "mainListLimitedCount",
604
- get: function get() {
605
- return _classPrivateFieldGet(_E2, this);
606
- },
607
- set: function set(v) {
608
- _classPrivateFieldSet(_E2, this, v);
609
- }
610
- }, {
611
- key: "foldListLimitedCount",
612
- get: function get() {
613
- return _classPrivateFieldGet(_F2, this);
614
- },
615
- set: function set(v) {
616
- _classPrivateFieldSet(_F2, this, v);
617
- }
618
- }, {
619
- key: "mainList",
620
- get: function get() {
621
- return _classPrivateFieldGet(_G2, this);
622
- },
623
- set: function set(v) {
624
- _classPrivateFieldSet(_G2, this, v);
625
- }
626
- }, {
627
- key: "foldList",
628
- get: function get() {
629
- return _classPrivateFieldGet(_H2, this);
630
- },
631
- set: function set(v) {
632
- _classPrivateFieldSet(_H2, this, v);
633
- }
634
- }, {
635
- key: "spotlightStreamId",
636
- get: function get() {
637
- return _classPrivateFieldGet(_I2, this);
638
- },
639
- set: function set(v) {
640
- _classPrivateFieldSet(_I2, this, v);
641
- }
642
- }, {
643
- key: "shouldHideNonVideoParticipants",
644
- get: function get() {
645
- return this._sharedSettingDataSource.setting.shouldHideNonVideoParticipants || false;
646
- }
647
- }, {
648
- key: "setSpotlightEnabled",
649
- value: function setSpotlightEnabled(enabled) {
650
- var _this = this;
651
- var currentSpeakerSpotlightIndex_mainList = this._findCurrentSpeakerSpotlight(this.mainList);
652
- var currentSpeakerSpotlightIndex_foldList = this._findCurrentSpeakerSpotlight(this.foldList);
653
- this.spotlightEnabled = enabled;
654
- this.mainList.forEach(function (item) {
655
- item.setSpotlightEnabled(enabled);
656
- });
657
- this.foldList.forEach(function (item) {
658
- item.setSpotlightEnabled(enabled);
659
- });
660
- this._spotlightPool.streams.forEach(function (_ts, streamId) {
661
- _this.setSpeakerSpotlight(streamId);
662
- });
663
- // update speaker spotlight position
664
- this._updateSpeakerSpotlightPosition(currentSpeakerSpotlightIndex_mainList, this.mainList, this.mainListLimitedCount, 'main-list');
665
- this._updateSpeakerSpotlightPosition(currentSpeakerSpotlightIndex_foldList, this.foldList, this.foldListLimitedCount, 'fold-list');
666
- }
667
- }, {
668
- key: "setLayout",
669
- value: function setLayout(layout, manual) {
670
- var _this2 = this;
671
- if (manual) {
672
- this.manualLayout = layout;
673
- }
674
- var windowList = this.mainList.filter(function (item) {
675
- if (_this2.shouldHideNonVideoParticipants) {
676
- return item.hasVideoStream;
677
- }
678
- return true;
679
- });
680
- // 有白板共享时,即使隐藏了未开启视频的参数者,数量总是大于等于2,不应提前return,setLayout失效
681
- var boardInShow = this.mainList.some(function (item) {
682
- return item.hasBoard;
683
- });
684
- if (this.layoutType === _type.FcrUIVideoWindowLayoutType.Gallery && layout === _type.FcrUIVideoWindowLayoutType.Speaker && windowList.length < 2 && !boardInShow || this.layoutType === layout) {
685
- return;
686
- }
687
- this.layoutType = layout;
688
- this._observer.notifyObservers('onLayoutUpdated', layout);
689
- this.mainList.forEach(function (item) {
690
- item.setLayoutType(layout);
691
- });
692
- this.foldList.forEach(function (item) {
693
- item.setLayoutType(layout);
694
- });
695
- // if (layout === FcrUIVideoWindowLayoutType.Gallery) {
696
- // this.resetList();
697
- // }
698
- }
699
- }, {
700
- key: "onSpotlightRemoved",
701
- value: function onSpotlightRemoved(streamId) {
702
- var _this3 = this;
703
- var removeSpotlight = function removeSpotlight(streamId, list) {
704
- var index = _this3._findItemIndexWithWindowId(streamId, list);
705
- if (index !== -1) {
706
- var item = list[index];
707
- if (item) {
708
- item.setSpeakerSpotlight(false);
709
- if (_this3.layoutType === _type.FcrUIVideoWindowLayoutType.Speaker) {
710
- item.needToSort = true;
711
- }
712
- }
713
- }
714
- };
715
- removeSpotlight(streamId, this.mainList);
716
- removeSpotlight(streamId, this.foldList);
717
- this.spotlightStreamId = '';
718
- this._observer.notifyObservers('onSpotlightRemoved', streamId);
719
- }
720
- }, {
721
- key: "resetList",
722
- value: function resetList() {
723
- this.mainList = this.mainList.sort(function (a, b) {
724
- return b.sortingPriority - a.sortingPriority;
725
- });
726
- this.foldList = this.foldList.sort(function (a, b) {
727
- return b.sortingPriority - a.sortingPriority;
728
- });
729
- this._observer.notifyObservers('onMainListUpdated', -1);
730
- this._observer.notifyObservers('onFoldListUpdated', -1);
731
- }
732
- }, {
733
- key: "addBoard",
734
- value: function addBoard(userInfo, isMySelf, canEdit) {
735
- this._insertBoard(userInfo, this.mainList, this.mainListLimitedCount, isMySelf, 'main-list', canEdit);
736
- this._syncHasScreenSharing(true, true, userInfo.userId, this.mainList, this.mainListLimitedCount, 'main-list');
737
- this._syncHasScreenSharing(true, true, userInfo.userId, this.foldList, this.foldListLimitedCount, 'fold-list');
738
- }
739
- }, {
740
- key: "updateBoard",
741
- value: function updateBoard(canEdit) {
742
- var windowData = this.mainList.find(function (item) {
743
- return item.type === _type.FcrUIWindowType.BOARD;
744
- });
745
- windowData === null || windowData === void 0 || windowData.setBoardCanEdit(canEdit);
746
- var insertIndex = this._insertByPriority(windowData, this.mainList, this.mainListLimitedCount);
747
- this._observer.notifyObservers('onMainListUpdated', insertIndex);
748
- }
749
- }, {
750
- key: "removeBoard",
751
- value: function removeBoard() {
752
- var boardIndex = this.mainList.findIndex(function (i) {
753
- return i.type === _type.FcrUIWindowType.BOARD;
754
- });
755
- if (boardIndex !== -1) {
756
- var board = this.mainList[boardIndex];
757
- this.mainList.splice(boardIndex, 1);
758
- this._syncHasScreenSharing(false, false, board.userId, this.mainList, this.mainListLimitedCount, 'main-list');
759
- this._syncHasScreenSharing(false, false, board.userId, this.foldList, this.foldListLimitedCount, 'fold-list');
760
- }
761
- }
762
- }, {
763
- key: "_mergePstnStreamOrInsertNewData",
764
- value: function _mergePstnStreamOrInsertNewData(stream, list, limitCount, isMySelf, placement) {
765
- var existedUserPstnStream = list.find(function (item) {
766
- return item.userId === stream.owner.userId && item.audioStreamConnectorType === _fcrCore.FcrRoomConnectorType.PSTN;
767
- });
768
- if (existedUserPstnStream) {
769
- existedUserPstnStream.setVideoStream(stream);
770
- } else {
771
- this._insertNewData(stream, list, limitCount, isMySelf, placement);
772
- }
773
- }
774
- }, {
775
- key: "add",
776
- value: function add(stream, isMySelf) {
777
- var _this4 = this;
778
- var streamCopy = this.copyStreamInfo(stream);
779
- if (streamCopy.connectorType === _fcrCore.FcrRoomConnectorType.PSTN) {
780
- var handlePSTNStreamAdded = function handlePSTNStreamAdded(stream, list, limitCount, isMySelf, placement) {
781
- var existedUserStream = list.find(function (item) {
782
- return item.userId === stream.owner.userId && item.videoSourceType === _fcrCore.FcrVideoSourceType.CAMERA;
783
- });
784
- if (existedUserStream) {
785
- existedUserStream.setAudioStream(stream);
786
- } else {
787
- _this4._insertNewData(stream, list, limitCount, isMySelf, placement);
788
- }
789
- };
790
- handlePSTNStreamAdded(streamCopy, this.mainList, this.mainListLimitedCount, isMySelf, 'main-list');
791
- handlePSTNStreamAdded(streamCopy, this.foldList, this.foldListLimitedCount, isMySelf, 'fold-list');
792
- } else {
793
- this._mergePstnStreamOrInsertNewData(streamCopy, this.mainList, this.mainListLimitedCount, isMySelf, 'main-list');
794
- this._mergePstnStreamOrInsertNewData(streamCopy, this.foldList, this.foldListLimitedCount, isMySelf, 'fold-list');
795
- }
796
- var hasScreenSharing = streamCopy.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN || this.mainList.some(function (item) {
797
- return item.hasScreenSharing && item.userId === streamCopy.owner.userId;
798
- });
799
- this._syncHasScreenSharing(hasScreenSharing, false, streamCopy.owner.userId, this.mainList, this.mainListLimitedCount, 'main-list');
800
- this._syncHasScreenSharing(hasScreenSharing, false, streamCopy.owner.userId, this.foldList, this.foldListLimitedCount, 'fold-list');
801
- }
802
- }, {
803
- key: "update",
804
- value: function update(param) {
805
- var _this5 = this;
806
- var handleStreamInfoUpdated = function handleStreamInfoUpdated(stream, list, limitCount, placement) {
807
- var existedUserStream = list[_this5._findItemIndexWithWindowId(stream.streamId, list)];
808
- if (existedUserStream) {
809
- var oldSortingPriority = existedUserStream.sortingPriority;
810
- if (param.connectorType === _fcrCore.FcrRoomConnectorType.PSTN) {
811
- existedUserStream.setAudioStream(stream);
812
- } else {
813
- existedUserStream.setVideoStream(stream);
814
- }
815
- var newSortingPriority = existedUserStream.sortingPriority;
816
- if (oldSortingPriority !== newSortingPriority) {
817
- var index = _this5._insertByPriority(existedUserStream, list, limitCount);
818
- _this5._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', index);
819
- }
820
- }
821
- };
822
- var handleUserInfoUpdated = function handleUserInfoUpdated(user, list, limitCount, placement) {
823
- var modifiedItems = [];
824
- list.forEach(function (item) {
825
- if (item.userId === user.userId) {
826
- var oldSortingPriority = item.sortingPriority;
827
- item.setVideoStreamOwnerInfo(user);
828
- item.setAudioStreamOwnerInfo(user);
829
- item.setBoardUserInfo(user);
830
- var newSortingPriority = item.sortingPriority;
831
- if (oldSortingPriority !== newSortingPriority) {
832
- modifiedItems.push(item);
833
- }
834
- }
835
- });
836
- modifiedItems.forEach(function (item) {
837
- var index = _this5._insertByPriority(item, list, limitCount);
838
- _this5._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', index);
839
- });
840
- };
841
- if ('streamId' in param) {
842
- var streamCopy = this.copyStreamInfo(param);
843
- handleStreamInfoUpdated(streamCopy, this.mainList, this.mainListLimitedCount, 'main-list');
844
- handleStreamInfoUpdated(streamCopy, this.foldList, this.foldListLimitedCount, 'fold-list');
845
- } else {
846
- handleUserInfoUpdated(param, this.mainList, this.mainListLimitedCount, 'main-list');
847
- handleUserInfoUpdated(param, this.foldList, this.foldListLimitedCount, 'fold-list');
848
- }
849
- }
850
- }, {
851
- key: "delete",
852
- value: function _delete(stream) {
853
- var _this6 = this;
854
- var streamCopy = this.copyStreamInfo(stream);
855
- var handlePSTNStreamDeleted = function handlePSTNStreamDeleted(stream, list, placement) {
856
- var index = _this6._findItemIndexWithAudioStreamId(stream.streamId, list);
857
- var existedUserStream = list[index];
858
- if (existedUserStream) {
859
- if (existedUserStream.videoStreamId) {
860
- existedUserStream.setAudioStream(undefined);
861
- _this6._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', index);
862
- } else {
863
- list.splice(index, 1);
864
- _this6._observer.notifyObservers(placement === 'main-list' ? 'onMainListRemoved' : 'onFoldListRemoved', index);
865
- }
866
- }
867
- };
868
- if (stream.connectorType === _fcrCore.FcrRoomConnectorType.PSTN) {
869
- handlePSTNStreamDeleted(streamCopy, this.mainList, 'main-list');
870
- handlePSTNStreamDeleted(streamCopy, this.foldList, 'fold-list');
871
- } else {
872
- var handleVideoStreamDeleted = function handleVideoStreamDeleted(streamId, list, placement) {
873
- var existStreamIndex = list.findIndex(function (item) {
874
- return item.videoStreamId === streamId;
875
- });
876
- if (existStreamIndex === -1) {
877
- return;
878
- }
879
- list.splice(existStreamIndex, 1);
880
- _this6._observer.notifyObservers(placement === 'main-list' ? 'onMainListRemoved' : 'onFoldListRemoved', existStreamIndex);
881
- };
882
- handleVideoStreamDeleted(streamCopy.streamId, this.mainList, 'main-list');
883
- handleVideoStreamDeleted(streamCopy.streamId, this.foldList, 'fold-list');
884
- }
885
- // if it is the last screen share stream of the user, remove the screen sharing flag
886
-
887
- if (stream.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN) {
888
- this._syncHasScreenSharing(false, false, streamCopy.owner.userId, this.mainList, this.mainListLimitedCount, 'main-list');
889
- this._syncHasScreenSharing(false, false, streamCopy.owner.userId, this.foldList, this.foldListLimitedCount, 'fold-list');
890
- }
891
- }
892
- }, {
893
- key: "addPin",
894
- value: function addPin(streamId) {
895
- var _this7 = this;
896
- var handlePin = function handlePin(streamId, list, limitCount, placement) {
897
- var existedUserStreamIndex = _this7._findItemIndexWithWindowId(streamId, list);
898
- var existedUserStream = list[existedUserStreamIndex];
899
- if (!existedUserStream || existedUserStream !== null && existedUserStream !== void 0 && existedUserStream.isPin) {
900
- return false;
901
- }
902
- var currentPinStreams = list.filter(function (item) {
903
- return item.isPin;
904
- });
905
- if (currentPinStreams.length >= _this7.pinLimitedCount) {
906
- var lastPinStream = currentPinStreams[currentPinStreams.length - 1];
907
- var _streamId = lastPinStream.videoStreamId || lastPinStream.audioStreamId;
908
- if (_streamId) {
909
- _this7.removePin(_streamId);
910
- }
911
- }
912
- existedUserStream.setPin(true);
913
- _this7._insertBeginningByPriority(existedUserStream, list, limitCount);
914
- _this7._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', existedUserStreamIndex);
915
- return true;
916
- };
917
- var success = handlePin(streamId, this.mainList, this.mainListLimitedCount, 'main-list');
918
- handlePin(streamId, this.foldList, this.foldListLimitedCount, 'fold-list');
919
- return success;
920
- }
921
- }, {
922
- key: "_updateSpeakerSpotlightPosition",
923
- value: function _updateSpeakerSpotlightPosition(index, list, limitCount, placement) {
924
- var existedUserStream = list[index];
925
- if (!existedUserStream) {
926
- return;
927
- }
928
- this._insertByPriority(existedUserStream, list, limitCount);
929
- this._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', index);
930
- }
931
- }, {
932
- key: "removePin",
933
- value: function removePin(streamId) {
934
- var _this8 = this;
935
- var handleRemovePin = function handleRemovePin(streamId, list, limitCount, placement) {
936
- var existedUserStreamIndex = _this8._findItemIndexWithWindowId(streamId, list);
937
- var existedUserStream = list[existedUserStreamIndex];
938
- if (!(existedUserStream !== null && existedUserStream !== void 0 && existedUserStream.isPin)) {
939
- return;
940
- }
941
- existedUserStream.setPin(false);
942
- _this8._insertByPriority(existedUserStream, list, limitCount);
943
- _this8._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', existedUserStreamIndex);
944
- return true;
945
- };
946
- var removePinMainRes = handleRemovePin(streamId, this.mainList, this.mainListLimitedCount, 'main-list');
947
- var removePinFoldRes = handleRemovePin(streamId, this.foldList, this.foldListLimitedCount, 'fold-list');
948
- return removePinMainRes && removePinFoldRes;
949
- }
950
- }, {
951
- key: "setSpeakerSpotlight",
952
- value: function setSpeakerSpotlight(streamId) {
953
- var _this9 = this;
954
- var checkStreamExist = function checkStreamExist(streamId) {
955
- return _this9._findItemIndexWithWindowId(streamId, _this9.mainList) !== -1 && _this9._findItemIndexWithWindowId(streamId, _this9.foldList) !== -1;
956
- };
957
- if (!checkStreamExist(streamId)) return;
958
- var isRefreshSpotlight = this._spotlightPool.streams.has(streamId);
959
- var success = this._spotlightPool.add(streamId);
960
- if (!success || isRefreshSpotlight) {
961
- return;
962
- }
963
- var setSpeakerSpotlight = function setSpeakerSpotlight(streamId, list, limitCount, placement) {
964
- var existedUserStreamIndex = _this9._findItemIndexWithWindowId(streamId, list);
965
- var existedUserStream = list[existedUserStreamIndex];
966
- if (existedUserStream) {
967
- existedUserStream.setSpeakerSpotlight(true);
968
- }
969
- var isSpeakerSpotlightSortingPriority = existedUserStream.sortingPriority === (placement === 'main-list' ? _type.FcrUIVideoWindowMainSortingPriority.SPEAKER_SPOTLIGHT : _type.FcrUIVideoWindowFoldSortingPriority.FOCUS);
970
- if (isSpeakerSpotlightSortingPriority) {
971
- _this9._insertBeginningByPriority(existedUserStream, list, limitCount);
972
- }
973
- list.forEach(function (item) {
974
- if (item.needToSort) {
975
- _this9._insertByPriority(item, list, limitCount);
976
- }
977
- });
978
- _this9._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', existedUserStreamIndex);
979
- };
980
- setSpeakerSpotlight(streamId, this.mainList, this.mainListLimitedCount, 'main-list');
981
- setSpeakerSpotlight(streamId, this.foldList, this.foldListLimitedCount, 'fold-list');
982
- this._observer.notifyObservers('onSpotlightAdded', streamId);
983
- this.spotlightStreamId = streamId;
984
- }
985
- }, {
986
- key: "toggleMainStream",
987
- value: function toggleMainStream(windowId) {
988
- var streamIndex = this._findItemIndexWithWindowId(windowId, this.mainList);
989
- if (streamIndex === -1) {
990
- return false;
991
- }
992
- var streamData = this.mainList[streamIndex];
993
- // bring the stream to the start of the list
994
- this.mainList.splice(streamIndex, 1);
995
- this.mainList.unshift(streamData);
996
- this._observer.notifyObservers('onMainListUpdated', streamIndex);
997
- return true;
998
- }
999
- }, {
1000
- key: "clearSpeakerSpotlight",
1001
- value: function clearSpeakerSpotlight() {
1002
- this._spotlightPool.clear();
1003
- }
1004
- }, {
1005
- key: "addObserver",
1006
- value: function addObserver(observer) {
1007
- this._observer.addObserver(observer);
1008
- }
1009
- }, {
1010
- key: "removeObserver",
1011
- value: function removeObserver(observer) {
1012
- this._observer.removeObserver(observer);
1013
- }
1014
- }, {
1015
- key: "release",
1016
- value: function release() {
1017
- this._spotlightPool.clear();
1018
- }
1019
- }, {
1020
- key: "copyStreamInfo",
1021
- value: function copyStreamInfo(stream) {
1022
- var streamCopy = Object.assign({}, stream);
1023
- return streamCopy;
1024
- }
1025
- }, {
1026
- key: "_syncHasScreenSharing",
1027
- value: function _syncHasScreenSharing(enable, hasBoardSharing, userId, list, limitCount, placement) {
1028
- var _this0 = this;
1029
- if (enable) {
1030
- list.forEach(function (item, index) {
1031
- if (item.userId === userId) {
1032
- var itemIndex = index;
1033
- var originalPriority = item.sortingPriority;
1034
- item.setHasScreenSharing(enable);
1035
- item.setHasBoardSharing(hasBoardSharing);
1036
- if (item.sortingPriority !== originalPriority) {
1037
- itemIndex = _this0._insertByPriority(item, list, limitCount);
1038
- }
1039
- _this0._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', itemIndex);
1040
- var hasLoopbackAudioStream = _this0 === null || _this0 === void 0 ? void 0 : _this0.mainList.some(function (item) {
1041
- return item.userId === userId && item.hasScreenSharing && item.hasLoopbackAudioStream;
1042
- });
1043
- item.setHasLoopbackSharing(hasLoopbackAudioStream);
1044
- }
1045
- });
1046
- } else {
1047
- var remainingShare = list.some(function (item) {
1048
- return item.userId === userId && (item.type === _type.FcrUIWindowType.BOARD || item.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN);
1049
- });
1050
- if (!remainingShare) {
1051
- list.forEach(function (item) {
1052
- if (item.userId === userId) {
1053
- item.setHasScreenSharing(enable);
1054
- item.setHasBoardSharing(hasBoardSharing);
1055
- var index = _this0._insertByPriority(item, list, limitCount);
1056
- _this0._observer.notifyObservers(placement === 'main-list' ? 'onMainListUpdated' : 'onFoldListUpdated', index);
1057
- }
1058
- });
1059
- }
1060
- }
1061
- }
1062
- }, {
1063
- key: "_insertByPriority",
1064
- value: function _insertByPriority(data, list, limitCount) {
1065
- var insertIndex = -1;
1066
- if (data.sortingPriority >= _type.FcrUIVideoWindowMainSortingPriority.FOCUS) {
1067
- insertIndex = this._insertBeginningByPriority(data, list, limitCount);
1068
- } else {
1069
- insertIndex = this._insertEndByPriority(data, list, limitCount);
1070
- }
1071
- if (data.hasVideoStream) {
1072
- data.setIsFirstCameraOpen(true);
1073
- }
1074
- return insertIndex;
1075
- }
1076
- }, {
1077
- key: "_insertBeginningByPriority",
1078
- value: function _insertBeginningByPriority(data, list, limitedCount) {
1079
- var currentIndex = this._findItemIndexWithWindowId(data.windowId, list);
1080
- if (currentIndex !== -1) {
1081
- list.splice(currentIndex, 1);
1082
- }
1083
- var index = this._findInsertBeginningIndex(data.sortingPriority, list);
1084
- list.splice(index, 0, data);
1085
- if (list.length > limitedCount) {
1086
- list.splice(limitedCount);
1087
- }
1088
- data.needToSort = false;
1089
- return index;
1090
- }
1091
- }, {
1092
- key: "_insertEndByPriority",
1093
- value: function _insertEndByPriority(data, list, limitedCount) {
1094
- var currentIndex = this._findItemIndexWithWindowId(data.windowId, list);
1095
- if (currentIndex !== -1) {
1096
- list.splice(currentIndex, 1);
1097
- }
1098
- var index = this._findInsertEndIndex(data.sortingPriority, list);
1099
- list.splice(index, 0, data);
1100
- if (list.length > limitedCount) {
1101
- list.splice(limitedCount);
1102
- }
1103
- data.needToSort = false;
1104
- return index;
1105
- }
1106
- }, {
1107
- key: "_findInsertBeginningIndex",
1108
- value: function _findInsertBeginningIndex(priority, list) {
1109
- // list is sorted by priority
1110
- var index = list.findIndex(function (item) {
1111
- return item.sortingPriority <= priority;
1112
- });
1113
- if (index === -1) {
1114
- return list.length;
1115
- } else {
1116
- return index;
1117
- }
1118
- }
1119
- }, {
1120
- key: "_findInsertEndIndex",
1121
- value: function _findInsertEndIndex(priority, list) {
1122
- // list is sorted by priority
1123
- var index = list.findLastIndex(function (item) {
1124
- return item.sortingPriority >= priority;
1125
- });
1126
- if (index === -1) {
1127
- return 0;
1128
- } else {
1129
- return index + 1;
1130
- }
1131
- }
1132
- }, {
1133
- key: "_findCurrentSpeakerSpotlight",
1134
- value: function _findCurrentSpeakerSpotlight(list) {
1135
- return list.findIndex(function (item) {
1136
- return item.isSpeakerSpotlight;
1137
- });
1138
- }
1139
- }, {
1140
- key: "_findItemIndexWithWindowId",
1141
- value: function _findItemIndexWithWindowId(windowId, list) {
1142
- return list.findIndex(function (item) {
1143
- return item.windowId === windowId;
1144
- });
1145
- }
1146
- }, {
1147
- key: "_findItemIndexWithAudioStreamId",
1148
- value: function _findItemIndexWithAudioStreamId(audioStreamId, list) {
1149
- return list.findIndex(function (item) {
1150
- return item.audioStreamId === audioStreamId;
1151
- });
1152
- }
1153
- }, {
1154
- key: "_insertBoard",
1155
- value: function _insertBoard(userInfo, list, limitCount, isMySelf, placement) {
1156
- var canEdit = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
1157
- var windowData = new FcrUIVideoWindowDataImpl(_type.FcrUIWindowType.BOARD, {
1158
- boardUserInfo: userInfo
1159
- }, placement, isMySelf, this.layoutType, this.spotlightEnabled, canEdit);
1160
- var insertIndex = this._insertByPriority(windowData, list, limitCount);
1161
- this._observer.notifyObservers(placement === 'main-list' ? 'onMainListAdded' : 'onFoldListAdded', insertIndex);
1162
- }
1163
- }, {
1164
- key: "_insertNewData",
1165
- value: function _insertNewData(stream, list, limitCount, isMySelf, placement) {
1166
- var videoWindowData = new FcrUIVideoWindowDataImpl(_type.FcrUIWindowType.VIDEO, stream.connectorType === _fcrCore.FcrRoomConnectorType.PSTN ? {
1167
- audioStream: stream
1168
- } : {
1169
- videoStream: stream
1170
- }, placement, isMySelf, this.layoutType, this.spotlightEnabled);
1171
- var insertIndex = this._insertByPriority(videoWindowData, list, limitCount);
1172
- this._observer.notifyObservers(placement === 'main-list' ? 'onMainListAdded' : 'onFoldListAdded', insertIndex);
1173
- }
1174
- }]);
1175
- }();
1176
- _FcrUIVideoWindowDataSourceImpl = FcrUIVideoWindowDataSourceImpl;
1177
- var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIVideoWindowDataSourceImpl, [[_mobx.observable, 1, "spotlightEnabled"], [_mobx.observable, 1, "layoutType"], [_mobx.observable, 1, "manualLayout"], [_mobx.observable, 1, "pinLimitedCount"], [_mobx.observable, 1, "mainListLimitedCount"], [_mobx.observable, 1, "foldListLimitedCount"], [_mobx.observable, 1, "mainList"], [_mobx.observable, 1, "foldList"], [_mobx.observable, 1, "spotlightStreamId"], [_mobx.computed, 3, "shouldHideNonVideoParticipants"], [_setSpotlightEnabledDecs2, 18, "setSpotlightEnabled"], [_setLayoutDecs, 18, "setLayout"], [_onSpotlightRemovedDecs, 18, "onSpotlightRemoved"], [_resetListDecs, 18, "resetList"], [_addBoardDecs, 18, "addBoard"], [_updateBoardDecs, 18, "updateBoard"], [_removeBoardDecs, 18, "removeBoard"], [_mergePstnStreamOrInsertNewDataDecs, 18, "_mergePstnStreamOrInsertNewData"], [_addDecs, 18, "add"], [_updateDecs, 18, "update"], [_deleteDecs, 18, "delete"], [_addPinDecs, 18, "addPin"], [_updateSpeakerSpotlightPositionDecs, 18, "_updateSpeakerSpotlightPosition"], [_removePinDecs, 18, "removePin"], [_setSpeakerSpotlightDecs2, 18, "setSpeakerSpotlight"], [_toggleMainStreamDecs, 18, "toggleMainStream"], [_insertBeginningByPriorityDecs, 18, "_insertBeginningByPriority"], [_insertEndByPriorityDecs, 18, "_insertEndByPriority"], [_findInsertBeginningIndexDecs, 18, "_findInsertBeginningIndex"], [_findInsertEndIndexDecs, 18, "_findInsertEndIndex"], [_insertBoardDecs, 18, "_insertBoard"], [_insertNewDataDecs, 18, "_insertNewData"]], []).e, 10);
1178
- _init_spotlightEnabled = _applyDecs$e2[0];
1179
- _init_layoutType = _applyDecs$e2[1];
1180
- _init_manualLayout = _applyDecs$e2[2];
1181
- _init_pinLimitedCount = _applyDecs$e2[3];
1182
- _init_mainListLimitedCount = _applyDecs$e2[4];
1183
- _init_foldListLimitedCount = _applyDecs$e2[5];
1184
- _init_mainList = _applyDecs$e2[6];
1185
- _init_foldList = _applyDecs$e2[7];
1186
- _init_spotlightStreamId = _applyDecs$e2[8];
1187
- _initProto2 = _applyDecs$e2[9];
1188
- var FcrUISpeakerSpotlightPool = exports.FcrUISpeakerSpotlightPool = /*#__PURE__*/function () {
1189
- function FcrUISpeakerSpotlightPool() {
1190
- (0, _classCallCheck2["default"])(this, FcrUISpeakerSpotlightPool);
1191
- (0, _defineProperty2["default"])(this, "streams", new Map());
1192
- (0, _defineProperty2["default"])(this, "limitCount", 1);
1193
- (0, _defineProperty2["default"])(this, "duration", 2);
1194
- (0, _defineProperty2["default"])(this, "_timer", null);
1195
- (0, _defineProperty2["default"])(this, "_observer", new _observable.AgoraObservable());
1196
- this._scan = this._scan.bind(this);
1197
- }
1198
- return (0, _createClass2["default"])(FcrUISpeakerSpotlightPool, [{
1199
- key: "add",
1200
- value: function add(streamId) {
1201
- if (this.streams.size >= this.limitCount && !this.streams.has(streamId)) {
1202
- return false;
1203
- }
1204
- this.streams.set(streamId, Date.now());
1205
- this._scan();
1206
- return true;
1207
- }
1208
- }, {
1209
- key: "_scan",
1210
- value: function _scan() {
1211
- var _this1 = this;
1212
- if (this._timer) {
1213
- window.clearInterval(this._timer);
1214
- this._timer = null;
1215
- }
1216
- this._timer = window.setInterval(function () {
1217
- var now = Date.now();
1218
- var _iterator = _createForOfIteratorHelper(_this1.streams),
1219
- _step;
1220
- try {
1221
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1222
- var _step$value = (0, _slicedToArray2["default"])(_step.value, 2),
1223
- _streamId2 = _step$value[0],
1224
- time = _step$value[1];
1225
- if (now - time - _this1.duration * 1000 >= 0) {
1226
- _this1.streams["delete"](_streamId2);
1227
- _this1._observer.notifyObservers('onRemoved', _streamId2);
1228
- }
1229
- }
1230
- } catch (err) {
1231
- _iterator.e(err);
1232
- } finally {
1233
- _iterator.f();
1234
- }
1235
- if (_this1.streams.size === 0) {
1236
- _this1._timer && window.clearInterval(_this1._timer);
1237
- _this1._timer = null;
1238
- }
1239
- }, 1000);
1240
- }
1241
- }, {
1242
- key: "clear",
1243
- value: function clear() {
1244
- var _this10 = this;
1245
- this.streams.forEach(function (_, streamId) {
1246
- _this10._observer.notifyObservers('onRemoved', streamId);
1247
- });
1248
- this.streams.clear();
1249
- if (this._timer) {
1250
- window.clearInterval(this._timer);
1251
- this._timer = null;
1252
- }
1253
- }
1254
- }, {
1255
- key: "addObserver",
1256
- value: function addObserver(observer) {
1257
- this._observer.addObserver(observer);
1258
- }
1259
- }, {
1260
- key: "removeObserver",
1261
- value: function removeObserver(observer) {
1262
- this._observer.removeObserver(observer);
1263
- }
1264
- }]);
1265
- }();
1266
- (0, _base.registerDependency)('sharedVideoWindowDataSource');