Posts on Medium Ioannis Anifantakis Nov 19, 2025

Modernizing ExoPlayer with Media3’s Compose UI

Article Summary

For years, video playback was the one piece of Android UI that refused to go fully declarative. That changed when Google shipped Media3's Compose UI module.

Ioannis Anifantakis walks through migrating ExoPlayer from the old AndroidView + PlayerView pattern to Media3's native Compose components. This is a practical, code-heavy guide showing what changed in Media3 1.6.0 and 1.8.0, and why it matters for Compose-first apps.

Key Takeaways

Critical Insight

Media3's Compose UI module eliminates the View-Compose interop tax for video playback, making ExoPlayer a first-class citizen in declarative Android apps.

The article includes a complete custom scrubbing overlay implementation that shows how much simpler layout becomes when video is just another Composable.

About This Article

Problem

Building ExoPlayer apps meant writing a lot of boilerplate code. Developers had to manually implement Player.Listener to convert player events into Compose state, which made it easy to miss something when the UI needed to show buffering or playback status.

Solution

Media3 includes state holders like rememberPlayPauseButtonState and rememberPresentationState that automatically listen to Player events and give you clean UI state with onClick handlers ready to use. You don't have to wire up listeners yourself.

Impact

Developers can build complete player UIs in Compose without needing AndroidView interop. This cuts down on code and makes video playback work the same way as the rest of your Compose UI.