fcr-ui-scene 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (709) hide show
  1. package/lib/ scenes/base.d.ts +10 -0
  2. package/lib/ scenes/base.js +75 -0
  3. package/lib/ scenes/main-scene.d.ts +43 -0
  4. package/lib/ scenes/main-scene.js +368 -0
  5. package/lib/ scenes/waiting-scene.d.ts +31 -0
  6. package/lib/ scenes/waiting-scene.js +119 -0
  7. package/lib/base.d.ts +40 -5
  8. package/lib/base.js +237 -22
  9. package/lib/common/device-store.d.ts +12 -22
  10. package/lib/common/device-store.js +154 -247
  11. package/lib/common/device-stream-store.d.ts +4 -22
  12. package/lib/common/device-stream-store.js +113 -297
  13. package/lib/common/event-store.d.ts +10 -35
  14. package/lib/common/event-store.js +13 -64
  15. package/lib/common/room-store.js +4 -4
  16. package/lib/common/security-store.d.ts +26 -44
  17. package/lib/common/security-store.js +372 -329
  18. package/lib/common/type.d.ts +8 -0
  19. package/lib/common/type.js +6 -0
  20. package/lib/creator.d.ts +1 -1
  21. package/lib/creator.js +4 -9
  22. package/lib/electron/app.js +25 -7
  23. package/lib/electron/bootstrap-dev.js +0 -7
  24. package/lib/electron/bootstrap-sdk.js +11 -2
  25. package/lib/electron/injections.d.ts +3 -1
  26. package/lib/electron/injections.js +17 -2
  27. package/lib/electron/logger.d.ts +0 -4
  28. package/lib/electron/logger.js +2 -5
  29. package/lib/electron/main.js +1 -1
  30. package/lib/electron/plugins/devtool-shortcut.js +10 -1
  31. package/lib/electron/plugins/meeting-state.js +1 -1
  32. package/lib/electron/preload.js +3 -1
  33. package/lib/error-fallback.css +62 -0
  34. package/lib/error-fallback.d.ts +2 -0
  35. package/lib/error-fallback.js +19 -0
  36. package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
  37. package/lib/fragments/control-bar/control-bar-store.d.ts +1 -44
  38. package/lib/fragments/control-bar/control-bar-store.js +80 -457
  39. package/lib/fragments/control-bar/device/index.js +3 -5
  40. package/lib/fragments/control-bar/index.css +10 -15
  41. package/lib/fragments/control-bar/index.js +0 -24
  42. package/lib/fragments/control-bar/more-actions/index.css +0 -53
  43. package/lib/fragments/control-bar/more-actions/index.js +38 -73
  44. package/lib/fragments/control-bar/security-content/index.css +0 -75
  45. package/lib/fragments/control-bar/security-content/index.js +19 -105
  46. package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
  47. package/lib/fragments/control-bar/view.js +8 -23
  48. package/lib/fragments/live-streaming/store.d.ts +1 -1
  49. package/lib/fragments/live-streaming/store.js +1 -1
  50. package/lib/fragments/live-streaming/view.js +2 -4
  51. package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
  52. package/lib/fragments/share-screen-selection/selection-store.js +1 -1
  53. package/lib/fragments/share-screen-selection/view.js +20 -20
  54. package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
  55. package/lib/fragments/toolbar/components/pen-picker.js +1 -1
  56. package/lib/fragments/toolbar/components/shape-picker.js +1 -1
  57. package/lib/fragments/toolbar/components/wrapper.js +1 -1
  58. package/lib/fragments/toolbar/hooks.js +1 -1
  59. package/lib/fragments/toolbar/store.d.ts +1 -1
  60. package/lib/global.css +5 -0
  61. package/lib/index.d.ts +1 -0
  62. package/lib/index.js +7 -4
  63. package/lib/login-confirm-dialog.d.ts +1 -0
  64. package/lib/login-confirm-dialog.js +7 -2
  65. package/lib/modules/Interpreter/action/delete-btn/index.d.ts +2 -2
  66. package/lib/modules/Interpreter/action/edit-btn/index.d.ts +0 -1
  67. package/lib/modules/Interpreter/action/edit-btn/index.js +2 -4
  68. package/lib/modules/Interpreter/action/switch-btn/index.css +3 -0
  69. package/lib/modules/Interpreter/action/switch-btn/index.d.ts +2 -4
  70. package/lib/modules/Interpreter/action/switch-btn/index.js +8 -8
  71. package/lib/modules/Interpreter/dialog-content/index.d.ts +2 -2
  72. package/lib/modules/Interpreter/dialog-content/index.js +4 -4
  73. package/lib/modules/Interpreter/footer/index.css +4 -3
  74. package/lib/modules/Interpreter/index.d.ts +11 -19
  75. package/lib/modules/Interpreter/index.js +23 -24
  76. package/lib/modules/Interpreter/interpreter-list/index.css +5 -1
  77. package/lib/modules/Interpreter/interpreter-list/index.d.ts +1 -0
  78. package/lib/modules/Interpreter/interpreter-list/index.js +3 -1
  79. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +0 -6
  80. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
  81. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -3
  82. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +1 -3
  83. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -7
  84. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +66 -92
  85. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +6 -0
  86. package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +58 -0
  87. package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +2 -2
  88. package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +2 -2
  89. package/lib/modules/Interpreter/store.d.ts +24 -78
  90. package/lib/modules/Interpreter/store.js +212 -1255
  91. package/lib/modules/Interpreter/type.d.ts +24 -0
  92. package/lib/modules/Interpreter/type.js +12 -0
  93. package/lib/modules/Interpreter/utils.d.ts +8 -0
  94. package/lib/modules/Interpreter/utils.js +81 -0
  95. package/lib/modules/Interpreter/view.d.ts +0 -1
  96. package/lib/modules/Interpreter/view.js +20 -6
  97. package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -4
  98. package/lib/modules/action-bar/action-bar-collapes-items.js +14 -31
  99. package/lib/modules/action-bar/apps/useInterpreter.js +4 -2
  100. package/lib/modules/action-bar/chat/index.js +8 -8
  101. package/lib/modules/action-bar/components/apps/app-item/index.css +34 -0
  102. package/lib/modules/action-bar/components/apps/app-item/index.d.ts +3 -0
  103. package/lib/modules/action-bar/components/apps/app-item/index.js +61 -0
  104. package/lib/modules/action-bar/components/apps/appitems.d.ts +3 -0
  105. package/lib/modules/action-bar/components/apps/appitems.js +45 -0
  106. package/lib/modules/action-bar/components/apps/index.css +8 -0
  107. package/lib/modules/action-bar/components/apps/index.d.ts +4 -0
  108. package/lib/modules/action-bar/components/apps/index.js +56 -0
  109. package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +9 -0
  110. package/lib/modules/action-bar/components/apps/useAppItemOptions.js +29 -0
  111. package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +10 -0
  112. package/lib/modules/action-bar/components/apps/useBeautyBackground.js +36 -0
  113. package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +14 -0
  114. package/lib/modules/action-bar/components/apps/useInterpreter.js +37 -0
  115. package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +16 -0
  116. package/lib/modules/action-bar/components/apps/useLiveStreaming.js +41 -0
  117. package/lib/modules/action-bar/components/board/index.d.ts +4 -0
  118. package/lib/modules/action-bar/components/board/index.js +34 -0
  119. package/lib/modules/action-bar/components/breakout-room/index.d.ts +4 -0
  120. package/lib/modules/action-bar/components/breakout-room/index.js +32 -0
  121. package/lib/modules/action-bar/components/chat/index.css +80 -0
  122. package/lib/modules/action-bar/components/chat/index.d.ts +5 -0
  123. package/lib/modules/action-bar/components/chat/index.js +154 -0
  124. package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
  125. package/lib/modules/action-bar/components/collapse/index.js +222 -0
  126. package/lib/modules/action-bar/components/device/index.css +162 -0
  127. package/lib/modules/action-bar/components/device/index.d.ts +8 -0
  128. package/lib/modules/action-bar/components/device/index.js +611 -0
  129. package/lib/modules/action-bar/components/interpreter/index.d.ts +2 -0
  130. package/lib/modules/action-bar/components/interpreter/index.js +41 -0
  131. package/lib/modules/action-bar/components/item/index.d.ts +9 -0
  132. package/lib/modules/action-bar/components/item/index.js +164 -0
  133. package/lib/modules/action-bar/components/item.d.ts +27 -0
  134. package/lib/modules/action-bar/components/item.js +164 -0
  135. package/lib/modules/action-bar/components/leave/assign-host.d.ts +3 -0
  136. package/lib/modules/action-bar/components/leave/assign-host.js +64 -0
  137. package/lib/modules/action-bar/components/leave/index.css +126 -0
  138. package/lib/modules/action-bar/components/leave/index.d.ts +3 -0
  139. package/lib/modules/action-bar/components/leave/index.js +144 -0
  140. package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +3 -0
  141. package/lib/modules/action-bar/components/leave/leave-meeting.js +153 -0
  142. package/lib/modules/action-bar/components/live-streaming/index.d.ts +4 -0
  143. package/lib/modules/action-bar/components/live-streaming/index.js +39 -0
  144. package/lib/modules/action-bar/components/more/index.css +114 -0
  145. package/lib/modules/action-bar/components/more/index.d.ts +5 -0
  146. package/lib/modules/action-bar/components/more/index.js +87 -0
  147. package/lib/modules/action-bar/components/more/poppover-content.d.ts +5 -0
  148. package/lib/modules/action-bar/components/more/poppover-content.js +423 -0
  149. package/lib/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
  150. package/lib/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
  151. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
  152. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +8 -0
  153. package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +100 -0
  154. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
  155. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +5 -0
  156. package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +33 -0
  157. package/lib/modules/action-bar/components/notification-bar/index.css +74 -0
  158. package/lib/modules/action-bar/components/notification-bar/index.d.ts +2 -0
  159. package/lib/modules/action-bar/components/notification-bar/index.js +99 -0
  160. package/lib/modules/action-bar/components/participants/index.css +21 -0
  161. package/lib/modules/action-bar/components/participants/index.d.ts +5 -0
  162. package/lib/modules/action-bar/components/participants/index.js +83 -0
  163. package/lib/modules/action-bar/components/placement/index.d.ts +4 -0
  164. package/lib/modules/action-bar/components/placement/index.js +18 -0
  165. package/lib/modules/action-bar/components/record/index.css +39 -0
  166. package/lib/modules/action-bar/components/record/index.d.ts +5 -0
  167. package/lib/modules/action-bar/components/record/index.js +166 -0
  168. package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +3 -0
  169. package/lib/modules/action-bar/components/record/stop-record-dialog.js +48 -0
  170. package/lib/modules/action-bar/components/respond/index.d.ts +4 -0
  171. package/lib/modules/action-bar/components/respond/index.js +32 -0
  172. package/lib/modules/action-bar/components/screen-share/index.d.ts +4 -0
  173. package/lib/modules/action-bar/components/screen-share/index.js +106 -0
  174. package/lib/modules/action-bar/components/screen-share/submenu.d.ts +1 -0
  175. package/lib/modules/action-bar/components/screen-share/submenu.js +177 -0
  176. package/lib/modules/action-bar/components/security/index.d.ts +4 -0
  177. package/lib/modules/action-bar/components/security/index.js +60 -0
  178. package/lib/modules/action-bar/components/settings/index.d.ts +4 -0
  179. package/lib/modules/action-bar/components/settings/index.js +42 -0
  180. package/lib/modules/action-bar/components/smaller/index.d.ts +1 -0
  181. package/lib/modules/action-bar/components/smaller/index.js +52 -0
  182. package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
  183. package/lib/modules/action-bar/components/trigger-input-language-room/index.css +86 -0
  184. package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +3 -0
  185. package/lib/modules/action-bar/components/trigger-input-language-room/index.js +215 -0
  186. package/lib/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
  187. package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -0
  188. package/lib/modules/action-bar/components/trigger-output-language/index.d.ts +2 -0
  189. package/lib/modules/action-bar/components/trigger-output-language/index.js +230 -0
  190. package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +10 -0
  191. package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +8 -0
  192. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +22 -0
  193. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +3 -0
  194. package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +75 -0
  195. package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +8 -0
  196. package/lib/modules/action-bar/components/trigger-output-language-room/index.js +98 -0
  197. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +5 -0
  198. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +66 -0
  199. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +5 -0
  200. package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +37 -0
  201. package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
  202. package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
  203. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
  204. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
  205. package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +70 -0
  206. package/lib/modules/action-bar/components/trigger-subscribe-language/index.d.ts +5 -0
  207. package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +209 -0
  208. package/lib/modules/action-bar/device/index.css +2 -7
  209. package/lib/modules/action-bar/device/index.js +24 -22
  210. package/lib/modules/action-bar/enums.d.ts +23 -0
  211. package/lib/modules/action-bar/enums.js +35 -0
  212. package/lib/modules/action-bar/index.css +23 -1
  213. package/lib/modules/action-bar/index.d.ts +36 -26
  214. package/lib/modules/action-bar/index.dev.d.ts +0 -1
  215. package/lib/modules/action-bar/index.dev.js +94 -100
  216. package/lib/modules/action-bar/index.js +46 -18
  217. package/lib/modules/action-bar/leave/assign-host.d.ts +0 -3
  218. package/lib/modules/action-bar/leave/assign-host.js +4 -2
  219. package/lib/modules/action-bar/leave/index.css +0 -10
  220. package/lib/modules/action-bar/leave/index.js +34 -84
  221. package/lib/modules/action-bar/leave/leave-meeting.d.ts +1 -13
  222. package/lib/modules/action-bar/leave/leave-meeting.js +19 -37
  223. package/lib/modules/action-bar/live-streaming/index.js +3 -3
  224. package/lib/modules/action-bar/more/index.js +6 -9
  225. package/lib/modules/action-bar/more/poppover-content.js +16 -37
  226. package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +58 -0
  227. package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +8 -0
  228. package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +100 -0
  229. package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +56 -0
  230. package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +5 -0
  231. package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +33 -0
  232. package/lib/modules/action-bar/notification-bar/dome.png +0 -0
  233. package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
  234. package/lib/modules/action-bar/notification-bar/index.css +74 -0
  235. package/lib/modules/action-bar/notification-bar/index.d.ts +2 -0
  236. package/lib/modules/action-bar/notification-bar/index.js +99 -0
  237. package/lib/modules/action-bar/participants/index.css +0 -12
  238. package/lib/modules/action-bar/participants/index.js +16 -23
  239. package/lib/modules/action-bar/record/index.js +4 -4
  240. package/lib/modules/action-bar/screen-share/index.js +5 -9
  241. package/lib/modules/action-bar/screen-share/submenu.js +26 -20
  242. package/lib/modules/action-bar/security/drop-menu.js +22 -137
  243. package/lib/modules/action-bar/security/index.js +6 -11
  244. package/lib/modules/action-bar/settings/index.js +4 -4
  245. package/lib/modules/action-bar/smaller.js +4 -4
  246. package/lib/modules/action-bar/store.d.ts +84 -99
  247. package/lib/modules/action-bar/store.js +545 -699
  248. package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
  249. package/lib/modules/action-bar/trigger-input-language-room/index.css +86 -0
  250. package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +15 -0
  251. package/lib/modules/action-bar/trigger-input-language-room/index.js +220 -0
  252. package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +10 -0
  253. package/lib/modules/action-bar/trigger-output-language-room/constant.js +8 -0
  254. package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +22 -0
  255. package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +14 -0
  256. package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +75 -0
  257. package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +4 -0
  258. package/lib/modules/action-bar/trigger-output-language-room/index.js +98 -0
  259. package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +5 -0
  260. package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +66 -0
  261. package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +5 -0
  262. package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +36 -0
  263. package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
  264. package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
  265. package/lib/modules/action-bar/types.d.ts +94 -0
  266. package/lib/modules/action-bar/types.js +6 -0
  267. package/lib/modules/action-bar/view.d.ts +1 -2
  268. package/lib/modules/action-bar/view.js +14 -14
  269. package/lib/modules/audio-stream/index.d.ts +22 -23
  270. package/lib/modules/audio-stream/index.js +79 -85
  271. package/lib/modules/chat/chat-bar/index.css +0 -1
  272. package/lib/modules/chat/chat-bar/index.d.ts +3 -3
  273. package/lib/modules/chat/chat-bar/index.js +37 -47
  274. package/lib/modules/chat/chat-room-store.d.ts +135 -0
  275. package/lib/modules/chat/chat-room-store.js +954 -0
  276. package/lib/modules/chat/chat-select/index.css +4 -21
  277. package/lib/modules/chat/chat-select/index.d.ts +1 -1
  278. package/lib/modules/chat/chat-select/index.js +4 -18
  279. package/lib/modules/chat/chat.d.ts +2 -1
  280. package/lib/modules/chat/chat.js +127 -194
  281. package/lib/modules/chat/components/chat-action/index.d.ts +1 -0
  282. package/lib/modules/chat/components/chat-action/index.js +28 -0
  283. package/lib/modules/chat/components/chat-bar/index.css +85 -0
  284. package/lib/modules/chat/components/chat-bar/index.d.ts +3 -0
  285. package/lib/modules/chat/components/chat-bar/index.js +145 -0
  286. package/lib/modules/chat/components/chat-select/index.css +185 -0
  287. package/lib/modules/chat/components/chat-select/index.d.ts +3 -0
  288. package/lib/modules/chat/components/chat-select/index.js +237 -0
  289. package/lib/modules/chat/components/message-list/index.d.ts +4 -0
  290. package/lib/modules/chat/components/message-list/index.js +650 -0
  291. package/lib/modules/chat/index.css +10 -0
  292. package/lib/modules/chat/index.d.ts +13 -15
  293. package/lib/modules/chat/index.dev.d.ts +0 -1
  294. package/lib/modules/chat/index.dev.js +72 -62
  295. package/lib/modules/chat/index.js +48 -38
  296. package/lib/modules/chat/message-list.js +51 -67
  297. package/lib/modules/chat/mock.d.ts +1 -1
  298. package/lib/modules/chat/store.d.ts +17 -162
  299. package/lib/modules/chat/store.js +95 -963
  300. package/lib/modules/chat/types.d.ts +70 -0
  301. package/lib/modules/chat/types.js +17 -0
  302. package/lib/modules/chat/view.d.ts +10 -0
  303. package/lib/modules/chat/view.js +372 -0
  304. package/lib/modules/components/device-control/components/audio-menu/index.js +6 -6
  305. package/lib/modules/components/device-control/components/microphone/index.js +7 -7
  306. package/lib/modules/components/device-control/index.css +3 -0
  307. package/lib/modules/components/device-control/store.d.ts +11 -12
  308. package/lib/modules/components/device-control/store.js +46 -49
  309. package/lib/modules/components/dialog-container/component/body.d.ts +7 -0
  310. package/lib/modules/components/dialog-container/component/body.js +47 -0
  311. package/lib/modules/components/dialog-container/index.css +78 -0
  312. package/lib/modules/components/dialog-container/index.d.ts +11 -0
  313. package/lib/modules/components/dialog-container/index.js +110 -0
  314. package/lib/modules/components/leave-meeting/components/assign-host.d.ts +3 -0
  315. package/lib/modules/components/leave-meeting/components/assign-host.js +70 -0
  316. package/lib/modules/components/leave-meeting/components/index.css +125 -0
  317. package/lib/modules/components/leave-meeting/index.d.ts +4 -0
  318. package/lib/modules/components/leave-meeting/index.js +147 -0
  319. package/lib/modules/components/leave-meeting/store.d.ts +31 -0
  320. package/lib/modules/components/leave-meeting/store.js +292 -0
  321. package/lib/modules/components/member-window/index.css +419 -0
  322. package/lib/modules/components/member-window/index.d.ts +76 -0
  323. package/lib/modules/components/member-window/index.js +894 -0
  324. package/lib/modules/components/security-menu/index.css +9 -0
  325. package/lib/modules/components/security-menu/index.d.ts +2 -0
  326. package/lib/modules/components/security-menu/index.js +108 -58
  327. package/lib/modules/components/tab-frame/index.css +40 -0
  328. package/lib/modules/components/tab-frame/index.d.ts +12 -0
  329. package/lib/modules/components/tab-frame/index.js +78 -0
  330. package/lib/modules/connection-gateway/components/computer/index.css +1 -0
  331. package/lib/modules/connection-gateway/components/computer/index.js +4 -4
  332. package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +1 -1
  333. package/lib/modules/connection-gateway/components/phone/index.css +1 -1
  334. package/lib/modules/connection-gateway/components/phone/index.js +2 -2
  335. package/lib/modules/connection-gateway/components/tabs/index.js +1 -2
  336. package/lib/modules/connection-gateway/enums.d.ts +4 -0
  337. package/lib/modules/connection-gateway/enums.js +12 -0
  338. package/lib/modules/connection-gateway/index.d.ts +13 -11
  339. package/lib/modules/connection-gateway/index.js +25 -15
  340. package/lib/modules/connection-gateway/store.d.ts +19 -23
  341. package/lib/modules/connection-gateway/store.js +61 -53
  342. package/lib/modules/connection-gateway/types.d.ts +4 -0
  343. package/lib/modules/connection-gateway/types.js +6 -0
  344. package/lib/modules/connection-gateway/view.js +21 -4
  345. package/lib/modules/control-bar/components/cloud-recording-buttons.js +1 -1
  346. package/lib/modules/control-bar/components/meeting-details/index.js +30 -25
  347. package/lib/modules/control-bar/components/more-actions/index.css +18 -0
  348. package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -5
  349. package/lib/modules/control-bar/components/more-actions/index.js +58 -9
  350. package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -7
  351. package/lib/modules/control-bar/components/share-state-nav/index.js +2 -1
  352. package/lib/modules/control-bar/components/stop-live-streaming/stop-button.d.ts +1 -1
  353. package/lib/modules/control-bar/components/stop-live-streaming/stop-button.js +2 -2
  354. package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -10
  355. package/lib/modules/control-bar/components/transfer-position-icon/index.js +7 -12
  356. package/lib/modules/control-bar/enums.d.ts +21 -0
  357. package/lib/modules/control-bar/enums.js +31 -0
  358. package/lib/modules/control-bar/index.d.ts +30 -21
  359. package/lib/modules/control-bar/index.js +46 -36
  360. package/lib/modules/control-bar/store.d.ts +36 -37
  361. package/lib/modules/control-bar/store.js +188 -280
  362. package/lib/modules/control-bar/types.d.ts +20 -0
  363. package/lib/modules/control-bar/types.js +6 -0
  364. package/lib/modules/control-bar/view.js +83 -42
  365. package/lib/modules/device-pretest/index.js +4 -4
  366. package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
  367. package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
  368. package/lib/modules/device-pretest/store.d.ts +8 -9
  369. package/lib/modules/device-pretest/store.js +52 -36
  370. package/lib/modules/dialog/components/Interpreter/electron.js +22 -38
  371. package/lib/modules/dialog/components/Interpreter/index.js +14 -43
  372. package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
  373. package/lib/modules/dialog/components/chat/electron.js +21 -19
  374. package/lib/modules/dialog/components/chat/index.d.ts +1 -4
  375. package/lib/modules/dialog/components/chat/index.js +35 -41
  376. package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
  377. package/lib/modules/dialog/components/confirm/electron.js +68 -38
  378. package/lib/modules/dialog/components/confirm/index.js +7 -8
  379. package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
  380. package/lib/modules/dialog/components/connection-gateway/electron.js +13 -34
  381. package/lib/modules/dialog/components/connection-gateway/index.css +2 -0
  382. package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -2
  383. package/lib/modules/dialog/components/connection-gateway/index.js +26 -58
  384. package/lib/modules/dialog/components/connection-gateway/tabs.d.ts +6 -0
  385. package/lib/modules/dialog/components/connection-gateway/tabs.js +44 -0
  386. package/lib/modules/dialog/components/control-bar/index.d.ts +5 -1
  387. package/lib/modules/dialog/components/control-bar/index.js +123 -11
  388. package/lib/modules/dialog/components/device-setting/electron.js +7 -25
  389. package/lib/modules/dialog/components/device-setting/index.js +13 -41
  390. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +7 -0
  391. package/lib/modules/dialog/components/dialog-container/component/body.js +77 -0
  392. package/lib/modules/dialog/components/dialog-container/index.css +81 -0
  393. package/lib/modules/dialog/components/dialog-container/index.d.ts +16 -0
  394. package/lib/modules/dialog/components/dialog-container/index.js +112 -0
  395. package/lib/modules/dialog/components/invite/index.js +44 -38
  396. package/lib/modules/dialog/components/live-streaming/index.js +23 -54
  397. package/lib/modules/dialog/components/participant/electron.js +12 -19
  398. package/lib/modules/dialog/components/participant/index.js +37 -27
  399. package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +3 -6
  400. package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
  401. package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +4 -14
  402. package/lib/modules/dialog/components/share-screen-selection/index.js +26 -7
  403. package/lib/modules/dialog/components/system-preference/electron.js +6 -9
  404. package/lib/modules/dialog/components/system-preference/index.js +4 -15
  405. package/lib/modules/dialog/components/toast/index.js +9 -13
  406. package/lib/modules/dialog/components/video-window/index.d.ts +2 -0
  407. package/lib/modules/dialog/components/video-window/index.js +148 -0
  408. package/lib/modules/dialog/components/whiteboard/index.js +2 -2
  409. package/lib/modules/dialog/dialogs.d.ts +2 -5
  410. package/lib/modules/dialog/dialogs.js +2 -156
  411. package/lib/modules/dialog/hooks/useElectron.d.ts +4 -20
  412. package/lib/modules/dialog/hooks/useElectron.js +127 -29
  413. package/lib/modules/dialog/index.css +0 -2
  414. package/lib/modules/dialog/index.d.ts +28 -17
  415. package/lib/modules/dialog/index.js +62 -6
  416. package/lib/modules/dialog/store.d.ts +43 -41
  417. package/lib/modules/dialog/store.js +158 -201
  418. package/lib/modules/dialog/types/index.d.ts +70 -0
  419. package/lib/modules/event-confirm/index.css +1 -1
  420. package/lib/modules/event-confirm/index.d.ts +13 -6
  421. package/lib/modules/event-confirm/index.js +28 -11
  422. package/lib/modules/event-confirm/store.d.ts +9 -3
  423. package/lib/modules/event-confirm/store.js +16 -7
  424. package/lib/modules/event-confirm/view.js +9 -2
  425. package/lib/modules/event-toast/index.d.ts +7 -6
  426. package/lib/modules/event-toast/index.js +19 -8
  427. package/lib/modules/event-toast/store.d.ts +8 -3
  428. package/lib/modules/event-toast/store.js +15 -6
  429. package/lib/modules/invite/components/error-tips.d.ts +4 -0
  430. package/lib/modules/invite/components/error-tips.js +18 -0
  431. package/lib/modules/invite/components/pstn-invite.d.ts +2 -0
  432. package/lib/modules/invite/components/pstn-invite.js +297 -0
  433. package/lib/modules/invite/components/voip-invite.d.ts +1 -0
  434. package/lib/modules/invite/components/voip-invite.js +276 -0
  435. package/lib/modules/invite/enums.d.ts +22 -0
  436. package/lib/modules/invite/enums.js +33 -0
  437. package/lib/modules/invite/index.d.ts +7 -8
  438. package/lib/modules/invite/index.js +17 -15
  439. package/lib/modules/invite/pstn-invite.js +9 -7
  440. package/lib/modules/invite/store.d.ts +11 -26
  441. package/lib/modules/invite/store.js +55 -25
  442. package/lib/modules/invite/types.d.ts +14 -0
  443. package/lib/modules/invite/types.js +6 -0
  444. package/lib/modules/invite/view.js +19 -27
  445. package/lib/modules/invite/voip-invite.js +3 -2
  446. package/lib/modules/layout/components/Aside.js +45 -18
  447. package/lib/modules/layout/components/Carousel.js +2 -2
  448. package/lib/modules/layout/components/Gallery.js +1 -1
  449. package/lib/modules/layout/components/Layout.js +7 -4
  450. package/lib/modules/layout/components/index.css +6 -1
  451. package/lib/modules/layout/components/index.d.ts +1 -1
  452. package/lib/modules/layout/components/index.js +4 -4
  453. package/lib/modules/layout/components/who-is-speaking.d.ts +2 -0
  454. package/lib/modules/layout/components/who-is-speaking.js +60 -0
  455. package/lib/modules/layout/index.d.ts +26 -4
  456. package/lib/modules/layout/index.dev.d.ts +0 -1
  457. package/lib/modules/layout/index.dev.js +312 -386
  458. package/lib/modules/layout/index.js +33 -17
  459. package/lib/modules/layout/member-window/index.css +10 -95
  460. package/lib/modules/layout/member-window/index.d.ts +3 -10
  461. package/lib/modules/layout/member-window/index.js +115 -214
  462. package/lib/modules/layout/store.d.ts +61 -71
  463. package/lib/modules/layout/store.js +311 -579
  464. package/lib/modules/layout/video-window-datasource.js +11 -3
  465. package/lib/modules/layout/view.d.ts +2 -0
  466. package/lib/modules/layout/view.js +127 -2
  467. package/lib/modules/live-streaming/index.d.ts +15 -7
  468. package/lib/modules/live-streaming/index.dev.js +13 -13
  469. package/lib/modules/live-streaming/index.js +20 -15
  470. package/lib/modules/live-streaming/store.d.ts +21 -14
  471. package/lib/modules/live-streaming/store.js +84 -144
  472. package/lib/modules/live-streaming/view.js +2 -2
  473. package/lib/modules/notification/index.css +1 -0
  474. package/lib/modules/notification/index.d.ts +9 -11
  475. package/lib/modules/notification/index.js +21 -14
  476. package/lib/modules/notification/interpreter-status/index.js +1 -2
  477. package/lib/modules/notification/store.d.ts +5 -11
  478. package/lib/modules/notification/store.js +12 -62
  479. package/lib/modules/notification/view.d.ts +5 -3
  480. package/lib/modules/notification/view.js +8 -5
  481. package/lib/modules/offscreen-pulling/index.js +1 -1
  482. package/lib/modules/participant/attendee/index.css +52 -0
  483. package/lib/modules/participant/attendee/index.d.ts +5 -8
  484. package/lib/modules/participant/attendee/index.js +17 -62
  485. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +6 -0
  486. package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +28 -0
  487. package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +7 -0
  488. package/lib/modules/participant/components/attendee/components/user-avatar/index.js +39 -0
  489. package/lib/modules/participant/components/attendee/index.css +69 -0
  490. package/lib/modules/participant/components/attendee/index.d.ts +4 -0
  491. package/lib/modules/participant/components/attendee/index.js +337 -0
  492. package/lib/modules/participant/components/can-moveable/index.d.ts +1 -0
  493. package/lib/modules/participant/components/can-moveable/index.js +68 -0
  494. package/lib/modules/participant/components/drop-menu/index.css +1 -0
  495. package/lib/modules/participant/components/drop-menu/index.js +17 -17
  496. package/lib/modules/participant/components/footer/buttons.d.ts +2 -3
  497. package/lib/modules/participant/components/footer/buttons.js +2 -3
  498. package/lib/modules/participant/components/footer/index.js +2 -2
  499. package/lib/modules/participant/components/mute-all/index.d.ts +3 -4
  500. package/lib/modules/participant/components/mute-all/index.js +31 -44
  501. package/lib/modules/participant/components/operate-waitingroom-member/index.d.ts +2 -0
  502. package/lib/modules/participant/components/operate-waitingroom-member/index.js +48 -0
  503. package/lib/modules/participant/components/participants/index.js +27 -50
  504. package/lib/modules/participant/components/user-action/index.d.ts +17 -0
  505. package/lib/modules/participant/components/user-action/index.js +169 -0
  506. package/lib/modules/participant/index.css +5 -0
  507. package/lib/modules/participant/index.d.ts +34 -22
  508. package/lib/modules/participant/index.dev.d.ts +0 -1
  509. package/lib/modules/participant/index.dev.js +87 -105
  510. package/lib/modules/participant/index.js +39 -13
  511. package/lib/modules/participant/member-list-data-source.d.ts +4 -1
  512. package/lib/modules/participant/member-list-data-source.js +58 -31
  513. package/lib/modules/participant/room-control-drop-menu/index.css +0 -37
  514. package/lib/modules/participant/store.d.ts +59 -39
  515. package/lib/modules/participant/store.js +330 -307
  516. package/lib/modules/participant/type.d.ts +45 -1
  517. package/lib/modules/participant/type.js +15 -1
  518. package/lib/modules/pc-audio-connect/index.css +12 -0
  519. package/lib/modules/pc-audio-connect/index.d.ts +22 -0
  520. package/lib/modules/pc-audio-connect/index.js +68 -0
  521. package/lib/modules/pc-audio-connect/store.d.ts +46 -0
  522. package/lib/modules/pc-audio-connect/store.js +301 -0
  523. package/lib/modules/pc-audio-connect/types.d.ts +0 -0
  524. package/lib/modules/pc-audio-connect/types.js +1 -0
  525. package/lib/modules/pc-audio-connect/view.d.ts +3 -0
  526. package/lib/modules/pc-audio-connect/view.js +66 -0
  527. package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -0
  528. package/lib/modules/phone-audio-connect/components/callinfo/index.d.ts +10 -0
  529. package/lib/modules/phone-audio-connect/components/callinfo/index.js +77 -0
  530. package/lib/modules/phone-audio-connect/components/calling/index.css +72 -0
  531. package/lib/modules/phone-audio-connect/components/calling/index.d.ts +7 -0
  532. package/lib/modules/phone-audio-connect/components/calling/index.js +58 -0
  533. package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -0
  534. package/lib/modules/phone-audio-connect/components/remeber/index.d.ts +5 -0
  535. package/lib/modules/phone-audio-connect/components/remeber/index.js +24 -0
  536. package/lib/modules/phone-audio-connect/components/useing/index.css +46 -0
  537. package/lib/modules/phone-audio-connect/components/useing/index.d.ts +3 -0
  538. package/lib/modules/phone-audio-connect/components/useing/index.js +36 -0
  539. package/lib/modules/phone-audio-connect/enums.d.ts +4 -0
  540. package/lib/modules/phone-audio-connect/enums.js +12 -0
  541. package/lib/modules/phone-audio-connect/index.css +56 -0
  542. package/lib/modules/phone-audio-connect/index.d.ts +16 -0
  543. package/lib/modules/phone-audio-connect/index.js +63 -0
  544. package/lib/modules/phone-audio-connect/store.d.ts +46 -0
  545. package/lib/modules/phone-audio-connect/store.js +320 -0
  546. package/lib/modules/phone-audio-connect/types.d.ts +4 -0
  547. package/lib/modules/phone-audio-connect/types.js +6 -0
  548. package/lib/modules/phone-audio-connect/view.d.ts +3 -0
  549. package/lib/modules/phone-audio-connect/view.js +184 -0
  550. package/lib/modules/setting/audio-settings/audio-settings.js +18 -15
  551. package/lib/modules/setting/audio-settings/index.css +26 -1
  552. package/lib/modules/setting/general-settings/index.css +1 -1
  553. package/lib/modules/setting/index.css +2 -1
  554. package/lib/modules/setting/index.d.ts +25 -18
  555. package/lib/modules/setting/index.dev.d.ts +0 -1
  556. package/lib/modules/setting/index.dev.js +120 -72
  557. package/lib/modules/setting/index.js +35 -9
  558. package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
  559. package/lib/modules/setting/state/index.js +3 -3
  560. package/lib/modules/setting/store.d.ts +45 -24
  561. package/lib/modules/setting/store.js +143 -124
  562. package/lib/modules/setting/translate-settings/index.css +3 -1
  563. package/lib/modules/setting/translate-settings/translate-settings.js +3 -3
  564. package/lib/modules/setting/video-settings/index.css +5 -2
  565. package/lib/modules/setting/video-settings/video-settings-basic.js +19 -22
  566. package/lib/modules/setting/view.js +6 -35
  567. package/lib/modules/share-screen/components/selection/index.css +70 -0
  568. package/lib/modules/share-screen/components/selection/index.d.ts +2 -0
  569. package/lib/modules/share-screen/components/selection/index.js +267 -0
  570. package/lib/modules/share-screen/components/share-state-bar/index.css +76 -0
  571. package/lib/modules/share-screen/components/share-state-bar/index.d.ts +4 -0
  572. package/lib/modules/share-screen/components/share-state-bar/index.js +98 -0
  573. package/lib/modules/share-screen/index.d.ts +15 -18
  574. package/lib/modules/share-screen/index.dev.d.ts +0 -1
  575. package/lib/modules/share-screen/index.dev.js +90 -90
  576. package/lib/modules/share-screen/index.js +22 -22
  577. package/lib/modules/share-screen/selection/index.css +0 -2
  578. package/lib/modules/share-screen/selection/index.js +40 -51
  579. package/lib/modules/share-screen/share-state-bar/index.js +1 -1
  580. package/lib/modules/share-screen/store.d.ts +36 -32
  581. package/lib/modules/share-screen/store.js +264 -253
  582. package/lib/modules/share-screen/types.d.ts +27 -0
  583. package/lib/modules/share-screen/types.js +6 -0
  584. package/lib/modules/share-screen/view.js +1 -1
  585. package/lib/modules/sound-effect/index.d.ts +9 -15
  586. package/lib/modules/sound-effect/index.js +72 -41
  587. package/lib/modules/sound-effect/sound-effect-player.js +1 -1
  588. package/lib/modules/state-bar/index.css +13 -2
  589. package/lib/modules/state-bar/index.d.ts +16 -17
  590. package/lib/modules/state-bar/index.dev.d.ts +0 -1
  591. package/lib/modules/state-bar/index.dev.js +78 -83
  592. package/lib/modules/state-bar/index.js +23 -34
  593. package/lib/modules/state-bar/layout-config.js +1 -1
  594. package/lib/modules/state-bar/meeting-details.js +24 -12
  595. package/lib/modules/state-bar/meeting-network-state.css +1 -1
  596. package/lib/modules/state-bar/meeting-network-state.js +1 -1
  597. package/lib/modules/state-bar/recording.js +7 -4
  598. package/lib/modules/state-bar/store.d.ts +20 -10
  599. package/lib/modules/state-bar/store.js +84 -87
  600. package/lib/modules/state-bar/view.js +3 -3
  601. package/lib/modules/video-window/deviceState/index.d.ts +2 -2
  602. package/lib/modules/video-window/deviceState/index.js +4 -6
  603. package/lib/modules/video-window/index.css +1 -4
  604. package/lib/modules/video-window/index.d.ts +33 -6
  605. package/lib/modules/video-window/index.js +63 -15
  606. package/lib/modules/video-window/members/index.css +1 -0
  607. package/lib/modules/video-window/members/index.js +25 -11
  608. package/lib/modules/video-window/store.d.ts +58 -26
  609. package/lib/modules/video-window/store.js +166 -161
  610. package/lib/modules/waiting-room-layout/index.css +1 -3
  611. package/lib/modules/waiting-room-layout/index.d.ts +14 -5
  612. package/lib/modules/waiting-room-layout/index.js +34 -14
  613. package/lib/modules/waiting-room-layout/store.d.ts +6 -3
  614. package/lib/modules/waiting-room-layout/store.js +17 -15
  615. package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -4
  616. package/lib/modules/whiteboard/components/control-bar/store.js +8 -8
  617. package/lib/modules/whiteboard/index.d.ts +20 -25
  618. package/lib/modules/whiteboard/index.js +250 -224
  619. package/lib/modules/whiteboard/view.d.ts +2 -0
  620. package/lib/modules/whiteboard/view.js +49 -0
  621. package/lib/plugins/browser-runtime-plugin.js +5 -1
  622. package/lib/providers/chat-provider.d.ts +71 -0
  623. package/lib/providers/chat-provider.js +91 -0
  624. package/lib/providers/device-privilege-provider.d.ts +76 -0
  625. package/lib/providers/device-privilege-provider.js +415 -0
  626. package/lib/providers/device-provider.d.ts +404 -0
  627. package/lib/providers/device-provider.js +1829 -0
  628. package/lib/providers/device-stream-provider.d.ts +35 -0
  629. package/lib/providers/device-stream-provider.js +353 -0
  630. package/lib/providers/dialog-provider.d.ts +135 -0
  631. package/lib/providers/dialog-provider.js +204 -0
  632. package/lib/providers/event-provider.d.ts +88 -0
  633. package/lib/providers/event-provider.js +250 -0
  634. package/lib/providers/interpreter-provider.d.ts +236 -0
  635. package/lib/providers/interpreter-provider.js +1143 -0
  636. package/lib/providers/local-storage-provider.d.ts +17 -0
  637. package/lib/providers/local-storage-provider.js +31 -0
  638. package/lib/providers/message-provider.d.ts +69 -0
  639. package/lib/providers/message-provider.js +98 -0
  640. package/lib/providers/monitor-provider.d.ts +20 -0
  641. package/lib/providers/monitor-provider.js +29 -0
  642. package/lib/providers/phone-audio-provider.d.ts +131 -0
  643. package/lib/providers/phone-audio-provider.js +515 -0
  644. package/lib/providers/privilege-provider.d.ts +529 -0
  645. package/lib/providers/privilege-provider.js +782 -0
  646. package/lib/providers/renderer-provider.d.ts +85 -0
  647. package/lib/providers/renderer-provider.js +242 -0
  648. package/lib/providers/room-provider.d.ts +186 -0
  649. package/lib/providers/room-provider.js +1019 -0
  650. package/lib/providers/screen-share-provider.d.ts +65 -0
  651. package/lib/providers/screen-share-provider.js +238 -0
  652. package/lib/providers/session-provider.d.ts +56 -0
  653. package/lib/providers/session-provider.js +49 -0
  654. package/lib/runtime.d.ts +3 -1
  655. package/lib/scenes/base.d.ts +10 -0
  656. package/lib/scenes/base.js +75 -0
  657. package/lib/scenes/main-scene.d.ts +86 -0
  658. package/lib/scenes/main-scene.js +551 -0
  659. package/lib/scenes/waiting-scene.d.ts +61 -0
  660. package/lib/scenes/waiting-scene.js +236 -0
  661. package/lib/shared-data-source/chat-data.d.ts +14 -0
  662. package/lib/shared-data-source/chat-data.js +130 -0
  663. package/lib/shared-data-source/config.d.ts +16 -0
  664. package/lib/shared-data-source/config.js +21 -0
  665. package/lib/shared-data-source/device-privilege-data.d.ts +8 -0
  666. package/lib/shared-data-source/device-privilege-data.js +25 -0
  667. package/lib/shared-data-source/interpreter.d.ts +63 -0
  668. package/lib/shared-data-source/interpreter.js +248 -0
  669. package/lib/shared-data-source/layout-data.d.ts +29 -0
  670. package/lib/shared-data-source/layout-data.js +181 -0
  671. package/lib/shared-data-source/pin-data.d.ts +9 -0
  672. package/lib/shared-data-source/pin-data.js +24 -0
  673. package/lib/shared-data-source/setting.d.ts +32 -0
  674. package/lib/shared-data-source/setting.js +153 -0
  675. package/lib/shared-data-source/speaker-spotlight.d.ts +5 -0
  676. package/lib/shared-data-source/speaker-spotlight.js +15 -0
  677. package/lib/shared-data-source/video-window.d.ts +161 -0
  678. package/lib/shared-data-source/video-window.js +1202 -0
  679. package/lib/shared-data-source/waiting-room.d.ts +19 -0
  680. package/lib/shared-data-source/waiting-room.js +158 -0
  681. package/lib/translations/enUS.d.ts +43 -17
  682. package/lib/translations/enUS.js +59 -33
  683. package/lib/translations/zhCN.d.ts +43 -17
  684. package/lib/translations/zhCN.js +57 -31
  685. package/lib/type.d.ts +271 -1
  686. package/lib/type.js +67 -2
  687. package/lib/ui-manager.d.ts +20 -13
  688. package/lib/ui-manager.js +59 -874
  689. package/lib/ui-node.d.ts +25 -0
  690. package/lib/ui-node.js +156 -0
  691. package/lib/ui-scene.d.ts +6 -1
  692. package/lib/ui-scene.js +372 -42
  693. package/lib/utilities/constant.d.ts +63 -86
  694. package/lib/utilities/constant.js +151 -175
  695. package/lib/utilities/copyText.js +8 -7
  696. package/lib/utilities/extract.d.ts +1 -1
  697. package/lib/utilities/privilege.d.ts +4 -0
  698. package/lib/utilities/privilege.js +31 -0
  699. package/lib/utilities/setting-config-storage.d.ts +12 -0
  700. package/lib/utilities/setting-config-storage.js +102 -0
  701. package/lib/utilities/tools.d.ts +37 -3
  702. package/lib/utilities/tools.js +144 -10
  703. package/lib/utilities/video-track-render-context.d.ts +3 -4
  704. package/lib/utilities/video-track-render-context.js +1 -1
  705. package/package.json +12 -11
  706. package/public/assets/fcr_leave2.svg +58 -0
  707. package/public/assets/full-screen-error-boundary-img.png +0 -0
  708. package/public/assets/leave-meeting.png +0 -0
  709. package/public/index.html +160 -13
@@ -0,0 +1,1829 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.js");
4
+ require("core-js/modules/es.symbol.description.js");
5
+ require("core-js/modules/es.symbol.to-primitive.js");
6
+ require("core-js/modules/es.error.cause.js");
7
+ require("core-js/modules/es.error.to-string.js");
8
+ require("core-js/modules/es.array.is-array.js");
9
+ require("core-js/modules/es.date.to-primitive.js");
10
+ require("core-js/modules/es.function.bind.js");
11
+ require("core-js/modules/es.number.constructor.js");
12
+ require("core-js/modules/es.object.create.js");
13
+ require("core-js/modules/es.object.define-property.js");
14
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
15
+ require("core-js/modules/esnext.function.metadata.js");
16
+ require("core-js/modules/esnext.symbol.metadata.js");
17
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
18
+ var _typeof = require("@babel/runtime/helpers/typeof");
19
+ Object.defineProperty(exports, "__esModule", {
20
+ value: true
21
+ });
22
+ exports.FcrUIDeviceProviderImpl = exports.DEFAULT_DEVICE_ID = void 0;
23
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
24
+ require("core-js/modules/es.array.concat.js");
25
+ require("core-js/modules/es.array.filter.js");
26
+ require("core-js/modules/es.array.find.js");
27
+ require("core-js/modules/es.array.for-each.js");
28
+ require("core-js/modules/es.array.iterator.js");
29
+ require("core-js/modules/es.array.map.js");
30
+ require("core-js/modules/es.array.push.js");
31
+ require("core-js/modules/es.array.some.js");
32
+ require("core-js/modules/es.array.sort.js");
33
+ require("core-js/modules/es.array.unshift.js");
34
+ require("core-js/modules/es.function.name.js");
35
+ require("core-js/modules/es.map.js");
36
+ require("core-js/modules/es.object.assign.js");
37
+ require("core-js/modules/es.object.to-string.js");
38
+ require("core-js/modules/es.promise.js");
39
+ require("core-js/modules/es.promise.all-settled.js");
40
+ require("core-js/modules/es.regexp.exec.js");
41
+ require("core-js/modules/es.set.js");
42
+ require("core-js/modules/es.string.iterator.js");
43
+ require("core-js/modules/es.weak-map.js");
44
+ require("core-js/modules/esnext.async-iterator.filter.js");
45
+ require("core-js/modules/esnext.async-iterator.find.js");
46
+ require("core-js/modules/esnext.async-iterator.for-each.js");
47
+ require("core-js/modules/esnext.async-iterator.map.js");
48
+ require("core-js/modules/esnext.async-iterator.some.js");
49
+ require("core-js/modules/esnext.iterator.constructor.js");
50
+ require("core-js/modules/esnext.iterator.filter.js");
51
+ require("core-js/modules/esnext.iterator.find.js");
52
+ require("core-js/modules/esnext.iterator.for-each.js");
53
+ require("core-js/modules/esnext.iterator.map.js");
54
+ require("core-js/modules/esnext.iterator.some.js");
55
+ require("core-js/modules/esnext.map.delete-all.js");
56
+ require("core-js/modules/esnext.map.emplace.js");
57
+ require("core-js/modules/esnext.map.every.js");
58
+ require("core-js/modules/esnext.map.filter.js");
59
+ require("core-js/modules/esnext.map.find.js");
60
+ require("core-js/modules/esnext.map.find-key.js");
61
+ require("core-js/modules/esnext.map.includes.js");
62
+ require("core-js/modules/esnext.map.key-of.js");
63
+ require("core-js/modules/esnext.map.map-keys.js");
64
+ require("core-js/modules/esnext.map.map-values.js");
65
+ require("core-js/modules/esnext.map.merge.js");
66
+ require("core-js/modules/esnext.map.reduce.js");
67
+ require("core-js/modules/esnext.map.some.js");
68
+ require("core-js/modules/esnext.map.update.js");
69
+ require("core-js/modules/esnext.set.add-all.js");
70
+ require("core-js/modules/esnext.set.delete-all.js");
71
+ require("core-js/modules/esnext.set.difference.v2.js");
72
+ require("core-js/modules/esnext.set.difference.js");
73
+ require("core-js/modules/esnext.set.every.js");
74
+ require("core-js/modules/esnext.set.filter.js");
75
+ require("core-js/modules/esnext.set.find.js");
76
+ require("core-js/modules/esnext.set.intersection.v2.js");
77
+ require("core-js/modules/esnext.set.intersection.js");
78
+ require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
79
+ require("core-js/modules/esnext.set.is-disjoint-from.js");
80
+ require("core-js/modules/esnext.set.is-subset-of.v2.js");
81
+ require("core-js/modules/esnext.set.is-subset-of.js");
82
+ require("core-js/modules/esnext.set.is-superset-of.v2.js");
83
+ require("core-js/modules/esnext.set.is-superset-of.js");
84
+ require("core-js/modules/esnext.set.join.js");
85
+ require("core-js/modules/esnext.set.map.js");
86
+ require("core-js/modules/esnext.set.reduce.js");
87
+ require("core-js/modules/esnext.set.some.js");
88
+ require("core-js/modules/esnext.set.symmetric-difference.v2.js");
89
+ require("core-js/modules/esnext.set.symmetric-difference.js");
90
+ require("core-js/modules/esnext.set.union.v2.js");
91
+ require("core-js/modules/esnext.set.union.js");
92
+ require("core-js/modules/esnext.weak-map.delete-all.js");
93
+ require("core-js/modules/esnext.weak-map.emplace.js");
94
+ require("core-js/modules/web.dom-collections.for-each.js");
95
+ require("core-js/modules/web.dom-collections.iterator.js");
96
+ require("core-js/modules/web.timers.js");
97
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
98
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
99
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
100
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
101
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
102
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
103
+ var _imports = require("fcr-core/lib/imports");
104
+ var _base = require("../base");
105
+ var _env = require("agora-foundation/lib/utilities/env");
106
+ var _fcrCore = require("fcr-core");
107
+ var _type = require("agora-rte-sdk/lib/core/rtc/type");
108
+ var _localVideoPlayer = require("agora-ui-foundation/lib/components/local-video-player");
109
+ var _i18n = require("agora-ui-foundation/lib/i18n");
110
+ var _mobx = require("mobx");
111
+ var _virtualBackdoundResources = require("../modules/device-pretest/assets/virtual-backdound-resources");
112
+ var _type2 = require("../type");
113
+ var _tools = require("../utilities/tools");
114
+ var _FcrUIDeviceProviderImpl;
115
+ var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _downloadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
116
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
117
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
118
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
119
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
120
+ 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"); }
121
+ 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)]; } }; }
122
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
123
+ 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); }
124
+ 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; }
125
+ 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; }
126
+ // device id for default device (follow system)
127
+ var DEFAULT_DEVICE_ID = exports.DEFAULT_DEVICE_ID = 'default';
128
+ var _A = /*#__PURE__*/new WeakMap();
129
+ var _B = /*#__PURE__*/new WeakMap();
130
+ var _C = /*#__PURE__*/new WeakMap();
131
+ var _D = /*#__PURE__*/new WeakMap();
132
+ var _E = /*#__PURE__*/new WeakMap();
133
+ var _F = /*#__PURE__*/new WeakMap();
134
+ var _G = /*#__PURE__*/new WeakMap();
135
+ var _H = /*#__PURE__*/new WeakMap();
136
+ var _I = /*#__PURE__*/new WeakMap();
137
+ var _J = /*#__PURE__*/new WeakMap();
138
+ var _K = /*#__PURE__*/new WeakMap();
139
+ var _L = /*#__PURE__*/new WeakMap();
140
+ var _M = /*#__PURE__*/new WeakMap();
141
+ var _N = /*#__PURE__*/new WeakMap();
142
+ var _O = /*#__PURE__*/new WeakMap();
143
+ var _P = /*#__PURE__*/new WeakMap();
144
+ var _Q = /*#__PURE__*/new WeakMap();
145
+ var _R = /*#__PURE__*/new WeakMap();
146
+ var _S = /*#__PURE__*/new WeakMap();
147
+ var _T = /*#__PURE__*/new WeakMap();
148
+ var _U = /*#__PURE__*/new WeakMap();
149
+ var _V = /*#__PURE__*/new WeakMap();
150
+ var _W = /*#__PURE__*/new WeakMap();
151
+ var _X = /*#__PURE__*/new WeakMap();
152
+ var _Y = /*#__PURE__*/new WeakMap();
153
+ var _Z = /*#__PURE__*/new WeakMap();
154
+ var _a = /*#__PURE__*/new WeakMap();
155
+ var _b = /*#__PURE__*/new WeakMap();
156
+ var _c = /*#__PURE__*/new WeakMap();
157
+ _ref = (_startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _startSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _stopSpeakerTestDecs = [_mobx.action, _mobx.action.bound], _setCurrentIsMirrorDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorPreviewDecs = [_mobx.action, _mobx.action.bound], _setBeautyOptionsDecs = [_mobx.action, _mobx.action.bound], _handleCancelForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _handleForceOpenVideoEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraEnabledDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _startMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _stopMicrophoneTestDecs = [_mobx.action, _mobx.action.bound], _enableVirtualBackgroundDecs = [_mobx.action, _mobx.action.bound], _setEditBeautyKeyDecs = [_mobx.action, _mobx.action.bound], _enableBeautyEffectDecs = [_mobx.action, _mobx.action.bound], _setCameraIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerIdDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneIdDecs = [_mobx.action, _mobx.action.bound], _setSpeakerVolumeDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneVolumeDecs = [_mobx.action, _mobx.action.bound], _downloadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerAddedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerRemovedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
158
+ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
159
+ function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig) {
160
+ var _this = this;
161
+ (0, _classCallCheck2["default"])(this, FcrUIDeviceProviderImpl);
162
+ (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _imports.getLogger)()));
163
+ (0, _defineProperty2["default"])(this, "_observable", new _imports.AgoraObservable());
164
+ (0, _defineProperty2["default"])(this, "_listeners", []);
165
+ (0, _defineProperty2["default"])(this, "_hasExecutedOpenCamera", false);
166
+ (0, _defineProperty2["default"])(this, "_hasExecutedConnectAudio", false);
167
+ (0, _defineProperty2["default"])(this, "_isAudioConnected", false);
168
+ (0, _defineProperty2["default"])(this, "_localVideoViewSet", new Set());
169
+ (0, _defineProperty2["default"])(this, "_videoRotation", _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0);
170
+ // 强制开启美颜
171
+ (0, _defineProperty2["default"])(this, "_isForceEnableBeauty", false);
172
+ // 强制开启虚拟背景
173
+ (0, _defineProperty2["default"])(this, "_isForceEnableVirtualBackground", false);
174
+ // 上次操作特效的类型
175
+ (0, _defineProperty2["default"])(this, "_lastEnableVideoEffectType", _type2.FcrUIVideoEffectType.NONE);
176
+ // microphone observer
177
+ (0, _defineProperty2["default"])(this, "_microphoneObserver", {
178
+ onVolumeIndicationUpdated: this._handleMicrophoneVolumeIndicationUpdated
179
+ });
180
+ (0, _defineProperty2["default"])(this, "_defaultMirror", true);
181
+ (0, _defineProperty2["default"])(this, "_volumeIndicationInterval", 200);
182
+ // real microphone device id
183
+ _classPrivateFieldInitSpec(this, _A, _init__microphoneDeviceId(this, ''));
184
+ // real speaker device id
185
+ _classPrivateFieldInitSpec(this, _B, _init__speakerDeviceId(this, ''));
186
+ // 是否开启镜像
187
+ _classPrivateFieldInitSpec(this, _C, _init_currentIsMirror(this, false));
188
+ // 是否展示展示强制开启特效弹窗
189
+ _classPrivateFieldInitSpec(this, _D, _init_showForceOpenEffectDialog(this, false));
190
+ // selected camera id, it is the real device id
191
+ _classPrivateFieldInitSpec(this, _E, _init_cameraId(this, ''));
192
+ // selected microphone id, for ui display, could be 'default' or real device id
193
+ _classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, 'default'));
194
+ // selected speaker id, for ui display, could be 'default' or real device id
195
+ _classPrivateFieldInitSpec(this, _G, _init_speakerId(this, 'default'));
196
+ _classPrivateFieldInitSpec(this, _H, _init_cameraEnabled(this, false));
197
+ _classPrivateFieldInitSpec(this, _I, _init_showCameraPreview(this, false));
198
+ _classPrivateFieldInitSpec(this, _J, _init_microphoneEnabled(this, false));
199
+ _classPrivateFieldInitSpec(this, _K, _init_cameraList(this, []));
200
+ _classPrivateFieldInitSpec(this, _L, _init_microphoneList(this, []));
201
+ _classPrivateFieldInitSpec(this, _M, _init_microphoneVolumeLevel(this, 0));
202
+ _classPrivateFieldInitSpec(this, _N, _init_speakerList(this, []));
203
+ _classPrivateFieldInitSpec(this, _O, _init_isLocalMirrorEnabled(this, false));
204
+ _classPrivateFieldInitSpec(this, _P, _init_isLocalEditBeautyOptions(this, false));
205
+ _classPrivateFieldInitSpec(this, _Q, _init_speakerVolumeLevel(this, 0));
206
+ _classPrivateFieldInitSpec(this, _R, _init_speakerVolume(this, 0));
207
+ _classPrivateFieldInitSpec(this, _S, _init_microphoneVolume(this, 100));
208
+ _classPrivateFieldInitSpec(this, _T, _init_virtualBackgroundName(this, 'None'));
209
+ _classPrivateFieldInitSpec(this, _U, _init_enableBeauty(this, false));
210
+ _classPrivateFieldInitSpec(this, _V, _init_beautyKey(this, 'none'));
211
+ _classPrivateFieldInitSpec(this, _W, _init_beautyOptions(this, {
212
+ lighteningContrastLevel: 0,
213
+ lighteningLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
214
+ smoothnessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
215
+ sharpnessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE,
216
+ rednessLevel: _localVideoPlayer.DEFAULT_BEAUTY_VALUE
217
+ }));
218
+ _classPrivateFieldInitSpec(this, _X, _init_virtualBackgroundList(this, []));
219
+ _classPrivateFieldInitSpec(this, _Y, _init_soundEffectList(this, new Map()));
220
+ _classPrivateFieldInitSpec(this, _Z, _init_microphoneDetecting(this, false));
221
+ _classPrivateFieldInitSpec(this, _a, _init_speakerDetecting(this, false));
222
+ _classPrivateFieldInitSpec(this, _b, _init_connectType(this, _type2.FcrUIConnectType.NONE));
223
+ _classPrivateFieldInitSpec(this, _c, _init_isMainRoomAudioOff(this, false));
224
+ this._eventProvider = _eventProvider;
225
+ this._mediaControl = _mediaControl;
226
+ this._mediaConfig = _mediaConfig;
227
+ this._listeners.push((0, _mobx.reaction)(function () {
228
+ return _this.cameraId;
229
+ }, this._handleCameraChanged));
230
+ _mediaControl.addObserver({
231
+ onCameraAdded: this._handleCameraListUpdated,
232
+ onCameraRemoved: this._handleCameraListUpdated,
233
+ onMicrophoneAdded: this._handleMicrophoneAdded,
234
+ onMicrophoneRemoved: this._handleMicrophoneRemoved,
235
+ onSpeakerAdded: this._handleSpeakerAdded,
236
+ onSpeakerRemoved: this._handleSpeakerRemoved,
237
+ onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
238
+ onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated
239
+ });
240
+ (0, _mobx.runInAction)(function () {
241
+ _this.speakerVolume = _this._mediaControl.getSelectedSpeakerVolume();
242
+ });
243
+ }
244
+ return (0, _createClass2["default"])(FcrUIDeviceProviderImpl, [{
245
+ key: "_microphoneDeviceId",
246
+ get: function get() {
247
+ return _classPrivateFieldGet(_A, this);
248
+ },
249
+ set: function set(v) {
250
+ _classPrivateFieldSet(_A, this, v);
251
+ }
252
+ }, {
253
+ key: "_speakerDeviceId",
254
+ get: function get() {
255
+ return _classPrivateFieldGet(_B, this);
256
+ },
257
+ set: function set(v) {
258
+ _classPrivateFieldSet(_B, this, v);
259
+ }
260
+ }, {
261
+ key: "currentIsMirror",
262
+ get: function get() {
263
+ return _classPrivateFieldGet(_C, this);
264
+ },
265
+ set: function set(v) {
266
+ _classPrivateFieldSet(_C, this, v);
267
+ }
268
+ }, {
269
+ key: "showForceOpenEffectDialog",
270
+ get: function get() {
271
+ return _classPrivateFieldGet(_D, this);
272
+ },
273
+ set: function set(v) {
274
+ _classPrivateFieldSet(_D, this, v);
275
+ }
276
+ }, {
277
+ key: "cameraId",
278
+ get: function get() {
279
+ return _classPrivateFieldGet(_E, this);
280
+ },
281
+ set: function set(v) {
282
+ _classPrivateFieldSet(_E, this, v);
283
+ }
284
+ }, {
285
+ key: "microphoneId",
286
+ get: function get() {
287
+ return _classPrivateFieldGet(_F, this);
288
+ },
289
+ set: function set(v) {
290
+ _classPrivateFieldSet(_F, this, v);
291
+ }
292
+ }, {
293
+ key: "speakerId",
294
+ get: function get() {
295
+ return _classPrivateFieldGet(_G, this);
296
+ },
297
+ set: function set(v) {
298
+ _classPrivateFieldSet(_G, this, v);
299
+ }
300
+ }, {
301
+ key: "cameraEnabled",
302
+ get: function get() {
303
+ return _classPrivateFieldGet(_H, this);
304
+ },
305
+ set: function set(v) {
306
+ _classPrivateFieldSet(_H, this, v);
307
+ }
308
+ }, {
309
+ key: "showCameraPreview",
310
+ get: function get() {
311
+ return _classPrivateFieldGet(_I, this);
312
+ },
313
+ set: function set(v) {
314
+ _classPrivateFieldSet(_I, this, v);
315
+ }
316
+ }, {
317
+ key: "microphoneEnabled",
318
+ get: function get() {
319
+ return _classPrivateFieldGet(_J, this);
320
+ },
321
+ set: function set(v) {
322
+ _classPrivateFieldSet(_J, this, v);
323
+ }
324
+ }, {
325
+ key: "cameraList",
326
+ get: function get() {
327
+ return _classPrivateFieldGet(_K, this);
328
+ },
329
+ set: function set(v) {
330
+ _classPrivateFieldSet(_K, this, v);
331
+ }
332
+ }, {
333
+ key: "microphoneList",
334
+ get: function get() {
335
+ return _classPrivateFieldGet(_L, this);
336
+ },
337
+ set: function set(v) {
338
+ _classPrivateFieldSet(_L, this, v);
339
+ }
340
+ }, {
341
+ key: "microphoneVolumeLevel",
342
+ get: function get() {
343
+ return _classPrivateFieldGet(_M, this);
344
+ },
345
+ set: function set(v) {
346
+ _classPrivateFieldSet(_M, this, v);
347
+ }
348
+ }, {
349
+ key: "speakerList",
350
+ get: function get() {
351
+ return _classPrivateFieldGet(_N, this);
352
+ },
353
+ set: function set(v) {
354
+ _classPrivateFieldSet(_N, this, v);
355
+ }
356
+ }, {
357
+ key: "isLocalMirrorEnabled",
358
+ get: function get() {
359
+ return _classPrivateFieldGet(_O, this);
360
+ },
361
+ set: function set(v) {
362
+ _classPrivateFieldSet(_O, this, v);
363
+ }
364
+ }, {
365
+ key: "isLocalEditBeautyOptions",
366
+ get: function get() {
367
+ return _classPrivateFieldGet(_P, this);
368
+ },
369
+ set: function set(v) {
370
+ _classPrivateFieldSet(_P, this, v);
371
+ }
372
+ }, {
373
+ key: "speakerVolumeLevel",
374
+ get: function get() {
375
+ return _classPrivateFieldGet(_Q, this);
376
+ },
377
+ set: function set(v) {
378
+ _classPrivateFieldSet(_Q, this, v);
379
+ }
380
+ }, {
381
+ key: "speakerVolume",
382
+ get: function get() {
383
+ return _classPrivateFieldGet(_R, this);
384
+ },
385
+ set: function set(v) {
386
+ _classPrivateFieldSet(_R, this, v);
387
+ }
388
+ }, {
389
+ key: "microphoneVolume",
390
+ get: function get() {
391
+ return _classPrivateFieldGet(_S, this);
392
+ },
393
+ set: function set(v) {
394
+ _classPrivateFieldSet(_S, this, v);
395
+ }
396
+ }, {
397
+ key: "virtualBackgroundName",
398
+ get: function get() {
399
+ return _classPrivateFieldGet(_T, this);
400
+ },
401
+ set: function set(v) {
402
+ _classPrivateFieldSet(_T, this, v);
403
+ }
404
+ }, {
405
+ key: "enableBeauty",
406
+ get: function get() {
407
+ return _classPrivateFieldGet(_U, this);
408
+ },
409
+ set: function set(v) {
410
+ _classPrivateFieldSet(_U, this, v);
411
+ }
412
+ }, {
413
+ key: "beautyKey",
414
+ get: function get() {
415
+ return _classPrivateFieldGet(_V, this);
416
+ },
417
+ set: function set(v) {
418
+ _classPrivateFieldSet(_V, this, v);
419
+ }
420
+ }, {
421
+ key: "beautyOptions",
422
+ get: function get() {
423
+ return _classPrivateFieldGet(_W, this);
424
+ },
425
+ set: function set(v) {
426
+ _classPrivateFieldSet(_W, this, v);
427
+ }
428
+ }, {
429
+ key: "virtualBackgroundList",
430
+ get: function get() {
431
+ return _classPrivateFieldGet(_X, this);
432
+ },
433
+ set: function set(v) {
434
+ _classPrivateFieldSet(_X, this, v);
435
+ }
436
+ }, {
437
+ key: "soundEffectList",
438
+ get: function get() {
439
+ return _classPrivateFieldGet(_Y, this);
440
+ },
441
+ set: function set(v) {
442
+ _classPrivateFieldSet(_Y, this, v);
443
+ }
444
+ }, {
445
+ key: "microphoneDetecting",
446
+ get: function get() {
447
+ return _classPrivateFieldGet(_Z, this);
448
+ },
449
+ set: function set(v) {
450
+ _classPrivateFieldSet(_Z, this, v);
451
+ }
452
+ }, {
453
+ key: "speakerDetecting",
454
+ get: function get() {
455
+ return _classPrivateFieldGet(_a, this);
456
+ },
457
+ set: function set(v) {
458
+ _classPrivateFieldSet(_a, this, v);
459
+ }
460
+ }, {
461
+ key: "connectType",
462
+ get: function get() {
463
+ return _classPrivateFieldGet(_b, this);
464
+ },
465
+ set: function set(v) {
466
+ _classPrivateFieldSet(_b, this, v);
467
+ }
468
+ }, {
469
+ key: "isMainRoomAudioOff",
470
+ get: function get() {
471
+ return _classPrivateFieldGet(_c, this);
472
+ },
473
+ set: function set(v) {
474
+ _classPrivateFieldSet(_c, this, v);
475
+ }
476
+ }, {
477
+ key: "ifAccessMicrophone",
478
+ value: function () {
479
+ var _ifAccessMicrophone = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
480
+ var hasSystemPermission;
481
+ return _regenerator["default"].wrap(function _callee$(_context) {
482
+ while (1) switch (_context.prev = _context.next) {
483
+ case 0:
484
+ hasSystemPermission = true;
485
+ if (!(0, _env.isElectron)()) {
486
+ _context.next = 5;
487
+ break;
488
+ }
489
+ _context.next = 4;
490
+ return window.runtime.checkMediaPermission('microphone');
491
+ case 4:
492
+ hasSystemPermission = _context.sent;
493
+ case 5:
494
+ return _context.abrupt("return", hasSystemPermission);
495
+ case 6:
496
+ case "end":
497
+ return _context.stop();
498
+ }
499
+ }, _callee);
500
+ }));
501
+ function ifAccessMicrophone() {
502
+ return _ifAccessMicrophone.apply(this, arguments);
503
+ }
504
+ return ifAccessMicrophone;
505
+ }()
506
+ }, {
507
+ key: "ifAccessCamera",
508
+ value: function () {
509
+ var _ifAccessCamera = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
510
+ var hasSystemPermission;
511
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
512
+ while (1) switch (_context2.prev = _context2.next) {
513
+ case 0:
514
+ hasSystemPermission = true;
515
+ if (!(0, _env.isElectron)()) {
516
+ _context2.next = 5;
517
+ break;
518
+ }
519
+ _context2.next = 4;
520
+ return window.runtime.checkMediaPermission('camera');
521
+ case 4:
522
+ hasSystemPermission = _context2.sent;
523
+ case 5:
524
+ return _context2.abrupt("return", hasSystemPermission);
525
+ case 6:
526
+ case "end":
527
+ return _context2.stop();
528
+ }
529
+ }, _callee2);
530
+ }));
531
+ function ifAccessCamera() {
532
+ return _ifAccessCamera.apply(this, arguments);
533
+ }
534
+ return ifAccessCamera;
535
+ }()
536
+ }, {
537
+ key: "ifNeedExecuteAutoConnectAudio",
538
+ value: function ifNeedExecuteAutoConnectAudio() {
539
+ return this._mediaConfig.autoConnectAudio && !this._hasExecutedConnectAudio;
540
+ }
541
+ }, {
542
+ key: "ifNeedExecuteConnectAudioOption",
543
+ value: function ifNeedExecuteConnectAudioOption() {
544
+ return !this._mediaConfig.autoConnectAudio && !this._hasExecutedConnectAudio;
545
+ }
546
+ }, {
547
+ key: "ifNeedExecuteOpenCamera",
548
+ value: function ifNeedExecuteOpenCamera() {
549
+ return !this._hasExecutedOpenCamera && !this._mediaConfig.cameraExpectedOff;
550
+ }
551
+ }, {
552
+ key: "connectAudio",
553
+ value: function connectAudio(includeMicrophone) {
554
+ if (includeMicrophone) {
555
+ var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._mediaConfig.microphoneExpectedOff;
556
+ if (!dontNeedOpenMicrophone) {
557
+ this.setMicrophoneEnabled(true);
558
+ }
559
+ }
560
+ if (this.microphoneList.length > 0) {
561
+ this._eventProvider.showToast({
562
+ type: 'normal',
563
+ message: (0, _i18n.transI18n)('fmt_gateway_tips_nodata')
564
+ });
565
+ } else {
566
+ this._eventProvider.showToast({
567
+ type: 'normal',
568
+ message: (0, _i18n.transI18n)('fmt_toolbar_label_nodevice')
569
+ });
570
+ }
571
+ this._hasExecutedConnectAudio = true;
572
+ // this._mediaControl.adjustOutputVolume(100);
573
+
574
+ this._isAudioConnected = true;
575
+ this.setConnectType(_type2.FcrUIConnectType.COMPUTER);
576
+ this._observable.notifyObservers('onAudioConnected');
577
+ }
578
+ }, {
579
+ key: "disconnectAudio",
580
+ value: function disconnectAudio() {
581
+ this._hasExecutedConnectAudio = true;
582
+ this._isAudioConnected = false;
583
+ this.setMicrophoneEnabled(false);
584
+ // this._mediaControl.adjustOutputVolume(0);
585
+ this.setConnectType(_type2.FcrUIConnectType.NONE);
586
+ this._observable.notifyObservers('onAudioDisconnected');
587
+ }
588
+ }, {
589
+ key: "defaultMirror",
590
+ get: function get() {
591
+ return this._defaultMirror;
592
+ }
593
+ }, {
594
+ key: "followSystemMicrophoneDevice",
595
+ get: function get() {
596
+ return this.microphoneId === DEFAULT_DEVICE_ID;
597
+ }
598
+ }, {
599
+ key: "followSystemSpeakerDevice",
600
+ get: function get() {
601
+ return this.speakerId === DEFAULT_DEVICE_ID;
602
+ }
603
+ }, {
604
+ key: "lastEnableVideoEffectType",
605
+ get: function get() {
606
+ return this._lastEnableVideoEffectType;
607
+ },
608
+ set: function set(type) {
609
+ this._lastEnableVideoEffectType = type;
610
+ }
611
+ }, {
612
+ key: "currentDeviceId",
613
+ get: function get() {
614
+ return {
615
+ cameraDeviceId: this.cameraId,
616
+ microphoneDeviceId: this._microphoneDeviceId,
617
+ speakerDeviceId: this._speakerDeviceId
618
+ };
619
+ }
620
+ }, {
621
+ key: "isAudioConnected",
622
+ get: function get() {
623
+ return this._isAudioConnected;
624
+ }
625
+ }, {
626
+ key: "getScreenTrack",
627
+ value: function getScreenTrack(id) {
628
+ return this._mediaControl.getScreenTrack(id);
629
+ }
630
+ }, {
631
+ key: "getLoopbackTrack",
632
+ value: function getLoopbackTrack(id) {
633
+ return this._mediaControl.getLoopbackTrack(id);
634
+ }
635
+ }, {
636
+ key: "checkLoopbackDevice",
637
+ value: function checkLoopbackDevice() {
638
+ return this._mediaControl.checkLoopbackDevice();
639
+ }
640
+ }, {
641
+ key: "isCapabilitySupported",
642
+ value: function isCapabilitySupported(type) {
643
+ return this._mediaControl.isCapabilitySupported(type);
644
+ }
645
+ }, {
646
+ key: "getWindowList",
647
+ value: function getWindowList() {
648
+ return this._mediaControl.getWindowList();
649
+ }
650
+ }, {
651
+ key: "getDisplayList",
652
+ value: function getDisplayList() {
653
+ return this._mediaControl.getDisplayList();
654
+ }
655
+ }, {
656
+ key: "cameraTrack",
657
+ get: function get() {
658
+ return this._mediaControl.getCameraTrack(this.cameraId);
659
+ }
660
+ }, {
661
+ key: "microphoneTrack",
662
+ get: function get() {
663
+ return this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
664
+ }
665
+ }, {
666
+ key: "init",
667
+ value: function () {
668
+ var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
669
+ var _this2 = this;
670
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
671
+ while (1) switch (_context5.prev = _context5.next) {
672
+ case 0:
673
+ return _context5.abrupt("return", Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
674
+ (0, _mobx.runInAction)(function () {
675
+ _this2.logger.info('[FcrDeviceStore] init camera list:', list);
676
+ _this2.cameraList = list;
677
+ if (_this2.cameraList.length > 0) {
678
+ var _cameraId = _this2.cameraList[0].deviceId;
679
+ _this2.logger.info('[FcrDeviceStore] select default camera id:', _cameraId);
680
+ _this2.setCameraId(_cameraId);
681
+ }
682
+ });
683
+ }), this._getMicrophoneList().then(/*#__PURE__*/function () {
684
+ var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
685
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
686
+ while (1) switch (_context3.prev = _context3.next) {
687
+ case 0:
688
+ _this2.microphoneList = microphoneList;
689
+ _this2.logger.info('[FcrDeviceStore] init microphone list:', microphoneList);
690
+ // 默认跟随系统
691
+ _context3.next = 4;
692
+ return _this2.setMicrophoneId(DEFAULT_DEVICE_ID);
693
+ case 4:
694
+ case "end":
695
+ return _context3.stop();
696
+ }
697
+ }, _callee3);
698
+ }));
699
+ return function (_x) {
700
+ return _ref2.apply(this, arguments);
701
+ };
702
+ }()), this._getSpeakerList().then(/*#__PURE__*/function () {
703
+ var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
704
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
705
+ while (1) switch (_context4.prev = _context4.next) {
706
+ case 0:
707
+ _this2.speakerList = speakerList;
708
+ _this2.logger.info('[FcrDeviceStore] init speaker list:', speakerList);
709
+ // 默认跟随系统
710
+ _context4.next = 4;
711
+ return _this2.setSpeakerId(DEFAULT_DEVICE_ID);
712
+ case 4:
713
+ case "end":
714
+ return _context4.stop();
715
+ }
716
+ }, _callee4);
717
+ }));
718
+ return function (_x2) {
719
+ return _ref3.apply(this, arguments);
720
+ };
721
+ }())]));
722
+ case 1:
723
+ case "end":
724
+ return _context5.stop();
725
+ }
726
+ }, _callee5, this);
727
+ }));
728
+ function init() {
729
+ return _init.apply(this, arguments);
730
+ }
731
+ return init;
732
+ }()
733
+ }, {
734
+ key: "addObserver",
735
+ value: function addObserver(observer) {
736
+ this._observable.addObserver(observer);
737
+ }
738
+ }, {
739
+ key: "removeObserver",
740
+ value: function removeObserver(observer) {
741
+ this._observable.removeObserver(observer);
742
+ }
743
+ }, {
744
+ key: "startPlayLocalVideo",
745
+ value: function startPlayLocalVideo(view) {
746
+ var isMirror = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.currentIsMirror;
747
+ if (!this.cameraId || !view) return;
748
+ this._localVideoViewSet.add(view);
749
+ this._cameraVideoTrack = this._mediaControl.getCameraTrack(this.cameraId);
750
+ this._cameraVideoTrack.startPreview({
751
+ renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
752
+ isMirror: isMirror
753
+ }, view);
754
+ this.currentIsMirror = isMirror;
755
+ }
756
+ }, {
757
+ key: "stopPlayLocalVideo",
758
+ value: function stopPlayLocalVideo(view) {
759
+ var _this$_cameraVideoTra;
760
+ if (!view) return;
761
+ this._localVideoViewSet["delete"](view);
762
+ (_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.stopPreview(view);
763
+ }
764
+ }, {
765
+ key: "startSpeakerTest",
766
+ value: function startSpeakerTest() {
767
+ var _this$_microphoneAudi,
768
+ _this$soundEffectList,
769
+ _this$soundEffectList2,
770
+ _this3 = this;
771
+ if (!this._speakerDeviceId) return;
772
+ this.microphoneEnabled && ((_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 ? void 0 : _this$_microphoneAudi.stop());
773
+ this._mediaControl.setSelectedSpeaker(this._speakerDeviceId);
774
+ var soundUrl = (0, _env.isElectron)() ? (_this$soundEffectList = this.soundEffectList.get('speaker_test')) === null || _this$soundEffectList === void 0 ? void 0 : _this$soundEffectList.md5Url : (_this$soundEffectList2 = this.soundEffectList.get('speaker_test')) === null || _this$soundEffectList2 === void 0 ? void 0 : _this$soundEffectList2.url;
775
+ var interval = this._volumeIndicationInterval;
776
+ var sleep = 3000;
777
+ this._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
778
+ this.speakerDetecting = true;
779
+ this._playAudioTimer && clearInterval(this._playAudioTimer);
780
+ this._playAudioTimer = setInterval(function () {
781
+ _this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
782
+ }, sleep);
783
+ }
784
+ }, {
785
+ key: "stopSpeakerTest",
786
+ value: function stopSpeakerTest() {
787
+ var _this$_microphoneAudi2;
788
+ this.speakerVolumeLevel = 0;
789
+ this.microphoneEnabled && ((_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 ? void 0 : _this$_microphoneAudi2.start());
790
+ this.speakerDetecting = false;
791
+ this._playAudioTimer && clearInterval(this._playAudioTimer);
792
+ this._mediaControl.stopSelectedSpeakerTest();
793
+ }
794
+ }, {
795
+ key: "setCurrentIsMirror",
796
+ value: function setCurrentIsMirror(isMirror) {
797
+ this.currentIsMirror = isMirror;
798
+ }
799
+ }, {
800
+ key: "toggleLocalMirrorPreview",
801
+ value: function toggleLocalMirrorPreview(mirror) {
802
+ var _this4 = this;
803
+ this.setCurrentIsMirror(mirror);
804
+ this._localVideoViewSet.forEach(function (view) {
805
+ var _this4$_cameraVideoTr, _this4$_cameraVideoTr2;
806
+ (_this4$_cameraVideoTr = _this4._cameraVideoTrack) === null || _this4$_cameraVideoTr === void 0 || _this4$_cameraVideoTr.stopPreview(view);
807
+ (_this4$_cameraVideoTr2 = _this4._cameraVideoTrack) === null || _this4$_cameraVideoTr2 === void 0 || _this4$_cameraVideoTr2.startPreview({
808
+ renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
809
+ isMirror: mirror
810
+ }, view);
811
+ });
812
+ }
813
+ }, {
814
+ key: "setBeautyOptions",
815
+ value: function setBeautyOptions(beautyOption) {
816
+ Object.assign(this.beautyOptions, beautyOption);
817
+ if (!this.cameraId) return;
818
+ this._cameraVideoTrack = this._mediaControl.getCameraTrack(this.cameraId);
819
+ this._cameraVideoTrack.getVideoEffectEnhancer().setBeautyOptions({
820
+ lighteningContrastLevel: (0, _tools.convertToFixedNumber)(this.beautyOptions.lighteningContrastLevel),
821
+ lighteningLevel: (0, _tools.convertToFixedNumber)(this.beautyOptions.lighteningLevel),
822
+ smoothnessLevel: (0, _tools.convertToFixedNumber)(this.beautyOptions.smoothnessLevel),
823
+ sharpnessLevel: (0, _tools.convertToFixedNumber)(this.beautyOptions.sharpnessLevel),
824
+ rednessLevel: (0, _tools.convertToFixedNumber)(this.beautyOptions.rednessLevel)
825
+ });
826
+ }
827
+ }, {
828
+ key: "handleCancelForceOpenVideoEffect",
829
+ value: function handleCancelForceOpenVideoEffect() {
830
+ this.showForceOpenEffectDialog = false;
831
+ }
832
+ }, {
833
+ key: "handleForceOpenVideoEffect",
834
+ value: function handleForceOpenVideoEffect() {
835
+ if (this.lastEnableVideoEffectType === _type2.FcrUIVideoEffectType.BEAUTY) {
836
+ this._isForceEnableBeauty = true;
837
+ this.enableBeautyEffect(true);
838
+ this.lastEnableVideoEffectType = _type2.FcrUIVideoEffectType.NONE;
839
+ this.showForceOpenEffectDialog = false;
840
+ return;
841
+ }
842
+ if (this.lastEnableVideoEffectType === _type2.FcrUIVideoEffectType.VIRTUAL_BACKGROUND) {
843
+ this._isForceEnableVirtualBackground = true;
844
+ this.enableVirtualBackground(true);
845
+ this.lastEnableVideoEffectType = _type2.FcrUIVideoEffectType.NONE;
846
+ this.showForceOpenEffectDialog = false;
847
+ return;
848
+ }
849
+ }
850
+ }, {
851
+ key: "setVideoOrientation",
852
+ value: function setVideoOrientation() {
853
+ var _this$_cameraVideoTra2;
854
+ if (this._videoRotation === _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_270) {
855
+ this._videoRotation = _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0;
856
+ } else {
857
+ this._videoRotation = this._videoRotation + 1;
858
+ }
859
+ (_this$_cameraVideoTra2 = this._cameraVideoTrack) === null || _this$_cameraVideoTra2 === void 0 || _this$_cameraVideoTra2.setVideoOrientation(this._videoRotation);
860
+ }
861
+ }, {
862
+ key: "setCameraEnabled",
863
+ value: function setCameraEnabled(enable) {
864
+ if (enable) {
865
+ this._hasExecutedOpenCamera = true;
866
+ }
867
+ this.startOrStopCamera(enable);
868
+ this.setShowCameraPreview(enable);
869
+ this.cameraEnabled = enable;
870
+ }
871
+ }, {
872
+ key: "setMicrophoneEnabled",
873
+ value: function setMicrophoneEnabled(enable) {
874
+ var _this5 = this;
875
+ var microphoneTrack = this._microphoneAudioTrack;
876
+ if (enable) {
877
+ microphoneTrack === null || microphoneTrack === void 0 || microphoneTrack.start();
878
+ } else {
879
+ microphoneTrack === null || microphoneTrack === void 0 || microphoneTrack.stop();
880
+ this.microphoneVolumeLevel = 0;
881
+ }
882
+ this.microphoneEnabled = enable;
883
+
884
+ // 如果当前是跟随系统,应该重新获取一次当前系统默认麦克风设备,因为系统默认设备变更没有事件,这里需要进行纠正,否则重新开启设备时,开启的设备就是错的
885
+ if (this.followSystemMicrophoneDevice) {
886
+ this._mediaControl.getSystemSelectedMicrophone().then(function (deviceInfo) {
887
+ var systemSelectedMicrophoneId = deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.deviceId;
888
+ if (systemSelectedMicrophoneId && systemSelectedMicrophoneId !== _this5._microphoneDeviceId) {
889
+ _this5.logger.info('[FcrDeviceStore] system selected microphone id changed, need update microphone track');
890
+ (0, _mobx.runInAction)(function () {
891
+ _this5._microphoneDeviceId = systemSelectedMicrophoneId;
892
+ });
893
+ _this5._refreshMicrophoneTrack();
894
+ _this5._observable.notifyObservers('onMicrophoneChanged', _this5._microphoneDeviceId);
895
+ }
896
+ });
897
+ }
898
+ }
899
+ }, {
900
+ key: "toggleLocalMirror",
901
+ value: function toggleLocalMirror(enable) {
902
+ this._defaultMirror = enable;
903
+ this.isLocalMirrorEnabled = enable;
904
+ this.toggleLocalMirrorPreview(enable);
905
+ }
906
+ }, {
907
+ key: "resetMirror",
908
+ value: function resetMirror() {
909
+ this.isLocalMirrorEnabled = false;
910
+ this.setCurrentIsMirror(false);
911
+ }
912
+ }, {
913
+ key: "startMicrophoneTest",
914
+ value: function startMicrophoneTest() {
915
+ var _this$_microphoneAudi3;
916
+ if (!this._microphoneDeviceId) return;
917
+ this.microphoneDetecting = true;
918
+ (_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.startTest(this._volumeIndicationInterval);
919
+ }
920
+ }, {
921
+ key: "stopMicrophoneTest",
922
+ value: function stopMicrophoneTest() {
923
+ var _this$_microphoneAudi4;
924
+ this.microphoneVolumeLevel = 0;
925
+ this.microphoneDetecting = false;
926
+ (_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.stopTest();
927
+ }
928
+ }, {
929
+ key: "enableVirtualBackground",
930
+ value: function enableVirtualBackground(enable, source) {
931
+ if (!this.cameraId) return;
932
+ this._cameraVideoTrack = this._mediaControl.getCameraTrack(this.cameraId);
933
+ if (source) {
934
+ this.virtualBackgroundName = source.name;
935
+ this._cameraVideoTrack.getVideoEffectEnhancer().setVirtualBackgroundOptions({
936
+ source: source === null || source === void 0 ? void 0 : source.path,
937
+ type: source === null || source === void 0 ? void 0 : source.type
938
+ });
939
+ }
940
+ if (!enable) {
941
+ this.virtualBackgroundName = 'None';
942
+ this._isForceEnableVirtualBackground = false;
943
+ this._cameraVideoTrack.getVideoEffectEnhancer().disableVirtualBackground();
944
+ return;
945
+ }
946
+ if (this._cameraVideoTrack.getVideoEffectEnhancer().checkSatisfyVirtualBackgroundRequirements() || this._isForceEnableVirtualBackground) {
947
+ this._cameraVideoTrack.getVideoEffectEnhancer().enableVirtualBackground();
948
+ return;
949
+ }
950
+ this.showForceOpenEffectDialog = true;
951
+ this.lastEnableVideoEffectType = _type2.FcrUIVideoEffectType.VIRTUAL_BACKGROUND;
952
+ return;
953
+ }
954
+ }, {
955
+ key: "setEditBeautyKey",
956
+ value: function setEditBeautyKey(key) {
957
+ this.isLocalEditBeautyOptions = key !== 'none';
958
+ this.beautyKey = key;
959
+ }
960
+ }, {
961
+ key: "enableBeautyEffect",
962
+ value: function enableBeautyEffect(enable) {
963
+ if (!this.cameraId) return;
964
+ this._cameraVideoTrack = this._mediaControl.getCameraTrack(this.cameraId);
965
+ if (!enable) {
966
+ this.enableBeauty = false;
967
+ this.setEditBeautyKey('none');
968
+ this._isForceEnableBeauty = false;
969
+ this._cameraVideoTrack.getVideoEffectEnhancer().disableBeauty();
970
+ return;
971
+ }
972
+ if (this._cameraVideoTrack.getVideoEffectEnhancer().checkSatisfyBeautyRequirements() || this._isForceEnableBeauty) {
973
+ this.enableBeauty = true;
974
+ this.setBeautyOptions(this.beautyOptions);
975
+ this._cameraVideoTrack.getVideoEffectEnhancer().enableBeauty();
976
+ return;
977
+ }
978
+ this.showForceOpenEffectDialog = true;
979
+ this.enableBeauty = false;
980
+ this.lastEnableVideoEffectType = _type2.FcrUIVideoEffectType.BEAUTY;
981
+ return;
982
+ }
983
+
984
+ // 高保真
985
+ }, {
986
+ key: "enableAudioHiFiMode",
987
+ value: function enableAudioHiFiMode(enable) {
988
+ if (!this._microphoneDeviceId) return;
989
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
990
+ if (enable) {
991
+ microphoneAudioTrack.getAudioEffectEnhancer().enableHiFiMode();
992
+ return;
993
+ }
994
+ microphoneAudioTrack.getAudioEffectEnhancer().disableHiFiMode();
995
+ }
996
+
997
+ // 回声消除
998
+ }, {
999
+ key: "enableAudioEchoCancellation",
1000
+ value: function enableAudioEchoCancellation(enable) {
1001
+ if (!this._microphoneDeviceId) return;
1002
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1003
+ if (enable) {
1004
+ microphoneAudioTrack.getAudioEffectEnhancer().enableEchoCancellation();
1005
+ return;
1006
+ }
1007
+ microphoneAudioTrack.getAudioEffectEnhancer().disableEchoCancellation();
1008
+ }
1009
+
1010
+ // 立体声
1011
+ }, {
1012
+ key: "enableAudioStereo",
1013
+ value: function enableAudioStereo(enable) {
1014
+ if (!this._microphoneDeviceId) return;
1015
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1016
+ if (enable) {
1017
+ microphoneAudioTrack.getAudioEffectEnhancer().enableStereoMode();
1018
+ return;
1019
+ }
1020
+ microphoneAudioTrack.getAudioEffectEnhancer().disableStereoMode();
1021
+ }
1022
+
1023
+ // 噪音抑制等级
1024
+ }, {
1025
+ key: "setNoiseLevel",
1026
+ value: function setNoiseLevel(level) {
1027
+ if (!this._microphoneDeviceId) return;
1028
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1029
+ microphoneAudioTrack.getAudioEffectEnhancer().enableAiDenoiser();
1030
+ microphoneAudioTrack.getAudioEffectEnhancer().setAiDenoiseLevel(level);
1031
+ }
1032
+ }, {
1033
+ key: "setCameraId",
1034
+ value: function setCameraId(cameraId) {
1035
+ if (this.cameraId === cameraId) return;
1036
+ var enable = this.showCameraPreview;
1037
+ var cameraTrack = this._mediaControl.getCameraTrack(this.cameraId);
1038
+ // stop current camera track
1039
+ cameraTrack === null || cameraTrack === void 0 || cameraTrack.stopTest();
1040
+ cameraTrack === null || cameraTrack === void 0 || cameraTrack.stop();
1041
+ if (cameraId) {
1042
+ var _cameraTrack = this._mediaControl.getCameraTrack(cameraId);
1043
+ if (enable) {
1044
+ _cameraTrack.start();
1045
+ }
1046
+ this._cameraVideoTrack = _cameraTrack;
1047
+ }
1048
+ this.cameraId = cameraId;
1049
+ this._observable.notifyObservers('onCameraChanged', cameraId);
1050
+ }
1051
+ }, {
1052
+ key: "setSpeakerId",
1053
+ value: function () {
1054
+ var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(speakerId) {
1055
+ var _this6 = this;
1056
+ var speakerDeviceId, defaultDevice;
1057
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
1058
+ while (1) switch (_context6.prev = _context6.next) {
1059
+ case 0:
1060
+ if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
1061
+ _context6.next = 2;
1062
+ break;
1063
+ }
1064
+ return _context6.abrupt("return");
1065
+ case 2:
1066
+ if (!speakerId) {
1067
+ _context6.next = 13;
1068
+ break;
1069
+ }
1070
+ speakerDeviceId = speakerId;
1071
+ if (!(speakerId === DEFAULT_DEVICE_ID)) {
1072
+ _context6.next = 9;
1073
+ break;
1074
+ }
1075
+ _context6.next = 7;
1076
+ return this._mediaControl.getSystemSelectedSpeaker();
1077
+ case 7:
1078
+ defaultDevice = _context6.sent;
1079
+ speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
1080
+ case 9:
1081
+ if (speakerDeviceId) {
1082
+ this._mediaControl.setSelectedSpeaker(speakerDeviceId);
1083
+ }
1084
+ (0, _mobx.runInAction)(function () {
1085
+ _this6._speakerDeviceId = speakerDeviceId;
1086
+ _this6.speakerId = speakerId;
1087
+ });
1088
+ _context6.next = 15;
1089
+ break;
1090
+ case 13:
1091
+ this._speakerDeviceId = speakerId;
1092
+ this.speakerId = speakerId;
1093
+ case 15:
1094
+ this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
1095
+ this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
1096
+ case 17:
1097
+ case "end":
1098
+ return _context6.stop();
1099
+ }
1100
+ }, _callee6, this);
1101
+ }));
1102
+ function setSpeakerId(_x3) {
1103
+ return _setSpeakerId.apply(this, arguments);
1104
+ }
1105
+ return setSpeakerId;
1106
+ }()
1107
+ }, {
1108
+ key: "setMicrophoneId",
1109
+ value: function () {
1110
+ var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(microphoneId) {
1111
+ var _this$_microphoneAudi5,
1112
+ _this$_microphoneAudi6,
1113
+ _this7 = this;
1114
+ var microphoneDeviceId, defaultDevice, _microphoneTrack;
1115
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
1116
+ while (1) switch (_context7.prev = _context7.next) {
1117
+ case 0:
1118
+ if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
1119
+ _context7.next = 2;
1120
+ break;
1121
+ }
1122
+ return _context7.abrupt("return");
1123
+ case 2:
1124
+ (_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
1125
+ (_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
1126
+ this.stopMicrophoneTest();
1127
+ if (!microphoneId) {
1128
+ _context7.next = 16;
1129
+ break;
1130
+ }
1131
+ microphoneDeviceId = microphoneId;
1132
+ if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
1133
+ _context7.next = 12;
1134
+ break;
1135
+ }
1136
+ _context7.next = 10;
1137
+ return this._mediaControl.getSystemSelectedMicrophone();
1138
+ case 10:
1139
+ defaultDevice = _context7.sent;
1140
+ microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
1141
+ case 12:
1142
+ if (microphoneDeviceId) {
1143
+ _microphoneTrack = this._mediaControl.getMicrophoneTrack(microphoneDeviceId);
1144
+ _microphoneTrack.addObserver(this._microphoneObserver);
1145
+ if (this.microphoneEnabled) {
1146
+ _microphoneTrack.start();
1147
+ }
1148
+ this._microphoneAudioTrack = _microphoneTrack;
1149
+ }
1150
+ (0, _mobx.runInAction)(function () {
1151
+ _this7._microphoneDeviceId = microphoneDeviceId;
1152
+ _this7.microphoneId = microphoneId;
1153
+ });
1154
+ _context7.next = 18;
1155
+ break;
1156
+ case 16:
1157
+ this._microphoneDeviceId = microphoneId;
1158
+ this.microphoneId = microphoneId;
1159
+ case 18:
1160
+ this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
1161
+ this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
1162
+ case 20:
1163
+ case "end":
1164
+ return _context7.stop();
1165
+ }
1166
+ }, _callee7, this);
1167
+ }));
1168
+ function setMicrophoneId(_x4) {
1169
+ return _setMicrophoneId.apply(this, arguments);
1170
+ }
1171
+ return setMicrophoneId;
1172
+ }()
1173
+ }, {
1174
+ key: "setSpeakerVolume",
1175
+ value: function setSpeakerVolume(value) {
1176
+ this.speakerVolume = value;
1177
+ this._mediaControl.setSelectedSpeakerVolume(value);
1178
+ }
1179
+ }, {
1180
+ key: "setMicrophoneVolume",
1181
+ value: function setMicrophoneVolume(value) {
1182
+ var _this$_microphoneAudi7;
1183
+ this.microphoneVolume = value;
1184
+ (_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.adjustVolume(value);
1185
+ }
1186
+ }, {
1187
+ key: "startOrStopCamera",
1188
+ value: function startOrStopCamera(enable) {
1189
+ var cameraTrack = this._cameraVideoTrack;
1190
+ var localVideoViewSet = this._localVideoViewSet;
1191
+ if (enable) {
1192
+ cameraTrack === null || cameraTrack === void 0 || cameraTrack.start();
1193
+ } else {
1194
+ if (localVideoViewSet.size > 0 && cameraTrack) {
1195
+ localVideoViewSet.forEach(function (view) {
1196
+ cameraTrack.stopPreview(view);
1197
+ });
1198
+ }
1199
+ cameraTrack === null || cameraTrack === void 0 || cameraTrack.stop();
1200
+ }
1201
+ }
1202
+ }, {
1203
+ key: "setShowCameraPreview",
1204
+ value: function setShowCameraPreview(enable) {
1205
+ this.showCameraPreview = enable;
1206
+ }
1207
+ }, {
1208
+ key: "downloadUiResources",
1209
+ value: function () {
1210
+ var _downloadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(uiResource) {
1211
+ var _uiResource$virtualBa,
1212
+ _this8 = this,
1213
+ _uiResource$virtualBa2,
1214
+ _uiResource$soundEffe;
1215
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
1216
+ while (1) switch (_context8.prev = _context8.next) {
1217
+ case 0:
1218
+ Promise.all([// images
1219
+ uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.map(function (url) {
1220
+ if ((0, _tools.isPngOrJpg)(url) && !(0, _env.isElectron)()) {
1221
+ (0, _mobx.runInAction)(function () {
1222
+ _this8.virtualBackgroundList.push({
1223
+ url: url,
1224
+ name: (0, _tools.getFileNameWithoutExtension)(url),
1225
+ path: url,
1226
+ type: _virtualBackdoundResources.VirtualOption.IMG
1227
+ });
1228
+ _this8._updateVirtualBackgroundList(_this8.virtualBackgroundList);
1229
+ });
1230
+ } else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
1231
+ return _this8._fetchZipAndUnzip(url, 'image');
1232
+ }
1233
+ return Promise.resolve();
1234
+ }), // videos
1235
+ uiResource === null || uiResource === void 0 || (_uiResource$virtualBa2 = uiResource.virtualBackgroundVideos) === null || _uiResource$virtualBa2 === void 0 ? void 0 : _uiResource$virtualBa2.map(function (url) {
1236
+ if ((0, _tools.isMp4)(url) && !(0, _env.isElectron)()) {
1237
+ (0, _mobx.runInAction)(function () {
1238
+ _this8.virtualBackgroundList.push({
1239
+ url: url,
1240
+ name: (0, _tools.getFileNameWithoutExtension)(url),
1241
+ path: url,
1242
+ type: _virtualBackdoundResources.VirtualOption.VIDEO
1243
+ });
1244
+ _this8._updateVirtualBackgroundList(_this8.virtualBackgroundList);
1245
+ });
1246
+ } else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
1247
+ return _this8._fetchZipAndUnzip(url, 'video');
1248
+ }
1249
+ return Promise.resolve();
1250
+ }), // sound effect audios
1251
+ uiResource === null || uiResource === void 0 || (_uiResource$soundEffe = uiResource.soundEffectAudios) === null || _uiResource$soundEffe === void 0 ? void 0 : _uiResource$soundEffe.map(function (url) {
1252
+ if ((0, _tools.isMp3OrWav)(url) && !(0, _env.isElectron)()) {
1253
+ (0, _mobx.runInAction)(function () {
1254
+ _this8.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(url), {
1255
+ url: url,
1256
+ md5Url: (0, _imports.md5)(url)
1257
+ });
1258
+ });
1259
+ } else if ((0, _tools.isResourceZipUrl)(url) && (0, _env.isElectron)()) {
1260
+ return _this8._fetchZipAndUnzip(url, 'audio');
1261
+ }
1262
+ return Promise.resolve();
1263
+ })]);
1264
+ case 1:
1265
+ case "end":
1266
+ return _context8.stop();
1267
+ }
1268
+ }, _callee8);
1269
+ }));
1270
+ function downloadUiResources(_x5) {
1271
+ return _downloadUiResources.apply(this, arguments);
1272
+ }
1273
+ return downloadUiResources;
1274
+ }()
1275
+ }, {
1276
+ key: "release",
1277
+ value: function release() {
1278
+ var _this9 = this,
1279
+ _this$_cameraVideoTra3,
1280
+ _this$_microphoneAudi8;
1281
+ if (this._localVideoViewSet.size > 0) {
1282
+ this._localVideoViewSet.forEach(function (view) {
1283
+ var _this9$_cameraVideoTr;
1284
+ (_this9$_cameraVideoTr = _this9._cameraVideoTrack) === null || _this9$_cameraVideoTr === void 0 || _this9$_cameraVideoTr.stopPreview(view);
1285
+ });
1286
+ this._localVideoViewSet.clear();
1287
+ }
1288
+ (_this$_cameraVideoTra3 = this._cameraVideoTrack) === null || _this$_cameraVideoTra3 === void 0 || _this$_cameraVideoTra3.stop();
1289
+ this._cameraVideoTrack = undefined;
1290
+ (_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
1291
+ this._microphoneAudioTrack = undefined;
1292
+ }
1293
+ }, {
1294
+ key: "_fileToUiData",
1295
+ value: function () {
1296
+ var _fileToUiData2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(resource, type) {
1297
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
1298
+ while (1) switch (_context9.prev = _context9.next) {
1299
+ case 0:
1300
+ if (!(typeof resource !== 'string')) {
1301
+ _context9.next = 2;
1302
+ break;
1303
+ }
1304
+ return _context9.abrupt("return");
1305
+ case 2:
1306
+ if (type === 'image' && (0, _tools.isPngOrJpg)(resource) || type === 'video' && (0, _tools.isMp4)(resource)) {
1307
+ this._updateVirtualBackgroundList([].concat((0, _toConsumableArray2["default"])(this.virtualBackgroundList), [{
1308
+ name: (0, _tools.getFileNameWithoutExtension)(resource),
1309
+ path: resource,
1310
+ type: type === 'image' ? _virtualBackdoundResources.VirtualOption.IMG : _virtualBackdoundResources.VirtualOption.VIDEO,
1311
+ url: window.runtime.fileToBase64(resource, type)
1312
+ }]));
1313
+ }
1314
+ if (type === 'audio' && (0, _tools.isMp3OrWav)(resource)) {
1315
+ this.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(resource), {
1316
+ url: window.runtime.fileToBase64(resource, type),
1317
+ md5Url: resource
1318
+ });
1319
+ }
1320
+ case 4:
1321
+ case "end":
1322
+ return _context9.stop();
1323
+ }
1324
+ }, _callee9, this);
1325
+ }));
1326
+ function _fileToUiData(_x6, _x7) {
1327
+ return _fileToUiData2.apply(this, arguments);
1328
+ }
1329
+ return _fileToUiData;
1330
+ }()
1331
+ }, {
1332
+ key: "setConnectType",
1333
+ value: function setConnectType(connectType) {
1334
+ this.connectType = connectType;
1335
+ }
1336
+ }, {
1337
+ key: "_fetchZipAndUnzip",
1338
+ value: function () {
1339
+ var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(url, type) {
1340
+ var _this10 = this;
1341
+ var md5Url, resource;
1342
+ return _regenerator["default"].wrap(function _callee10$(_context10) {
1343
+ while (1) switch (_context10.prev = _context10.next) {
1344
+ case 0:
1345
+ if ((0, _tools.isResourceZipUrl)(url)) {
1346
+ _context10.next = 2;
1347
+ break;
1348
+ }
1349
+ return _context10.abrupt("return", []);
1350
+ case 2:
1351
+ md5Url = (0, _imports.md5)(url);
1352
+ _context10.next = 5;
1353
+ return window.runtime.getResourceByFileType(url, md5Url, type);
1354
+ case 5:
1355
+ resource = _context10.sent;
1356
+ resource.forEach(function (item) {
1357
+ _this10._fileToUiData(item, type);
1358
+ });
1359
+ return _context10.abrupt("return", []);
1360
+ case 8:
1361
+ case "end":
1362
+ return _context10.stop();
1363
+ }
1364
+ }, _callee10);
1365
+ }));
1366
+ function _fetchZipAndUnzip(_x8, _x9) {
1367
+ return _fetchZipAndUnzip2.apply(this, arguments);
1368
+ }
1369
+ return _fetchZipAndUnzip;
1370
+ }()
1371
+ }, {
1372
+ key: "_updateVirtualBackgroundList",
1373
+ value: function _updateVirtualBackgroundList(list) {
1374
+ // 按照 mp4 和 png/jpg 分类, mp4 在前
1375
+ this.virtualBackgroundList = list.sort(function (a, b) {
1376
+ if (a.type === _virtualBackdoundResources.VirtualOption.VIDEO && b.type === _virtualBackdoundResources.VirtualOption.IMG) {
1377
+ return -1;
1378
+ }
1379
+ if (a.type === _virtualBackdoundResources.VirtualOption.IMG && b.type === _virtualBackdoundResources.VirtualOption.VIDEO) {
1380
+ return 1;
1381
+ }
1382
+ return 0;
1383
+ });
1384
+ }
1385
+ }, {
1386
+ key: "_handleSpeakerTestVolumeIndicationUpdated",
1387
+ value: function _handleSpeakerTestVolumeIndicationUpdated(volume) {
1388
+ this.speakerVolumeLevel = Math.floor(volume / 255 * 100);
1389
+ }
1390
+ }, {
1391
+ key: "_handleSpeakerVolumeUpdated",
1392
+ value: function _handleSpeakerVolumeUpdated(volume) {
1393
+ this.speakerVolume = volume;
1394
+ }
1395
+ }, {
1396
+ key: "_handleMicrophoneVolumeIndicationUpdated",
1397
+ value: function _handleMicrophoneVolumeIndicationUpdated(_, volume) {
1398
+ this.microphoneVolumeLevel = Math.floor(volume / 255 * 100);
1399
+ }
1400
+ }, {
1401
+ key: "_handleCameraChanged",
1402
+ value: function _handleCameraChanged() {
1403
+ var enabled = this.showCameraPreview;
1404
+ this.toggleLocalCameraPreview(enabled);
1405
+ }
1406
+ }, {
1407
+ key: "toggleLocalCameraPreview",
1408
+ value: function toggleLocalCameraPreview(enabled) {
1409
+ var _this11 = this;
1410
+ var localVideoViewSet = this._localVideoViewSet;
1411
+ var cameraTrack = this._cameraVideoTrack;
1412
+ if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
1413
+ localVideoViewSet.forEach(function (view) {
1414
+ cameraTrack.stopPreview(view);
1415
+ });
1416
+ }
1417
+ if (enabled) {
1418
+ localVideoViewSet.forEach(function (view) {
1419
+ cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
1420
+ renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
1421
+ isMirror: _this11.currentIsMirror
1422
+ }, view);
1423
+ });
1424
+ }
1425
+ }
1426
+ }, {
1427
+ key: "_handleCameraListUpdated",
1428
+ value: function () {
1429
+ var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
1430
+ var _this12 = this;
1431
+ var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
1432
+ return _regenerator["default"].wrap(function _callee11$(_context11) {
1433
+ while (1) switch (_context11.prev = _context11.next) {
1434
+ case 0:
1435
+ _context11.next = 2;
1436
+ return this._mediaControl.getCameraList();
1437
+ case 2:
1438
+ cameraList = _context11.sent;
1439
+ (0, _mobx.runInAction)(function () {
1440
+ _this12.cameraList = cameraList;
1441
+ });
1442
+ currentDeviceExist = false;
1443
+ if (this.cameraId) {
1444
+ currentDeviceExist = this.cameraList.some(function (_ref4) {
1445
+ var deviceId = _ref4.deviceId;
1446
+ return _this12.cameraId === deviceId;
1447
+ });
1448
+ _cameraEnabled = this.cameraEnabled;
1449
+ if (!currentDeviceExist) {
1450
+ this.logger.info('[FcrDeviceStore] current camera is unplugged, close camera');
1451
+ if (this.cameraList.length > 0) {
1452
+ deviceId = this.cameraList[0].deviceId;
1453
+ this.setCameraId(deviceId);
1454
+ } else {
1455
+ this.setCameraId('');
1456
+ }
1457
+ if (_cameraEnabled) {
1458
+ this.setCameraEnabled(false);
1459
+ }
1460
+ }
1461
+ }
1462
+
1463
+ // select the first camera in the list as default
1464
+ if (!currentDeviceExist) {
1465
+ if (this.cameraList.length > 0) {
1466
+ _deviceId = this.cameraList[0].deviceId;
1467
+ this.setCameraId(_deviceId);
1468
+ }
1469
+ }
1470
+ this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
1471
+ case 8:
1472
+ case "end":
1473
+ return _context11.stop();
1474
+ }
1475
+ }, _callee11, this);
1476
+ }));
1477
+ function _handleCameraListUpdated() {
1478
+ return _handleCameraListUpdated2.apply(this, arguments);
1479
+ }
1480
+ return _handleCameraListUpdated;
1481
+ }()
1482
+ }, {
1483
+ key: "_handleMicrophoneAdded",
1484
+ value: function () {
1485
+ var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
1486
+ return _regenerator["default"].wrap(function _callee12$(_context12) {
1487
+ while (1) switch (_context12.prev = _context12.next) {
1488
+ case 0:
1489
+ _context12.next = 2;
1490
+ return this._handleMicrophoneListUpdated();
1491
+ case 2:
1492
+ this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
1493
+ case 3:
1494
+ case "end":
1495
+ return _context12.stop();
1496
+ }
1497
+ }, _callee12, this);
1498
+ }));
1499
+ function _handleMicrophoneAdded() {
1500
+ return _handleMicrophoneAdded2.apply(this, arguments);
1501
+ }
1502
+ return _handleMicrophoneAdded;
1503
+ }()
1504
+ }, {
1505
+ key: "_handleMicrophoneRemoved",
1506
+ value: function () {
1507
+ var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
1508
+ var _this13 = this;
1509
+ var currentDeviceExist;
1510
+ return _regenerator["default"].wrap(function _callee13$(_context13) {
1511
+ while (1) switch (_context13.prev = _context13.next) {
1512
+ case 0:
1513
+ _context13.next = 2;
1514
+ return this._handleMicrophoneListUpdated();
1515
+ case 2:
1516
+ // 如何设备移除了,应该切到跟随系统
1517
+ currentDeviceExist = this.microphoneList.find(function (item) {
1518
+ return item.deviceId === _this13._microphoneDeviceId;
1519
+ });
1520
+ if (currentDeviceExist) {
1521
+ _context13.next = 7;
1522
+ break;
1523
+ }
1524
+ this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
1525
+ _context13.next = 7;
1526
+ return this.setMicrophoneId(DEFAULT_DEVICE_ID);
1527
+ case 7:
1528
+ this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
1529
+ case 8:
1530
+ case "end":
1531
+ return _context13.stop();
1532
+ }
1533
+ }, _callee13, this);
1534
+ }));
1535
+ function _handleMicrophoneRemoved() {
1536
+ return _handleMicrophoneRemoved2.apply(this, arguments);
1537
+ }
1538
+ return _handleMicrophoneRemoved;
1539
+ }()
1540
+ }, {
1541
+ key: "_handleMicrophoneListUpdated",
1542
+ value: function () {
1543
+ var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
1544
+ var _this14 = this;
1545
+ var microphoneList;
1546
+ return _regenerator["default"].wrap(function _callee14$(_context14) {
1547
+ while (1) switch (_context14.prev = _context14.next) {
1548
+ case 0:
1549
+ _context14.next = 2;
1550
+ return this._getMicrophoneList();
1551
+ case 2:
1552
+ microphoneList = _context14.sent;
1553
+ // 如果选择了跟随系统,浏览器下设备变更时需要更新 track 以保证当前设备 track 正确
1554
+ if (this.followSystemMicrophoneDevice) {
1555
+ this._refreshMicrophoneTrack();
1556
+ }
1557
+ (0, _mobx.runInAction)(function () {
1558
+ _this14.microphoneList = microphoneList;
1559
+ });
1560
+ case 5:
1561
+ case "end":
1562
+ return _context14.stop();
1563
+ }
1564
+ }, _callee14, this);
1565
+ }));
1566
+ function _handleMicrophoneListUpdated() {
1567
+ return _handleMicrophoneListUpdated2.apply(this, arguments);
1568
+ }
1569
+ return _handleMicrophoneListUpdated;
1570
+ }()
1571
+ /**
1572
+ * 某些情况下需要重新创建 Track,比如:
1573
+ * 1.浏览器中耳机插入,可能导致系统默认设备变更,此时应该重新创建 track
1574
+ * 2.客户端中,系统默认设备变更时,并不会有回调发生,但是需要在下次开启或关闭设备时纠正当前系统设备ID
1575
+ */
1576
+ }, {
1577
+ key: "_refreshMicrophoneTrack",
1578
+ value: function _refreshMicrophoneTrack() {
1579
+ var _this$_microphoneAudi9, _this$_microphoneAudi10;
1580
+ (_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
1581
+ (_this$_microphoneAudi10 = this._microphoneAudioTrack) === null || _this$_microphoneAudi10 === void 0 || _this$_microphoneAudi10.stop();
1582
+ this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1583
+ this._microphoneAudioTrack.addObserver(this._microphoneObserver);
1584
+ if (this.microphoneEnabled) {
1585
+ this._microphoneAudioTrack.start();
1586
+ } else {
1587
+ this._microphoneAudioTrack.stop();
1588
+ }
1589
+ }
1590
+ }, {
1591
+ key: "_handleSpeakerAdded",
1592
+ value: function () {
1593
+ var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
1594
+ return _regenerator["default"].wrap(function _callee15$(_context15) {
1595
+ while (1) switch (_context15.prev = _context15.next) {
1596
+ case 0:
1597
+ _context15.next = 2;
1598
+ return this._handleSpeakerListUpdated();
1599
+ case 2:
1600
+ this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
1601
+ case 3:
1602
+ case "end":
1603
+ return _context15.stop();
1604
+ }
1605
+ }, _callee15, this);
1606
+ }));
1607
+ function _handleSpeakerAdded() {
1608
+ return _handleSpeakerAdded2.apply(this, arguments);
1609
+ }
1610
+ return _handleSpeakerAdded;
1611
+ }()
1612
+ }, {
1613
+ key: "_handleSpeakerRemoved",
1614
+ value: function () {
1615
+ var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
1616
+ var _this15 = this;
1617
+ var currentDeviceExist;
1618
+ return _regenerator["default"].wrap(function _callee16$(_context16) {
1619
+ while (1) switch (_context16.prev = _context16.next) {
1620
+ case 0:
1621
+ _context16.next = 2;
1622
+ return this._handleSpeakerListUpdated();
1623
+ case 2:
1624
+ // 如何设备移除了,应该切到跟随系统
1625
+ currentDeviceExist = this.speakerList.find(function (item) {
1626
+ return item.deviceId === _this15._speakerDeviceId;
1627
+ });
1628
+ if (currentDeviceExist) {
1629
+ _context16.next = 7;
1630
+ break;
1631
+ }
1632
+ this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
1633
+ _context16.next = 7;
1634
+ return this.setSpeakerId(DEFAULT_DEVICE_ID);
1635
+ case 7:
1636
+ this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
1637
+ case 8:
1638
+ case "end":
1639
+ return _context16.stop();
1640
+ }
1641
+ }, _callee16, this);
1642
+ }));
1643
+ function _handleSpeakerRemoved() {
1644
+ return _handleSpeakerRemoved2.apply(this, arguments);
1645
+ }
1646
+ return _handleSpeakerRemoved;
1647
+ }()
1648
+ }, {
1649
+ key: "_handleSpeakerListUpdated",
1650
+ value: function () {
1651
+ var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
1652
+ var _this16 = this;
1653
+ var speakerList;
1654
+ return _regenerator["default"].wrap(function _callee17$(_context17) {
1655
+ while (1) switch (_context17.prev = _context17.next) {
1656
+ case 0:
1657
+ _context17.next = 2;
1658
+ return this._getSpeakerList();
1659
+ case 2:
1660
+ speakerList = _context17.sent;
1661
+ (0, _mobx.runInAction)(function () {
1662
+ _this16.speakerList = speakerList;
1663
+ });
1664
+ case 4:
1665
+ case "end":
1666
+ return _context17.stop();
1667
+ }
1668
+ }, _callee17, this);
1669
+ }));
1670
+ function _handleSpeakerListUpdated() {
1671
+ return _handleSpeakerListUpdated2.apply(this, arguments);
1672
+ }
1673
+ return _handleSpeakerListUpdated;
1674
+ }()
1675
+ }, {
1676
+ key: "_getMicrophoneList",
1677
+ value: function () {
1678
+ var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
1679
+ var defaultDevice, list, defaultIdDevice;
1680
+ return _regenerator["default"].wrap(function _callee18$(_context18) {
1681
+ while (1) switch (_context18.prev = _context18.next) {
1682
+ case 0:
1683
+ _context18.next = 2;
1684
+ return this._mediaControl.getSystemSelectedMicrophone();
1685
+ case 2:
1686
+ defaultDevice = _context18.sent;
1687
+ _context18.next = 5;
1688
+ return this._mediaControl.getMicrophoneList();
1689
+ case 5:
1690
+ list = _context18.sent;
1691
+ list.forEach(function (item) {
1692
+ var results = /^default \((.*)\)$/.exec(item.deviceName);
1693
+ if (results && results.length > 1) {
1694
+ item.deviceName = results[1];
1695
+ }
1696
+ });
1697
+
1698
+ // 过滤掉虚拟声卡
1699
+ list = list.filter(function (item) {
1700
+ return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
1701
+ });
1702
+ // 加入默认设备
1703
+ defaultIdDevice = list.find(function (item) {
1704
+ return item.deviceId === DEFAULT_DEVICE_ID;
1705
+ }); // 设备列表中没有默认设备,但是系统默认设备存在
1706
+ if (!defaultIdDevice && defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceName) {
1707
+ list.unshift({
1708
+ deviceId: DEFAULT_DEVICE_ID,
1709
+ deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
1710
+ reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1711
+ })
1712
+ });
1713
+ }
1714
+
1715
+ // 设备列表中有默认设备
1716
+ if (defaultIdDevice && defaultIdDevice.deviceName) {
1717
+ defaultIdDevice.deviceName = (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
1718
+ reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1719
+ });
1720
+ }
1721
+ return _context18.abrupt("return", list);
1722
+ case 12:
1723
+ case "end":
1724
+ return _context18.stop();
1725
+ }
1726
+ }, _callee18, this);
1727
+ }));
1728
+ function _getMicrophoneList() {
1729
+ return _getMicrophoneList2.apply(this, arguments);
1730
+ }
1731
+ return _getMicrophoneList;
1732
+ }()
1733
+ }, {
1734
+ key: "_getSpeakerList",
1735
+ value: function () {
1736
+ var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
1737
+ var defaultDevice, list, defaultIdDevice;
1738
+ return _regenerator["default"].wrap(function _callee19$(_context19) {
1739
+ while (1) switch (_context19.prev = _context19.next) {
1740
+ case 0:
1741
+ _context19.next = 2;
1742
+ return this._mediaControl.getSystemSelectedSpeaker();
1743
+ case 2:
1744
+ defaultDevice = _context19.sent;
1745
+ _context19.next = 5;
1746
+ return this._mediaControl.getSpeakerList();
1747
+ case 5:
1748
+ list = _context19.sent;
1749
+ list.forEach(function (item) {
1750
+ var results = /^default \((.*)\)$/.exec(item.deviceName);
1751
+ if (results && results.length > 1) {
1752
+ item.deviceName = results[1];
1753
+ }
1754
+ });
1755
+
1756
+ // 过滤掉虚拟声卡
1757
+ list = list.filter(function (item) {
1758
+ return !(0, _tools.matchVirtualSoundCardPattern)(item.deviceName);
1759
+ });
1760
+ defaultIdDevice = list.find(function (item) {
1761
+ return item.deviceId === DEFAULT_DEVICE_ID;
1762
+ }); // 设备列表中没有默认设备,但是系统默认设备存在
1763
+ if (!defaultIdDevice && defaultDevice !== null && defaultDevice !== void 0 && defaultDevice.deviceName) {
1764
+ list.unshift({
1765
+ deviceId: DEFAULT_DEVICE_ID,
1766
+ deviceName: (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
1767
+ reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1768
+ })
1769
+ });
1770
+ }
1771
+
1772
+ // 设备列表中有默认设备
1773
+ if (defaultIdDevice && defaultIdDevice.deviceName) {
1774
+ defaultIdDevice.deviceName = (0, _i18n.transI18n)('fmt_device_label_speaker_follow_system', {
1775
+ reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1776
+ });
1777
+ }
1778
+ return _context19.abrupt("return", list);
1779
+ case 12:
1780
+ case "end":
1781
+ return _context19.stop();
1782
+ }
1783
+ }, _callee19, this);
1784
+ }));
1785
+ function _getSpeakerList() {
1786
+ return _getSpeakerList2.apply(this, arguments);
1787
+ }
1788
+ return _getSpeakerList;
1789
+ }()
1790
+ }, {
1791
+ key: "setMainRoomAudioOff",
1792
+ value: function setMainRoomAudioOff(enable) {
1793
+ this.isMainRoomAudioOff = enable;
1794
+ }
1795
+ }]);
1796
+ }();
1797
+ _FcrUIDeviceProviderImpl = FcrUIDeviceProviderImpl;
1798
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDeviceId"], [_mobx.observable, 1, "_speakerDeviceId"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "microphoneId"], [_mobx.observable, 1, "speakerId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "virtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "beautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "virtualBackgroundList"], [_mobx.observable, 1, "soundEffectList"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "connectType"], [_mobx.observable, 1, "isMainRoomAudioOff"], [_imports.bound, 2, "connectAudio"], [_imports.bound, 2, "disconnectAudio"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_startSpeakerTestDecs, 18, "startSpeakerTest"], [_stopSpeakerTestDecs, 18, "stopSpeakerTest"], [_setCurrentIsMirrorDecs, 18, "setCurrentIsMirror"], [_toggleLocalMirrorPreviewDecs, 18, "toggleLocalMirrorPreview"], [_setBeautyOptionsDecs, 18, "setBeautyOptions"], [_handleCancelForceOpenVideoEffectDecs, 18, "handleCancelForceOpenVideoEffect"], [_handleForceOpenVideoEffectDecs, 18, "handleForceOpenVideoEffect"], [_imports.bound, 2, "setVideoOrientation"], [_setCameraEnabledDecs, 18, "setCameraEnabled"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_downloadUiResourcesDecs, 18, "downloadUiResources"], [_setConnectTypeDecs, 18, "setConnectType"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSpeakerTestVolumeIndicationUpdatedDecs, 18, "_handleSpeakerTestVolumeIndicationUpdated"], [_handleSpeakerVolumeUpdatedDecs, 18, "_handleSpeakerVolumeUpdated"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [_imports.bound, 2, "_handleCameraChanged"], [_imports.bound, 2, "toggleLocalCameraPreview"], [_imports.bound, 2, "_handleCameraListUpdated"], [_imports.bound, 2, "_handleMicrophoneAdded"], [_imports.bound, 2, "_handleMicrophoneRemoved"], [_imports.bound, 2, "_handleMicrophoneListUpdated"], [_handleSpeakerAddedDecs, 18, "_handleSpeakerAdded"], [_handleSpeakerRemovedDecs, 18, "_handleSpeakerRemoved"], [_handleSpeakerListUpdatedDecs, 18, "_handleSpeakerListUpdated"], [_setMainRoomAudioOffDecs, 18, "setMainRoomAudioOff"]], []).e, 30);
1799
+ _init__microphoneDeviceId = _applyDecs$e[0];
1800
+ _init__speakerDeviceId = _applyDecs$e[1];
1801
+ _init_currentIsMirror = _applyDecs$e[2];
1802
+ _init_showForceOpenEffectDialog = _applyDecs$e[3];
1803
+ _init_cameraId = _applyDecs$e[4];
1804
+ _init_microphoneId = _applyDecs$e[5];
1805
+ _init_speakerId = _applyDecs$e[6];
1806
+ _init_cameraEnabled = _applyDecs$e[7];
1807
+ _init_showCameraPreview = _applyDecs$e[8];
1808
+ _init_microphoneEnabled = _applyDecs$e[9];
1809
+ _init_cameraList = _applyDecs$e[10];
1810
+ _init_microphoneList = _applyDecs$e[11];
1811
+ _init_microphoneVolumeLevel = _applyDecs$e[12];
1812
+ _init_speakerList = _applyDecs$e[13];
1813
+ _init_isLocalMirrorEnabled = _applyDecs$e[14];
1814
+ _init_isLocalEditBeautyOptions = _applyDecs$e[15];
1815
+ _init_speakerVolumeLevel = _applyDecs$e[16];
1816
+ _init_speakerVolume = _applyDecs$e[17];
1817
+ _init_microphoneVolume = _applyDecs$e[18];
1818
+ _init_virtualBackgroundName = _applyDecs$e[19];
1819
+ _init_enableBeauty = _applyDecs$e[20];
1820
+ _init_beautyKey = _applyDecs$e[21];
1821
+ _init_beautyOptions = _applyDecs$e[22];
1822
+ _init_virtualBackgroundList = _applyDecs$e[23];
1823
+ _init_soundEffectList = _applyDecs$e[24];
1824
+ _init_microphoneDetecting = _applyDecs$e[25];
1825
+ _init_speakerDetecting = _applyDecs$e[26];
1826
+ _init_connectType = _applyDecs$e[27];
1827
+ _init_isMainRoomAudioOff = _applyDecs$e[28];
1828
+ _initProto = _applyDecs$e[29];
1829
+ (0, _base.registerDependency)('deviceProvider');