diff --git a/src/pages/Playroom.vue b/src/pages/Playroom.vue index 81c0607..a36fc77 100644 --- a/src/pages/Playroom.vue +++ b/src/pages/Playroom.vue @@ -45,12 +45,24 @@ watch(() => playQueueStore.currentTime, () => { const newPosition = (containerWidth - thumbWidth) * progress gsap.to(progressBarThumb.value, { x: newPosition, duration: 0.1 }) }) + +function formatDetector() { + const format = playQueueStore.list[playQueueStore.currentIndex].song.sourceUrl?.split('.').pop() + if (format === 'mp3') { return 'MP3' } + if (format === 'flac') { return 'FLAC' } + if (format === 'm4a') { return 'M4A' } + if (format === 'ape') { return 'APE' } + if (format === 'wav') { return 'WAV' } + return '未知格式' +}