SeekBarState
State holder for a seek bar, such as SeekBar.
While the user drags the seek bar (see onValueChange), the player is temporarily paused, and resumed on onValueChangeFinished if it was playing. To avoid loading media for positions that are scrubbed past, the player only seeks once the user stops moving for a moment, or when they finish.
This is also a PlaybackTimeState, whose currentTime is the scrub position while scrubbing.
Create an instance with rememberSeekBarState.
Properties
The current playback position of the media, in seconds. While the user is scrubbing, this is the scrubTime.
The StreamType of the media.
The range of value. Always starts at zero.
Functions
Called while the user drags the seek bar. Temporarily pauses a playing player, and seeks to the given position within valueRange once the user stops dragging for a moment.
Called when the user stops dragging the seek bar. Seeks to the final position, and resumes playback if the player was playing before the drag started.
Seeks to a position within valueRange without changing playback state.
Plays or pauses the player. While the user is scrubbing, this instead changes whether playback resumes when scrubbing finishes.