# ProgressSlider

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/material3/indicator/ProgressSlider.composable#ProgressSlider(androidx.media3.common.Player,androidx.compose.ui.Modifier)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)` A Material3 `https://developer.android.com/reference/kotlin/androidx/compose/material3/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors,androidx.compose.foundation.interaction.MutableInteractionSource)` that displays the current position of the player. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/ExperimentalApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/material3/indicator/ProgressSlider.composable#ProgressSlider(androidx.media3.common.Player,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function0,kotlinx.coroutines.CoroutineScope,androidx.compose.material3.SliderColors,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource)( player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, onValueChange: ((https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, onValueChangeFinished: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html, colors: https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderColors, scrubbingEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource )` A Material3 `https://developer.android.com/reference/kotlin/androidx/compose/material3/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors,androidx.compose.foundation.interaction.MutableInteractionSource)` that displays the current position of the player. |

## Functions

### ProgressSlider

Artifact: [androidx.media3:media3-ui-compose-material3](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/material3/indicator/ProgressSlider.kt+function:ProgressSlider)

```
@UnstableApi
@Composable
fun ProgressSlider(player: Player?, modifier: Modifier = Modifier): Unit
```

A Material3 `https://developer.android.com/reference/kotlin/androidx/compose/material3/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors,androidx.compose.foundation.interaction.MutableInteractionSource)` that displays the current position of the player.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player` to get the progress from. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to the slider. |

### ProgressSlider

Artifact: [androidx.media3:media3-ui-compose-material3](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/material3/indicator/ProgressSlider.kt+function:ProgressSlider)

```
@ExperimentalApi
@Composable
fun ProgressSlider(
    player: Player?,
    modifier: Modifier = Modifier,
    onValueChange: ((Float) -> Unit)? = null,
    onValueChangeFinished: (() -> Unit)? = null,
    scope: CoroutineScope = rememberCoroutineScope(),
    colors: SliderColors = SliderDefaults.colors(),
    scrubbingEnabled: Boolean = true,
    interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
): Unit
```

A Material3 `https://developer.android.com/reference/kotlin/androidx/compose/material3/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors,androidx.compose.foundation.interaction.MutableInteractionSource)` that displays the current position of the player.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player` to get the progress from. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to the slider. |
| `onValueChange: ((https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | An optional callback that is invoked continuously as the user drags the slider thumb. The lambda receives a `Float` representing the new progress value (from 0.0 to 1.0). This can be used to display a preview of the seek position. You should not use this callback to update the slider's value, as this is handled internally. |
| `onValueChangeFinished: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | An optional callback that is invoked when the user has finished their interaction (by lifting their finger or tapping). The underlying `Player.seekTo` operation is performed internally just before this callback is invoked. |
| `scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html = rememberCoroutineScope()` | The `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` to use for listening to player progress updates. |
| `colors: https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderColors = SliderDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderColors` that will be used to resolve the colors used for this slider in different states. See `https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderDefaults#colors()`. |
| `scrubbingEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Whether the time bar should seek immediately as the user drags the scrubber around (true), or only seek when the user releases the scrubber (false). |
| `interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource = remember { MutableInteractionSource() }` | the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource` representing the stream of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction` for this slider. You can create and pass in your own `remember`ed instance to observe `Interactions` and customize the appearance / behavior of this slider in different states. |