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 , add the following dependency:
Котлин
implementation("androidx.media3:media3-ui:1.10.0")
Классный
implementation "androidx.media3:media3-ui:1.10.0"
To depend on the Jetpack Compose-based UI module , add the following dependency:
Котлин
implementation("androidx.media3:media3-ui-compose:1.10.0")
Классный
implementation "androidx.media3:media3-ui-compose:1.10.0"
To depend on the Jetpack Compose-based UI module with Material3 , add the following dependency:
Котлин
implementation("androidx.media3:media3-ui-compose-material3:1.10.0")
Классный
implementation "androidx.media3:media3-ui-compose-material3:1.10.0"
Мы настоятельно рекомендуем разрабатывать ваше приложение, используя подход Compose-first, или перейти с использования Views .
Примечание: Модули media3-ui-compose и media3-ui-compose-material3 пока не достигли уровня модуля media3-ui .