Documentation Index
Fetch the complete documentation index at: https://mintlify.com/6xingyv/accompanist-lyrics-core/llms.txt
Use this file to discover all available pages before exploring further.
SyncedLyrics is the top-level object you receive from any parser in Accompanist Lyrics Core. It carries the full list of lyrics lines (as ISyncedLine implementations), song-level metadata, and two time-query methods you can drive directly from a media player’s position callback to determine which lines should be highlighted at any given moment.
Constructor
The ordered list of all lyrics lines. Each element is an
ISyncedLine — in practice either a SyncedLine or a KaraokeLine.The song title sourced from the
[ti:] LRC tag, or an empty string when absent.An opaque identifier for the lyrics object. Defaults to
"0" when not explicitly set by the parser.The list of credited artists parsed from the
[ar:] tag. May be null if artist information is entirely unavailable, or an empty list when the tag is present but empty. See Artist.Methods
getCurrentFirstHighlightLineIndexByTime
[start, end] contains time. Uses a binary search over lines, so it runs in O(log n) and is safe to call on every frame.
Current playback position in milliseconds.
Int with the following semantics:
| Condition | Returned value |
|---|---|
lines is empty | 0 |
A line’s [start, end] contains time | Index of that line |
time falls in a gap between lines | Index of the next upcoming line |
time is after all lines | lines.size |
When multiple lines overlap at
time, this method returns only the first (lowest-index) match. Use getCurrentAllHighlightLineIndicesByTime to collect all overlapping lines.getCurrentAllHighlightLineIndicesByTime
[start, end] window contains time. Designed for overlapping-lyric scenarios such as duets or background vocals.
Current playback position in milliseconds.
List<Int> of matching line indices in ascending order, or an empty list if no line is active at time.
Properties (data class)
Ordered list of lyrics lines implementing
ISyncedLine.Song title from the
[ti:] LRC tag. Empty string when absent.Opaque lyrics identifier. Defaults to
"0".Credited artists from the
[ar:] tag. null means no artist information; an empty list means the tag was present but blank.