fcr-ui-scene 3.4.0 → 3.4.1

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