fcr-ui-scene 3.6.4-rc.1 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. package/lib/creator.d.ts +4 -3
  2. package/lib/creator.js +136 -98
  3. package/lib/electron/app.js +1 -1
  4. package/lib/electron/bootstrap-sdk.js +49 -4
  5. package/lib/electron/injections.d.ts +5 -1
  6. package/lib/electron/injections.js +14 -2
  7. package/lib/electron/ipc/type.d.ts +8 -4
  8. package/lib/electron/ipc/type.js +10 -4
  9. package/lib/electron/logger.js +1 -1
  10. package/lib/electron/main.js +5 -2
  11. package/lib/electron/preload.js +34 -5
  12. package/lib/fragments/annotation/index.d.ts +2 -2
  13. package/lib/fragments/annotation/index.js +38 -28
  14. package/lib/fragments/annotation/libs.d.ts +2 -2
  15. package/lib/fragments/annotation/store.d.ts +21 -4
  16. package/lib/fragments/annotation/store.js +281 -84
  17. package/lib/fragments/annotation/style.css +9 -0
  18. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.js +1 -1
  19. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.js +1 -1
  20. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.d.ts +26 -2
  21. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.js +57 -8
  22. package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.js +36 -3
  23. package/lib/fragments/annotation/view.d.ts +1 -0
  24. package/lib/fragments/annotation/view.js +52 -10
  25. package/lib/modules/action-bar/components/apps/index.js +54 -38
  26. package/lib/modules/action-bar/components/chat/index.js +13 -34
  27. package/lib/modules/action-bar/components/collapse/index.js +1 -1
  28. package/lib/modules/action-bar/components/leave/index.js +9 -9
  29. package/lib/modules/action-bar/components/more/index.js +26 -27
  30. package/lib/modules/action-bar/components/participants/index.js +23 -39
  31. package/lib/modules/action-bar/components/record/index.js +7 -13
  32. package/lib/modules/action-bar/components/screen-share/index.js +4 -24
  33. package/lib/modules/action-bar/components/security/index.js +29 -34
  34. package/lib/modules/action-bar/components/settings/index.js +13 -19
  35. package/lib/modules/action-bar/index.d.ts +4 -0
  36. package/lib/modules/action-bar/index.js +3 -1
  37. package/lib/modules/action-bar/store.d.ts +16 -6
  38. package/lib/modules/action-bar/store.js +63 -25
  39. package/lib/modules/action-bar/types.d.ts +3 -3
  40. package/lib/modules/action-bar/view.js +2 -3
  41. package/lib/modules/annotation/annotation-index.d.ts +2 -0
  42. package/lib/modules/annotation/annotation-index.js +80 -0
  43. package/lib/modules/annotation/annotation-toolbar-store.d.ts +82 -0
  44. package/lib/modules/annotation/annotation-toolbar-store.js +501 -0
  45. package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
  46. package/lib/modules/annotation/components/color-picker/components/color.js +38 -0
  47. package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
  48. package/lib/modules/annotation/components/color-picker/components/panel.js +109 -0
  49. package/lib/modules/annotation/components/color-picker/components/picker.d.ts +1 -0
  50. package/lib/modules/annotation/components/color-picker/components/picker.js +75 -0
  51. package/lib/modules/annotation/components/color-picker/index.d.ts +2 -0
  52. package/lib/modules/annotation/components/color-picker/index.js +47 -0
  53. package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
  54. package/lib/modules/annotation/components/eraser-picker.js +144 -0
  55. package/lib/modules/annotation/components/expansion/index.d.ts +1 -0
  56. package/lib/modules/annotation/components/expansion/index.js +100 -0
  57. package/lib/modules/annotation/components/extra-tool-picker.d.ts +1 -0
  58. package/lib/modules/annotation/components/extra-tool-picker.js +62 -0
  59. package/lib/modules/annotation/components/history.d.ts +2 -0
  60. package/lib/modules/annotation/components/history.js +78 -0
  61. package/lib/modules/annotation/components/icons/fold-icon.d.ts +2 -0
  62. package/lib/modules/annotation/components/icons/fold-icon.js +41 -0
  63. package/lib/modules/annotation/components/icons/move-icon.d.ts +1 -0
  64. package/lib/modules/annotation/components/icons/move-icon.js +66 -0
  65. package/lib/modules/annotation/components/item/index.d.ts +1 -0
  66. package/lib/modules/annotation/components/item/index.js +43 -0
  67. package/lib/modules/annotation/components/move-handle.d.ts +5 -0
  68. package/lib/modules/annotation/components/move-handle.js +134 -0
  69. package/lib/modules/annotation/components/pen-picker.d.ts +4 -0
  70. package/lib/modules/annotation/components/pen-picker.js +155 -0
  71. package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
  72. package/lib/modules/annotation/components/screen-capture-picker.js +85 -0
  73. package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
  74. package/lib/modules/annotation/components/shape-picker.js +210 -0
  75. package/lib/modules/annotation/hooks/index.d.ts +14 -0
  76. package/lib/modules/annotation/hooks/index.js +292 -0
  77. package/lib/modules/annotation/index.d.ts +4 -1
  78. package/lib/modules/annotation/index.js +20 -22
  79. package/lib/modules/annotation/store.d.ts +59 -18
  80. package/lib/modules/annotation/store.js +503 -263
  81. package/lib/modules/annotation/style.css +10 -0
  82. package/lib/modules/annotation/view.js +9 -11
  83. package/lib/modules/chat/chat-room-store.js +5 -2
  84. package/lib/modules/chat/components/chat-select/index.js +1 -1
  85. package/lib/modules/chat/components/chat-select/select-item/index.js +10 -3
  86. package/lib/modules/chat/components/message-list/message-item/index.js +4 -2
  87. package/lib/modules/chat/index.d.ts +2 -0
  88. package/lib/modules/chat/index.js +13 -3
  89. package/lib/modules/chat/store.d.ts +3 -0
  90. package/lib/modules/chat/store.js +12 -6
  91. package/lib/modules/chat/types.d.ts +1 -0
  92. package/lib/modules/chat/types.js +2 -1
  93. package/lib/modules/chat/util.js +2 -1
  94. package/lib/modules/chat/view.js +6 -3
  95. package/lib/modules/{action-bar/components → components}/apps/app-item/index.d.ts +1 -1
  96. package/lib/modules/components/apps/app-list.d.ts +3 -0
  97. package/lib/modules/{action-bar/components → components}/apps/app-list.js +2 -4
  98. package/lib/modules/components/apps/types.d.ts +14 -0
  99. package/lib/modules/components/apps/types.js +6 -0
  100. package/lib/modules/components/device-control/components/carmera/index.js +71 -68
  101. package/lib/modules/components/device-control/components/microphone/index.js +99 -97
  102. package/lib/modules/components/device-control/store.d.ts +1 -1
  103. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +7 -7
  104. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +0 -2
  105. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -7
  106. package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -1
  107. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +19 -36
  108. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +1 -0
  109. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +9 -2
  110. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +0 -3
  111. package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +15 -11
  112. package/lib/modules/components/member-window/components/member-actions/index.js +10 -2
  113. package/lib/modules/components/member-window/components/member-actions/libs/index.js +2 -2
  114. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +12 -0
  115. package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +75 -0
  116. package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +1 -7
  117. package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +7 -47
  118. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +12 -0
  119. package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +68 -0
  120. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +1 -9
  121. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +7 -49
  122. package/lib/modules/components/member-window/components/video-player/components/zoomable-container.d.ts +15 -0
  123. package/lib/modules/components/member-window/components/video-player/components/zoomable-container.js +255 -0
  124. package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
  125. package/lib/modules/components/member-window/components/video-player/index.js +8 -2
  126. package/lib/modules/components/member-window/index.css +16 -6
  127. package/lib/modules/components/member-window/index.d.ts +1 -1
  128. package/lib/modules/components/member-window/index.js +12 -4
  129. package/lib/modules/components/member-window/types.d.ts +2 -0
  130. package/lib/modules/components/security-menu/index.js +6 -5
  131. package/lib/modules/control-bar/components/annotation-button/index.js +21 -8
  132. package/lib/modules/control-bar/components/more-actions/index.css +13 -0
  133. package/lib/modules/control-bar/components/more-actions/index.js +1 -1
  134. package/lib/modules/control-bar/components/share-audio/index.css +90 -0
  135. package/lib/modules/control-bar/components/share-audio/index.d.ts +15 -0
  136. package/lib/modules/control-bar/components/share-audio/index.js +173 -0
  137. package/lib/modules/control-bar/components/share-state-nav/index.css +5 -0
  138. package/lib/modules/control-bar/components/share-state-nav/index.js +14 -2
  139. package/lib/modules/control-bar/index.d.ts +2 -0
  140. package/lib/modules/control-bar/index.js +9 -1
  141. package/lib/modules/control-bar/store.d.ts +16 -7
  142. package/lib/modules/control-bar/store.js +36 -12
  143. package/lib/modules/control-bar/view.d.ts +4 -0
  144. package/lib/modules/control-bar/view.js +180 -90
  145. package/lib/modules/device-pretest/store.d.ts +1 -1
  146. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -1
  147. package/lib/modules/dialog/components/dialog-container/index.css +1 -0
  148. package/lib/modules/dialog/components/dialog-container/index.d.ts +2 -1
  149. package/lib/modules/dialog/components/dialog-container/index.js +27 -10
  150. package/lib/modules/dialog/components/host-area-container/index.js +4 -4
  151. package/lib/modules/dialog/components/normal-window/index.d.ts +19 -0
  152. package/lib/modules/dialog/components/normal-window/index.js +69 -0
  153. package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.js +17 -15
  154. package/lib/modules/dialog/dialogs/chat/components/actions.d.ts +1 -0
  155. package/lib/modules/dialog/dialogs/chat/components/actions.js +33 -0
  156. package/lib/modules/dialog/{components → dialogs}/chat/index.d.ts +1 -1
  157. package/lib/modules/dialog/dialogs/chat/index.js +59 -0
  158. package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +6 -0
  159. package/lib/modules/dialog/{components → dialogs}/confirm-leave-meeting/index.js +13 -37
  160. package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.js +19 -12
  161. package/lib/modules/dialog/{components → dialogs}/control-bar/index.js +2 -2
  162. package/lib/modules/dialog/{components → dialogs}/device-setting/index.js +20 -13
  163. package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +12 -0
  164. package/lib/modules/dialog/dialogs/end-meeting/index.js +45 -0
  165. package/lib/modules/dialog/{components/interpreter/electron.js → dialogs/interpreter/index.js} +17 -11
  166. package/lib/modules/dialog/dialogs/invite/index.d.ts +3 -0
  167. package/lib/modules/dialog/{components → dialogs}/invite/index.js +9 -25
  168. package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +2 -0
  169. package/lib/modules/dialog/{components → dialogs}/live-streaming/index.js +11 -34
  170. package/lib/modules/dialog/dialogs/participant/components/actions.d.ts +1 -0
  171. package/lib/modules/dialog/dialogs/participant/components/actions.js +32 -0
  172. package/lib/modules/dialog/dialogs/participant/components/title.d.ts +1 -0
  173. package/lib/modules/dialog/dialogs/participant/components/title.js +19 -0
  174. package/lib/modules/dialog/dialogs/participant/index.d.ts +2 -0
  175. package/lib/modules/dialog/dialogs/participant/index.js +53 -0
  176. package/lib/modules/dialog/dialogs/pre-setting/index.js +62 -0
  177. package/lib/modules/dialog/dialogs/rename/index.js +35 -0
  178. package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.js +1 -1
  179. package/lib/modules/dialog/{components → dialogs}/video-window/index.js +11 -8
  180. package/lib/modules/dialog/{components → dialogs}/whiteboard/index.js +2 -3
  181. package/lib/modules/dialog/{components → dialogs}/widget/electron.js +1 -1
  182. package/lib/modules/dialog/{components → dialogs}/widget/index.js +1 -1
  183. package/lib/modules/dialog/hooks/use-web-drag.d.ts +8 -0
  184. package/lib/modules/dialog/hooks/use-web-drag.js +73 -0
  185. package/lib/modules/dialog/hooks/useElectron.d.ts +2 -7
  186. package/lib/modules/dialog/hooks/useElectron.js +46 -156
  187. package/lib/modules/dialog/index.d.ts +4 -0
  188. package/lib/modules/dialog/index.js +4 -2
  189. package/lib/modules/dialog/level-config.d.ts +11 -0
  190. package/lib/modules/dialog/level-config.js +21 -0
  191. package/lib/modules/dialog/store.d.ts +15 -6
  192. package/lib/modules/dialog/store.js +40 -54
  193. package/lib/modules/dialog/type.d.ts +15 -12
  194. package/lib/modules/event-confirm/components/window/index.d.ts +1 -4
  195. package/lib/modules/event-confirm/components/window/index.js +34 -23
  196. package/lib/modules/event-confirm/index.d.ts +2 -0
  197. package/lib/modules/event-confirm/index.js +3 -2
  198. package/lib/modules/event-confirm/store.d.ts +9 -1
  199. package/lib/modules/event-confirm/store.js +24 -16
  200. package/lib/modules/event-confirm/view.js +11 -22
  201. package/lib/modules/event-sound/index.d.ts +2 -0
  202. package/lib/modules/event-sound/index.js +8 -1
  203. package/lib/modules/event-toast/index.css +10 -0
  204. package/lib/modules/event-toast/store.d.ts +1 -1
  205. package/lib/modules/event-toast/store.js +17 -15
  206. package/lib/modules/event-toast/view.js +2 -1
  207. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +4 -2
  208. package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +2 -1
  209. package/lib/modules/interpreter/store.d.ts +1 -0
  210. package/lib/modules/interpreter/store.js +12 -5
  211. package/lib/modules/interpreter/view.js +7 -1
  212. package/lib/modules/layout/components/Aside.js +4 -0
  213. package/lib/modules/layout/components/Carousel.js +3 -1
  214. package/lib/modules/layout/components/CommonVideoRenderer.d.ts +3 -1
  215. package/lib/modules/layout/components/CommonVideoRenderer.js +13 -9
  216. package/lib/modules/layout/components/Gallery.js +11 -3
  217. package/lib/modules/layout/index.css +1 -0
  218. package/lib/modules/layout/index.d.ts +2 -0
  219. package/lib/modules/layout/index.js +4 -3
  220. package/lib/modules/layout/store.d.ts +9 -5
  221. package/lib/modules/layout/store.js +38 -46
  222. package/lib/modules/participant/components/confirm-input/index.css +4 -0
  223. package/lib/modules/participant/components/confirm-input/index.d.ts +1 -0
  224. package/lib/modules/participant/components/confirm-input/index.js +2 -1
  225. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +2 -1
  226. package/lib/modules/participant/components/participants/components/participants/index.js +11 -3
  227. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +7 -3
  228. package/lib/modules/participant/components/participants/types.d.ts +1 -0
  229. package/lib/modules/participant/store.d.ts +2 -1
  230. package/lib/modules/participant/store.js +23 -9
  231. package/lib/modules/phone-audio-connect/store.d.ts +4 -4
  232. package/lib/modules/setting/audio-settings/audio-settings.js +6 -17
  233. package/lib/modules/setting/config.d.ts +16 -0
  234. package/lib/modules/setting/config.js +17 -1
  235. package/lib/modules/setting/index.d.ts +2 -4
  236. package/lib/modules/setting/index.js +7 -16
  237. package/lib/modules/setting/minutes-settings/minutes-settings.js +0 -4
  238. package/lib/modules/setting/state/index.js +5 -5
  239. package/lib/modules/setting/store.d.ts +37 -33
  240. package/lib/modules/setting/store.js +275 -261
  241. package/lib/modules/setting/translate-settings/language-select.js +0 -2
  242. package/lib/modules/setting/video-settings/video-settings-basic.js +6 -6
  243. package/lib/modules/setting/video-settings/video-settings.js +2 -2
  244. package/lib/modules/setting/view.js +1 -1
  245. package/lib/modules/share-screen/components/control-bar/index.css +75 -0
  246. package/lib/modules/share-screen/components/control-bar/index.d.ts +3 -0
  247. package/lib/modules/share-screen/components/control-bar/index.js +88 -0
  248. package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.d.ts +8 -0
  249. package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.js +46 -0
  250. package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.d.ts +6 -0
  251. package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.js +32 -0
  252. package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.d.ts +6 -0
  253. package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.js +32 -0
  254. package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.d.ts +6 -0
  255. package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.js +32 -0
  256. package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.d.ts +6 -0
  257. package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.js +32 -0
  258. package/lib/modules/share-screen/components/selection/index.js +28 -14
  259. package/lib/modules/share-screen/components/share-scenario/index.d.ts +5 -0
  260. package/lib/modules/share-screen/components/share-scenario/index.js +47 -0
  261. package/lib/modules/share-screen/index.d.ts +4 -2
  262. package/lib/modules/share-screen/index.js +11 -2
  263. package/lib/modules/share-screen/store.d.ts +32 -11
  264. package/lib/modules/share-screen/store.js +273 -192
  265. package/lib/modules/share-screen/view.js +2 -2
  266. package/lib/modules/state-bar/index.js +2 -3
  267. package/lib/modules/state-bar/layout-config.d.ts +2 -4
  268. package/lib/modules/state-bar/layout-config.js +10 -5
  269. package/lib/modules/state-bar/live-streaming-state.js +0 -1
  270. package/lib/modules/state-bar/store.d.ts +7 -7
  271. package/lib/modules/state-bar/store.js +17 -15
  272. package/lib/modules/state-bar/view.js +19 -23
  273. package/lib/modules/video-window/components/members/index.js +3 -2
  274. package/lib/modules/video-window/index.js +0 -3
  275. package/lib/modules/waiting-room-layout/index.css +3 -3
  276. package/lib/modules/waiting-room-layout/index.js +2 -2
  277. package/lib/modules/waiting-room-layout/view.js +1 -0
  278. package/lib/modules/whiteboard/components/control-bar/index.js +2 -2
  279. package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -1
  280. package/lib/modules/whiteboard/components/control-bar/store.js +4 -2
  281. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +4 -4
  282. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +0 -14
  283. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +4 -155
  284. package/lib/modules/whiteboard/components/toolbar/store.d.ts +4 -2
  285. package/lib/modules/whiteboard/components/toolbar/store.js +37 -25
  286. package/lib/modules/whiteboard/components/toolbar/style.css +1 -0
  287. package/lib/modules/whiteboard/index.d.ts +3 -1
  288. package/lib/modules/whiteboard/index.js +26 -23
  289. package/lib/modules/widget/view.js +4 -0
  290. package/lib/providers/ability-provider.d.ts +2 -0
  291. package/lib/providers/annotation-provider.d.ts +43 -47
  292. package/lib/providers/annotation-provider.js +94 -142
  293. package/lib/providers/app-list-provider.d.ts +98 -0
  294. package/lib/providers/app-list-provider.js +251 -0
  295. package/lib/providers/device-provider.d.ts +31 -23
  296. package/lib/providers/device-provider.js +493 -444
  297. package/lib/providers/device-stream-provider.js +2 -2
  298. package/lib/providers/event-provider.d.ts +0 -4
  299. package/lib/providers/event-provider.js +0 -10
  300. package/lib/providers/interpreter-provider.js +10 -7
  301. package/lib/providers/privilege-provider.d.ts +1 -1
  302. package/lib/providers/privilege-provider.js +3 -2
  303. package/lib/providers/renderer-provider.d.ts +1 -0
  304. package/lib/providers/renderer-provider.js +7 -2
  305. package/lib/providers/room-provider.d.ts +3 -1
  306. package/lib/providers/room-provider.js +40 -14
  307. package/lib/providers/screen-share-provider.d.ts +73 -17
  308. package/lib/providers/screen-share-provider.js +222 -100
  309. package/lib/providers/sharing-provider.d.ts +0 -1
  310. package/lib/providers/sharing-provider.js +3 -9
  311. package/lib/providers/user-setting-storage-provider.d.ts +1 -0
  312. package/lib/providers/user-setting-storage-provider.js +5 -12
  313. package/lib/providers/widget-provider.d.ts +19 -0
  314. package/lib/providers/widget-provider.js +28 -2
  315. package/lib/runtime.d.ts +10 -1
  316. package/lib/scenes/main-scene.d.ts +12 -2
  317. package/lib/scenes/main-scene.js +54 -28
  318. package/lib/scenes/waiting-scene.d.ts +11 -0
  319. package/lib/scenes/waiting-scene.js +34 -8
  320. package/lib/schema.d.ts +6 -0
  321. package/lib/schema.js +5 -1
  322. package/lib/shared-data-source/annotation-data.d.ts +17 -0
  323. package/lib/shared-data-source/annotation-data.js +110 -0
  324. package/lib/shared-data-source/app-list-data.d.ts +34 -0
  325. package/lib/shared-data-source/app-list-data.js +133 -0
  326. package/lib/shared-data-source/config.d.ts +26 -7
  327. package/lib/shared-data-source/config.js +29 -11
  328. package/lib/shared-data-source/confirm-data.d.ts +25 -0
  329. package/lib/shared-data-source/confirm-data.js +97 -0
  330. package/lib/shared-data-source/interpreter.d.ts +1 -0
  331. package/lib/shared-data-source/layout-data.d.ts +2 -0
  332. package/lib/shared-data-source/layout-data.js +14 -3
  333. package/lib/shared-data-source/meeting-time.d.ts +23 -1
  334. package/lib/shared-data-source/meeting-time.js +160 -43
  335. package/lib/shared-data-source/member-data.d.ts +10 -9
  336. package/lib/shared-data-source/member-data.js +55 -48
  337. package/lib/shared-data-source/screen-share-data.d.ts +100 -17
  338. package/lib/shared-data-source/screen-share-data.js +142 -22
  339. package/lib/shared-data-source/setting.d.ts +36 -4
  340. package/lib/shared-data-source/setting.js +92 -57
  341. package/lib/shared-data-source/video-window.d.ts +3 -0
  342. package/lib/shared-data-source/video-window.js +52 -30
  343. package/lib/shared-data-source/waiting-room.js +4 -2
  344. package/lib/translations/enUS.d.ts +62 -7
  345. package/lib/translations/enUS.js +71 -14
  346. package/lib/translations/zhCN.d.ts +62 -7
  347. package/lib/translations/zhCN.js +73 -16
  348. package/lib/type.d.ts +23 -5
  349. package/lib/type.js +6 -2
  350. package/lib/ui-manager.d.ts +5 -16
  351. package/lib/ui-manager.js +15 -57
  352. package/lib/ui-scene.d.ts +31 -6
  353. package/lib/ui-scene.js +180 -169
  354. package/lib/utilities/constant.d.ts +67 -63
  355. package/lib/utilities/constant.js +65 -61
  356. package/lib/utilities/dialog-utils.d.ts +66 -0
  357. package/lib/utilities/dialog-utils.js +188 -0
  358. package/lib/utilities/logger.js +3 -3
  359. package/lib/utilities/meeting-detail.js +1 -1
  360. package/lib/utilities/parameters.d.ts +1 -0
  361. package/lib/utilities/parameters.js +5 -1
  362. package/lib/utilities/renderer-event.d.ts +1 -1
  363. package/lib/utilities/screen-capture-permission.d.ts +1 -0
  364. package/lib/utilities/screen-capture-permission.js +9 -1
  365. package/lib/utilities/tools.d.ts +0 -66
  366. package/lib/utilities/tools.js +9 -186
  367. package/package.json +5 -6
  368. package/public/index.html +11 -1
  369. package/lib/modules/action-bar/components/apps/app-list.d.ts +0 -3
  370. package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +0 -17
  371. package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -30
  372. package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +0 -10
  373. package/lib/modules/action-bar/components/apps/useBeautyBackground.js +0 -36
  374. package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +0 -14
  375. package/lib/modules/action-bar/components/apps/useInterpreter.js +0 -37
  376. package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +0 -16
  377. package/lib/modules/action-bar/components/apps/useLiveStreaming.js +0 -41
  378. package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +0 -10
  379. package/lib/modules/action-bar/components/apps/useWidgetList.js +0 -39
  380. package/lib/modules/annotation/components/control-bar/index.css +0 -48
  381. package/lib/modules/annotation/components/control-bar/index.d.ts +0 -3
  382. package/lib/modules/annotation/components/control-bar/index.js +0 -142
  383. package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
  384. package/lib/modules/annotation/components/toolbar/index.js +0 -1
  385. package/lib/modules/dialog/components/chat/electron.d.ts +0 -2
  386. package/lib/modules/dialog/components/chat/electron.js +0 -35
  387. package/lib/modules/dialog/components/chat/index.js +0 -67
  388. package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +0 -6
  389. package/lib/modules/dialog/components/connection-gateway/electron.d.ts +0 -5
  390. package/lib/modules/dialog/components/connection-gateway/electron.js +0 -33
  391. package/lib/modules/dialog/components/device-setting/electron.d.ts +0 -2
  392. package/lib/modules/dialog/components/device-setting/electron.js +0 -37
  393. package/lib/modules/dialog/components/interpreter/electron.d.ts +0 -2
  394. package/lib/modules/dialog/components/interpreter/index.js +0 -33
  395. package/lib/modules/dialog/components/invite/index.d.ts +0 -3
  396. package/lib/modules/dialog/components/live-streaming/index.d.ts +0 -4
  397. package/lib/modules/dialog/components/participant/electron.d.ts +0 -2
  398. package/lib/modules/dialog/components/participant/electron.js +0 -35
  399. package/lib/modules/dialog/components/participant/index.d.ts +0 -2
  400. package/lib/modules/dialog/components/participant/index.js +0 -65
  401. package/lib/modules/dialog/components/pre-setting/electron.d.ts +0 -2
  402. package/lib/modules/dialog/components/pre-setting/electron.js +0 -51
  403. package/lib/modules/dialog/components/pre-setting/index.js +0 -38
  404. package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +0 -8
  405. package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -78
  406. package/lib/modules/dialog/components/pre-setting-container/index.css +0 -82
  407. package/lib/modules/dialog/components/pre-setting-container/index.d.ts +0 -18
  408. package/lib/modules/dialog/components/pre-setting-container/index.js +0 -116
  409. package/lib/modules/dialog/components/rename/index.js +0 -72
  410. package/lib/modules/dialog/dialogs.d.ts +0 -3
  411. package/lib/modules/dialog/dialogs.js +0 -28
  412. package/lib/utilities/setting-config-storage.d.ts +0 -18
  413. package/lib/utilities/setting-config-storage.js +0 -133
  414. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.d.ts +0 -0
  415. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.js +0 -0
  416. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.d.ts +0 -0
  417. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.js +0 -0
  418. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.d.ts +0 -0
  419. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.js +0 -0
  420. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +0 -0
  421. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.js +0 -0
  422. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.d.ts +0 -0
  423. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.js +0 -0
  424. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.d.ts +0 -0
  425. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/style.css +0 -0
  426. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.d.ts +0 -0
  427. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.js +0 -0
  428. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/style.css +0 -0
  429. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.d.ts +0 -0
  430. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.js +0 -0
  431. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.d.ts +0 -0
  432. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.d.ts +0 -0
  433. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.js +0 -0
  434. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/style.css +0 -0
  435. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/style.css +0 -0
  436. /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.d.ts +0 -0
  437. /package/lib/modules/{action-bar/components → components}/apps/app-item/index.css +0 -0
  438. /package/lib/modules/{action-bar/components → components}/apps/app-item/index.js +0 -0
  439. /package/lib/modules/{action-bar/components → components}/apps/index.css +0 -0
  440. /package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.d.ts +0 -0
  441. /package/lib/modules/dialog/{components → dialogs}/confirm/index.d.ts +0 -0
  442. /package/lib/modules/dialog/{components → dialogs}/confirm/index.js +0 -0
  443. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.d.ts +0 -0
  444. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.d.ts +0 -0
  445. /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.js +0 -0
  446. /package/lib/modules/dialog/{components → dialogs}/control-bar/index.d.ts +0 -0
  447. /package/lib/modules/dialog/{components → dialogs}/device-setting/index.css +0 -0
  448. /package/lib/modules/dialog/{components → dialogs}/device-setting/index.d.ts +0 -0
  449. /package/lib/modules/dialog/{components → dialogs}/interpreter/index.css +0 -0
  450. /package/lib/modules/dialog/{components → dialogs}/interpreter/index.d.ts +0 -0
  451. /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.css +0 -0
  452. /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.d.ts +0 -0
  453. /package/lib/modules/dialog/{components → dialogs}/rename/index.d.ts +0 -0
  454. /package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.d.ts +0 -0
  455. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg1.png +0 -0
  456. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg2.png +0 -0
  457. /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/fcr_png_host.png +0 -0
  458. /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.d.ts +0 -0
  459. /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.js +0 -0
  460. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.css +0 -0
  461. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.d.ts +0 -0
  462. /package/lib/modules/dialog/{components → dialogs}/system-preference/index.js +0 -0
  463. /package/lib/modules/dialog/{components → dialogs}/toast/index.d.ts +0 -0
  464. /package/lib/modules/dialog/{components → dialogs}/toast/index.js +0 -0
  465. /package/lib/modules/dialog/{components → dialogs}/video-window/index.d.ts +0 -0
  466. /package/lib/modules/dialog/{components → dialogs}/whiteboard/index.d.ts +0 -0
  467. /package/lib/modules/dialog/{components → dialogs}/widget/electron.d.ts +0 -0
  468. /package/lib/modules/dialog/{components → dialogs}/widget/index.d.ts +0 -0
@@ -114,7 +114,7 @@ var _type2 = require("../type");
114
114
  var _tools = require("../utilities/tools");
115
115
  var _logger = require("../utilities/logger");
116
116
  var _FcrUIDeviceProviderImpl;
117
- var _initProto, _init__microphoneDeviceId, _init__speakerDeviceId, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_microphoneId, _init_speakerId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _setMicrophoneEnabledDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _loadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
117
+ var _initProto, _init__microphoneDevice, _init__microphone, _init__speakerDevice, _init__speaker, _init_currentIsMirror, _init_showForceOpenEffectDialog, _init_cameraId, _init_cameraEnabled, _init_showCameraPreview, _init_microphoneEnabled, _init_cameraList, _init_microphoneList, _init_microphoneVolumeLevel, _init_speakerList, _init_isLocalMirrorEnabled, _init_isLocalEditBeautyOptions, _init_speakerVolumeLevel, _init_speakerVolume, _init_microphoneVolume, _init_virtualBackgroundName, _init_enableBeauty, _init_beautyKey, _init_beautyOptions, _init_virtualBackgroundList, _init_soundEffectList, _init_microphoneDetecting, _init_speakerDetecting, _init_connectType, _init_isMainRoomAudioOff, _initDeviceListDecs, _startPlayLocalVideoDecs, _stopPlayLocalVideoDecs, _handleSpeakerDetectingChangedDecs, _startSpeakerTestDecs, _stopSpeakerTestDecs, _setCurrentIsMirrorDecs, _toggleLocalMirrorPreviewDecs, _setBeautyOptionsDecs, _handleCancelForceOpenVideoEffectDecs, _handleForceOpenVideoEffectDecs, _setCameraEnabledDecs, _handleMicrophoneAudioTrackDecs, _setMicrophoneEnabledDecs, _handleMicrophoneEnabledChangedDecs, _toggleLocalMirrorDecs, _resetMirrorDecs, _handleMicrophoneDetectingChangedDecs, _startMicrophoneTestDecs, _stopMicrophoneTestDecs, _enableVirtualBackgroundDecs, _setEditBeautyKeyDecs, _enableBeautyEffectDecs, _setCameraIdDecs, _setSpeakerIdDecs, _setMicrophoneIdDecs, _setSpeakerVolumeDecs, _setMicrophoneVolumeDecs, _loadUiResourcesDecs, _setConnectTypeDecs, _updateVirtualBackgroundListDecs, _handleSystemSelectedSpeakerChangedDecs, _handleSystemSelectedMicrophoneChangedDecs, _correctSystemSelectedMicrophoneDeviceIdDecs, _handleSpeakerTestVolumeIndicationUpdatedDecs, _handleSpeakerVolumeUpdatedDecs, _handleMicrophoneVolumeIndicationUpdatedDecs, _handleSpeakerAddedDecs, _handleSpeakerRemovedDecs, _handleSpeakerListUpdatedDecs, _setMainRoomAudioOffDecs, _ref;
118
118
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
119
119
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
120
120
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -156,19 +156,20 @@ var _Z = /*#__PURE__*/new WeakMap();
156
156
  var _a = /*#__PURE__*/new WeakMap();
157
157
  var _b = /*#__PURE__*/new WeakMap();
158
158
  var _c = /*#__PURE__*/new WeakMap();
159
- _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], _loadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerAddedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerRemovedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
159
+ _ref = (_initDeviceListDecs = [_mobx.action, _mobx.action.bound], _startPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _stopPlayLocalVideoDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerDetectingChangedDecs = [_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], _handleMicrophoneAudioTrackDecs = [_mobx.action, _mobx.action.bound], _setMicrophoneEnabledDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneEnabledChangedDecs = [_mobx.action, _mobx.action.bound], _toggleLocalMirrorDecs = [_mobx.action, _mobx.action.bound], _resetMirrorDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneDetectingChangedDecs = [_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], _loadUiResourcesDecs = [_mobx.action, _mobx.action.bound], _setConnectTypeDecs = [_mobx.action, _mobx.action.bound], _updateVirtualBackgroundListDecs = [_mobx.action, _mobx.action.bound], _handleSystemSelectedSpeakerChangedDecs = [_mobx.action, _mobx.action.bound], _handleSystemSelectedMicrophoneChangedDecs = [_mobx.action, _mobx.action.bound], _correctSystemSelectedMicrophoneDeviceIdDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerTestVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerVolumeUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleMicrophoneVolumeIndicationUpdatedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerAddedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerRemovedDecs = [_mobx.action, _mobx.action.bound], _handleSpeakerListUpdatedDecs = [_mobx.action, _mobx.action.bound], _setMainRoomAudioOffDecs = [_mobx.action, _mobx.action.bound], "logger");
160
160
  var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/function () {
161
- function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _mediaConfig, _userSettingStorageProvider) {
161
+ function FcrUIDeviceProviderImpl(_eventProvider, _mediaControl, _sharedSettingDataSource) {
162
162
  var _this = this;
163
163
  (0, _classCallCheck2["default"])(this, FcrUIDeviceProviderImpl);
164
164
  (0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createLogger)({
165
165
  prefix: 'FcrUIDeviceProviderImpl'
166
166
  })));
167
167
  (0, _defineProperty2["default"])(this, "_observable", new _imports.AgoraObservable());
168
- (0, _defineProperty2["default"])(this, "_listeners", []);
168
+ (0, _defineProperty2["default"])(this, "_disposer", []);
169
169
  (0, _defineProperty2["default"])(this, "_hasExecutedOpenCamera", false);
170
170
  (0, _defineProperty2["default"])(this, "_hasExecutedConnectAudio", false);
171
171
  (0, _defineProperty2["default"])(this, "_isAudioConnected", false);
172
+ (0, _defineProperty2["default"])(this, "_microphoneAudioTrack", null);
172
173
  (0, _defineProperty2["default"])(this, "_localVideoViewSet", new Set());
173
174
  (0, _defineProperty2["default"])(this, "_videoRotation", _type.AgoraRtcVideoOrientation.VIDEO_ORIENTATION_0);
174
175
  // 强制开启美颜
@@ -181,22 +182,44 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
181
182
  (0, _defineProperty2["default"])(this, "_microphoneObserver", {
182
183
  onVolumeIndicationUpdated: this._handleMicrophoneVolumeIndicationUpdated
183
184
  });
185
+ (0, _defineProperty2["default"])(this, "_mediaControlObserver", {
186
+ onCameraAdded: this._handleCameraListUpdated,
187
+ onCameraRemoved: this._handleCameraListUpdated,
188
+ onMicrophoneAdded: this._handleMicrophoneAdded,
189
+ onMicrophoneRemoved: this._handleMicrophoneRemoved,
190
+ onSpeakerAdded: this._handleSpeakerAdded,
191
+ onSpeakerRemoved: this._handleSpeakerRemoved,
192
+ onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
193
+ onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated,
194
+ onSystemSelectedSpeakerChanged: this._handleSystemSelectedSpeakerChanged,
195
+ onSystemSelectedMicrophoneChanged: this._handleSystemSelectedMicrophoneChanged
196
+ });
184
197
  (0, _defineProperty2["default"])(this, "_defaultMirror", true);
185
198
  (0, _defineProperty2["default"])(this, "_volumeIndicationInterval", 200);
186
199
  // real microphone device id
187
- _classPrivateFieldInitSpec(this, _A, _init__microphoneDeviceId(this, ''));
200
+ _classPrivateFieldInitSpec(this, _A, _init__microphoneDevice(this, {
201
+ id: null
202
+ }));
203
+ _classPrivateFieldInitSpec(this, _B, _init__microphone(this, {
204
+ id: DEFAULT_DEVICE_ID
205
+ }));
188
206
  // real speaker device id
189
- _classPrivateFieldInitSpec(this, _B, _init__speakerDeviceId(this, ''));
207
+ // @observable private accessor _speakerDeviceId = '';
208
+ _classPrivateFieldInitSpec(this, _C, _init__speakerDevice(this, {
209
+ id: null
210
+ }));
211
+ _classPrivateFieldInitSpec(this, _D, _init__speaker(this, {
212
+ id: DEFAULT_DEVICE_ID
213
+ }));
190
214
  // 是否开启镜像
191
- _classPrivateFieldInitSpec(this, _C, _init_currentIsMirror(this, true));
215
+ _classPrivateFieldInitSpec(this, _E, _init_currentIsMirror(this, true));
192
216
  // 是否展示展示强制开启特效弹窗
193
- _classPrivateFieldInitSpec(this, _D, _init_showForceOpenEffectDialog(this, false));
217
+ _classPrivateFieldInitSpec(this, _F, _init_showForceOpenEffectDialog(this, false));
194
218
  // selected camera id, it is the real device id
195
- _classPrivateFieldInitSpec(this, _E, _init_cameraId(this, ''));
219
+ _classPrivateFieldInitSpec(this, _G, _init_cameraId(this, ''));
196
220
  // selected microphone id, for ui display, could be 'default' or real device id
197
- _classPrivateFieldInitSpec(this, _F, _init_microphoneId(this, 'default'));
198
221
  // selected speaker id, for ui display, could be 'default' or real device id
199
- _classPrivateFieldInitSpec(this, _G, _init_speakerId(this, 'default'));
222
+ // @observable accessor speakerId = DEFAULT_DEVICE_ID;
200
223
  _classPrivateFieldInitSpec(this, _H, _init_cameraEnabled(this, false));
201
224
  _classPrivateFieldInitSpec(this, _I, _init_showCameraPreview(this, false));
202
225
  _classPrivateFieldInitSpec(this, _J, _init_microphoneEnabled(this, false));
@@ -227,27 +250,31 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
227
250
  _classPrivateFieldInitSpec(this, _c, _init_isMainRoomAudioOff(this, false));
228
251
  this._eventProvider = _eventProvider;
229
252
  this._mediaControl = _mediaControl;
230
- this._mediaConfig = _mediaConfig;
231
- this._userSettingStorageProvider = _userSettingStorageProvider;
232
- this._listeners.push((0, _mobx.reaction)(function () {
253
+ this._sharedSettingDataSource = _sharedSettingDataSource;
254
+ this._disposer.push((0, _mobx.reaction)(function () {
233
255
  return _this.cameraId;
234
- }, this._handleCameraChanged));
235
- _mediaControl.addObserver({
236
- onCameraAdded: this._handleCameraListUpdated,
237
- onCameraRemoved: this._handleCameraListUpdated,
238
- onMicrophoneAdded: this._handleMicrophoneAdded,
239
- onMicrophoneRemoved: this._handleMicrophoneRemoved,
240
- onSpeakerAdded: this._handleSpeakerAdded,
241
- onSpeakerRemoved: this._handleSpeakerRemoved,
242
- onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
243
- onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated
244
- });
256
+ }, this._handleCameraChanged), (0, _mobx.reaction)(function () {
257
+ return _this.microphoneEnabled;
258
+ }, this._handleMicrophoneEnabledChanged), (0, _mobx.reaction)(function () {
259
+ return _this._microphone;
260
+ }, this._handleMicrophoneIdChanged), (0, _mobx.reaction)(function () {
261
+ return _this._microphoneDevice;
262
+ }, this._handleMicrophoneDeviceIdChanged), (0, _mobx.reaction)(function () {
263
+ return _this._speaker;
264
+ }, this._handleSpeakerIdChanged), (0, _mobx.reaction)(function () {
265
+ return _this._speakerDevice;
266
+ }, this._handleSpeakerDeviceIdChanged), (0, _mobx.reaction)(function () {
267
+ return _this.speakerDetecting;
268
+ }, this._handleSpeakerDetectingChanged), (0, _mobx.reaction)(function () {
269
+ return _this.microphoneDetecting;
270
+ }, this._handleMicrophoneDetectingChanged));
271
+ this._mediaControl.addObserver(this._mediaControlObserver);
245
272
  (0, _mobx.runInAction)(function () {
246
273
  _this.speakerVolume = _this._mediaControl.getSelectedSpeakerVolume();
247
274
  });
248
275
  }
249
276
  return (0, _createClass2["default"])(FcrUIDeviceProviderImpl, [{
250
- key: "_microphoneDeviceId",
277
+ key: "_microphoneDevice",
251
278
  get: function get() {
252
279
  return _classPrivateFieldGet(_A, this);
253
280
  },
@@ -255,7 +282,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
255
282
  _classPrivateFieldSet(_A, this, v);
256
283
  }
257
284
  }, {
258
- key: "_speakerDeviceId",
285
+ key: "_microphone",
259
286
  get: function get() {
260
287
  return _classPrivateFieldGet(_B, this);
261
288
  },
@@ -263,7 +290,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
263
290
  _classPrivateFieldSet(_B, this, v);
264
291
  }
265
292
  }, {
266
- key: "currentIsMirror",
293
+ key: "_speakerDevice",
267
294
  get: function get() {
268
295
  return _classPrivateFieldGet(_C, this);
269
296
  },
@@ -271,7 +298,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
271
298
  _classPrivateFieldSet(_C, this, v);
272
299
  }
273
300
  }, {
274
- key: "showForceOpenEffectDialog",
301
+ key: "_speaker",
275
302
  get: function get() {
276
303
  return _classPrivateFieldGet(_D, this);
277
304
  },
@@ -279,7 +306,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
279
306
  _classPrivateFieldSet(_D, this, v);
280
307
  }
281
308
  }, {
282
- key: "cameraId",
309
+ key: "currentIsMirror",
283
310
  get: function get() {
284
311
  return _classPrivateFieldGet(_E, this);
285
312
  },
@@ -287,7 +314,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
287
314
  _classPrivateFieldSet(_E, this, v);
288
315
  }
289
316
  }, {
290
- key: "microphoneId",
317
+ key: "showForceOpenEffectDialog",
291
318
  get: function get() {
292
319
  return _classPrivateFieldGet(_F, this);
293
320
  },
@@ -295,7 +322,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
295
322
  _classPrivateFieldSet(_F, this, v);
296
323
  }
297
324
  }, {
298
- key: "speakerId",
325
+ key: "cameraId",
299
326
  get: function get() {
300
327
  return _classPrivateFieldGet(_G, this);
301
328
  },
@@ -541,23 +568,23 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
541
568
  }, {
542
569
  key: "ifNeedExecuteAutoConnectAudio",
543
570
  value: function ifNeedExecuteAutoConnectAudio() {
544
- return this._mediaConfig.autoConnectAudio && !this._hasExecutedConnectAudio;
571
+ return this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
545
572
  }
546
573
  }, {
547
574
  key: "ifNeedExecuteConnectAudioOption",
548
575
  value: function ifNeedExecuteConnectAudioOption() {
549
- return !this._mediaConfig.autoConnectAudio && !this._hasExecutedConnectAudio;
576
+ return !this._sharedSettingDataSource.media.autoConnectAudio && !this._hasExecutedConnectAudio;
550
577
  }
551
578
  }, {
552
579
  key: "ifNeedExecuteOpenCamera",
553
580
  value: function ifNeedExecuteOpenCamera() {
554
- return !this._hasExecutedOpenCamera && !this._mediaConfig.cameraExpectedOff;
581
+ return !this._hasExecutedOpenCamera && !this._sharedSettingDataSource.media.cameraExpectedOff;
555
582
  }
556
583
  }, {
557
584
  key: "connectAudio",
558
585
  value: function connectAudio(includeMicrophone) {
559
586
  if (includeMicrophone) {
560
- var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._mediaConfig.microphoneExpectedOff;
587
+ var dontNeedOpenMicrophone = !this._hasExecutedConnectAudio && this._sharedSettingDataSource.media.microphoneExpectedOff;
561
588
  if (!dontNeedOpenMicrophone) {
562
589
  this.setMicrophoneEnabled(true);
563
590
  }
@@ -590,6 +617,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
590
617
  this.setConnectType(_type2.FcrUIConnectType.NONE);
591
618
  this._observable.notifyObservers('onAudioDisconnected');
592
619
  }
620
+ }, {
621
+ key: "speakerId",
622
+ get: function get() {
623
+ return this._speaker.id;
624
+ }
625
+ }, {
626
+ key: "microphoneId",
627
+ get: function get() {
628
+ return this._microphone.id;
629
+ }
593
630
  }, {
594
631
  key: "defaultMirror",
595
632
  get: function get() {
@@ -598,12 +635,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
598
635
  }, {
599
636
  key: "followSystemMicrophoneDevice",
600
637
  get: function get() {
601
- return this.microphoneId === DEFAULT_DEVICE_ID;
638
+ return this._microphone.id === DEFAULT_DEVICE_ID;
602
639
  }
603
640
  }, {
604
641
  key: "followSystemSpeakerDevice",
605
642
  get: function get() {
606
- return this.speakerId === DEFAULT_DEVICE_ID;
643
+ return this._speaker.id === DEFAULT_DEVICE_ID;
607
644
  }
608
645
  }, {
609
646
  key: "lastEnableVideoEffectType",
@@ -618,8 +655,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
618
655
  get: function get() {
619
656
  return {
620
657
  cameraDeviceId: this.cameraId,
621
- microphoneDeviceId: this._microphoneDeviceId,
622
- speakerDeviceId: this._speakerDeviceId
658
+ microphoneDeviceId: this._microphoneDevice.id || '',
659
+ speakerDeviceId: this._speakerDevice.id || ''
623
660
  };
624
661
  }
625
662
  }, {
@@ -630,7 +667,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
630
667
  }, {
631
668
  key: "shouldEnableMicBeforeSession",
632
669
  get: function get() {
633
- return !this._mediaConfig.microphoneExpectedOff && this._mediaConfig.autoConnectAudio;
670
+ return !this._sharedSettingDataSource.media.microphoneExpectedOff && this._sharedSettingDataSource.media.autoConnectAudio;
634
671
  }
635
672
  }, {
636
673
  key: "getScreenTrack",
@@ -670,76 +707,36 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
670
707
  }, {
671
708
  key: "microphoneTrack",
672
709
  get: function get() {
673
- return this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
674
- }
675
- }, {
676
- key: "_initLocalSetting",
677
- value: function _initLocalSetting() {
678
- var _this$_userSettingSto;
679
- var value = (_this$_userSettingSto = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto === void 0 ? void 0 : _this$_userSettingSto.setting;
680
- if (value) {
681
- var _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
682
- var _microphoneVolume = (_value$microphoneVolu = value.microphoneVolume) !== null && _value$microphoneVolu !== void 0 ? _value$microphoneVolu : this.microphoneVolume;
683
- var _isLocalMirrorEnabled = (_value$isLocalMirrorE = value.isLocalMirrorEnabled) !== null && _value$isLocalMirrorE !== void 0 ? _value$isLocalMirrorE : this.isLocalMirrorEnabled;
684
- var editBeautyKey = (_value$editBeautyKey = value.editBeautyKey) !== null && _value$editBeautyKey !== void 0 ? _value$editBeautyKey : this.beautyKey;
685
- this.setEditBeautyKey(editBeautyKey);
686
- this.toggleLocalMirror(_isLocalMirrorEnabled);
687
- this.setMicrophoneVolume(_microphoneVolume);
688
- }
710
+ return this._microphoneDevice.id ? this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id) : null;
689
711
  }
690
712
  }, {
691
- key: "init",
713
+ key: "initDeviceList",
692
714
  value: function () {
693
- var _init = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
715
+ var _initDeviceList = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
694
716
  var _this2 = this;
695
- var res;
696
717
  return _regenerator["default"].wrap(function (_context5) {
697
718
  while (1) switch (_context5.prev = _context5.next) {
698
719
  case 0:
699
- _context5.next = 1;
700
- return Promise.allSettled([this._mediaControl.getCameraList().then(function (list) {
720
+ return _context5.abrupt("return", Promise.all([this._mediaControl.getCameraList().then(function (list) {
701
721
  (0, _mobx.runInAction)(function () {
702
722
  _this2.logger.info('[FcrDeviceStore] init camera list:', list);
703
723
  _this2.cameraList = list;
704
724
  if (_this2.cameraList.length > 0) {
705
- var _this2$_userSettingSt;
706
- var _cameraId = _this2.cameraList[0].deviceId;
707
- var defaultCameraDeviceId = _this2._getDefaultDeviceId({
708
- initValue: _cameraId,
709
- localKey: 'cameraDeviceId',
710
- list: _this2.cameraList
711
- });
725
+ var defaultCameraDeviceId = _this2.cameraList[0].deviceId;
712
726
  _this2.logger.info('[FcrDeviceStore] select default camera id:', defaultCameraDeviceId);
713
727
  _this2.setCameraId(defaultCameraDeviceId);
714
- var localSetting = (_this2$_userSettingSt = _this2._userSettingStorageProvider.read()) === null || _this2$_userSettingSt === void 0 ? void 0 : _this2$_userSettingSt.setting;
715
- if (localSetting) {
716
- var _localSetting$enableB, _localSetting$beautyO;
717
- if (localSetting.enable) {
718
- _this2.enableVirtualBackground(localSetting.enable, localSetting.source);
719
- }
720
- var _enableBeauty = (_localSetting$enableB = localSetting.enableBeauty) !== null && _localSetting$enableB !== void 0 ? _localSetting$enableB : _this2.enableBeauty;
721
- var _beautyOptions = (_localSetting$beautyO = localSetting.beautyOptions) !== null && _localSetting$beautyO !== void 0 ? _localSetting$beautyO : _this2.beautyOptions;
722
- _this2.enableBeautyEffect(_enableBeauty);
723
- _this2.setBeautyOptions(_beautyOptions);
724
- }
725
728
  }
726
729
  });
727
730
  }), this._getMicrophoneList().then(/*#__PURE__*/function () {
728
731
  var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(microphoneList) {
729
- var defaultMicrophoneDeviceId;
730
732
  return _regenerator["default"].wrap(function (_context3) {
731
733
  while (1) switch (_context3.prev = _context3.next) {
732
734
  case 0:
733
735
  _this2.microphoneList = microphoneList;
734
736
  _this2.logger.info('[FcrDeviceStore] init microphone list:', microphoneList);
735
737
  // 默认跟随系统
736
- defaultMicrophoneDeviceId = _this2._getDefaultDeviceId({
737
- initValue: DEFAULT_DEVICE_ID,
738
- localKey: 'microphoneDeviceId',
739
- list: _this2.microphoneList
740
- });
741
738
  _context3.next = 1;
742
- return _this2.setMicrophoneId(defaultMicrophoneDeviceId);
739
+ return _this2.setMicrophoneId(DEFAULT_DEVICE_ID);
743
740
  case 1:
744
741
  case "end":
745
742
  return _context3.stop();
@@ -751,20 +748,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
751
748
  };
752
749
  }()), this._getSpeakerList().then(/*#__PURE__*/function () {
753
750
  var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(speakerList) {
754
- var defaultSpeakerDeviceId;
755
751
  return _regenerator["default"].wrap(function (_context4) {
756
752
  while (1) switch (_context4.prev = _context4.next) {
757
753
  case 0:
758
754
  _this2.speakerList = speakerList;
759
755
  _this2.logger.info('[FcrDeviceStore] init speaker list:', speakerList);
760
756
  // 默认跟随系统
761
- defaultSpeakerDeviceId = _this2._getDefaultDeviceId({
762
- initValue: DEFAULT_DEVICE_ID,
763
- localKey: 'speakerDeviceId',
764
- list: _this2.speakerList
765
- });
766
757
  _context4.next = 1;
767
- return _this2.setSpeakerId(defaultSpeakerDeviceId);
758
+ return _this2.setSpeakerId(DEFAULT_DEVICE_ID);
768
759
  case 1:
769
760
  case "end":
770
761
  return _context4.stop();
@@ -774,21 +765,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
774
765
  return function (_x2) {
775
766
  return _ref3.apply(this, arguments);
776
767
  };
777
- }())]);
768
+ }())]));
778
769
  case 1:
779
- res = _context5.sent;
780
- this._initLocalSetting();
781
- return _context5.abrupt("return", res);
782
- case 2:
783
770
  case "end":
784
771
  return _context5.stop();
785
772
  }
786
773
  }, _callee5, this);
787
774
  }));
788
- function init() {
789
- return _init.apply(this, arguments);
775
+ function initDeviceList() {
776
+ return _initDeviceList.apply(this, arguments);
790
777
  }
791
- return init;
778
+ return initDeviceList;
792
779
  }()
793
780
  }, {
794
781
  key: "addObserver",
@@ -821,35 +808,45 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
821
808
  this._localVideoViewSet["delete"](view);
822
809
  (_this$_cameraVideoTra = this._cameraVideoTrack) === null || _this$_cameraVideoTra === void 0 || _this$_cameraVideoTra.stopPreview(view);
823
810
  }
811
+ }, {
812
+ key: "_handleSpeakerDetectingChanged",
813
+ value: function _handleSpeakerDetectingChanged() {
814
+ var _this3 = this;
815
+ if (this.microphoneEnabled) {
816
+ if (this.speakerDetecting) {
817
+ var _this$_microphoneAudi;
818
+ (_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 || _this$_microphoneAudi.stop();
819
+ } else {
820
+ var _this$_microphoneAudi2;
821
+ (_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 || _this$_microphoneAudi2.start();
822
+ }
823
+ }
824
+ this._playAudioTimer && clearInterval(this._playAudioTimer);
825
+ if (this.speakerDetecting) {
826
+ var startSelectedSpeakerTest = function startSelectedSpeakerTest() {
827
+ var _this3$soundEffectLis, _this3$soundEffectLis2;
828
+ var soundUrl = (0, _env.isElectron)() ? (_this3$soundEffectLis = _this3.soundEffectList.get('speaker_test')) === null || _this3$soundEffectLis === void 0 ? void 0 : _this3$soundEffectLis.md5Url : (_this3$soundEffectLis2 = _this3.soundEffectList.get('speaker_test')) === null || _this3$soundEffectLis2 === void 0 ? void 0 : _this3$soundEffectLis2.url;
829
+ _this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', _this3._volumeIndicationInterval);
830
+ };
831
+ startSelectedSpeakerTest();
832
+ var sleep = 3000;
833
+ this._playAudioTimer = setInterval(function () {
834
+ startSelectedSpeakerTest();
835
+ }, sleep);
836
+ } else {
837
+ this._mediaControl.stopSelectedSpeakerTest();
838
+ this.speakerVolumeLevel = 0;
839
+ }
840
+ }
824
841
  }, {
825
842
  key: "startSpeakerTest",
826
843
  value: function startSpeakerTest() {
827
- var _this$_microphoneAudi,
828
- _this$soundEffectList,
829
- _this$soundEffectList2,
830
- _this3 = this;
831
- if (!this._speakerDeviceId) return;
832
- this.microphoneEnabled && ((_this$_microphoneAudi = this._microphoneAudioTrack) === null || _this$_microphoneAudi === void 0 ? void 0 : _this$_microphoneAudi.stop());
833
- this._mediaControl.setSelectedSpeaker(this._speakerDeviceId);
834
- 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;
835
- var interval = this._volumeIndicationInterval;
836
- var sleep = 3000;
837
- this._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
838
844
  this.speakerDetecting = true;
839
- this._playAudioTimer && clearInterval(this._playAudioTimer);
840
- this._playAudioTimer = setInterval(function () {
841
- _this3._mediaControl.startSelectedSpeakerTest(soundUrl || '', interval);
842
- }, sleep);
843
845
  }
844
846
  }, {
845
847
  key: "stopSpeakerTest",
846
848
  value: function stopSpeakerTest() {
847
- var _this$_microphoneAudi2;
848
- this.speakerVolumeLevel = 0;
849
- this.microphoneEnabled && ((_this$_microphoneAudi2 = this._microphoneAudioTrack) === null || _this$_microphoneAudi2 === void 0 ? void 0 : _this$_microphoneAudi2.start());
850
849
  this.speakerDetecting = false;
851
- this._playAudioTimer && clearInterval(this._playAudioTimer);
852
- this._mediaControl.stopSelectedSpeakerTest();
853
850
  }
854
851
  }, {
855
852
  key: "setCurrentIsMirror",
@@ -929,32 +926,28 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
929
926
  this.cameraEnabled = enable;
930
927
  }
931
928
  }, {
932
- key: "setMicrophoneEnabled",
933
- value: function setMicrophoneEnabled(enable) {
934
- var _this5 = this;
929
+ key: "_handleMicrophoneAudioTrack",
930
+ value: function _handleMicrophoneAudioTrack() {
935
931
  var microphoneTrack = this._microphoneAudioTrack;
936
- if (enable) {
937
- microphoneTrack === null || microphoneTrack === void 0 || microphoneTrack.start();
932
+ if (!microphoneTrack) return;
933
+ if (this.microphoneEnabled) {
934
+ var _this$_microphoneAudi3;
935
+ (_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.start();
938
936
  } else {
939
- microphoneTrack === null || microphoneTrack === void 0 || microphoneTrack.stop();
937
+ var _this$_microphoneAudi4;
938
+ (_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.stop();
940
939
  this.microphoneVolumeLevel = 0;
941
940
  }
941
+ }
942
+ }, {
943
+ key: "setMicrophoneEnabled",
944
+ value: function setMicrophoneEnabled(enable) {
942
945
  this.microphoneEnabled = enable;
943
-
944
- // 如果当前是跟随系统,应该重新获取一次当前系统默认麦克风设备,因为系统默认设备变更没有事件,这里需要进行纠正,否则重新开启设备时,开启的设备就是错的
945
- if (this.followSystemMicrophoneDevice) {
946
- this._mediaControl.getSystemSelectedMicrophone().then(function (deviceInfo) {
947
- var systemSelectedMicrophoneId = deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.deviceId;
948
- if (systemSelectedMicrophoneId && systemSelectedMicrophoneId !== _this5._microphoneDeviceId) {
949
- _this5.logger.info('[FcrDeviceStore] system selected microphone id changed, need update microphone track');
950
- (0, _mobx.runInAction)(function () {
951
- _this5._microphoneDeviceId = systemSelectedMicrophoneId;
952
- });
953
- _this5._refreshMicrophoneTrack();
954
- _this5._observable.notifyObservers('onMicrophoneChanged', _this5._microphoneDeviceId);
955
- }
956
- });
957
- }
946
+ }
947
+ }, {
948
+ key: "_handleMicrophoneEnabledChanged",
949
+ value: function _handleMicrophoneEnabledChanged() {
950
+ this._handleMicrophoneAudioTrack();
958
951
  }
959
952
  }, {
960
953
  key: "toggleLocalMirror",
@@ -969,21 +962,27 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
969
962
  this.isLocalMirrorEnabled = false;
970
963
  this.setCurrentIsMirror(false);
971
964
  }
965
+ }, {
966
+ key: "_handleMicrophoneDetectingChanged",
967
+ value: function _handleMicrophoneDetectingChanged() {
968
+ if (this.microphoneDetecting) {
969
+ var _this$_microphoneAudi5;
970
+ (_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.startTest(this._volumeIndicationInterval);
971
+ } else {
972
+ var _this$_microphoneAudi6;
973
+ (_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stopTest();
974
+ this.microphoneVolumeLevel = 0;
975
+ }
976
+ }
972
977
  }, {
973
978
  key: "startMicrophoneTest",
974
979
  value: function startMicrophoneTest() {
975
- var _this$_microphoneAudi3;
976
- if (!this._microphoneDeviceId) return;
977
980
  this.microphoneDetecting = true;
978
- (_this$_microphoneAudi3 = this._microphoneAudioTrack) === null || _this$_microphoneAudi3 === void 0 || _this$_microphoneAudi3.startTest(this._volumeIndicationInterval);
979
981
  }
980
982
  }, {
981
983
  key: "stopMicrophoneTest",
982
984
  value: function stopMicrophoneTest() {
983
- var _this$_microphoneAudi4;
984
- this.microphoneVolumeLevel = 0;
985
985
  this.microphoneDetecting = false;
986
- (_this$_microphoneAudi4 = this._microphoneAudioTrack) === null || _this$_microphoneAudi4 === void 0 || _this$_microphoneAudi4.stopTest();
987
986
  }
988
987
  }, {
989
988
  key: "enableVirtualBackground",
@@ -1045,8 +1044,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1045
1044
  }, {
1046
1045
  key: "enableAudioHiFiMode",
1047
1046
  value: function enableAudioHiFiMode(enable) {
1048
- if (!this._microphoneDeviceId) return;
1049
- var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1047
+ if (!this._microphoneDevice.id) return;
1048
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
1050
1049
  if (enable) {
1051
1050
  microphoneAudioTrack.getAudioEffectEnhancer().enableHiFiMode();
1052
1051
  return;
@@ -1058,8 +1057,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1058
1057
  }, {
1059
1058
  key: "enableAudioEchoCancellation",
1060
1059
  value: function enableAudioEchoCancellation(enable) {
1061
- if (!this._microphoneDeviceId) return;
1062
- var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1060
+ if (!this._microphoneDevice.id) return;
1061
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
1063
1062
  if (enable) {
1064
1063
  microphoneAudioTrack.getAudioEffectEnhancer().enableEchoCancellation();
1065
1064
  return;
@@ -1071,8 +1070,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1071
1070
  }, {
1072
1071
  key: "enableAudioStereo",
1073
1072
  value: function enableAudioStereo(enable) {
1074
- if (!this._microphoneDeviceId) return;
1075
- var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1073
+ if (!this._microphoneDevice.id) return;
1074
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
1076
1075
  if (enable) {
1077
1076
  microphoneAudioTrack.getAudioEffectEnhancer().enableStereoMode();
1078
1077
  return;
@@ -1084,8 +1083,8 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1084
1083
  }, {
1085
1084
  key: "setNoiseLevel",
1086
1085
  value: function setNoiseLevel(level) {
1087
- if (!this._microphoneDeviceId) return;
1088
- var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1086
+ if (!this._microphoneDevice.id) return;
1087
+ var microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
1089
1088
  if (level === _type2.FcrUIAiDenoiseLevel.CLOSE) {
1090
1089
  microphoneAudioTrack.getAudioEffectEnhancer().disableAiDenoiser();
1091
1090
  } else {
@@ -1113,122 +1112,122 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1113
1112
  this._observable.notifyObservers('onCameraChanged', cameraId);
1114
1113
  }
1115
1114
  }, {
1116
- key: "setSpeakerId",
1115
+ key: "_handleMicrophoneIdChanged",
1117
1116
  value: function () {
1118
- var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(speakerId) {
1119
- var _this6 = this;
1120
- var speakerDeviceId, defaultDevice;
1117
+ var _handleMicrophoneIdChanged2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
1121
1118
  return _regenerator["default"].wrap(function (_context6) {
1122
1119
  while (1) switch (_context6.prev = _context6.next) {
1123
1120
  case 0:
1124
- if (!(speakerId !== DEFAULT_DEVICE_ID && this.speakerId === speakerId)) {
1125
- _context6.next = 1;
1126
- break;
1121
+ if (!this.followSystemMicrophoneDevice) {
1122
+ this._microphoneDevice = {
1123
+ id: this._microphone.id
1124
+ };
1125
+ } else {
1126
+ this._correctSystemSelectedMicrophoneDeviceId();
1127
1127
  }
1128
- return _context6.abrupt("return");
1128
+ this._mediaControl.observeSystemSelectedMicrophoneChanged(this.followSystemMicrophoneDevice);
1129
1129
  case 1:
1130
- if (!speakerId) {
1131
- _context6.next = 4;
1132
- break;
1133
- }
1134
- speakerDeviceId = speakerId;
1135
- if (!(speakerId === DEFAULT_DEVICE_ID)) {
1136
- _context6.next = 3;
1137
- break;
1138
- }
1139
- _context6.next = 2;
1140
- return this._mediaControl.getSystemSelectedSpeaker();
1141
- case 2:
1142
- defaultDevice = _context6.sent;
1143
- speakerDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
1144
- case 3:
1145
- if (speakerDeviceId) {
1146
- this._mediaControl.setSelectedSpeaker(speakerDeviceId);
1147
- }
1148
- (0, _mobx.runInAction)(function () {
1149
- _this6._speakerDeviceId = speakerDeviceId;
1150
- _this6.speakerId = speakerId;
1151
- });
1152
- _context6.next = 5;
1153
- break;
1154
- case 4:
1155
- this._speakerDeviceId = speakerId;
1156
- this.speakerId = speakerId;
1157
- case 5:
1158
- this._mediaControl.followSystemSpeaker(speakerId === DEFAULT_DEVICE_ID);
1159
- this._observable.notifyObservers('onSpeakerChanged', this._speakerDeviceId);
1160
- case 6:
1161
1130
  case "end":
1162
1131
  return _context6.stop();
1163
1132
  }
1164
1133
  }, _callee6, this);
1165
1134
  }));
1166
- function setSpeakerId(_x3) {
1167
- return _setSpeakerId.apply(this, arguments);
1135
+ function _handleMicrophoneIdChanged() {
1136
+ return _handleMicrophoneIdChanged2.apply(this, arguments);
1168
1137
  }
1169
- return setSpeakerId;
1138
+ return _handleMicrophoneIdChanged;
1170
1139
  }()
1171
1140
  }, {
1172
- key: "setMicrophoneId",
1141
+ key: "_handleMicrophoneDeviceIdChanged",
1142
+ value: function _handleMicrophoneDeviceIdChanged() {
1143
+ if (!this._microphoneDevice.id) {
1144
+ this.logger.debug('setSelectedMicrophone failed');
1145
+ this._microphone.id = DEFAULT_DEVICE_ID;
1146
+ } else {
1147
+ var _this$_microphoneAudi7, _this$_microphoneAudi8;
1148
+ (_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.removeObserver(this._microphoneObserver);
1149
+ (_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
1150
+ this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDevice.id);
1151
+ this._microphoneAudioTrack.addObserver(this._microphoneObserver);
1152
+ this._handleMicrophoneAudioTrack();
1153
+ this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDevice.id);
1154
+ this.setNoiseLevel(this._sharedSettingDataSource.setting.noiseReduce);
1155
+ }
1156
+ }
1157
+ }, {
1158
+ key: "_handleSpeakerDeviceIdChanged",
1159
+ value: function _handleSpeakerDeviceIdChanged() {
1160
+ if (!this._speakerDevice.id) {
1161
+ this.logger.debug('setSelectedSpeaker failed');
1162
+ this._speaker.id = DEFAULT_DEVICE_ID;
1163
+ } else {
1164
+ this._mediaControl.setSelectedSpeaker(this._speakerDevice.id);
1165
+ this._observable.notifyObservers('onSpeakerChanged', this._speakerDevice.id);
1166
+ }
1167
+ }
1168
+ }, {
1169
+ key: "_handleSpeakerIdChanged",
1173
1170
  value: function () {
1174
- var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(microphoneId) {
1175
- var _this$_microphoneAudi5,
1176
- _this$_microphoneAudi6,
1177
- _this7 = this;
1178
- var microphoneDeviceId, defaultDevice, _microphoneTrack;
1171
+ var _handleSpeakerIdChanged2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
1179
1172
  return _regenerator["default"].wrap(function (_context7) {
1180
1173
  while (1) switch (_context7.prev = _context7.next) {
1181
1174
  case 0:
1182
- if (!(microphoneId !== DEFAULT_DEVICE_ID && this.microphoneId === microphoneId)) {
1183
- _context7.next = 1;
1184
- break;
1175
+ if (!this.followSystemSpeakerDevice) {
1176
+ this._speakerDevice = {
1177
+ id: this._speaker.id
1178
+ };
1179
+ } else {
1180
+ this._correctSystemSpeakerDeviceId();
1185
1181
  }
1186
- return _context7.abrupt("return");
1182
+ this._mediaControl.observeSystemSelectedSpeakerChanged(this.followSystemSpeakerDevice);
1187
1183
  case 1:
1188
- (_this$_microphoneAudi5 = this._microphoneAudioTrack) === null || _this$_microphoneAudi5 === void 0 || _this$_microphoneAudi5.removeObserver(this._microphoneObserver);
1189
- (_this$_microphoneAudi6 = this._microphoneAudioTrack) === null || _this$_microphoneAudi6 === void 0 || _this$_microphoneAudi6.stop();
1190
- this.stopMicrophoneTest();
1191
- if (!microphoneId) {
1192
- _context7.next = 4;
1193
- break;
1194
- }
1195
- microphoneDeviceId = microphoneId;
1196
- if (!(microphoneDeviceId === DEFAULT_DEVICE_ID)) {
1197
- _context7.next = 3;
1198
- break;
1199
- }
1200
- _context7.next = 2;
1201
- return this._mediaControl.getSystemSelectedMicrophone();
1202
- case 2:
1203
- defaultDevice = _context7.sent;
1204
- microphoneDeviceId = (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || '';
1205
- case 3:
1206
- if (microphoneDeviceId) {
1207
- _microphoneTrack = this._mediaControl.getMicrophoneTrack(microphoneDeviceId);
1208
- _microphoneTrack.addObserver(this._microphoneObserver);
1209
- if (this.microphoneEnabled) {
1210
- _microphoneTrack.start();
1211
- }
1212
- this._microphoneAudioTrack = _microphoneTrack;
1213
- }
1214
- (0, _mobx.runInAction)(function () {
1215
- _this7._microphoneDeviceId = microphoneDeviceId;
1216
- _this7.microphoneId = microphoneId;
1217
- });
1218
- _context7.next = 5;
1219
- break;
1220
- case 4:
1221
- this._microphoneDeviceId = microphoneId;
1222
- this.microphoneId = microphoneId;
1223
- case 5:
1224
- this._mediaControl.followSystemMicrophone(microphoneId === DEFAULT_DEVICE_ID);
1225
- this._observable.notifyObservers('onMicrophoneChanged', this._microphoneDeviceId);
1226
- case 6:
1227
1184
  case "end":
1228
1185
  return _context7.stop();
1229
1186
  }
1230
1187
  }, _callee7, this);
1231
1188
  }));
1189
+ function _handleSpeakerIdChanged() {
1190
+ return _handleSpeakerIdChanged2.apply(this, arguments);
1191
+ }
1192
+ return _handleSpeakerIdChanged;
1193
+ }()
1194
+ }, {
1195
+ key: "setSpeakerId",
1196
+ value: function () {
1197
+ var _setSpeakerId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(speakerId) {
1198
+ return _regenerator["default"].wrap(function (_context8) {
1199
+ while (1) switch (_context8.prev = _context8.next) {
1200
+ case 0:
1201
+ this._speaker = {
1202
+ id: speakerId
1203
+ };
1204
+ case 1:
1205
+ case "end":
1206
+ return _context8.stop();
1207
+ }
1208
+ }, _callee8, this);
1209
+ }));
1210
+ function setSpeakerId(_x3) {
1211
+ return _setSpeakerId.apply(this, arguments);
1212
+ }
1213
+ return setSpeakerId;
1214
+ }()
1215
+ }, {
1216
+ key: "setMicrophoneId",
1217
+ value: function () {
1218
+ var _setMicrophoneId = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(microphoneId) {
1219
+ return _regenerator["default"].wrap(function (_context9) {
1220
+ while (1) switch (_context9.prev = _context9.next) {
1221
+ case 0:
1222
+ this._microphone = {
1223
+ id: microphoneId
1224
+ };
1225
+ case 1:
1226
+ case "end":
1227
+ return _context9.stop();
1228
+ }
1229
+ }, _callee9, this);
1230
+ }));
1232
1231
  function setMicrophoneId(_x4) {
1233
1232
  return _setMicrophoneId.apply(this, arguments);
1234
1233
  }
@@ -1243,9 +1242,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1243
1242
  }, {
1244
1243
  key: "setMicrophoneVolume",
1245
1244
  value: function setMicrophoneVolume(value) {
1246
- var _this$_microphoneAudi7;
1245
+ var _this$_microphoneAudi9;
1247
1246
  this.microphoneVolume = value;
1248
- (_this$_microphoneAudi7 = this._microphoneAudioTrack) === null || _this$_microphoneAudi7 === void 0 || _this$_microphoneAudi7.adjustVolume(value);
1247
+ (_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.adjustVolume(value);
1249
1248
  }
1250
1249
  }, {
1251
1250
  key: "startOrStopCamera",
@@ -1271,14 +1270,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1271
1270
  }, {
1272
1271
  key: "loadUiResources",
1273
1272
  value: function () {
1274
- var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8(uiResource) {
1275
- var _this8 = this;
1273
+ var _loadUiResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(uiResource) {
1274
+ var _this5 = this;
1276
1275
  var _uiResource$virtualBa, _uiResource$virtualBa2, _uiResource$soundEffe, images, videos, soundEffects, newList, imageInfoList, videoInfoList, _uiResource$virtualBa3, _uiResource$virtualBa4, _uiResource$soundEffe2, _images, _videos, _soundEffects, handleResourceReady;
1277
- return _regenerator["default"].wrap(function (_context8) {
1278
- while (1) switch (_context8.prev = _context8.next) {
1276
+ return _regenerator["default"].wrap(function (_context0) {
1277
+ while (1) switch (_context0.prev = _context0.next) {
1279
1278
  case 0:
1280
1279
  if ((0, _env.isElectron)()) {
1281
- _context8.next = 1;
1280
+ _context0.next = 1;
1282
1281
  break;
1283
1282
  }
1284
1283
  images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa === void 0 ? void 0 : _uiResource$virtualBa.filter(function (url) {
@@ -1310,7 +1309,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1310
1309
  }) || [];
1311
1310
  newList = newList.concat(videoInfoList);
1312
1311
  (0, _mobx.runInAction)(function () {
1313
- _this8._updateVirtualBackgroundList(newList);
1312
+ _this5._updateVirtualBackgroundList(newList);
1314
1313
  var soundEffectInfoList = soundEffects.map(function (url) {
1315
1314
  return {
1316
1315
  url: url,
@@ -1318,13 +1317,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1318
1317
  };
1319
1318
  }) || [];
1320
1319
  soundEffectInfoList.forEach(function (item) {
1321
- _this8.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
1320
+ _this5.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
1322
1321
  });
1323
1322
  });
1324
- _context8.next = 3;
1323
+ _context0.next = 3;
1325
1324
  break;
1326
1325
  case 1:
1327
- _context8.next = 2;
1326
+ _context0.next = 2;
1328
1327
  return this._loadBuiltinResources();
1329
1328
  case 2:
1330
1329
  _images = (uiResource === null || uiResource === void 0 || (_uiResource$virtualBa3 = uiResource.virtualBackgroundImages) === null || _uiResource$virtualBa3 === void 0 ? void 0 : _uiResource$virtualBa3.filter(function (url) {
@@ -1338,7 +1337,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1338
1337
  })) || [];
1339
1338
  handleResourceReady = function handleResourceReady(filePathList, type) {
1340
1339
  if (type === 'image' || type === 'video') {
1341
- var list = _this8.virtualBackgroundList.slice();
1340
+ var list = _this5.virtualBackgroundList.slice();
1342
1341
  var resourceType = type === 'image' ? _virtualBackdoundResources.VirtualOption.IMG : _virtualBackdoundResources.VirtualOption.VIDEO;
1343
1342
  list = filePathList.map(function (resource) {
1344
1343
  return {
@@ -1348,12 +1347,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1348
1347
  url: URL.createObjectURL(window.runtime.fileToBlob(resource, type))
1349
1348
  };
1350
1349
  });
1351
- var _newList = _this8.virtualBackgroundList.concat(list);
1352
- _this8._updateVirtualBackgroundList(_newList);
1350
+ var _newList = _this5.virtualBackgroundList.concat(list);
1351
+ _this5._updateVirtualBackgroundList(_newList);
1353
1352
  } else if (type === 'audio') {
1354
1353
  filePathList.forEach(function (resource) {
1355
1354
  var key = (0, _tools.getFileNameWithoutExtension)(resource);
1356
- _this8.soundEffectList.set(key, {
1355
+ _this5.soundEffectList.set(key, {
1357
1356
  md5Url: resource,
1358
1357
  url: URL.createObjectURL(window.runtime.fileToBlob(resource, type))
1359
1358
  });
@@ -1365,9 +1364,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1365
1364
  this.loadZipResources(_soundEffects, 'audio', handleResourceReady);
1366
1365
  case 3:
1367
1366
  case "end":
1368
- return _context8.stop();
1367
+ return _context0.stop();
1369
1368
  }
1370
- }, _callee8, this);
1369
+ }, _callee0, this);
1371
1370
  }));
1372
1371
  function loadUiResources(_x5) {
1373
1372
  return _loadUiResources.apply(this, arguments);
@@ -1377,63 +1376,76 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1377
1376
  }, {
1378
1377
  key: "loadZipResources",
1379
1378
  value: function () {
1380
- var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0(zipUrls, type, callback) {
1381
- var _this9 = this;
1379
+ var _loadZipResources = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10(zipUrls, type, callback) {
1380
+ var _this6 = this;
1382
1381
  var ps;
1383
- return _regenerator["default"].wrap(function (_context0) {
1384
- while (1) switch (_context0.prev = _context0.next) {
1382
+ return _regenerator["default"].wrap(function (_context10) {
1383
+ while (1) switch (_context10.prev = _context10.next) {
1385
1384
  case 0:
1386
1385
  ps = zipUrls.map(/*#__PURE__*/function () {
1387
- var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(url) {
1386
+ var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(url) {
1388
1387
  var filePathList;
1389
- return _regenerator["default"].wrap(function (_context9) {
1390
- while (1) switch (_context9.prev = _context9.next) {
1388
+ return _regenerator["default"].wrap(function (_context1) {
1389
+ while (1) switch (_context1.prev = _context1.next) {
1391
1390
  case 0:
1392
- _context9.next = 1;
1393
- return _this9._fetchZipAndUnzip(url, type);
1391
+ _context1.next = 1;
1392
+ return _this6._fetchZipAndUnzip(url, type);
1394
1393
  case 1:
1395
- filePathList = _context9.sent;
1394
+ filePathList = _context1.sent;
1396
1395
  callback(filePathList, type);
1397
1396
  case 2:
1398
1397
  case "end":
1399
- return _context9.stop();
1398
+ return _context1.stop();
1400
1399
  }
1401
- }, _callee9);
1400
+ }, _callee1);
1402
1401
  }));
1403
1402
  return function (_x9) {
1404
1403
  return _ref4.apply(this, arguments);
1405
1404
  };
1406
1405
  }());
1407
- _context0.next = 1;
1406
+ _context10.next = 1;
1408
1407
  return Promise.allSettled(ps);
1409
1408
  case 1:
1410
1409
  case "end":
1411
- return _context0.stop();
1410
+ return _context10.stop();
1412
1411
  }
1413
- }, _callee0);
1412
+ }, _callee10);
1414
1413
  }));
1415
1414
  function loadZipResources(_x6, _x7, _x8) {
1416
1415
  return _loadZipResources.apply(this, arguments);
1417
1416
  }
1418
1417
  return loadZipResources;
1419
1418
  }()
1419
+ }, {
1420
+ key: "toggleAGC",
1421
+ value: function toggleAGC(enable) {
1422
+ if (enable) {
1423
+ return this._mediaControl.enableAGC();
1424
+ } else {
1425
+ return this._mediaControl.disableAGC();
1426
+ }
1427
+ }
1420
1428
  }, {
1421
1429
  key: "release",
1422
1430
  value: function release() {
1423
- var _this0 = this,
1431
+ var _this7 = this,
1424
1432
  _this$_cameraVideoTra3,
1425
- _this$_microphoneAudi8;
1433
+ _this$_microphoneAudi0;
1434
+ this._mediaControl.removeObserver(this._mediaControlObserver);
1426
1435
  if (this._localVideoViewSet.size > 0) {
1427
1436
  this._localVideoViewSet.forEach(function (view) {
1428
- var _this0$_cameraVideoTr;
1429
- (_this0$_cameraVideoTr = _this0._cameraVideoTrack) === null || _this0$_cameraVideoTr === void 0 || _this0$_cameraVideoTr.stopPreview(view);
1437
+ var _this7$_cameraVideoTr;
1438
+ (_this7$_cameraVideoTr = _this7._cameraVideoTrack) === null || _this7$_cameraVideoTr === void 0 || _this7$_cameraVideoTr.stopPreview(view);
1430
1439
  });
1431
1440
  this._localVideoViewSet.clear();
1432
1441
  }
1433
1442
  (_this$_cameraVideoTra3 = this._cameraVideoTrack) === null || _this$_cameraVideoTra3 === void 0 || _this$_cameraVideoTra3.stop();
1443
+ (_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
1434
1444
  this._cameraVideoTrack = undefined;
1435
- (_this$_microphoneAudi8 = this._microphoneAudioTrack) === null || _this$_microphoneAudi8 === void 0 || _this$_microphoneAudi8.stop();
1436
- this._microphoneAudioTrack = undefined;
1445
+ this._microphoneAudioTrack = null;
1446
+ this._disposer.forEach(function (disposer) {
1447
+ return disposer();
1448
+ });
1437
1449
  }
1438
1450
  }, {
1439
1451
  key: "setConnectType",
@@ -1443,18 +1455,18 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1443
1455
  }, {
1444
1456
  key: "_fetchZipAndUnzip",
1445
1457
  value: function () {
1446
- var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(url, type) {
1458
+ var _fetchZipAndUnzip2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11(url, type) {
1447
1459
  var md5Url;
1448
- return _regenerator["default"].wrap(function (_context1) {
1449
- while (1) switch (_context1.prev = _context1.next) {
1460
+ return _regenerator["default"].wrap(function (_context11) {
1461
+ while (1) switch (_context11.prev = _context11.next) {
1450
1462
  case 0:
1451
1463
  md5Url = (0, _imports.md5)(url);
1452
- return _context1.abrupt("return", window.runtime.getResourceByFileType(url, md5Url, type));
1464
+ return _context11.abrupt("return", window.runtime.getResourceByFileType(url, md5Url, type));
1453
1465
  case 1:
1454
1466
  case "end":
1455
- return _context1.stop();
1467
+ return _context11.stop();
1456
1468
  }
1457
- }, _callee1);
1469
+ }, _callee11);
1458
1470
  }));
1459
1471
  function _fetchZipAndUnzip(_x0, _x1) {
1460
1472
  return _fetchZipAndUnzip2.apply(this, arguments);
@@ -1475,6 +1487,70 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1475
1487
  return 0;
1476
1488
  });
1477
1489
  }
1490
+ }, {
1491
+ key: "_handleSystemSelectedSpeakerChanged",
1492
+ value: function _handleSystemSelectedSpeakerChanged(speaker) {
1493
+ this._correctSystemSpeakerDeviceId();
1494
+ }
1495
+ }, {
1496
+ key: "_correctSystemSpeakerDeviceId",
1497
+ value: function () {
1498
+ var _correctSystemSpeakerDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
1499
+ var defaultDevice;
1500
+ return _regenerator["default"].wrap(function (_context12) {
1501
+ while (1) switch (_context12.prev = _context12.next) {
1502
+ case 0:
1503
+ _context12.next = 1;
1504
+ return this._mediaControl.getSystemSelectedSpeaker();
1505
+ case 1:
1506
+ defaultDevice = _context12.sent;
1507
+ this.logger.debug("system selected speaker changed : ".concat(defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceName));
1508
+ this._speakerDevice = {
1509
+ id: (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || null
1510
+ };
1511
+ case 2:
1512
+ case "end":
1513
+ return _context12.stop();
1514
+ }
1515
+ }, _callee12, this);
1516
+ }));
1517
+ function _correctSystemSpeakerDeviceId() {
1518
+ return _correctSystemSpeakerDeviceId2.apply(this, arguments);
1519
+ }
1520
+ return _correctSystemSpeakerDeviceId;
1521
+ }()
1522
+ }, {
1523
+ key: "_handleSystemSelectedMicrophoneChanged",
1524
+ value: function _handleSystemSelectedMicrophoneChanged(microphone) {
1525
+ this._correctSystemSelectedMicrophoneDeviceId();
1526
+ }
1527
+ }, {
1528
+ key: "_correctSystemSelectedMicrophoneDeviceId",
1529
+ value: function () {
1530
+ var _correctSystemSelectedMicrophoneDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
1531
+ var defaultDevice;
1532
+ return _regenerator["default"].wrap(function (_context13) {
1533
+ while (1) switch (_context13.prev = _context13.next) {
1534
+ case 0:
1535
+ _context13.next = 1;
1536
+ return this._mediaControl.getSystemSelectedMicrophone();
1537
+ case 1:
1538
+ defaultDevice = _context13.sent;
1539
+ this.logger.debug("system selected microphone changed : ".concat(defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceName));
1540
+ this._microphoneDevice = {
1541
+ id: (defaultDevice === null || defaultDevice === void 0 ? void 0 : defaultDevice.deviceId) || null
1542
+ };
1543
+ case 2:
1544
+ case "end":
1545
+ return _context13.stop();
1546
+ }
1547
+ }, _callee13, this);
1548
+ }));
1549
+ function _correctSystemSelectedMicrophoneDeviceId() {
1550
+ return _correctSystemSelectedMicrophoneDeviceId2.apply(this, arguments);
1551
+ }
1552
+ return _correctSystemSelectedMicrophoneDeviceId;
1553
+ }()
1478
1554
  }, {
1479
1555
  key: "_handleSpeakerTestVolumeIndicationUpdated",
1480
1556
  value: function _handleSpeakerTestVolumeIndicationUpdated(volume) {
@@ -1499,7 +1575,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1499
1575
  }, {
1500
1576
  key: "toggleLocalCameraPreview",
1501
1577
  value: function toggleLocalCameraPreview(enabled) {
1502
- var _this1 = this;
1578
+ var _this8 = this;
1503
1579
  var localVideoViewSet = this._localVideoViewSet;
1504
1580
  var cameraTrack = this._cameraVideoTrack;
1505
1581
  if (!enabled && localVideoViewSet.size > 0 && cameraTrack) {
@@ -1511,7 +1587,7 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1511
1587
  localVideoViewSet.forEach(function (view) {
1512
1588
  cameraTrack === null || cameraTrack === void 0 || cameraTrack.startPreview({
1513
1589
  renderMode: _fcrCore.FcrVideoRenderMode.HIDDEN,
1514
- isMirror: _this1.currentIsMirror
1590
+ isMirror: _this8.currentIsMirror
1515
1591
  }, view);
1516
1592
  });
1517
1593
  }
@@ -1519,24 +1595,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1519
1595
  }, {
1520
1596
  key: "_handleCameraListUpdated",
1521
1597
  value: function () {
1522
- var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
1523
- var _this10 = this;
1598
+ var _handleCameraListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
1599
+ var _this9 = this;
1524
1600
  var cameraList, currentDeviceExist, _cameraEnabled, deviceId, _deviceId;
1525
- return _regenerator["default"].wrap(function (_context10) {
1526
- while (1) switch (_context10.prev = _context10.next) {
1601
+ return _regenerator["default"].wrap(function (_context14) {
1602
+ while (1) switch (_context14.prev = _context14.next) {
1527
1603
  case 0:
1528
- _context10.next = 1;
1604
+ _context14.next = 1;
1529
1605
  return this._mediaControl.getCameraList();
1530
1606
  case 1:
1531
- cameraList = _context10.sent;
1607
+ cameraList = _context14.sent;
1532
1608
  (0, _mobx.runInAction)(function () {
1533
- _this10.cameraList = cameraList;
1609
+ _this9.cameraList = cameraList;
1534
1610
  });
1535
1611
  currentDeviceExist = false;
1536
1612
  if (this.cameraId) {
1537
1613
  currentDeviceExist = this.cameraList.some(function (_ref5) {
1538
1614
  var deviceId = _ref5.deviceId;
1539
- return _this10.cameraId === deviceId;
1615
+ return _this9.cameraId === deviceId;
1540
1616
  });
1541
1617
  _cameraEnabled = this.cameraEnabled;
1542
1618
  if (!currentDeviceExist) {
@@ -1563,9 +1639,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1563
1639
  this._observable.notifyObservers('onCameraListUpdated', this.cameraList);
1564
1640
  case 2:
1565
1641
  case "end":
1566
- return _context10.stop();
1642
+ return _context14.stop();
1567
1643
  }
1568
- }, _callee10, this);
1644
+ }, _callee14, this);
1569
1645
  }));
1570
1646
  function _handleCameraListUpdated() {
1571
1647
  return _handleCameraListUpdated2.apply(this, arguments);
@@ -1575,19 +1651,17 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1575
1651
  }, {
1576
1652
  key: "_handleMicrophoneAdded",
1577
1653
  value: function () {
1578
- var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
1579
- return _regenerator["default"].wrap(function (_context11) {
1580
- while (1) switch (_context11.prev = _context11.next) {
1654
+ var _handleMicrophoneAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
1655
+ return _regenerator["default"].wrap(function (_context15) {
1656
+ while (1) switch (_context15.prev = _context15.next) {
1581
1657
  case 0:
1582
- _context11.next = 1;
1658
+ _context15.next = 1;
1583
1659
  return this._handleMicrophoneListUpdated();
1584
1660
  case 1:
1585
- this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
1586
- case 2:
1587
1661
  case "end":
1588
- return _context11.stop();
1662
+ return _context15.stop();
1589
1663
  }
1590
- }, _callee11, this);
1664
+ }, _callee15, this);
1591
1665
  }));
1592
1666
  function _handleMicrophoneAdded() {
1593
1667
  return _handleMicrophoneAdded2.apply(this, arguments);
@@ -1597,105 +1671,97 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1597
1671
  }, {
1598
1672
  key: "_handleMicrophoneRemoved",
1599
1673
  value: function () {
1600
- var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
1601
- var _this11 = this;
1602
- var currentDeviceExist;
1603
- return _regenerator["default"].wrap(function (_context12) {
1604
- while (1) switch (_context12.prev = _context12.next) {
1674
+ var _handleMicrophoneRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
1675
+ return _regenerator["default"].wrap(function (_context16) {
1676
+ while (1) switch (_context16.prev = _context16.next) {
1605
1677
  case 0:
1606
- _context12.next = 1;
1678
+ _context16.next = 1;
1607
1679
  return this._handleMicrophoneListUpdated();
1608
1680
  case 1:
1609
- // 如何设备移除了,应该切到跟随系统
1681
+ _context16.next = 2;
1682
+ return this._correctMicrophoneDeviceId();
1683
+ case 2:
1684
+ case "end":
1685
+ return _context16.stop();
1686
+ }
1687
+ }, _callee16, this);
1688
+ }));
1689
+ function _handleMicrophoneRemoved() {
1690
+ return _handleMicrophoneRemoved2.apply(this, arguments);
1691
+ }
1692
+ return _handleMicrophoneRemoved;
1693
+ }()
1694
+ }, {
1695
+ key: "_correctMicrophoneDeviceId",
1696
+ value: function () {
1697
+ var _correctMicrophoneDeviceId2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
1698
+ var _this0 = this;
1699
+ var currentDeviceExist;
1700
+ return _regenerator["default"].wrap(function (_context17) {
1701
+ while (1) switch (_context17.prev = _context17.next) {
1702
+ case 0:
1610
1703
  currentDeviceExist = this.microphoneList.find(function (item) {
1611
- return item.deviceId === _this11._microphoneDeviceId;
1704
+ return item.deviceId === _this0._microphoneDevice.id;
1612
1705
  });
1613
1706
  if (currentDeviceExist) {
1614
- _context12.next = 2;
1707
+ _context17.next = 1;
1615
1708
  break;
1616
1709
  }
1617
1710
  this.logger.info('[FcrDeviceStore] current microphone does not exist in microphone list, switch to follow system');
1618
- _context12.next = 2;
1711
+ _context17.next = 1;
1619
1712
  return this.setMicrophoneId(DEFAULT_DEVICE_ID);
1620
- case 2:
1621
- this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
1622
- case 3:
1713
+ case 1:
1623
1714
  case "end":
1624
- return _context12.stop();
1715
+ return _context17.stop();
1625
1716
  }
1626
- }, _callee12, this);
1717
+ }, _callee17, this);
1627
1718
  }));
1628
- function _handleMicrophoneRemoved() {
1629
- return _handleMicrophoneRemoved2.apply(this, arguments);
1719
+ function _correctMicrophoneDeviceId() {
1720
+ return _correctMicrophoneDeviceId2.apply(this, arguments);
1630
1721
  }
1631
- return _handleMicrophoneRemoved;
1722
+ return _correctMicrophoneDeviceId;
1632
1723
  }()
1633
1724
  }, {
1634
1725
  key: "_handleMicrophoneListUpdated",
1635
1726
  value: function () {
1636
- var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
1637
- var _this12 = this;
1727
+ var _handleMicrophoneListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
1638
1728
  var microphoneList;
1639
- return _regenerator["default"].wrap(function (_context13) {
1640
- while (1) switch (_context13.prev = _context13.next) {
1729
+ return _regenerator["default"].wrap(function (_context18) {
1730
+ while (1) switch (_context18.prev = _context18.next) {
1641
1731
  case 0:
1642
- _context13.next = 1;
1732
+ _context18.next = 1;
1643
1733
  return this._getMicrophoneList();
1644
1734
  case 1:
1645
- microphoneList = _context13.sent;
1646
- // 如果选择了跟随系统,浏览器下设备变更时需要更新 track 以保证当前设备 track 正确
1647
- if (this.followSystemMicrophoneDevice) {
1648
- this._refreshMicrophoneTrack();
1649
- }
1650
- (0, _mobx.runInAction)(function () {
1651
- _this12.microphoneList = microphoneList;
1652
- });
1735
+ microphoneList = _context18.sent;
1736
+ this.microphoneList = microphoneList;
1737
+ this._observable.notifyObservers('onMicrophoneListUpdated', this.microphoneList);
1653
1738
  case 2:
1654
1739
  case "end":
1655
- return _context13.stop();
1740
+ return _context18.stop();
1656
1741
  }
1657
- }, _callee13, this);
1742
+ }, _callee18, this);
1658
1743
  }));
1659
1744
  function _handleMicrophoneListUpdated() {
1660
1745
  return _handleMicrophoneListUpdated2.apply(this, arguments);
1661
1746
  }
1662
1747
  return _handleMicrophoneListUpdated;
1663
1748
  }()
1664
- /**
1665
- * 某些情况下需要重新创建 Track,比如:
1666
- * 1.浏览器中耳机插入,可能导致系统默认设备变更,此时应该重新创建 track
1667
- * 2.客户端中,系统默认设备变更时,并不会有回调发生,但是需要在下次开启或关闭设备时纠正当前系统设备ID
1668
- */
1669
- }, {
1670
- key: "_refreshMicrophoneTrack",
1671
- value: function _refreshMicrophoneTrack() {
1672
- var _this$_microphoneAudi9, _this$_microphoneAudi0;
1673
- (_this$_microphoneAudi9 = this._microphoneAudioTrack) === null || _this$_microphoneAudi9 === void 0 || _this$_microphoneAudi9.removeObserver(this._microphoneObserver);
1674
- (_this$_microphoneAudi0 = this._microphoneAudioTrack) === null || _this$_microphoneAudi0 === void 0 || _this$_microphoneAudi0.stop();
1675
- this._microphoneAudioTrack = this._mediaControl.getMicrophoneTrack(this._microphoneDeviceId);
1676
- this._microphoneAudioTrack.addObserver(this._microphoneObserver);
1677
- if (this.microphoneEnabled) {
1678
- this._microphoneAudioTrack.start();
1679
- } else {
1680
- this._microphoneAudioTrack.stop();
1681
- }
1682
- }
1683
1749
  }, {
1684
1750
  key: "_handleSpeakerAdded",
1685
1751
  value: function () {
1686
- var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
1687
- return _regenerator["default"].wrap(function (_context14) {
1688
- while (1) switch (_context14.prev = _context14.next) {
1752
+ var _handleSpeakerAdded2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
1753
+ return _regenerator["default"].wrap(function (_context19) {
1754
+ while (1) switch (_context19.prev = _context19.next) {
1689
1755
  case 0:
1690
- _context14.next = 1;
1756
+ _context19.next = 1;
1691
1757
  return this._handleSpeakerListUpdated();
1692
1758
  case 1:
1693
1759
  this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
1694
1760
  case 2:
1695
1761
  case "end":
1696
- return _context14.stop();
1762
+ return _context19.stop();
1697
1763
  }
1698
- }, _callee14, this);
1764
+ }, _callee19, this);
1699
1765
  }));
1700
1766
  function _handleSpeakerAdded() {
1701
1767
  return _handleSpeakerAdded2.apply(this, arguments);
@@ -1705,33 +1771,33 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1705
1771
  }, {
1706
1772
  key: "_handleSpeakerRemoved",
1707
1773
  value: function () {
1708
- var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
1709
- var _this13 = this;
1774
+ var _handleSpeakerRemoved2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee20() {
1775
+ var _this1 = this;
1710
1776
  var currentDeviceExist;
1711
- return _regenerator["default"].wrap(function (_context15) {
1712
- while (1) switch (_context15.prev = _context15.next) {
1777
+ return _regenerator["default"].wrap(function (_context20) {
1778
+ while (1) switch (_context20.prev = _context20.next) {
1713
1779
  case 0:
1714
- _context15.next = 1;
1780
+ _context20.next = 1;
1715
1781
  return this._handleSpeakerListUpdated();
1716
1782
  case 1:
1717
1783
  // 如何设备移除了,应该切到跟随系统
1718
1784
  currentDeviceExist = this.speakerList.find(function (item) {
1719
- return item.deviceId === _this13._speakerDeviceId;
1785
+ return item.deviceId === _this1._speakerDevice.id;
1720
1786
  });
1721
1787
  if (currentDeviceExist) {
1722
- _context15.next = 2;
1788
+ _context20.next = 2;
1723
1789
  break;
1724
1790
  }
1725
1791
  this.logger.info('[FcrDeviceStore] current speaker does not exist in speaker list, switch to follow system');
1726
- _context15.next = 2;
1792
+ _context20.next = 2;
1727
1793
  return this.setSpeakerId(DEFAULT_DEVICE_ID);
1728
1794
  case 2:
1729
1795
  this._observable.notifyObservers('onSpeakerListUpdated', this.speakerList);
1730
1796
  case 3:
1731
1797
  case "end":
1732
- return _context15.stop();
1798
+ return _context20.stop();
1733
1799
  }
1734
- }, _callee15, this);
1800
+ }, _callee20, this);
1735
1801
  }));
1736
1802
  function _handleSpeakerRemoved() {
1737
1803
  return _handleSpeakerRemoved2.apply(this, arguments);
@@ -1741,24 +1807,24 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1741
1807
  }, {
1742
1808
  key: "_handleSpeakerListUpdated",
1743
1809
  value: function () {
1744
- var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
1745
- var _this14 = this;
1810
+ var _handleSpeakerListUpdated2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee21() {
1811
+ var _this10 = this;
1746
1812
  var speakerList;
1747
- return _regenerator["default"].wrap(function (_context16) {
1748
- while (1) switch (_context16.prev = _context16.next) {
1813
+ return _regenerator["default"].wrap(function (_context21) {
1814
+ while (1) switch (_context21.prev = _context21.next) {
1749
1815
  case 0:
1750
- _context16.next = 1;
1816
+ _context21.next = 1;
1751
1817
  return this._getSpeakerList();
1752
1818
  case 1:
1753
- speakerList = _context16.sent;
1819
+ speakerList = _context21.sent;
1754
1820
  (0, _mobx.runInAction)(function () {
1755
- _this14.speakerList = speakerList;
1821
+ _this10.speakerList = speakerList;
1756
1822
  });
1757
1823
  case 2:
1758
1824
  case "end":
1759
- return _context16.stop();
1825
+ return _context21.stop();
1760
1826
  }
1761
- }, _callee16, this);
1827
+ }, _callee21, this);
1762
1828
  }));
1763
1829
  function _handleSpeakerListUpdated() {
1764
1830
  return _handleSpeakerListUpdated2.apply(this, arguments);
@@ -1768,19 +1834,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1768
1834
  }, {
1769
1835
  key: "_getMicrophoneList",
1770
1836
  value: function () {
1771
- var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
1837
+ var _getMicrophoneList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee22() {
1772
1838
  var defaultDevice, list, defaultIdDevice;
1773
- return _regenerator["default"].wrap(function (_context17) {
1774
- while (1) switch (_context17.prev = _context17.next) {
1839
+ return _regenerator["default"].wrap(function (_context22) {
1840
+ while (1) switch (_context22.prev = _context22.next) {
1775
1841
  case 0:
1776
- _context17.next = 1;
1842
+ _context22.next = 1;
1777
1843
  return this._mediaControl.getSystemSelectedMicrophone();
1778
1844
  case 1:
1779
- defaultDevice = _context17.sent;
1780
- _context17.next = 2;
1845
+ defaultDevice = _context22.sent;
1846
+ _context22.next = 2;
1781
1847
  return this._mediaControl.getMicrophoneList();
1782
1848
  case 2:
1783
- list = _context17.sent;
1849
+ list = _context22.sent;
1784
1850
  list.forEach(function (item) {
1785
1851
  var results = /^default \((.*)\)$/.exec(item.deviceName);
1786
1852
  if (results && results.length > 1) {
@@ -1811,12 +1877,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1811
1877
  reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1812
1878
  });
1813
1879
  }
1814
- return _context17.abrupt("return", list);
1880
+ return _context22.abrupt("return", list);
1815
1881
  case 3:
1816
1882
  case "end":
1817
- return _context17.stop();
1883
+ return _context22.stop();
1818
1884
  }
1819
- }, _callee17, this);
1885
+ }, _callee22, this);
1820
1886
  }));
1821
1887
  function _getMicrophoneList() {
1822
1888
  return _getMicrophoneList2.apply(this, arguments);
@@ -1826,19 +1892,19 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1826
1892
  }, {
1827
1893
  key: "_getSpeakerList",
1828
1894
  value: function () {
1829
- var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
1895
+ var _getSpeakerList2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee23() {
1830
1896
  var defaultDevice, list, defaultIdDevice;
1831
- return _regenerator["default"].wrap(function (_context18) {
1832
- while (1) switch (_context18.prev = _context18.next) {
1897
+ return _regenerator["default"].wrap(function (_context23) {
1898
+ while (1) switch (_context23.prev = _context23.next) {
1833
1899
  case 0:
1834
- _context18.next = 1;
1900
+ _context23.next = 1;
1835
1901
  return this._mediaControl.getSystemSelectedSpeaker();
1836
1902
  case 1:
1837
- defaultDevice = _context18.sent;
1838
- _context18.next = 2;
1903
+ defaultDevice = _context23.sent;
1904
+ _context23.next = 2;
1839
1905
  return this._mediaControl.getSpeakerList();
1840
1906
  case 2:
1841
- list = _context18.sent;
1907
+ list = _context23.sent;
1842
1908
  list.forEach(function (item) {
1843
1909
  var results = /^default \((.*)\)$/.exec(item.deviceName);
1844
1910
  if (results && results.length > 1) {
@@ -1868,12 +1934,12 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1868
1934
  reason1: (0, _i18n.transI18n)('fmt_device_label_speaker_default')
1869
1935
  });
1870
1936
  }
1871
- return _context18.abrupt("return", list);
1937
+ return _context23.abrupt("return", list);
1872
1938
  case 3:
1873
1939
  case "end":
1874
- return _context18.stop();
1940
+ return _context23.stop();
1875
1941
  }
1876
- }, _callee18, this);
1942
+ }, _callee23, this);
1877
1943
  }));
1878
1944
  function _getSpeakerList() {
1879
1945
  return _getSpeakerList2.apply(this, arguments);
@@ -1885,37 +1951,20 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1885
1951
  value: function setMainRoomAudioOff(enable) {
1886
1952
  this.isMainRoomAudioOff = enable;
1887
1953
  }
1888
- }, {
1889
- key: "_getDefaultDeviceId",
1890
- value: function _getDefaultDeviceId(_ref6) {
1891
- var _this$_userSettingSto2;
1892
- var initValue = _ref6.initValue,
1893
- localKey = _ref6.localKey,
1894
- list = _ref6.list;
1895
- var localSetting = (_this$_userSettingSto2 = this._userSettingStorageProvider.read()) === null || _this$_userSettingSto2 === void 0 ? void 0 : _this$_userSettingSto2.setting;
1896
- var defaultValue = initValue;
1897
- if (localSetting && localSetting[localKey]) {
1898
- var _list$find$deviceId, _list$find;
1899
- defaultValue = (_list$find$deviceId = (_list$find = list.find(function (item) {
1900
- return item.deviceId === localSetting[localKey];
1901
- })) === null || _list$find === void 0 ? void 0 : _list$find.deviceId) !== null && _list$find$deviceId !== void 0 ? _list$find$deviceId : defaultValue;
1902
- }
1903
- return defaultValue;
1904
- }
1905
1954
  }, {
1906
1955
  key: "_loadBuiltinResources",
1907
1956
  value: function () {
1908
- var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
1957
+ var _loadBuiltinResources2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee24() {
1909
1958
  var _window$runtime,
1910
- _this15 = this;
1959
+ _this11 = this;
1911
1960
  var _yield$window$runtime, virtualBackgroundImages, virtualBackgroundVideos, soundEffects, newVirtualBackgroundList, images, videos, sounds;
1912
- return _regenerator["default"].wrap(function (_context19) {
1913
- while (1) switch (_context19.prev = _context19.next) {
1961
+ return _regenerator["default"].wrap(function (_context24) {
1962
+ while (1) switch (_context24.prev = _context24.next) {
1914
1963
  case 0:
1915
- _context19.next = 1;
1964
+ _context24.next = 1;
1916
1965
  return (_window$runtime = window.runtime) === null || _window$runtime === void 0 ? void 0 : _window$runtime.loadBuiltinResources();
1917
1966
  case 1:
1918
- _yield$window$runtime = _context19.sent;
1967
+ _yield$window$runtime = _context24.sent;
1919
1968
  virtualBackgroundImages = _yield$window$runtime.virtualBackgroundImages;
1920
1969
  virtualBackgroundVideos = _yield$window$runtime.virtualBackgroundVideos;
1921
1970
  soundEffects = _yield$window$runtime.soundEffects;
@@ -1948,16 +1997,16 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1948
1997
  newVirtualBackgroundList = newVirtualBackgroundList.concat(images);
1949
1998
  newVirtualBackgroundList = newVirtualBackgroundList.concat(videos);
1950
1999
  (0, _mobx.runInAction)(function () {
1951
- _this15._updateVirtualBackgroundList(newVirtualBackgroundList);
2000
+ _this11._updateVirtualBackgroundList(newVirtualBackgroundList);
1952
2001
  sounds.forEach(function (item) {
1953
- _this15.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
2002
+ _this11.soundEffectList.set((0, _tools.getFileNameWithoutExtension)(item.url), item);
1954
2003
  });
1955
2004
  });
1956
2005
  case 2:
1957
2006
  case "end":
1958
- return _context19.stop();
2007
+ return _context24.stop();
1959
2008
  }
1960
- }, _callee19, this);
2009
+ }, _callee24, this);
1961
2010
  }));
1962
2011
  function _loadBuiltinResources() {
1963
2012
  return _loadBuiltinResources2.apply(this, arguments);
@@ -1967,14 +2016,14 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
1967
2016
  }]);
1968
2017
  }();
1969
2018
  _FcrUIDeviceProviderImpl = FcrUIDeviceProviderImpl;
1970
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDeviceId"], [_mobx.observable, 1, "_speakerDeviceId"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "microphoneId"], [_mobx.observable, 1, "speakerId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "virtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "beautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "virtualBackgroundList"], [_mobx.observable, 1, "soundEffectList"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "connectType"], [_mobx.observable, 1, "isMainRoomAudioOff"], [_imports.bound, 2, "connectAudio"], [_imports.bound, 2, "disconnectAudio"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_startSpeakerTestDecs, 18, "startSpeakerTest"], [_stopSpeakerTestDecs, 18, "stopSpeakerTest"], [_setCurrentIsMirrorDecs, 18, "setCurrentIsMirror"], [_toggleLocalMirrorPreviewDecs, 18, "toggleLocalMirrorPreview"], [_setBeautyOptionsDecs, 18, "setBeautyOptions"], [_handleCancelForceOpenVideoEffectDecs, 18, "handleCancelForceOpenVideoEffect"], [_handleForceOpenVideoEffectDecs, 18, "handleForceOpenVideoEffect"], [_imports.bound, 2, "setVideoOrientation"], [_setCameraEnabledDecs, 18, "setCameraEnabled"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_loadUiResourcesDecs, 18, "loadUiResources"], [_setConnectTypeDecs, 18, "setConnectType"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSpeakerTestVolumeIndicationUpdatedDecs, 18, "_handleSpeakerTestVolumeIndicationUpdated"], [_handleSpeakerVolumeUpdatedDecs, 18, "_handleSpeakerVolumeUpdated"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [_imports.bound, 2, "_handleCameraChanged"], [_imports.bound, 2, "toggleLocalCameraPreview"], [_imports.bound, 2, "_handleCameraListUpdated"], [_imports.bound, 2, "_handleMicrophoneAdded"], [_imports.bound, 2, "_handleMicrophoneRemoved"], [_imports.bound, 2, "_handleMicrophoneListUpdated"], [_handleSpeakerAddedDecs, 18, "_handleSpeakerAdded"], [_handleSpeakerRemovedDecs, 18, "_handleSpeakerRemoved"], [_handleSpeakerListUpdatedDecs, 18, "_handleSpeakerListUpdated"], [_setMainRoomAudioOffDecs, 18, "setMainRoomAudioOff"]], []).e, 30);
1971
- _init__microphoneDeviceId = _applyDecs$e[0];
1972
- _init__speakerDeviceId = _applyDecs$e[1];
1973
- _init_currentIsMirror = _applyDecs$e[2];
1974
- _init_showForceOpenEffectDialog = _applyDecs$e[3];
1975
- _init_cameraId = _applyDecs$e[4];
1976
- _init_microphoneId = _applyDecs$e[5];
1977
- _init_speakerId = _applyDecs$e[6];
2019
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUIDeviceProviderImpl, [[_mobx.observable, 1, "_microphoneDevice"], [_mobx.observable, 1, "_microphone"], [_mobx.observable, 1, "_speakerDevice"], [_mobx.observable, 1, "_speaker"], [_mobx.observable, 1, "currentIsMirror"], [_mobx.observable, 1, "showForceOpenEffectDialog"], [_mobx.observable, 1, "cameraId"], [_mobx.observable, 1, "cameraEnabled"], [_mobx.observable, 1, "showCameraPreview"], [_mobx.observable, 1, "microphoneEnabled"], [_mobx.observable, 1, "cameraList"], [_mobx.observable, 1, "microphoneList"], [_mobx.observable, 1, "microphoneVolumeLevel"], [_mobx.observable, 1, "speakerList"], [_mobx.observable, 1, "isLocalMirrorEnabled"], [_mobx.observable, 1, "isLocalEditBeautyOptions"], [_mobx.observable, 1, "speakerVolumeLevel"], [_mobx.observable, 1, "speakerVolume"], [_mobx.observable, 1, "microphoneVolume"], [_mobx.observable, 1, "virtualBackgroundName"], [_mobx.observable, 1, "enableBeauty"], [_mobx.observable, 1, "beautyKey"], [_mobx.observable, 1, "beautyOptions"], [_mobx.observable, 1, "virtualBackgroundList"], [_mobx.observable, 1, "soundEffectList"], [_mobx.observable, 1, "microphoneDetecting"], [_mobx.observable, 1, "speakerDetecting"], [_mobx.observable, 1, "connectType"], [_mobx.observable, 1, "isMainRoomAudioOff"], [_imports.bound, 2, "connectAudio"], [_imports.bound, 2, "disconnectAudio"], [_initDeviceListDecs, 18, "initDeviceList"], [_startPlayLocalVideoDecs, 18, "startPlayLocalVideo"], [_stopPlayLocalVideoDecs, 18, "stopPlayLocalVideo"], [_handleSpeakerDetectingChangedDecs, 18, "_handleSpeakerDetectingChanged"], [_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"], [_handleMicrophoneAudioTrackDecs, 18, "_handleMicrophoneAudioTrack"], [_setMicrophoneEnabledDecs, 18, "setMicrophoneEnabled"], [_handleMicrophoneEnabledChangedDecs, 18, "_handleMicrophoneEnabledChanged"], [_toggleLocalMirrorDecs, 18, "toggleLocalMirror"], [_resetMirrorDecs, 18, "resetMirror"], [_handleMicrophoneDetectingChangedDecs, 18, "_handleMicrophoneDetectingChanged"], [_startMicrophoneTestDecs, 18, "startMicrophoneTest"], [_stopMicrophoneTestDecs, 18, "stopMicrophoneTest"], [_enableVirtualBackgroundDecs, 18, "enableVirtualBackground"], [_setEditBeautyKeyDecs, 18, "setEditBeautyKey"], [_enableBeautyEffectDecs, 18, "enableBeautyEffect"], [_setCameraIdDecs, 18, "setCameraId"], [_imports.bound, 2, "_handleMicrophoneIdChanged"], [_imports.bound, 2, "_handleMicrophoneDeviceIdChanged"], [_imports.bound, 2, "_handleSpeakerDeviceIdChanged"], [_imports.bound, 2, "_handleSpeakerIdChanged"], [_setSpeakerIdDecs, 18, "setSpeakerId"], [_setMicrophoneIdDecs, 18, "setMicrophoneId"], [_setSpeakerVolumeDecs, 18, "setSpeakerVolume"], [_setMicrophoneVolumeDecs, 18, "setMicrophoneVolume"], [_loadUiResourcesDecs, 18, "loadUiResources"], [_imports.bound, 2, "toggleAGC"], [_setConnectTypeDecs, 18, "setConnectType"], [_updateVirtualBackgroundListDecs, 18, "_updateVirtualBackgroundList"], [_handleSystemSelectedSpeakerChangedDecs, 18, "_handleSystemSelectedSpeakerChanged"], [_handleSystemSelectedMicrophoneChangedDecs, 18, "_handleSystemSelectedMicrophoneChanged"], [_correctSystemSelectedMicrophoneDeviceIdDecs, 18, "_correctSystemSelectedMicrophoneDeviceId"], [_handleSpeakerTestVolumeIndicationUpdatedDecs, 18, "_handleSpeakerTestVolumeIndicationUpdated"], [_handleSpeakerVolumeUpdatedDecs, 18, "_handleSpeakerVolumeUpdated"], [_handleMicrophoneVolumeIndicationUpdatedDecs, 18, "_handleMicrophoneVolumeIndicationUpdated"], [_imports.bound, 2, "_handleCameraChanged"], [_imports.bound, 2, "toggleLocalCameraPreview"], [_imports.bound, 2, "_handleCameraListUpdated"], [_imports.bound, 2, "_handleMicrophoneAdded"], [_imports.bound, 2, "_handleMicrophoneRemoved"], [_imports.bound, 2, "_handleMicrophoneListUpdated"], [_handleSpeakerAddedDecs, 18, "_handleSpeakerAdded"], [_handleSpeakerRemovedDecs, 18, "_handleSpeakerRemoved"], [_handleSpeakerListUpdatedDecs, 18, "_handleSpeakerListUpdated"], [_setMainRoomAudioOffDecs, 18, "setMainRoomAudioOff"]], []).e, 30);
2020
+ _init__microphoneDevice = _applyDecs$e[0];
2021
+ _init__microphone = _applyDecs$e[1];
2022
+ _init__speakerDevice = _applyDecs$e[2];
2023
+ _init__speaker = _applyDecs$e[3];
2024
+ _init_currentIsMirror = _applyDecs$e[4];
2025
+ _init_showForceOpenEffectDialog = _applyDecs$e[5];
2026
+ _init_cameraId = _applyDecs$e[6];
1978
2027
  _init_cameraEnabled = _applyDecs$e[7];
1979
2028
  _init_showCameraPreview = _applyDecs$e[8];
1980
2029
  _init_microphoneEnabled = _applyDecs$e[9];