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
package/dist/rtc/index.js
CHANGED
|
@@ -6,62 +6,62 @@ import { CameraButton as s } from "../components/CameraButton/index.js";
|
|
|
6
6
|
import { CoGuestPanel as a } from "../components/CoGuestPanel/index.js";
|
|
7
7
|
import { CoHostPanel as r } from "../components/CoHostPanel/index.js";
|
|
8
8
|
import { LiveAudienceList as n } from "../components/LiveAudienceList/index.js";
|
|
9
|
-
import { LiveCoreView as Ue, LiveView as Te } from "../components/LiveView/index.js";
|
|
10
9
|
import { LiveList as m } from "../components/LiveList/index.js";
|
|
11
10
|
import "../components/LiveMonitorView/index.js";
|
|
12
11
|
import { LiveScenePanel as u } from "../components/LiveScenePanel/index.js";
|
|
12
|
+
import { LiveCoreView as we, LiveView as Ge } from "../components/LiveView/index.js";
|
|
13
13
|
import { MicButton as S } from "../components/MicButton/index.js";
|
|
14
14
|
import { StreamMixer as c } from "../components/StreamMixer/index.js";
|
|
15
15
|
import { StreamView as p } from "../components/StreamView/index.js";
|
|
16
|
-
import { V as
|
|
17
|
-
import { VideoSettingPanel as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { useLiveAudienceState as
|
|
16
|
+
import { V as f } from "../index-DTq2ybsB.js";
|
|
17
|
+
import { VideoSettingPanel as L } from "../components/VideoSettingPanel/index.js";
|
|
18
|
+
import { useRoomEngine as v } from "../hooks/useRoomEngine.js";
|
|
19
|
+
import { useCoGuestState as C } from "../states/CoGuestState.js";
|
|
20
|
+
import { useLiveAudienceState as g } from "../states/LiveAudienceState.js";
|
|
21
21
|
import { useLiveMonitorState as $ } from "../states/LiveMonitorState/index.js";
|
|
22
22
|
import { useLiveSeatState as d } from "../states/LiveSeatState/index.js";
|
|
23
|
-
import {
|
|
24
|
-
import { useRoomState as B } from "../states/RoomState.js";
|
|
23
|
+
import { useRoomState as l } from "../states/RoomState.js";
|
|
25
24
|
import { useUserState as P } from "../states/UserState/index.js";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
import V from "./server.js";
|
|
26
|
+
import B from "../components/LiveMonitorView/LiveMonitorView.js";
|
|
27
|
+
import { useDeviceState as M } from "../states/DeviceState/DeviceState.js";
|
|
28
|
+
import { useVideoMixerState as x } from "../states/VideoMixerState/VideoMixerState.js";
|
|
29
|
+
import { useCoHostState as A } from "../states/CoHostState/CoHostState.js";
|
|
30
|
+
import { useLiveListState as Ie } from "../states/LiveListState/LiveListState.js";
|
|
31
|
+
import { useBattleState as Ee } from "../states/BattleState/BattleState.js";
|
|
32
|
+
import { useBarrageState as Te } from "../states/BarrageState/BarrageState.js";
|
|
33
|
+
V.getInstance().init();
|
|
34
|
+
const te = i, oe = o, ie = c, se = u, ae = n, re = a, ne = r, me = t, ue = L, Se = S, ce = s, pe = m, fe = B, Le = p, ve = e, Ce = f, ge = $, $e = d, de = P, le = C, Pe = A, Ve = M, Be = g, Me = l, xe = x, Ae = v;
|
|
35
35
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
ve as AudioSetting,
|
|
37
|
+
me as AudioSettingPanel,
|
|
38
|
+
oe as BarrageInput,
|
|
39
|
+
te as BarrageList,
|
|
40
|
+
ce as CameraButton,
|
|
41
|
+
re as CoGuestPanel,
|
|
42
|
+
ne as CoHostPanel,
|
|
43
|
+
ae as LiveAudienceList,
|
|
44
|
+
we as LiveCoreView,
|
|
45
|
+
pe as LiveList,
|
|
46
|
+
fe as LiveMonitorView,
|
|
47
|
+
se as LiveScenePanel,
|
|
48
|
+
Ge as LiveView,
|
|
49
|
+
Se as MicButton,
|
|
50
|
+
ie as StreamMixer,
|
|
51
|
+
Le as StreamView,
|
|
52
|
+
Ce as VideoSetting,
|
|
53
|
+
ue as VideoSettingPanel,
|
|
54
|
+
Te as useBarrageState,
|
|
55
|
+
Ee as useBattleState,
|
|
56
|
+
le as useCoGuestState,
|
|
57
|
+
Pe as useCoHostState,
|
|
58
|
+
Ve as useDeviceState,
|
|
59
|
+
Be as useLiveAudienceState,
|
|
60
|
+
Ie as useLiveListState,
|
|
61
|
+
ge as useLiveMonitorState,
|
|
62
|
+
$e as useLiveSeatState,
|
|
63
|
+
Ae as useRoomEngine,
|
|
64
|
+
Me as useRoomState,
|
|
65
|
+
de as useUserState,
|
|
66
|
+
xe as useVideoMixerState
|
|
67
67
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { TUIUserInfo } from '@tencentcloud/tuiroom-engine-js';
|
|
2
|
+
|
|
3
|
+
export declare enum BarrageType {
|
|
4
|
+
text = 0,
|
|
5
|
+
custom = 1
|
|
6
|
+
}
|
|
7
|
+
interface BaseMessageInfo {
|
|
8
|
+
liveId: string;
|
|
9
|
+
sender: TUIUserInfo;
|
|
10
|
+
sequence: number;
|
|
11
|
+
timestampInSecond: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Barrage extends BaseMessageInfo {
|
|
14
|
+
messageType: BarrageType;
|
|
15
|
+
textContent?: string;
|
|
16
|
+
extensionInfo?: Record<string, string> | null;
|
|
17
|
+
businessId?: string;
|
|
18
|
+
data?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function useBarrageState(): {
|
|
21
|
+
messageList: import('vue').Ref<{
|
|
22
|
+
messageType: BarrageType;
|
|
23
|
+
textContent?: string | undefined;
|
|
24
|
+
extensionInfo?: (Record<string, string> | null) | undefined;
|
|
25
|
+
businessId?: string | undefined;
|
|
26
|
+
data?: string | undefined;
|
|
27
|
+
liveId: string;
|
|
28
|
+
sender: {
|
|
29
|
+
userId: string;
|
|
30
|
+
userName: string;
|
|
31
|
+
nameCard: string;
|
|
32
|
+
avatarUrl: string;
|
|
33
|
+
userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
|
|
34
|
+
hasAudioStream: boolean;
|
|
35
|
+
hasVideoStream: boolean;
|
|
36
|
+
hasScreenStream: boolean;
|
|
37
|
+
isMessageDisabled: boolean;
|
|
38
|
+
roomCustomInfo: Record<string, any>;
|
|
39
|
+
};
|
|
40
|
+
sequence: number;
|
|
41
|
+
timestampInSecond: number;
|
|
42
|
+
}[], Barrage[] | {
|
|
43
|
+
messageType: BarrageType;
|
|
44
|
+
textContent?: string | undefined;
|
|
45
|
+
extensionInfo?: (Record<string, string> | null) | undefined;
|
|
46
|
+
businessId?: string | undefined;
|
|
47
|
+
data?: string | undefined;
|
|
48
|
+
liveId: string;
|
|
49
|
+
sender: {
|
|
50
|
+
userId: string;
|
|
51
|
+
userName: string;
|
|
52
|
+
nameCard: string;
|
|
53
|
+
avatarUrl: string;
|
|
54
|
+
userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
|
|
55
|
+
hasAudioStream: boolean;
|
|
56
|
+
hasVideoStream: boolean;
|
|
57
|
+
hasScreenStream: boolean;
|
|
58
|
+
isMessageDisabled: boolean;
|
|
59
|
+
roomCustomInfo: Record<string, any>;
|
|
60
|
+
};
|
|
61
|
+
sequence: number;
|
|
62
|
+
timestampInSecond: number;
|
|
63
|
+
}[]>;
|
|
64
|
+
sendTextMessage: (options: {
|
|
65
|
+
text: string;
|
|
66
|
+
extensionInfo?: Record<string, string>;
|
|
67
|
+
}) => Promise<void> | undefined;
|
|
68
|
+
sendCustomMessage: (options: {
|
|
69
|
+
businessId: string;
|
|
70
|
+
data: string;
|
|
71
|
+
}) => Promise<void> | undefined;
|
|
72
|
+
appendLocalTip: (message: Barrage) => void;
|
|
73
|
+
};
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ref as i, watch as d } from "vue";
|
|
2
|
+
import m, { TUIRoomEvents as c } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
+
import { useRoomEngine as v } from "../../hooks/useRoomEngine.js";
|
|
4
|
+
import { dataReport as I } from "../../report/dataReport.js";
|
|
5
|
+
import { MetricsKey as l } from "../../report/MetricsKey.js";
|
|
6
|
+
import { useLoginState as f } from "../LoginState.js";
|
|
7
|
+
import { useLiveListState as x } from "../LiveListState/LiveListState.js";
|
|
8
|
+
const { loginUserInfo: s } = f();
|
|
9
|
+
var p = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.custom = 1] = "custom", e))(p || {});
|
|
10
|
+
const u = v(), { currentLive: T } = x(), a = i([]), E = (e) => {
|
|
11
|
+
var n;
|
|
12
|
+
const t = l.T_METRICS_STATE_API_BARRAGE_SEND_TEXT_MSG_COUNT;
|
|
13
|
+
return I.reportCount(t), (n = u.instance) == null ? void 0 : n.sendTextMessage({
|
|
14
|
+
textContent: e.text,
|
|
15
|
+
extensionInfo: (e == null ? void 0 : e.extensionInfo) || {}
|
|
16
|
+
});
|
|
17
|
+
}, M = (e) => {
|
|
18
|
+
var t;
|
|
19
|
+
return (t = u.instance) == null ? void 0 : t.sendCustomMessage({
|
|
20
|
+
businessId: e.businessId,
|
|
21
|
+
data: e.data
|
|
22
|
+
});
|
|
23
|
+
}, R = (e) => {
|
|
24
|
+
a.value.push(e);
|
|
25
|
+
}, S = (e) => {
|
|
26
|
+
var n, o, r;
|
|
27
|
+
const t = { ...e.sender };
|
|
28
|
+
t.userId === ((n = s.value) == null ? void 0 : n.userId) && (t.userName = t.userName || ((o = s.value) == null ? void 0 : o.userName), t.avatarUrl = t.avatarUrl || ((r = s.value) == null ? void 0 : r.avatarUrl)), a.value.push({
|
|
29
|
+
liveId: e.roomId,
|
|
30
|
+
sender: t,
|
|
31
|
+
sequence: e.sequence,
|
|
32
|
+
timestampInSecond: e.timestampInSecond,
|
|
33
|
+
messageType: 0,
|
|
34
|
+
textContent: e.textContent,
|
|
35
|
+
extensionInfo: e.extensionInfo
|
|
36
|
+
});
|
|
37
|
+
}, C = (e) => {
|
|
38
|
+
var n, o, r;
|
|
39
|
+
const t = { ...e.sender };
|
|
40
|
+
t.userId === ((n = s.value) == null ? void 0 : n.userId) && (t.userName = t.userName || ((o = s.value) == null ? void 0 : o.userName), t.avatarUrl = t.avatarUrl || ((r = s.value) == null ? void 0 : r.avatarUrl)), a.value.push({
|
|
41
|
+
liveId: e.roomId,
|
|
42
|
+
sender: t,
|
|
43
|
+
sequence: e.sequence,
|
|
44
|
+
timestampInSecond: e.timestampInSecond,
|
|
45
|
+
messageType: 1,
|
|
46
|
+
businessId: e.businessId,
|
|
47
|
+
data: e.data
|
|
48
|
+
});
|
|
49
|
+
}, U = [
|
|
50
|
+
{ event: c.onReceiveTextMessage, handler: S },
|
|
51
|
+
{ event: c.onReceiveCustomMessage, handler: C }
|
|
52
|
+
], N = () => {
|
|
53
|
+
U.forEach(({ event: e, handler: t }) => {
|
|
54
|
+
var n;
|
|
55
|
+
(n = u.instance) == null || n.on(e, t);
|
|
56
|
+
});
|
|
57
|
+
}, _ = () => {
|
|
58
|
+
a.value = [];
|
|
59
|
+
};
|
|
60
|
+
d(() => {
|
|
61
|
+
var e;
|
|
62
|
+
return (e = T.value) == null ? void 0 : e.liveId;
|
|
63
|
+
}, (e) => {
|
|
64
|
+
e || _();
|
|
65
|
+
});
|
|
66
|
+
m.once("ready", () => {
|
|
67
|
+
N();
|
|
68
|
+
});
|
|
69
|
+
function G() {
|
|
70
|
+
return {
|
|
71
|
+
messageList: a,
|
|
72
|
+
sendTextMessage: E,
|
|
73
|
+
sendCustomMessage: M,
|
|
74
|
+
appendLocalTip: R
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
p as BarrageType,
|
|
79
|
+
G as useBarrageState
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BarrageState';
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TUIBattleConfig, TUILiveBattleManagerEvents } from '@tencentcloud/tuiroom-engine-js';
|
|
1
|
+
import { BattleEvent, DeviceStatus, BattleConfig, BattleInfo, SeatUserInfo } from '../../types';
|
|
3
2
|
|
|
4
3
|
export declare function useBattleState(): {
|
|
5
4
|
currentBattleInfo: import('vue').Ref<BattleInfo | undefined, BattleInfo | undefined>;
|
|
6
5
|
battleUsers: import('vue').Ref<{
|
|
7
|
-
liveId: string;
|
|
8
6
|
userId: string;
|
|
9
7
|
userName: string;
|
|
10
8
|
avatarUrl: string;
|
|
9
|
+
liveId: string;
|
|
11
10
|
microphoneStatus: DeviceStatus;
|
|
12
|
-
|
|
11
|
+
allowOpenMicrophone: boolean;
|
|
13
12
|
cameraStatus: DeviceStatus;
|
|
14
|
-
|
|
13
|
+
allowOpenCamera: boolean;
|
|
15
14
|
}[], SeatUserInfo[] | {
|
|
16
|
-
liveId: string;
|
|
17
15
|
userId: string;
|
|
18
16
|
userName: string;
|
|
19
17
|
avatarUrl: string;
|
|
18
|
+
liveId: string;
|
|
20
19
|
microphoneStatus: DeviceStatus;
|
|
21
|
-
|
|
20
|
+
allowOpenMicrophone: boolean;
|
|
22
21
|
cameraStatus: DeviceStatus;
|
|
23
|
-
|
|
22
|
+
allowOpenCamera: boolean;
|
|
24
23
|
}[]>;
|
|
25
24
|
battleScore: import('vue').Ref<Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>, Map<string, number> | (Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>)>;
|
|
26
|
-
subscribeEvent: (event:
|
|
27
|
-
unsubscribeEvent: (event:
|
|
25
|
+
subscribeEvent: (event: BattleEvent, callback: (eventInfo: any) => void) => void;
|
|
26
|
+
unsubscribeEvent: (event: BattleEvent, callback: (eventInfo: any) => void) => void;
|
|
28
27
|
requestBattle: (options: {
|
|
29
|
-
config:
|
|
28
|
+
config: BattleConfig;
|
|
30
29
|
userIdList: string[];
|
|
31
30
|
timeout: number;
|
|
32
31
|
}) => Promise<any> | undefined;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { ref as f, watch as L } from "vue";
|
|
2
|
+
import O, { TUILiveBattleManagerEvents as r, TUIBattleStoppedReason as q } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
+
import { useRoomEngine as T } from "../../hooks/useRoomEngine.js";
|
|
4
|
+
import { useLiveListState as w } from "../LiveListState/LiveListState.js";
|
|
5
|
+
import { BattleEndedReason as S, BattleEvent as o } from "../../types/battle.js";
|
|
6
|
+
import { DeviceStatus as h } from "../../types/device.js";
|
|
7
|
+
const B = T(), { currentLive: M } = w(), a = (e) => ({
|
|
8
|
+
liveId: e.roomId,
|
|
9
|
+
userId: e.userId,
|
|
10
|
+
userName: e.userName,
|
|
11
|
+
avatarUrl: e.avatarUrl,
|
|
12
|
+
microphoneStatus: h.Off,
|
|
13
|
+
allowOpenMicrophone: !0,
|
|
14
|
+
cameraStatus: h.Off,
|
|
15
|
+
allowOpenCamera: !0
|
|
16
|
+
}), d = /* @__PURE__ */ new Map(), C = (e, t) => {
|
|
17
|
+
var n;
|
|
18
|
+
d.has(e) || d.set(e, []), (n = d.get(e)) == null || n.push(t);
|
|
19
|
+
}, j = (e, t) => {
|
|
20
|
+
const n = d.get(e);
|
|
21
|
+
n && (n.splice(n.indexOf(t), 1), n.length === 0 && d.delete(e));
|
|
22
|
+
}, l = (e, t) => {
|
|
23
|
+
const n = d.get(e);
|
|
24
|
+
n && n.forEach((s) => {
|
|
25
|
+
try {
|
|
26
|
+
s(t);
|
|
27
|
+
} catch (u) {
|
|
28
|
+
console.error(`Error in event callback for ${e}:`, u);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}, E = f(), i = f([]), c = f(/* @__PURE__ */ new Map()), y = (e) => {
|
|
32
|
+
var n;
|
|
33
|
+
const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
|
|
34
|
+
return t == null ? void 0 : t.requestBattle(e);
|
|
35
|
+
}, N = (e) => {
|
|
36
|
+
var n;
|
|
37
|
+
const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
|
|
38
|
+
return t == null ? void 0 : t.cancelBattleRequest(e);
|
|
39
|
+
}, k = (e) => {
|
|
40
|
+
var n;
|
|
41
|
+
const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
|
|
42
|
+
return t == null ? void 0 : t.acceptBattle(e);
|
|
43
|
+
}, A = (e) => {
|
|
44
|
+
var n;
|
|
45
|
+
const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
|
|
46
|
+
return t == null ? void 0 : t.rejectBattle(e);
|
|
47
|
+
}, J = (e) => {
|
|
48
|
+
var s;
|
|
49
|
+
const t = (s = B.instance) == null ? void 0 : s.getLiveBattleManager();
|
|
50
|
+
return t == null ? void 0 : t.exitBattle(e);
|
|
51
|
+
}, x = () => {
|
|
52
|
+
E.value = void 0, i.value = [], c.value = /* @__PURE__ */ new Map();
|
|
53
|
+
}, D = (e) => {
|
|
54
|
+
const { battleInfo: t } = e, { battleId: n, duration: s, needResponse: u, extensionInfo: m, startTime: p, endTime: b } = t;
|
|
55
|
+
x();
|
|
56
|
+
const v = {
|
|
57
|
+
[q.kStoppedByOtherExit]: S.allMemberExit,
|
|
58
|
+
[q.kStoppedByTimeOver]: S.timeOver
|
|
59
|
+
};
|
|
60
|
+
l(o.onBattleEnded, {
|
|
61
|
+
battleInfo: {
|
|
62
|
+
battleId: n,
|
|
63
|
+
config: {
|
|
64
|
+
duration: s,
|
|
65
|
+
needResponse: u,
|
|
66
|
+
extensionInfo: m
|
|
67
|
+
},
|
|
68
|
+
startTime: p,
|
|
69
|
+
endTime: b
|
|
70
|
+
},
|
|
71
|
+
reason: v[e.reason]
|
|
72
|
+
});
|
|
73
|
+
}, $ = (e) => {
|
|
74
|
+
c.value = new Map(e.battleUserList.map((t) => [t.userId, t.score]));
|
|
75
|
+
}, z = (e) => {
|
|
76
|
+
const { battleInfo: t } = e, { battleId: n, duration: s, needResponse: u, extensionInfo: m, startTime: p, endTime: b } = t;
|
|
77
|
+
E.value = {
|
|
78
|
+
battleId: n,
|
|
79
|
+
config: {
|
|
80
|
+
duration: s,
|
|
81
|
+
needResponse: u,
|
|
82
|
+
extensionInfo: m
|
|
83
|
+
},
|
|
84
|
+
startTime: p,
|
|
85
|
+
endTime: b
|
|
86
|
+
};
|
|
87
|
+
const { fromUser: v, toUserList: g } = e.battleInfo, I = a(v), U = g.map((R) => a(R));
|
|
88
|
+
c.value.set(v.userId, v.score), g.forEach((R) => {
|
|
89
|
+
c.value.set(R.userId, R.score);
|
|
90
|
+
}), i.value = [I, ...U], l(o.onBattleStarted, {
|
|
91
|
+
battleInfo: {
|
|
92
|
+
battleId: n,
|
|
93
|
+
config: {
|
|
94
|
+
duration: s,
|
|
95
|
+
needResponse: u,
|
|
96
|
+
extensionInfo: m
|
|
97
|
+
},
|
|
98
|
+
startTime: p,
|
|
99
|
+
endTime: b
|
|
100
|
+
},
|
|
101
|
+
inviter: I,
|
|
102
|
+
invitees: U
|
|
103
|
+
});
|
|
104
|
+
}, F = (e) => {
|
|
105
|
+
var t;
|
|
106
|
+
i.value.length <= 2 || (i.value = (t = i.value) == null ? void 0 : t.filter((n) => n.userId !== e.user.userId), c.value.delete(e.user.userId), l(o.onUserExitBattle, {
|
|
107
|
+
battleId: e.battleId,
|
|
108
|
+
battleUser: a(e.user)
|
|
109
|
+
}));
|
|
110
|
+
}, G = (e) => {
|
|
111
|
+
var t;
|
|
112
|
+
(t = i.value) == null || t.push({
|
|
113
|
+
liveId: e.user.roomId,
|
|
114
|
+
userId: e.user.userId,
|
|
115
|
+
userName: e.user.userName,
|
|
116
|
+
avatarUrl: e.user.avatarUrl,
|
|
117
|
+
microphoneStatus: h.Off,
|
|
118
|
+
allowOpenMicrophone: !0,
|
|
119
|
+
cameraStatus: h.Off,
|
|
120
|
+
allowOpenCamera: !0
|
|
121
|
+
}), c.value.set(e.user.userId, e.user.score), l(o.onUserJoinBattle, {
|
|
122
|
+
battleId: e.battleId,
|
|
123
|
+
battleUser: a(e.user)
|
|
124
|
+
});
|
|
125
|
+
}, H = (e) => {
|
|
126
|
+
const { battleId: t } = e.battleInfo;
|
|
127
|
+
l(o.onBattleRequestReceived, {
|
|
128
|
+
battleId: t,
|
|
129
|
+
inviter: a(e.inviter),
|
|
130
|
+
invitee: a(e.invitee)
|
|
131
|
+
});
|
|
132
|
+
}, K = (e) => {
|
|
133
|
+
const { battleId: t } = e.battleInfo;
|
|
134
|
+
l(o.onBattleRequestCancelled, {
|
|
135
|
+
battleId: t,
|
|
136
|
+
inviter: a(e.inviter),
|
|
137
|
+
invitee: a(e.invitee)
|
|
138
|
+
});
|
|
139
|
+
}, P = (e) => {
|
|
140
|
+
const { battleId: t } = e.battleInfo;
|
|
141
|
+
l(o.onBattleRequestTimeout, {
|
|
142
|
+
battleId: t,
|
|
143
|
+
inviter: a(e.inviter),
|
|
144
|
+
invitee: a(e.invitee)
|
|
145
|
+
});
|
|
146
|
+
}, Q = (e) => {
|
|
147
|
+
const { battleId: t } = e.battleInfo;
|
|
148
|
+
l(o.onBattleRequestAccept, {
|
|
149
|
+
battleId: t,
|
|
150
|
+
inviter: a(e.inviter),
|
|
151
|
+
invitee: a(e.invitee)
|
|
152
|
+
});
|
|
153
|
+
}, V = (e) => {
|
|
154
|
+
const { battleId: t } = e.battleInfo;
|
|
155
|
+
l(o.onBattleRequestReject, {
|
|
156
|
+
battleId: t,
|
|
157
|
+
inviter: a(e.inviter),
|
|
158
|
+
invitee: a(e.invitee)
|
|
159
|
+
});
|
|
160
|
+
}, W = [
|
|
161
|
+
{ event: r.onBattleEnded, handler: D },
|
|
162
|
+
{ event: r.onBattleScoreChanged, handler: $ },
|
|
163
|
+
{ event: r.onBattleStarted, handler: z },
|
|
164
|
+
{ event: r.onUserExitBattle, handler: F },
|
|
165
|
+
{ event: r.onUserJoinBattle, handler: G },
|
|
166
|
+
{ event: r.onBattleRequestReceived, handler: H },
|
|
167
|
+
{ event: r.onBattleRequestCancelled, handler: K },
|
|
168
|
+
{ event: r.onBattleRequestTimeout, handler: P },
|
|
169
|
+
{ event: r.onBattleRequestAccept, handler: Q },
|
|
170
|
+
{ event: r.onBattleRequestReject, handler: V }
|
|
171
|
+
], X = () => {
|
|
172
|
+
W.forEach(({ event: e, handler: t }) => {
|
|
173
|
+
var s;
|
|
174
|
+
const n = (s = B.instance) == null ? void 0 : s.getLiveBattleManager();
|
|
175
|
+
n == null || n.on(e, t);
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
L(() => {
|
|
179
|
+
var e;
|
|
180
|
+
return (e = M.value) == null ? void 0 : e.liveId;
|
|
181
|
+
}, (e) => {
|
|
182
|
+
e || x();
|
|
183
|
+
});
|
|
184
|
+
O.once("ready", () => {
|
|
185
|
+
X();
|
|
186
|
+
});
|
|
187
|
+
function ae() {
|
|
188
|
+
return {
|
|
189
|
+
currentBattleInfo: E,
|
|
190
|
+
battleUsers: i,
|
|
191
|
+
battleScore: c,
|
|
192
|
+
subscribeEvent: C,
|
|
193
|
+
unsubscribeEvent: j,
|
|
194
|
+
requestBattle: y,
|
|
195
|
+
cancelBattleRequest: N,
|
|
196
|
+
acceptBattle: k,
|
|
197
|
+
rejectBattle: A,
|
|
198
|
+
exitBattle: J
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
export {
|
|
202
|
+
ae as useBattleState
|
|
203
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useBattleState } from './BattleState';
|
|
@@ -1,106 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CoGuestStatus, AudienceInfo, CoGuestRequestInfo, SeatUserInfo } from '../types';
|
|
1
|
+
import { HostEvent, GuestEvent, SeatUserInfo, LiveUserInfo } from '../types';
|
|
3
2
|
|
|
4
3
|
export declare function useCoGuestState(): {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
requestId: string;
|
|
13
|
-
userId: string;
|
|
14
|
-
userName: string;
|
|
15
|
-
nameCard: string;
|
|
16
|
-
avatarUrl: string;
|
|
17
|
-
} | null, CoGuestRequestInfo | {
|
|
18
|
-
timestamp: number;
|
|
19
|
-
requestId: string;
|
|
20
|
-
userId: string;
|
|
21
|
-
userName: string;
|
|
22
|
-
nameCard: string;
|
|
23
|
-
avatarUrl: string;
|
|
24
|
-
} | null>;
|
|
25
|
-
latestCancelledCoGuestRequest: import('vue').Ref<{
|
|
26
|
-
timestamp: number;
|
|
27
|
-
requestId: string;
|
|
28
|
-
userId: string;
|
|
29
|
-
userName: string;
|
|
30
|
-
nameCard: string;
|
|
31
|
-
avatarUrl: string;
|
|
32
|
-
} | null, CoGuestRequestInfo | {
|
|
33
|
-
timestamp: number;
|
|
34
|
-
requestId: string;
|
|
35
|
-
userId: string;
|
|
36
|
-
userName: string;
|
|
37
|
-
nameCard: string;
|
|
38
|
-
avatarUrl: string;
|
|
39
|
-
} | null>;
|
|
40
|
-
latestAcceptedCoGuestRequest: import('vue').Ref<{
|
|
41
|
-
timestamp: number;
|
|
42
|
-
requestId: string;
|
|
43
|
-
userId: string;
|
|
44
|
-
userName: string;
|
|
45
|
-
nameCard: string;
|
|
46
|
-
avatarUrl: string;
|
|
47
|
-
} | null, CoGuestRequestInfo | {
|
|
48
|
-
timestamp: number;
|
|
49
|
-
requestId: string;
|
|
50
|
-
userId: string;
|
|
51
|
-
userName: string;
|
|
52
|
-
nameCard: string;
|
|
53
|
-
avatarUrl: string;
|
|
54
|
-
} | null>;
|
|
55
|
-
latestRejectedCoGuestRequest: import('vue').Ref<{
|
|
56
|
-
timestamp: number;
|
|
57
|
-
requestId: string;
|
|
58
|
-
userId: string;
|
|
59
|
-
userName: string;
|
|
60
|
-
nameCard: string;
|
|
61
|
-
avatarUrl: string;
|
|
62
|
-
} | null, CoGuestRequestInfo | {
|
|
63
|
-
timestamp: number;
|
|
64
|
-
requestId: string;
|
|
65
|
-
userId: string;
|
|
66
|
-
userName: string;
|
|
67
|
-
nameCard: string;
|
|
68
|
-
avatarUrl: string;
|
|
69
|
-
} | null>;
|
|
70
|
-
sendCoGuestRequest: (options?: {
|
|
71
|
-
seatIndex?: number;
|
|
72
|
-
timeout?: number;
|
|
73
|
-
userId?: string;
|
|
74
|
-
requestCallback?: (callbackInfo: TUIRequestCallback) => void;
|
|
75
|
-
}) => Promise<void>;
|
|
76
|
-
cancelCoGuestRequest: (options: {
|
|
77
|
-
userId?: string;
|
|
4
|
+
connected: import('vue').ComputedRef<SeatUserInfo[]>;
|
|
5
|
+
invitees: import('vue').ComputedRef<LiveUserInfo[]>;
|
|
6
|
+
applicants: import('vue').ComputedRef<LiveUserInfo[]>;
|
|
7
|
+
candidates: import('vue').Ref<never[], never[]>;
|
|
8
|
+
applyForSeat: (options: {
|
|
9
|
+
seatIndex: number;
|
|
10
|
+
timeout: number;
|
|
78
11
|
}) => Promise<void>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
rejectCoGuestRequest: (options: {
|
|
83
|
-
userId?: string;
|
|
12
|
+
cancelApplication: () => Promise<void>;
|
|
13
|
+
acceptApplication: (options: {
|
|
14
|
+
userId: string;
|
|
84
15
|
}) => Promise<void>;
|
|
85
|
-
|
|
86
|
-
sendOpenDeviceRequest: (options: {
|
|
87
|
-
type: TUIMediaDevice;
|
|
88
|
-
timeout?: number;
|
|
16
|
+
rejectApplication: (options: {
|
|
89
17
|
userId: string;
|
|
90
|
-
requestCallback?: (callbackInfo: TUIRequestCallback) => void;
|
|
91
18
|
}) => Promise<void>;
|
|
92
|
-
|
|
93
|
-
type: TUIMediaDevice;
|
|
19
|
+
inviteToSeat: (options: {
|
|
94
20
|
userId: string;
|
|
21
|
+
seatIndex: number;
|
|
22
|
+
timeout: number;
|
|
95
23
|
}) => Promise<void>;
|
|
96
|
-
|
|
97
|
-
|
|
24
|
+
cancelInvitation: (options: {
|
|
25
|
+
inviteeId: string;
|
|
98
26
|
}) => Promise<void>;
|
|
99
|
-
|
|
100
|
-
|
|
27
|
+
acceptInvitation: (options: {
|
|
28
|
+
inviterId: string;
|
|
101
29
|
}) => Promise<void>;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
userId: string;
|
|
30
|
+
rejectInvitation: (options: {
|
|
31
|
+
inviterId: string;
|
|
105
32
|
}) => Promise<void>;
|
|
33
|
+
disConnect: () => Promise<void | undefined>;
|
|
34
|
+
subscribeEvent: (event: HostEvent | GuestEvent, callback: (eventInfo: any) => void) => void;
|
|
35
|
+
unsubscribeEvent: (event: HostEvent | GuestEvent, callback: (eventInfo: any) => void) => void;
|
|
106
36
|
};
|