fix: restore lyrics sync in ExpandedPlayer and improve performance
- Add startActiveLineUpdates() trigger to ExpandedPlayer - Reduce transition times (200ms instead of 400ms) to fix lag - Simplify karaoke gradient for clearer visual effect
This commit is contained in:
1 parent
8cbb65aaee
commit
68d5704083
2 files changed
+16
-13
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import { X, Shuffle, SkipBack, Play, Pause, SkipForward, Repeat, Heart, List, Maximize2, MoreHorizontal, Cast } from 'lucide-svelte';
|
||||
import QualityBadge from './QualityBadge.svelte';
|
||||
import LyricsLines from './lyrics/LyricsLines.svelte';
|
||||
import { startActiveLineUpdates } from '$lib/stores/lyricsStore';
|
||||
|
||||
interface LyricsLine {
|
||||
text: string;
|
||||
@@ -90,6 +91,13 @@
|
||||
const progress = $derived((currentTime / duration) * 100 || 0);
|
||||
const hasLyrics = $derived(lyricsLines.length > 0);
|
||||
|
||||
// Ensure lyrics updates run when ExpandedPlayer is open with synced lyrics
|
||||
$effect(() => {
|
||||
if (isOpen && isPlaying && lyricsSynced) {
|
||||
startActiveLineUpdates();
|
||||
}
|
||||
});
|
||||
|
||||
function formatTime(seconds: number): string {
|
||||
if (!seconds || !isFinite(seconds)) return '0:00';
|
||||
const mins = Math.floor(seconds / 60);
|
||||
|
||||
Reference in new issue
Block a user