tuikit-atomicx-vue3 3.4.2 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/dist/baseComp/Modal/Modal.js +431 -23
  3. package/dist/chat/index.d.ts +18 -18
  4. package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
  5. package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
  6. package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
  7. package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
  8. package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
  9. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
  10. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
  11. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
  12. package/dist/components/AudioSettingPanel/index.js +81 -73
  13. package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
  14. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
  15. package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
  16. package/dist/components/BarrageInput/MessageInputState.js +82 -0
  17. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  18. package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
  19. package/dist/components/BarrageInput/TextEditor/index.js +7 -7
  20. package/dist/components/BarrageInput/type.d.ts +17 -0
  21. package/dist/components/BarrageInput/type.js +4 -0
  22. package/dist/components/BarrageInput/utils.d.ts +30 -0
  23. package/dist/components/BarrageInput/utils.js +41 -0
  24. package/dist/components/BarrageList/BarrageList.js +80 -110
  25. package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
  26. package/dist/components/BarrageList/BarrageListH5.js +95 -122
  27. package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
  28. package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
  29. package/dist/components/BarrageList/BarrageListState.js +106 -0
  30. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
  31. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
  32. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
  33. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
  34. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
  35. package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
  36. package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
  37. package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
  38. package/dist/components/BarrageList/index.d.ts +0 -36
  39. package/dist/components/CameraButton/index.js +18 -19
  40. package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
  41. package/dist/components/CoHostPanel/BattlePanel.js +11 -11
  42. package/dist/components/CoHostPanel/CoHostPanel.js +10 -10
  43. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  44. package/dist/components/CoHostPanel/ConnectionPanel.js +132 -123
  45. package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
  46. package/dist/components/CoHostPanel/constants.d.ts +3 -0
  47. package/dist/components/CoHostPanel/constants.js +6 -0
  48. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
  49. package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
  50. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
  51. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
  52. package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
  53. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
  54. package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
  55. package/dist/components/LiveList/LiveList.js +23 -23
  56. package/dist/components/LiveList/LiveListH5.js +38 -38
  57. package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
  58. package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
  59. package/dist/components/LiveScenePanel/index.js +4 -4
  60. package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.js +58 -58
  61. package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +6 -6
  62. package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +5 -5
  63. package/dist/components/LiveView/DefaultStreamViewUI.js +44 -41
  64. package/dist/components/LiveView/PlayerControl/AudioControl.js +20 -20
  65. package/dist/components/LiveView/PlayerControl/MultiResolution.js +49 -48
  66. package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +7 -1
  67. package/dist/components/LiveView/PlayerControl/PlayerControl.js +90 -86
  68. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +127 -131
  69. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +6 -0
  70. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +54 -22
  71. package/dist/components/LiveView/i18n/en-US/index.d.ts +2 -2
  72. package/dist/components/LiveView/i18n/en-US/index.js +2 -2
  73. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +2 -2
  74. package/dist/components/LiveView/i18n/zh-CN/index.js +2 -2
  75. package/dist/components/LiveView/index.js +17 -17
  76. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  77. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  78. package/dist/components/MessageList/index.d.ts +18 -18
  79. package/dist/components/MicButton/index.js +11 -11
  80. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  81. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  82. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  83. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  84. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  85. package/dist/components/StreamView/index.js +25 -33
  86. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  87. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  88. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  89. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  90. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  91. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  92. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  93. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  94. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  95. package/dist/hooks/useRoomEngine.js +6 -6
  96. package/dist/{index-D2OVtqc8.js → index-BfIEeWMg.js} +191 -181
  97. package/dist/{index-Bm-QfV5o.js → index-DTi1fL-x.js} +460 -457
  98. package/dist/index.js +162 -144
  99. package/dist/report/MetricsKey.d.ts +16 -0
  100. package/dist/report/MetricsKey.js +4 -0
  101. package/dist/report/dataReport.d.ts +12 -0
  102. package/dist/report/dataReport.js +45 -0
  103. package/dist/report/index.d.ts +4 -0
  104. package/dist/report/index.js +6 -0
  105. package/dist/rtc/index.d.ts +5 -43
  106. package/dist/rtc/index.js +48 -48
  107. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  108. package/dist/states/BarrageState/BarrageState.js +80 -0
  109. package/dist/states/BarrageState/index.d.ts +1 -0
  110. package/dist/states/BarrageState/index.js +5 -0
  111. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  112. package/dist/states/BattleState/BattleState.js +203 -0
  113. package/dist/states/BattleState/index.d.ts +1 -0
  114. package/dist/states/BattleState/index.js +4 -0
  115. package/dist/states/CoGuestState.d.ts +24 -94
  116. package/dist/states/CoGuestState.js +297 -189
  117. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  118. package/dist/states/CoHostState/CoHostState.js +135 -131
  119. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  120. package/dist/states/DeviceState/DeviceState.js +314 -0
  121. package/dist/states/DeviceState/index.d.ts +1 -0
  122. package/dist/states/DeviceState/index.js +4 -0
  123. package/dist/states/LiveAudienceState.d.ts +3 -1
  124. package/dist/states/LiveAudienceState.js +106 -63
  125. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  126. package/dist/states/LiveListState/LiveListState.js +285 -0
  127. package/dist/states/LiveListState/index.d.ts +1 -0
  128. package/dist/states/LiveListState/index.js +4 -0
  129. package/dist/states/LiveMonitorState/api/http.js +147 -129
  130. package/dist/states/LiveMonitorState/index.js +67 -62
  131. package/dist/states/LiveSeatState/index.d.ts +46 -11
  132. package/dist/states/LiveSeatState/index.js +34 -15
  133. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  134. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  135. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  136. package/dist/states/LiveSeatState/seatManager.js +131 -29
  137. package/dist/states/LiveSeatState/store.d.ts +5 -5
  138. package/dist/states/LiveSeatState/store.js +12 -10
  139. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  140. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  141. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  142. package/dist/states/LoginState.js +39 -34
  143. package/dist/states/SeatStore.js +82 -83
  144. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  145. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  146. package/dist/states/VideoMixerState/index.d.ts +1 -0
  147. package/dist/states/VideoMixerState/index.js +4 -0
  148. package/dist/styles/index.css +1 -1
  149. package/dist/types/audience.d.ts +21 -0
  150. package/dist/types/audience.js +4 -1
  151. package/dist/types/battle.d.ts +75 -3
  152. package/dist/types/battle.js +5 -1
  153. package/dist/types/coGuest.d.ts +72 -5
  154. package/dist/types/coGuest.js +4 -2
  155. package/dist/types/device.d.ts +38 -17
  156. package/dist/types/device.js +10 -8
  157. package/dist/types/index.d.ts +2 -2
  158. package/dist/types/index.js +96 -80
  159. package/dist/types/live.d.ts +36 -21
  160. package/dist/types/live.js +6 -4
  161. package/dist/types/seat.d.ts +23 -4
  162. package/dist/types/seat.js +7 -1
  163. package/dist/utils/eventCenter.d.ts +88 -0
  164. package/dist/utils/eventCenter.js +161 -0
  165. package/package.json +3 -3
  166. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  167. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  168. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  169. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  170. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  171. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  172. package/src/components/AudioSettingPanel/index.vue +4 -2
  173. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  174. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  175. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  176. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  177. package/src/components/BarrageInput/type.ts +26 -0
  178. package/src/components/BarrageInput/utils.ts +45 -0
  179. package/src/components/BarrageList/BarrageList.vue +61 -117
  180. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  181. package/src/components/BarrageList/BarrageListState.ts +223 -0
  182. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  183. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  184. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  185. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  186. package/src/components/CameraButton/index.vue +0 -1
  187. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  188. package/src/components/CoHostPanel/BattlePanel.vue +1 -4
  189. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  190. package/src/components/CoHostPanel/ConnectionPanel.vue +37 -33
  191. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  192. package/src/components/CoHostPanel/constants.ts +3 -0
  193. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  194. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  195. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  196. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  197. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  198. package/src/components/LiveList/LiveList.vue +5 -5
  199. package/src/components/LiveList/LiveListH5.vue +6 -6
  200. package/src/components/LiveScenePanel/index.vue +2 -2
  201. package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +10 -15
  202. package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +2 -2
  203. package/src/components/LiveView/DefaultStreamViewUI.vue +5 -3
  204. package/src/components/LiveView/PlayerControl/AudioControl.vue +1 -1
  205. package/src/components/LiveView/PlayerControl/MultiResolution.vue +9 -3
  206. package/src/components/LiveView/PlayerControl/PlayerControl.vue +10 -2
  207. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +233 -259
  208. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +64 -0
  209. package/src/components/LiveView/i18n/en-US/index.ts +2 -2
  210. package/src/components/LiveView/i18n/zh-CN/index.ts +2 -2
  211. package/src/components/LiveView/index.vue +2 -2
  212. package/src/components/MicButton/index.vue +3 -3
  213. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  214. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  215. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  216. package/src/components/StreamView/index.vue +28 -14
  217. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  218. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  219. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  220. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  221. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  222. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  223. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  224. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  225. package/src/hooks/useRoomEngine.ts +1 -1
  226. package/src/report/MetricsKey.ts +16 -0
  227. package/src/report/dataReport.ts +55 -0
  228. package/src/report/index.ts +7 -0
  229. package/src/rtc/index.ts +7 -9
  230. package/src/types/audience.ts +27 -1
  231. package/src/types/battle.ts +87 -4
  232. package/src/types/coGuest.ts +87 -5
  233. package/src/types/device.ts +41 -16
  234. package/src/types/index.ts +2 -2
  235. package/src/types/live.ts +41 -22
  236. package/src/types/seat.ts +28 -4
  237. package/src/utils/eventCenter.ts +249 -0
  238. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  239. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  240. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
  241. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  242. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  243. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  244. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  245. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  246. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  247. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  248. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  249. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  250. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  251. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  252. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  253. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  254. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  255. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  256. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  257. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  258. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  259. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  260. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  261. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  262. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
  263. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  264. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  265. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  266. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  267. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  268. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  269. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  270. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  271. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  272. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  273. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  274. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  275. package/dist/states/BarrageListState/index.d.ts +0 -1
  276. package/dist/states/BarrageListState/index.js +0 -4
  277. package/dist/states/BattleState.js +0 -117
  278. package/dist/states/DeviceState.js +0 -296
  279. package/dist/states/LiveState/index.js +0 -254
  280. package/dist/states/VideoMixerState.js +0 -260
  281. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  282. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  283. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  284. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  285. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  286. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  287. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  288. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  289. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  290. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  291. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  292. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  293. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  294. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  295. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  296. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  297. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
@@ -1,120 +1,119 @@
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";
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
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(
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(
12
11
  "contain"
13
12
  /* 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 = _(
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(
17
16
  () => f.value ? f.value.width > f.value.height : !1
18
- ), S = _(
17
+ ), S = q(
19
18
  () => f.value ? f.value.width < f.value.height : !1
20
- ), c = re(), u = async (e, n, a) => {
19
+ ), c = se(), u = async (e, t, n) => {
21
20
  try {
22
21
  return await e();
23
- } catch (t) {
24
- return console.error(`${n} operation failed:`, t), a;
22
+ } catch (a) {
23
+ return console.error(`${t} operation failed:`, a), n;
25
24
  }
26
- }, b = () => {
27
- const e = i.getVideoElement();
25
+ }, x = () => {
26
+ const e = r.getVideoElement();
28
27
  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);
28
+ const t = e.volume;
29
+ Math.abs(g.value - t) > 0.01 && (console.log(`Syncing volume state: ${g.value} -> ${t}`), g.value = t);
31
30
  }
32
31
  }, y = () => {
33
- const e = i.getVideoElement();
32
+ const e = r.getVideoElement();
34
33
  if (e) {
35
- const n = !e.paused && !e.ended;
36
- r.value !== n && (console.log(`Syncing playing state: ${r.value} -> ${n}`), r.value = n);
34
+ const t = !e.paused && !e.ended;
35
+ s.value !== t && (console.log(`Syncing playing state: ${s.value} -> ${t}`), s.value = t);
37
36
  }
38
- }, M = async () => u(async () => {
39
- const e = i.getVideoElement();
37
+ }, b = async () => u(async () => {
38
+ const e = r.getVideoElement();
40
39
  if (!e)
41
40
  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;
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;
46
45
  }, "Resume playback", !1), Q = async () => u(async () => {
47
- const e = i.getVideoElement();
46
+ const e = r.getVideoElement();
48
47
  if (!e)
49
48
  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;
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;
54
53
  }, "Pause playback", !1), U = (e) => {
55
- if (!d.value || !p.value)
54
+ if (!d.value || !v.value)
56
55
  return;
57
- const n = i.getAllElements();
58
- if (!n.view) {
56
+ const t = r.getAllElements();
57
+ if (!t.view) {
59
58
  console.warn("live-core-view element not found for orientation change handling");
60
59
  return;
61
60
  }
62
61
  console.log("Handling orientation change:", {
63
62
  newOrientation: e,
64
63
  deviceType: c,
65
- isLandscapeStream: p.value,
64
+ isLandscapeStream: v.value,
66
65
  isFullscreen: d.value
67
- }), I.smartApplyLandscapeStyles(n.view, e);
66
+ }), F.smartApplyLandscapeStyles(t.view, e);
68
67
  }, 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);
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);
73
72
  console.log("Request fullscreen:", {
74
73
  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"
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"
79
78
  });
80
- const l = await D.requestFullscreen(
79
+ const i = await _.requestFullscreen(
81
80
  e.container,
82
81
  e.view,
83
82
  c,
84
83
  S.value,
85
- t
84
+ a
86
85
  );
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();
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();
90
89
  if (!e.view)
91
90
  throw new Error("live-core-view element not found");
92
- const n = R(), a = ce(c, p.value);
91
+ const t = V(), n = re(c, v.value);
93
92
  console.log("Exit fullscreen:", {
94
93
  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"
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"
99
98
  });
100
- const t = await D.exitFullscreen(
99
+ const a = await _.exitFullscreen(
101
100
  e.view,
102
101
  c,
103
- a
102
+ n
104
103
  );
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();
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();
108
107
  if (!e)
109
108
  throw new Error("Video element not found");
110
109
  if (!e.requestPictureInPicture)
111
110
  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 () => {
111
+ return O(), await e.requestPictureInPicture(), console.log("Picture-in-picture request successful"), !0;
112
+ }, "Request picture-in-picture", !1), T = async () => u(async () => {
114
113
  if (!document.exitPictureInPicture)
115
114
  throw new Error("Exit picture-in-picture not supported in current environment");
116
115
  return await document.exitPictureInPicture(), console.log("Picture-in-picture exit successful"), !0;
117
- }, "Exit picture-in-picture", !1), $ = async (e) => u(async () => {
116
+ }, "Exit picture-in-picture", !1), C = async (e) => u(async () => {
118
117
  if (!h.instance)
119
118
  throw new Error("Room engine instance not available");
120
119
  return await h.instance.callExperimentalAPI(
@@ -125,11 +124,11 @@ function Ve() {
125
124
  autoSwitch: !1
126
125
  }
127
126
  })
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 () => {
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 () => {
130
129
  if (!h.instance)
131
130
  throw new Error("Room engine instance not available");
132
- const n = await h.instance.callExperimentalAPI(
131
+ const t = await h.instance.callExperimentalAPI(
133
132
  JSON.stringify({
134
133
  api: "queryPlaybackQualityList",
135
134
  params: {
@@ -137,87 +136,81 @@ function Ve() {
137
136
  }
138
137
  })
139
138
  );
140
- return console.log(`Retrieved resolution list for room ${e}:`, n), n || [];
141
- }, "Get resolution list", []), J = async (e, n = !0) => {
139
+ return console.log(`Retrieved resolution list for room ${e}:`, t), t || [];
140
+ }, "Get resolution list", []), J = async (e, t = !0) => {
142
141
  try {
143
- const a = `${me}_${e}`, t = localStorage.getItem(a) === "true", l = await O(e);
144
- if (z.value = l, l.length === 0) {
142
+ const n = `${pe}_${e}`, a = localStorage.getItem(n) === "true", i = await A(e);
143
+ if (z.value = i, i.length === 0) {
145
144
  console.warn("No resolutions available for room:", e);
146
145
  return;
147
146
  }
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,
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,
153
152
  applied: w,
154
- hasInitialized: t
153
+ hasInitialized: a
155
154
  });
156
- } catch (a) {
157
- console.error("Failed to initialize resolution:", a);
155
+ } catch (n) {
156
+ console.error("Failed to initialize resolution:", n);
158
157
  }
159
158
  }, j = async (e) => u(async () => {
160
- var a;
159
+ var t;
161
160
  if (e < 0 || e > 1)
162
161
  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 = () => {
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), $ = () => {
172
164
  try {
173
- const e = i.getAllElements();
165
+ const e = r.getAllElements();
174
166
  if (!e.view) {
175
167
  console.warn("live-core-view element not found for fullscreen exit cleanup");
176
168
  return;
177
169
  }
178
170
  console.log("Executing fullscreen exit style cleanup:", {
179
171
  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);
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);
184
176
  }), L.value = !1, console.log("Fullscreen exit style cleanup completed");
185
177
  } catch (e) {
186
178
  console.error("Fullscreen exit style cleanup failed:", e);
187
179
  }
188
180
  }, X = () => {
189
181
  const e = () => {
190
- const a = !!document.fullscreenElement, t = d.value;
182
+ const n = !!document.fullscreenElement, a = d.value;
191
183
  console.log("Fullscreen state change:", {
192
184
  fullscreenElement: document.fullscreenElement,
193
- isCurrentlyFullscreen: a,
194
- previousValue: t,
185
+ isCurrentlyFullscreen: n,
186
+ previousValue: a,
195
187
  deviceType: c,
196
- changeType: a ? "entered" : "exited"
197
- }), d.value = a, t && !a && (console.log("Detected passive fullscreen exit, executing style cleanup"), q());
188
+ changeType: n ? "entered" : "exited"
189
+ }), d.value = n, a && !n && (console.log("Detected passive fullscreen exit, executing style cleanup"), $());
198
190
  };
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()));
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, $()));
202
194
  };
203
- o.addListener("visibilitychange", document, "visibilitychange", n);
204
- }, C = () => {
205
- const e = i.getVideoElement();
206
- if (!e) return;
207
- const n = () => {
195
+ l.addListener("visibilitychange", document, "visibilitychange", t);
196
+ }, O = () => {
197
+ const e = r.getVideoElement();
198
+ if (!e)
199
+ return;
200
+ const t = () => {
208
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);
209
204
  }, 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;
205
+ console.log("Video play event detected"), s.value = !0;
206
+ }, i = () => {
207
+ console.log("Video pause event detected"), s.value = !1;
215
208
  }, w = () => {
216
- console.log("Video ended event detected"), r.value = !1;
209
+ console.log("Video ended event detected"), s.value = !1;
217
210
  }, B = () => {
218
- console.log("Video load start event detected"), r.value = !e.paused;
211
+ console.log("Video load start event detected"), s.value = !e.paused;
219
212
  }, W = () => {
220
- console.log("Video can play event detected"), r.value = !e.paused;
213
+ console.log("Video can play event detected"), s.value = !e.paused;
221
214
  }, Y = () => {
222
215
  console.log("Video seeking event detected"), y();
223
216
  }, ee = () => {
@@ -225,17 +218,20 @@ function Ve() {
225
218
  }, te = () => {
226
219
  Math.random() < 0.1 && y();
227
220
  }, ne = () => {
228
- console.log("Video volume change event detected"), y(), b();
221
+ console.log("Video volume change event detected"), y(), x();
229
222
  };
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);
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);
231
224
  }, Z = () => {
232
- console.log("Cleaning up player control state..."), F.removeOrientationListener(x), o.removeAllListeners(), console.log(`Cleaned up ${o.getListenerCount()} event listeners`);
225
+ console.log("Cleaning up player control state..."), R.removeOrientationListener(k), l.removeAllListeners(), console.log(`Cleaned up ${l.getListenerCount()} event listeners`);
233
226
  };
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);
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);
236
232
  }), {
237
233
  // State
238
- isPlaying: r,
234
+ isPlaying: s,
239
235
  currentFillMode: N,
240
236
  isFullscreen: d,
241
237
  isLandscapeStyleMode: L,
@@ -243,16 +239,16 @@ function Ve() {
243
239
  currentVolume: g,
244
240
  // Resolution state
245
241
  resolutionList: z,
246
- currentResolution: v,
242
+ currentResolution: p,
247
243
  // Methods
248
- resume: M,
244
+ resume: b,
249
245
  pause: Q,
250
246
  requestFullscreen: G,
251
- exitFullscreen: T,
247
+ exitFullscreen: M,
252
248
  requestPictureInPicture: H,
253
- exitPictureInPicture: A,
254
- switchResolution: $,
255
- getResolutionList: O,
249
+ exitPictureInPicture: T,
250
+ switchResolution: C,
251
+ getResolutionList: A,
256
252
  initializeResolution: J,
257
253
  setVolume: j,
258
254
  changeFillMode: K,
@@ -261,7 +257,7 @@ function Ve() {
261
257
  };
262
258
  }
263
259
  export {
264
- pe as FillMode,
260
+ de as FillMode,
265
261
  ve as Resolution,
266
- Ve as usePlayerControlState
262
+ Pe as usePlayerControlState
267
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>;
@@ -1,54 +1,54 @@
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 = {
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
5
  LIVE_CORE_VIEW_CONTAINER: ".live-core-view-container",
6
6
  LIVE_CORE_VIEW: ".live-core-view",
7
7
  VIDEO_ELEMENT: "#atomicx-live-stream-content video",
8
8
  TCPLAYER_ELEMENT: ".tcplayer"
9
9
  };
10
- class r {
10
+ class s {
11
11
  /**
12
12
  * Get live-core-view-container element
13
13
  */
14
14
  static getLiveCoreViewContainer() {
15
- return document.querySelector(n.LIVE_CORE_VIEW_CONTAINER);
15
+ return document.querySelector(c.LIVE_CORE_VIEW_CONTAINER);
16
16
  }
17
17
  /**
18
18
  * Get live-core-view element
19
19
  */
20
20
  static getLiveCoreView() {
21
- return document.querySelector(n.LIVE_CORE_VIEW);
21
+ return document.querySelector(c.LIVE_CORE_VIEW);
22
22
  }
23
23
  /**
24
24
  * Get video element
25
25
  */
26
26
  static getVideoElement() {
27
- return document.querySelector(n.VIDEO_ELEMENT);
27
+ return document.querySelector(c.VIDEO_ELEMENT);
28
28
  }
29
29
  /**
30
30
  * Get all required DOM elements
31
31
  */
32
32
  static getAllElements() {
33
33
  return {
34
- container: r.getLiveCoreViewContainer(),
35
- view: r.getLiveCoreView(),
36
- video: r.getVideoElement()
34
+ container: s.getLiveCoreViewContainer(),
35
+ view: s.getLiveCoreView(),
36
+ video: s.getVideoElement()
37
37
  };
38
38
  }
39
39
  /**
40
40
  * Check if tcplayer element exists in live-core-view-container
41
41
  */
42
42
  static hasTcPlayerElement() {
43
- const e = r.getLiveCoreViewContainer();
44
- return e ? e.querySelector(n.TCPLAYER_ELEMENT) !== null : !1;
43
+ const e = s.getLiveCoreViewContainer();
44
+ return e ? e.querySelector(c.TCPLAYER_ELEMENT) !== null : !1;
45
45
  }
46
46
  /**
47
47
  * Get tcplayer element from live-core-view-container
48
48
  */
49
49
  static getTcPlayerElement() {
50
- const e = r.getLiveCoreViewContainer();
51
- return e ? e.querySelector(n.TCPLAYER_ELEMENT) : null;
50
+ const e = s.getLiveCoreViewContainer();
51
+ return e ? e.querySelector(c.TCPLAYER_ELEMENT) : null;
52
52
  }
53
53
  /**
54
54
  * Validate if elements exist
@@ -61,15 +61,15 @@ class r {
61
61
  };
62
62
  }
63
63
  }
64
- class v {
64
+ class C {
65
65
  constructor() {
66
- l(this, "listeners", /* @__PURE__ */ new Map());
66
+ d(this, "listeners", /* @__PURE__ */ new Map());
67
67
  }
68
68
  /**
69
69
  * Add event listener
70
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 });
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
73
  }
74
74
  /**
75
75
  * Remove specified event listener
@@ -92,8 +92,40 @@ class v {
92
92
  return this.listeners.size;
93
93
  }
94
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
+ });
95
126
  export {
96
- r as DOMElementGetter,
97
- n as DOM_SELECTORS,
98
- v as EventListenerManager
127
+ s as DOMElementGetter,
128
+ c as DOM_SELECTORS,
129
+ C as EventListenerManager,
130
+ g as waitForVideoMounted
99
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;
@@ -7,8 +7,8 @@ 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",
@@ -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;
@@ -7,8 +7,8 @@ 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中",