tuikit-atomicx-vue3 3.4.1 → 4.3.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 (342) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/dist/baseComp/Modal/Modal.js +431 -23
  3. package/dist/chat/index.d.ts +18 -18
  4. package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
  5. package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
  6. package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
  7. package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
  8. package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
  9. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
  10. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
  11. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
  12. package/dist/components/AudioSettingPanel/index.js +81 -73
  13. package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
  14. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
  15. package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
  16. package/dist/components/BarrageInput/MessageInputState.js +82 -0
  17. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  18. package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
  19. package/dist/components/BarrageInput/TextEditor/index.js +7 -7
  20. package/dist/components/BarrageInput/type.d.ts +17 -0
  21. package/dist/components/BarrageInput/type.js +4 -0
  22. package/dist/components/BarrageInput/utils.d.ts +30 -0
  23. package/dist/components/BarrageInput/utils.js +41 -0
  24. package/dist/components/BarrageList/BarrageList.js +80 -110
  25. package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
  26. package/dist/components/BarrageList/BarrageListH5.js +95 -122
  27. package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
  28. package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
  29. package/dist/components/BarrageList/BarrageListState.js +106 -0
  30. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
  31. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
  32. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
  33. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
  34. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
  35. package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
  36. package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
  37. package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
  38. package/dist/components/BarrageList/index.d.ts +0 -36
  39. package/dist/components/CameraButton/index.js +18 -19
  40. package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
  41. package/dist/components/CoHostPanel/BattlePanel.js +25 -25
  42. package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
  43. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  44. package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
  45. package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
  46. package/dist/components/CoHostPanel/constants.d.ts +3 -0
  47. package/dist/components/CoHostPanel/constants.js +6 -0
  48. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
  49. package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
  50. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
  51. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
  52. package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
  53. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
  54. package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
  55. package/dist/components/LiveList/LiveList.js +23 -23
  56. package/dist/components/LiveList/LiveListH5.js +38 -38
  57. package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
  58. package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
  59. package/dist/components/LiveScenePanel/index.js +4 -4
  60. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
  61. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
  62. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
  63. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
  64. package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
  65. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.js +23 -23
  66. package/dist/components/LiveView/PlayerControl/MultiResolution.js +79 -0
  67. package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +8 -0
  68. package/dist/components/LiveView/PlayerControl/PlayerControl.js +172 -0
  69. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +263 -0
  70. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +6 -0
  71. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +131 -0
  72. package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
  73. package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
  74. package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
  75. package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
  76. package/dist/components/LiveView/index.d.ts +79 -0
  77. package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
  78. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  79. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  80. package/dist/components/MessageList/index.d.ts +18 -18
  81. package/dist/components/MicButton/index.js +11 -11
  82. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  83. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  84. package/dist/components/StreamMixer/index.js +6 -6
  85. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  86. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  87. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  88. package/dist/components/StreamView/index.js +25 -33
  89. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  90. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  91. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  92. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  93. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  94. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  95. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  96. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  97. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  98. package/dist/hooks/useRoomEngine.js +6 -6
  99. package/dist/{index-D88ja_7_.js → index-BfIEeWMg.js} +1767 -1757
  100. package/dist/{index-D-KJvDvy.js → index-DTi1fL-x.js} +460 -457
  101. package/dist/index.js +177 -157
  102. package/dist/report/MetricsKey.d.ts +16 -0
  103. package/dist/report/MetricsKey.js +4 -0
  104. package/dist/report/dataReport.d.ts +12 -0
  105. package/dist/report/dataReport.js +45 -0
  106. package/dist/report/index.d.ts +4 -0
  107. package/dist/report/index.js +6 -0
  108. package/dist/rtc/index.d.ts +6 -81
  109. package/dist/rtc/index.js +53 -52
  110. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  111. package/dist/states/BarrageState/BarrageState.js +80 -0
  112. package/dist/states/BarrageState/index.d.ts +1 -0
  113. package/dist/states/BarrageState/index.js +5 -0
  114. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  115. package/dist/states/BattleState/BattleState.js +203 -0
  116. package/dist/states/BattleState/index.d.ts +1 -0
  117. package/dist/states/BattleState/index.js +4 -0
  118. package/dist/states/CoGuestState.d.ts +24 -94
  119. package/dist/states/CoGuestState.js +297 -189
  120. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  121. package/dist/states/CoHostState/CoHostState.js +135 -131
  122. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  123. package/dist/states/DeviceState/DeviceState.js +314 -0
  124. package/dist/states/DeviceState/index.d.ts +1 -0
  125. package/dist/states/DeviceState/index.js +4 -0
  126. package/dist/states/LiveAudienceState.d.ts +3 -1
  127. package/dist/states/LiveAudienceState.js +106 -63
  128. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  129. package/dist/states/LiveListState/LiveListState.js +285 -0
  130. package/dist/states/LiveListState/index.d.ts +1 -0
  131. package/dist/states/LiveListState/index.js +4 -0
  132. package/dist/states/LiveMonitorState/api/http.js +147 -129
  133. package/dist/states/LiveMonitorState/index.js +67 -62
  134. package/dist/states/LiveSeatState/index.d.ts +46 -11
  135. package/dist/states/LiveSeatState/index.js +34 -15
  136. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  137. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  138. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  139. package/dist/states/LiveSeatState/seatManager.js +131 -29
  140. package/dist/states/LiveSeatState/store.d.ts +5 -5
  141. package/dist/states/LiveSeatState/store.js +12 -10
  142. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  143. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  144. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  145. package/dist/states/LoginState.js +39 -34
  146. package/dist/states/SeatStore.js +82 -83
  147. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  148. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  149. package/dist/states/VideoMixerState/index.d.ts +1 -0
  150. package/dist/states/VideoMixerState/index.js +4 -0
  151. package/dist/styles/index.css +1 -1
  152. package/dist/types/audience.d.ts +21 -0
  153. package/dist/types/audience.js +4 -1
  154. package/dist/types/battle.d.ts +75 -3
  155. package/dist/types/battle.js +5 -1
  156. package/dist/types/coGuest.d.ts +72 -5
  157. package/dist/types/coGuest.js +4 -2
  158. package/dist/types/device.d.ts +38 -17
  159. package/dist/types/device.js +10 -8
  160. package/dist/types/index.d.ts +2 -2
  161. package/dist/types/index.js +96 -80
  162. package/dist/types/live.d.ts +36 -21
  163. package/dist/types/live.js +6 -4
  164. package/dist/types/seat.d.ts +23 -4
  165. package/dist/types/seat.js +7 -1
  166. package/dist/utils/eventCenter.d.ts +88 -0
  167. package/dist/utils/eventCenter.js +161 -0
  168. package/package.json +2 -2
  169. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  170. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  171. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  172. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  173. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  174. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  175. package/src/components/AudioSettingPanel/index.vue +4 -2
  176. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  177. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  178. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  179. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  180. package/src/components/BarrageInput/type.ts +26 -0
  181. package/src/components/BarrageInput/utils.ts +45 -0
  182. package/src/components/BarrageList/BarrageList.vue +61 -117
  183. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  184. package/src/components/BarrageList/BarrageListState.ts +223 -0
  185. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  186. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  187. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  188. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  189. package/src/components/CameraButton/index.vue +0 -1
  190. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  191. package/src/components/CoHostPanel/BattlePanel.vue +4 -7
  192. package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
  193. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  194. package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
  195. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  196. package/src/components/CoHostPanel/constants.ts +3 -0
  197. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  198. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  199. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  200. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  201. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  202. package/src/components/LiveList/LiveList.vue +5 -5
  203. package/src/components/LiveList/LiveListH5.vue +6 -6
  204. package/src/components/LiveScenePanel/index.vue +2 -2
  205. package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
  206. package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
  207. package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
  208. package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +1 -1
  209. package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +9 -3
  210. package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +10 -2
  211. package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.ts +233 -259
  212. package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +64 -0
  213. package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
  214. package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
  215. package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
  216. package/src/components/{LiveCoreView → LiveView}/index.vue +3 -3
  217. package/src/components/MicButton/index.vue +3 -3
  218. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  219. package/src/components/StreamMixer/index.vue +1 -1
  220. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  221. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  222. package/src/components/StreamView/index.vue +28 -14
  223. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  224. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  225. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  226. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  227. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  228. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  229. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  230. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  231. package/src/hooks/useRoomEngine.ts +1 -1
  232. package/src/report/MetricsKey.ts +16 -0
  233. package/src/report/dataReport.ts +55 -0
  234. package/src/report/index.ts +7 -0
  235. package/src/rtc/index.ts +8 -10
  236. package/src/types/audience.ts +27 -1
  237. package/src/types/battle.ts +87 -4
  238. package/src/types/coGuest.ts +87 -5
  239. package/src/types/device.ts +41 -16
  240. package/src/types/index.ts +2 -2
  241. package/src/types/live.ts +41 -22
  242. package/src/types/seat.ts +28 -4
  243. package/src/utils/eventCenter.ts +249 -0
  244. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  245. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  246. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
  247. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  248. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  249. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  250. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  251. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  252. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  253. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  254. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  255. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  256. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  257. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  258. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  259. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  260. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  261. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  262. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  263. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  264. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  265. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  266. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  267. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  268. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
  269. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  270. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  271. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  272. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  273. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  274. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  275. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  276. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  277. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
  278. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.vue.d.ts +0 -2
  279. package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
  280. package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
  281. package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
  282. package/dist/components/LiveCoreView/index.d.ts +0 -4
  283. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  284. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  285. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  286. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  287. package/dist/states/BarrageListState/index.d.ts +0 -1
  288. package/dist/states/BarrageListState/index.js +0 -4
  289. package/dist/states/BattleState.js +0 -117
  290. package/dist/states/DeviceState.js +0 -296
  291. package/dist/states/LiveState/index.js +0 -254
  292. package/dist/states/VideoMixerState.js +0 -260
  293. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  294. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  295. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  296. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  297. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  298. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  299. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  300. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  301. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  302. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  303. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  304. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  305. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  306. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  307. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  308. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  309. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
  310. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
  311. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
  312. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
  313. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
  314. /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
  315. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +0 -0
  316. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
  317. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +0 -0
  318. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
  319. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
  320. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
  321. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
  322. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
  323. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
  324. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
  325. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
  326. /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
  327. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
  328. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
  329. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
  330. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
  331. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
  332. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
  333. /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
  334. /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
  335. /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
  336. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
  337. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
  338. /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
  339. /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
  340. /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
  341. /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
  342. /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
@@ -1,105 +1,108 @@
1
- import { defineComponent as Y, ref as T, computed as Z, watch as _, nextTick as ee, onMounted as te, onBeforeUnmount as oe, createElementBlock as Q, openBlock as S, createElementVNode as W, createBlock as ie, createCommentVNode as A, unref as w, normalizeStyle as ne, toDisplayString as ae } from "vue";
2
- import le, { TUIVideoQuality as v, TRTCVideoResolutionMode as L, TRTCVideoRotation as V } from "@tencentcloud/tuiroom-engine-js";
3
- import { useUIKit as re } from "@tencentcloud/uikit-base-component-vue3";
4
- import { useRoomEngine as se } from "../../../hooks/useRoomEngine.js";
5
- import { useLiveState as D } from "../../../states/LiveState/index.js";
6
- import { useVideoMixerState as ce } from "../../../states/VideoMixerState.js";
7
- import { debounce as ue } from "../../../utils/utils.js";
8
- import de from "./MixerControl.js";
9
- import { LiveOrientation as b, LiveStatus as N } from "../../../types/live.js";
10
- import { _ as me } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
11
- const pe = {
1
+ import { defineComponent as q, ref as T, computed as F, watch as _, nextTick as J, onMounted as Y, onBeforeUnmount as Z, createElementBlock as Q, openBlock as b, createElementVNode as W, createBlock as ee, createCommentVNode as A, unref as w, normalizeStyle as te, toDisplayString as oe } from "vue";
2
+ import ie, { TUIVideoQuality as g, TRTCVideoResolutionMode as S, TRTCVideoRotation as V } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useUIKit as ne } from "@tencentcloud/uikit-base-component-vue3";
4
+ import { useRoomEngine as ae } from "../../../hooks/useRoomEngine.js";
5
+ import { debounce as le } from "../../../utils/utils.js";
6
+ import re from "./MixerControl.js";
7
+ import { useVideoMixerState as se } from "../../../states/VideoMixerState/VideoMixerState.js";
8
+ import { useLiveListState as ce } from "../../../states/LiveListState/LiveListState.js";
9
+ import { LiveOrientation as L } from "../../../types/live.js";
10
+ import { _ as ue } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const de = {
12
12
  key: 1,
13
13
  class: "local-mixer-placeholder"
14
- }, he = { class: "placeholder-text" }, d = 6, fe = /* @__PURE__ */ Y({
14
+ }, me = { class: "placeholder-text" }, d = 6, pe = /* @__PURE__ */ q({
15
15
  __name: "index",
16
- setup(ve) {
17
- const { t: U } = re(), { currentLive: g } = D(), k = T(null), { publishVideoQuality: I, activeMediaSource: c, enableLocalVideoMixer: z, mediaSourceList: $ } = ce();
18
- z();
19
- const B = Z(() => {
16
+ setup(he) {
17
+ const { t: N } = ne(), { currentLive: m } = ce(), k = T(null), { publishVideoQuality: I, activeMediaSource: c, enableLocalVideoMixer: U, mediaSourceList: z } = se();
18
+ U();
19
+ const B = F(() => {
20
20
  var t, e;
21
- return g.value && ((t = g.value) == null ? void 0 : t.layoutTemplate) >= 200 && ((e = g.value) == null ? void 0 : e.layoutTemplate) <= 599 ? b.Landscape : b.Portrait;
22
- }), { localLiveStatus: G } = D(), x = se(), u = T();
23
- function X(t, e) {
21
+ return m.value && ((t = m.value) == null ? void 0 : t.layoutTemplate) >= 200 && ((e = m.value) == null ? void 0 : e.layoutTemplate) <= 599 ? L.Landscape : L.Portrait;
22
+ }), x = ae(), u = T();
23
+ function D(t, e) {
24
24
  const i = {
25
- [v.kVideoQuality_360p]: { width: 640, height: 360 },
26
- [v.kVideoQuality_540p]: { width: 960, height: 540 },
27
- [v.kVideoQuality_720p]: { width: 1280, height: 720 },
28
- [v.kVideoQuality_1080p]: { width: 1920, height: 1080 }
25
+ [g.kVideoQuality_360p]: { width: 640, height: 360 },
26
+ [g.kVideoQuality_540p]: { width: 960, height: 540 },
27
+ [g.kVideoQuality_720p]: { width: 1280, height: 720 },
28
+ [g.kVideoQuality_1080p]: { width: 1920, height: 1080 }
29
29
  };
30
30
  let { width: n, height: o } = i[t];
31
- return e === L.TRTCVideoResolutionModePortrait && ([n, o] = [o, n]), { width: n, height: o };
31
+ return e === S.TRTCVideoResolutionModePortrait && ([n, o] = [o, n]), { width: n, height: o };
32
32
  }
33
- const E = T({
33
+ const P = T({
34
34
  position: "absolute",
35
35
  transform: "translate(0px, 0px)"
36
36
  });
37
- let m, r;
38
- function p() {
37
+ let p, r;
38
+ function h() {
39
39
  if (!u.value || !c.value)
40
40
  return;
41
- const { width: t, height: e } = X(
41
+ const { width: t, height: e } = D(
42
42
  I.value,
43
- B.value === b.Landscape ? L.TRTCVideoResolutionModeLandscape : L.TRTCVideoResolutionModePortrait
44
- ), { width: i, height: n } = u.value.getBoundingClientRect(), o = Math.max(i / t, n / e), s = t * o, h = e * o, { top: C, left: a, right: l, bottom: R } = c.value.layout.rect, f = l - a, O = R - C, H = c.value.layout.rotation || V.TRTCVideoRotation0, q = C * o - (h - n) / 2, F = a * o - (s - i) / 2;
43
+ B.value === L.Landscape ? S.TRTCVideoResolutionModeLandscape : S.TRTCVideoResolutionModePortrait
44
+ ), { width: i, height: n } = u.value.getBoundingClientRect(), o = Math.max(i / t, n / e), s = t * o, f = e * o, { top: C, left: a, right: l, bottom: R } = c.value.layout.rect, v = l - a, O = R - C, H = c.value.layout.rotation || V.TRTCVideoRotation0, X = C * o - (f - n) / 2, K = a * o - (s - i) / 2;
45
45
  let y, M;
46
- H === V.TRTCVideoRotation0 || H === V.TRTCVideoRotation180 ? (y = f * o, M = O * o) : (y = O * o, M = f * o);
47
- const J = K(
48
- F,
49
- q,
46
+ H === V.TRTCVideoRotation0 || H === V.TRTCVideoRotation180 ? (y = v * o, M = O * o) : (y = O * o, M = v * o);
47
+ const j = $(
48
+ K,
49
+ X,
50
50
  y,
51
51
  M,
52
52
  i,
53
53
  n
54
54
  );
55
- E.value = {
56
- ...J,
55
+ P.value = {
56
+ ...j,
57
57
  position: "absolute"
58
58
  };
59
59
  }
60
- function K(t, e, i, n, o, s) {
61
- const h = e + n;
62
- let a = t + i / 2 - m / 2, l = e - d - r;
63
- a < 0 ? a = 0 : a + m > o && (a = o - m);
64
- const R = e, f = s - h;
65
- return l >= 0 && R >= r + d ? l = Math.min(l, s - r) : f >= r + d ? l = Math.max(0, h + d) : l = Math.max(0, e - r - d), {
60
+ function $(t, e, i, n, o, s) {
61
+ const f = e + n;
62
+ let a = t + i / 2 - p / 2, l = e - d - r;
63
+ a < 0 ? a = 0 : a + p > o && (a = o - p);
64
+ const R = e, v = s - f;
65
+ return l >= 0 && R >= r + d ? l = Math.min(l, s - r) : v >= r + d ? l = Math.max(0, f + d) : l = Math.max(0, e - r - d), {
66
66
  transform: `translate(${a}px, ${l}px)`
67
67
  };
68
68
  }
69
- const j = ue(p, 16);
69
+ const G = le(h, 16);
70
70
  _(() => c.value, async (t, e) => {
71
71
  var i;
72
72
  if (!e && t) {
73
- await ee();
73
+ await J();
74
74
  const n = (i = k.value) == null ? void 0 : i.$el, { width: o, height: s } = (n == null ? void 0 : n.getBoundingClientRect()) || { width: 0, height: 0 };
75
- m = o, r = s;
75
+ p = o, r = s;
76
76
  }
77
- p();
77
+ h();
78
78
  }, { immediate: !0, deep: !0 }), _(
79
79
  () => [I.value, B.value],
80
80
  ([t, e]) => {
81
- !t || !e || p();
81
+ !t || !e || h();
82
82
  },
83
83
  { immediate: !0, deep: !0 }
84
84
  );
85
- const P = new ResizeObserver(() => {
86
- j();
85
+ const E = new ResizeObserver(() => {
86
+ G();
87
87
  });
88
- return te(() => {
89
- P.observe(u.value), le.once("ready", async () => {
88
+ return Y(() => {
89
+ E.observe(u.value), ie.once("ready", async () => {
90
90
  var e;
91
- await ((e = x.instance) == null ? void 0 : e.getTRTCCloud().getMediaMixingManager()).bindPreviewArea(document.getElementById("local-video-mixer")), p();
92
- }), _(G, async (t) => {
91
+ await ((e = x.instance) == null ? void 0 : e.getTRTCCloud().getMediaMixingManager()).bindPreviewArea(document.getElementById("local-video-mixer")), h();
92
+ }), _(() => {
93
+ var t;
94
+ return (t = m.value) == null ? void 0 : t.liveId;
95
+ }, async (t) => {
93
96
  var i;
94
97
  const e = (i = x.instance) == null ? void 0 : i.getTRTCCloud().getMediaMixingManager();
95
- t === N.Live && await (e == null ? void 0 : e.startPublish()), t === N.IDLE && await (e == null ? void 0 : e.stopPublish());
98
+ t && await (e == null ? void 0 : e.startPublish()), t || await (e == null ? void 0 : e.stopPublish());
96
99
  });
97
- }), oe(async () => {
100
+ }), Z(async () => {
98
101
  var e;
99
- P.unobserve(u.value);
102
+ E.unobserve(u.value);
100
103
  const t = (e = x.instance) == null ? void 0 : e.getTRTCCloud().getMediaMixingManager();
101
104
  await (t == null ? void 0 : t.destroy());
102
- }), (t, e) => (S(), Q("div", {
105
+ }), (t, e) => (b(), Q("div", {
103
106
  ref_key: "localMixerRef",
104
107
  ref: u,
105
108
  class: "local-mixer-container"
@@ -108,19 +111,19 @@ const pe = {
108
111
  id: "local-video-mixer",
109
112
  class: "local-mixer-content"
110
113
  }, null, -1)),
111
- w(c) ? (S(), ie(de, {
114
+ w(c) ? (b(), ee(re, {
112
115
  key: 0,
113
116
  ref_key: "mixControlRef",
114
117
  ref: k,
115
118
  class: "mixer-control",
116
- style: ne(E.value)
119
+ style: te(P.value)
117
120
  }, null, 8, ["style"])) : A("", !0),
118
- w($).length === 0 ? (S(), Q("div", pe, [
119
- W("span", he, ae(w(U)("No video")), 1)
121
+ w(z).length === 0 ? (b(), Q("div", de, [
122
+ W("span", me, oe(w(N)("No video")), 1)
120
123
  ])) : A("", !0)
121
124
  ], 512));
122
125
  }
123
- }), Le = /* @__PURE__ */ me(fe, [["__scopeId", "data-v-9e8c1226"]]);
126
+ }), be = /* @__PURE__ */ ue(pe, [["__scopeId", "data-v-7f6babec"]]);
124
127
  export {
125
- Le as default
128
+ be as default
126
129
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as r, createBlock as t, openBlock as i, unref as n, withCtx as a, createVNode as m, normalizeStyle as c } from "vue";
2
- import { LiveCoreView as l } from "../LiveCoreView/index.js";
1
+ import { defineComponent as o, createBlock as t, openBlock as i, unref as n, withCtx as a, createVNode as m, normalizeStyle as c } from "vue";
2
+ import { LiveCoreView as l } from "../LiveView/index.js";
3
3
  import s from "./LocalMixer/index.js";
4
4
  import { addI18n as e } from "../../i18n/index.js";
5
5
  import { resource as p } from "./i18n/en-US/index.js";
6
6
  import { resource as f } from "./i18n/zh-CN/index.js";
7
- const y = /* @__PURE__ */ r({
7
+ const k = /* @__PURE__ */ o({
8
8
  __name: "index",
9
9
  setup(u) {
10
10
  return (_, d) => (i(), t(n(l), { "ignore-local-video": !0 }, {
11
- localVideo: a(({ style: o }) => [
11
+ localVideo: a(({ style: r }) => [
12
12
  m(s, {
13
- style: c(o)
13
+ style: c(r)
14
14
  }, null, 8, ["style"])
15
15
  ]),
16
16
  _: 1
@@ -20,5 +20,5 @@ const y = /* @__PURE__ */ r({
20
20
  e("en-US", { translation: p });
21
21
  e("zh-CN", { translation: f });
22
22
  export {
23
- y as StreamMixer
23
+ k as StreamMixer
24
24
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as V, computed as l, ref as x, watch as R, onMounted as E, onBeforeUnmount as H, createElementBlock as _, openBlock as b, createElementVNode as W, normalizeStyle as O, Fragment as J, renderList as D, createBlock as P, unref as j, withCtx as q, renderSlot as A, mergeProps as G } from "vue";
1
+ import { defineComponent as V, computed as l, ref as x, watch as R, onMounted as E, onBeforeUnmount as H, createElementBlock as _, openBlock as L, createElementVNode as W, normalizeStyle as O, Fragment as J, renderList as D, createBlock as P, unref as j, withCtx as q, renderSlot as A, mergeProps as G } from "vue";
2
2
  import K from "../common/StreamRegion/StreamRegionPC.js";
3
3
  import { useUserState as Q } from "../../../states/UserState/index.js";
4
4
  import { TUIVideoStreamType as Z } from "@tencentcloud/tuiroom-engine-js";
5
5
  import { useRoomState as ee } from "../../../states/RoomState.js";
6
6
  import { useLoginState as te } from "../../../states/LoginState.js";
7
- import { useLiveState as re } from "../../../states/LiveState/index.js";
7
+ import { useLiveListState as re } from "../../../states/LiveListState/LiveListState.js";
8
8
  import { _ as ae } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const oe = /* @__PURE__ */ V({
10
10
  __name: "CustomLayout",
@@ -17,10 +17,10 @@ const oe = /* @__PURE__ */ V({
17
17
  },
18
18
  emits: ["stream-view-dblclick"],
19
19
  setup(z, { emit: M }) {
20
- const { userList: m, localUser: N, userListOnSeat: p } = Q(), { currentRoom: L } = ee(), { currentLive: v } = re(), { loginUserInfo: T } = te(), F = M, d = z, g = l(() => {
20
+ const { userList: m, localUser: N, userListOnSeat: p } = Q(), { currentRoom: b } = ee(), { currentLive: v } = re(), { loginUserInfo: T } = te(), F = M, d = z, g = l(() => {
21
21
  var t, e;
22
- if (L.value)
23
- return (t = L.value) != null && t.isSeatEnabled ? p.value : m.value;
22
+ if (b.value)
23
+ return (t = b.value) != null && t.isSeatEnabled ? p.value : m.value;
24
24
  if (v.value) {
25
25
  if (v.value.isSeatEnabled) {
26
26
  if (p.value.length > 0)
@@ -135,7 +135,7 @@ const oe = /* @__PURE__ */ V({
135
135
  function U(t, e) {
136
136
  F("stream-view-dblclick", t, e);
137
137
  }
138
- return (t, e) => (b(), _("div", {
138
+ return (t, e) => (L(), _("div", {
139
139
  class: "custom-layout-container",
140
140
  ref_key: "streamListContainerRef",
141
141
  ref: s
@@ -146,7 +146,7 @@ const oe = /* @__PURE__ */ V({
146
146
  ref: Y,
147
147
  style: O(i.value)
148
148
  }, [
149
- (b(!0), _(J, null, D(X.value, (r, u) => (b(), P(j(K), {
149
+ (L(!0), _(J, null, D(X.value, (r, u) => (L(), P(j(K), {
150
150
  class: "stream-list-item",
151
151
  key: `${r.userInfo.userId}_${r.streamType}`,
152
152
  userInfo: r.userInfo,
@@ -163,7 +163,7 @@ const oe = /* @__PURE__ */ V({
163
163
  ], 4)
164
164
  ], 512));
165
165
  }
166
- }), de = /* @__PURE__ */ ae(oe, [["__scopeId", "data-v-a35188d8"]]);
166
+ }), de = /* @__PURE__ */ ae(oe, [["__scopeId", "data-v-6267e055"]]);
167
167
  export {
168
168
  de as default
169
169
  };
@@ -1,14 +1,11 @@
1
- import { defineComponent as q, ref as O, computed as l, onMounted as G, onBeforeUnmount as K, watch as N, createElementBlock as M, openBlock as B, createElementVNode as J, normalizeStyle as T, createCommentVNode as Q, createVNode as W, unref as C, withCtx as H, renderSlot as V, normalizeProps as E, guardReactiveProps as z } from "vue";
2
- import $ from "../common/StreamRegion/StreamRegionPC.js";
3
- import { TUIVideoStreamType as v } from "@tencentcloud/tuiroom-engine-js";
4
- import { useUserState as ee } from "../../../states/UserState/index.js";
5
- import { useLiveState as te } from "../../../states/LiveState/index.js";
6
- import { useRoomEngine as re } from "../../../hooks/useRoomEngine.js";
7
- import { DeviceStatus as h } from "../../../types/device.js";
8
- import { LiveStatus as A } from "../../../types/live.js";
9
- import { SeatStatus as oe } from "../../../types/user.js";
10
- import { _ as ae } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
11
- const ie = { class: "main-view" }, _ = 1920, P = 1080, ne = /* @__PURE__ */ q({
1
+ import { defineComponent as X, ref as I, computed as n, onMounted as Y, onBeforeUnmount as Z, createElementBlock as R, openBlock as F, createElementVNode as O, normalizeStyle as b, createCommentVNode as D, createVNode as M, unref as L, withCtx as V, renderSlot as $, normalizeProps as B, guardReactiveProps as N } from "vue";
2
+ import { TUIVideoStreamType as u } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useUserState as j } from "../../../states/UserState/index.js";
4
+ import W from "../common/StreamRegion/StreamRegionPC.js";
5
+ import { useLiveListState as q } from "../../../states/LiveListState/LiveListState.js";
6
+ import { DeviceStatus as m } from "../../../types/device.js";
7
+ import { _ as G } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const K = { class: "main-view" }, w = 1920, H = 1080, Q = /* @__PURE__ */ X({
12
9
  __name: "FloatLayout",
13
10
  props: {
14
11
  config: { default: () => JSON.stringify({
@@ -20,46 +17,46 @@ const ie = { class: "main-view" }, _ = 1920, P = 1080, ne = /* @__PURE__ */ q({
20
17
  filterFn: { type: Function, default: () => !0 },
21
18
  sortFn: { type: Function, default: () => 0 }
22
19
  },
23
- setup(X) {
24
- var U, k;
25
- const { localUser: x, userListWithVideo: Y } = ee(), { currentLive: c, localLiveStatus: b } = te(), w = re(), p = X, s = O(), Z = O(), y = O({
20
+ setup(T) {
21
+ var _, U;
22
+ const { localUser: z, userListWithVideo: A } = j(), { currentLive: y } = q(), f = T, r = I(), E = I(), v = I({
26
23
  width: "0",
27
24
  height: "0"
28
25
  });
29
- function u(t) {
30
- return Number(t.replace("px", ""));
26
+ function a(e) {
27
+ return Number(e.replace("px", ""));
31
28
  }
32
- const m = l(() => u(y.value.width) / _);
33
- async function D() {
34
- if (!s.value)
29
+ const i = n(() => a(v.value.width) / w);
30
+ async function J() {
31
+ if (!r.value)
35
32
  return;
36
- const t = s.value.getBoundingClientRect(), r = Math.floor(t.width), e = Math.floor(t.height), o = 16, a = 9;
37
- let i = r, n = e;
38
- const f = r / o, g = e / a;
39
- f > g && (i = e / a * o, n = e), f <= g && (i = r, n = r / o * a), y.value.width = `${Math.floor(i)}px`, y.value.height = `${Math.floor(n)}px`;
33
+ const e = r.value.getBoundingClientRect(), t = Math.floor(e.width), o = Math.floor(e.height), s = 16, c = 9;
34
+ let d = t, S = o;
35
+ const k = t / s, C = o / c;
36
+ k > C && (d = o / c * s, S = o), k <= C && (d = t, S = t / s * c), v.value.width = `${Math.floor(d)}px`, v.value.height = `${Math.floor(S)}px`;
40
37
  }
41
- const R = new ResizeObserver(() => {
42
- D();
38
+ const x = new ResizeObserver(() => {
39
+ J();
43
40
  });
44
- G(() => {
45
- s.value && R.observe(s.value);
46
- }), K(() => {
47
- s.value && R.unobserve(s.value);
41
+ Y(() => {
42
+ r.value && x.observe(r.value);
43
+ }), Z(() => {
44
+ r.value && x.unobserve(r.value);
48
45
  });
49
- const S = l(() => {
50
- const t = Y.value.filter(p.filterFn);
51
- return p.sortFn ? t.sort(p.sortFn) : t;
52
- }), L = l(() => {
53
- const t = S.value.find((r) => r.screenStatus === h.On);
54
- return t || S.value[0];
55
- }), I = l(() => L.value.screenStatus === h.On ? v.kScreenStream : v.kCameraStream), d = l(() => I.value === v.kScreenStream ? S.value.find((t) => t.cameraStatus === h.On) : S.value.find((t) => {
56
- var r;
57
- return t.cameraStatus === h.On && t.userId !== ((r = L.value) == null ? void 0 : r.userId);
46
+ const h = n(() => {
47
+ const e = A.value.filter(f.filterFn);
48
+ return f.sortFn ? e.sort(f.sortFn) : e;
49
+ }), p = n(() => {
50
+ const e = h.value.find((t) => t.screenStatus === m.On);
51
+ return e || h.value[0];
52
+ }), g = n(() => p.value.screenStatus === m.On ? u.kScreenStream : u.kCameraStream), l = n(() => g.value === u.kScreenStream ? h.value.find((e) => e.cameraStatus === m.On) : h.value.find((e) => {
53
+ var t;
54
+ return e.cameraStatus === m.On && e.userId !== ((t = p.value) == null ? void 0 : t.userId);
58
55
  }));
59
- if (((U = x.value) == null ? void 0 : U.userId) === ((k = c.value) == null ? void 0 : k.liveOwner.userId)) {
60
- const t = l(() => {
61
- var e, o;
62
- return !d.value || d.value.cameraStatus !== h.On ? null : {
56
+ if (((_ = z.value) == null ? void 0 : _.userId) === ((U = y.value) == null ? void 0 : U.liveOwner.userId)) {
57
+ const e = n(() => {
58
+ var t, o;
59
+ return !l.value || l.value.cameraStatus !== m.On ? null : {
63
60
  LocationX: 1540,
64
61
  // 以画面左上角为原点的 x 坐标
65
62
  LocationY: 20,
@@ -70,119 +67,119 @@ const ie = { class: "main-view" }, _ = 1920, P = 1080, ne = /* @__PURE__ */ q({
70
67
  // 调整后的画面高度
71
68
  ZOrder: 1,
72
69
  // 画面层级
73
- StreamType: v.kCameraStream,
70
+ StreamType: u.kCameraStream,
74
71
  // 0 摄像头, 1 屏幕共享, 2 白板, 3 自定义
75
- Member_Account: (e = d.value) == null ? void 0 : e.userId,
72
+ Member_Account: (t = l.value) == null ? void 0 : t.userId,
76
73
  // 该路流的用户ID
77
74
  BackgroundImageUrl: "",
78
- RoomId: (o = c.value) == null ? void 0 : o.liveId,
75
+ RoomId: (o = y.value) == null ? void 0 : o.liveId,
79
76
  BackgroundColor: "0x1F212C"
80
77
  };
81
- }), r = l(() => {
82
- var e;
83
- return {
84
- // 设置画布大小
85
- VideoEncode: {
86
- Width: _,
87
- Height: P
88
- },
89
- LayoutMode: 1e3,
90
- // 0~9 内置布局模板, 1000自定义布局, 只有1000时候才能修改LayoutInfo,目前只支持 0 和 1000
91
- // 设置画面布局
92
- LayoutInfo: {
93
- LayoutList: t.value ? [t.value] : [],
94
- MaxUserLayout: {
95
- ZOrder: 0,
96
- //层级
97
- StreamType: I.value,
98
- // 0为摄像头, 1为屏幕共享
99
- Member_Account: L.value.userId,
100
- BackgroundImageUrl: "",
101
- //可以设置看看,可能在最大画面时候没作用
102
- RoomId: (e = c.value) == null ? void 0 : e.liveId,
103
- BackgroundColor: "0x1F212C",
104
- LocationX: 0,
105
- // 以画面左上角为原点的 x 坐标
106
- LocationY: 0,
107
- // 以画面左上角为原点的 y 坐标
108
- ImageWidth: _,
109
- // 调整后的画面宽度
110
- ImageHeight: P,
111
- RenderMode: I.value === v.kScreenStream ? 2 : 0
112
- }
113
- }
114
- };
115
- });
116
- N(() => r.value, async (e, o) => {
117
- var i, n;
118
- if (console.error("lixin-debug mix watch layoutConfig change 111", JSON.stringify(e), JSON.stringify(o)), b.value !== A.Live || JSON.stringify(e) === JSON.stringify(o))
119
- return;
120
- const a = (i = w.instance) == null ? void 0 : i.getLiveLayoutManager();
121
- console.error("lixin-debug mix setLiveStreamLayoutInfo 111", e), await (a == null ? void 0 : a.setLiveStreamLayoutInfo((n = c.value) == null ? void 0 : n.liveId, JSON.stringify(e)));
122
- }, { immediate: !0, deep: !0 }), N(() => {
123
- var e;
124
- return [b.value, (e = x.value) == null ? void 0 : e.seatStatus];
125
- }, async ([e, o], [a, i]) => {
126
- var n;
127
- console.error("lixin-debug mix localLiveStatus 222", e, a, o, i), !(e === a && o === i) && e === A.Live && o === oe.On && x.value.userId === ((n = c.value) == null ? void 0 : n.liveOwner.userId) && setTimeout(async () => {
128
- var g, F;
129
- const f = (g = w.instance) == null ? void 0 : g.getLiveLayoutManager();
130
- console.error("lixin-debug mix setLiveStreamLayoutInfo 222", r.value), await (f == null ? void 0 : f.setLiveStreamLayoutInfo((F = c.value) == null ? void 0 : F.liveId, JSON.stringify(r.value)));
131
- }, 1e3);
132
78
  });
79
+ n(
80
+ () => {
81
+ var t;
82
+ return (
83
+ // const userOnSeatListConfig = userListOnSeat.value.map(user => {
84
+ // return {
85
+ // "LocationX": 0, // 以画面左上角为原点的 x 坐标
86
+ // "LocationY": 0, // 以画面左上角为原点的 y 坐标
87
+ // "ImageWidth": 0, // 调整后的画面宽度
88
+ // "ImageHeight": 0, // 调整后的画面高度
89
+ // "ZOrder": 0, // 画面层级
90
+ // "StreamType": TUIVideoStreamType.kCameraStream, // 0 摄像头, 1 屏幕共享, 2 白板, 3 自定义
91
+ // "Member_Account": user.userId, // 该路流的用户ID
92
+ // "RoomId": user.roomId,
93
+ // }
94
+ // });
95
+ {
96
+ // 设置画布大小
97
+ VideoEncode: {
98
+ Width: w,
99
+ Height: H
100
+ },
101
+ LayoutMode: 1e3,
102
+ // 0~9 内置布局模板, 1000自定义布局, 只有1000时候才能修改LayoutInfo,目前只支持 0 和 1000
103
+ // 设置画面布局
104
+ LayoutInfo: {
105
+ LayoutList: e.value ? [e.value] : [],
106
+ MaxUserLayout: {
107
+ ZOrder: 0,
108
+ // 层级
109
+ StreamType: g.value,
110
+ // 0为摄像头, 1为屏幕共享
111
+ Member_Account: p.value.userId,
112
+ BackgroundImageUrl: "",
113
+ // 可以设置看看,可能在最大画面时候没作用
114
+ RoomId: (t = y.value) == null ? void 0 : t.liveId,
115
+ BackgroundColor: "0x1F212C",
116
+ LocationX: 0,
117
+ // 以画面左上角为原点的 x 坐标
118
+ LocationY: 0,
119
+ // 以画面左上角为原点的 y 坐标
120
+ ImageWidth: w,
121
+ // 调整后的画面宽度
122
+ ImageHeight: H,
123
+ RenderMode: g.value === u.kScreenStream ? 2 : 0
124
+ }
125
+ }
126
+ }
127
+ );
128
+ }
129
+ );
133
130
  }
134
- const j = () => {
135
- const { top: t, right: r, bottom: e, left: o, width: a, height: i } = JSON.parse(p.config);
131
+ const P = () => {
132
+ const { top: e, right: t, bottom: o, left: s, width: c, height: d } = JSON.parse(f.config);
136
133
  return {
137
- width: u(a) * m.value + "px",
138
- height: u(i) * m.value + "px",
139
- ...t !== void 0 ? { top: u(t) * m.value + "px" } : {},
140
- ...r !== void 0 ? { right: u(r) * m.value + "px" } : {},
141
- ...e !== void 0 ? { bottom: u(e) * m.value + "px" } : {},
142
- ...o !== void 0 ? { left: u(o) * m.value + "px" } : {}
134
+ width: `${a(c) * i.value}px`,
135
+ height: `${a(d) * i.value}px`,
136
+ ...e !== void 0 ? { top: `${a(e) * i.value}px` } : {},
137
+ ...t !== void 0 ? { right: `${a(t) * i.value}px` } : {},
138
+ ...o !== void 0 ? { bottom: `${a(o) * i.value}px` } : {},
139
+ ...s !== void 0 ? { left: `${a(s) * i.value}px` } : {}
143
140
  };
144
141
  };
145
- return (t, r) => (B(), M("div", {
146
- class: "float-layout-container",
142
+ return (e, t) => (F(), R("div", {
147
143
  ref_key: "streamListContainerRef",
148
- ref: s
144
+ ref: r,
145
+ class: "float-layout-container"
149
146
  }, [
150
- J("div", {
151
- class: "float-layout",
147
+ O("div", {
152
148
  ref_key: "streamListRef",
153
- ref: Z,
154
- style: T(y.value)
149
+ ref: E,
150
+ class: "float-layout",
151
+ style: b(v.value)
155
152
  }, [
156
- J("div", ie, [
157
- W(C($), {
158
- "user-info": L.value,
159
- "stream-type": I.value
153
+ O("div", K, [
154
+ M(L(W), {
155
+ "user-info": p.value,
156
+ "stream-type": g.value
160
157
  }, {
161
- streamViewUI: H((e) => [
162
- V(t.$slots, "streamViewUI", E(z(e)), void 0, !0)
158
+ streamViewUI: V((o) => [
159
+ $(e.$slots, "streamViewUI", B(N(o)), void 0, !0)
163
160
  ]),
164
161
  _: 3
165
162
  }, 8, ["user-info", "stream-type"])
166
163
  ]),
167
- d.value ? (B(), M("div", {
164
+ l.value ? (F(), R("div", {
168
165
  key: 0,
169
166
  class: "float-view",
170
- style: T(j())
167
+ style: b(P())
171
168
  }, [
172
- W(C($), {
173
- "user-info": d.value,
174
- "stream-type": C(v).kCameraStream
169
+ M(L(W), {
170
+ "user-info": l.value,
171
+ "stream-type": L(u).kCameraStream
175
172
  }, {
176
- streamViewUI: H((e) => [
177
- V(t.$slots, "streamViewUI", E(z(e)), void 0, !0)
173
+ streamViewUI: V((o) => [
174
+ $(e.$slots, "streamViewUI", B(N(o)), void 0, !0)
178
175
  ]),
179
176
  _: 3
180
177
  }, 8, ["user-info", "stream-type"])
181
- ], 4)) : Q("", !0)
178
+ ], 4)) : D("", !0)
182
179
  ], 4)
183
180
  ], 512));
184
181
  }
185
- }), pe = /* @__PURE__ */ ae(ne, [["__scopeId", "data-v-0fdb5f8b"]]);
182
+ }), se = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-65a6a095"]]);
186
183
  export {
187
- pe as default
184
+ se as default
188
185
  };
@@ -5,9 +5,9 @@ import { useUserState as ve } from "../../../states/UserState/index.js";
5
5
  import { TUIVideoStreamType as F } from "@tencentcloud/tuiroom-engine-js";
6
6
  import { safelyParse as fe } from "../../../utils/utils.js";
7
7
  import { useRoomState as he } from "../../../states/RoomState.js";
8
- import { useDeviceState as pe } from "../../../states/DeviceState.js";
9
- import { useLoginState as de } from "../../../states/LoginState.js";
10
- import { getNewUserInfo as ye } from "../../../states/UserState/store.js";
8
+ import { useLoginState as pe } from "../../../states/LoginState.js";
9
+ import { getNewUserInfo as de } from "../../../states/UserState/store.js";
10
+ import { useDeviceState as ye } from "../../../states/DeviceState/DeviceState.js";
11
11
  import { LocalRoomStatus as ge } from "../../../types/room.js";
12
12
  import { _ as Se } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const i = "16:9", we = /* @__PURE__ */ Q({
@@ -24,14 +24,14 @@ const i = "16:9", we = /* @__PURE__ */ Q({
24
24
  },
25
25
  emits: ["stream-view-dblclick"],
26
26
  setup(W, { emit: H }) {
27
- const { userList: O, userListOnSeat: T, userWithScreenOn: g } = ve(), { microphoneStatus: V, cameraStatus: E } = pe(), { currentRoom: L, localRoomStatus: B } = he(), { loginUserInfo: N } = de(), q = H, S = W, t = n(() => fe(S.config) || {
27
+ const { userList: O, userListOnSeat: T, userWithScreenOn: g } = ve(), { microphoneStatus: V, cameraStatus: E } = ye(), { currentRoom: L, localRoomStatus: B } = he(), { loginUserInfo: N } = pe(), q = H, S = W, t = n(() => fe(S.config) || {
28
28
  maxRows: 3,
29
29
  maxColumns: 3,
30
30
  rowSpacing: 8,
31
31
  columnSpacing: 8
32
32
  }), D = n(() => {
33
33
  var a;
34
- const e = ye(((a = N.value) == null ? void 0 : a.userId) || "local_fake_user");
34
+ const e = de(((a = N.value) == null ? void 0 : a.userId) || "local_fake_user");
35
35
  return e.cameraStatus = E.value, e.microphoneStatus = V.value, e;
36
36
  }), P = n(() => {
37
37
  var e;