KaraokeLyricsView

fun KaraokeLyricsView(listState: ERROR CLASS: Symbol not found for LazyListState, lyrics: ERROR CLASS: Symbol not found for SyncedLyrics, currentPosition: () -> Int, onLineClicked: (ERROR CLASS: Symbol not found for ISyncedLine) -> Unit, onLinePressed: (ERROR CLASS: Symbol not found for ISyncedLine) -> Unit, modifier: ERROR CLASS: Symbol not found for Modifier = Modifier, normalLineTextStyle: ERROR CLASS: Symbol not found for TextStyle = LocalTextStyle.current.copy( fontSize = 34.sp, fontWeight = FontWeight.Bold, textMotion = TextMotion.Animated, ), accompanimentLineTextStyle: ERROR CLASS: Symbol not found for TextStyle = LocalTextStyle.current.copy( fontSize = 20.sp, fontWeight = FontWeight.Bold, textMotion = TextMotion.Animated, ), textColor: ERROR CLASS: Symbol not found for Color = Color.White, breathingDotsDefaults: KaraokeBreathingDotsDefaults = KaraokeBreathingDotsDefaults(), blendMode: ERROR CLASS: Symbol not found for BlendMode = BlendMode.Plus, useBlurEffect: Boolean = true, offset: ERROR CLASS: Symbol not found for Dp = 32.dp, showDebugRectangles: Boolean = false, fontResource: ERROR CLASS: Symbol not found for FontResource?? = null, sharedAtlasManager: SdfAtlasManager = rememberSdfAtlasManager(2048, 2048), sharedNativeEngine: NativeTextEngine? = null)

A comprehensive lyrics view that supports Karaoke and Synced lyrics with advanced rendering.

This composable handles:

  • Scrolling and auto-scrolling to the current line

  • Rendering karaoke lines with syllable-level timing and animations

  • Rendering synced lines

  • Displaying breathing dots during instrumental interludes

  • Determining active and accompaniment lines

  • Orchestrating layout pre-calculation using NativeTextEngine

Parameters

listState

The scroll state for the lazy list.

lyrics

The lyrics data to display.

currentPosition

A lambda returning the current playback position in milliseconds.

onLineClicked

Callback when a line is clicked (seek to position).

onLinePressed

Callback when a line is long-pressed (share/menu).

modifier

The modifier to apply to the layout.

normalLineTextStyle

The style for normal text lines.

accompanimentLineTextStyle

The style for accompaniment/background vocals lines.

textColor

The primary text color.

breathingDotsDefaults

Styling defaults for the breathing dots.

blendMode

The blend mode used for rendering text (e.g., BlendMode.Plus for glowing effects).

useBlurEffect

Whether to apply blur effect to non-active lines.

offset

The vertical padding/offset at the start and end of the list.

showDebugRectangles

Debug flag to draw bounding boxes around glyphs.

fontResource

Optional CMP font resource to load into the native text engine.