SeekBar

fun SeekBar(modifier: Modifier = Modifier, colors: SliderColors = SliderDefaults.colors(), seekOffset: Int = 10)(source)

A seek bar showing the player's current time and allowing D-pad seeking.

Press Left or Right to seek by seekOffset seconds. Hold either key to scrub through the timeline; playback pauses while scrubbing. Press Center to play or pause.

Parameters

modifier

the Modifier to be applied to this seek bar

colors

SliderColors that resolve the seek bar colors for enabled and disabled states. See SliderDefaults.colors.

seekOffset

the number of seconds to seek on a single Left or Right press


fun SeekBar(state: SeekBarState, modifier: Modifier = Modifier, colors: SliderColors = SliderDefaults.colors(), seekOffset: Int = 10)(source)

A seek bar showing the current time from state and allowing D-pad seeking.

Press Left or Right to seek by seekOffset seconds. Hold either key to scrub through the timeline; playback pauses while scrubbing. Press Center to play or pause.

Parameters

state

the SeekBarState to read and control

modifier

the Modifier to be applied to this seek bar

colors

SliderColors that resolve the seek bar colors for enabled and disabled states. See SliderDefaults.colors.

seekOffset

the number of seconds to seek on a single Left or Right press