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,78 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, ref as g, onMounted as y, watch as I, withDirectives as f, createCommentVNode as L, unref as t, createElementBlock as d, openBlock as p, createElementVNode as v, Fragment as S, renderList as M, toDisplayString as _, vShow as b } from "vue";
|
|
2
|
-
import { useUIKit as x } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
-
import N from "../../../directives/vClickOutside.js";
|
|
4
|
-
import { useLiveState as V } from "../../../states/LiveState/index.js";
|
|
5
|
-
import { usePlayerControlState as B, Resolution as n } from "./PlayerControlState.js";
|
|
6
|
-
import { _ as D } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const E = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "multi-resolution"
|
|
10
|
-
}, O = ["data-resolution"], z = /* @__PURE__ */ w({
|
|
11
|
-
__name: "MultiResolution",
|
|
12
|
-
setup(F) {
|
|
13
|
-
const { t: l } = x(), { currentLive: a } = V(), {
|
|
14
|
-
resolutionList: s,
|
|
15
|
-
currentResolution: r,
|
|
16
|
-
switchResolution: h,
|
|
17
|
-
initializeResolution: R
|
|
18
|
-
} = B(), u = {
|
|
19
|
-
[n.R360P]: "360P",
|
|
20
|
-
[n.R540P]: "540P",
|
|
21
|
-
[n.R720P]: "720P",
|
|
22
|
-
[n.R1080P]: "1080P"
|
|
23
|
-
}, i = g(!1), k = () => {
|
|
24
|
-
i.value = !1;
|
|
25
|
-
}, C = () => {
|
|
26
|
-
i.value = !i.value;
|
|
27
|
-
}, P = async (e) => {
|
|
28
|
-
var o;
|
|
29
|
-
e.stopPropagation();
|
|
30
|
-
const c = (o = e.target) == null ? void 0 : o.dataset.resolution;
|
|
31
|
-
if (c) {
|
|
32
|
-
const m = Number(c);
|
|
33
|
-
if (s.value.includes(m)) {
|
|
34
|
-
if (i.value = !1, m === r.value)
|
|
35
|
-
return;
|
|
36
|
-
await h(m);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return y(() => {
|
|
41
|
-
I(
|
|
42
|
-
() => {
|
|
43
|
-
var e;
|
|
44
|
-
return (e = a.value) == null ? void 0 : e.liveId;
|
|
45
|
-
},
|
|
46
|
-
async () => {
|
|
47
|
-
var e;
|
|
48
|
-
(e = a.value) != null && e.liveId && await R(a.value.liveId);
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
immediate: !0
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}), (e, c) => t(s).length > 0 ? f((p(), d("span", E, [
|
|
55
|
-
f(v("span", {
|
|
56
|
-
class: "multi-resolution-list",
|
|
57
|
-
onClick: P
|
|
58
|
-
}, [
|
|
59
|
-
(p(!0), d(S, null, M(t(s), (o) => (p(), d("span", {
|
|
60
|
-
key: o,
|
|
61
|
-
class: "multi-resolution-item",
|
|
62
|
-
"data-resolution": o
|
|
63
|
-
}, _(t(l)(u[o])), 9, O))), 128))
|
|
64
|
-
], 512), [
|
|
65
|
-
[b, i.value]
|
|
66
|
-
]),
|
|
67
|
-
v("span", {
|
|
68
|
-
class: "current-resolution",
|
|
69
|
-
onClick: C
|
|
70
|
-
}, _(t(r) ? t(l)(u[t(r)]) : t(s).length > 0 ? t(l)(u[t(s)[0]]) : ""), 1)
|
|
71
|
-
])), [
|
|
72
|
-
[t(N), k]
|
|
73
|
-
]) : L("", !0);
|
|
74
|
-
}
|
|
75
|
-
}), H = /* @__PURE__ */ D(z, [["__scopeId", "data-v-7fa16bb5"]]);
|
|
76
|
-
export {
|
|
77
|
-
H as default
|
|
78
|
-
};
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import $ from "./AudioControl.js";
|
|
2
|
-
import { defineComponent as ee, ref as a, onMounted as te, onBeforeUnmount as oe, createBlock as p, openBlock as C, Transition as ne, withCtx as se, withDirectives as le, createElementVNode as s, normalizeClass as re, unref as o, createVNode as m, vShow as ce } from "vue";
|
|
3
|
-
import { useUIKit as ae, IconPause as ue, IconPlay as ie, IconPictureInPicture as de, IconFullScreen as ve, TUIToast as me, TOAST_TYPE as fe } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
-
import { usePlayerControlState as he } from "./PlayerControlState.js";
|
|
5
|
-
import pe from "./MultiResolution.js";
|
|
6
|
-
import { isSafariBrowser as Ce, isFirefoxBrowser as _e } from "./utils/deviceDetection.js";
|
|
7
|
-
import { isMobile as c } from "../../../utils/env.js";
|
|
8
|
-
import { _ as Pe } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const ye = { class: "control-buttons" }, Ee = ["title"], Te = { class: "right-controls" }, Le = { class: "control-btn audio-control-btn" }, we = ["title"], Ie = ["title"], Me = 3e3, ge = /* @__PURE__ */ ee({
|
|
10
|
-
__name: "PlayerControl",
|
|
11
|
-
props: {
|
|
12
|
-
isLandscapeStyleMode: { type: Boolean }
|
|
13
|
-
},
|
|
14
|
-
setup(g) {
|
|
15
|
-
const {
|
|
16
|
-
isPlaying: f,
|
|
17
|
-
isFullscreen: _,
|
|
18
|
-
isPictureInPicture: P,
|
|
19
|
-
pause: b,
|
|
20
|
-
resume: S,
|
|
21
|
-
requestPictureInPicture: x,
|
|
22
|
-
exitPictureInPicture: A,
|
|
23
|
-
requestFullscreen: k,
|
|
24
|
-
exitFullscreen: F,
|
|
25
|
-
setVolume: h,
|
|
26
|
-
cleanup: V
|
|
27
|
-
} = he(), B = g, { t: l } = ae(), y = a(1), z = a(!1), n = a(), r = a(!1), u = a(null), D = () => c ? !(Ce() || _e()) : !0, R = () => {
|
|
28
|
-
f.value ? b() : S();
|
|
29
|
-
}, O = async () => {
|
|
30
|
-
let e = !1;
|
|
31
|
-
P.value ? e = await A() : e = await x(), e || me({
|
|
32
|
-
type: fe.ERROR,
|
|
33
|
-
message: l("The system does not support picture-in-picture mode")
|
|
34
|
-
});
|
|
35
|
-
}, N = () => {
|
|
36
|
-
console.log("handleFullscreen"), _.value ? F() : k();
|
|
37
|
-
}, U = async (e) => {
|
|
38
|
-
y.value = e, c && v(), await h(e);
|
|
39
|
-
}, v = () => {
|
|
40
|
-
i(), u.value = window.setTimeout(() => {
|
|
41
|
-
r.value = !1, u.value = null;
|
|
42
|
-
}, Me);
|
|
43
|
-
}, i = () => {
|
|
44
|
-
u.value && (clearTimeout(u.value), u.value = null);
|
|
45
|
-
}, E = () => {
|
|
46
|
-
i(), r.value = !0;
|
|
47
|
-
}, T = () => {
|
|
48
|
-
v();
|
|
49
|
-
}, X = () => {
|
|
50
|
-
if (!c && n.value) {
|
|
51
|
-
const { parentElement: e } = n.value;
|
|
52
|
-
e && (e.addEventListener("mouseover", E), e.addEventListener("mouseout", T));
|
|
53
|
-
}
|
|
54
|
-
}, Y = () => {
|
|
55
|
-
if (!c && n.value) {
|
|
56
|
-
const { parentElement: e } = n.value;
|
|
57
|
-
e && (e.removeEventListener("mouseover", E), e.removeEventListener("mouseout", T));
|
|
58
|
-
}
|
|
59
|
-
}, d = a(null), q = (e, t) => Math.sqrt(Math.pow(t.clientX - e.x, 2) + Math.pow(t.clientY - e.y, 2)), H = (e) => {
|
|
60
|
-
var t;
|
|
61
|
-
return ((t = n.value) == null ? void 0 : t.contains(e)) || !1;
|
|
62
|
-
}, K = (e) => {
|
|
63
|
-
const t = document.getElementById("live-core-view-container");
|
|
64
|
-
return (t == null ? void 0 : t.contains(e)) || !1;
|
|
65
|
-
}, j = () => {
|
|
66
|
-
i(), v();
|
|
67
|
-
}, G = () => {
|
|
68
|
-
r.value = !r.value, r.value && v();
|
|
69
|
-
}, L = (e) => {
|
|
70
|
-
if (e.touches.length === 1) {
|
|
71
|
-
const t = e.touches[0];
|
|
72
|
-
d.value = {
|
|
73
|
-
x: t.clientX,
|
|
74
|
-
y: t.clientY
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}, w = (e) => {
|
|
78
|
-
if (n.value && n.value.contains(e.target)) {
|
|
79
|
-
i();
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
}, I = (e) => {
|
|
83
|
-
if (!d.value)
|
|
84
|
-
return;
|
|
85
|
-
const t = e.changedTouches[0];
|
|
86
|
-
if (q(d.value, t) > 20) {
|
|
87
|
-
d.value = null;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const M = e.target;
|
|
91
|
-
H(M) ? j() : K(M) ? G() : r.value = !1, d.value = null;
|
|
92
|
-
}, J = () => {
|
|
93
|
-
c && (document.addEventListener("touchstart", L, !0), document.addEventListener("touchmove", w, !0), document.addEventListener("touchend", I, !0));
|
|
94
|
-
}, Q = () => {
|
|
95
|
-
c && (document.removeEventListener("touchstart", L, !0), document.removeEventListener("touchmove", w, !0), document.removeEventListener("touchend", I, !0));
|
|
96
|
-
}, W = async (e) => {
|
|
97
|
-
z.value = e, e ? await h(0) : await h(y.value);
|
|
98
|
-
}, Z = () => {
|
|
99
|
-
Q(), Y(), i();
|
|
100
|
-
};
|
|
101
|
-
return te(() => {
|
|
102
|
-
J(), X();
|
|
103
|
-
}), oe(() => {
|
|
104
|
-
Z(), V();
|
|
105
|
-
}), (e, t) => (C(), p(ne, { name: "player-control" }, {
|
|
106
|
-
default: se(() => [
|
|
107
|
-
le(s("div", {
|
|
108
|
-
ref_key: "playerControlRef",
|
|
109
|
-
ref: n,
|
|
110
|
-
class: re([
|
|
111
|
-
"playback-controls",
|
|
112
|
-
o(c) ? "mobile-mode" : "pc-mode",
|
|
113
|
-
{ "mobile-landscape-mode": B.isLandscapeStyleMode }
|
|
114
|
-
])
|
|
115
|
-
}, [
|
|
116
|
-
s("div", ye, [
|
|
117
|
-
s("span", {
|
|
118
|
-
class: "control-btn play-pause-btn",
|
|
119
|
-
title: o(f) ? o(l)("Pause") : o(l)("Play"),
|
|
120
|
-
onClick: R
|
|
121
|
-
}, [
|
|
122
|
-
o(f) ? (C(), p(o(ue), {
|
|
123
|
-
key: 0,
|
|
124
|
-
size: "20"
|
|
125
|
-
})) : (C(), p(o(ie), {
|
|
126
|
-
key: 1,
|
|
127
|
-
size: "20"
|
|
128
|
-
}))
|
|
129
|
-
], 8, Ee),
|
|
130
|
-
t[0] || (t[0] = s("div", { class: "center-controls" }, null, -1)),
|
|
131
|
-
s("div", Te, [
|
|
132
|
-
m(pe),
|
|
133
|
-
s("span", Le, [
|
|
134
|
-
m($, {
|
|
135
|
-
class: "audio-control-icon",
|
|
136
|
-
"icon-size": 20,
|
|
137
|
-
"enable-volume-control": D(),
|
|
138
|
-
onVolumeChange: U,
|
|
139
|
-
onMutedChange: W
|
|
140
|
-
}, null, 8, ["enable-volume-control"])
|
|
141
|
-
]),
|
|
142
|
-
s("span", {
|
|
143
|
-
class: "control-btn",
|
|
144
|
-
title: o(P) ? o(l)("Exit Picture in Picture") : o(l)("Picture in Picture"),
|
|
145
|
-
onClick: O
|
|
146
|
-
}, [
|
|
147
|
-
m(o(de), { size: "20" })
|
|
148
|
-
], 8, we),
|
|
149
|
-
s("span", {
|
|
150
|
-
class: "control-btn fullscreen-btn",
|
|
151
|
-
title: o(_) ? o(l)("Exit Fullscreen") : o(l)("Fullscreen"),
|
|
152
|
-
onClick: N
|
|
153
|
-
}, [
|
|
154
|
-
m(o(ve), { size: "20" })
|
|
155
|
-
], 8, Ie)
|
|
156
|
-
])
|
|
157
|
-
])
|
|
158
|
-
], 2), [
|
|
159
|
-
[ce, r.value]
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
|
-
}), Re = /* @__PURE__ */ Pe(ge, [["__scopeId", "data-v-307287f1"]]);
|
|
166
|
-
export {
|
|
167
|
-
Re as default
|
|
168
|
-
};
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { ref as m, computed as _, watch as ae } from "vue";
|
|
2
|
-
import { TUIVideoQuality as E, TRTCCloud as V } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
-
import { useRoomEngine as le } from "../../../hooks/useRoomEngine.js";
|
|
4
|
-
import { useLiveState as oe } from "../../../states/LiveState/index.js";
|
|
5
|
-
import { useLiveSeatState as se } from "../../../states/LiveSeatState/index.js";
|
|
6
|
-
import { getDeviceType as re, getCurrentOrientation as R, shouldRotateToLandscapeForFullscreen as ie, hadLandscapeRotationToUndo as ce } from "./utils/deviceDetection.js";
|
|
7
|
-
import { OrientationManager as F, StyleManager as I, FullscreenMode as k, FullscreenManager as D } from "./utils/fullscreenManager.js";
|
|
8
|
-
import { EventListenerManager as ue, DOMElementGetter as i } from "./utils/domHelpers.js";
|
|
9
|
-
import { LiveStatus as de } from "../../../types/live.js";
|
|
10
|
-
var pe = /* @__PURE__ */ ((s) => (s.CONTAIN = "contain", s.COVER = "cover", s.FILL = "fill", s))(pe || {}), ve = ((s) => (s[s.R360P = E.kVideoQuality_360p] = "R360P", s[s.R540P = E.kVideoQuality_540p] = "R540P", s[s.R720P = E.kVideoQuality_720p] = "R720P", s[s.R1080P = E.kVideoQuality_1080p] = "R1080P", s))(ve || {});
|
|
11
|
-
const r = m(!0), N = m(
|
|
12
|
-
"contain"
|
|
13
|
-
/* CONTAIN */
|
|
14
|
-
), d = m(!1), L = m(!1), P = m(!1), g = m(1), z = m([]), v = m(), me = "[LiveCoreView]ResolutionInitialized", h = le();
|
|
15
|
-
function Ve() {
|
|
16
|
-
const { localLiveStatus: s } = oe(), { canvas: f } = se(), o = new ue(), x = `player-control-${Date.now()}`, p = _(
|
|
17
|
-
() => f.value ? f.value.width > f.value.height : !1
|
|
18
|
-
), S = _(
|
|
19
|
-
() => f.value ? f.value.width < f.value.height : !1
|
|
20
|
-
), c = re(), u = async (e, n, a) => {
|
|
21
|
-
try {
|
|
22
|
-
return await e();
|
|
23
|
-
} catch (t) {
|
|
24
|
-
return console.error(`${n} operation failed:`, t), a;
|
|
25
|
-
}
|
|
26
|
-
}, b = () => {
|
|
27
|
-
const e = i.getVideoElement();
|
|
28
|
-
if (e) {
|
|
29
|
-
const n = e.volume;
|
|
30
|
-
Math.abs(g.value - n) > 0.01 && (console.log(`Syncing volume state: ${g.value} -> ${n}`), g.value = n);
|
|
31
|
-
}
|
|
32
|
-
}, y = () => {
|
|
33
|
-
const e = i.getVideoElement();
|
|
34
|
-
if (e) {
|
|
35
|
-
const n = !e.paused && !e.ended;
|
|
36
|
-
r.value !== n && (console.log(`Syncing playing state: ${r.value} -> ${n}`), r.value = n);
|
|
37
|
-
}
|
|
38
|
-
}, M = async () => u(async () => {
|
|
39
|
-
const e = i.getVideoElement();
|
|
40
|
-
if (!e)
|
|
41
|
-
throw new Error("Video element not found");
|
|
42
|
-
return i.hasTcPlayerElement() ? await e.play() : V.subCloudMap.forEach((a) => {
|
|
43
|
-
const t = a == null ? void 0 : a._trtc;
|
|
44
|
-
t == null || t.callExperimentalAPI("resumeRemotePlayer", { userId: "*" });
|
|
45
|
-
}), r.value = !0, console.log("Video playback resumed"), !0;
|
|
46
|
-
}, "Resume playback", !1), Q = async () => u(async () => {
|
|
47
|
-
const e = i.getVideoElement();
|
|
48
|
-
if (!e)
|
|
49
|
-
throw new Error("Video element not found");
|
|
50
|
-
return i.hasTcPlayerElement() ? await e.pause() : V.subCloudMap.forEach((a) => {
|
|
51
|
-
const t = a == null ? void 0 : a._trtc;
|
|
52
|
-
t == null || t.callExperimentalAPI("pauseRemotePlayer", { userId: "*" });
|
|
53
|
-
}), r.value = !1, console.log("Video playback paused"), !0;
|
|
54
|
-
}, "Pause playback", !1), U = (e) => {
|
|
55
|
-
if (!d.value || !p.value)
|
|
56
|
-
return;
|
|
57
|
-
const n = i.getAllElements();
|
|
58
|
-
if (!n.view) {
|
|
59
|
-
console.warn("live-core-view element not found for orientation change handling");
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
console.log("Handling orientation change:", {
|
|
63
|
-
newOrientation: e,
|
|
64
|
-
deviceType: c,
|
|
65
|
-
isLandscapeStream: p.value,
|
|
66
|
-
isFullscreen: d.value
|
|
67
|
-
}), I.smartApplyLandscapeStyles(n.view, e);
|
|
68
|
-
}, G = async () => u(async () => {
|
|
69
|
-
const e = i.getAllElements(), n = i.validateElements(e);
|
|
70
|
-
if (!n.isValid)
|
|
71
|
-
throw new Error(`Missing required DOM elements: ${n.missingElements.join(", ")}`);
|
|
72
|
-
const a = R(), t = ie(c, p.value);
|
|
73
|
-
console.log("Request fullscreen:", {
|
|
74
|
-
deviceType: c,
|
|
75
|
-
currentOrientation: a,
|
|
76
|
-
streamType: p.value ? "landscape stream" : S.value ? "portrait stream" : "unknown",
|
|
77
|
-
shouldRotate: t,
|
|
78
|
-
reason: t ? "Mobile device in portrait with landscape stream" : a === "landscape" ? "Already in landscape orientation" : p.value ? "Desktop device or other reason" : "Not a landscape stream"
|
|
79
|
-
});
|
|
80
|
-
const l = await D.requestFullscreen(
|
|
81
|
-
e.container,
|
|
82
|
-
e.view,
|
|
83
|
-
c,
|
|
84
|
-
S.value,
|
|
85
|
-
t
|
|
86
|
-
);
|
|
87
|
-
return l.success ? (d.value = !0, console.log(`Fullscreen request successful (${l.mode})`)) : console.error("Fullscreen request failed:", l.error), L.value = l.shouldRotateToLandscape, l;
|
|
88
|
-
}, "Request fullscreen", { success: !1, mode: k.CSS_SIMULATED, shouldRotateToLandscape: !1 }), T = async () => u(async () => {
|
|
89
|
-
const e = i.getAllElements();
|
|
90
|
-
if (!e.view)
|
|
91
|
-
throw new Error("live-core-view element not found");
|
|
92
|
-
const n = R(), a = ce(c, p.value);
|
|
93
|
-
console.log("Exit fullscreen:", {
|
|
94
|
-
deviceType: c,
|
|
95
|
-
currentOrientation: n,
|
|
96
|
-
streamType: p.value ? "landscape stream" : S.value ? "portrait stream" : "unknown",
|
|
97
|
-
hadLandscapeRotation: a,
|
|
98
|
-
reason: a ? "Mobile device with landscape stream in landscape mode" : n === "portrait" ? "Already in portrait orientation" : p.value ? "Desktop device or other reason" : "Not a landscape stream"
|
|
99
|
-
});
|
|
100
|
-
const t = await D.exitFullscreen(
|
|
101
|
-
e.view,
|
|
102
|
-
c,
|
|
103
|
-
a
|
|
104
|
-
);
|
|
105
|
-
return t.mode === k.CSS_SIMULATED && (d.value = !1), t.success ? console.log(`Fullscreen exit successful (${t.mode})`) : console.error("Fullscreen exit failed:", t.error), L.value = !1, t;
|
|
106
|
-
}, "Exit fullscreen", { success: !1, mode: k.CSS_SIMULATED, shouldRotateToLandscape: !1 }), H = async () => u(async () => {
|
|
107
|
-
const e = i.getVideoElement();
|
|
108
|
-
if (!e)
|
|
109
|
-
throw new Error("Video element not found");
|
|
110
|
-
if (!e.requestPictureInPicture)
|
|
111
|
-
throw new Error("Picture-in-picture not supported in current environment");
|
|
112
|
-
return C(), await e.requestPictureInPicture(), console.log("Picture-in-picture request successful"), !0;
|
|
113
|
-
}, "Request picture-in-picture", !1), A = async () => u(async () => {
|
|
114
|
-
if (!document.exitPictureInPicture)
|
|
115
|
-
throw new Error("Exit picture-in-picture not supported in current environment");
|
|
116
|
-
return await document.exitPictureInPicture(), console.log("Picture-in-picture exit successful"), !0;
|
|
117
|
-
}, "Exit picture-in-picture", !1), $ = async (e) => u(async () => {
|
|
118
|
-
if (!h.instance)
|
|
119
|
-
throw new Error("Room engine instance not available");
|
|
120
|
-
return await h.instance.callExperimentalAPI(
|
|
121
|
-
JSON.stringify({
|
|
122
|
-
api: "switchPlaybackQuality",
|
|
123
|
-
params: {
|
|
124
|
-
quality: e,
|
|
125
|
-
autoSwitch: !1
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
), r.value || (r.value = !0), v.value = e, console.log(`Resolution switched to: ${e}`), !0;
|
|
129
|
-
}, "Switch resolution", !1), O = async (e) => u(async () => {
|
|
130
|
-
if (!h.instance)
|
|
131
|
-
throw new Error("Room engine instance not available");
|
|
132
|
-
const n = await h.instance.callExperimentalAPI(
|
|
133
|
-
JSON.stringify({
|
|
134
|
-
api: "queryPlaybackQualityList",
|
|
135
|
-
params: {
|
|
136
|
-
roomId: e
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
);
|
|
140
|
-
return console.log(`Retrieved resolution list for room ${e}:`, n), n || [];
|
|
141
|
-
}, "Get resolution list", []), J = async (e, n = !0) => {
|
|
142
|
-
try {
|
|
143
|
-
const a = `${me}_${e}`, t = localStorage.getItem(a) === "true", l = await O(e);
|
|
144
|
-
if (z.value = l, l.length === 0) {
|
|
145
|
-
console.warn("No resolutions available for room:", e);
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
(!v.value || !l.includes(v.value)) && (v.value = l[0]);
|
|
149
|
-
const w = n && !t && v.value !== void 0;
|
|
150
|
-
w && (await $(v.value), localStorage.setItem(a, "true")), console.log(`Resolution initialized for room ${e}:`, {
|
|
151
|
-
availableResolutions: l,
|
|
152
|
-
currentResolution: v.value,
|
|
153
|
-
applied: w,
|
|
154
|
-
hasInitialized: t
|
|
155
|
-
});
|
|
156
|
-
} catch (a) {
|
|
157
|
-
console.error("Failed to initialize resolution:", a);
|
|
158
|
-
}
|
|
159
|
-
}, j = async (e) => u(async () => {
|
|
160
|
-
var a;
|
|
161
|
-
if (e < 0 || e > 1)
|
|
162
|
-
throw new Error("Volume value must be between 0-1");
|
|
163
|
-
const n = V.subCloudMap;
|
|
164
|
-
return e === 0 ? n.forEach((t) => {
|
|
165
|
-
const l = t == null ? void 0 : t._trtc;
|
|
166
|
-
l == null || l.muteRemoteAudio("*", !0);
|
|
167
|
-
}) : n.forEach((t) => {
|
|
168
|
-
const l = t == null ? void 0 : t._trtc;
|
|
169
|
-
l == null || l.muteRemoteAudio("*", !1);
|
|
170
|
-
}), (a = h.instance) == null || a.setAudioPlayoutVolume({ volume: e * 100 }), g.value = e, console.log(`Video volume set to: ${e}`), !0;
|
|
171
|
-
}, "Set volume", !1), K = async (e) => u(async () => (N.value = e, console.log(`Fill mode changed to: ${e}`), !0), "Change fill mode", !1), q = () => {
|
|
172
|
-
try {
|
|
173
|
-
const e = i.getAllElements();
|
|
174
|
-
if (!e.view) {
|
|
175
|
-
console.warn("live-core-view element not found for fullscreen exit cleanup");
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
console.log("Executing fullscreen exit style cleanup:", {
|
|
179
|
-
deviceType: c,
|
|
180
|
-
hasLandscapeStream: p.value,
|
|
181
|
-
currentOrientation: R()
|
|
182
|
-
}), I.removeFullscreenStyles(e.view), I.removeLandscapeStyles(e.view), c !== "desktop" && F.unlockOrientation().catch((n) => {
|
|
183
|
-
console.warn("Failed to unlock orientation during cleanup:", n);
|
|
184
|
-
}), L.value = !1, console.log("Fullscreen exit style cleanup completed");
|
|
185
|
-
} catch (e) {
|
|
186
|
-
console.error("Fullscreen exit style cleanup failed:", e);
|
|
187
|
-
}
|
|
188
|
-
}, X = () => {
|
|
189
|
-
const e = () => {
|
|
190
|
-
const a = !!document.fullscreenElement, t = d.value;
|
|
191
|
-
console.log("Fullscreen state change:", {
|
|
192
|
-
fullscreenElement: document.fullscreenElement,
|
|
193
|
-
isCurrentlyFullscreen: a,
|
|
194
|
-
previousValue: t,
|
|
195
|
-
deviceType: c,
|
|
196
|
-
changeType: a ? "entered" : "exited"
|
|
197
|
-
}), d.value = a, t && !a && (console.log("Detected passive fullscreen exit, executing style cleanup"), q());
|
|
198
|
-
};
|
|
199
|
-
o.addListener("fullscreenchange", document, "fullscreenchange", e), o.addListener("webkitfullscreenchange", document, "webkitfullscreenchange", e), o.addListener("mozfullscreenchange", document, "mozfullscreenchange", e), o.addListener("MSFullscreenChange", document, "MSFullscreenChange", e);
|
|
200
|
-
const n = () => {
|
|
201
|
-
document.visibilityState === "visible" && d.value && (document.fullscreenElement || (console.log("Detected fullscreen state inconsistency via visibilitychange, executing cleanup"), d.value = !1, q()));
|
|
202
|
-
};
|
|
203
|
-
o.addListener("visibilitychange", document, "visibilitychange", n);
|
|
204
|
-
}, C = () => {
|
|
205
|
-
const e = i.getVideoElement();
|
|
206
|
-
if (!e) return;
|
|
207
|
-
const n = () => {
|
|
208
|
-
console.log("Entered picture-in-picture mode"), P.value = !0;
|
|
209
|
-
}, a = () => {
|
|
210
|
-
console.log("Left picture-in-picture mode"), P.value = !1, setTimeout(M, 300);
|
|
211
|
-
}, t = () => {
|
|
212
|
-
console.log("Video play event detected"), r.value = !0;
|
|
213
|
-
}, l = () => {
|
|
214
|
-
console.log("Video pause event detected"), r.value = !1;
|
|
215
|
-
}, w = () => {
|
|
216
|
-
console.log("Video ended event detected"), r.value = !1;
|
|
217
|
-
}, B = () => {
|
|
218
|
-
console.log("Video load start event detected"), r.value = !e.paused;
|
|
219
|
-
}, W = () => {
|
|
220
|
-
console.log("Video can play event detected"), r.value = !e.paused;
|
|
221
|
-
}, Y = () => {
|
|
222
|
-
console.log("Video seeking event detected"), y();
|
|
223
|
-
}, ee = () => {
|
|
224
|
-
console.log("Video seeked event detected"), y();
|
|
225
|
-
}, te = () => {
|
|
226
|
-
Math.random() < 0.1 && y();
|
|
227
|
-
}, ne = () => {
|
|
228
|
-
console.log("Video volume change event detected"), y(), b();
|
|
229
|
-
};
|
|
230
|
-
o.addListener("enterpictureinpicture", e, "enterpictureinpicture", n), o.addListener("leavepictureinpicture", e, "leavepictureinpicture", a), o.addListener("play", e, "play", t), o.addListener("pause", e, "pause", l), o.addListener("ended", e, "ended", w), o.addListener("loadstart", e, "loadstart", B), o.addListener("canplay", e, "canplay", W), o.addListener("seeking", e, "seeking", Y), o.addListener("seeked", e, "seeked", ee), o.addListener("timeupdate", e, "timeupdate", te), o.addListener("volumechange", e, "volumechange", ne);
|
|
231
|
-
}, Z = () => {
|
|
232
|
-
console.log("Cleaning up player control state..."), F.removeOrientationListener(x), o.removeAllListeners(), console.log(`Cleaned up ${o.getListenerCount()} event listeners`);
|
|
233
|
-
};
|
|
234
|
-
return X(), C(), F.addOrientationListener(x, U), y(), b(), ae(s, (e) => {
|
|
235
|
-
e === de.Ended && (T(), A(), r.value = !0, d.value = !1, P.value = !1, g.value = 1);
|
|
236
|
-
}), {
|
|
237
|
-
// State
|
|
238
|
-
isPlaying: r,
|
|
239
|
-
currentFillMode: N,
|
|
240
|
-
isFullscreen: d,
|
|
241
|
-
isLandscapeStyleMode: L,
|
|
242
|
-
isPictureInPicture: P,
|
|
243
|
-
currentVolume: g,
|
|
244
|
-
// Resolution state
|
|
245
|
-
resolutionList: z,
|
|
246
|
-
currentResolution: v,
|
|
247
|
-
// Methods
|
|
248
|
-
resume: M,
|
|
249
|
-
pause: Q,
|
|
250
|
-
requestFullscreen: G,
|
|
251
|
-
exitFullscreen: T,
|
|
252
|
-
requestPictureInPicture: H,
|
|
253
|
-
exitPictureInPicture: A,
|
|
254
|
-
switchResolution: $,
|
|
255
|
-
getResolutionList: O,
|
|
256
|
-
initializeResolution: J,
|
|
257
|
-
setVolume: j,
|
|
258
|
-
changeFillMode: K,
|
|
259
|
-
// Cleanup
|
|
260
|
-
cleanup: Z
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
export {
|
|
264
|
-
pe as FillMode,
|
|
265
|
-
ve as Resolution,
|
|
266
|
-
Ve as usePlayerControlState
|
|
267
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
var E = Object.defineProperty;
|
|
2
|
-
var c = (i, e, t) => e in i ? E(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
-
var l = (i, e, t) => c(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
const n = {
|
|
5
|
-
LIVE_CORE_VIEW_CONTAINER: ".live-core-view-container",
|
|
6
|
-
LIVE_CORE_VIEW: ".live-core-view",
|
|
7
|
-
VIDEO_ELEMENT: "#atomicx-live-stream-content video",
|
|
8
|
-
TCPLAYER_ELEMENT: ".tcplayer"
|
|
9
|
-
};
|
|
10
|
-
class r {
|
|
11
|
-
/**
|
|
12
|
-
* Get live-core-view-container element
|
|
13
|
-
*/
|
|
14
|
-
static getLiveCoreViewContainer() {
|
|
15
|
-
return document.querySelector(n.LIVE_CORE_VIEW_CONTAINER);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Get live-core-view element
|
|
19
|
-
*/
|
|
20
|
-
static getLiveCoreView() {
|
|
21
|
-
return document.querySelector(n.LIVE_CORE_VIEW);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get video element
|
|
25
|
-
*/
|
|
26
|
-
static getVideoElement() {
|
|
27
|
-
return document.querySelector(n.VIDEO_ELEMENT);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get all required DOM elements
|
|
31
|
-
*/
|
|
32
|
-
static getAllElements() {
|
|
33
|
-
return {
|
|
34
|
-
container: r.getLiveCoreViewContainer(),
|
|
35
|
-
view: r.getLiveCoreView(),
|
|
36
|
-
video: r.getVideoElement()
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Check if tcplayer element exists in live-core-view-container
|
|
41
|
-
*/
|
|
42
|
-
static hasTcPlayerElement() {
|
|
43
|
-
const e = r.getLiveCoreViewContainer();
|
|
44
|
-
return e ? e.querySelector(n.TCPLAYER_ELEMENT) !== null : !1;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get tcplayer element from live-core-view-container
|
|
48
|
-
*/
|
|
49
|
-
static getTcPlayerElement() {
|
|
50
|
-
const e = r.getLiveCoreViewContainer();
|
|
51
|
-
return e ? e.querySelector(n.TCPLAYER_ELEMENT) : null;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Validate if elements exist
|
|
55
|
-
*/
|
|
56
|
-
static validateElements(e) {
|
|
57
|
-
const t = [];
|
|
58
|
-
return e.container === null && t.push("live-core-view-container"), e.view === null && t.push("live-core-view"), e.video === null && t.push("video"), {
|
|
59
|
-
isValid: t.length === 0,
|
|
60
|
-
missingElements: t
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
class v {
|
|
65
|
-
constructor() {
|
|
66
|
-
l(this, "listeners", /* @__PURE__ */ new Map());
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Add event listener
|
|
70
|
-
*/
|
|
71
|
-
addListener(e, t, s, o) {
|
|
72
|
-
this.removeListener(e), t.addEventListener(s, o), this.listeners.set(e, { element: t, event: s, handler: o });
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Remove specified event listener
|
|
76
|
-
*/
|
|
77
|
-
removeListener(e) {
|
|
78
|
-
const t = this.listeners.get(e);
|
|
79
|
-
t && (t.element.removeEventListener(t.event, t.handler), this.listeners.delete(e));
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Remove all event listeners
|
|
83
|
-
*/
|
|
84
|
-
removeAllListeners() {
|
|
85
|
-
for (const [e] of this.listeners)
|
|
86
|
-
this.removeListener(e);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Get current listener count
|
|
90
|
-
*/
|
|
91
|
-
getListenerCount() {
|
|
92
|
-
return this.listeners.size;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
r as DOMElementGetter,
|
|
97
|
-
n as DOM_SELECTORS,
|
|
98
|
-
v as EventListenerManager
|
|
99
|
-
};
|