An app playing media requires user interface components for displaying media and controlling playback. The Media3 library includes two UI modules that contain a number of UI components.

To use the[Views-based UI module](https://developer.android.com/media/media3/ui/playerview), add the following dependency:  

### Kotlin

```kotlin
implementation("androidx.media3:media3-ui:1.8.0")
```

### Groovy

```groovy
implementation "androidx.media3:media3-ui:1.8.0"
```

To depend on the[Jetpack Compose-based UI module](https://developer.android.com/media/media3/ui/compose), add the following dependency:  

### Kotlin

```kotlin
implementation("androidx.media3:media3-ui-compose:1.8.0")
```

### Groovy

```groovy
implementation "androidx.media3:media3-ui-compose:1.8.0"
```

We highly encourage you to develop your app in a Compose-first fashion or[migrate from using Views](https://developer.android.com/develop/ui/compose/migrate).

**Note:** The`media3-ui-compose`module is not yet at parity with the`media3-ui`module.