tuikit-atomicx-vue3 3.4.2 → 3.5.0-beta.8
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/{MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js → MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js} +38 -36
- package/dist/{PopoverTrigger-L8abAry7.js → PopoverTrigger-CglNN8IV.js} +3 -3
- package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-CQa08BXt.js} +1 -1
- package/dist/{Teleport-CSEuZbpM.js → Teleport-D3gvcBbZ.js} +278 -268
- package/dist/baseComp/Modal/Modal.js +431 -23
- package/dist/chat/index.d.ts +68 -53
- package/dist/chat/server.js +15 -15
- 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 +4 -4
- 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 +5 -4
- 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/ChatSetting/GroupChatSetting/GroupChatSetting.js +2 -1
- 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/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
- package/dist/components/ContactList/ContactList.js +7 -7
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +49 -51
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
- package/dist/components/ConversationList/ConversationList.js +4 -4
- package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +31 -29
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
- package/dist/components/ConversationList/index.d.ts +30 -30
- 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 +28 -27
- 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 +97 -93
- package/dist/components/LiveView/PlayerControl/AudioControl.vue.d.ts +10 -6
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +57 -62
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +79 -79
- package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +2 -2
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +164 -209
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +8 -1
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +57 -24
- 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/AttachmentPicker/index.js +1 -1
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +63 -65
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +5 -2
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +3 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +51 -63
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +6 -2
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.d.ts +19 -0
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +74 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.d.ts +2 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +62 -0
- package/dist/components/MessageInput/TextEditor/index.js +45 -35
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +67 -69
- package/dist/components/MessageInput/i18n/index.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.js +5 -1
- package/dist/components/MessageInput/index.d.ts +36 -6
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -13
- package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +63 -69
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +48 -53
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +8 -8
- package/dist/components/MessageList/MessageList.js +8 -6
- package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
- package/dist/components/MessageList/i18n/en-US.d.ts +65 -1
- package/dist/components/MessageList/i18n/en-US.js +66 -2
- package/dist/components/MessageList/i18n/index.d.ts +128 -0
- package/dist/components/MessageList/i18n/index.js +6 -6
- package/dist/components/MessageList/i18n/zh-CN.d.ts +65 -1
- package/dist/components/MessageList/i18n/zh-CN.js +64 -0
- package/dist/components/MessageList/index.d.ts +20 -20
- package/dist/components/MicButton/index.js +11 -11
- package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +172 -174
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +58 -60
- package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +28 -30
- package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +22 -24
- package/dist/components/Search/SearchAdvanced/Slider/Slider.js +26 -28
- package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +133 -135
- package/dist/components/Search/SearchBar/SearchBar.js +56 -58
- 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/UIKitModal/UIKitModal.d.ts +7 -0
- package/dist/components/UIKitModal/UIKitModal.js +156 -0
- package/dist/components/UIKitModal/index.d.ts +1 -0
- package/dist/components/UIKitModal/index.js +4 -0
- package/dist/components/{BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -9
- package/dist/components/UIKitModal/type.d.ts +21 -0
- package/dist/components/UIKitModal/type.js +1 -0
- package/dist/components/UserPicker/UserPicker.js +1 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +19 -18
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +2 -2
- package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -31
- package/dist/components/UserPicker/i18n/en-US.d.ts +1 -0
- package/dist/components/UserPicker/i18n/en-US.js +2 -1
- package/dist/components/UserPicker/i18n/index.d.ts +2 -0
- package/dist/components/UserPicker/i18n/zh-CN.d.ts +1 -0
- package/dist/components/UserPicker/i18n/zh-CN.js +2 -1
- package/dist/components/UserPicker/index.d.ts +2 -2
- package/dist/components/UserPicker/type.d.ts +1 -1
- 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/useAudioControl.d.ts +3 -3
- package/dist/hooks/useAudioControl.js +32 -30
- package/dist/hooks/useRoomEngine.js +6 -6
- package/dist/index-B_-9wgM4.js +64 -0
- package/dist/{index-Bm-QfV5o.js → index-DMfTuy0v.js} +574 -631
- package/dist/{index-D2OVtqc8.js → index-DV6o6s43.js} +946 -915
- package/dist/index.d.ts +3 -1
- package/dist/index.js +164 -142
- 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/rtc/server.js +45 -40
- 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/LiveMonitorState/player/adapters/trtc.js +6 -6
- 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.d.ts +23 -0
- package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
- package/dist/states/MessageInputState/MessageInputState.js +60 -59
- package/dist/states/MessageInputState/utils.d.ts +8 -1
- package/dist/states/MessageInputState/utils.js +30 -10
- package/dist/states/SeatStore.js +82 -83
- package/dist/states/UIKitModalState/UIKitModalState.d.ts +17 -0
- package/dist/states/UIKitModalState/UIKitModalState.js +63 -0
- package/dist/states/UIKitModalState/index.d.ts +1 -0
- package/dist/states/UIKitModalState/index.js +4 -0
- 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/{useId-CtirfF0W.js → useId-oQ5JZeuH.js} +1 -1
- package/dist/utils/call.d.ts +1 -1
- package/dist/utils/call.js +78 -79
- package/dist/utils/eventCenter.d.ts +88 -0
- package/dist/utils/eventCenter.js +161 -0
- package/dist/{utils-DaB7eSu5.js → utils-DuzSgmS6.js} +1 -1
- package/package.json +4 -3
- package/src/chat/server.ts +0 -1
- 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/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -0
- 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/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
- package/src/components/ContactList/ContactList.vue +1 -1
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
- package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -8
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
- package/src/components/ConversationList/ConversationList.vue +2 -2
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
- package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +4 -4
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -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 +3 -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 +72 -80
- package/src/components/LiveView/PlayerControl/MultiResolution.vue +30 -21
- package/src/components/LiveView/PlayerControl/PlayerControl.vue +26 -42
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +253 -455
- package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +68 -4
- 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 +3 -2
- package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +8 -6
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +3 -1
- package/src/components/MessageInput/TextEditor/EditorCore.ts +17 -28
- package/src/components/MessageInput/TextEditor/TextEditor.vue +24 -4
- package/src/components/MessageInput/TextEditor/extensions/characterCountExtension.ts +159 -0
- package/src/components/MessageInput/TextEditor/extensions/imageExtension.ts +79 -0
- package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +8 -6
- package/src/components/MessageInput/i18n/zh-CN.ts +4 -0
- package/src/components/MessageInput/types.d.ts +1 -0
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +5 -3
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +5 -4
- package/src/components/MessageList/Message/Message.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -8
- package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +46 -43
- package/src/components/MessageList/Message/VideoMessage/index.ts +1 -1
- package/src/components/MessageList/MessageList.vue +2 -0
- package/src/components/MessageList/i18n/en-US.ts +66 -0
- package/src/components/MessageList/i18n/index.ts +4 -4
- package/src/components/MessageList/i18n/zh-CN.ts +66 -0
- package/src/components/MicButton/index.vue +3 -3
- package/src/components/Search/Search.vue +1 -1
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.scss +1 -4
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
- package/src/components/Search/SearchAdvanced/Slider/Slider.scss +1 -4
- package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
- package/src/components/Search/SearchBar/SearchBar.scss +3 -6
- package/src/components/Search/SearchBar/SearchBar.vue +1 -1
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
- package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
- package/src/components/Search/SearchResults/SearchResults.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
- 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/UIKitModal/UIKitModal.ts +71 -0
- package/src/components/UIKitModal/index.scss +134 -0
- package/src/components/UIKitModal/index.ts +1 -0
- package/src/components/UIKitModal/index.vue +160 -0
- package/src/components/UIKitModal/type.ts +24 -0
- package/src/components/UserPicker/UserPicker.vue +1 -1
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +1 -0
- package/src/components/UserPicker/hooks/useSearchFilter.ts +27 -18
- package/src/components/UserPicker/i18n/en-US.ts +1 -0
- package/src/components/UserPicker/i18n/zh-CN.ts +1 -0
- package/src/components/UserPicker/type.ts +1 -1
- 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/useAudioControl.ts +17 -4
- package/src/hooks/useRoomEngine.ts +1 -1
- package/src/index.ts +3 -0
- 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/rtc/server.ts +4 -0
- 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/call.ts +26 -27
- 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/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
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var te = (e, t, a) => t in e ? ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
+
var F = (e, t, a) => te(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { ref as o } from "vue";
|
|
5
|
+
import { DeviceStatus as u, DeviceError as l, MirrorType as D, VideoQuality as m, AudioRoute as B } from "../../types/device.js";
|
|
6
|
+
import ae, { TUIRoomDeviceMangerEvents as P, TUIMediaDeviceType as c, TUIMediaDeviceState as E, TUIVideoQuality as k, TRTCVideoFillMode as ie, TRTCVideoRotation as ne, TRTCVideoMirrorType as O, TUIAudioRoute as H, TUIErrorCode as h } from "@tencentcloud/tuiroom-engine-js";
|
|
7
|
+
import { useDeviceManager as oe, useRoomEngine as se } from "../../hooks/useRoomEngine.js";
|
|
8
|
+
import { useLoginState as re } from "../LoginState.js";
|
|
9
|
+
import { TUIRoomEvents as T, TUIVideoStreamType as q } from "../../types/types.js";
|
|
10
|
+
const s = se(), n = oe(), { loginUserInfo: M } = re(), w = o(u.Off), g = o([]), S = o(null), v = o(l.NoError), x = o(100), Y = o(0), U = o(!1), Z = o(0), I = o(u.Off), V = o([]), A = o(null), j = o(l.NoError), Q = o(!1), f = o(!1), _ = o(!0), z = o(D.Auto), G = o(m.Quality720P), R = o([]), C = o(null), J = o(100), K = o(B.Speakerphone), L = o(!1), N = o(u.Off), W = o(null), ce = async () => {
|
|
11
|
+
var e;
|
|
12
|
+
try {
|
|
13
|
+
await ((e = s.instance) == null ? void 0 : e.openLocalMicrophone()), w.value = u.On, v.value = l.NoError;
|
|
14
|
+
} catch (t) {
|
|
15
|
+
if (t.code === 0 && t.message === "you have already mute the audio")
|
|
16
|
+
return;
|
|
17
|
+
switch (t.code) {
|
|
18
|
+
case h.ERR_MICROPHONE_START_FAILED:
|
|
19
|
+
v.value = l.NotSupportCapture;
|
|
20
|
+
break;
|
|
21
|
+
case h.ERR_MICROPHONE_NOT_AUTHORIZED:
|
|
22
|
+
v.value = l.NoSystemPermission;
|
|
23
|
+
break;
|
|
24
|
+
case h.ERR_MICROPHONE_OCCUPIED:
|
|
25
|
+
v.value = l.OccupiedError;
|
|
26
|
+
break;
|
|
27
|
+
case h.ERR_MICROPHONE_DEVICE_EMPTY:
|
|
28
|
+
v.value = l.NoDeviceDetected;
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
v.value = l.UnknownError;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
throw t;
|
|
35
|
+
}
|
|
36
|
+
}, ue = async () => {
|
|
37
|
+
var e;
|
|
38
|
+
await ((e = s.instance) == null ? void 0 : e.closeLocalMicrophone()), w.value = u.Off;
|
|
39
|
+
}, le = async () => {
|
|
40
|
+
var e;
|
|
41
|
+
await ((e = s.instance) == null ? void 0 : e.muteLocalAudio());
|
|
42
|
+
}, de = async () => {
|
|
43
|
+
var e;
|
|
44
|
+
await ((e = s.instance) == null ? void 0 : e.unmuteLocalAudio());
|
|
45
|
+
}, ve = async () => {
|
|
46
|
+
var e, t;
|
|
47
|
+
try {
|
|
48
|
+
g.value = await ((e = n.instance) == null ? void 0 : e.getDevicesList({
|
|
49
|
+
type: c.kMediaDeviceTypeAudioInput
|
|
50
|
+
})) || [], S.value = await ((t = n.instance) == null ? void 0 : t.getCurrentDevice({
|
|
51
|
+
type: c.kMediaDeviceTypeAudioInput
|
|
52
|
+
})) || null;
|
|
53
|
+
} catch (a) {
|
|
54
|
+
throw console.error("Failed to get microphone list:", a), v.value = l.NoSystemPermission, a;
|
|
55
|
+
}
|
|
56
|
+
}, pe = async (e) => {
|
|
57
|
+
var a;
|
|
58
|
+
await ((a = n.instance) == null ? void 0 : a.setCurrentDevice({
|
|
59
|
+
type: c.kMediaDeviceTypeAudioInput,
|
|
60
|
+
deviceId: e.deviceId
|
|
61
|
+
}));
|
|
62
|
+
const t = g.value.find((i) => i.deviceId === e.deviceId);
|
|
63
|
+
t && (S.value = t);
|
|
64
|
+
}, ye = async (e) => {
|
|
65
|
+
var t, a;
|
|
66
|
+
await ((t = s.instance) == null ? void 0 : t.startMicDeviceTest({ interval: e.interval || 200 })), U.value = !0, (a = n.instance) == null || a.on(P.onTestMicVolume, X);
|
|
67
|
+
}, Te = async (e) => {
|
|
68
|
+
var a;
|
|
69
|
+
const t = (a = s.instance) == null ? void 0 : a.getTRTCCloud();
|
|
70
|
+
await (t == null ? void 0 : t.setAudioCaptureVolume(e)), x.value = e;
|
|
71
|
+
}, me = async (e) => {
|
|
72
|
+
var a;
|
|
73
|
+
const t = (a = s.instance) == null ? void 0 : a.getTRTCCloud();
|
|
74
|
+
await (t == null ? void 0 : t.setAudioPlayoutVolume(e)), J.value = e;
|
|
75
|
+
}, X = (e) => {
|
|
76
|
+
Z.value = e.volume;
|
|
77
|
+
}, fe = async () => {
|
|
78
|
+
var e, t;
|
|
79
|
+
await ((e = s.instance) == null ? void 0 : e.stopMicDeviceTest()), U.value = !1, (t = n.instance) == null || t.off(P.onTestMicVolume, X);
|
|
80
|
+
};
|
|
81
|
+
class Ce {
|
|
82
|
+
constructor() {
|
|
83
|
+
F(this, "speakerTestPlayer", null);
|
|
84
|
+
}
|
|
85
|
+
async startSpeakerDeviceTest(t) {
|
|
86
|
+
var i, r, d;
|
|
87
|
+
if (/electron/i.test(window.navigator.userAgent)) {
|
|
88
|
+
(i = n.instance) == null || i.startSpeakerDeviceTest(t);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this.speakerTestPlayer = document == null ? void 0 : document.createElement("audio"), this.speakerTestPlayer && typeof this.speakerTestPlayer.loop < "u" && (this.speakerTestPlayer.loop = !0), await ((d = this.speakerTestPlayer) == null ? void 0 : d.setSinkId(((r = C.value) == null ? void 0 : r.deviceId) || "")), this.speakerTestPlayer.src = t.filePath, this.speakerTestPlayer.play(), L.value = !0;
|
|
92
|
+
}
|
|
93
|
+
async stopSpeakerDeviceTest() {
|
|
94
|
+
var a;
|
|
95
|
+
if (/electron/i.test(window.navigator.userAgent)) {
|
|
96
|
+
(a = n.instance) == null || a.stopSpeakerDeviceTest();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.speakerTestPlayer && (this.speakerTestPlayer.pause(), this.speakerTestPlayer.currentTime = 0), L.value = !1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const $ = new Ce(), ke = async () => {
|
|
103
|
+
var e, t;
|
|
104
|
+
try {
|
|
105
|
+
R.value = await ((e = n.instance) == null ? void 0 : e.getDevicesList({
|
|
106
|
+
type: c.kMediaDeviceTypeAudioOutput
|
|
107
|
+
})) || [], C.value = await ((t = n.instance) == null ? void 0 : t.getCurrentDevice({
|
|
108
|
+
type: c.kMediaDeviceTypeAudioOutput
|
|
109
|
+
})) || null;
|
|
110
|
+
} catch (a) {
|
|
111
|
+
throw console.error("Failed to get speaker list:", a), a;
|
|
112
|
+
}
|
|
113
|
+
}, he = async (e) => {
|
|
114
|
+
var a;
|
|
115
|
+
await ((a = n.instance) == null ? void 0 : a.setCurrentDevice({
|
|
116
|
+
type: c.kMediaDeviceTypeAudioOutput,
|
|
117
|
+
deviceId: e.deviceId
|
|
118
|
+
}));
|
|
119
|
+
const t = R.value.find((i) => i.deviceId === e.deviceId);
|
|
120
|
+
t && (C.value = t);
|
|
121
|
+
}, De = async (e) => {
|
|
122
|
+
var t;
|
|
123
|
+
await ((t = n.instance) == null ? void 0 : t.setAudioRoute({
|
|
124
|
+
route: e === B.Speakerphone ? H.kAudioRouteSpeakerphone : H.kAudioRouteEarpiece
|
|
125
|
+
})), K.value = e;
|
|
126
|
+
}, Me = async (e) => {
|
|
127
|
+
await $.startSpeakerDeviceTest({ filePath: e.filePath });
|
|
128
|
+
}, we = async () => {
|
|
129
|
+
await $.stopSpeakerDeviceTest();
|
|
130
|
+
}, ge = async () => {
|
|
131
|
+
var t, a;
|
|
132
|
+
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? await ((t = s.instance) == null ? void 0 : t.openLocalCamera({
|
|
133
|
+
isFrontCamera: _.value
|
|
134
|
+
})) : await ((a = s.instance) == null ? void 0 : a.openLocalCamera()), I.value = u.On;
|
|
135
|
+
}, Se = async () => {
|
|
136
|
+
var e;
|
|
137
|
+
await ((e = s.instance) == null ? void 0 : e.closeLocalCamera()), I.value = u.Off;
|
|
138
|
+
}, Ie = async () => {
|
|
139
|
+
var e, t;
|
|
140
|
+
try {
|
|
141
|
+
V.value = await ((e = n.instance) == null ? void 0 : e.getDevicesList({
|
|
142
|
+
type: c.kMediaDeviceTypeVideoCamera
|
|
143
|
+
})) || [], A.value = await ((t = n.instance) == null ? void 0 : t.getCurrentDevice({
|
|
144
|
+
type: c.kMediaDeviceTypeVideoCamera
|
|
145
|
+
})) || null;
|
|
146
|
+
} catch (a) {
|
|
147
|
+
throw console.error("Failed to get camera list:", a), j.value = l.NoSystemPermission, a;
|
|
148
|
+
}
|
|
149
|
+
}, Ve = async (e) => {
|
|
150
|
+
var a;
|
|
151
|
+
await ((a = n.instance) == null ? void 0 : a.setCurrentDevice({
|
|
152
|
+
type: c.kMediaDeviceTypeVideoCamera,
|
|
153
|
+
deviceId: e.deviceId
|
|
154
|
+
}));
|
|
155
|
+
const t = V.value.find((i) => i.deviceId === e.deviceId);
|
|
156
|
+
t && (A.value = t);
|
|
157
|
+
}, Ae = async (e) => {
|
|
158
|
+
var t;
|
|
159
|
+
await ((t = n.instance) == null ? void 0 : t.switchCamera(e)), _.value = e.isFrontCamera;
|
|
160
|
+
}, Re = async (e) => {
|
|
161
|
+
var i;
|
|
162
|
+
const t = (i = s.instance) == null ? void 0 : i.getTRTCCloud(), a = {
|
|
163
|
+
[D.Auto]: O.TRTCVideoMirrorType_Auto,
|
|
164
|
+
[D.Enable]: O.TRTCVideoMirrorType_Enable,
|
|
165
|
+
[D.Disable]: O.TRTCVideoMirrorType_Disable
|
|
166
|
+
};
|
|
167
|
+
t == null || t.setLocalRenderParams({
|
|
168
|
+
mirrorType: a[e.mirror],
|
|
169
|
+
rotation: ne.TRTCVideoRotation0,
|
|
170
|
+
fillMode: ie.TRTCVideoFillMode_Fill
|
|
171
|
+
}), z.value = e.mirror;
|
|
172
|
+
}, Ee = async (e) => {
|
|
173
|
+
var i;
|
|
174
|
+
const a = {
|
|
175
|
+
[m.Quality360P]: k.kVideoQuality_360p,
|
|
176
|
+
[m.Quality540P]: k.kVideoQuality_540p,
|
|
177
|
+
[m.Quality720P]: k.kVideoQuality_720p,
|
|
178
|
+
[m.Quality1080P]: k.kVideoQuality_1080p
|
|
179
|
+
}[e.quality];
|
|
180
|
+
await ((i = s.instance) == null ? void 0 : i.updateVideoQuality({ quality: a })), G.value = e.quality;
|
|
181
|
+
}, Oe = async (e) => {
|
|
182
|
+
var t;
|
|
183
|
+
f.value = !0;
|
|
184
|
+
try {
|
|
185
|
+
await ((t = n.instance) == null ? void 0 : t.startCameraDeviceTest(e)), f.value = !1, Q.value = !0;
|
|
186
|
+
} catch (a) {
|
|
187
|
+
throw f.value = !1, a;
|
|
188
|
+
}
|
|
189
|
+
}, Le = async (e) => {
|
|
190
|
+
var t;
|
|
191
|
+
await ((t = s.instance) == null ? void 0 : t.startScreenSharing({ screenAudio: e == null ? void 0 : e.screenAudio, view: e == null ? void 0 : e.view }));
|
|
192
|
+
}, Pe = async () => {
|
|
193
|
+
var e;
|
|
194
|
+
await ((e = s.instance) == null ? void 0 : e.stopScreenSharing());
|
|
195
|
+
}, Ue = async () => {
|
|
196
|
+
var e;
|
|
197
|
+
f.value = !1, await ((e = n.instance) == null ? void 0 : e.stopCameraDeviceTest()), Q.value = !1;
|
|
198
|
+
};
|
|
199
|
+
function Qe() {
|
|
200
|
+
N.value = u.Off;
|
|
201
|
+
}
|
|
202
|
+
async function _e(e) {
|
|
203
|
+
var i, r, d, p, y, b;
|
|
204
|
+
const { type: t, state: a } = e;
|
|
205
|
+
n.instance && (t === c.kMediaDeviceTypeAudioInput && (g.value = await ((i = n.instance) == null ? void 0 : i.getDevicesList({
|
|
206
|
+
type: t
|
|
207
|
+
})) || [], a === E.kMediaDeviceStateActive && (S.value = ((r = n.instance) == null ? void 0 : r.getCurrentDevice({
|
|
208
|
+
type: c.kMediaDeviceTypeAudioInput
|
|
209
|
+
})) || null)), t === c.kMediaDeviceTypeAudioOutput && (R.value = await ((d = n.instance) == null ? void 0 : d.getDevicesList({
|
|
210
|
+
type: t
|
|
211
|
+
})) || [], a === E.kMediaDeviceStateActive && (C.value = ((p = n.instance) == null ? void 0 : p.getCurrentDevice({
|
|
212
|
+
type: c.kMediaDeviceTypeAudioOutput
|
|
213
|
+
})) || null)), t === c.kMediaDeviceTypeVideoCamera && (V.value = await ((y = n.instance) == null ? void 0 : y.getDevicesList({ type: t })) || [], a === E.kMediaDeviceStateActive && (A.value = ((b = n.instance) == null ? void 0 : b.getCurrentDevice({
|
|
214
|
+
type: c.kMediaDeviceTypeVideoCamera
|
|
215
|
+
})) || null)));
|
|
216
|
+
}
|
|
217
|
+
function Ne(e) {
|
|
218
|
+
const { userVolumeList: t } = e, a = t.find((i) => {
|
|
219
|
+
var r;
|
|
220
|
+
return i.userId === ((r = M.value) == null ? void 0 : r.userId);
|
|
221
|
+
});
|
|
222
|
+
Y.value = (a == null ? void 0 : a.volume) || 0;
|
|
223
|
+
}
|
|
224
|
+
function be(e) {
|
|
225
|
+
var i;
|
|
226
|
+
const { userId: t, hasAudio: a } = e;
|
|
227
|
+
t === ((i = M.value) == null ? void 0 : i.userId) && (w.value = a ? u.On : u.Off);
|
|
228
|
+
}
|
|
229
|
+
function Fe(e) {
|
|
230
|
+
var r;
|
|
231
|
+
const { userId: t, streamType: a, hasVideo: i } = e;
|
|
232
|
+
t === ((r = M.value) == null ? void 0 : r.userId) && (a === q.kCameraStream ? I.value = i ? u.On : u.Off : a === q.kScreenStream && (N.value = i ? u.On : u.Off));
|
|
233
|
+
}
|
|
234
|
+
function He(e) {
|
|
235
|
+
const { userNetworkList: t } = e, a = t.find((i) => {
|
|
236
|
+
var r;
|
|
237
|
+
return i.userId === ((r = M.value) == null ? void 0 : r.userId);
|
|
238
|
+
});
|
|
239
|
+
a && (W.value = a);
|
|
240
|
+
}
|
|
241
|
+
ae.once("ready", () => {
|
|
242
|
+
var t, a, i, r, d, p, y;
|
|
243
|
+
(t = n.instance) == null || t.on(P.onDeviceChanged, _e);
|
|
244
|
+
const e = (a = s.instance) == null ? void 0 : a.getTRTCCloud();
|
|
245
|
+
e == null || e.enableAudioVolumeEvaluation(200), (i = s.instance) == null || i.on(T.onUserVoiceVolumeChanged, Ne), (r = s.instance) == null || r.on(T.onUserScreenCaptureStopped, Qe), (d = s.instance) == null || d.on(T.onUserAudioStateChanged, be), (p = s.instance) == null || p.on(T.onUserVideoStateChanged, Fe), (y = s.instance) == null || y.on(T.onUserNetworkQualityChanged, He);
|
|
246
|
+
});
|
|
247
|
+
function Ge() {
|
|
248
|
+
return {
|
|
249
|
+
// 麦克风数据
|
|
250
|
+
microphoneStatus: w,
|
|
251
|
+
microphoneList: g,
|
|
252
|
+
currentMicrophone: S,
|
|
253
|
+
microphoneLastError: v,
|
|
254
|
+
isMicrophoneTesting: U,
|
|
255
|
+
currentMicVolume: Y,
|
|
256
|
+
captureVolume: x,
|
|
257
|
+
testingMicVolume: Z,
|
|
258
|
+
// 摄像头数据
|
|
259
|
+
cameraStatus: I,
|
|
260
|
+
cameraList: V,
|
|
261
|
+
currentCamera: A,
|
|
262
|
+
cameraLastError: j,
|
|
263
|
+
isCameraTesting: Q,
|
|
264
|
+
isCameraTestLoading: f,
|
|
265
|
+
isFrontCamera: _,
|
|
266
|
+
localMirrorType: z,
|
|
267
|
+
localVideoQuality: G,
|
|
268
|
+
// 扬声器数据
|
|
269
|
+
speakerList: R,
|
|
270
|
+
currentSpeaker: C,
|
|
271
|
+
outputVolume: J,
|
|
272
|
+
currentAudioRoute: K,
|
|
273
|
+
isSpeakerTesting: L,
|
|
274
|
+
// 屏幕分享数据
|
|
275
|
+
screenStatus: N,
|
|
276
|
+
// 本地网络数据
|
|
277
|
+
networkInfo: W,
|
|
278
|
+
// 麦克风操作
|
|
279
|
+
openLocalMicrophone: ce,
|
|
280
|
+
closeLocalMicrophone: ue,
|
|
281
|
+
muteLocalAudio: le,
|
|
282
|
+
unmuteLocalAudio: de,
|
|
283
|
+
getMicrophoneList: ve,
|
|
284
|
+
setCurrentMicrophone: pe,
|
|
285
|
+
startMicrophoneTest: ye,
|
|
286
|
+
stopMicrophoneTest: fe,
|
|
287
|
+
setCaptureVolume: Te,
|
|
288
|
+
// 扬声器操作
|
|
289
|
+
getSpeakerList: ke,
|
|
290
|
+
setCurrentSpeaker: he,
|
|
291
|
+
setAudioRoute: De,
|
|
292
|
+
startSpeakerTest: Me,
|
|
293
|
+
stopSpeakerTest: we,
|
|
294
|
+
setOutputVolume: me,
|
|
295
|
+
// 摄像头操作
|
|
296
|
+
openLocalCamera: ge,
|
|
297
|
+
closeLocalCamera: Se,
|
|
298
|
+
getCameraList: Ie,
|
|
299
|
+
setCurrentCamera: Ve,
|
|
300
|
+
switchCamera: Ae,
|
|
301
|
+
switchMirror: Re,
|
|
302
|
+
updateVideoQuality: Ee,
|
|
303
|
+
startCameraDeviceTest: Oe,
|
|
304
|
+
stopCameraDeviceTest: Ue,
|
|
305
|
+
// 屏幕分享
|
|
306
|
+
startScreenShare: Le,
|
|
307
|
+
stopScreenShare: Pe
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
export {
|
|
311
|
+
Ge as default,
|
|
312
|
+
_e as onDeviceChanged,
|
|
313
|
+
Ge as useDeviceState
|
|
314
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDeviceState } from './DeviceState';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AudienceInfo } from '../types';
|
|
1
|
+
import { LiveAudienceEvent, AudienceInfo } from '../types';
|
|
2
2
|
|
|
3
3
|
export declare function useLiveAudienceState(): {
|
|
4
4
|
audienceList: import('vue').ComputedRef<AudienceInfo[]>;
|
|
@@ -17,4 +17,6 @@ export declare function useLiveAudienceState(): {
|
|
|
17
17
|
userId: string;
|
|
18
18
|
isDisable: boolean;
|
|
19
19
|
}) => Promise<void | undefined>;
|
|
20
|
+
subscribeEvent: (event: LiveAudienceEvent, callback: (eventInfo: any) => void) => void;
|
|
21
|
+
unsubscribeEvent: (event: LiveAudienceEvent, callback: (eventInfo: any) => void) => void;
|
|
20
22
|
};
|
|
@@ -1,57 +1,85 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import { useRoomEngine as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ref as m, computed as v, watch as I } from "vue";
|
|
2
|
+
import C, { TUIRole as g } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
+
import { useRoomEngine as b } from "../hooks/useRoomEngine.js";
|
|
4
|
+
import { dataReport as p } from "../report/dataReport.js";
|
|
5
|
+
import { MetricsKey as M } from "../report/MetricsKey.js";
|
|
6
|
+
import { useLiveListState as y } from "./LiveListState/LiveListState.js";
|
|
7
|
+
import { LiveAudienceEvent as U } from "../types/audience.js";
|
|
6
8
|
import { TUIRoomEvents as a } from "../types/types.js";
|
|
7
|
-
const
|
|
9
|
+
const r = /* @__PURE__ */ new Map(), i = b(), { currentLive: d } = y(), R = 200, o = m(/* @__PURE__ */ new Map()), u = m(0), f = () => {
|
|
8
10
|
o.value.clear();
|
|
9
|
-
},
|
|
11
|
+
}, l = v(
|
|
10
12
|
() => Array.from(o.value.values()).filter((e) => {
|
|
11
13
|
var s;
|
|
12
|
-
return e.userId !== ((s =
|
|
14
|
+
return e.userId !== ((s = d.value) == null ? void 0 : s.liveOwner.userId);
|
|
13
15
|
})
|
|
14
|
-
),
|
|
15
|
-
var
|
|
16
|
-
const
|
|
16
|
+
), A = v(() => u.value > R ? u.value : l.value.length), h = async () => {
|
|
17
|
+
var n;
|
|
18
|
+
const e = M.T_METRICS_STATE_API_AUDIENCE_FETCH_LIST_COUNT;
|
|
19
|
+
p.reportCount(e);
|
|
20
|
+
const { userInfoList: s } = await ((n = i.instance) == null ? void 0 : n.getUserList({ nextSequence: 0 })) || {
|
|
17
21
|
userInfoList: []
|
|
18
22
|
};
|
|
19
|
-
return o.value.clear(),
|
|
23
|
+
return o.value.clear(), s.filter((t) => {
|
|
20
24
|
var c;
|
|
21
|
-
return
|
|
22
|
-
}).reverse().forEach((
|
|
23
|
-
o.value.set(
|
|
24
|
-
userId:
|
|
25
|
-
userName:
|
|
26
|
-
avatarUrl:
|
|
27
|
-
customInfo:
|
|
28
|
-
userRole:
|
|
29
|
-
isMessageDisabled:
|
|
25
|
+
return t.userId !== ((c = d.value) == null ? void 0 : c.liveOwner.userId);
|
|
26
|
+
}).reverse().forEach((t) => {
|
|
27
|
+
o.value.set(t.userId, {
|
|
28
|
+
userId: t.userId,
|
|
29
|
+
userName: t.userName,
|
|
30
|
+
avatarUrl: t.avatarUrl,
|
|
31
|
+
customInfo: t.roomCustomInfo,
|
|
32
|
+
userRole: t.userRole,
|
|
33
|
+
isMessageDisabled: t.isMessageDisabled
|
|
30
34
|
});
|
|
31
|
-
}),
|
|
35
|
+
}), l.value;
|
|
32
36
|
}, L = async ({ userId: e }) => {
|
|
33
37
|
var s;
|
|
34
|
-
return (s =
|
|
38
|
+
return (s = i.instance) == null ? void 0 : s.changeUserRole({
|
|
35
39
|
userId: e,
|
|
36
|
-
userRole:
|
|
40
|
+
userRole: g.kAdministrator
|
|
37
41
|
});
|
|
38
|
-
},
|
|
42
|
+
}, N = async ({ userId: e }) => {
|
|
39
43
|
var s;
|
|
40
|
-
return (s =
|
|
44
|
+
return (s = i.instance) == null ? void 0 : s.changeUserRole({
|
|
41
45
|
userId: e,
|
|
42
|
-
userRole:
|
|
46
|
+
userRole: g.kGeneralUser
|
|
43
47
|
});
|
|
44
|
-
},
|
|
48
|
+
}, O = async ({ userId: e }) => {
|
|
45
49
|
var s;
|
|
46
|
-
return (s =
|
|
47
|
-
},
|
|
50
|
+
return (s = i.instance) == null ? void 0 : s.kickRemoteUserOutOfRoom({ userId: e });
|
|
51
|
+
}, D = async ({ userId: e, isDisable: s }) => {
|
|
48
52
|
var n;
|
|
49
|
-
return (n =
|
|
53
|
+
return (n = i.instance) == null ? void 0 : n.disableSendingMessageByAdmin({
|
|
50
54
|
userId: e,
|
|
51
55
|
isDisable: s
|
|
52
56
|
});
|
|
53
|
-
},
|
|
54
|
-
|
|
57
|
+
}, S = (e, s) => {
|
|
58
|
+
var n;
|
|
59
|
+
r.has(e) || r.set(e, []), (n = r.get(e)) == null || n.push(s);
|
|
60
|
+
}, T = (e, s) => {
|
|
61
|
+
const n = r.get(e);
|
|
62
|
+
n && (n.splice(n.indexOf(s), 1), n.length === 0 && r.delete(e));
|
|
63
|
+
}, E = (e, s) => {
|
|
64
|
+
const n = r.get(e);
|
|
65
|
+
n && n.forEach((t) => {
|
|
66
|
+
try {
|
|
67
|
+
t(s);
|
|
68
|
+
} catch (c) {
|
|
69
|
+
console.error(`Error in event callback for ${e}:`, c);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}, k = async ({ userInfo: e }) => {
|
|
73
|
+
E(
|
|
74
|
+
U.onAudienceJoined,
|
|
75
|
+
{
|
|
76
|
+
audience: {
|
|
77
|
+
userId: e.userId,
|
|
78
|
+
userName: e.userName,
|
|
79
|
+
avatarUrl: e.avatarUrl
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
), !(l.value.length >= R) && o.value.set(e.userId, {
|
|
55
83
|
userId: e.userId,
|
|
56
84
|
userName: e.userName,
|
|
57
85
|
avatarUrl: e.avatarUrl,
|
|
@@ -59,9 +87,18 @@ const t = I(), { localLiveStatus: l, currentLive: v } = C(), R = 200, o = u(/* @
|
|
|
59
87
|
userRole: e.userRole,
|
|
60
88
|
isMessageDisabled: e.isMessageDisabled
|
|
61
89
|
});
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
90
|
+
}, _ = async ({ userInfo: e }) => {
|
|
91
|
+
E(
|
|
92
|
+
U.onAudienceLeft,
|
|
93
|
+
{
|
|
94
|
+
audience: {
|
|
95
|
+
userId: e.userId,
|
|
96
|
+
userName: e.userName,
|
|
97
|
+
avatarUrl: e.avatarUrl
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
), o.value.delete(e.userId);
|
|
101
|
+
}, w = async ({ userInfo: e }) => {
|
|
65
102
|
const s = o.value.get(e.userId);
|
|
66
103
|
s && o.value.set(e.userId, {
|
|
67
104
|
...s,
|
|
@@ -72,7 +109,7 @@ const t = I(), { localLiveStatus: l, currentLive: v } = C(), R = 200, o = u(/* @
|
|
|
72
109
|
userRole: e.userRole,
|
|
73
110
|
isMessageDisabled: e.isMessageDisabled
|
|
74
111
|
});
|
|
75
|
-
},
|
|
112
|
+
}, K = ({ userId: e, isDisable: s }) => {
|
|
76
113
|
const n = o.value.get(e);
|
|
77
114
|
if (!n) {
|
|
78
115
|
console.error(`audienceInfo not found for userId: ${e}`);
|
|
@@ -82,42 +119,48 @@ const t = I(), { localLiveStatus: l, currentLive: v } = C(), R = 200, o = u(/* @
|
|
|
82
119
|
...n,
|
|
83
120
|
isMessageDisabled: s
|
|
84
121
|
});
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
{ event: a.onRemoteUserEnterRoom, handler:
|
|
91
|
-
{ event: a.onRemoteUserLeaveRoom, handler:
|
|
92
|
-
{ event: a.onUserInfoChanged, handler:
|
|
93
|
-
{ event: a.onKickedOutOfRoom, handler:
|
|
94
|
-
{ event: a.onSendMessageForUserDisableChanged, handler:
|
|
95
|
-
{ event: a.onRoomUserCountChanged, handler:
|
|
96
|
-
],
|
|
97
|
-
|
|
122
|
+
}, x = async ({ userCount: e }) => {
|
|
123
|
+
u.value = e;
|
|
124
|
+
}, F = async () => {
|
|
125
|
+
f();
|
|
126
|
+
}, $ = [
|
|
127
|
+
{ event: a.onRemoteUserEnterRoom, handler: k },
|
|
128
|
+
{ event: a.onRemoteUserLeaveRoom, handler: _ },
|
|
129
|
+
{ event: a.onUserInfoChanged, handler: w },
|
|
130
|
+
{ event: a.onKickedOutOfRoom, handler: F },
|
|
131
|
+
{ event: a.onSendMessageForUserDisableChanged, handler: K },
|
|
132
|
+
{ event: a.onRoomUserCountChanged, handler: x }
|
|
133
|
+
], q = () => {
|
|
134
|
+
$.forEach(({ event: e, handler: s }) => {
|
|
98
135
|
var n;
|
|
99
|
-
(n =
|
|
136
|
+
(n = i.instance) == null || n.on(e, s);
|
|
100
137
|
});
|
|
101
138
|
};
|
|
102
|
-
|
|
103
|
-
|
|
139
|
+
C.once("ready", () => {
|
|
140
|
+
q();
|
|
104
141
|
});
|
|
105
|
-
|
|
106
|
-
|
|
142
|
+
I(() => {
|
|
143
|
+
var e;
|
|
144
|
+
return (e = d.value) == null ? void 0 : e.liveId;
|
|
145
|
+
}, (e) => {
|
|
146
|
+
e ? h() : f();
|
|
107
147
|
});
|
|
108
|
-
function
|
|
148
|
+
function Q() {
|
|
109
149
|
return {
|
|
110
150
|
// state
|
|
111
|
-
audienceList:
|
|
112
|
-
audienceCount:
|
|
151
|
+
audienceList: l,
|
|
152
|
+
audienceCount: A,
|
|
113
153
|
// action
|
|
114
|
-
fetchAudienceList:
|
|
154
|
+
fetchAudienceList: h,
|
|
115
155
|
setAdministrator: L,
|
|
116
|
-
revokeAdministrator:
|
|
117
|
-
kickUserOutOfRoom:
|
|
118
|
-
disableSendMessage:
|
|
156
|
+
revokeAdministrator: N,
|
|
157
|
+
kickUserOutOfRoom: O,
|
|
158
|
+
disableSendMessage: D,
|
|
159
|
+
// event
|
|
160
|
+
subscribeEvent: S,
|
|
161
|
+
unsubscribeEvent: T
|
|
119
162
|
};
|
|
120
163
|
}
|
|
121
164
|
export {
|
|
122
|
-
|
|
165
|
+
Q as useLiveAudienceState
|
|
123
166
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LiveType, TUISeatMode, LiveListEvent, LiveInfo, CreateLiveParams, JoinLiveParams, UpdateLiveInfoParams } from '../../types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Live List State Hook
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* 提供直播间相关的响应式数据和操作方法
|
|
6
|
+
* Provides live room related reactive data and operation methods
|
|
8
7
|
*/
|
|
9
|
-
export declare function
|
|
8
|
+
export declare function useLiveListState(): {
|
|
10
9
|
liveList: import('vue').Ref<{
|
|
11
10
|
liveId: string;
|
|
12
11
|
liveName: string;
|
|
@@ -58,7 +57,7 @@ export declare function useLiveState(): {
|
|
|
58
57
|
layoutTemplate: number;
|
|
59
58
|
customInfo: Record<string, any>;
|
|
60
59
|
}[]>;
|
|
61
|
-
|
|
60
|
+
liveListCursor: import('vue').Ref<string, string>;
|
|
62
61
|
currentLive: import('vue').Ref<{
|
|
63
62
|
liveId: string;
|
|
64
63
|
liveName: string;
|
|
@@ -110,7 +109,6 @@ export declare function useLiveState(): {
|
|
|
110
109
|
layoutTemplate: number;
|
|
111
110
|
customInfo: Record<string, any>;
|
|
112
111
|
} | null>;
|
|
113
|
-
localLiveStatus: import('vue').Ref<LiveStatus, LiveStatus>;
|
|
114
112
|
fetchLiveList: ({ category, cursor, count, }: {
|
|
115
113
|
category?: string;
|
|
116
114
|
cursor?: string;
|
|
@@ -121,5 +119,12 @@ export declare function useLiveState(): {
|
|
|
121
119
|
leaveLive: () => Promise<void>;
|
|
122
120
|
endLive: () => Promise<void>;
|
|
123
121
|
updateLiveInfo: (params: UpdateLiveInfoParams) => Promise<void>;
|
|
122
|
+
queryMetaData: (options: {
|
|
123
|
+
keys: string[];
|
|
124
|
+
}) => Promise<any> | undefined;
|
|
125
|
+
updateLiveMetaData: (options: {
|
|
126
|
+
metaData: string;
|
|
127
|
+
}) => Promise<void> | undefined;
|
|
128
|
+
subscribeEvent: (event: LiveListEvent, callback: (eventInfo: any) => void) => void;
|
|
129
|
+
unsubscribeEvent: (event: LiveListEvent, callback: (eventInfo: any) => void) => void;
|
|
124
130
|
};
|
|
125
|
-
export default useLiveState;
|