refactor(Player): 移除调试用的console.log语句

清理播放器组件中用于调试的console.log输出语句,保持代码整洁
This commit is contained in:
Astrian Zheng 2025-05-26 10:56:53 +10:00
parent 1a700659ae
commit 5ded7f4f9d
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -12,10 +12,7 @@ const playQueueStore = usePlayQueueStore()
const route = useRoute()
const player = useTemplateRef('playerRef')
console.log('[Player] 组件初始化')
watch(() => playQueueStore.isPlaying, (newValue) => {
console.log('[Player] 播放状态变化:', newValue)
if (newValue) {
player.value?.play()
setMetadata()
@ -37,7 +34,6 @@ function artistsOrganize(list: string[]) {
}
function setMetadata() {
console.log('[Player] 设置元数据')
if ('mediaSession' in navigator) {
navigator.mediaSession.metadata = new MediaMetadata({
title: playQueueStore.list[playQueueStore.currentIndex].song.name,
@ -128,16 +124,13 @@ watch(() => playQueueStore.list.length, async (newLength) => {
//
watch(() => player.value, (audioElement) => {
console.log('[Player] 音频元素 ref 变化:', !!audioElement)
if (audioElement && playQueueStore.list.length > 0) {
console.log('[Player] 重新连接音频元素')
connectAudio(audioElement)
}
})
//
watch(() => barHeights.value, (newHeights) => {
console.log('[Player] 可视化器数据更新:', newHeights.map(h => Math.round(h)))
playQueueStore.visualizer = newHeights
}, { deep: true })