Skip to content

feat: Add synchronized LRC support#114

Merged
phanan merged 6 commits intokoel:masterfrom
DzmingLi:upstream-sync
Nov 25, 2025
Merged

feat: Add synchronized LRC support#114
phanan merged 6 commits intokoel:masterfrom
DzmingLi:upstream-sync

Conversation

@DzmingLi
Copy link
Copy Markdown
Contributor

@DzmingLi DzmingLi commented Oct 25, 2025

To cope with the pull request feat: add synchronized LRC lyrics support

Screenshot_20251025-155257

Upgrade build tools to meet Flutter and plugin requirements:
- Android Gradle Plugin: 8.2.2 → 8.6.0
- Kotlin: 1.8.0 → 2.1.0
- Gradle: 8.5 → 8.7
- Increase JVM heap size from 1.5GB to 4GB to prevent OOM during build
- Add MaxMetaspaceSize limit of 512MB
- Disable Jetifier as the project already uses AndroidX
Update to Android SDK 36 to satisfy plugin requirements for
path_provider_android and url_launcher_android.
Replace deprecated theme classes with their Data equivalents:
- TabBarTheme → TabBarThemeData
- CardTheme → CardThemeData

These changes are required for Flutter 3.35+ compatibility.
Implement real-time synchronized lyrics display for songs with LRC
timestamps. The lyrics automatically scroll and highlight as the song
plays, providing a karaoke-style experience.

Features:
- Parse LRC format with [mm:ss.xx] or [mm:ss.xxx] timestamps
- Real-time synchronization with audio playback position
- Highlight current line with bold weight and scale animation
- Auto-scroll to keep current line centered on screen
- Smooth 300ms transitions between lines
- Update every 100ms for precise synchronization
- Backward compatible with plain text lyrics

The implementation detects LRC timestamps in lyrics and switches to
synced mode automatically. Plain text lyrics continue to display as
before without any changes.
@DzmingLi DzmingLi changed the title Upstream sync Add syn Oct 25, 2025
@DzmingLi DzmingLi changed the title Add syn Add synchronized LRC support Oct 25, 2025
@DzmingLi DzmingLi changed the title Add synchronized LRC support feat: Add synchronized LRC support Oct 25, 2025
Comment on lines +88 to +90
// Auto-scrolling is disabled since the ListView is nested in a SingleChildScrollView
// The parent scroll view controls scrolling, so we can't scroll to the current line automatically
// TODO: Pass parent ScrollController to enable auto-scrolling
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not implemented?

…crollController to LyricsPane to enable automatic scrolling to the currently playing lyric line. The implementation uses GlobalKeys to track each line's position and smoothly animates the scroll view to center the active line.
@DzmingLi
Copy link
Copy Markdown
Contributor Author

Oops, I forgot to push the commit to this branch earlier — just added it now

@phanan phanan merged commit d075c31 into koel:master Nov 25, 2025
@phanan
Copy link
Copy Markdown
Member

phanan commented Nov 25, 2025

Thanks! I finally got the time to go through this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants