tuikit-atomicx-vue3 3.4.1 → 3.5.0-beta.7
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/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 +3 -3
- package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
- package/dist/components/BarrageInput/MessageInputState.js +82 -0
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +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 +25 -25
- package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
- package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
- 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 +4 -4
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
- package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
- package/dist/components/LiveView/PlayerControl/AudioControl.js +133 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +10 -6
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +73 -0
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +168 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +2 -2
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +222 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +8 -1
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +132 -0
- package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
- package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
- package/dist/components/LiveView/index.d.ts +79 -0
- package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
- 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/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/StreamMixer/index.js +6 -6
- 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/RecalledMessage/RecalledMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -14
- 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-D-KJvDvy.js → index-DMfTuy0v.js} +574 -631
- package/dist/{index-D88ja_7_.js → index-DV6o6s43.js} +1691 -1660
- package/dist/index.d.ts +3 -1
- package/dist/index.js +180 -156
- 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 +6 -81
- package/dist/rtc/index.js +53 -52
- 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/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/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 +4 -7
- package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
- package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
- 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 +2 -2
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
- package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +72 -80
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +30 -21
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +26 -42
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +516 -0
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +68 -4
- package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
- package/src/components/{LiveCoreView → LiveView}/index.vue +4 -3
- 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/StreamMixer/index.vue +1 -1
- 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 +8 -10
- 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/FaceMessage.vue.d.ts +0 -30
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
- package/dist/components/BarrageList/Message/RecalledMessage/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/LiveCoreView/PlayerControl/AudioControl.js +0 -129
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
- package/dist/components/LiveCoreView/index.d.ts +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/LiveCoreView/PlayerControl/PlayerControlState.ts +0 -718
- package/src/components/StreamView/Layout/MixLayout.vue +0 -144
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { ref as f, watch as I, nextTick as U } from "vue";
|
|
2
|
-
import T, { TUIRoomEvents as d, TUILiveLayoutManagerEvents as M, TUILiveListManagerEvents as C, TUILiveModifyFlag as c, TUIRoomType as D } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
-
import { useRoomEngine as O } from "../../hooks/useRoomEngine.js";
|
|
4
|
-
import V from "../../rtc/server.js";
|
|
5
|
-
import { LiveType as m, LiveStatus as l } from "../../types/live.js";
|
|
6
|
-
import { TUISeatMode as R } from "../../types/types.js";
|
|
7
|
-
import { useConversationListState as P } from "../ConversationListState/ConversationListState.js";
|
|
8
|
-
const b = V.getInstance(), { setActiveConversation: k } = P(), r = O(), g = f([]), w = f(""), y = {
|
|
9
|
-
liveId: "",
|
|
10
|
-
liveName: "",
|
|
11
|
-
liveType: m.kLive,
|
|
12
|
-
liveDescription: "",
|
|
13
|
-
categoryList: [],
|
|
14
|
-
coverUrl: "",
|
|
15
|
-
backgroundUrl: "",
|
|
16
|
-
liveOwner: {
|
|
17
|
-
userId: "",
|
|
18
|
-
userName: "",
|
|
19
|
-
avatarUrl: "",
|
|
20
|
-
customInfo: {}
|
|
21
|
-
},
|
|
22
|
-
currentViewerCount: 0,
|
|
23
|
-
totalViewerCount: 0,
|
|
24
|
-
createTime: 0,
|
|
25
|
-
isMessageDisable: !1,
|
|
26
|
-
isGiftEnabled: !1,
|
|
27
|
-
isPublicVisible: !1,
|
|
28
|
-
isSeatEnabled: !1,
|
|
29
|
-
seatMode: R.kFreeToTake,
|
|
30
|
-
maxSeatCount: 0,
|
|
31
|
-
layoutTemplate: 0,
|
|
32
|
-
customInfo: {}
|
|
33
|
-
}, E = (e) => ({
|
|
34
|
-
liveId: e.roomId,
|
|
35
|
-
liveName: e.name,
|
|
36
|
-
liveType: m.kLive,
|
|
37
|
-
// todo
|
|
38
|
-
liveDescription: "",
|
|
39
|
-
// todo
|
|
40
|
-
categoryList: e.categoryList,
|
|
41
|
-
coverUrl: e.coverUrl,
|
|
42
|
-
backgroundUrl: e.backgroundUrl,
|
|
43
|
-
liveOwner: {
|
|
44
|
-
userId: e.roomOwner || "",
|
|
45
|
-
userName: e.ownerName || "",
|
|
46
|
-
avatarUrl: e.ownerAvatarUrl || "",
|
|
47
|
-
customInfo: {}
|
|
48
|
-
// todo
|
|
49
|
-
},
|
|
50
|
-
currentViewerCount: e.totalViewers || 0,
|
|
51
|
-
totalViewerCount: e.totalViewers || 0,
|
|
52
|
-
createTime: e.createTime || 0,
|
|
53
|
-
isMessageDisable: e.isMessageDisableForAllUser,
|
|
54
|
-
isGiftEnabled: e.isGiftEnabled,
|
|
55
|
-
isPublicVisible: e.isPublicVisible,
|
|
56
|
-
isSeatEnabled: e.isSeatEnabled,
|
|
57
|
-
seatMode: e.seatMode,
|
|
58
|
-
maxSeatCount: e.maxSeatCount,
|
|
59
|
-
layoutTemplate: e.seatLayoutTemplateId,
|
|
60
|
-
customInfo: {}
|
|
61
|
-
}), a = f({ ...y }), s = f(l.IDLE), S = (e) => {
|
|
62
|
-
a.value = { ...E(e) };
|
|
63
|
-
}, G = async (e) => {
|
|
64
|
-
var o, t;
|
|
65
|
-
b.isLogin.value || await b.login();
|
|
66
|
-
try {
|
|
67
|
-
console.log("[liveState createLive] create live", e);
|
|
68
|
-
const i = await ((t = (o = r.instance) == null ? void 0 : o.getLiveListManager()) == null ? void 0 : t.startLive({
|
|
69
|
-
roomId: e.liveId,
|
|
70
|
-
roomType: D.kLive,
|
|
71
|
-
name: e.liveName,
|
|
72
|
-
notice: e.notice,
|
|
73
|
-
isMessageDisableForAllUser: e.isMessageDisableForAllUser,
|
|
74
|
-
isGiftEnabled: e.isGiftEnabled,
|
|
75
|
-
isLikeEnabled: e.isLikeEnabled,
|
|
76
|
-
isPublicVisible: e.isPublicVisible,
|
|
77
|
-
isSeatEnabled: e.isSeatEnabled,
|
|
78
|
-
keepOwnerOnSeat: e.keepOwnerOnSeat,
|
|
79
|
-
seatLayoutTemplateId: e.seatLayoutTemplateId,
|
|
80
|
-
maxSeatCount: e.maxSeatCount,
|
|
81
|
-
seatMode: e.seatMode,
|
|
82
|
-
coverUrl: e.coverUrl,
|
|
83
|
-
backgroundUrl: e.backgroundUrl,
|
|
84
|
-
categoryList: e.categoryList,
|
|
85
|
-
activityStatus: e.activityStatus
|
|
86
|
-
}));
|
|
87
|
-
if (!i)
|
|
88
|
-
throw new Error("[liveState createLive] create live failed");
|
|
89
|
-
S(i), s.value = l.NotStarted;
|
|
90
|
-
} catch (i) {
|
|
91
|
-
throw console.error("[liveState createLive] error", i), i;
|
|
92
|
-
}
|
|
93
|
-
}, N = async ({ liveId: e }) => {
|
|
94
|
-
var t;
|
|
95
|
-
b.isLogin.value || await b.login(), console.log("[liveState joinLive] enter room", e);
|
|
96
|
-
const o = (t = r.instance) == null ? void 0 : t.getLiveListManager();
|
|
97
|
-
try {
|
|
98
|
-
await k(`GROUP${e}`);
|
|
99
|
-
const i = await (o == null ? void 0 : o.joinLive(e));
|
|
100
|
-
if (!i)
|
|
101
|
-
throw new Error("[liveState joinLive] join live failed");
|
|
102
|
-
S(i), s.value = l.Live;
|
|
103
|
-
} catch (i) {
|
|
104
|
-
throw console.error("[liveState joinLive] error", i), i;
|
|
105
|
-
}
|
|
106
|
-
}, x = async () => {
|
|
107
|
-
var e, o;
|
|
108
|
-
try {
|
|
109
|
-
console.log("[liveState leaveLive] leave room"), await ((o = (e = r.instance) == null ? void 0 : e.getLiveListManager()) == null ? void 0 : o.leaveLive()), s.value = l.IDLE, a.value = { ...y };
|
|
110
|
-
} catch (t) {
|
|
111
|
-
throw console.error("[liveState leaveLive] error", t), t;
|
|
112
|
-
}
|
|
113
|
-
}, j = async () => {
|
|
114
|
-
var e, o;
|
|
115
|
-
try {
|
|
116
|
-
console.log("[liveState endLive] destroy room"), await ((o = (e = r.instance) == null ? void 0 : e.getLiveListManager()) == null ? void 0 : o.stopLive()), a.value = { ...y }, s.value = l.IDLE;
|
|
117
|
-
} catch (t) {
|
|
118
|
-
throw console.error("[liveState endLive] error", t), t;
|
|
119
|
-
}
|
|
120
|
-
}, p = async (e) => {
|
|
121
|
-
var o;
|
|
122
|
-
if (!a.value) {
|
|
123
|
-
a.value = { ...y, ...e };
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (!a.value.liveId) {
|
|
127
|
-
Object.assign(a.value, { ...e });
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
console.log("[liveState updateLiveInfo]", JSON.stringify(e));
|
|
132
|
-
const t = (o = r.instance) == null ? void 0 : o.getLiveListManager(), i = {
|
|
133
|
-
roomId: e.liveId || a.value.liveId
|
|
134
|
-
};
|
|
135
|
-
e.activityStatus && (i.activityStatus = e.activityStatus), e.categoryList && (i.categoryList = e.categoryList), e.coverUrl && (i.coverUrl = e.coverUrl), e.backgroundUrl && (i.backgroundUrl = e.backgroundUrl), e.isPublicVisible && (i.isPublicVisible = e.isPublicVisible), e.layoutTemplate && (i.seatLayoutTemplateId = e.layoutTemplate), await (t == null ? void 0 : t.setLiveInfo(i));
|
|
136
|
-
const n = await (t == null ? void 0 : t.getLiveInfo({ roomId: i.roomId }));
|
|
137
|
-
if (!n)
|
|
138
|
-
throw new Error("[liveState updateLiveInfo] update live info failed");
|
|
139
|
-
S(n);
|
|
140
|
-
} catch (t) {
|
|
141
|
-
throw console.error("[liveState updateLiveInfo] error", t), t;
|
|
142
|
-
}
|
|
143
|
-
}, A = async ({
|
|
144
|
-
category: e,
|
|
145
|
-
cursor: o = "",
|
|
146
|
-
count: t = 20
|
|
147
|
-
}) => {
|
|
148
|
-
if (!r.instance) {
|
|
149
|
-
console.error("[liveState fetchLiveList] RoomEngine instance is not ready");
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
try {
|
|
153
|
-
const i = r.instance.getLiveListManager();
|
|
154
|
-
if (!i)
|
|
155
|
-
throw console.error("[liveState fetchLiveList] get live list manager failed"), new Error("[liveState fetchLiveList] get live list manager failed");
|
|
156
|
-
const n = await i.fetchLiveList({
|
|
157
|
-
cursor: o,
|
|
158
|
-
count: t
|
|
159
|
-
}), v = n.liveInfoList.map((u) => E(u)), L = new Set(g.value.map((u) => u.liveId)), h = v.filter((u) => !L.has(u.liveId));
|
|
160
|
-
g.value = [...g.value, ...h], w.value = n.cursor;
|
|
161
|
-
} catch (i) {
|
|
162
|
-
throw console.error("[liveState fetchLiveList] error", i), i;
|
|
163
|
-
}
|
|
164
|
-
}, F = async (e) => {
|
|
165
|
-
console.log("[liveState onRoomDismissed]", e), s.value = l.Ended, a.value = null, await U(), s.value = l.IDLE;
|
|
166
|
-
}, K = ({ roomId: e, seatMode: o }) => {
|
|
167
|
-
a.value && a.value.liveId === e && (a.value.seatMode = o);
|
|
168
|
-
}, B = ({ liveInfo: e, modifyFlag: o }) => {
|
|
169
|
-
if (console.log("[liveState onLiveInfoChanged]", e, o), !!a.value)
|
|
170
|
-
switch (o) {
|
|
171
|
-
case c.kActivityStatus:
|
|
172
|
-
break;
|
|
173
|
-
case c.kBackgroundUrl:
|
|
174
|
-
a.value.backgroundUrl = e.backgroundUrl;
|
|
175
|
-
break;
|
|
176
|
-
case c.kCategory:
|
|
177
|
-
break;
|
|
178
|
-
case c.kCoverUrl:
|
|
179
|
-
a.value.coverUrl = e.coverUrl;
|
|
180
|
-
break;
|
|
181
|
-
case c.kEnableGift:
|
|
182
|
-
a.value.isGiftEnabled = e.isGiftEnabled;
|
|
183
|
-
break;
|
|
184
|
-
case c.kEnableLike:
|
|
185
|
-
break;
|
|
186
|
-
case c.kNone:
|
|
187
|
-
break;
|
|
188
|
-
case c.kPublic:
|
|
189
|
-
a.value.isPublicVisible = e.isPublicVisible;
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
}, J = ({ roomId: e, seatLayout: o }) => {
|
|
193
|
-
var t;
|
|
194
|
-
e === ((t = a.value) == null ? void 0 : t.liveId) && a.value && (a.value.layoutTemplate = o.templateId);
|
|
195
|
-
}, $ = () => {
|
|
196
|
-
s.value = l.IDLE, a.value = null;
|
|
197
|
-
}, q = () => {
|
|
198
|
-
s.value = l.IDLE, a.value = null;
|
|
199
|
-
}, z = [
|
|
200
|
-
{ event: d.onRoomDismissed, handler: F },
|
|
201
|
-
{ event: d.onKickedOutOfRoom, handler: $ },
|
|
202
|
-
{ event: d.onKickedOffLine, handler: q },
|
|
203
|
-
{
|
|
204
|
-
event: d.onRoomSeatModeChanged,
|
|
205
|
-
handler: K
|
|
206
|
-
}
|
|
207
|
-
], H = [
|
|
208
|
-
{
|
|
209
|
-
event: C.onLiveInfoChanged,
|
|
210
|
-
handler: B
|
|
211
|
-
}
|
|
212
|
-
], Q = [
|
|
213
|
-
{
|
|
214
|
-
event: M.onSeatLayoutChanged,
|
|
215
|
-
handler: J
|
|
216
|
-
}
|
|
217
|
-
], W = () => {
|
|
218
|
-
var t, i;
|
|
219
|
-
const e = (t = r.instance) == null ? void 0 : t.getLiveLayoutManager(), o = (i = r.instance) == null ? void 0 : i.getLiveListManager();
|
|
220
|
-
z.forEach(({ event: n, handler: v }) => {
|
|
221
|
-
var L;
|
|
222
|
-
(L = r.instance) == null || L.on(n, v);
|
|
223
|
-
}), e && Q.forEach(({ event: n, handler: v }) => {
|
|
224
|
-
e.on(n, v);
|
|
225
|
-
}), o && H.forEach(({ event: n, handler: v }) => {
|
|
226
|
-
o.on(n, v);
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
I(s, (e) => {
|
|
230
|
-
e === l.IDLE && k("");
|
|
231
|
-
});
|
|
232
|
-
T.once("ready", () => {
|
|
233
|
-
W();
|
|
234
|
-
});
|
|
235
|
-
function oe() {
|
|
236
|
-
return {
|
|
237
|
-
// 响应式数据
|
|
238
|
-
liveList: g,
|
|
239
|
-
currentCursor: w,
|
|
240
|
-
currentLive: a,
|
|
241
|
-
localLiveStatus: s,
|
|
242
|
-
// 操作接口
|
|
243
|
-
fetchLiveList: A,
|
|
244
|
-
createLive: G,
|
|
245
|
-
joinLive: N,
|
|
246
|
-
leaveLive: x,
|
|
247
|
-
endLive: j,
|
|
248
|
-
updateLiveInfo: p
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
export {
|
|
252
|
-
oe as default,
|
|
253
|
-
oe as useLiveState
|
|
254
|
-
};
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { computed as R, ref as g, watch as U } from "vue";
|
|
2
|
-
import L, { TRTCVideoResolutionMode as h, TRTCVideoResolution as u, TUIRoomDeviceMangerEvents as O, TRTCMediaMixingEvent as f, TUIResolutionMode as w, TUIMediaDeviceType as B, TUIMediaDeviceState as j, TRTCMediaSourceType as c, TRTCVideoRotation as Q, TRTCVideoMirrorType as P, TRTCVideoFillMode as V } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
-
import { useRoomEngine as H } from "../hooks/useRoomEngine.js";
|
|
4
|
-
import { useLiveState as W } from "./LiveState/index.js";
|
|
5
|
-
import { objectMerge as A } from "../utils/utils.js";
|
|
6
|
-
import { LiveOrientation as v } from "../types/live.js";
|
|
7
|
-
import { TUIVideoQuality as a, TUIVideoStreamType as $ } from "../types/types.js";
|
|
8
|
-
const M = H(), { currentLive: m } = W(), C = R(() => {
|
|
9
|
-
var e, i;
|
|
10
|
-
return m.value && ((e = m.value) == null ? void 0 : e.layoutTemplate) >= 200 && ((i = m.value) == null ? void 0 : i.layoutTemplate) <= 599 ? v.Landscape : v.Portrait;
|
|
11
|
-
});
|
|
12
|
-
function Z(e) {
|
|
13
|
-
return {
|
|
14
|
-
[a.kVideoQuality_1080p]: {
|
|
15
|
-
fps: 20,
|
|
16
|
-
bitrate: 3e3
|
|
17
|
-
},
|
|
18
|
-
[a.kVideoQuality_720p]: {
|
|
19
|
-
fps: 15,
|
|
20
|
-
bitrate: 1800
|
|
21
|
-
},
|
|
22
|
-
[a.kVideoQuality_540p]: {
|
|
23
|
-
fps: 15,
|
|
24
|
-
bitrate: 1200
|
|
25
|
-
},
|
|
26
|
-
[a.kVideoQuality_360p]: {
|
|
27
|
-
fps: 15,
|
|
28
|
-
bitrate: 800
|
|
29
|
-
}
|
|
30
|
-
}[e];
|
|
31
|
-
}
|
|
32
|
-
function z(e) {
|
|
33
|
-
return {
|
|
34
|
-
[a.kVideoQuality_1080p]: {
|
|
35
|
-
width: 1920,
|
|
36
|
-
height: 1080
|
|
37
|
-
},
|
|
38
|
-
[a.kVideoQuality_720p]: {
|
|
39
|
-
width: 1280,
|
|
40
|
-
height: 720
|
|
41
|
-
},
|
|
42
|
-
[a.kVideoQuality_540p]: {
|
|
43
|
-
width: 960,
|
|
44
|
-
height: 540
|
|
45
|
-
},
|
|
46
|
-
[a.kVideoQuality_360p]: {
|
|
47
|
-
width: 640,
|
|
48
|
-
height: 360
|
|
49
|
-
}
|
|
50
|
-
}[e];
|
|
51
|
-
}
|
|
52
|
-
function q(e) {
|
|
53
|
-
return {
|
|
54
|
-
[u.TRTCVideoResolution_480_270]: { width: 480, height: 270 },
|
|
55
|
-
[u.TRTCVideoResolution_640_360]: { width: 640, height: 360 },
|
|
56
|
-
[u.TRTCVideoResolution_960_540]: { width: 960, height: 540 },
|
|
57
|
-
[u.TRTCVideoResolution_1280_720]: { width: 1280, height: 720 },
|
|
58
|
-
[u.TRTCVideoResolution_1920_1080]: { width: 1920, height: 1080 }
|
|
59
|
-
}[e] || { width: 1280, height: 720 };
|
|
60
|
-
}
|
|
61
|
-
const y = g(a.kVideoQuality_720p), G = R(() => {
|
|
62
|
-
const { width: e, height: i } = z(y.value);
|
|
63
|
-
return C.value === v.Portrait ? i : e;
|
|
64
|
-
}), J = R(() => {
|
|
65
|
-
const { width: e, height: i } = z(y.value);
|
|
66
|
-
return C.value === v.Portrait ? e : i;
|
|
67
|
-
});
|
|
68
|
-
function K(e) {
|
|
69
|
-
return {
|
|
70
|
-
[a.kVideoQuality_1080p]: u.TRTCVideoResolution_1920_1080,
|
|
71
|
-
[a.kVideoQuality_720p]: u.TRTCVideoResolution_1280_720,
|
|
72
|
-
[a.kVideoQuality_540p]: u.TRTCVideoResolution_960_540,
|
|
73
|
-
[a.kVideoQuality_360p]: u.TRTCVideoResolution_640_360
|
|
74
|
-
}[e];
|
|
75
|
-
}
|
|
76
|
-
function N(e) {
|
|
77
|
-
return {
|
|
78
|
-
[u.TRTCVideoResolution_1920_1080]: a.kVideoQuality_1080p,
|
|
79
|
-
[u.TRTCVideoResolution_1280_720]: a.kVideoQuality_720p,
|
|
80
|
-
[u.TRTCVideoResolution_960_540]: a.kVideoQuality_540p,
|
|
81
|
-
[u.TRTCVideoResolution_640_360]: a.kVideoQuality_360p
|
|
82
|
-
}[e];
|
|
83
|
-
}
|
|
84
|
-
function X(e) {
|
|
85
|
-
return {
|
|
86
|
-
[h.TRTCVideoResolutionModePortrait]: w.kResolutionMode_Portrait,
|
|
87
|
-
[h.TRTCVideoResolutionModeLandscape]: w.kResolutionMode_Landscape
|
|
88
|
-
}[e];
|
|
89
|
-
}
|
|
90
|
-
const T = R(() => {
|
|
91
|
-
const { fps: e, bitrate: i } = Z(y.value);
|
|
92
|
-
return {
|
|
93
|
-
videoEncoderParams: {
|
|
94
|
-
videoResolution: K(y.value),
|
|
95
|
-
resMode: C.value === v.Portrait ? h.TRTCVideoResolutionModePortrait : h.TRTCVideoResolutionModeLandscape,
|
|
96
|
-
videoFps: e,
|
|
97
|
-
videoBitrate: i
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
}), S = g(!1), n = g([]), _ = R(() => n.value.find((e) => e.isSelected) || null);
|
|
101
|
-
let l;
|
|
102
|
-
function k(e) {
|
|
103
|
-
if (_.value) {
|
|
104
|
-
const i = n.value.find((o) => o.id === _.value.id) || null;
|
|
105
|
-
i && (i.isSelected = !1);
|
|
106
|
-
}
|
|
107
|
-
if (e) {
|
|
108
|
-
const i = n.value.find((o) => o.id === e.id) || null;
|
|
109
|
-
i && (i.isSelected = !0);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
async function I() {
|
|
113
|
-
var e;
|
|
114
|
-
T.value && await ((e = M.instance) == null ? void 0 : e.updateVideoQualityEx({
|
|
115
|
-
streamType: $.kCameraStream,
|
|
116
|
-
encoderParams: {
|
|
117
|
-
videoResolution: N(T.value.videoEncoderParams.videoResolution),
|
|
118
|
-
fps: T.value.videoEncoderParams.videoFps,
|
|
119
|
-
bitrate: T.value.videoEncoderParams.videoBitrate,
|
|
120
|
-
resolutionMode: X(T.value.videoEncoderParams.resMode)
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
}
|
|
124
|
-
U(
|
|
125
|
-
() => T.value,
|
|
126
|
-
async () => {
|
|
127
|
-
await l && l.updatePublishParams(T.value), await I();
|
|
128
|
-
},
|
|
129
|
-
{ immediate: !0, deep: !0 }
|
|
130
|
-
);
|
|
131
|
-
let p = 1;
|
|
132
|
-
function x(e) {
|
|
133
|
-
var i, o;
|
|
134
|
-
if (e.type === c.kCamera || e.type === c.kScreen) {
|
|
135
|
-
let t, d;
|
|
136
|
-
e.type === c.kCamera ? (t = ((i = e.camera) == null ? void 0 : i.resolution) || u.TRTCVideoResolution_1280_720, d = V.TRTCVideoFillMode_Fill) : e.type === c.kScreen && (t = ((o = e.screen) == null ? void 0 : o.resolution) || u.TRTCVideoResolution_1920_1080, d = V.TRTCVideoFillMode_Fit);
|
|
137
|
-
const { width: r, height: s } = q(t), b = Math.min(G.value / r, J.value / s), F = {
|
|
138
|
-
rect: {
|
|
139
|
-
left: 0,
|
|
140
|
-
top: 0,
|
|
141
|
-
right: r * b,
|
|
142
|
-
bottom: s * b
|
|
143
|
-
},
|
|
144
|
-
zOrder: p,
|
|
145
|
-
fillMode: d,
|
|
146
|
-
mirror: P.TRTCVideoMirrorType_Disable,
|
|
147
|
-
rotation: Q.TRTCVideoRotation_0
|
|
148
|
-
};
|
|
149
|
-
return p += 1, F;
|
|
150
|
-
}
|
|
151
|
-
if (e.type === c.kText) {
|
|
152
|
-
const t = {
|
|
153
|
-
rect: {
|
|
154
|
-
left: 20,
|
|
155
|
-
top: 400,
|
|
156
|
-
right: 220,
|
|
157
|
-
bottom: 500
|
|
158
|
-
},
|
|
159
|
-
zOrder: p
|
|
160
|
-
};
|
|
161
|
-
return p += 1, t;
|
|
162
|
-
}
|
|
163
|
-
if (e.type === c.kImage || e.type === c.kVideo) {
|
|
164
|
-
const t = {
|
|
165
|
-
rect: {
|
|
166
|
-
left: 0,
|
|
167
|
-
top: 0,
|
|
168
|
-
right: 400,
|
|
169
|
-
bottom: 300
|
|
170
|
-
},
|
|
171
|
-
zOrder: p,
|
|
172
|
-
fillMode: V.TRTCVideoFillMode_Fit,
|
|
173
|
-
mirror: P.TRTCVideoMirrorType_Disable,
|
|
174
|
-
rotation: Q.TRTCVideoRotation_0
|
|
175
|
-
};
|
|
176
|
-
return p += 1, t;
|
|
177
|
-
}
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
async function Y(e) {
|
|
181
|
-
var i, o, t, d;
|
|
182
|
-
if (e.type === c.kCamera)
|
|
183
|
-
try {
|
|
184
|
-
(await navigator.mediaDevices.getUserMedia({ audio: !1, video: !0 })).getVideoTracks()[0].stop();
|
|
185
|
-
} catch (r) {
|
|
186
|
-
throw r;
|
|
187
|
-
}
|
|
188
|
-
e.layout ? e.layout = Object.assign({}, x(e), e.layout) : e.layout = x(e), e.type === c.kText && (e.text = {
|
|
189
|
-
content: ((i = e.text) == null ? void 0 : i.content) || "",
|
|
190
|
-
color: (o = e.text) == null ? void 0 : o.fontColor,
|
|
191
|
-
font: `${(t = e.text) == null ? void 0 : t.fontSize}px ${(d = e.text) == null ? void 0 : d.fontFamily}`
|
|
192
|
-
}), await l.addMediaSource(e), n.value.push(e), k(e);
|
|
193
|
-
}
|
|
194
|
-
async function ee(e, i) {
|
|
195
|
-
const o = A(e, i);
|
|
196
|
-
await l.updateMediaSource(o), e.isSelected && k(o);
|
|
197
|
-
const t = n.value.findIndex((d) => d.id === e.id);
|
|
198
|
-
t !== -1 && (n.value[t] = o);
|
|
199
|
-
}
|
|
200
|
-
async function ie(e) {
|
|
201
|
-
await l.removeMediaSource(e), n.value = n.value.filter((i) => i.id !== e.id);
|
|
202
|
-
}
|
|
203
|
-
function te() {
|
|
204
|
-
S.value = !0, E();
|
|
205
|
-
}
|
|
206
|
-
function oe() {
|
|
207
|
-
n.value.forEach(async (e) => {
|
|
208
|
-
await l.removeMediaSource(e);
|
|
209
|
-
}), n.value = [];
|
|
210
|
-
}
|
|
211
|
-
async function ae(e) {
|
|
212
|
-
const { deviceId: i, type: o, state: t } = e;
|
|
213
|
-
o === B.kMediaDeviceTypeVideoCamera && t === j.kMediaDeviceStateAdd && n.value.filter((r) => {
|
|
214
|
-
var s;
|
|
215
|
-
return ((s = r.camera) == null ? void 0 : s.cameraId) === i;
|
|
216
|
-
}).forEach(async (r) => {
|
|
217
|
-
await l.updateMediaSource(r);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
async function E() {
|
|
221
|
-
var i, o;
|
|
222
|
-
if (!M.instance) return;
|
|
223
|
-
((i = M.instance) == null ? void 0 : i.getMediaDeviceManager()).on(O.onDeviceChanged, ae), l = (o = M.instance) == null ? void 0 : o.getTRTCCloud().getMediaMixingManager(), l.updatePublishParams(T.value), l.on(f.onSourceSelected, (t) => {
|
|
224
|
-
k(t);
|
|
225
|
-
}), l.on(f.onSourceDisconnected, (t) => {
|
|
226
|
-
t && t.id && (n.value = n.value.filter((d) => d.id !== t.id));
|
|
227
|
-
}), l.on(f.onSourceMoved, (t, d) => {
|
|
228
|
-
const r = n.value.find((s) => s.id === t.id && s.type === t.type) || null;
|
|
229
|
-
r && (r.layout.rect = d);
|
|
230
|
-
}), l.on(f.onSourceResized, (t, d) => {
|
|
231
|
-
const r = n.value.find((s) => s.id === t.id && s.type === t.type) || null;
|
|
232
|
-
r && (r.layout.rect = d);
|
|
233
|
-
}), l.on(f.onRightButtonClicked, (t) => {
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
L.once("ready", async () => {
|
|
237
|
-
S.value && await E();
|
|
238
|
-
});
|
|
239
|
-
let D = !1;
|
|
240
|
-
function ne() {
|
|
241
|
-
D || (L.once("ready", async () => {
|
|
242
|
-
await I();
|
|
243
|
-
}), D = !0);
|
|
244
|
-
}
|
|
245
|
-
function pe() {
|
|
246
|
-
return ne(), {
|
|
247
|
-
isVideoMixerEnabled: S,
|
|
248
|
-
publishVideoQuality: y,
|
|
249
|
-
mediaSourceList: n,
|
|
250
|
-
activeMediaSource: _,
|
|
251
|
-
enableLocalVideoMixer: te,
|
|
252
|
-
addMediaSource: Y,
|
|
253
|
-
updateMediaSource: ee,
|
|
254
|
-
removeMediaSource: ie,
|
|
255
|
-
clearMediaSource: oe
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
export {
|
|
259
|
-
pe as useVideoMixerState
|
|
260
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="cs('face-message')">
|
|
3
|
-
<img
|
|
4
|
-
:src="messageContent.url"
|
|
5
|
-
:alt="messageContent.name"
|
|
6
|
-
>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import cs from 'classnames';
|
|
12
|
-
import type { IMessageModel } from '@tencentcloud/chat-uikit-engine';
|
|
13
|
-
|
|
14
|
-
interface IFaceMessageProps {
|
|
15
|
-
message: IMessageModel;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface IFaceMessageContent {
|
|
19
|
-
/** sender show name */
|
|
20
|
-
showName: string;
|
|
21
|
-
/** face image name [yz00@2x] */
|
|
22
|
-
name: string;
|
|
23
|
-
/** face image type[duplicate] */
|
|
24
|
-
type: string;
|
|
25
|
-
/** face image url */
|
|
26
|
-
url: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const props = withDefaults(defineProps<IFaceMessageProps>(), {
|
|
30
|
-
message: () => ({} as IMessageModel),
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const messageContent = props.message.getMessageContent() as IFaceMessageContent;
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style lang="scss" scoped>
|
|
37
|
-
.face-message {
|
|
38
|
-
// Face message styles will be implemented here
|
|
39
|
-
width: 150px;
|
|
40
|
-
height: 150px;
|
|
41
|
-
padding: 10px;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { defineProps } from 'vue';
|
|
3
|
-
import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
|
|
4
|
-
import cs from 'classnames';
|
|
5
|
-
import type { IMessageModel as MessageModel } from '@tencentcloud/chat-uikit-engine';
|
|
6
|
-
|
|
7
|
-
interface GroupTipMessageProps {
|
|
8
|
-
message: MessageModel;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface GroupTipMessageContent {
|
|
12
|
-
text: string;
|
|
13
|
-
businessID?: string;
|
|
14
|
-
showName?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface CustomMessageContent {
|
|
18
|
-
businessID?: string;
|
|
19
|
-
showName?: string;
|
|
20
|
-
custom?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
enum CustomMessageAsGroupTipEnum {
|
|
24
|
-
GROUP_CREATE = 'group_create',
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const props = defineProps<GroupTipMessageProps>();
|
|
28
|
-
|
|
29
|
-
const { t } = useUIKit();
|
|
30
|
-
|
|
31
|
-
const messageContent = props.message.getMessageContent() as GroupTipMessageContent & CustomMessageContent;
|
|
32
|
-
|
|
33
|
-
const renderText = () => {
|
|
34
|
-
switch (messageContent.businessID) {
|
|
35
|
-
case CustomMessageAsGroupTipEnum.GROUP_CREATE:
|
|
36
|
-
return `${messageContent.showName || ''} ${t('TUIChat.create group')}`;
|
|
37
|
-
default:
|
|
38
|
-
return messageContent.text;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<template>
|
|
44
|
-
<div :class="cs('group-tip-message')">
|
|
45
|
-
{{ renderText() }}
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<style lang="scss">
|
|
50
|
-
.group-tip-message {
|
|
51
|
-
color: var(--text-color-secondary);
|
|
52
|
-
text-align: center;
|
|
53
|
-
font-size: 12px;
|
|
54
|
-
}
|
|
55
|
-
</style>
|