tuikit-atomicx-vue3 3.4.2 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -0
- package/dist/baseComp/Modal/Modal.js +431 -23
- package/dist/chat/index.d.ts +18 -18
- package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
- package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
- package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
- package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
- package/dist/components/AudioSettingPanel/index.js +81 -73
- package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
- package/dist/components/BarrageInput/MessageInputState.js +82 -0
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
- package/dist/components/BarrageInput/TextEditor/index.js +7 -7
- package/dist/components/BarrageInput/type.d.ts +17 -0
- package/dist/components/BarrageInput/type.js +4 -0
- package/dist/components/BarrageInput/utils.d.ts +30 -0
- package/dist/components/BarrageInput/utils.js +41 -0
- package/dist/components/BarrageList/BarrageList.js +80 -110
- package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListH5.js +95 -122
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
- package/dist/components/BarrageList/BarrageListState.js +106 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
- package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
- package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
- package/dist/components/BarrageList/index.d.ts +0 -36
- package/dist/components/CameraButton/index.js +18 -19
- package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
- package/dist/components/CoHostPanel/BattlePanel.js +11 -11
- package/dist/components/CoHostPanel/CoHostPanel.js +10 -10
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
- package/dist/components/CoHostPanel/ConnectionPanel.js +132 -123
- package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
- package/dist/components/CoHostPanel/constants.d.ts +3 -0
- package/dist/components/CoHostPanel/constants.js +6 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
- package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
- package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
- package/dist/components/LiveList/LiveList.js +23 -23
- package/dist/components/LiveList/LiveListH5.js +38 -38
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
- package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
- package/dist/components/LiveScenePanel/index.js +4 -4
- package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.js +58 -58
- package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +6 -6
- package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +5 -5
- package/dist/components/LiveView/DefaultStreamViewUI.js +44 -41
- package/dist/components/LiveView/PlayerControl/AudioControl.js +20 -20
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +49 -48
- package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +7 -1
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +90 -86
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +127 -131
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +6 -0
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +54 -22
- package/dist/components/LiveView/i18n/en-US/index.d.ts +2 -2
- package/dist/components/LiveView/i18n/en-US/index.js +2 -2
- package/dist/components/LiveView/i18n/zh-CN/index.d.ts +2 -2
- package/dist/components/LiveView/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveView/index.js +17 -17
- package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
- package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
- package/dist/components/MessageList/index.d.ts +18 -18
- package/dist/components/MicButton/index.js +11 -11
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
- package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
- package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
- package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
- package/dist/components/StreamView/Layout/GridLayout.js +5 -5
- package/dist/components/StreamView/index.js +25 -33
- package/dist/components/StreamView/manager/mediaManager.js +54 -60
- package/dist/components/VideoSetting/CameraSelect.js +8 -8
- package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
- package/dist/components/VideoSetting/VideoPreview.js +9 -9
- package/dist/components/VideoSetting/VideoProfile.js +6 -6
- package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
- package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
- package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
- package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
- package/dist/hooks/useRoomEngine.js +6 -6
- package/dist/{index-D2OVtqc8.js → index-BfIEeWMg.js} +191 -181
- package/dist/{index-Bm-QfV5o.js → index-DTi1fL-x.js} +460 -457
- package/dist/index.js +162 -144
- package/dist/report/MetricsKey.d.ts +16 -0
- package/dist/report/MetricsKey.js +4 -0
- package/dist/report/dataReport.d.ts +12 -0
- package/dist/report/dataReport.js +45 -0
- package/dist/report/index.d.ts +4 -0
- package/dist/report/index.js +6 -0
- package/dist/rtc/index.d.ts +5 -43
- package/dist/rtc/index.js +48 -48
- package/dist/states/BarrageState/BarrageState.d.ts +74 -0
- package/dist/states/BarrageState/BarrageState.js +80 -0
- package/dist/states/BarrageState/index.d.ts +1 -0
- package/dist/states/BarrageState/index.js +5 -0
- package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
- package/dist/states/BattleState/BattleState.js +203 -0
- package/dist/states/BattleState/index.d.ts +1 -0
- package/dist/states/BattleState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +24 -94
- package/dist/states/CoGuestState.js +297 -189
- package/dist/states/CoHostState/CoHostState.d.ts +2 -2
- package/dist/states/CoHostState/CoHostState.js +135 -131
- package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
- package/dist/states/DeviceState/DeviceState.js +314 -0
- package/dist/states/DeviceState/index.d.ts +1 -0
- package/dist/states/DeviceState/index.js +4 -0
- package/dist/states/LiveAudienceState.d.ts +3 -1
- package/dist/states/LiveAudienceState.js +106 -63
- package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
- package/dist/states/LiveListState/LiveListState.js +285 -0
- package/dist/states/LiveListState/index.d.ts +1 -0
- package/dist/states/LiveListState/index.js +4 -0
- package/dist/states/LiveMonitorState/api/http.js +147 -129
- package/dist/states/LiveMonitorState/index.js +67 -62
- package/dist/states/LiveSeatState/index.d.ts +46 -11
- package/dist/states/LiveSeatState/index.js +34 -15
- package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
- package/dist/states/LiveSeatState/seatEventManager.js +63 -42
- package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
- package/dist/states/LiveSeatState/seatManager.js +131 -29
- package/dist/states/LiveSeatState/store.d.ts +5 -5
- package/dist/states/LiveSeatState/store.js +12 -10
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
- package/dist/states/LoginState.js +39 -34
- package/dist/states/SeatStore.js +82 -83
- package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
- package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
- package/dist/states/VideoMixerState/index.d.ts +1 -0
- package/dist/states/VideoMixerState/index.js +4 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/audience.d.ts +21 -0
- package/dist/types/audience.js +4 -1
- package/dist/types/battle.d.ts +75 -3
- package/dist/types/battle.js +5 -1
- package/dist/types/coGuest.d.ts +72 -5
- package/dist/types/coGuest.js +4 -2
- package/dist/types/device.d.ts +38 -17
- package/dist/types/device.js +10 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +96 -80
- package/dist/types/live.d.ts +36 -21
- package/dist/types/live.js +6 -4
- package/dist/types/seat.d.ts +23 -4
- package/dist/types/seat.js +7 -1
- package/dist/utils/eventCenter.d.ts +88 -0
- package/dist/utils/eventCenter.js +161 -0
- package/package.json +2 -2
- package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
- package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
- package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
- package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
- package/src/components/AudioSettingPanel/index.vue +4 -2
- package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/MessageInputState.ts +160 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
- package/src/components/BarrageInput/type.ts +26 -0
- package/src/components/BarrageInput/utils.ts +45 -0
- package/src/components/BarrageList/BarrageList.vue +61 -117
- package/src/components/BarrageList/BarrageListH5.vue +75 -159
- package/src/components/BarrageList/BarrageListState.ts +223 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
- package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
- package/src/components/CameraButton/index.vue +0 -1
- package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
- package/src/components/CoHostPanel/BattlePanel.vue +1 -4
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
- package/src/components/CoHostPanel/ConnectionPanel.vue +37 -33
- package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
- package/src/components/CoHostPanel/constants.ts +3 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
- package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
- package/src/components/LiveList/LiveList.vue +5 -5
- package/src/components/LiveList/LiveListH5.vue +6 -6
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +10 -15
- package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +2 -2
- package/src/components/LiveView/DefaultStreamViewUI.vue +5 -3
- package/src/components/LiveView/PlayerControl/AudioControl.vue +1 -1
- package/src/components/LiveView/PlayerControl/MultiResolution.vue +9 -3
- package/src/components/LiveView/PlayerControl/PlayerControl.vue +10 -2
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +233 -259
- package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +64 -0
- package/src/components/LiveView/i18n/en-US/index.ts +2 -2
- package/src/components/LiveView/i18n/zh-CN/index.ts +2 -2
- package/src/components/LiveView/index.vue +2 -2
- package/src/components/MicButton/index.vue +3 -3
- package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
- package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
- package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
- package/src/components/StreamView/index.vue +28 -14
- package/src/components/StreamView/manager/mediaManager.ts +38 -42
- package/src/components/VideoSetting/CameraSelect.vue +1 -2
- package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
- package/src/components/VideoSetting/VideoPreview.vue +1 -2
- package/src/components/VideoSetting/VideoProfile.vue +1 -1
- package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
- package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
- package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
- package/src/hooks/useRoomEngine.ts +1 -1
- package/src/report/MetricsKey.ts +16 -0
- package/src/report/dataReport.ts +55 -0
- package/src/report/index.ts +7 -0
- package/src/rtc/index.ts +7 -9
- package/src/types/audience.ts +27 -1
- package/src/types/battle.ts +87 -4
- package/src/types/coGuest.ts +87 -5
- package/src/types/device.ts +41 -16
- package/src/types/index.ts +2 -2
- package/src/types/live.ts +41 -22
- package/src/types/seat.ts +28 -4
- package/src/utils/eventCenter.ts +249 -0
- package/dist/DialogPortal-CvJcEAsn.js +0 -417
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
- package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
- package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
- package/dist/components/BarrageList/MessageForward/index.js +0 -4
- package/dist/components/StreamView/Layout/MixLayout.js +0 -89
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
- package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
- package/dist/states/BarrageListState/BarrageListState.js +0 -122
- package/dist/states/BarrageListState/index.d.ts +0 -1
- package/dist/states/BarrageListState/index.js +0 -4
- package/dist/states/BattleState.js +0 -117
- package/dist/states/DeviceState.js +0 -296
- package/dist/states/LiveState/index.js +0 -254
- package/dist/states/VideoMixerState.js +0 -260
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
- package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
- package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
- package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
- package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
- package/src/components/BarrageList/MessageForward/index.ts +0 -3
- package/src/components/StreamView/Layout/MixLayout.vue +0 -144
|
@@ -1,120 +1,119 @@
|
|
|
1
|
-
import { ref as m, computed as
|
|
2
|
-
import { TUIVideoQuality as E, TRTCCloud as
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { OrientationManager as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
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([]),
|
|
15
|
-
function
|
|
16
|
-
const {
|
|
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 =
|
|
19
|
+
), c = se(), u = async (e, t, n) => {
|
|
21
20
|
try {
|
|
22
21
|
return await e();
|
|
23
|
-
} catch (
|
|
24
|
-
return console.error(`${
|
|
22
|
+
} catch (a) {
|
|
23
|
+
return console.error(`${t} operation failed:`, a), n;
|
|
25
24
|
}
|
|
26
|
-
},
|
|
27
|
-
const e =
|
|
25
|
+
}, x = () => {
|
|
26
|
+
const e = r.getVideoElement();
|
|
28
27
|
if (e) {
|
|
29
|
-
const
|
|
30
|
-
Math.abs(g.value -
|
|
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 =
|
|
32
|
+
const e = r.getVideoElement();
|
|
34
33
|
if (e) {
|
|
35
|
-
const
|
|
36
|
-
|
|
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
|
-
},
|
|
39
|
-
const e =
|
|
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
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
}),
|
|
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 =
|
|
46
|
+
const e = r.getVideoElement();
|
|
48
47
|
if (!e)
|
|
49
48
|
throw new Error("Video element not found");
|
|
50
|
-
return
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
}),
|
|
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 || !
|
|
54
|
+
if (!d.value || !v.value)
|
|
56
55
|
return;
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
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:
|
|
64
|
+
isLandscapeStream: v.value,
|
|
66
65
|
isFullscreen: d.value
|
|
67
|
-
}),
|
|
66
|
+
}), F.smartApplyLandscapeStyles(t.view, e);
|
|
68
67
|
}, G = async () => u(async () => {
|
|
69
|
-
const e =
|
|
70
|
-
if (!
|
|
71
|
-
throw new Error(`Missing required DOM elements: ${
|
|
72
|
-
const
|
|
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:
|
|
76
|
-
streamType:
|
|
77
|
-
shouldRotate:
|
|
78
|
-
reason:
|
|
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
|
|
79
|
+
const i = await _.requestFullscreen(
|
|
81
80
|
e.container,
|
|
82
81
|
e.view,
|
|
83
82
|
c,
|
|
84
83
|
S.value,
|
|
85
|
-
|
|
84
|
+
a
|
|
86
85
|
);
|
|
87
|
-
return
|
|
88
|
-
}, "Request fullscreen", { success: !1, mode:
|
|
89
|
-
const e =
|
|
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
|
|
91
|
+
const t = V(), n = re(c, v.value);
|
|
93
92
|
console.log("Exit fullscreen:", {
|
|
94
93
|
deviceType: c,
|
|
95
|
-
currentOrientation:
|
|
96
|
-
streamType:
|
|
97
|
-
hadLandscapeRotation:
|
|
98
|
-
reason:
|
|
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
|
|
99
|
+
const a = await _.exitFullscreen(
|
|
101
100
|
e.view,
|
|
102
101
|
c,
|
|
103
|
-
|
|
102
|
+
n
|
|
104
103
|
);
|
|
105
|
-
return
|
|
106
|
-
}, "Exit fullscreen", { success: !1, mode:
|
|
107
|
-
const e =
|
|
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
|
|
113
|
-
}, "Request picture-in-picture", !1),
|
|
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),
|
|
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
|
-
),
|
|
129
|
-
}, "Switch resolution", !1),
|
|
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
|
|
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}:`,
|
|
141
|
-
}, "Get resolution list", []), J = async (e,
|
|
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
|
|
144
|
-
if (z.value =
|
|
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
|
-
(!
|
|
149
|
-
const w =
|
|
150
|
-
w && (await
|
|
151
|
-
availableResolutions:
|
|
152
|
-
currentResolution:
|
|
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:
|
|
153
|
+
hasInitialized: a
|
|
155
154
|
});
|
|
156
|
-
} catch (
|
|
157
|
-
console.error("Failed to initialize resolution:",
|
|
155
|
+
} catch (n) {
|
|
156
|
+
console.error("Failed to initialize resolution:", n);
|
|
158
157
|
}
|
|
159
158
|
}, j = async (e) => u(async () => {
|
|
160
|
-
var
|
|
159
|
+
var t;
|
|
161
160
|
if (e < 0 || e > 1)
|
|
162
161
|
throw new Error("Volume value must be between 0-1");
|
|
163
|
-
|
|
164
|
-
|
|
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 =
|
|
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:
|
|
181
|
-
currentOrientation:
|
|
182
|
-
}),
|
|
183
|
-
console.warn("Failed to unlock orientation during cleanup:",
|
|
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
|
|
182
|
+
const n = !!document.fullscreenElement, a = d.value;
|
|
191
183
|
console.log("Fullscreen state change:", {
|
|
192
184
|
fullscreenElement: document.fullscreenElement,
|
|
193
|
-
isCurrentlyFullscreen:
|
|
194
|
-
previousValue:
|
|
185
|
+
isCurrentlyFullscreen: n,
|
|
186
|
+
previousValue: a,
|
|
195
187
|
deviceType: c,
|
|
196
|
-
changeType:
|
|
197
|
-
}), d.value =
|
|
188
|
+
changeType: n ? "entered" : "exited"
|
|
189
|
+
}), d.value = n, a && !n && (console.log("Detected passive fullscreen exit, executing style cleanup"), $());
|
|
198
190
|
};
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
document.visibilityState === "visible" && d.value && (document.fullscreenElement || (console.log("Detected fullscreen state inconsistency via visibilitychange, executing cleanup"), d.value = !1,
|
|
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
|
-
|
|
204
|
-
},
|
|
205
|
-
const e =
|
|
206
|
-
if (!e)
|
|
207
|
-
|
|
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("
|
|
211
|
-
},
|
|
212
|
-
console.log("Video
|
|
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"),
|
|
209
|
+
console.log("Video ended event detected"), s.value = !1;
|
|
217
210
|
}, B = () => {
|
|
218
|
-
console.log("Video load start event detected"),
|
|
211
|
+
console.log("Video load start event detected"), s.value = !e.paused;
|
|
219
212
|
}, W = () => {
|
|
220
|
-
console.log("Video can play event detected"),
|
|
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(),
|
|
221
|
+
console.log("Video volume change event detected"), y(), x();
|
|
229
222
|
};
|
|
230
|
-
|
|
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..."),
|
|
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(),
|
|
235
|
-
e
|
|
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:
|
|
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:
|
|
242
|
+
currentResolution: p,
|
|
247
243
|
// Methods
|
|
248
|
-
resume:
|
|
244
|
+
resume: b,
|
|
249
245
|
pause: Q,
|
|
250
246
|
requestFullscreen: G,
|
|
251
|
-
exitFullscreen:
|
|
247
|
+
exitFullscreen: M,
|
|
252
248
|
requestPictureInPicture: H,
|
|
253
|
-
exitPictureInPicture:
|
|
254
|
-
switchResolution:
|
|
255
|
-
getResolutionList:
|
|
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
|
-
|
|
260
|
+
de as FillMode,
|
|
265
261
|
ve as Resolution,
|
|
266
|
-
|
|
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
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
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
|
|
10
|
+
class s {
|
|
11
11
|
/**
|
|
12
12
|
* Get live-core-view-container element
|
|
13
13
|
*/
|
|
14
14
|
static getLiveCoreViewContainer() {
|
|
15
|
-
return document.querySelector(
|
|
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(
|
|
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(
|
|
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:
|
|
35
|
-
view:
|
|
36
|
-
video:
|
|
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 =
|
|
44
|
-
return e ? e.querySelector(
|
|
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 =
|
|
51
|
-
return e ? e.querySelector(
|
|
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
|
|
64
|
+
class C {
|
|
65
65
|
constructor() {
|
|
66
|
-
|
|
66
|
+
d(this, "listeners", /* @__PURE__ */ new Map());
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Add event listener
|
|
70
70
|
*/
|
|
71
|
-
addListener(e, t,
|
|
72
|
-
this.removeListener(e), t.addEventListener(
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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中",
|