tuikit-atomicx-vue3 3.4.2 → 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 (297) 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 +11 -11
  42. package/dist/components/CoHostPanel/CoHostPanel.js +10 -10
  43. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  44. package/dist/components/CoHostPanel/ConnectionPanel.js +132 -123
  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/LiveView/CoreViewDecorate/BattleDecorate.js +58 -58
  61. package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +6 -6
  62. package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +5 -5
  63. package/dist/components/LiveView/DefaultStreamViewUI.js +44 -41
  64. package/dist/components/LiveView/PlayerControl/AudioControl.js +20 -20
  65. package/dist/components/LiveView/PlayerControl/MultiResolution.js +49 -48
  66. package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +7 -1
  67. package/dist/components/LiveView/PlayerControl/PlayerControl.js +90 -86
  68. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +127 -131
  69. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +6 -0
  70. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +54 -22
  71. package/dist/components/LiveView/i18n/en-US/index.d.ts +2 -2
  72. package/dist/components/LiveView/i18n/en-US/index.js +2 -2
  73. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +2 -2
  74. package/dist/components/LiveView/i18n/zh-CN/index.js +2 -2
  75. package/dist/components/LiveView/index.js +17 -17
  76. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  77. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  78. package/dist/components/MessageList/index.d.ts +18 -18
  79. package/dist/components/MicButton/index.js +11 -11
  80. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  81. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  82. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  83. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  84. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  85. package/dist/components/StreamView/index.js +25 -33
  86. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  87. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  88. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  89. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  90. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  91. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  92. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  93. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  94. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  95. package/dist/hooks/useRoomEngine.js +6 -6
  96. package/dist/{index-D2OVtqc8.js → index-BfIEeWMg.js} +191 -181
  97. package/dist/{index-Bm-QfV5o.js → index-DTi1fL-x.js} +460 -457
  98. package/dist/index.js +162 -144
  99. package/dist/report/MetricsKey.d.ts +16 -0
  100. package/dist/report/MetricsKey.js +4 -0
  101. package/dist/report/dataReport.d.ts +12 -0
  102. package/dist/report/dataReport.js +45 -0
  103. package/dist/report/index.d.ts +4 -0
  104. package/dist/report/index.js +6 -0
  105. package/dist/rtc/index.d.ts +5 -43
  106. package/dist/rtc/index.js +48 -48
  107. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  108. package/dist/states/BarrageState/BarrageState.js +80 -0
  109. package/dist/states/BarrageState/index.d.ts +1 -0
  110. package/dist/states/BarrageState/index.js +5 -0
  111. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  112. package/dist/states/BattleState/BattleState.js +203 -0
  113. package/dist/states/BattleState/index.d.ts +1 -0
  114. package/dist/states/BattleState/index.js +4 -0
  115. package/dist/states/CoGuestState.d.ts +24 -94
  116. package/dist/states/CoGuestState.js +297 -189
  117. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  118. package/dist/states/CoHostState/CoHostState.js +135 -131
  119. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  120. package/dist/states/DeviceState/DeviceState.js +314 -0
  121. package/dist/states/DeviceState/index.d.ts +1 -0
  122. package/dist/states/DeviceState/index.js +4 -0
  123. package/dist/states/LiveAudienceState.d.ts +3 -1
  124. package/dist/states/LiveAudienceState.js +106 -63
  125. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  126. package/dist/states/LiveListState/LiveListState.js +285 -0
  127. package/dist/states/LiveListState/index.d.ts +1 -0
  128. package/dist/states/LiveListState/index.js +4 -0
  129. package/dist/states/LiveMonitorState/api/http.js +147 -129
  130. package/dist/states/LiveMonitorState/index.js +67 -62
  131. package/dist/states/LiveSeatState/index.d.ts +46 -11
  132. package/dist/states/LiveSeatState/index.js +34 -15
  133. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  134. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  135. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  136. package/dist/states/LiveSeatState/seatManager.js +131 -29
  137. package/dist/states/LiveSeatState/store.d.ts +5 -5
  138. package/dist/states/LiveSeatState/store.js +12 -10
  139. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  140. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  141. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  142. package/dist/states/LoginState.js +39 -34
  143. package/dist/states/SeatStore.js +82 -83
  144. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  145. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  146. package/dist/states/VideoMixerState/index.d.ts +1 -0
  147. package/dist/states/VideoMixerState/index.js +4 -0
  148. package/dist/styles/index.css +1 -1
  149. package/dist/types/audience.d.ts +21 -0
  150. package/dist/types/audience.js +4 -1
  151. package/dist/types/battle.d.ts +75 -3
  152. package/dist/types/battle.js +5 -1
  153. package/dist/types/coGuest.d.ts +72 -5
  154. package/dist/types/coGuest.js +4 -2
  155. package/dist/types/device.d.ts +38 -17
  156. package/dist/types/device.js +10 -8
  157. package/dist/types/index.d.ts +2 -2
  158. package/dist/types/index.js +96 -80
  159. package/dist/types/live.d.ts +36 -21
  160. package/dist/types/live.js +6 -4
  161. package/dist/types/seat.d.ts +23 -4
  162. package/dist/types/seat.js +7 -1
  163. package/dist/utils/eventCenter.d.ts +88 -0
  164. package/dist/utils/eventCenter.js +161 -0
  165. package/package.json +2 -2
  166. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  167. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  168. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  169. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  170. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  171. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  172. package/src/components/AudioSettingPanel/index.vue +4 -2
  173. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  174. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  175. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  176. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  177. package/src/components/BarrageInput/type.ts +26 -0
  178. package/src/components/BarrageInput/utils.ts +45 -0
  179. package/src/components/BarrageList/BarrageList.vue +61 -117
  180. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  181. package/src/components/BarrageList/BarrageListState.ts +223 -0
  182. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  183. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  184. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  185. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  186. package/src/components/CameraButton/index.vue +0 -1
  187. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  188. package/src/components/CoHostPanel/BattlePanel.vue +1 -4
  189. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  190. package/src/components/CoHostPanel/ConnectionPanel.vue +37 -33
  191. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  192. package/src/components/CoHostPanel/constants.ts +3 -0
  193. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  194. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  195. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  196. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  197. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  198. package/src/components/LiveList/LiveList.vue +5 -5
  199. package/src/components/LiveList/LiveListH5.vue +6 -6
  200. package/src/components/LiveScenePanel/index.vue +2 -2
  201. package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +10 -15
  202. package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +2 -2
  203. package/src/components/LiveView/DefaultStreamViewUI.vue +5 -3
  204. package/src/components/LiveView/PlayerControl/AudioControl.vue +1 -1
  205. package/src/components/LiveView/PlayerControl/MultiResolution.vue +9 -3
  206. package/src/components/LiveView/PlayerControl/PlayerControl.vue +10 -2
  207. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +233 -259
  208. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +64 -0
  209. package/src/components/LiveView/i18n/en-US/index.ts +2 -2
  210. package/src/components/LiveView/i18n/zh-CN/index.ts +2 -2
  211. package/src/components/LiveView/index.vue +2 -2
  212. package/src/components/MicButton/index.vue +3 -3
  213. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  214. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  215. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  216. package/src/components/StreamView/index.vue +28 -14
  217. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  218. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  219. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  220. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  221. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  222. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  223. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  224. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  225. package/src/hooks/useRoomEngine.ts +1 -1
  226. package/src/report/MetricsKey.ts +16 -0
  227. package/src/report/dataReport.ts +55 -0
  228. package/src/report/index.ts +7 -0
  229. package/src/rtc/index.ts +7 -9
  230. package/src/types/audience.ts +27 -1
  231. package/src/types/battle.ts +87 -4
  232. package/src/types/coGuest.ts +87 -5
  233. package/src/types/device.ts +41 -16
  234. package/src/types/index.ts +2 -2
  235. package/src/types/live.ts +41 -22
  236. package/src/types/seat.ts +28 -4
  237. package/src/utils/eventCenter.ts +249 -0
  238. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  239. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  240. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
  241. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  242. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  243. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  244. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  245. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  246. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  247. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  248. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  249. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  250. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  251. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  252. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  253. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  254. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  255. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  256. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  257. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  258. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  259. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  260. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  261. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  262. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
  263. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  264. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  265. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  266. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  267. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  268. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  269. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  270. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  271. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  272. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  273. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  274. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  275. package/dist/states/BarrageListState/index.d.ts +0 -1
  276. package/dist/states/BarrageListState/index.js +0 -4
  277. package/dist/states/BattleState.js +0 -117
  278. package/dist/states/DeviceState.js +0 -296
  279. package/dist/states/LiveState/index.js +0 -254
  280. package/dist/states/VideoMixerState.js +0 -260
  281. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  282. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  283. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  284. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  285. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  286. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  287. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  288. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  289. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  290. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  291. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  292. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  293. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  294. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  295. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  296. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  297. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
@@ -1,40 +1,142 @@
1
- var y = Object.defineProperty;
2
- var d = (o, t, a) => t in o ? y(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a;
3
- var s = (o, t, a) => d(o, typeof t != "symbol" ? t + "" : t, a);
4
- import { useRoomEngine as S } from "../../hooks/useRoomEngine.js";
5
- import { usePlayStream as k } from "./usePlayStream/index.js";
6
- const c = S(), { startPlayStream: f, stopPlayStream: P } = k(), e = class e {
1
+ var p = Object.defineProperty;
2
+ var w = (r, e, t) => e in r ? p(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var k = (r, e, t) => w(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { useRoomEngine as A } from "../../hooks/useRoomEngine.js";
5
+ import { usePlayStream as I } from "./usePlayStream/index.js";
6
+ import { useLoginState as v } from "../LoginState.js";
7
+ import { TUIRole as U, TUIMoveSeatPolicy as u, TUIMediaDevice as f } from "@tencentcloud/tuiroom-engine-js";
8
+ import { useSeatStore as L } from "./store.js";
9
+ import { MoveSeatPolicy as d } from "../../types/seat.js";
10
+ const i = A(), { startPlayStream: P, stopPlayStream: R } = I(), { loginUserInfo: g } = v(), { seatList: S } = L(), l = class l {
7
11
  constructor() {
8
- s(this, "lockSeat", async ({ seatIndex: t, isLocked: a }) => {
9
- var r, m;
10
- const n = await ((r = c.instance) == null ? void 0 : r.getSeatList()), i = n == null ? void 0 : n.find((u) => u.index === t);
11
- if (i)
12
- return await ((m = c.instance) == null ? void 0 : m.lockSeatByAdmin({
13
- seatIndex: t,
14
- lockParams: {
15
- lockSeat: a,
16
- lockVideo: i.isVideoLocked,
17
- lockAudio: i.isAudioLocked
18
- }
19
- }));
12
+ l.instance || (l.instance = this);
13
+ }
14
+ async takeSeat({ seatIndex: e }) {
15
+ var o, a, n;
16
+ if ((await ((a = i.instance) == null ? void 0 : a.getUserInfo({ userId: ((o = g.value) == null ? void 0 : o.userId) || "" }))).userRole === U.kAdministrator)
17
+ throw new Error("general user please use applyForSeat in useCoGuestState to take seat");
18
+ return await ((n = i.instance) == null ? void 0 : n.takeSeat({
19
+ seatIndex: e,
20
+ timeout: 0
21
+ }));
22
+ }
23
+ async leaveSeat() {
24
+ var e;
25
+ return await ((e = i.instance) == null ? void 0 : e.leaveSeat());
26
+ }
27
+ async lockSeat({ seatIndex: e }) {
28
+ var a, n;
29
+ const t = await ((a = i.instance) == null ? void 0 : a.getSeatList()), o = t == null ? void 0 : t.find((c) => c.index === e);
30
+ if (o)
31
+ return await ((n = i.instance) == null ? void 0 : n.lockSeatByAdmin({
32
+ seatIndex: e,
33
+ lockParams: {
34
+ lockSeat: !0,
35
+ lockVideo: o.isVideoLocked,
36
+ lockAudio: o.isAudioLocked
37
+ }
38
+ }));
39
+ }
40
+ async unLockSeat({ seatIndex: e }) {
41
+ var a, n;
42
+ const t = await ((a = i.instance) == null ? void 0 : a.getSeatList()), o = t == null ? void 0 : t.find((c) => c.index === e);
43
+ if (o)
44
+ return await ((n = i.instance) == null ? void 0 : n.lockSeatByAdmin({
45
+ seatIndex: e,
46
+ lockParams: {
47
+ lockSeat: !1,
48
+ lockVideo: o.isVideoLocked,
49
+ lockAudio: o.isAudioLocked
50
+ }
51
+ }));
52
+ }
53
+ async kickUserOutOfSeat({ userId: e }) {
54
+ var o;
55
+ const t = S.value.find((a) => {
56
+ var n;
57
+ return ((n = a.userInfo) == null ? void 0 : n.userId) === e;
20
58
  });
21
- e.instance || (e.instance = this);
59
+ if (t)
60
+ return await ((o = i.instance) == null ? void 0 : o.kickUserOffSeatByAdmin({
61
+ seatIndex: t.index,
62
+ userId: e
63
+ }));
64
+ }
65
+ async moveUserToSeat({ userId: e, targetIndex: t, policy: o }) {
66
+ var c;
67
+ if (!S.value.find((s) => {
68
+ var m;
69
+ return ((m = s.userInfo) == null ? void 0 : m.userId) === e;
70
+ }))
71
+ return;
72
+ const n = {
73
+ [d.AbortWhenOccupied]: u.kAbortWhenOccupied,
74
+ [d.ForceReplace]: u.kForceReplace,
75
+ [d.SwapPosition]: u.kSwapPosition
76
+ };
77
+ return await ((c = i.instance) == null ? void 0 : c.moveUserToSeatByAdmin({
78
+ userId: e,
79
+ targetSeatIndex: t,
80
+ policy: n[o]
81
+ }));
82
+ }
83
+ async closeRemoteCamera({ userId: e }) {
84
+ var t;
85
+ return await ((t = i.instance) == null ? void 0 : t.closeRemoteDeviceByAdmin({
86
+ userId: e,
87
+ device: f.kCamera
88
+ }));
22
89
  }
23
- async moveToSeat({ targetSeatIndex: t }) {
24
- var a;
25
- return await ((a = c.instance) == null ? void 0 : a.moveToSeat({
26
- targetSeatIndex: t
90
+ async closeRemoteMicrophone({ userId: e }) {
91
+ var t;
92
+ return await ((t = i.instance) == null ? void 0 : t.closeRemoteDeviceByAdmin({
93
+ userId: e,
94
+ device: f.kMicrophone
27
95
  }));
28
96
  }
29
- async startPlayStream({ view: t }) {
30
- return await f({ view: t });
97
+ async openRemoteCamera({ userId: e, policy: t }) {
98
+ var n, c;
99
+ const o = await ((n = i.instance) == null ? void 0 : n.getSeatList()), a = o == null ? void 0 : o.find((s) => (s == null ? void 0 : s.userId) === e);
100
+ if (a)
101
+ return await ((c = i.instance) == null ? void 0 : c.lockSeatByAdmin({
102
+ seatIndex: a.index,
103
+ lockParams: {
104
+ lockSeat: a.isLocked,
105
+ lockVideo: !1,
106
+ lockAudio: a.isAudioLocked
107
+ }
108
+ }));
109
+ }
110
+ async openRemoteMicrophone({ userId: e, policy: t }) {
111
+ var n, c;
112
+ const o = await ((n = i.instance) == null ? void 0 : n.getSeatList()), a = o == null ? void 0 : o.find((s) => (s == null ? void 0 : s.userId) === e);
113
+ if (a)
114
+ return await ((c = i.instance) == null ? void 0 : c.lockSeatByAdmin({
115
+ seatIndex: a.index,
116
+ lockParams: {
117
+ lockSeat: a.isLocked,
118
+ lockVideo: a.isVideoLocked,
119
+ lockAudio: !1
120
+ }
121
+ }));
122
+ }
123
+ async muteMicrophone() {
124
+ var e;
125
+ await ((e = i.instance) == null ? void 0 : e.muteLocalAudio());
126
+ }
127
+ async unmuteMicrophone() {
128
+ var e;
129
+ await ((e = i.instance) == null ? void 0 : e.unmuteLocalAudio());
130
+ }
131
+ async startPlayStream({ view: e }) {
132
+ return await P({ view: e });
31
133
  }
32
134
  async stopPlayStream() {
33
- return await P();
135
+ return await R();
34
136
  }
35
137
  };
36
- s(e, "instance");
37
- let l = e;
138
+ k(l, "instance");
139
+ let y = l;
38
140
  export {
39
- l as default
141
+ y as default
40
142
  };
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- import { SeatInfo, LiveCanvas, TUINetwork } from '../../types';
2
+ import { SeatInfo, LiveCanvas, NetworkInfo } from '../../types';
3
3
 
4
4
  export declare function useSeatStore(): {
5
5
  canvas: Ref<{
@@ -15,15 +15,15 @@ export declare function useSeatStore(): {
15
15
  speakingUsers: Ref<Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>, Map<string, number> | (Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>)>;
16
16
  networkQualities: Ref<Map<string, {
17
17
  userId: string;
18
- quality: import('../..').TUINetworkQuality;
18
+ quality: import('../..').NetworkQuality;
19
19
  upLoss: number;
20
20
  downLoss: number;
21
21
  delay: number;
22
- }> & Omit<Map<string, TUINetwork>, keyof Map<any, any>>, Map<string, TUINetwork> | (Map<string, {
22
+ }> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>, Map<string, NetworkInfo> | (Map<string, {
23
23
  userId: string;
24
- quality: import('../..').TUINetworkQuality;
24
+ quality: import('../..').NetworkQuality;
25
25
  upLoss: number;
26
26
  downLoss: number;
27
27
  delay: number;
28
- }> & Omit<Map<string, TUINetwork>, keyof Map<any, any>>)>;
28
+ }> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>)>;
29
29
  };
@@ -1,13 +1,15 @@
1
- import { ref as t, watch as r } from "vue";
2
- import { useLiveState as s } from "../LiveState/index.js";
3
- import { LiveStatus as n } from "../../types/live.js";
4
- const { localLiveStatus: u } = s(), e = t({
1
+ import { ref as t, watch as n } from "vue";
2
+ import { useLiveListState as r } from "../LiveListState/LiveListState.js";
3
+ const { currentLive: o } = r(), i = t({
5
4
  width: 0,
6
5
  height: 0,
7
6
  background: ""
8
- }), a = t([]), c = t(/* @__PURE__ */ new Map()), m = t(/* @__PURE__ */ new Map());
9
- r(u, (i, o) => {
10
- o && i === n.IDLE && (e.value = {
7
+ }), a = t([]), s = t(/* @__PURE__ */ new Map()), u = t(/* @__PURE__ */ new Map());
8
+ n(() => {
9
+ var e;
10
+ return (e = o.value) == null ? void 0 : e.liveId;
11
+ }, (e) => {
12
+ e || (i.value = {
11
13
  width: 0,
12
14
  height: 0,
13
15
  background: ""
@@ -15,10 +17,10 @@ r(u, (i, o) => {
15
17
  }, { immediate: !0 });
16
18
  function v() {
17
19
  return {
18
- canvas: e,
20
+ canvas: i,
19
21
  seatList: a,
20
- speakingUsers: c,
21
- networkQualities: m
22
+ speakingUsers: s,
23
+ networkQualities: u
22
24
  };
23
25
  }
24
26
  export {
@@ -4,7 +4,7 @@ var o = (c, a, t) => I(c, typeof a != "symbol" ? a + "" : a, t);
4
4
  import { TUIVideoStreamType as y } from "@tencentcloud/tuiroom-engine-js";
5
5
  import M from "./RTCStreamPlayer.js";
6
6
  import { useLoginState as S } from "../../LoginState.js";
7
- import { useVideoMixerState as g } from "../../VideoMixerState.js";
7
+ import { useVideoMixerState as g } from "../../VideoMixerState/VideoMixerState.js";
8
8
  import { DeviceStatus as l } from "../../../types/device.js";
9
9
  const { loginUserInfo: m } = S(), { isVideoMixerEnabled: f } = g(), n = class n {
10
10
  constructor() {
@@ -4,7 +4,7 @@ var s = (r, e, t) => m(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { TUIVideoStreamType as u, TRTCVideoFillMode as p, TRTCVideoRotation as T, TRTCVideoMirrorType as w } from "@tencentcloud/tuiroom-engine-js";
5
5
  import { useRoomEngine as V } from "../../../hooks/useRoomEngine.js";
6
6
  import { useLoginState as v } from "../../LoginState.js";
7
- import { useVideoMixerState as I } from "../../VideoMixerState.js";
7
+ import { useVideoMixerState as I } from "../../VideoMixerState/VideoMixerState.js";
8
8
  const a = V(), { loginUserInfo: h } = v(), { isVideoMixerEnabled: c } = I();
9
9
  class S {
10
10
  constructor(e) {
@@ -1,59 +1,61 @@
1
- import { RTCStreamManager as p } from "./RTCStreamManager.js";
2
- import { MixStreamPlayer as m } from "./MixStreamPlayer.js";
3
1
  import { ref as i, watch as r } from "vue";
4
- import { useStreamPosition as I } from "./useStreamPostion.js";
5
- import h, { TUIRoomEvents as y } from "@tencentcloud/tuiroom-engine-js";
6
- import { useRoomEngine as E } from "../../../hooks/useRoomEngine.js";
7
- import { useLiveState as O } from "../../LiveState/index.js";
8
- import { LiveStatus as R } from "../../../types/live.js";
9
- import { DeviceStatus as c } from "../../../types/device.js";
10
- const S = E(), { positionList: d, createResizeObserver: C, deleteResizeObserver: L } = I(), { localLiveStatus: U } = O(), n = i(!1), T = i(null), a = new m(), s = new p();
2
+ import p, { TUIRoomEvents as I } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useRoomEngine as m } from "../../../hooks/useRoomEngine.js";
4
+ import { MixStreamPlayer as h } from "./MixStreamPlayer.js";
5
+ import { RTCStreamManager as y } from "./RTCStreamManager.js";
6
+ import { useStreamPosition as O } from "./useStreamPostion.js";
7
+ import { useLiveListState as R } from "../../LiveListState/LiveListState.js";
8
+ import { DeviceStatus as d } from "../../../types/device.js";
9
+ const E = m(), { positionList: c, createResizeObserver: C, deleteResizeObserver: S } = O(), { currentLive: U } = R(), a = i(!1), L = i(null), n = new h(), s = new y();
11
10
  let f = "";
12
11
  const l = i(null), u = i([]);
13
- async function V({ view: e }) {
12
+ async function T({ view: e }) {
14
13
  var t, o;
15
- f = e, n.value = !0, C({ view: e }), (t = l.value) != null && t.userId && ((o = l.value) == null ? void 0 : o.cameraStatus) === c.On ? await (a == null ? void 0 : a.start({ view: e, userInfo: l.value })) : u.value.length > 0 && await (s == null ? void 0 : s.start({ view: e, userList: u.value }));
14
+ f = e, a.value = !0, C({ view: e }), (t = l.value) != null && t.userId && ((o = l.value) == null ? void 0 : o.cameraStatus) === d.On ? await (n == null ? void 0 : n.start({ view: e, userInfo: l.value })) : u.value.length > 0 && await (s == null ? void 0 : s.start({ view: e, userList: u.value }));
16
15
  }
17
- r(d, (e) => {
16
+ r(c, (e) => {
18
17
  u.value.forEach((t) => {
19
18
  e.find((o) => o.userId === t.userId) && (t.rect = e.find((o) => o.userId === t.userId));
20
- }), n.value && u.value.length > 0 && s.update({ userList: u.value });
19
+ }), a.value && u.value.length > 0 && s.update({ userList: u.value });
21
20
  });
22
- async function b() {
23
- a == null || a.stop(), s == null || s.stop(), T.value = null, n.value = !1, f = "", L();
21
+ async function V() {
22
+ n == null || n.stop(), s == null || s.stop(), L.value = null, a.value = !1, f = "", S();
24
23
  }
25
- function w(e) {
24
+ function b(e) {
26
25
  const { userId: t, hasVideo: o } = e;
27
26
  t.indexOf("livekit_") === 0 ? l.value = o ? {
28
27
  userId: t,
29
- cameraStatus: c.On
30
- } : null : o ? u.value.push({ userId: t, cameraStatus: c.On, rect: d.value.find((v) => v.userId === t) }) : u.value = u.value.filter((v) => v.userId !== t);
28
+ cameraStatus: d.On
29
+ } : null : o ? u.value.push({ userId: t, cameraStatus: d.On, rect: c.value.find((v) => v.userId === t) }) : u.value = u.value.filter((v) => v.userId !== t);
31
30
  }
32
31
  r(() => l.value, (e) => {
33
- n.value && (e ? a.start({ view: f, userInfo: l.value }) : a.stop());
32
+ a.value && (e ? n.start({ view: f, userInfo: l.value }) : n.stop());
34
33
  });
35
34
  r(
36
35
  () => u.value.length,
37
36
  (e, t) => {
38
- n.value && (t === 0 && e > 0 && (s == null || s.start({ view: f, userList: u.value })), t > 0 && e === 0 && (s == null || s.stop()));
37
+ a.value && (t === 0 && e > 0 && (s == null || s.start({ view: f, userList: u.value })), t > 0 && e === 0 && (s == null || s.stop()));
39
38
  }
40
39
  );
41
40
  r(
42
- () => U.value,
41
+ () => {
42
+ var e;
43
+ return (e = U.value) == null ? void 0 : e.liveId;
44
+ },
43
45
  (e) => {
44
- e === R.IDLE && n.value && (l.value = null, u.value = []);
46
+ e || (l.value = null, u.value = []);
45
47
  }
46
48
  );
47
- h.once("ready", () => {
49
+ p.once("ready", () => {
48
50
  var e;
49
- (e = S.instance) == null || e.on(y.onUserVideoStateChanged, w);
51
+ (e = E.instance) == null || e.on(I.onUserVideoStateChanged, b);
50
52
  });
51
- function q() {
53
+ function g() {
52
54
  return {
53
- startPlayStream: V,
54
- stopPlayStream: b
55
+ startPlayStream: T,
56
+ stopPlayStream: V
55
57
  };
56
58
  }
57
59
  export {
58
- q as usePlayStream
60
+ g as usePlayStream
59
61
  };
@@ -1,64 +1,69 @@
1
1
  import { ref as c } from "vue";
2
- import { TUILogin as u } from "@tencentcloud/tui-core";
3
- import { useStatistical as i } from "../statistical/statistical.js";
4
- const s = c(null), { getChatScene: f } = i();
5
- async function g(r) {
2
+ import { TUILogin as i } from "@tencentcloud/tui-core";
3
+ import { dataReport as f } from "../report/dataReport.js";
4
+ import { MetricsKey as u } from "../report/MetricsKey.js";
5
+ import { useStatistical as g } from "../statistical/statistical.js";
6
+ import { isMobile as m } from "../utils/env.js";
7
+ const a = c(null), { getChatScene: I } = g();
8
+ async function S(r) {
6
9
  if (!r.userId || !r.userSig || !r.sdkAppId)
7
10
  throw new Error("[loginState login] params error");
8
- const { userId: l, userSig: t, sdkAppId: n, ...e } = r, a = {
11
+ const { userId: l, userSig: e, sdkAppId: n, ...o } = r, s = {
9
12
  SDKAppID: n,
10
13
  userID: l,
11
- userSig: t,
14
+ userSig: e,
12
15
  useUploadPlugin: !0,
13
- scene: f(),
14
- ...e
16
+ scene: I(),
17
+ ...o
15
18
  };
16
19
  try {
17
- await u.login(a);
18
- } catch (o) {
19
- throw console.error("[loginState login] error", o), o;
20
+ await i.login(s);
21
+ const t = m ? u.T_METRICS_STATE_API_LOGIN_MOBILE_COUNT : u.T_METRICS_STATE_API_LOGIN_COUNT;
22
+ f.reportCount(t);
23
+ } catch (t) {
24
+ throw console.error("[loginState login] error", t), t;
20
25
  }
21
26
  }
22
- async function m(r) {
23
- const l = s.value || {}, { chat: t } = u.getContext();
24
- if (t) {
27
+ async function _(r) {
28
+ const l = a.value || {}, { chat: e } = i.getContext();
29
+ if (e) {
25
30
  const n = [];
26
- r.customInfo && Object.keys(r.customInfo).forEach((e) => {
27
- var o;
28
- let a = e;
29
- e.includes("Tag_Profile_Custom") || (a = `Tag_Profile_Custom_${e}`), n.push({
30
- key: a,
31
- value: (o = r.customInfo) == null ? void 0 : o[e]
31
+ r.customInfo && Object.keys(r.customInfo).forEach((o) => {
32
+ var t;
33
+ let s = o;
34
+ o.includes("Tag_Profile_Custom") || (s = `Tag_Profile_Custom_${o}`), n.push({
35
+ key: s,
36
+ value: (t = r.customInfo) == null ? void 0 : t[o]
32
37
  });
33
38
  });
34
39
  try {
35
- const e = await t.updateMyProfile({
40
+ const o = await e.updateMyProfile({
36
41
  nick: r.userName,
37
42
  avatar: r.avatarUrl,
38
43
  profileCustomField: n
39
44
  });
40
- return s.value = {
45
+ return a.value = {
41
46
  ...l,
42
47
  ...r
43
- }, e;
44
- } catch (e) {
45
- throw console.error("[loginState setSelfInfo] error", e), e;
48
+ }, o;
49
+ } catch (o) {
50
+ throw console.error("[loginState setSelfInfo] error", o), o;
46
51
  }
47
52
  } else
48
53
  throw Error("[loginState setSelfInfo] not login");
49
54
  }
50
- async function I() {
51
- s.value = null, u.logout();
55
+ async function p() {
56
+ a.value = null, i.logout();
52
57
  }
53
- function p() {
58
+ function w() {
54
59
  return {
55
- loginUserInfo: s,
56
- login: g,
57
- logout: I,
58
- setSelfInfo: m
60
+ loginUserInfo: a,
61
+ login: S,
62
+ logout: p,
63
+ setSelfInfo: _
59
64
  };
60
65
  }
61
66
  export {
62
- p as default,
63
- p as useLoginState
67
+ w as default,
68
+ w as useLoginState
64
69
  };