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