Skip to content

feat(player): add synced mini lyrics on Now Playing - #870

Merged
Pyrexus merged 4 commits into
Clash-Projects:mainfrom
echo-ilovech3ss:feat/now-playing-mini-lyrics
Dec 5, 2026
Merged

Pyrexus merged 4 commits into
Clash-Projects:mainfrom
echo-ilovech3ss:feat/now-playing-mini-lyrics

Conversation

@echo-ilovech3ss

@echo-ilovech3ss echo-ilovech3ss commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #802

Adds an opt-in Mini lyrics toggle under Settings > Appearance > Now Playing > Controls & Layout that shows the active synced lyric line right above the progress bar on the Now Playing screen.

What changed:

  • Added nowPlayingMiniLyricsEnabled (false by default) to SettingsPreferences, wired it through SettingsViewModel, SettingsScreen, and SettingsSearchIndex.
  • Added NowPlayingMiniLyrics.kt reusing buildLyricsStage, LyricsStage.activeIndex, and lyricsOffsetMs with a 300 ms line-boundary wake loop.
  • Animated line changes and show/hide transitions, wrapped long lines instead of truncating, preserved RTL layout direction per line, and opened the full lyrics tab when tapped.
  • Hid the view when turned off, during intros or interludes, when synced lyrics are unavailable, and while inline player lyrics are open.
  • Adjusted portrait FullPlayer spacing and upward translationY while mini lyrics are visible so the track title stays cleanly below the main cover art.
  • Added trackKey to LyricsUiState.Success (including local file path identity) and keyed NowPlayingMiniLyrics by track so lines from a previous song do not linger after switching tracks.
  • Wired NowPlayingMiniLyrics into PlayerHost, FullPlayer, ExpressiveNowPlaying, and FullPlayerLandscape.
  • Added unit tests in NowPlayingMiniLyricsTest.kt and NowPlayingMiniLyricsPreferenceTest.kt.

Verification

  • Ran NowPlayingMiniLyricsTest (7/7 passed), NowPlayingMiniLyricsPreferenceTest (3/3 passed), LyricsStagingTest, LyricsSignatureTest, and the CI regression test set (380/380 passed).
  • Built :app:assembleDebug and tested on an Android 11 emulator using a local FLAC file with embedded SYNCEDLYRICS and a WAV file with no lyrics:
    • Hidden by default before turning the setting on.
    • Shows and swaps synced lines above the progress bar once enabled, keeps clear spacing below the cover art on both single and wrapped multi-line lyrics, and opens the full lyrics tab when tapped.
    • Clears immediately on switching to a track without lyrics and hides cleanly when toggled back off.
    • Verified on landscape layout as well.
Before After (synced line) After (wrapped long line) Settings toggle
Before Synced line Wrapped line Settings toggle

@echo-ilovech3ss
echo-ilovech3ss force-pushed the feat/now-playing-mini-lyrics branch from 0ab0507 to 4cb365e Compare December 4, 2026 07:07
@Pyrexus

Pyrexus commented Dec 4, 2026

Copy link
Copy Markdown
Member

perfect just fix it so it wont go in main cover art also resolve the conflict then ill merge

@echo-ilovech3ss
echo-ilovech3ss force-pushed the feat/now-playing-mini-lyrics branch from 4cb365e to fdf2304 Compare December 4, 2026 16:12
@echo-ilovech3ss

Copy link
Copy Markdown
Contributor Author

Done. Rebased onto main to clear the conflict and fixed the portrait FullPlayer layout so the controls column drops its -14.dp upward translationY and adds clearance below the artwork whenever mini lyrics are visible.

Synced line Wrapped long line
Synced line Wrapped line

@echo-ilovech3ss
echo-ilovech3ss force-pushed the feat/now-playing-mini-lyrics branch from 67f248d to 5172ef8 Compare December 5, 2026 04:53
@Pyrexus

Pyrexus commented Dec 5, 2026

Copy link
Copy Markdown
Member

yooo looks dope loved it, can you add glow yo it like our previous lyrics type had the glow from the text just do it and let the lyrics use the app font and keep lyrics in bold... just do this small things and ill accept it cuz i liked the idea

@Pyrexus
Pyrexus merged commit fc2db95 into Clash-Projects:main Dec 5, 2026
@nugraha-abd

Copy link
Copy Markdown

Hey thanks for working on this. I'd like to give some suggestion about this neat feature:

  • Add lyrics alignment option (left, center, right). Based on the PR description i assume that the alignment is set to left and no customization options.
  • Add options to display the lyrics either under or above the song title. The current proposed implementation seems like it can only be displayed under the song title.
  • Lastly the implementation should account for romanized lyrics so that it will have enough space to display the default lyrics along with its romanization.

@Pyrexus

Pyrexus commented Dec 5, 2026

Copy link
Copy Markdown
Member

Sure I'm bussy a lil you can open new pr for this too

@nugraha-abd

Copy link
Copy Markdown

Welp seems like i was too late.

Sure I'm bussy a lil you can open new pr for this too

I'd like to but i pretty much have zero knowledge about coding :(

@Pyrexus

Pyrexus commented Dec 5, 2026

Copy link
Copy Markdown
Member

Welp seems like i was too late.

Sure I'm bussy a lil you can open new pr for this too

I'd like to but i pretty much have zero knowledge about coding :(

Okay I'll but not sure when... Make take days

@nugraha-abd

Copy link
Copy Markdown

No worries! It's not a high priority feature anyway. I can post an issue if you want me to so that it will be easier to track.

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.

[Feature]: [Feature Request] Mini lyrics on the Now Playing screen

3 participants