# MediaPlaybackStyle

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/media/model/MediaPlaybackStyle.java+class:androidx.car.app.media.model.MediaPlaybackStyle) Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 9)
@ExperimentalCarApi
class MediaPlaybackStyle
```

<br />

*** ** * ** ***

Defines the visual style for a `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackTemplate`.

This style can be used to customize media playback interactive controls and progress indicators, such as their accent color and stroke cap shape.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor?` | `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle#getMediaAccentColor()()` Returns the custom media accent `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` for interactive controls, or `null` if none was set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle#getProgressBarStrokeCap()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/StrokeCap` shape for the playback progress bar, or `https://developer.android.com/reference/kotlin/androidx/car/app/model/StrokeCap#DEFAULT()` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/media/model/MediaPlaybackStyle#toString()()` |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getMediaAccentColor

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getMediaAccentColor(): CarColor?
```

Returns the custom media accent `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` for interactive controls, or `null` if none was set.

### getProgressBarStrokeCap

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getProgressBarStrokeCap(): Int
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/StrokeCap` shape for the playback progress bar, or `https://developer.android.com/reference/kotlin/androidx/car/app/model/StrokeCap#DEFAULT()` if not set.

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```