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
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import $ from "./AudioControl.js";
|
|
2
|
+
import { defineComponent as ee, ref as v, 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 ce, unref as o, createVNode as m, vShow as ue } from "vue";
|
|
3
|
+
import { useUIKit as re, IconPause as ae, IconPlay as ie, IconPictureInPicture as de, IconFullScreen as ve, TUIToast as me, TOAST_TYPE as he } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
+
import fe from "./MultiResolution.js";
|
|
5
|
+
import { usePlayerControlState as pe } from "./PlayerControlState.js";
|
|
6
|
+
import { isMobile as u } from "../../../utils/env.js";
|
|
7
|
+
import { _ as Ce } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const _e = { class: "control-buttons" }, Pe = ["title"], ye = { class: "right-controls" }, Ee = { class: "control-btn audio-control-btn" }, Te = ["title"], Le = ["title"], Ie = 3e3, ge = /* @__PURE__ */ ee({
|
|
9
|
+
__name: "PlayerControl",
|
|
10
|
+
props: {
|
|
11
|
+
isLandscapeStyleMode: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(w) {
|
|
14
|
+
const {
|
|
15
|
+
isMuted: _,
|
|
16
|
+
isPlaying: h,
|
|
17
|
+
isFullscreen: P,
|
|
18
|
+
isPictureInPicture: f,
|
|
19
|
+
currentVolume: S,
|
|
20
|
+
pause: b,
|
|
21
|
+
resume: x,
|
|
22
|
+
requestPictureInPicture: A,
|
|
23
|
+
exitPictureInPicture: y,
|
|
24
|
+
requestFullscreen: k,
|
|
25
|
+
exitFullscreen: F,
|
|
26
|
+
setVolume: V,
|
|
27
|
+
setMute: z,
|
|
28
|
+
cleanup: D
|
|
29
|
+
} = pe(), R = w, { t: l } = re(), n = v(), c = v(!1), r = v(null), B = () => {
|
|
30
|
+
h.value ? b() : x();
|
|
31
|
+
}, O = async () => {
|
|
32
|
+
let e = !1;
|
|
33
|
+
f.value ? e = await y() : e = await A(), e || me({
|
|
34
|
+
type: he.ERROR,
|
|
35
|
+
message: l("The system does not support picture-in-picture mode")
|
|
36
|
+
});
|
|
37
|
+
}, N = () => {
|
|
38
|
+
console.log("handleFullscreen"), P.value ? F() : k();
|
|
39
|
+
}, U = async (e) => {
|
|
40
|
+
u && d(), await V(e);
|
|
41
|
+
}, X = async () => {
|
|
42
|
+
await z(!_.value);
|
|
43
|
+
}, d = () => {
|
|
44
|
+
a(), r.value = window.setTimeout(() => {
|
|
45
|
+
c.value = !1, r.value = null;
|
|
46
|
+
}, Ie);
|
|
47
|
+
}, a = () => {
|
|
48
|
+
r.value && (clearTimeout(r.value), r.value = null);
|
|
49
|
+
}, E = () => {
|
|
50
|
+
a(), c.value = !0;
|
|
51
|
+
}, T = () => {
|
|
52
|
+
d();
|
|
53
|
+
}, Y = () => {
|
|
54
|
+
if (!u && n.value) {
|
|
55
|
+
const { parentElement: e } = n.value;
|
|
56
|
+
e && (e.addEventListener("mouseover", E), e.addEventListener("mouseout", T));
|
|
57
|
+
}
|
|
58
|
+
}, q = () => {
|
|
59
|
+
if (!u && n.value) {
|
|
60
|
+
const { parentElement: e } = n.value;
|
|
61
|
+
e && (e.removeEventListener("mouseover", E), e.removeEventListener("mouseout", T));
|
|
62
|
+
}
|
|
63
|
+
}, i = v(null), H = (e, t) => Math.sqrt((t.clientX - e.x) ** 2 + (t.clientY - e.y) ** 2), K = (e) => {
|
|
64
|
+
var t;
|
|
65
|
+
return ((t = n.value) == null ? void 0 : t.contains(e)) || !1;
|
|
66
|
+
}, j = (e) => {
|
|
67
|
+
const t = document.getElementById("live-core-view-container");
|
|
68
|
+
return (t == null ? void 0 : t.contains(e)) || !1;
|
|
69
|
+
}, G = () => {
|
|
70
|
+
a(), d();
|
|
71
|
+
}, J = () => {
|
|
72
|
+
c.value = !c.value, c.value && d();
|
|
73
|
+
}, L = (e) => {
|
|
74
|
+
if (e.touches.length === 1) {
|
|
75
|
+
const t = e.touches[0];
|
|
76
|
+
i.value = {
|
|
77
|
+
x: t.clientX,
|
|
78
|
+
y: t.clientY
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}, I = (e) => {
|
|
82
|
+
n.value && n.value.contains(e.target) && a();
|
|
83
|
+
}, g = (e) => {
|
|
84
|
+
if (!i.value)
|
|
85
|
+
return;
|
|
86
|
+
const t = e.changedTouches[0];
|
|
87
|
+
if (H(i.value, t) > 20) {
|
|
88
|
+
i.value = null;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const M = e.target;
|
|
92
|
+
K(M) ? G() : j(M) ? J() : c.value = !1, i.value = null;
|
|
93
|
+
}, Q = () => {
|
|
94
|
+
u && (document.addEventListener("touchstart", L, !0), document.addEventListener("touchmove", I, !0), document.addEventListener("touchend", g, !0));
|
|
95
|
+
}, W = () => {
|
|
96
|
+
u && (document.removeEventListener("touchstart", L, !0), document.removeEventListener("touchmove", I, !0), document.removeEventListener("touchend", g, !0));
|
|
97
|
+
}, Z = () => {
|
|
98
|
+
W(), q(), a();
|
|
99
|
+
};
|
|
100
|
+
return te(() => {
|
|
101
|
+
Q(), Y();
|
|
102
|
+
}), oe(() => {
|
|
103
|
+
f.value && y(), Z(), D();
|
|
104
|
+
}), (e, t) => (C(), p(ne, { name: "player-control" }, {
|
|
105
|
+
default: se(() => [
|
|
106
|
+
le(s("div", {
|
|
107
|
+
ref_key: "playerControlRef",
|
|
108
|
+
ref: n,
|
|
109
|
+
class: ce([
|
|
110
|
+
"playback-controls",
|
|
111
|
+
o(u) ? "mobile-mode" : "pc-mode",
|
|
112
|
+
{ "mobile-landscape-mode": R.isLandscapeStyleMode }
|
|
113
|
+
])
|
|
114
|
+
}, [
|
|
115
|
+
s("div", _e, [
|
|
116
|
+
s("span", {
|
|
117
|
+
class: "control-btn play-pause-btn",
|
|
118
|
+
title: o(h) ? o(l)("Pause") : o(l)("Play"),
|
|
119
|
+
onClick: B
|
|
120
|
+
}, [
|
|
121
|
+
o(h) ? (C(), p(o(ae), {
|
|
122
|
+
key: 0,
|
|
123
|
+
size: "20"
|
|
124
|
+
})) : (C(), p(o(ie), {
|
|
125
|
+
key: 1,
|
|
126
|
+
size: "20"
|
|
127
|
+
}))
|
|
128
|
+
], 8, Pe),
|
|
129
|
+
t[0] || (t[0] = s("div", { class: "center-controls" }, null, -1)),
|
|
130
|
+
s("div", ye, [
|
|
131
|
+
m(fe),
|
|
132
|
+
s("span", Ee, [
|
|
133
|
+
m($, {
|
|
134
|
+
class: "audio-control-icon",
|
|
135
|
+
"icon-size": 20,
|
|
136
|
+
volume: o(S),
|
|
137
|
+
"is-muted": o(_),
|
|
138
|
+
onVolumeChange: U,
|
|
139
|
+
onMuteChange: X
|
|
140
|
+
}, null, 8, ["volume", "is-muted"])
|
|
141
|
+
]),
|
|
142
|
+
s("span", {
|
|
143
|
+
class: "control-btn",
|
|
144
|
+
title: o(f) ? o(l)("Exit Picture in Picture") : o(l)("Picture in Picture"),
|
|
145
|
+
onClick: O
|
|
146
|
+
}, [
|
|
147
|
+
m(o(de), { size: "20" })
|
|
148
|
+
], 8, Te),
|
|
149
|
+
s("span", {
|
|
150
|
+
class: "control-btn fullscreen-btn",
|
|
151
|
+
title: o(P) ? o(l)("Exit Fullscreen") : o(l)("Fullscreen"),
|
|
152
|
+
onClick: N
|
|
153
|
+
}, [
|
|
154
|
+
m(o(ve), { size: "20" })
|
|
155
|
+
], 8, Le)
|
|
156
|
+
])
|
|
157
|
+
])
|
|
158
|
+
], 2), [
|
|
159
|
+
[ue, c.value]
|
|
160
|
+
])
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
}), ze = /* @__PURE__ */ Ce(ge, [["__scopeId", "data-v-f07ad1d4"]]);
|
|
166
|
+
export {
|
|
167
|
+
ze as default
|
|
168
|
+
};
|
|
@@ -19,6 +19,7 @@ export interface PlayerControlState {
|
|
|
19
19
|
isLandscapeStyleMode: Ref<boolean>;
|
|
20
20
|
isPictureInPicture: Ref<boolean>;
|
|
21
21
|
currentVolume: Ref<number>;
|
|
22
|
+
isMuted: Ref<boolean>;
|
|
22
23
|
resolutionList: Ref<Resolution[]>;
|
|
23
24
|
currentResolution: Ref<Resolution | undefined>;
|
|
24
25
|
resume: () => Promise<boolean>;
|
|
@@ -28,9 +29,8 @@ export interface PlayerControlState {
|
|
|
28
29
|
requestPictureInPicture: () => Promise<boolean>;
|
|
29
30
|
exitPictureInPicture: () => Promise<boolean>;
|
|
30
31
|
switchResolution: (resolution: Resolution) => Promise<boolean>;
|
|
31
|
-
getResolutionList: (roomId: string) => Promise<Resolution[]>;
|
|
32
|
-
initializeResolution: (roomId: string, applyResolution?: boolean) => Promise<void>;
|
|
33
32
|
setVolume: (volume: number) => Promise<boolean>;
|
|
33
|
+
setMute: (muted: boolean) => Promise<boolean>;
|
|
34
34
|
changeFillMode: (fillMode: FillMode) => Promise<boolean>;
|
|
35
35
|
cleanup: () => void;
|
|
36
36
|
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { ref as o, computed as N, watch as B } from "vue";
|
|
2
|
+
import { TUIVideoQuality as L } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
+
import { useRoomEngine as K } from "../../../hooks/useRoomEngine.js";
|
|
4
|
+
import { useLiveSeatState as W } from "../../../states/LiveSeatState/index.js";
|
|
5
|
+
import { hadLandscapeRotationToUndo as Z, getDeviceType as ee, shouldRotateToLandscapeForFullscreen as te } from "./utils/deviceDetection.js";
|
|
6
|
+
import { EventListenerManager as ne, DOMElementGetter as d } from "./utils/domHelpers.js";
|
|
7
|
+
import { OrientationManager as P, StyleManager as S, FullscreenMode as M, FullscreenManager as b } from "./utils/fullscreenManager.js";
|
|
8
|
+
import { useLiveListState as ae } from "../../../states/LiveListState/LiveListState.js";
|
|
9
|
+
var re = /* @__PURE__ */ ((a) => (a.CONTAIN = "contain", a.COVER = "cover", a.FILL = "fill", a))(re || {}), se = ((a) => (a[a.R360P = L.kVideoQuality_360p] = "R360P", a[a.R540P = L.kVideoQuality_540p] = "R540P", a[a.R720P = L.kVideoQuality_720p] = "R720P", a[a.R1080P = L.kVideoQuality_1080p] = "R1080P", a))(se || {});
|
|
10
|
+
const l = {
|
|
11
|
+
// Default volume level when component initializes (100% volume)
|
|
12
|
+
DEFAULT_VOLUME: 100,
|
|
13
|
+
// Minimum allowed volume level (silent)
|
|
14
|
+
MIN_VOLUME: 0,
|
|
15
|
+
// Maximum allowed volume level (full volume)
|
|
16
|
+
MAX_VOLUME: 100,
|
|
17
|
+
// Volume level when muted (silent)
|
|
18
|
+
MUTE_VOLUME: 0
|
|
19
|
+
}, ie = {
|
|
20
|
+
// Delay in milliseconds before resuming playback after leaving picture-in-picture
|
|
21
|
+
// Allows browser to handle state transitions naturally
|
|
22
|
+
PIP_RESUME_DELAY: 300
|
|
23
|
+
}, x = {
|
|
24
|
+
// Index of the first element in an array
|
|
25
|
+
FIRST_INDEX: 0
|
|
26
|
+
}, v = o(!0), V = o(
|
|
27
|
+
"contain"
|
|
28
|
+
/* CONTAIN */
|
|
29
|
+
), i = o(!1), E = o(!1), w = o(!1), m = o(l.DEFAULT_VOLUME), F = o(!1);
|
|
30
|
+
let I = l.DEFAULT_VOLUME;
|
|
31
|
+
const h = o([]), p = o(), u = K();
|
|
32
|
+
function pe() {
|
|
33
|
+
const { currentLive: a } = ae(), { canvas: f } = W(), c = new ne(), O = `player-control-${Date.now()}`, g = N(
|
|
34
|
+
() => f.value ? f.value.width > f.value.height : !1
|
|
35
|
+
), C = N(
|
|
36
|
+
() => f.value ? f.value.width < f.value.height : !1
|
|
37
|
+
), y = ee(), r = async (e, t, n) => {
|
|
38
|
+
try {
|
|
39
|
+
return await e();
|
|
40
|
+
} catch (s) {
|
|
41
|
+
return console.error(`${t} operation failed:`, s), n;
|
|
42
|
+
}
|
|
43
|
+
}, R = async () => r(async () => {
|
|
44
|
+
var e;
|
|
45
|
+
return await ((e = u.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
|
|
46
|
+
api: "resume",
|
|
47
|
+
params: {}
|
|
48
|
+
}))), v.value = !0, !0;
|
|
49
|
+
}, "Resume playback", !1), D = async () => r(async () => {
|
|
50
|
+
var e;
|
|
51
|
+
return await ((e = u.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
|
|
52
|
+
api: "pause",
|
|
53
|
+
params: {}
|
|
54
|
+
}))), v.value = !1, !0;
|
|
55
|
+
}, "Pause playback", !1), k = (e) => {
|
|
56
|
+
if (!i.value || !g.value)
|
|
57
|
+
return;
|
|
58
|
+
const t = d.getAllElements();
|
|
59
|
+
if (!t.view) {
|
|
60
|
+
console.warn("live-core-view element not found for orientation change handling");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
S.smartApplyLandscapeStyles(t.view, e);
|
|
64
|
+
}, q = async () => r(async () => {
|
|
65
|
+
const e = d.getAllElements(), t = d.validateElements(e);
|
|
66
|
+
if (!t.isValid)
|
|
67
|
+
throw new Error(`Missing required DOM elements: ${t.missingElements.join(", ")}`);
|
|
68
|
+
const n = te(y, g.value), s = await b.requestFullscreen(
|
|
69
|
+
e.container,
|
|
70
|
+
e.view,
|
|
71
|
+
y,
|
|
72
|
+
C.value,
|
|
73
|
+
n
|
|
74
|
+
);
|
|
75
|
+
return s.success ? i.value = !0 : console.error("Fullscreen request failed:", s.error), E.value = s.shouldRotateToLandscape, s;
|
|
76
|
+
}, "Request fullscreen", { success: !1, mode: M.CSS_SIMULATED, shouldRotateToLandscape: !1 }), Q = async () => r(async () => {
|
|
77
|
+
const e = d.getAllElements();
|
|
78
|
+
if (!e.view)
|
|
79
|
+
throw new Error("live-core-view element not found");
|
|
80
|
+
const t = Z(y, g.value), n = await b.exitFullscreen(
|
|
81
|
+
e.view,
|
|
82
|
+
y,
|
|
83
|
+
t
|
|
84
|
+
);
|
|
85
|
+
return n.mode === M.CSS_SIMULATED && (i.value = !1), n.success || console.error("Fullscreen exit failed:", n.error), E.value = !1, n;
|
|
86
|
+
}, "Exit fullscreen", { success: !1, mode: M.CSS_SIMULATED, shouldRotateToLandscape: !1 }), X = async () => r(async () => {
|
|
87
|
+
const e = d.getVideoElement();
|
|
88
|
+
if (!e)
|
|
89
|
+
throw new Error("Video element not found");
|
|
90
|
+
if (!e.requestPictureInPicture)
|
|
91
|
+
throw new Error("Picture-in-picture not supported in current environment");
|
|
92
|
+
return U(), await e.requestPictureInPicture(), !0;
|
|
93
|
+
}, "Request picture-in-picture", !1), J = async () => r(async () => {
|
|
94
|
+
if (!document.exitPictureInPicture)
|
|
95
|
+
throw new Error("Exit picture-in-picture not supported in current environment");
|
|
96
|
+
return await document.exitPictureInPicture(), !0;
|
|
97
|
+
}, "Exit picture-in-picture", !1), T = async (e) => r(async () => {
|
|
98
|
+
if (!u.instance)
|
|
99
|
+
throw new Error("Room engine instance not available");
|
|
100
|
+
return console.debug("Switching to resolution:", e), await u.instance.callExperimentalAPI(
|
|
101
|
+
JSON.stringify({
|
|
102
|
+
api: "switchPlaybackQuality",
|
|
103
|
+
params: {
|
|
104
|
+
quality: e,
|
|
105
|
+
autoSwitch: !1
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
), v.value || (v.value = !0), p.value = e, !0;
|
|
109
|
+
}, "Switch resolution", !1), $ = async (e) => r(async () => {
|
|
110
|
+
if (!u.instance)
|
|
111
|
+
throw new Error("Room engine instance not available");
|
|
112
|
+
return await u.instance.callExperimentalAPI(
|
|
113
|
+
JSON.stringify({
|
|
114
|
+
api: "queryPlaybackQualityList",
|
|
115
|
+
params: {
|
|
116
|
+
roomId: e
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
) || [];
|
|
120
|
+
}, "Get resolution list", []), z = async (e, t = !0) => {
|
|
121
|
+
try {
|
|
122
|
+
const n = await $(e);
|
|
123
|
+
if (h.value = n, n.length === x.FIRST_INDEX) {
|
|
124
|
+
console.warn("[Resolution] No resolutions available for room:", e), p.value = void 0;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const s = n[x.FIRST_INDEX];
|
|
128
|
+
p.value = s, t && await T(s);
|
|
129
|
+
} catch (n) {
|
|
130
|
+
console.error("[Resolution] Failed to initialize resolution:", n);
|
|
131
|
+
}
|
|
132
|
+
}, A = async (e) => r(async () => {
|
|
133
|
+
var t;
|
|
134
|
+
if (e < l.MIN_VOLUME || e > l.MAX_VOLUME)
|
|
135
|
+
throw new Error(`Volume value must be between ${l.MIN_VOLUME}-${l.MAX_VOLUME}`);
|
|
136
|
+
return await ((t = u.instance) == null ? void 0 : t.setAudioPlayoutVolume({ volume: e })), m.value = e, I = e, F.value = e == l.MUTE_VOLUME, !0;
|
|
137
|
+
}, "Set volume", !1), G = async (e) => r(async () => {
|
|
138
|
+
var n;
|
|
139
|
+
let t;
|
|
140
|
+
return e ? (I = m.value, t = l.MUTE_VOLUME) : t = I || l.DEFAULT_VOLUME, await ((n = u.instance) == null ? void 0 : n.setAudioPlayoutVolume({ volume: t })), m.value = t, F.value = e, !0;
|
|
141
|
+
}, "Set mute", !1), Y = async (e) => r(async () => (V.value = e, !0), "Change fill mode", !1), _ = () => {
|
|
142
|
+
try {
|
|
143
|
+
const e = d.getAllElements();
|
|
144
|
+
if (!e.view) {
|
|
145
|
+
console.warn("View element not found for fullscreen exit cleanup");
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
S.removeFullscreenStyles(e.view), S.removeLandscapeStyles(e.view), y !== "desktop" && P.unlockOrientation().catch(() => {
|
|
149
|
+
}), E.value = !1;
|
|
150
|
+
} catch (e) {
|
|
151
|
+
console.error("Fullscreen exit cleanup failed:", e);
|
|
152
|
+
}
|
|
153
|
+
}, j = () => {
|
|
154
|
+
const e = () => {
|
|
155
|
+
const n = !!document.fullscreenElement, s = i.value;
|
|
156
|
+
i.value = n, s && !n && _();
|
|
157
|
+
};
|
|
158
|
+
c.addListener("fullscreenchange", document, "fullscreenchange", e), c.addListener("webkitfullscreenchange", document, "webkitfullscreenchange", e), c.addListener("mozfullscreenchange", document, "mozfullscreenchange", e), c.addListener("MSFullscreenChange", document, "MSFullscreenChange", e);
|
|
159
|
+
const t = () => {
|
|
160
|
+
document.visibilityState === "visible" && i.value && (document.fullscreenElement || (i.value = !1, _()));
|
|
161
|
+
};
|
|
162
|
+
c.addListener("visibilitychange", document, "visibilitychange", t);
|
|
163
|
+
}, U = () => {
|
|
164
|
+
const e = d.getVideoElement();
|
|
165
|
+
if (!e) {
|
|
166
|
+
console.warn("Video element not found for setting up event listeners");
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const t = () => {
|
|
170
|
+
w.value = !0;
|
|
171
|
+
}, n = () => {
|
|
172
|
+
w.value = !1, setTimeout(R, ie.PIP_RESUME_DELAY);
|
|
173
|
+
};
|
|
174
|
+
c.addListener("enterpictureinpicture", e, "enterpictureinpicture", t), c.addListener("leavepictureinpicture", e, "leavepictureinpicture", n);
|
|
175
|
+
}, H = () => {
|
|
176
|
+
P.removeOrientationListener(O), c.removeAllListeners();
|
|
177
|
+
};
|
|
178
|
+
return j(), U(), P.addOrientationListener(O, k), B(
|
|
179
|
+
() => {
|
|
180
|
+
var e;
|
|
181
|
+
return (e = a.value) == null ? void 0 : e.liveId;
|
|
182
|
+
},
|
|
183
|
+
async (e) => {
|
|
184
|
+
e && (v.value = !0, w.value = !1, i.value = !1, h.value = [], p.value = void 0, await A(m.value), await z(e, !1), console.log("[PlayerControl] State after entering room:", JSON.stringify({
|
|
185
|
+
isPlaying: v.value,
|
|
186
|
+
currentFillMode: V.value,
|
|
187
|
+
isFullscreen: i.value,
|
|
188
|
+
isLandscapeStyleMode: E.value,
|
|
189
|
+
isPictureInPicture: w.value,
|
|
190
|
+
currentVolume: m.value,
|
|
191
|
+
resolutionList: h.value,
|
|
192
|
+
currentResolution: p.value
|
|
193
|
+
})));
|
|
194
|
+
}
|
|
195
|
+
), {
|
|
196
|
+
isPlaying: v,
|
|
197
|
+
currentFillMode: V,
|
|
198
|
+
isFullscreen: i,
|
|
199
|
+
isLandscapeStyleMode: E,
|
|
200
|
+
isPictureInPicture: w,
|
|
201
|
+
currentVolume: m,
|
|
202
|
+
isMuted: F,
|
|
203
|
+
resolutionList: h,
|
|
204
|
+
currentResolution: p,
|
|
205
|
+
resume: R,
|
|
206
|
+
pause: D,
|
|
207
|
+
requestFullscreen: q,
|
|
208
|
+
exitFullscreen: Q,
|
|
209
|
+
requestPictureInPicture: X,
|
|
210
|
+
exitPictureInPicture: J,
|
|
211
|
+
switchResolution: T,
|
|
212
|
+
setVolume: A,
|
|
213
|
+
setMute: G,
|
|
214
|
+
changeFillMode: Y,
|
|
215
|
+
cleanup: H
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
export {
|
|
219
|
+
re as FillMode,
|
|
220
|
+
se as Resolution,
|
|
221
|
+
pe as usePlayerControlState
|
|
222
|
+
};
|
|
@@ -40,7 +40,8 @@ export declare class DOMElementGetter {
|
|
|
40
40
|
*/
|
|
41
41
|
static getTcPlayerElement(): HTMLElement | null;
|
|
42
42
|
/**
|
|
43
|
-
* Validate if elements exist
|
|
43
|
+
* Validate if required elements exist for fullscreen
|
|
44
|
+
* Note: video element is optional because canvas rendering (TRTC SDK) doesn't use video
|
|
44
45
|
*/
|
|
45
46
|
static validateElements(elements: {
|
|
46
47
|
container?: HTMLElement | null;
|
|
@@ -73,3 +74,9 @@ export declare class EventListenerManager {
|
|
|
73
74
|
*/
|
|
74
75
|
getListenerCount(): number;
|
|
75
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Wait for video element to be mounted in DOM
|
|
79
|
+
* @param timeout Maximum wait time in milliseconds
|
|
80
|
+
* @returns Promise that resolves with video element or null if timeout
|
|
81
|
+
*/
|
|
82
|
+
export declare const waitForVideoMounted: (timeout?: number) => Promise<HTMLVideoElement | null>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var L = Object.defineProperty;
|
|
2
|
+
var m = (i, e, t) => e in i ? L(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var d = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const c = {
|
|
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 s {
|
|
11
|
+
/**
|
|
12
|
+
* Get live-core-view-container element
|
|
13
|
+
*/
|
|
14
|
+
static getLiveCoreViewContainer() {
|
|
15
|
+
return document.querySelector(c.LIVE_CORE_VIEW_CONTAINER);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get live-core-view element
|
|
19
|
+
*/
|
|
20
|
+
static getLiveCoreView() {
|
|
21
|
+
return document.querySelector(c.LIVE_CORE_VIEW);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get video element
|
|
25
|
+
*/
|
|
26
|
+
static getVideoElement() {
|
|
27
|
+
return document.querySelector(c.VIDEO_ELEMENT);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get all required DOM elements
|
|
31
|
+
*/
|
|
32
|
+
static getAllElements() {
|
|
33
|
+
return {
|
|
34
|
+
container: s.getLiveCoreViewContainer(),
|
|
35
|
+
view: s.getLiveCoreView(),
|
|
36
|
+
video: s.getVideoElement()
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if tcplayer element exists in live-core-view-container
|
|
41
|
+
*/
|
|
42
|
+
static hasTcPlayerElement() {
|
|
43
|
+
const e = s.getLiveCoreViewContainer();
|
|
44
|
+
return e ? e.querySelector(c.TCPLAYER_ELEMENT) !== null : !1;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get tcplayer element from live-core-view-container
|
|
48
|
+
*/
|
|
49
|
+
static getTcPlayerElement() {
|
|
50
|
+
const e = s.getLiveCoreViewContainer();
|
|
51
|
+
return e ? e.querySelector(c.TCPLAYER_ELEMENT) : null;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Validate if required elements exist for fullscreen
|
|
55
|
+
* Note: video element is optional because canvas rendering (TRTC SDK) doesn't use video
|
|
56
|
+
*/
|
|
57
|
+
static validateElements(e) {
|
|
58
|
+
const t = [];
|
|
59
|
+
return e.container === null && t.push("live-core-view-container"), e.view === null && t.push("live-core-view"), {
|
|
60
|
+
isValid: t.length === 0,
|
|
61
|
+
missingElements: t
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
class C {
|
|
66
|
+
constructor() {
|
|
67
|
+
d(this, "listeners", /* @__PURE__ */ new Map());
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Add event listener
|
|
71
|
+
*/
|
|
72
|
+
addListener(e, t, r, o) {
|
|
73
|
+
this.removeListener(e), t.addEventListener(r, o), this.listeners.set(e, { element: t, event: r, handler: o });
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Remove specified event listener
|
|
77
|
+
*/
|
|
78
|
+
removeListener(e) {
|
|
79
|
+
const t = this.listeners.get(e);
|
|
80
|
+
t && (t.element.removeEventListener(t.event, t.handler), this.listeners.delete(e));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Remove all event listeners
|
|
84
|
+
*/
|
|
85
|
+
removeAllListeners() {
|
|
86
|
+
for (const [e] of this.listeners)
|
|
87
|
+
this.removeListener(e);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get current listener count
|
|
91
|
+
*/
|
|
92
|
+
getListenerCount() {
|
|
93
|
+
return this.listeners.size;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const g = (i = 3e3) => new Promise((e) => {
|
|
97
|
+
const t = document.querySelector("#atomicx-live-stream-content");
|
|
98
|
+
if (!t) {
|
|
99
|
+
e(null);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
let r = null;
|
|
103
|
+
const o = new MutationObserver((v) => {
|
|
104
|
+
for (const a of v)
|
|
105
|
+
a.type === "childList" && a.addedNodes.forEach((l) => {
|
|
106
|
+
if (l.nodeName === "VIDEO") {
|
|
107
|
+
const n = l, u = n.onvolumechange;
|
|
108
|
+
n.onvolumechange = null;
|
|
109
|
+
const E = () => {
|
|
110
|
+
r && clearTimeout(r), o.disconnect(), n.removeEventListener("loadeddata", E), setTimeout(() => {
|
|
111
|
+
n.onvolumechange = u;
|
|
112
|
+
}, 100), e(n);
|
|
113
|
+
};
|
|
114
|
+
n.readyState >= 2 ? (r && clearTimeout(r), o.disconnect(), setTimeout(() => {
|
|
115
|
+
n.onvolumechange = u;
|
|
116
|
+
}, 100), e(n)) : n.addEventListener("loadeddata", E, { once: !0 });
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
o.observe(t, {
|
|
121
|
+
childList: !0,
|
|
122
|
+
subtree: !0
|
|
123
|
+
}), r = window.setTimeout(() => {
|
|
124
|
+
o.disconnect(), e(null);
|
|
125
|
+
}, i);
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
s as DOMElementGetter,
|
|
129
|
+
c as DOM_SELECTORS,
|
|
130
|
+
C as EventListenerManager,
|
|
131
|
+
g as waitForVideoMounted
|
|
132
|
+
};
|
|
@@ -7,8 +7,8 @@ export declare const resource: {
|
|
|
7
7
|
'Exit Picture in Picture': string;
|
|
8
8
|
Fullscreen: string;
|
|
9
9
|
'Exit Fullscreen': string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'Open Speaker': string;
|
|
11
|
+
'Close Speaker': string;
|
|
12
12
|
'The system does not support picture-in-picture mode': string;
|
|
13
13
|
'co-Hosting': string;
|
|
14
14
|
'In battle': string;
|
|
@@ -16,4 +16,5 @@ export declare const resource: {
|
|
|
16
16
|
'540P': string;
|
|
17
17
|
'720P': string;
|
|
18
18
|
'1080P': string;
|
|
19
|
+
Connecting: string;
|
|
19
20
|
};
|
|
@@ -7,15 +7,16 @@ const e = {
|
|
|
7
7
|
"Exit Picture in Picture": "Exit Picture in Picture",
|
|
8
8
|
Fullscreen: "Fullscreen",
|
|
9
9
|
"Exit Fullscreen": "Exit Fullscreen",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"Open Speaker": "Open Speaker",
|
|
11
|
+
"Close Speaker": "Close Speaker",
|
|
12
12
|
"The system does not support picture-in-picture mode": "The system does not support picture-in-picture mode",
|
|
13
13
|
"co-Hosting": "co-Hosting",
|
|
14
14
|
"In battle": "In battle",
|
|
15
15
|
"360P": "360P",
|
|
16
16
|
"540P": "540P",
|
|
17
17
|
"720P": "720P",
|
|
18
|
-
"1080P": "1080P"
|
|
18
|
+
"1080P": "1080P",
|
|
19
|
+
Connecting: "Connecting"
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
22
|
e as resource
|
|
@@ -7,8 +7,8 @@ export declare const resource: {
|
|
|
7
7
|
'Exit Picture in Picture': string;
|
|
8
8
|
Fullscreen: string;
|
|
9
9
|
'Exit Fullscreen': string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'Open Speaker': string;
|
|
11
|
+
'Close Speaker': string;
|
|
12
12
|
'The system does not support picture-in-picture mode': string;
|
|
13
13
|
'co-Hosting': string;
|
|
14
14
|
'In battle': string;
|
|
@@ -16,4 +16,5 @@ export declare const resource: {
|
|
|
16
16
|
'540P': string;
|
|
17
17
|
'720P': string;
|
|
18
18
|
'1080P': string;
|
|
19
|
+
Connecting: string;
|
|
19
20
|
};
|
|
@@ -7,15 +7,16 @@ const e = {
|
|
|
7
7
|
"Exit Picture in Picture": "退出画中画",
|
|
8
8
|
Fullscreen: "全屏",
|
|
9
9
|
"Exit Fullscreen": "退出全屏",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"Open Speaker": "取消静音",
|
|
11
|
+
"Close Speaker": "静音",
|
|
12
12
|
"The system does not support picture-in-picture mode": "系统不支持画中画模式",
|
|
13
13
|
"co-Hosting": "连线中",
|
|
14
14
|
"In battle": "PK中",
|
|
15
15
|
"360P": "低清",
|
|
16
16
|
"540P": "标清",
|
|
17
17
|
"720P": "高清",
|
|
18
|
-
"1080P": "超清"
|
|
18
|
+
"1080P": "超清",
|
|
19
|
+
Connecting: "连线中"
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
22
|
e as resource
|