mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

It captures the information needed for the UI logic related to rendering of the video track (and later images) to the surface. The video size will be correct only after the Player decoded the video onto the surface and can't be reliably extracted from MediaItem's metadata. The information about the video's true aspect ratio helps inform the UI elements (such as PlayerSurface Composable) how to customize the Modifiers. Use this state in demo-compose to show off functionality of changing `PlayerSurface`'s aspectRatio PiperOrigin-RevId: 714104260
ExoPlayer demo with Compose integration
This is an experimental ExoPlayer demo app that is built fully using Compose features. This should be taken as Work-In-Progress, rather than experimental API for testing out application development with the media3 and Jetpack Compose libraries. Please await further announcement via Release Notes for when the implementation is fully integrated into the library.
For an intermediate solution, use Jetpack Compose Interop with AndroidView and PlayerView. However, note that it provides limited functionality and some features may not be supported.
See the demos README for instructions on how to build and run this demo.