implement Media3 ExoPlayer for video playback

- Add Media3 UI, ExoPlayer, and Compose dependencies.
- Implement `PlayerActivity` with landscape orientation for video playback.
- Create `PlayerViewModel` to manage ExoPlayer lifecycle and media loading via Hilt.
- Define `VideoPlayerModule` to provide a configured `ExoPlayer` instance with tunneling and custom load control.
- Extend `JellyfinApiClient` to fetch media sources and video stream URLs.
- Update `ContinueWatchingCard` to launch `PlayerActivity` when the play button is clicked.
- Enforce portrait orientation for the main application and filter duplicate items in `HomePageViewModel`.
This commit is contained in:
2026-01-18 02:09:11 +01:00
parent 6529b109f8
commit fd100816cc
11 changed files with 262 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ kotlinxSerializationJson = "1.7.3"
okhttp = "4.12.0"
foundation = "1.10.1"
coil = "3.3.0"
media3 = "1.9.0"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -46,8 +47,9 @@ logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-intercep
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "foundation" }
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }
coil-network-okhttp = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", version.ref = "coil" }
medi3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3"}
medi3-ui = { group = "androidx.media3", name = "media3-ui", version.ref = "media3"}
medi3-ui-compose = { group = "androidx.media3", name = "media3-ui-compose-material3", version.ref = "media3"}
[plugins]