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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="audio-control" :style="iconSizeStyle" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave">
|
|
3
|
-
<span class="control-btn volume-btn" :title="isMuted ? t('
|
|
4
|
-
<IconSpeakerOff size="
|
|
5
|
-
<IconSpeakerOn size="
|
|
3
|
+
<span class="control-btn volume-btn" :title="props.isMuted ? t('Open Speaker') : t('Close Speaker')" @click="handleVolumeIconClick">
|
|
4
|
+
<IconSpeakerOff :size="props.iconSize" v-if="props.isMuted" />
|
|
5
|
+
<IconSpeakerOn :size="props.iconSize" v-else />
|
|
6
6
|
</span>
|
|
7
7
|
<div v-show="isVolumeSliderVisible" class="volume-slider-container">
|
|
8
8
|
<div
|
|
@@ -35,36 +35,41 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script setup lang="ts">
|
|
38
|
-
import { computed, ref, onUnmounted,
|
|
38
|
+
import { computed, ref, onUnmounted, defineProps, withDefaults } from 'vue';
|
|
39
39
|
import { IconSpeakerOn, IconSpeakerOff, useUIKit } from '@tencentcloud/uikit-base-component-vue3';
|
|
40
40
|
import { isMobile } from '../../../utils';
|
|
41
41
|
|
|
42
|
+
// Constants
|
|
43
|
+
const VOLUME_CONSTANTS = {
|
|
44
|
+
// Minimum allowed volume level (silent)
|
|
45
|
+
MIN_VOLUME: 0,
|
|
46
|
+
// Maximum allowed volume level (full volume)
|
|
47
|
+
MAX_VOLUME: 100,
|
|
48
|
+
};
|
|
49
|
+
|
|
42
50
|
interface AudioControlEmits {
|
|
43
51
|
(e: 'volume-change', value: number): void;
|
|
44
|
-
(e: '
|
|
52
|
+
(e: 'mute-change'): void;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
interface AudioControlProps {
|
|
48
56
|
iconSize?: number;
|
|
49
|
-
|
|
57
|
+
isMuted?: boolean;
|
|
58
|
+
volume?: number; // Volume range: 0-100
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
const props = withDefaults(defineProps<AudioControlProps>(), {
|
|
53
62
|
iconSize: 20,
|
|
54
|
-
|
|
63
|
+
isMuted: false,
|
|
64
|
+
volume: 100,
|
|
55
65
|
});
|
|
56
66
|
|
|
57
67
|
const emit = defineEmits<AudioControlEmits>();
|
|
58
68
|
|
|
59
69
|
const { t } = useUIKit();
|
|
60
70
|
|
|
61
|
-
// Volume state - merged into single object
|
|
62
|
-
const volumeState = ref({
|
|
63
|
-
current: 1,
|
|
64
|
-
previous: 1,
|
|
65
|
-
});
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
|
|
68
73
|
const isVolumeSliderVisible = ref(false);
|
|
69
74
|
const isDragging = ref(false);
|
|
70
75
|
const volumeSliderElement = ref<HTMLElement>();
|
|
@@ -72,65 +77,46 @@ const volumeSliderAutoHideTimer = ref<number | null>(null);
|
|
|
72
77
|
|
|
73
78
|
// Auto-hide delay for different platforms
|
|
74
79
|
const AUTO_HIDE_DELAY = {
|
|
75
|
-
PC:
|
|
80
|
+
PC: 1500, // 1.5 seconds for PC
|
|
76
81
|
MOBILE: 3000, // 3 seconds for mobile
|
|
77
82
|
};
|
|
78
83
|
|
|
79
|
-
//
|
|
84
|
+
// Computed property - use volume from props (already in percentage)
|
|
80
85
|
const volumePercentage = computed(() => {
|
|
81
|
-
|
|
82
|
-
return isMuted.value ? 0 : 100;
|
|
83
|
-
}
|
|
84
|
-
return Math.round(volumeState.value.current * 100);
|
|
86
|
+
return Math.round(props.volume);
|
|
85
87
|
});
|
|
86
88
|
|
|
87
89
|
const iconSizeStyle = computed(() => ({
|
|
88
|
-
width: `${props.iconSize
|
|
89
|
-
height: `${props.iconSize
|
|
90
|
+
width: `${props.iconSize}px`,
|
|
91
|
+
height: `${props.iconSize}px`,
|
|
90
92
|
}));
|
|
91
93
|
|
|
92
94
|
const updateVolume = (newVolume: number) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
emit('volume-change', newVolume);
|
|
95
|
+
// Clamp volume to valid range
|
|
96
|
+
const clampedVolume = Math.max(VOLUME_CONSTANTS.MIN_VOLUME, Math.min(VOLUME_CONSTANTS.MAX_VOLUME, newVolume));
|
|
97
|
+
emit('volume-change', clampedVolume);
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
const toggleMute = () => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
volumeState.value.current = volumeState.value.previous || 0.2;
|
|
103
|
-
emit('muted-change', false);
|
|
104
|
-
emit('volume-change', volumeState.value.current);
|
|
105
|
-
} else {
|
|
106
|
-
isMuted.value = true;
|
|
107
|
-
volumeState.value.previous = volumeState.value.current;
|
|
108
|
-
volumeState.value.current = 0;
|
|
109
|
-
emit('muted-change', true);
|
|
110
|
-
emit('volume-change', volumeState.value.current);
|
|
111
|
-
}
|
|
101
|
+
// Simply emit mute change event, let parent component handle the logic
|
|
102
|
+
emit('mute-change');
|
|
112
103
|
};
|
|
113
104
|
|
|
114
105
|
const handleVolumeIconClick = () => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// Start auto-hide timer when showing volume slider
|
|
125
|
-
if (isVolumeSliderVisible.value) {
|
|
126
|
-
startVolumeSliderAutoHideTimer();
|
|
127
|
-
} else {
|
|
128
|
-
stopVolumeSliderAutoHideTimer();
|
|
129
|
-
}
|
|
106
|
+
// When volume control is enabled
|
|
107
|
+
if (isMobile) {
|
|
108
|
+
// On mobile: toggle volume slider visibility
|
|
109
|
+
isVolumeSliderVisible.value = !isVolumeSliderVisible.value;
|
|
110
|
+
|
|
111
|
+
// Start auto-hide timer when showing volume slider
|
|
112
|
+
if (isVolumeSliderVisible.value) {
|
|
113
|
+
startVolumeSliderAutoHideTimer();
|
|
130
114
|
} else {
|
|
131
|
-
|
|
132
|
-
toggleMute();
|
|
115
|
+
stopVolumeSliderAutoHideTimer();
|
|
133
116
|
}
|
|
117
|
+
} else {
|
|
118
|
+
// On PC: handle mute/unmute, volume slider will show on mouse hover
|
|
119
|
+
toggleMute();
|
|
134
120
|
}
|
|
135
121
|
};
|
|
136
122
|
|
|
@@ -138,9 +124,7 @@ const startVolumeSliderAutoHideTimer = () => {
|
|
|
138
124
|
stopVolumeSliderAutoHideTimer();
|
|
139
125
|
const delay = isMobile ? AUTO_HIDE_DELAY.MOBILE : AUTO_HIDE_DELAY.PC;
|
|
140
126
|
volumeSliderAutoHideTimer.value = window.setTimeout(() => {
|
|
141
|
-
|
|
142
|
-
isVolumeSliderVisible.value = false;
|
|
143
|
-
}
|
|
127
|
+
isVolumeSliderVisible.value = false;
|
|
144
128
|
}, delay);
|
|
145
129
|
};
|
|
146
130
|
|
|
@@ -152,8 +136,6 @@ const stopVolumeSliderAutoHideTimer = () => {
|
|
|
152
136
|
};
|
|
153
137
|
|
|
154
138
|
const handleMouseEnter = () => {
|
|
155
|
-
if (props.enableVolumeControl === false) return;
|
|
156
|
-
|
|
157
139
|
// Only handle mouse events on PC
|
|
158
140
|
if (isMobile) return;
|
|
159
141
|
|
|
@@ -163,7 +145,6 @@ const handleMouseEnter = () => {
|
|
|
163
145
|
};
|
|
164
146
|
|
|
165
147
|
const handleMouseLeave = () => {
|
|
166
|
-
if (props.enableVolumeControl === false) return;
|
|
167
148
|
// Only handle mouse events on PC
|
|
168
149
|
if (isMobile) return;
|
|
169
150
|
// On PC, start auto-hide timer when mouse leaves icon area
|
|
@@ -177,7 +158,8 @@ const calculateVolumeFromPosition = (clientY: number, target: HTMLElement): numb
|
|
|
177
158
|
const rect = target.getBoundingClientRect();
|
|
178
159
|
const clickY = clientY - rect.top;
|
|
179
160
|
const height = rect.height;
|
|
180
|
-
|
|
161
|
+
const volumePercentage = (1 - clickY / height) * 100; // Convert to 0-100 range
|
|
162
|
+
return Math.max(VOLUME_CONSTANTS.MIN_VOLUME, Math.min(VOLUME_CONSTANTS.MAX_VOLUME, volumePercentage));
|
|
181
163
|
};
|
|
182
164
|
|
|
183
165
|
const addGlobalEventListeners = () => {
|
|
@@ -197,9 +179,7 @@ const removeGlobalEventListeners = () => {
|
|
|
197
179
|
const startDragging = () => {
|
|
198
180
|
isDragging.value = true;
|
|
199
181
|
// Stop auto-hide timer when dragging starts
|
|
200
|
-
|
|
201
|
-
stopVolumeSliderAutoHideTimer();
|
|
202
|
-
}
|
|
182
|
+
stopVolumeSliderAutoHideTimer();
|
|
203
183
|
addGlobalEventListeners();
|
|
204
184
|
};
|
|
205
185
|
|
|
@@ -219,26 +199,23 @@ const handleSliderMove = (event: MouseEvent | TouchEvent) => {
|
|
|
219
199
|
const handleSliderEnd = () => {
|
|
220
200
|
isDragging.value = false;
|
|
221
201
|
// Restart auto-hide timer when dragging ends
|
|
222
|
-
if (
|
|
202
|
+
if (isVolumeSliderVisible.value) {
|
|
223
203
|
startVolumeSliderAutoHideTimer();
|
|
224
204
|
}
|
|
225
205
|
removeGlobalEventListeners();
|
|
226
206
|
};
|
|
227
207
|
|
|
228
208
|
const handleSliderMouseDown = (event: MouseEvent) => {
|
|
229
|
-
if (props.enableVolumeControl === false) return;
|
|
230
209
|
startDragging();
|
|
231
210
|
event.preventDefault();
|
|
232
211
|
};
|
|
233
212
|
|
|
234
213
|
const handleSliderTouchStart = (event: TouchEvent) => {
|
|
235
|
-
if (props.enableVolumeControl === false) return;
|
|
236
214
|
startDragging();
|
|
237
215
|
event.preventDefault();
|
|
238
216
|
};
|
|
239
217
|
|
|
240
218
|
const handleVolumeSliderAreaClick = () => {
|
|
241
|
-
if (props.enableVolumeControl === false) return;
|
|
242
219
|
if (isMobile) {
|
|
243
220
|
// On mobile, toggle volume slider visibility
|
|
244
221
|
isVolumeSliderVisible.value = !isVolumeSliderVisible.value;
|
|
@@ -253,7 +230,6 @@ const handleVolumeSliderAreaClick = () => {
|
|
|
253
230
|
};
|
|
254
231
|
|
|
255
232
|
const handleVolumeSliderMouseEnter = () => {
|
|
256
|
-
if (props.enableVolumeControl === false) return;
|
|
257
233
|
// Only handle mouse events on PC
|
|
258
234
|
if (isMobile) return;
|
|
259
235
|
// On PC, stop auto-hide timer when mouse enters slider area
|
|
@@ -261,7 +237,6 @@ const handleVolumeSliderMouseEnter = () => {
|
|
|
261
237
|
};
|
|
262
238
|
|
|
263
239
|
const handleVolumeSliderMouseLeave = () => {
|
|
264
|
-
if (props.enableVolumeControl === false) return;
|
|
265
240
|
// Only handle mouse events on PC
|
|
266
241
|
if (isMobile) return;
|
|
267
242
|
// On PC, start auto-hide timer when mouse leaves slider area
|
|
@@ -315,9 +290,9 @@ onUnmounted(() => {
|
|
|
315
290
|
display: flex;
|
|
316
291
|
flex-direction: column;
|
|
317
292
|
align-items: center;
|
|
318
|
-
gap:
|
|
293
|
+
gap: 4px;
|
|
319
294
|
background: var(--volume-control-background);
|
|
320
|
-
padding: 12px 8px;
|
|
295
|
+
padding: 12px 8px; // Increased padding for PC (from 8px 6px)
|
|
321
296
|
border-radius: 8px;
|
|
322
297
|
backdrop-filter: blur(10px);
|
|
323
298
|
border: 1px solid var(--volume-control-border);
|
|
@@ -327,6 +302,11 @@ onUnmounted(() => {
|
|
|
327
302
|
-moz-user-select: none;
|
|
328
303
|
-ms-user-select: none;
|
|
329
304
|
|
|
305
|
+
// Mobile devices keep original padding
|
|
306
|
+
@media (max-width: 768px) {
|
|
307
|
+
padding: 8px 6px;
|
|
308
|
+
}
|
|
309
|
+
|
|
330
310
|
@media (hover: none) and (pointer: coarse) {
|
|
331
311
|
cursor: grab;
|
|
332
312
|
|
|
@@ -338,21 +318,32 @@ onUnmounted(() => {
|
|
|
338
318
|
|
|
339
319
|
.volume-slider-wrapper-inner {
|
|
340
320
|
position: relative;
|
|
341
|
-
width: 20px
|
|
342
|
-
height: 80px
|
|
321
|
+
width: 24px; // Increased to accommodate 16px thumb (20px -> 24px)
|
|
322
|
+
height: 96px; // Increased to accommodate thumb at top/bottom (80px + 16px = 96px)
|
|
343
323
|
display: flex;
|
|
344
324
|
align-items: center;
|
|
345
325
|
justify-content: center;
|
|
346
|
-
margin-top:
|
|
326
|
+
margin-top: 4px;
|
|
327
|
+
|
|
328
|
+
// Mobile devices keep smaller size
|
|
329
|
+
@media (max-width: 768px) {
|
|
330
|
+
width: 20px;
|
|
331
|
+
height: 80px;
|
|
332
|
+
}
|
|
347
333
|
}
|
|
348
334
|
|
|
349
335
|
.custom-volume-slider {
|
|
350
336
|
position: relative;
|
|
351
|
-
width:
|
|
352
|
-
height: 80px;
|
|
337
|
+
width: 6px;
|
|
338
|
+
height: 80px; // Keep slider track height same, but container is bigger
|
|
353
339
|
cursor: pointer;
|
|
354
340
|
z-index: 2;
|
|
355
|
-
margin: 0;
|
|
341
|
+
margin: 8px 0; // Add margin to center the track in the larger container
|
|
342
|
+
|
|
343
|
+
// Mobile devices keep original margin
|
|
344
|
+
@media (max-width: 768px) {
|
|
345
|
+
margin: 0;
|
|
346
|
+
}
|
|
356
347
|
}
|
|
357
348
|
|
|
358
349
|
.slider-track {
|
|
@@ -376,7 +367,7 @@ onUnmounted(() => {
|
|
|
376
367
|
}
|
|
377
368
|
|
|
378
369
|
.slider-thumb {
|
|
379
|
-
$thumb-size:
|
|
370
|
+
$thumb-size: 16px;
|
|
380
371
|
|
|
381
372
|
position: absolute;
|
|
382
373
|
left: 50%;
|
|
@@ -418,7 +409,7 @@ onUnmounted(() => {
|
|
|
418
409
|
|
|
419
410
|
@media (hover: none) and (pointer: coarse) {
|
|
420
411
|
.volume-slider-wrapper {
|
|
421
|
-
padding:
|
|
412
|
+
padding: 10px 8px;
|
|
422
413
|
|
|
423
414
|
&:active {
|
|
424
415
|
background: var(--volume-control-background-light);
|
|
@@ -429,6 +420,7 @@ onUnmounted(() => {
|
|
|
429
420
|
|
|
430
421
|
.volume-slider-wrapper-inner {
|
|
431
422
|
height: 100px;
|
|
423
|
+
margin-top: 4px;
|
|
432
424
|
}
|
|
433
425
|
}
|
|
434
426
|
</style>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span
|
|
3
|
-
v-if="resolutionList.length > 0"
|
|
3
|
+
v-if="resolutionList.length > 0 && currentResolution"
|
|
4
4
|
v-click-outside="handleClickOutside"
|
|
5
5
|
class="multi-resolution"
|
|
6
6
|
>
|
|
7
7
|
<span
|
|
8
8
|
v-show="isShowResolutionList"
|
|
9
9
|
class="multi-resolution-list"
|
|
10
|
+
:class="{ 'switching-disabled': isResolutionSwitching }"
|
|
10
11
|
@click="handleClickResolution"
|
|
11
12
|
>
|
|
12
13
|
<span
|
|
@@ -19,25 +20,22 @@
|
|
|
19
20
|
</span>
|
|
20
21
|
</span>
|
|
21
22
|
<span class="current-resolution" @click="handleClickCurrentResolution">
|
|
22
|
-
{{
|
|
23
|
+
{{ t(resolutionMap[currentResolution]) }}
|
|
23
24
|
</span>
|
|
24
25
|
</span>
|
|
25
26
|
</template>
|
|
26
27
|
|
|
27
28
|
<script setup lang="ts">
|
|
28
|
-
import {
|
|
29
|
+
import { ref } from 'vue';
|
|
29
30
|
import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
|
|
30
31
|
import vClickOutside from '../../../directives/vClickOutside';
|
|
31
|
-
import { useLiveState } from '../../../states/LiveState';
|
|
32
32
|
import { usePlayerControlState, Resolution } from './PlayerControlState';
|
|
33
33
|
|
|
34
34
|
const { t } = useUIKit();
|
|
35
|
-
const { currentLive } = useLiveState();
|
|
36
35
|
const {
|
|
37
36
|
resolutionList,
|
|
38
37
|
currentResolution,
|
|
39
38
|
switchResolution,
|
|
40
|
-
initializeResolution,
|
|
41
39
|
} = usePlayerControlState();
|
|
42
40
|
|
|
43
41
|
// Resolution mapping for UI display
|
|
@@ -50,6 +48,10 @@ const resolutionMap: Record<Resolution, string> = {
|
|
|
50
48
|
|
|
51
49
|
const isShowResolutionList = ref<boolean>(false);
|
|
52
50
|
|
|
51
|
+
// Throttle state for resolution switching
|
|
52
|
+
const isResolutionSwitching = ref<boolean>(false);
|
|
53
|
+
const RESOLUTION_SWITCH_COOLDOWN = 1000; // 1 second cooldown
|
|
54
|
+
|
|
53
55
|
const handleClickOutside = () => {
|
|
54
56
|
isShowResolutionList.value = false;
|
|
55
57
|
};
|
|
@@ -60,6 +62,12 @@ const handleClickCurrentResolution = () => {
|
|
|
60
62
|
|
|
61
63
|
const handleClickResolution = async (event: MouseEvent) => {
|
|
62
64
|
event.stopPropagation();
|
|
65
|
+
|
|
66
|
+
if (isResolutionSwitching.value) {
|
|
67
|
+
console.warn('[MultiResolution] Resolution switching in progress, please wait...');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
63
71
|
const resolution = (event.target as HTMLElement)?.dataset.resolution;
|
|
64
72
|
if (resolution) {
|
|
65
73
|
const resolutionValue = Number(resolution) as Resolution;
|
|
@@ -68,24 +76,19 @@ const handleClickResolution = async (event: MouseEvent) => {
|
|
|
68
76
|
if (resolutionValue === currentResolution.value) {
|
|
69
77
|
return;
|
|
70
78
|
}
|
|
71
|
-
|
|
79
|
+
try {
|
|
80
|
+
isResolutionSwitching.value = true;
|
|
81
|
+
await switchResolution(resolutionValue);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
console.error('[MultiResolution] Failed to switch resolution:', error);
|
|
84
|
+
} finally {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
isResolutionSwitching.value = false;
|
|
87
|
+
}, RESOLUTION_SWITCH_COOLDOWN);
|
|
88
|
+
}
|
|
72
89
|
}
|
|
73
90
|
}
|
|
74
91
|
};
|
|
75
|
-
|
|
76
|
-
onMounted(() => {
|
|
77
|
-
watch(
|
|
78
|
-
() => currentLive.value?.liveId,
|
|
79
|
-
async () => {
|
|
80
|
-
if (currentLive.value?.liveId) {
|
|
81
|
-
await initializeResolution(currentLive.value.liveId);
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
immediate: true,
|
|
86
|
-
},
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
92
|
</script>
|
|
90
93
|
|
|
91
94
|
<style lang="scss" scoped>
|
|
@@ -104,12 +107,18 @@ onMounted(() => {
|
|
|
104
107
|
flex-direction: column;
|
|
105
108
|
align-items: center;
|
|
106
109
|
justify-content: center;
|
|
110
|
+
min-width: 40px;
|
|
107
111
|
border-radius: 4px;
|
|
108
112
|
padding: 4px 8px;
|
|
109
113
|
transform: translate(-12px, -110%);
|
|
110
114
|
background-color: #1f2024;
|
|
111
115
|
border: 1px solid #2b2c30;
|
|
112
116
|
|
|
117
|
+
&.switching-disabled {
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
opacity: 0.6;
|
|
120
|
+
}
|
|
121
|
+
|
|
113
122
|
.multi-resolution-item {
|
|
114
123
|
width: 100%;
|
|
115
124
|
padding: 4px;
|
|
@@ -10,20 +10,25 @@
|
|
|
10
10
|
]"
|
|
11
11
|
>
|
|
12
12
|
<div class="control-buttons">
|
|
13
|
-
<span
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
<span
|
|
14
|
+
class="control-btn play-pause-btn"
|
|
15
|
+
:title="isPlaying ? t('Pause') : t('Play')"
|
|
16
|
+
@click="handlePlayPause"
|
|
17
|
+
>
|
|
18
|
+
<IconPause v-if="isPlaying" size="20" />
|
|
19
|
+
<IconPlay v-else size="20" />
|
|
16
20
|
</span>
|
|
17
|
-
<div class="center-controls"
|
|
21
|
+
<div class="center-controls" />
|
|
18
22
|
<div class="right-controls">
|
|
19
23
|
<MultiResolution />
|
|
20
24
|
<span class="control-btn audio-control-btn">
|
|
21
25
|
<AudioControl
|
|
22
26
|
class="audio-control-icon"
|
|
23
27
|
:icon-size="20"
|
|
24
|
-
:
|
|
28
|
+
:volume="currentVolume"
|
|
29
|
+
:is-muted="isMuted"
|
|
25
30
|
@volume-change="handleVolumeChange"
|
|
26
|
-
@
|
|
31
|
+
@mute-change="handleMuteChange"
|
|
27
32
|
/>
|
|
28
33
|
</span>
|
|
29
34
|
<span
|
|
@@ -57,16 +62,18 @@ import {
|
|
|
57
62
|
TUIToast,
|
|
58
63
|
TOAST_TYPE,
|
|
59
64
|
} from '@tencentcloud/uikit-base-component-vue3';
|
|
60
|
-
import {
|
|
65
|
+
import { isMobile } from '../../../utils';
|
|
61
66
|
import AudioControl from './AudioControl.vue';
|
|
62
67
|
import MultiResolution from './MultiResolution.vue';
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
68
|
+
import { usePlayerControlState } from './PlayerControlState';
|
|
69
|
+
import { waitForVideoMounted } from './utils/domHelpers';
|
|
65
70
|
|
|
66
71
|
const {
|
|
72
|
+
isMuted,
|
|
67
73
|
isPlaying,
|
|
68
74
|
isFullscreen,
|
|
69
75
|
isPictureInPicture,
|
|
76
|
+
currentVolume,
|
|
70
77
|
pause,
|
|
71
78
|
resume,
|
|
72
79
|
requestPictureInPicture,
|
|
@@ -74,6 +81,7 @@ const {
|
|
|
74
81
|
requestFullscreen,
|
|
75
82
|
exitFullscreen,
|
|
76
83
|
setVolume,
|
|
84
|
+
setMute,
|
|
77
85
|
cleanup,
|
|
78
86
|
} = usePlayerControlState();
|
|
79
87
|
|
|
@@ -82,28 +90,12 @@ const props = defineProps<{
|
|
|
82
90
|
}>();
|
|
83
91
|
|
|
84
92
|
const { t } = useUIKit();
|
|
85
|
-
const currentVolume = ref(1);
|
|
86
|
-
const isMuted = ref(false);
|
|
87
93
|
const playerControlRef = ref<HTMLElement>();
|
|
88
94
|
const showControls = ref(false);
|
|
89
95
|
const hideTimeout = ref<number | null>(null);
|
|
90
96
|
|
|
91
97
|
const AUTO_HIDE_DELAY = 3000; // ms
|
|
92
98
|
|
|
93
|
-
const isEnableVolumeControl = () => {
|
|
94
|
-
// PC
|
|
95
|
-
if (!isMobile) return true;
|
|
96
|
-
|
|
97
|
-
// Safari is not supported
|
|
98
|
-
if (isSafariBrowser()) return false;
|
|
99
|
-
|
|
100
|
-
// Firefox is not supported
|
|
101
|
-
if (isFirefoxBrowser()) return false;
|
|
102
|
-
|
|
103
|
-
// Other Mobile browsers is supported
|
|
104
|
-
return true;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
99
|
const handlePlayPause = () => {
|
|
108
100
|
if (isPlaying.value) {
|
|
109
101
|
pause();
|
|
@@ -138,7 +130,6 @@ const handleFullscreen = () => {
|
|
|
138
130
|
};
|
|
139
131
|
|
|
140
132
|
const handleVolumeChange = async (volume: number) => {
|
|
141
|
-
currentVolume.value = volume;
|
|
142
133
|
// When the mouse is placed in the liveCoreView area on a pc, playerControls will always be displayed
|
|
143
134
|
if (isMobile) {
|
|
144
135
|
startAutoHideControl();
|
|
@@ -146,6 +137,10 @@ const handleVolumeChange = async (volume: number) => {
|
|
|
146
137
|
await setVolume(volume);
|
|
147
138
|
};
|
|
148
139
|
|
|
140
|
+
const handleMuteChange = async () => {
|
|
141
|
+
await setMute(!isMuted.value);
|
|
142
|
+
};
|
|
143
|
+
|
|
149
144
|
const startAutoHideControl = () => {
|
|
150
145
|
stopAutoHideControl();
|
|
151
146
|
hideTimeout.value = window.setTimeout(() => {
|
|
@@ -193,13 +188,9 @@ const removeParentMouseListener = () => {
|
|
|
193
188
|
const touchStartCoords = ref<{ x: number; y: number } | null>(null);
|
|
194
189
|
|
|
195
190
|
// Touch distance calculation
|
|
196
|
-
const calculateTouchDistance = (start: { x: number; y: number }, end: Touch) =>
|
|
197
|
-
return Math.sqrt(Math.pow(end.clientX - start.x, 2) + Math.pow(end.clientY - start.y, 2));
|
|
198
|
-
};
|
|
191
|
+
const calculateTouchDistance = (start: { x: number; y: number }, end: Touch) => Math.sqrt((end.clientX - start.x) ** 2 + (end.clientY - start.y) ** 2);
|
|
199
192
|
|
|
200
|
-
const isPlayerControlTarget = (target: Node) =>
|
|
201
|
-
return playerControlRef.value?.contains(target) || false;
|
|
202
|
-
};
|
|
193
|
+
const isPlayerControlTarget = (target: Node) => playerControlRef.value?.contains(target) || false;
|
|
203
194
|
|
|
204
195
|
const isLiveCoreViewTarget = (target: Node) => {
|
|
205
196
|
const container = document.getElementById('live-core-view-container');
|
|
@@ -233,7 +224,6 @@ const handleScreenTouchStart = (event: TouchEvent) => {
|
|
|
233
224
|
const handleScreenTouchMove = (event: TouchEvent) => {
|
|
234
225
|
if (playerControlRef.value && playerControlRef.value.contains(event.target as Node)) {
|
|
235
226
|
stopAutoHideControl();
|
|
236
|
-
return;
|
|
237
227
|
}
|
|
238
228
|
};
|
|
239
229
|
|
|
@@ -280,15 +270,6 @@ const removeTouchEventListeners = () => {
|
|
|
280
270
|
}
|
|
281
271
|
};
|
|
282
272
|
|
|
283
|
-
const handleMutedChange = async (muted: boolean) => {
|
|
284
|
-
isMuted.value = muted;
|
|
285
|
-
if (muted) {
|
|
286
|
-
await setVolume(0);
|
|
287
|
-
} else {
|
|
288
|
-
await setVolume(currentVolume.value);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
|
|
292
273
|
const cleanupEventListeners = () => {
|
|
293
274
|
removeTouchEventListeners();
|
|
294
275
|
removeParentMouseListener();
|
|
@@ -301,6 +282,9 @@ onMounted(() => {
|
|
|
301
282
|
});
|
|
302
283
|
|
|
303
284
|
onBeforeUnmount(() => {
|
|
285
|
+
if (isPictureInPicture.value) {
|
|
286
|
+
exitPictureInPicture();
|
|
287
|
+
}
|
|
304
288
|
cleanupEventListeners();
|
|
305
289
|
cleanup();
|
|
306
290
|
});
|