media/demos/compose
jbibik 676a3872a5 Add PlayPauseButtonState to ui-compose
Provide a helper Composable for remembering the state instance and launching the listening coroutine that observes the changes in the Player

Add an example to demo-compose of using PlayPauseButtonState inside a PlayPauseButton Composable.

The smart State object has been deemed a preferred solution over collecting Flows due to queuing/timing/buffering limitations. Instead, it uses the new `Player.listen` suspending extension function to catch the relevant events.

PiperOrigin-RevId: 691879975
2024-10-31 11:42:14 -07:00
..
src/main Add PlayPauseButtonState to ui-compose 2024-10-31 11:42:14 -07:00
build.gradle Add PlayPauseButtonState to ui-compose 2024-10-31 11:42:14 -07:00
lint.xml Add PlayPauseButtonState to ui-compose 2024-10-31 11:42:14 -07:00
README.md Add a new empty Compose Demo as a skeleton 2024-03-28 12:30:20 -07:00

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.