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,168 +0,0 @@
1
- import $ from "./AudioControl.js";
2
- import { defineComponent as ee, ref as a, onMounted as te, onBeforeUnmount as oe, createBlock as p, openBlock as C, Transition as ne, withCtx as se, withDirectives as le, createElementVNode as s, normalizeClass as re, unref as o, createVNode as m, vShow as ce } from "vue";
3
- import { useUIKit as ae, IconPause as ue, IconPlay as ie, IconPictureInPicture as de, IconFullScreen as ve, TUIToast as me, TOAST_TYPE as fe } from "@tencentcloud/uikit-base-component-vue3";
4
- import { usePlayerControlState as he } from "./PlayerControlState.js";
5
- import pe from "./MultiResolution.js";
6
- import { isSafariBrowser as Ce, isFirefoxBrowser as _e } from "./utils/deviceDetection.js";
7
- import { isMobile as c } from "../../../utils/env.js";
8
- import { _ as Pe } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
9
- const ye = { class: "control-buttons" }, Ee = ["title"], Te = { class: "right-controls" }, Le = { class: "control-btn audio-control-btn" }, we = ["title"], Ie = ["title"], Me = 3e3, ge = /* @__PURE__ */ ee({
10
- __name: "PlayerControl",
11
- props: {
12
- isLandscapeStyleMode: { type: Boolean }
13
- },
14
- setup(g) {
15
- const {
16
- isPlaying: f,
17
- isFullscreen: _,
18
- isPictureInPicture: P,
19
- pause: b,
20
- resume: S,
21
- requestPictureInPicture: x,
22
- exitPictureInPicture: A,
23
- requestFullscreen: k,
24
- exitFullscreen: F,
25
- setVolume: h,
26
- cleanup: V
27
- } = he(), B = g, { t: l } = ae(), y = a(1), z = a(!1), n = a(), r = a(!1), u = a(null), D = () => c ? !(Ce() || _e()) : !0, R = () => {
28
- f.value ? b() : S();
29
- }, O = async () => {
30
- let e = !1;
31
- P.value ? e = await A() : e = await x(), e || me({
32
- type: fe.ERROR,
33
- message: l("The system does not support picture-in-picture mode")
34
- });
35
- }, N = () => {
36
- console.log("handleFullscreen"), _.value ? F() : k();
37
- }, U = async (e) => {
38
- y.value = e, c && v(), await h(e);
39
- }, v = () => {
40
- i(), u.value = window.setTimeout(() => {
41
- r.value = !1, u.value = null;
42
- }, Me);
43
- }, i = () => {
44
- u.value && (clearTimeout(u.value), u.value = null);
45
- }, E = () => {
46
- i(), r.value = !0;
47
- }, T = () => {
48
- v();
49
- }, X = () => {
50
- if (!c && n.value) {
51
- const { parentElement: e } = n.value;
52
- e && (e.addEventListener("mouseover", E), e.addEventListener("mouseout", T));
53
- }
54
- }, Y = () => {
55
- if (!c && n.value) {
56
- const { parentElement: e } = n.value;
57
- e && (e.removeEventListener("mouseover", E), e.removeEventListener("mouseout", T));
58
- }
59
- }, d = a(null), q = (e, t) => Math.sqrt(Math.pow(t.clientX - e.x, 2) + Math.pow(t.clientY - e.y, 2)), H = (e) => {
60
- var t;
61
- return ((t = n.value) == null ? void 0 : t.contains(e)) || !1;
62
- }, K = (e) => {
63
- const t = document.getElementById("live-core-view-container");
64
- return (t == null ? void 0 : t.contains(e)) || !1;
65
- }, j = () => {
66
- i(), v();
67
- }, G = () => {
68
- r.value = !r.value, r.value && v();
69
- }, L = (e) => {
70
- if (e.touches.length === 1) {
71
- const t = e.touches[0];
72
- d.value = {
73
- x: t.clientX,
74
- y: t.clientY
75
- };
76
- }
77
- }, w = (e) => {
78
- if (n.value && n.value.contains(e.target)) {
79
- i();
80
- return;
81
- }
82
- }, I = (e) => {
83
- if (!d.value)
84
- return;
85
- const t = e.changedTouches[0];
86
- if (q(d.value, t) > 20) {
87
- d.value = null;
88
- return;
89
- }
90
- const M = e.target;
91
- H(M) ? j() : K(M) ? G() : r.value = !1, d.value = null;
92
- }, J = () => {
93
- c && (document.addEventListener("touchstart", L, !0), document.addEventListener("touchmove", w, !0), document.addEventListener("touchend", I, !0));
94
- }, Q = () => {
95
- c && (document.removeEventListener("touchstart", L, !0), document.removeEventListener("touchmove", w, !0), document.removeEventListener("touchend", I, !0));
96
- }, W = async (e) => {
97
- z.value = e, e ? await h(0) : await h(y.value);
98
- }, Z = () => {
99
- Q(), Y(), i();
100
- };
101
- return te(() => {
102
- J(), X();
103
- }), oe(() => {
104
- Z(), V();
105
- }), (e, t) => (C(), p(ne, { name: "player-control" }, {
106
- default: se(() => [
107
- le(s("div", {
108
- ref_key: "playerControlRef",
109
- ref: n,
110
- class: re([
111
- "playback-controls",
112
- o(c) ? "mobile-mode" : "pc-mode",
113
- { "mobile-landscape-mode": B.isLandscapeStyleMode }
114
- ])
115
- }, [
116
- s("div", ye, [
117
- s("span", {
118
- class: "control-btn play-pause-btn",
119
- title: o(f) ? o(l)("Pause") : o(l)("Play"),
120
- onClick: R
121
- }, [
122
- o(f) ? (C(), p(o(ue), {
123
- key: 0,
124
- size: "20"
125
- })) : (C(), p(o(ie), {
126
- key: 1,
127
- size: "20"
128
- }))
129
- ], 8, Ee),
130
- t[0] || (t[0] = s("div", { class: "center-controls" }, null, -1)),
131
- s("div", Te, [
132
- m(pe),
133
- s("span", Le, [
134
- m($, {
135
- class: "audio-control-icon",
136
- "icon-size": 20,
137
- "enable-volume-control": D(),
138
- onVolumeChange: U,
139
- onMutedChange: W
140
- }, null, 8, ["enable-volume-control"])
141
- ]),
142
- s("span", {
143
- class: "control-btn",
144
- title: o(P) ? o(l)("Exit Picture in Picture") : o(l)("Picture in Picture"),
145
- onClick: O
146
- }, [
147
- m(o(de), { size: "20" })
148
- ], 8, we),
149
- s("span", {
150
- class: "control-btn fullscreen-btn",
151
- title: o(_) ? o(l)("Exit Fullscreen") : o(l)("Fullscreen"),
152
- onClick: N
153
- }, [
154
- m(o(ve), { size: "20" })
155
- ], 8, Ie)
156
- ])
157
- ])
158
- ], 2), [
159
- [ce, r.value]
160
- ])
161
- ]),
162
- _: 1
163
- }));
164
- }
165
- }), Re = /* @__PURE__ */ Pe(ge, [["__scopeId", "data-v-307287f1"]]);
166
- export {
167
- Re as default
168
- };
@@ -1,267 +0,0 @@
1
- import { ref as m, computed as _, watch as ae } from "vue";
2
- import { TUIVideoQuality as E, TRTCCloud as V } from "@tencentcloud/tuiroom-engine-js";
3
- import { useRoomEngine as le } from "../../../hooks/useRoomEngine.js";
4
- import { useLiveState as oe } from "../../../states/LiveState/index.js";
5
- import { useLiveSeatState as se } from "../../../states/LiveSeatState/index.js";
6
- import { getDeviceType as re, getCurrentOrientation as R, shouldRotateToLandscapeForFullscreen as ie, hadLandscapeRotationToUndo as ce } from "./utils/deviceDetection.js";
7
- import { OrientationManager as F, StyleManager as I, FullscreenMode as k, FullscreenManager as D } from "./utils/fullscreenManager.js";
8
- import { EventListenerManager as ue, DOMElementGetter as i } from "./utils/domHelpers.js";
9
- import { LiveStatus as de } from "../../../types/live.js";
10
- var pe = /* @__PURE__ */ ((s) => (s.CONTAIN = "contain", s.COVER = "cover", s.FILL = "fill", s))(pe || {}), ve = ((s) => (s[s.R360P = E.kVideoQuality_360p] = "R360P", s[s.R540P = E.kVideoQuality_540p] = "R540P", s[s.R720P = E.kVideoQuality_720p] = "R720P", s[s.R1080P = E.kVideoQuality_1080p] = "R1080P", s))(ve || {});
11
- const r = m(!0), N = m(
12
- "contain"
13
- /* CONTAIN */
14
- ), d = m(!1), L = m(!1), P = m(!1), g = m(1), z = m([]), v = m(), me = "[LiveCoreView]ResolutionInitialized", h = le();
15
- function Ve() {
16
- const { localLiveStatus: s } = oe(), { canvas: f } = se(), o = new ue(), x = `player-control-${Date.now()}`, p = _(
17
- () => f.value ? f.value.width > f.value.height : !1
18
- ), S = _(
19
- () => f.value ? f.value.width < f.value.height : !1
20
- ), c = re(), u = async (e, n, a) => {
21
- try {
22
- return await e();
23
- } catch (t) {
24
- return console.error(`${n} operation failed:`, t), a;
25
- }
26
- }, b = () => {
27
- const e = i.getVideoElement();
28
- if (e) {
29
- const n = e.volume;
30
- Math.abs(g.value - n) > 0.01 && (console.log(`Syncing volume state: ${g.value} -> ${n}`), g.value = n);
31
- }
32
- }, y = () => {
33
- const e = i.getVideoElement();
34
- if (e) {
35
- const n = !e.paused && !e.ended;
36
- r.value !== n && (console.log(`Syncing playing state: ${r.value} -> ${n}`), r.value = n);
37
- }
38
- }, M = async () => u(async () => {
39
- const e = i.getVideoElement();
40
- if (!e)
41
- throw new Error("Video element not found");
42
- return i.hasTcPlayerElement() ? await e.play() : V.subCloudMap.forEach((a) => {
43
- const t = a == null ? void 0 : a._trtc;
44
- t == null || t.callExperimentalAPI("resumeRemotePlayer", { userId: "*" });
45
- }), r.value = !0, console.log("Video playback resumed"), !0;
46
- }, "Resume playback", !1), Q = async () => u(async () => {
47
- const e = i.getVideoElement();
48
- if (!e)
49
- throw new Error("Video element not found");
50
- return i.hasTcPlayerElement() ? await e.pause() : V.subCloudMap.forEach((a) => {
51
- const t = a == null ? void 0 : a._trtc;
52
- t == null || t.callExperimentalAPI("pauseRemotePlayer", { userId: "*" });
53
- }), r.value = !1, console.log("Video playback paused"), !0;
54
- }, "Pause playback", !1), U = (e) => {
55
- if (!d.value || !p.value)
56
- return;
57
- const n = i.getAllElements();
58
- if (!n.view) {
59
- console.warn("live-core-view element not found for orientation change handling");
60
- return;
61
- }
62
- console.log("Handling orientation change:", {
63
- newOrientation: e,
64
- deviceType: c,
65
- isLandscapeStream: p.value,
66
- isFullscreen: d.value
67
- }), I.smartApplyLandscapeStyles(n.view, e);
68
- }, G = async () => u(async () => {
69
- const e = i.getAllElements(), n = i.validateElements(e);
70
- if (!n.isValid)
71
- throw new Error(`Missing required DOM elements: ${n.missingElements.join(", ")}`);
72
- const a = R(), t = ie(c, p.value);
73
- console.log("Request fullscreen:", {
74
- deviceType: c,
75
- currentOrientation: a,
76
- streamType: p.value ? "landscape stream" : S.value ? "portrait stream" : "unknown",
77
- shouldRotate: t,
78
- reason: t ? "Mobile device in portrait with landscape stream" : a === "landscape" ? "Already in landscape orientation" : p.value ? "Desktop device or other reason" : "Not a landscape stream"
79
- });
80
- const l = await D.requestFullscreen(
81
- e.container,
82
- e.view,
83
- c,
84
- S.value,
85
- t
86
- );
87
- return l.success ? (d.value = !0, console.log(`Fullscreen request successful (${l.mode})`)) : console.error("Fullscreen request failed:", l.error), L.value = l.shouldRotateToLandscape, l;
88
- }, "Request fullscreen", { success: !1, mode: k.CSS_SIMULATED, shouldRotateToLandscape: !1 }), T = async () => u(async () => {
89
- const e = i.getAllElements();
90
- if (!e.view)
91
- throw new Error("live-core-view element not found");
92
- const n = R(), a = ce(c, p.value);
93
- console.log("Exit fullscreen:", {
94
- deviceType: c,
95
- currentOrientation: n,
96
- streamType: p.value ? "landscape stream" : S.value ? "portrait stream" : "unknown",
97
- hadLandscapeRotation: a,
98
- reason: a ? "Mobile device with landscape stream in landscape mode" : n === "portrait" ? "Already in portrait orientation" : p.value ? "Desktop device or other reason" : "Not a landscape stream"
99
- });
100
- const t = await D.exitFullscreen(
101
- e.view,
102
- c,
103
- a
104
- );
105
- return t.mode === k.CSS_SIMULATED && (d.value = !1), t.success ? console.log(`Fullscreen exit successful (${t.mode})`) : console.error("Fullscreen exit failed:", t.error), L.value = !1, t;
106
- }, "Exit fullscreen", { success: !1, mode: k.CSS_SIMULATED, shouldRotateToLandscape: !1 }), H = async () => u(async () => {
107
- const e = i.getVideoElement();
108
- if (!e)
109
- throw new Error("Video element not found");
110
- if (!e.requestPictureInPicture)
111
- throw new Error("Picture-in-picture not supported in current environment");
112
- return C(), await e.requestPictureInPicture(), console.log("Picture-in-picture request successful"), !0;
113
- }, "Request picture-in-picture", !1), A = async () => u(async () => {
114
- if (!document.exitPictureInPicture)
115
- throw new Error("Exit picture-in-picture not supported in current environment");
116
- return await document.exitPictureInPicture(), console.log("Picture-in-picture exit successful"), !0;
117
- }, "Exit picture-in-picture", !1), $ = async (e) => u(async () => {
118
- if (!h.instance)
119
- throw new Error("Room engine instance not available");
120
- return await h.instance.callExperimentalAPI(
121
- JSON.stringify({
122
- api: "switchPlaybackQuality",
123
- params: {
124
- quality: e,
125
- autoSwitch: !1
126
- }
127
- })
128
- ), r.value || (r.value = !0), v.value = e, console.log(`Resolution switched to: ${e}`), !0;
129
- }, "Switch resolution", !1), O = async (e) => u(async () => {
130
- if (!h.instance)
131
- throw new Error("Room engine instance not available");
132
- const n = await h.instance.callExperimentalAPI(
133
- JSON.stringify({
134
- api: "queryPlaybackQualityList",
135
- params: {
136
- roomId: e
137
- }
138
- })
139
- );
140
- return console.log(`Retrieved resolution list for room ${e}:`, n), n || [];
141
- }, "Get resolution list", []), J = async (e, n = !0) => {
142
- try {
143
- const a = `${me}_${e}`, t = localStorage.getItem(a) === "true", l = await O(e);
144
- if (z.value = l, l.length === 0) {
145
- console.warn("No resolutions available for room:", e);
146
- return;
147
- }
148
- (!v.value || !l.includes(v.value)) && (v.value = l[0]);
149
- const w = n && !t && v.value !== void 0;
150
- w && (await $(v.value), localStorage.setItem(a, "true")), console.log(`Resolution initialized for room ${e}:`, {
151
- availableResolutions: l,
152
- currentResolution: v.value,
153
- applied: w,
154
- hasInitialized: t
155
- });
156
- } catch (a) {
157
- console.error("Failed to initialize resolution:", a);
158
- }
159
- }, j = async (e) => u(async () => {
160
- var a;
161
- if (e < 0 || e > 1)
162
- throw new Error("Volume value must be between 0-1");
163
- const n = V.subCloudMap;
164
- return e === 0 ? n.forEach((t) => {
165
- const l = t == null ? void 0 : t._trtc;
166
- l == null || l.muteRemoteAudio("*", !0);
167
- }) : n.forEach((t) => {
168
- const l = t == null ? void 0 : t._trtc;
169
- l == null || l.muteRemoteAudio("*", !1);
170
- }), (a = h.instance) == null || a.setAudioPlayoutVolume({ volume: e * 100 }), g.value = e, console.log(`Video volume set to: ${e}`), !0;
171
- }, "Set volume", !1), K = async (e) => u(async () => (N.value = e, console.log(`Fill mode changed to: ${e}`), !0), "Change fill mode", !1), q = () => {
172
- try {
173
- const e = i.getAllElements();
174
- if (!e.view) {
175
- console.warn("live-core-view element not found for fullscreen exit cleanup");
176
- return;
177
- }
178
- console.log("Executing fullscreen exit style cleanup:", {
179
- deviceType: c,
180
- hasLandscapeStream: p.value,
181
- currentOrientation: R()
182
- }), I.removeFullscreenStyles(e.view), I.removeLandscapeStyles(e.view), c !== "desktop" && F.unlockOrientation().catch((n) => {
183
- console.warn("Failed to unlock orientation during cleanup:", n);
184
- }), L.value = !1, console.log("Fullscreen exit style cleanup completed");
185
- } catch (e) {
186
- console.error("Fullscreen exit style cleanup failed:", e);
187
- }
188
- }, X = () => {
189
- const e = () => {
190
- const a = !!document.fullscreenElement, t = d.value;
191
- console.log("Fullscreen state change:", {
192
- fullscreenElement: document.fullscreenElement,
193
- isCurrentlyFullscreen: a,
194
- previousValue: t,
195
- deviceType: c,
196
- changeType: a ? "entered" : "exited"
197
- }), d.value = a, t && !a && (console.log("Detected passive fullscreen exit, executing style cleanup"), q());
198
- };
199
- o.addListener("fullscreenchange", document, "fullscreenchange", e), o.addListener("webkitfullscreenchange", document, "webkitfullscreenchange", e), o.addListener("mozfullscreenchange", document, "mozfullscreenchange", e), o.addListener("MSFullscreenChange", document, "MSFullscreenChange", e);
200
- const n = () => {
201
- document.visibilityState === "visible" && d.value && (document.fullscreenElement || (console.log("Detected fullscreen state inconsistency via visibilitychange, executing cleanup"), d.value = !1, q()));
202
- };
203
- o.addListener("visibilitychange", document, "visibilitychange", n);
204
- }, C = () => {
205
- const e = i.getVideoElement();
206
- if (!e) return;
207
- const n = () => {
208
- console.log("Entered picture-in-picture mode"), P.value = !0;
209
- }, a = () => {
210
- console.log("Left picture-in-picture mode"), P.value = !1, setTimeout(M, 300);
211
- }, t = () => {
212
- console.log("Video play event detected"), r.value = !0;
213
- }, l = () => {
214
- console.log("Video pause event detected"), r.value = !1;
215
- }, w = () => {
216
- console.log("Video ended event detected"), r.value = !1;
217
- }, B = () => {
218
- console.log("Video load start event detected"), r.value = !e.paused;
219
- }, W = () => {
220
- console.log("Video can play event detected"), r.value = !e.paused;
221
- }, Y = () => {
222
- console.log("Video seeking event detected"), y();
223
- }, ee = () => {
224
- console.log("Video seeked event detected"), y();
225
- }, te = () => {
226
- Math.random() < 0.1 && y();
227
- }, ne = () => {
228
- console.log("Video volume change event detected"), y(), b();
229
- };
230
- o.addListener("enterpictureinpicture", e, "enterpictureinpicture", n), o.addListener("leavepictureinpicture", e, "leavepictureinpicture", a), o.addListener("play", e, "play", t), o.addListener("pause", e, "pause", l), o.addListener("ended", e, "ended", w), o.addListener("loadstart", e, "loadstart", B), o.addListener("canplay", e, "canplay", W), o.addListener("seeking", e, "seeking", Y), o.addListener("seeked", e, "seeked", ee), o.addListener("timeupdate", e, "timeupdate", te), o.addListener("volumechange", e, "volumechange", ne);
231
- }, Z = () => {
232
- console.log("Cleaning up player control state..."), F.removeOrientationListener(x), o.removeAllListeners(), console.log(`Cleaned up ${o.getListenerCount()} event listeners`);
233
- };
234
- return X(), C(), F.addOrientationListener(x, U), y(), b(), ae(s, (e) => {
235
- e === de.Ended && (T(), A(), r.value = !0, d.value = !1, P.value = !1, g.value = 1);
236
- }), {
237
- // State
238
- isPlaying: r,
239
- currentFillMode: N,
240
- isFullscreen: d,
241
- isLandscapeStyleMode: L,
242
- isPictureInPicture: P,
243
- currentVolume: g,
244
- // Resolution state
245
- resolutionList: z,
246
- currentResolution: v,
247
- // Methods
248
- resume: M,
249
- pause: Q,
250
- requestFullscreen: G,
251
- exitFullscreen: T,
252
- requestPictureInPicture: H,
253
- exitPictureInPicture: A,
254
- switchResolution: $,
255
- getResolutionList: O,
256
- initializeResolution: J,
257
- setVolume: j,
258
- changeFillMode: K,
259
- // Cleanup
260
- cleanup: Z
261
- };
262
- }
263
- export {
264
- pe as FillMode,
265
- ve as Resolution,
266
- Ve as usePlayerControlState
267
- };
@@ -1,99 +0,0 @@
1
- var E = Object.defineProperty;
2
- var c = (i, e, t) => e in i ? E(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var l = (i, e, t) => c(i, typeof e != "symbol" ? e + "" : e, t);
4
- const n = {
5
- LIVE_CORE_VIEW_CONTAINER: ".live-core-view-container",
6
- LIVE_CORE_VIEW: ".live-core-view",
7
- VIDEO_ELEMENT: "#atomicx-live-stream-content video",
8
- TCPLAYER_ELEMENT: ".tcplayer"
9
- };
10
- class r {
11
- /**
12
- * Get live-core-view-container element
13
- */
14
- static getLiveCoreViewContainer() {
15
- return document.querySelector(n.LIVE_CORE_VIEW_CONTAINER);
16
- }
17
- /**
18
- * Get live-core-view element
19
- */
20
- static getLiveCoreView() {
21
- return document.querySelector(n.LIVE_CORE_VIEW);
22
- }
23
- /**
24
- * Get video element
25
- */
26
- static getVideoElement() {
27
- return document.querySelector(n.VIDEO_ELEMENT);
28
- }
29
- /**
30
- * Get all required DOM elements
31
- */
32
- static getAllElements() {
33
- return {
34
- container: r.getLiveCoreViewContainer(),
35
- view: r.getLiveCoreView(),
36
- video: r.getVideoElement()
37
- };
38
- }
39
- /**
40
- * Check if tcplayer element exists in live-core-view-container
41
- */
42
- static hasTcPlayerElement() {
43
- const e = r.getLiveCoreViewContainer();
44
- return e ? e.querySelector(n.TCPLAYER_ELEMENT) !== null : !1;
45
- }
46
- /**
47
- * Get tcplayer element from live-core-view-container
48
- */
49
- static getTcPlayerElement() {
50
- const e = r.getLiveCoreViewContainer();
51
- return e ? e.querySelector(n.TCPLAYER_ELEMENT) : null;
52
- }
53
- /**
54
- * Validate if elements exist
55
- */
56
- static validateElements(e) {
57
- const t = [];
58
- return e.container === null && t.push("live-core-view-container"), e.view === null && t.push("live-core-view"), e.video === null && t.push("video"), {
59
- isValid: t.length === 0,
60
- missingElements: t
61
- };
62
- }
63
- }
64
- class v {
65
- constructor() {
66
- l(this, "listeners", /* @__PURE__ */ new Map());
67
- }
68
- /**
69
- * Add event listener
70
- */
71
- addListener(e, t, s, o) {
72
- this.removeListener(e), t.addEventListener(s, o), this.listeners.set(e, { element: t, event: s, handler: o });
73
- }
74
- /**
75
- * Remove specified event listener
76
- */
77
- removeListener(e) {
78
- const t = this.listeners.get(e);
79
- t && (t.element.removeEventListener(t.event, t.handler), this.listeners.delete(e));
80
- }
81
- /**
82
- * Remove all event listeners
83
- */
84
- removeAllListeners() {
85
- for (const [e] of this.listeners)
86
- this.removeListener(e);
87
- }
88
- /**
89
- * Get current listener count
90
- */
91
- getListenerCount() {
92
- return this.listeners.size;
93
- }
94
- }
95
- export {
96
- r as DOMElementGetter,
97
- n as DOM_SELECTORS,
98
- v as EventListenerManager
99
- };
@@ -1,4 +0,0 @@
1
- import { default as DefaultStreamViewUI } from './DefaultStreamViewUI.vue';
2
- import { default as LiveCoreView } from './index.vue';
3
-
4
- export { LiveCoreView, DefaultStreamViewUI };
@@ -1,89 +0,0 @@
1
- import { defineComponent as I, ref as S, computed as y, reactive as C, watch as k, onMounted as T, onBeforeUnmount as $, createElementBlock as i, openBlock as u, createBlock as w, createCommentVNode as L, unref as s, withCtx as h, renderSlot as U, normalizeProps as b, guardReactiveProps as P, createElementVNode as z, Fragment as R, renderList as V, normalizeStyle as F, createVNode as B } from "vue";
2
- import { TUIVideoStreamType as E } from "@tencentcloud/tuiroom-engine-js";
3
- import { useLiveState as M } from "../../../states/LiveState/index.js";
4
- import N from "../common/StreamRegion/StreamRegionPC.js";
5
- import O from "../common/StreamCover/index.js";
6
- import { innerUserStore as c } from "../../../states/UserState/store.js";
7
- import { _ as H } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
8
- const W = { class: "mix-layout-container" }, A = /* @__PURE__ */ I({
9
- __name: "MixLayout",
10
- props: {
11
- config: {},
12
- filterFn: { type: Function },
13
- sortFn: { type: Function }
14
- },
15
- setup(j) {
16
- const { currentLive: a } = M(), r = S(), x = y(() => a.value && a.value.layoutTemplateParams.canvas ? `${a.value.layoutTemplateParams.canvas.width}:${a.value.layoutTemplateParams.canvas.height}` : "16:9"), l = y(() => a.value && a.value.layoutTemplateParams.layoutList ? a.value.layoutTemplateParams.layoutList : []), n = C({});
17
- k(() => l.value.length, () => {
18
- p();
19
- }, { deep: !0 });
20
- const m = new ResizeObserver(() => {
21
- r.value && p();
22
- });
23
- T(() => {
24
- r.value && m.observe(r.value);
25
- }), $(() => {
26
- r.value && m.unobserve(r.value);
27
- });
28
- function p() {
29
- l.value.forEach((e) => {
30
- v(e);
31
- });
32
- }
33
- function v(e) {
34
- var f, d;
35
- const o = `${e.userId}-${e.streamType}`;
36
- if (!r.value) {
37
- n[o] = {};
38
- return;
39
- }
40
- const t = (f = r.value) == null ? void 0 : f.clientWidth, g = (d = r.value) == null ? void 0 : d.clientHeight;
41
- n[o] = {
42
- left: t * e.x + "px",
43
- top: t * e.y + "px",
44
- width: t * e.width + "px",
45
- height: e.height === -1 ? g + "px" : t * e.height + "px",
46
- zIndex: e.zOrder,
47
- backgroundColor: e.backgroundColor
48
- };
49
- }
50
- function _(e) {
51
- const o = `${e.userId}-${e.streamType}`;
52
- return n[o] || v(e), n[o];
53
- }
54
- return (e, o) => (u(), i("div", W, [
55
- s(c).mixUserInfo ? (u(), w(s(N), {
56
- key: 0,
57
- "user-info": s(c).mixUserInfo,
58
- "stream-type": s(E).kCameraStream,
59
- "aspect-ratio": x.value
60
- }, {
61
- "stream-cover": h(() => [
62
- z("div", {
63
- class: "mix-stream-cover",
64
- ref_key: "streamCoverRef",
65
- ref: r
66
- }, [
67
- (u(!0), i(R, null, V(l.value, (t) => (u(), i("div", {
68
- class: "mix-stream-cover-item",
69
- key: `${t.userId}-${t.streamType}`,
70
- style: F(_(t))
71
- }, [
72
- B(O, {
73
- "user-info": s(c).getUserInfo({ userId: t.userId }),
74
- "stream-type": t.streamType
75
- }, null, 8, ["user-info", "stream-type"])
76
- ], 4))), 128))
77
- ], 512)
78
- ]),
79
- streamViewUI: h((t) => [
80
- U(e.$slots, "streamViewUI", b(P(t)), void 0, !0)
81
- ]),
82
- _: 3
83
- }, 8, ["user-info", "stream-type", "aspect-ratio"])) : L("", !0)
84
- ]));
85
- }
86
- }), Y = /* @__PURE__ */ H(A, [["__scopeId", "data-v-526bec15"]]);
87
- export {
88
- Y as default
89
- };
@@ -1,31 +0,0 @@
1
- import { UserInfo } from '../../../types';
2
- import { TUIVideoStreamType } from '@tencentcloud/tuiroom-engine-js';
3
-
4
- interface Props {
5
- config?: string;
6
- filterFn?: (userInfo: UserInfo, index: number) => boolean;
7
- sortFn?: (userInfoA: UserInfo, userInfoB: UserInfo) => number;
8
- }
9
- declare function __VLS_template(): {
10
- streamViewUI?(_: {
11
- userInfo: UserInfo;
12
- streamType: TUIVideoStreamType;
13
- }): any;
14
- };
15
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
- export default _default;
18
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
- type __VLS_TypePropsToRuntimeProps<T> = {
20
- [K in keyof T]-?: {} extends Pick<T, K> ? {
21
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
- } : {
23
- type: import('vue').PropType<T[K]>;
24
- required: true;
25
- };
26
- };
27
- type __VLS_WithTemplateSlots<T, S> = T & {
28
- new (): {
29
- $slots: S;
30
- };
31
- };