SubtitleDisplay

@Composable
fun SubtitleDisplay(subtitles: SubtitleCueList, currentTimeMs: Long, modifier: Modifier = Modifier, textStyle: TextStyle = TextStyle( color = Color.White, fontSize = 18.sp, fontWeight = FontWeight.Normal, textAlign = TextAlign.Center ), backgroundColor: Color = Color.Black.copy(alpha = 0.5f))

A composable function that displays subtitles.

Parameters

subtitles

The subtitle cue list to display

currentTimeMs

The current playback time in milliseconds

modifier

The modifier to be applied to the layout

textStyle

The text style to be applied to the subtitle text

backgroundColor

The background color of the subtitle box